@genesislcap/foundation-forms 10.3.1 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/form.d.ts +5 -2
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/jsonforms/json-forms.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts +1 -1
- package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ConnectedMultiselectControlRenderer.d.ts +1 -1
- package/dist/dts/jsonforms/renderers/ConnectedMultiselectControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ConnectedSelectControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/testers/isOneOfNumber.d.ts.map +1 -1
- package/dist/dts/types.d.ts +11 -2
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/dts/utils/translation.d.ts +1 -0
- package/dist/dts/utils/translation.d.ts.map +1 -1
- package/dist/dts/utils/validation.d.ts +2 -1
- package/dist/dts/utils/validation.d.ts.map +1 -1
- package/dist/esm/form.js +6 -6
- package/dist/esm/form.styles.js +0 -1
- package/dist/esm/form.template.js +0 -1
- package/dist/esm/index.federated.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/jsonforms/json-forms.js +1 -7
- package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js +1 -2
- package/dist/esm/jsonforms/renderers/ConnectedMultiselectControlRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js +0 -2
- package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/DateControlRenderer.js +1 -2
- package/dist/esm/jsonforms/renderers/EnumControlRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/InvisibleControlRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/LayoutRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/NumberControlRenderer.js +1 -2
- package/dist/esm/jsonforms/renderers/RenderersRanks.js +0 -1
- package/dist/esm/jsonforms/renderers/StringControlRenderer.js +0 -1
- package/dist/esm/jsonforms/renderers/dispatch-renderer.js +0 -1
- package/dist/esm/jsonforms/testers/isDate.js +0 -1
- package/dist/esm/jsonforms/testers/isInvisible.js +0 -1
- package/dist/esm/jsonforms/testers/isOneOfBoolean.js +0 -1
- package/dist/esm/jsonforms/testers/isOneOfEnum.js +0 -1
- package/dist/esm/jsonforms/testers/isOneOfNumber.js +0 -1
- package/dist/esm/jsonforms/testers/isOneOfOptionMultiselect.js +0 -1
- package/dist/esm/jsonforms/testers/optionIs.js +0 -1
- package/dist/esm/types.js +0 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/translation.js +1 -1
- package/dist/esm/utils/validation.js +2 -2
- package/dist/foundation-forms.api.json +42 -38
- package/dist/foundation-forms.d.ts +17 -2
- package/docs/api/foundation-forms.form.data.md +1 -1
- package/docs/api/foundation-forms.form.md +1 -1
- package/docs/api/foundation-forms.genesiserrortranslator.md +1 -0
- package/docs/api/foundation-forms.md +1 -1
- package/docs/api/foundation-forms.rendererentry.md +1 -0
- package/docs/api/{foundation-forms.logger.md → foundation-forms.renderers.md} +4 -3
- package/docs/api/foundation-forms.uischema.md +1 -0
- package/docs/api/foundation-forms.uischemaelement.md +1 -0
- package/docs/api/foundation-forms.uischemaelementoptions.md +4 -0
- package/docs/api/foundation-forms.uischemaelementtype.md +1 -0
- package/docs/api-report.md +12 -3
- package/package.json +14 -9
- package/dist/1.0.0.remoteEntry.js +0 -1
- package/dist/160.160.124ed2c5959b53210cbd.js +0 -2
- package/dist/160.190aff29e1d6cef60fa941e3ecd169b4.js.map +0 -1
- package/dist/173.173.72404a543fa554805856.js +0 -317
- package/dist/173.a84be468354229f21219811743190e9a.js.map +0 -1
- package/dist/191.191.0325d5c8852ae4921bad.js +0 -2
- package/dist/191.cfb3865153509ec434d0ee1d06702e06.js.map +0 -1
- package/dist/211.211.9bb272a936b1d1e91e6d.js +0 -2
- package/dist/211.618f438c5ae26e2eca20a00121c574ad.js.map +0 -1
- package/dist/259.259.2d238ae3cf8d8bdeba08.js +0 -2
- package/dist/259.550ac263c3f91b2416d000cf2f255ebb.js.map +0 -1
- package/dist/338.338.3768ac40171574445388.js +0 -3
- package/dist/338.338.3768ac40171574445388.js.LICENSE.txt +0 -1
- package/dist/338.b80e69713f188e86ac3d235966bec4b6.js.map +0 -1
- package/dist/623.2132bb44d6962138c26ec8c716abfb8c.js.map +0 -1
- package/dist/623.623.4eb55ef851cb4acfb42d.js +0 -3
- package/dist/623.623.4eb55ef851cb4acfb42d.js.LICENSE.txt +0 -4
- package/dist/730.730.d1c0de79e754bac881cb.js +0 -2
- package/dist/730.a7dfb868a3009f72a7daed20f5f05cd4.js.map +0 -1
- package/dist/755.755.001fb1761db3672074d3.js +0 -2
- package/dist/755.ef9ff39a1d56dfd14bc47cd9f22cfc9f.js.map +0 -1
- package/dist/817.817.09800be1f64f8771bf91.js +0 -2
- package/dist/817.c03de73750c9e91e022d445f10572b93.js.map +0 -1
- package/dist/914.3464d6aedd1272b9a7824381f8c69dc5.js.map +0 -1
- package/dist/914.914.9c2af15b0145e5b35752.js +0 -3
- package/dist/914.914.9c2af15b0145e5b35752.js.LICENSE.txt +0 -4
- package/dist/dashboard.json +0 -1
- package/dist/esm/form.js.map +0 -1
- package/dist/esm/form.styles.js.map +0 -1
- package/dist/esm/form.template.js.map +0 -1
- package/dist/esm/index.federated.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/jsonforms/json-forms.js.map +0 -1
- package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/ConnectedMultiselectControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/DateControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/EnumControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/InvisibleControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/LayoutRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/NumberControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/RenderersRanks.js.map +0 -1
- package/dist/esm/jsonforms/renderers/StringControlRenderer.js.map +0 -1
- package/dist/esm/jsonforms/renderers/dispatch-renderer.js.map +0 -1
- package/dist/esm/jsonforms/testers/isDate.js.map +0 -1
- package/dist/esm/jsonforms/testers/isInvisible.js.map +0 -1
- package/dist/esm/jsonforms/testers/isOneOfBoolean.js.map +0 -1
- package/dist/esm/jsonforms/testers/isOneOfEnum.js.map +0 -1
- package/dist/esm/jsonforms/testers/isOneOfNumber.js.map +0 -1
- package/dist/esm/jsonforms/testers/isOneOfOptionMultiselect.js.map +0 -1
- package/dist/esm/jsonforms/testers/optionIs.js.map +0 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/translation.js.map +0 -1
- package/dist/esm/utils/validation.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/foundation-forms.iife.min.js +0 -28
- package/dist/foundation-forms.js +0 -30840
- package/dist/foundation-forms.min.js +0 -26
- package/dist/foundationForms.76da734dcb8b5804415dc15f81837c4e.js.map +0 -1
- package/dist/index.ejs +0 -23
- package/dist/index.html +0 -18
- package/dist/info.ejs +0 -13
- package/dist/main.3c0082e87729584525356a6468a82555.js.map +0 -1
- package/dist/main.8584b1425d55f4af99a6.js +0 -2
- package/dist/npm.ajv.213.0edf0dee76a3e8e16fa5.js +0 -8
- package/dist/npm.ajv.a70ac538476d2b86b0c95c3cddc46db2.js.map +0 -1
- package/dist/npm.analytics.343.c50e91b7d34234ff5598.js +0 -2
- package/dist/npm.analytics.9350473da68aa7584e1ffd2293d7eb64.js.map +0 -1
- package/dist/npm.consola.713.0a877d79045b2ced4b28.js +0 -2
- package/dist/npm.consola.b723f5d54df2d007a63f167647d0db4f.js.map +0 -1
- package/dist/npm.finos.690.a9cbfbb544d61a77cb75.js +0 -2
- package/dist/npm.finos.d24836382e0fd4c82511da38f1e2d712.js.map +0 -1
- package/dist/npm.jsonforms.832.135f578bfa3e3426340a.js +0 -2
- package/dist/npm.jsonforms.d742a744d53545575dc0f741c7f95a16.js.map +0 -1
- package/dist/npm.lodash.913.2f761568d7b7540de80a.js +0 -2
- package/dist/npm.lodash.a3a76c8fca5de460b782c77b99c930c9.js.map +0 -1
- package/dist/npm.microsoft.127.c2ce55cc34c771dd0e4f.js +0 -1469
- package/dist/npm.microsoft.127.c2ce55cc34c771dd0e4f.js.LICENSE.txt +0 -14
- package/dist/npm.microsoft.351f8b8b5cd6f2b1872524cc47c1a893.js.map +0 -1
- package/dist/npm.rxjs.271.c9ec2153535d20987f67.js +0 -2
- package/dist/npm.rxjs.d2fed746c0fef18592a807dcc82cba1c.js.map +0 -1
- package/dist/npm.uri-js.2c30a8d9b49ce1474de4ba46d0bc69a6.js.map +0 -1
- package/dist/npm.uri-js.415.4ffa54936c8e552b506d.js +0 -3
- package/dist/npm.uri-js.415.4ffa54936c8e552b506d.js.LICENSE.txt +0 -1
- package/dist/remoteEntry.js +0 -2
- package/dist/serve.json +0 -3
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
!function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function o(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function i(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=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])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&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}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function u(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function d(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(c,l):u(s[0][2],r)}catch(e){u(s[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function f(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=c(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const v=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===v.trustedTypes&&(v.trustedTypes={createPolicy:(e,t)=>t});const g={configurable:!1,enumerable:!1,writable:!1};void 0===v.FAST&&Reflect.defineProperty(v,"FAST",Object.assign({value:Object.create(null)},g));const y=v.FAST;if(void 0===y.getById){const e=Object.create(null);Reflect.defineProperty(y,"getById",Object.assign({value(t,r){let n=e[t];return void 0===n&&(n=r?e[t]=r():null),n}},g))}const b=Object.freeze([]);function _(){const e=new WeakMap;return function(t){let r=e.get(t);if(void 0===r){let n=Reflect.getPrototypeOf(t);for(;void 0===r&&null!==n;)r=e.get(n),n=Reflect.getPrototypeOf(n);r=void 0===r?[]:r.slice(0),e.set(t,r)}return r}}const w=v.FAST.getById(1,(()=>{const e=[],t=[];function r(){if(t.length)throw t.shift()}function n(e){try{e.call()}catch(e){t.push(e),setTimeout(r,0)}}function o(){let t=0;for(;t<e.length;)if(n(e[t]),t++,t>1024){for(let r=0,n=e.length-t;r<n;r++)e[r]=e[r+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(t){e.length<1&&v.requestAnimationFrame(o),e.push(t)},process:o})})),S=v.trustedTypes.createPolicy("fast-html",{createHTML:e=>e});let E=S;const $=`fast-${Math.random().toString(36).substring(2,8)}`,O=`${$}{`,C=`}${$}`,A=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(E!==S)throw new Error("The HTML policy can only be set once.");E=e},createHTML:e=>E.createHTML(e),isMarker:e=>e&&8===e.nodeType&&e.data.startsWith($),extractDirectiveIndexFromMarker:e=>parseInt(e.data.replace(`${$}:`,"")),createInterpolationPlaceholder:e=>`${O}${e}${C}`,createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder:e=>`\x3c!--${$}:${e}--\x3e`,queueUpdate:w.enqueue,processUpdates:w.process,nextUpdate:()=>new Promise(w.enqueue),setAttribute(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)},setBooleanAttribute(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker:e=>document.createTreeWalker(e,133,null,!1)});class T{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const r=t.indexOf(e);-1!==r&&t.splice(r,1)}}notify(e){const t=this.spillover,r=this.source;if(void 0===t){const t=this.sub1,n=this.sub2;void 0!==t&&t.handleChange(r,e),void 0!==n&&n.handleChange(r,e)}else for(let n=0,o=t.length;n<o;++n)t[n].handleChange(r,e)}}class x{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;const r=this.subscribers[e];void 0!==r&&r.notify(e),null===(t=this.sourceSubscribers)||void 0===t||t.notify(e)}subscribe(e,t){var r;if(t){let r=this.subscribers[t];void 0===r&&(this.subscribers[t]=r=new T(this.source)),r.subscribe(e)}else this.sourceSubscribers=null!==(r=this.sourceSubscribers)&&void 0!==r?r:new T(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var r;if(t){const r=this.subscribers[t];void 0!==r&&r.unsubscribe(e)}else null===(r=this.sourceSubscribers)||void 0===r||r.unsubscribe(e)}}const P=y.getById(2,(()=>{const e=/(:|&&|\|\||if)/,t=new WeakMap,r=A.queueUpdate;let n,o=e=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function s(e){let r=e.$fastController||t.get(e);return void 0===r&&(Array.isArray(e)?r=o(e):t.set(e,r=new x(e))),r}const i=_();class a{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const r=this.field,n=e[r];if(n!==t){e[r]=t;const o=e[this.callback];"function"==typeof o&&o.call(e,n,t),s(e).notify(this.name)}}}class c extends T{constructor(e,t,r=!1){super(e,t),this.binding=e,this.isVolatileBinding=r,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const r=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(e,t);return n=r,o}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const r=this.last,o=s(e),i=null===r?this.first:{};if(i.propertySource=e,i.propertyName=t,i.notifier=o,o.subscribe(this,t),null!==r){if(!this.needsRefresh){let t;n=void 0,t=r.propertySource[r.propertyName],n=this,e===t&&(this.needsRefresh=!0)}r.next=i}this.last=i}handleChange(){this.needsQueue&&(this.needsQueue=!1,r(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){o=e},getNotifier:s,track(e,t){void 0!==n&&n.watch(e,t)},trackVolatile(){void 0!==n&&(n.needsRefresh=!0)},notify(e,t){s(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new a(t)),i(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:i,binding(e,t,r=this.isVolatileBinding(e)){return new c(e,t,r)},isVolatileBinding:t=>e.test(t.toString())})}));function j(e,t){P.defineProperty(e,t)}function N(e,t,r){return Object.assign({},r,{get:function(){return P.trackVolatile(),r.get.apply(this)}})}const R=y.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}}));class k{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return R.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){R.set(e)}}P.defineProperty(k.prototype,"index"),P.defineProperty(k.prototype,"length");const I=Object.seal(new k);class M{constructor(){this.targetIndex=0}}class D extends M{constructor(){super(...arguments),this.createPlaceholder=A.createInterpolationPlaceholder}}function F(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=P.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function V(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function L(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function U(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function z(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function B(e){A.setAttribute(this.target,this.targetName,e)}function G(e){A.setBooleanAttribute(this.target,this.targetName,e)}function H(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function W(e){this.target[this.targetName]=e}function q(e){const t=this.classVersions||Object.create(null),r=this.target;let n=this.version||0;if(null!=e&&e.length){const o=e.split(/\s+/);for(let e=0,s=o.length;e<s;++e){const s=o[e];""!==s&&(t[s]=n,r.classList.add(s))}}if(this.classVersions=t,this.version=n+1,0!==n){n-=1;for(const e in t)t[e]===n&&r.classList.remove(e)}}class K extends D{constructor(e){super(),this.binding=e,this.bind=F,this.unbind=L,this.updateTarget=B,this.isBindingVolatile=P.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,void 0!==e)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=W,"innerHTML"===this.cleanedTargetName){const e=this.binding;this.binding=(t,r)=>A.createHTML(e(t,r))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=G;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=V,this.unbind=z;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=q)}}targetAtContent(){this.updateTarget=H,this.unbind=U}createBehavior(e){return new Y(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class Y{constructor(e,t,r,n,o,s,i){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=r,this.bind=n,this.unbind=o,this.updateTarget=s,this.targetName=i}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){k.setEvent(e);const t=this.binding(this.source,this.context);k.setEvent(null),!0!==t&&e.preventDefault()}}let J=null;class Q{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){J=this}static borrow(e){const t=J||new Q;return t.directives=e,t.reset(),J=null,t}}function Z(e){if(1===e.length)return e[0];let t;const r=e.length,n=e.map((e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding))),o=new K(((e,t)=>{let o="";for(let s=0;s<r;++s)o+=n[s](e,t);return o}));return o.targetName=t,o}const X=C.length;function ee(e,t){const r=t.split(O);if(1===r.length)return null;const n=[];for(let t=0,o=r.length;t<o;++t){const o=r[t],s=o.indexOf(C);let i;if(-1===s)i=o;else{const t=parseInt(o.substring(0,s));n.push(e.directives[t]),i=o.substring(s+X)}""!==i&&n.push(i)}return n}function te(e,t,r=!1){const n=t.attributes;for(let o=0,s=n.length;o<s;++o){const i=n[o],a=i.value,c=ee(e,a);let l=null;null===c?r&&(l=new K((()=>a)),l.targetName=i.name):l=Z(c),null!==l&&(t.removeAttributeNode(i),o--,s--,e.addFactory(l))}}function re(e,t,r){const n=ee(e,t.textContent);if(null!==n){let o=t;for(let s=0,i=n.length;s<i;++s){const i=n[s],a=0===s?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof i?a.textContent=i:(a.textContent=" ",e.captureContentBinding(i)),o=a,e.targetIndex++,a!==t&&r.nextNode()}e.targetIndex--}}const ne=document.createRange();class oe{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const r=e.parentNode;let n,o=this.firstChild;for(;o!==t;)n=o.nextSibling,r.insertBefore(o,e),o=n;r.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.appendChild(n),n=r;e.appendChild(t)}dispose(){const e=this.firstChild.parentNode,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.removeChild(n),n=r;e.removeChild(t);const o=this.behaviors,s=this.source;for(let e=0,t=o.length;e<t;++e)o[e].unbind(s)}bind(e,t){const r=this.behaviors;if(this.source!==e)if(null!==this.source){const n=this.source;this.source=e,this.context=t;for(let o=0,s=r.length;o<s;++o){const s=r[o];s.unbind(n),s.bind(e,t)}}else{this.source=e,this.context=t;for(let n=0,o=r.length;n<o;++n)r[n].bind(e,t)}}unbind(){if(null===this.source)return;const e=this.behaviors,t=this.source;for(let r=0,n=e.length;r<n;++r)e[r].unbind(t);this.source=null}static disposeContiguousBatch(e){if(0!==e.length){ne.setStartBefore(e[0].firstChild),ne.setEndAfter(e[e.length-1].lastChild),ne.deleteContents();for(let t=0,r=e.length;t<r;++t){const r=e[t],n=r.behaviors,o=r.source;for(let e=0,t=n.length;e<t;++e)n[e].unbind(o)}}}}class se{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(null===this.fragment){let e;const t=this.html;if("string"==typeof t){e=document.createElement("template"),e.innerHTML=A.createHTML(t);const r=e.content.firstElementChild;null!==r&&"TEMPLATE"===r.tagName&&(e=r)}else e=t;const r=function(e,t){const r=e.content;document.adoptNode(r);const n=Q.borrow(t);te(n,e,!0);const o=n.behaviorFactories;n.reset();const s=A.createTemplateWalker(r);let i;for(;i=s.nextNode();)switch(n.targetIndex++,i.nodeType){case 1:te(n,i);break;case 3:re(n,i,s);break;case 8:A.isMarker(i)&&n.addFactory(t[A.extractDirectiveIndexFromMarker(i)])}let a=0;(A.isMarker(r.firstChild)||1===r.childNodes.length&&t.length)&&(r.insertBefore(document.createComment(""),r.firstChild),a=-1);const c=n.behaviorFactories;return n.release(),{fragment:r,viewBehaviorFactories:c,hostBehaviorFactories:o,targetOffset:a}}(e,this.directives);this.fragment=r.fragment,this.viewBehaviorFactories=r.viewBehaviorFactories,this.hostBehaviorFactories=r.hostBehaviorFactories,this.targetOffset=r.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const t=this.fragment.cloneNode(!0),r=this.viewBehaviorFactories,n=new Array(this.behaviorCount),o=A.createTemplateWalker(t);let s=0,i=this.targetOffset,a=o.nextNode();for(let e=r.length;s<e;++s){const e=r[s],t=e.targetIndex;for(;null!==a;){if(i===t){n[s]=e.createBehavior(a);break}a=o.nextNode(),i++}}if(this.hasHostBehaviors){const t=this.hostBehaviorFactories;for(let r=0,o=t.length;r<o;++r,++s)n[s]=t[r].createBehavior(e)}return new oe(t,n)}render(e,t,r){"string"==typeof t&&(t=document.getElementById(t)),void 0===r&&(r=t);const n=this.create(r);return n.bind(e,I),n.appendTo(t),n}}const ie=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function ae(e,...t){const r=[];let n="";for(let o=0,s=e.length-1;o<s;++o){const s=e[o];let i=t[o];if(n+=s,i instanceof se){const e=i;i=()=>e}if("function"==typeof i&&(i=new K(i)),i instanceof D){const e=ie.exec(s);null!==e&&(i.targetName=e[2])}i instanceof M?(n+=i.createPlaceholder(r.length),r.push(i)):n+=i}return n+=e[e.length-1],new se(n,r)}class ce{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function le(e){return e.map((e=>e instanceof ce?le(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}function ue(e){return e.map((e=>e instanceof ce?e.behaviors:null)).reduce(((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t))),null)}ce.create=(()=>{if(A.supportsAdoptedStyleSheets){const e=new Map;return t=>new he(t,e)}return e=>new fe(e)})();class he extends ce{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=ue(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=le(e).map((e=>{if(e instanceof CSSStyleSheet)return e;let r=t.get(e);return void 0===r&&(r=new CSSStyleSheet,r.replaceSync(e),t.set(e,r)),r}))}return this._styleSheets}addStylesTo(e){e.adoptedStyleSheets=[...e.adoptedStyleSheets,...this.styleSheets],super.addStylesTo(e)}removeStylesFrom(e){const t=this.styleSheets;e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e))),super.removeStylesFrom(e)}}let de=0;class fe extends ce{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=ue(e),this.styleSheets=le(e),this.styleClass="fast-style-class-"+ ++de}addStylesTo(e){const t=this.styleSheets,r=this.styleClass;e=this.normalizeTarget(e);for(let n=0;n<t.length;n++){const o=document.createElement("style");o.innerHTML=t[n],o.className=r,e.append(o)}super.addStylesTo(e)}removeStylesFrom(e){const t=(e=this.normalizeTarget(e)).querySelectorAll(`.${this.styleClass}`);for(let r=0,n=t.length;r<n;++r)e.removeChild(t[r]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}}const pe=Object.freeze({locate:_()}),me={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};class ve{constructor(e,t,r=t.toLowerCase(),n="reflect",o){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=r,this.mode=n,this.converter=o,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===o&&(this.converter=me)}setValue(e,t){const r=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.fromView(t)),r!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](r,t),e.$fastController.notify(this.name))}getValue(e){return P.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,r=this.guards;r.has(e)||"fromView"===t||A.queueUpdate((()=>{r.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;A.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":A.setBooleanAttribute(e,this.attribute,n)}r.delete(e)}))}static collect(e,...t){const r=[];t.push(pe.locate(e));for(let n=0,o=t.length;n<o;++n){const o=t[n];if(void 0!==o)for(let t=0,n=o.length;t<n;++t){const n=o[t];"string"==typeof n?r.push(new ve(e,n)):r.push(new ve(e,n.property,n.attribute,n.mode,n.converter))}}return r}}function ge(e,t){let r;function n(e,t){arguments.length>1&&(r.property=t),pe.locate(e.constructor).push(r)}return arguments.length>1?(r={},void n(e,t)):(r=void 0===e?{}:e,n)}const ye={mode:"open"},be={},_e=y.getById(4,(()=>{const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t)})}));class we{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const r=ve.collect(e,t.attributes),n=new Array(r.length),o={},s={};for(let e=0,t=r.length;e<t;++e){const t=r[e];n[e]=t.attribute,o[t.name]=t,s[t.attribute]=t}this.attributes=r,this.observedAttributes=n,this.propertyLookup=o,this.attributeLookup=s,this.shadowOptions=void 0===t.shadowOptions?ye:null===t.shadowOptions?void 0:Object.assign(Object.assign({},ye),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?be:Object.assign(Object.assign({},be),t.elementOptions),this.styles=void 0===t.styles?void 0:Array.isArray(t.styles)?ce.create(t.styles):t.styles instanceof ce?t.styles:ce.create([t.styles])}get isDefined(){return!!_e.getByType(this.type)}define(e=customElements){const t=this.type;if(_e.register(this)){const e=this.attributes,r=t.prototype;for(let t=0,n=e.length;t<n;++t)P.defineProperty(r,e[t]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}}we.forType=_e.getByType;const Se=new WeakMap,Ee={bubbles:!0,composed:!0,cancelable:!0};function $e(e){return e.shadowRoot||Se.get(e)||null}class Oe extends x{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;const r=t.shadowOptions;if(void 0!==r){const t=e.attachShadow(r);"closed"===r.mode&&Se.set(e,t)}const n=P.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let r=0,o=n.length;r<o;++r){const o=n[r].name,s=e[o];void 0!==s&&(delete e[o],t[o]=s)}}}get isConnected(){return P.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,P.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=e,this.needsInitialization||null===e||this.addStyles(e))}addStyles(e){const t=$e(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){const r=e.behaviors;e.addStylesTo(t),null!==r&&this.addBehaviors(r)}}removeStyles(e){const t=$e(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){const r=e.behaviors;e.removeStylesFrom(t),null!==r&&this.removeBehaviors(r)}}addBehaviors(e){const t=this.behaviors||(this.behaviors=new Map),r=e.length,n=[];for(let o=0;o<r;++o){const r=e[o];t.has(r)?t.set(r,t.get(r)+1):(t.set(r,1),n.push(r))}if(this._isConnected){const e=this.element;for(let t=0;t<n.length;++t)n[t].bind(e,I)}}removeBehaviors(e,t=!1){const r=this.behaviors;if(null===r)return;const n=e.length,o=[];for(let s=0;s<n;++s){const n=e[s];if(r.has(n)){const e=r.get(n)-1;0===e||t?r.delete(n)&&o.push(n):r.set(n,e)}}if(this._isConnected){const e=this.element;for(let t=0;t<o.length;++t)o[t].unbind(e)}}onConnectedCallback(){if(this._isConnected)return;const e=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(e,I);const t=this.behaviors;if(null!==t)for(const[r]of t)r.bind(e,I);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const e=this.view;null!==e&&e.unbind();const t=this.behaviors;if(null!==t){const e=this.element;for(const[r]of t)r.unbind(e)}}onAttributeChangedCallback(e,t,r){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.element,r)}emit(e,t,r){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},Ee),r)))}finishInitialization(){const e=this.element,t=this.boundObservables;if(null!==t){const r=Object.keys(t);for(let n=0,o=r.length;n<o;++n){const o=r[n];e[o]=t[o]}this.boundObservables=null}const r=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():r.template&&(this._template=r.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():r.styles&&(this._styles=r.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){const t=this.element,r=$e(t)||t;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||A.removeChildNodes(r),e&&(this.view=e.render(t,r,t))}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const r=we.forType(e.constructor);if(void 0===r)throw new Error("Missing FASTElement definition.");return e.$fastController=new Oe(e,r)}}function Ce(e){return class extends e{constructor(){super(),Oe.forCustomElement(this)}$emit(e,t,r){return this.$fastController.emit(e,t,r)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,r){this.$fastController.onAttributeChangedCallback(e,t,r)}}}const Ae=Object.assign(Ce(HTMLElement),{from:e=>Ce(e),define:(e,t)=>new we(e,t).define().type});function Te(e){return function(t){new we(t,e).define()}}class xe{createCSS(){return""}createBehavior(){}}function Pe(e,...t){const{styles:r,behaviors:n}=function(e,t){const r=[];let n="";const o=[];for(let s=0,i=e.length-1;s<i;++s){n+=e[s];let i=t[s];if(i instanceof xe){const e=i.createBehavior();i=i.createCSS(),e&&o.push(e)}i instanceof ce||i instanceof CSSStyleSheet?(""!==n.trim()&&(r.push(n),n=""),r.push(i)):n+=i}return n+=e[e.length-1],""!==n.trim()&&r.push(n),{styles:r,behaviors:o}}(e,t),o=ce.create(r);return n.length&&o.withBehaviors(...n),o}function je(e,t,r){return{index:e,removed:t,addedCount:r}}const Ne=0,Re=1,ke=2,Ie=3;function Me(e,t,r,n,o,s){let i=0,a=0;const c=Math.min(r-t,s-o);if(0===t&&0===o&&(i=function(e,t,r){for(let n=0;n<r;++n)if(e[n]!==t[n])return n;return r}(e,n,c)),r===e.length&&s===n.length&&(a=function(e,t,r){let n=e.length,o=t.length,s=0;for(;s<r&&e[--n]===t[--o];)s++;return s}(e,n,c-i)),o+=i,s-=a,(r-=a)-(t+=i)==0&&s-o==0)return b;if(t===r){const e=je(t,[],0);for(;o<s;)e.removed.push(n[o++]);return[e]}if(o===s)return[je(t,[],r-t)];const l=function(e){let t=e.length-1,r=e[0].length-1,n=e[t][r];const o=[];for(;t>0||r>0;){if(0===t){o.push(ke),r--;continue}if(0===r){o.push(Ie),t--;continue}const s=e[t-1][r-1],i=e[t-1][r],a=e[t][r-1];let c;c=i<a?i<s?i:s:a<s?a:s,c===s?(s===n?o.push(Ne):(o.push(Re),n=s),t--,r--):c===i?(o.push(Ie),t--,n=i):(o.push(ke),r--,n=a)}return o.reverse(),o}(function(e,t,r,n,o,s){const i=s-o+1,a=r-t+1,c=new Array(i);let l,u;for(let e=0;e<i;++e)c[e]=new Array(a),c[e][0]=e;for(let e=0;e<a;++e)c[0][e]=e;for(let r=1;r<i;++r)for(let s=1;s<a;++s)e[t+s-1]===n[o+r-1]?c[r][s]=c[r-1][s-1]:(l=c[r-1][s]+1,u=c[r][s-1]+1,c[r][s]=l<u?l:u);return c}(e,t,r,n,o,s)),u=[];let h,d=t,f=o;for(let e=0;e<l.length;++e)switch(l[e]){case Ne:void 0!==h&&(u.push(h),h=void 0),d++,f++;break;case Re:void 0===h&&(h=je(d,[],0)),h.addedCount++,d++,h.removed.push(n[f]),f++;break;case ke:void 0===h&&(h=je(d,[],0)),h.addedCount++,d++;break;case Ie:void 0===h&&(h=je(d,[],0)),h.removed.push(n[f]),f++}return void 0!==h&&u.push(h),u}const De=Array.prototype.push;function Fe(e,t,r,n){const o=je(t,r,n);let s=!1,i=0;for(let t=0;t<e.length;t++){const r=e[t];if(r.index+=i,s)continue;const n=(a=o.index,c=o.index+o.removed.length,l=r.index,u=r.index+r.addedCount,c<l||u<a?-1:c===l||u===a?0:a<l?c<u?c-l:u-l:u<c?u-a:c-a);if(n>=0){e.splice(t,1),t--,i-=r.addedCount-r.removed.length,o.addedCount+=r.addedCount-n;const a=o.removed.length+r.removed.length-n;if(o.addedCount||a){let e=r.removed;if(o.index<r.index){const t=o.removed.slice(0,r.index-o.index);De.apply(t,e),e=t}if(o.index+o.removed.length>r.index+r.addedCount){const t=o.removed.slice(r.index+r.addedCount-o.index);De.apply(e,t)}o.removed=e,r.index<o.index&&(o.index=r.index)}else s=!0}else if(o.index<r.index){s=!0,e.splice(t,0,o),t++;const n=o.addedCount-o.removed.length;r.index+=n,i+=n}}var a,c,l,u;s||e.push(o)}function Ve(e,t){let r=[];const n=function(e){const t=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];Fe(t,n.index,n.removed,n.addedCount)}return t}(t);for(let t=0,o=n.length;t<o;++t){const o=n[t];1!==o.addedCount||1!==o.removed.length?r=r.concat(Me(e,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==e[o.index]&&r.push(o)}return r}let Le=!1;function Ue(e,t){let r=e.index;const n=t.length;return r>n?r=n-e.addedCount:r<0&&(r=n+e.removed.length+r-e.addedCount),r<0&&(r=0),e.index=r,e}class ze extends T{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,A.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,A.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const r=void 0===t?Ve(this.source,e):Me(this.source,0,this.source.length,t,0,t.length);this.notify(r)}}function Be(e,t){const r="function"==typeof t?t:()=>t;return(t,n)=>e(t,n)?r(t,n):null}const Ge=Object.freeze({positioning:!1,recycle:!0});function He(e,t,r,n){e.bind(t[r],n)}function We(e,t,r,n){const o=Object.create(n);o.index=r,o.length=t.length,e.bind(t[r],o)}class qe{constructor(e,t,r,n,o,s){this.location=e,this.itemsBinding=t,this.templateBinding=n,this.options=s,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=He,this.itemsBindingObserver=P.binding(t,this,r),this.templateBindingObserver=P.binding(n,this,o),s.positioning&&(this.bindView=We)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=b);const t=this.itemsObserver,r=this.itemsObserver=P.getNotifier(this.items),n=t!==r;n&&null!==t&&t.unsubscribe(this),(n||e)&&r.subscribe(this)}updateViews(e){const t=this.childContext,r=this.views,n=this.bindView,o=this.items,s=this.template,i=this.options.recycle,a=[];let c=0,l=0;for(let u=0,h=e.length;u<h;++u){const h=e[u],d=h.removed;let f=0,p=h.index;const m=p+h.addedCount,v=r.splice(h.index,d.length),g=l=a.length+v.length;for(;p<m;++p){const e=r[p],u=e?e.firstChild:this.location;let h;i&&l>0?(f<=g&&v.length>0?(h=v[f],f++):(h=a[c],c++),l--):h=s.create(),r.splice(p,0,h),n(h,o,p,t),h.insertBefore(u)}v[f]&&a.push(...v.slice(f))}for(let e=c,t=a.length;e<t;++e)a[e].dispose();if(this.options.positioning)for(let e=0,t=r.length;e<t;++e){const n=r[e].context;n.length=t,n.index=e}}refreshAllViews(e=!1){const t=this.items,r=this.childContext,n=this.template,o=this.location,s=this.bindView;let i=t.length,a=this.views,c=a.length;if(0!==i&&!e&&this.options.recycle||(oe.disposeContiguousBatch(a),c=0),0===c){this.views=a=new Array(i);for(let e=0;e<i;++e){const i=n.create();s(i,t,e,r),a[e]=i,i.insertBefore(o)}}else{let e=0;for(;e<i;++e)if(e<c){s(a[e],t,e,r)}else{const i=n.create();s(i,t,e,r),a.push(i),i.insertBefore(o)}const l=a.splice(e,c-e);for(e=0,i=l.length;e<i;++e)l[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,r=e.length;t<r;++t)e[t].unbind()}}class Ke extends M{constructor(e,t,r){super(),this.itemsBinding=e,this.templateBinding=t,this.options=r,this.createPlaceholder=A.createBlockPlaceholder,function(){if(Le)return;Le=!0,P.setArrayObserverFactory((e=>new ze(e)));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,r=e.push,n=e.reverse,o=e.shift,s=e.sort,i=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,r=t.apply(this,arguments),n=this.$fastController;return void 0!==n&&e&&n.addSplice(je(this.length,[r],0)),r},e.push=function(){const e=r.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Ue(je(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=n.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.shift=function(){const e=this.length>0,t=o.apply(this,arguments),r=this.$fastController;return void 0!==r&&e&&r.addSplice(je(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=s.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.splice=function(){const e=i.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Ue(je(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Ue(je(0,[],arguments.length),this)),e}}(),this.isItemsBindingVolatile=P.isVolatileBinding(e),this.isTemplateBindingVolatile=P.isVolatileBinding(t)}createBehavior(e){return new qe(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function Ye(e,t,r=Ge){return new Ke(e,"function"==typeof t?t:()=>t,Object.assign(Object.assign({},Ge),r))}
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function Je(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}const Qe=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(r){Reflect.defineMetadata(e,t,r)}},Reflect.defineMetadata=function(e,t,r){let n=Qe.get(r);void 0===n&&Qe.set(r,n=new Map),n.set(e,t)},Reflect.getOwnMetadata=function(e,t){const r=Qe.get(t);if(void 0!==r)return r.get(e)});class Ze{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,St(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:r,key:n}=this;return this.container=this.key=void 0,r.registerResolver(n,new ut(n,e,t))}}function Xe(e){const t=e.slice(),r=Object.keys(e),n=r.length;let o;for(let s=0;s<n;++s)o=r[s],Pt(o)||(t[o]=e[o]);return t}const et=Object.freeze({none(e){throw Error(`${e.toString()} not registered, did you forget to add @singleton()?`)},singleton:e=>new ut(e,1,e),transient:e=>new ut(e,2,e)}),tt=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:et.singleton})}),rt=new Map;function nt(e){return t=>Reflect.getOwnMetadata(e,t)}let ot=null;const st=Object.freeze({createContainer:e=>new _t(null,Object.assign({},tt.default,e)),findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:st.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(yt,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||st.getOrCreateDOMContainer()},getOrCreateDOMContainer:(e,t)=>e?e.$$container$$||new _t(e,Object.assign({},tt.default,t,{parentLocator:st.findParentContainer})):ot||(ot=new _t(null,Object.assign({},tt.default,t,{parentLocator:()=>null}))),getDesignParamtypes:nt("design:paramtypes"),getAnnotationParamtypes:nt("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=rt.get(e);if(void 0===t){const r=e.inject;if(void 0===r){const r=st.getDesignParamtypes(e),n=st.getAnnotationParamtypes(e);if(void 0===r)if(void 0===n){const r=Object.getPrototypeOf(e);t="function"==typeof r&&r!==Function.prototype?Xe(st.getDependencies(r)):[]}else t=Xe(n);else if(void 0===n)t=Xe(r);else{t=Xe(r);let e,o=n.length;for(let r=0;r<o;++r)e=n[r],void 0!==e&&(t[r]=e);const s=Object.keys(n);let i;o=s.length;for(let e=0;e<o;++e)i=s[e],Pt(i)||(t[i]=n[i])}}else t=Xe(r);rt.set(e,t)}return t},defineProperty(e,t,r,n=!1){const o=`$di_${t}`;Reflect.defineProperty(e,t,{get:function(){let e=this[o];if(void 0===e){const s=this instanceof HTMLElement?st.findResponsibleContainer(this):st.getOrCreateDOMContainer();if(e=s.get(r),this[o]=e,n&&this instanceof Ae){const n=this.$fastController,s=()=>{st.findResponsibleContainer(this).get(r)!==this[o]&&(this[o]=e,n.notify(t))};n.subscribe({handleChange:s},"isConnected")}}return e}})},createInterface(e,t){const r="function"==typeof e?e:t,n="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||Ct,o="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),s=function(e,t,r){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${s.friendlyName}'`);if(t)st.defineProperty(e,t,s,o);else{st.getOrCreateAnnotationParamTypes(e)[r]=s}};return s.$isInterface=!0,s.friendlyName=null==n?"(anonymous)":n,null!=r&&(s.register=function(e,t){return r(new Ze(e,null!=t?t:s))}),s.toString=function(){return`InterfaceSymbol<${s.friendlyName}>`},s},inject:(...e)=>function(t,r,n){if("number"==typeof n){const r=st.getOrCreateAnnotationParamTypes(t),o=e[0];void 0!==o&&(r[n]=o)}else if(r)st.defineProperty(t,r,e[0]);else{const r=n?st.getOrCreateAnnotationParamTypes(n.value):st.getOrCreateAnnotationParamTypes(t);let o;for(let t=0;t<e.length;++t)o=e[t],void 0!==o&&(r[t]=o)}},transient:e=>(e.register=function(t){return Et.transient(e,e).register(t)},e.registerInRequestor=!1,e),singleton:(e,t=at)=>(e.register=function(t){return Et.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e)}),it=st.createInterface("Container");st.inject;const at={scoped:!1},ct=(lt=(e,t,r)=>r.has(e,!0)?r.get(e):void 0,function(e){const t=function(e,r,n){st.inject(t)(e,r,n)};return t.$isResolver=!0,t.resolve=function(t,r){return lt(e,t,r)},t});var lt;class ut{constructor(e,t,r){this.key=e,this.strategy=t,this.state=r,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state;case 2:{const r=e.getFactory(this.state);if(null===r)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return r.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,r,n;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(n=null===(r=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===r?void 0:r.call(t,e))&&void 0!==n?n:null;default:return null}}}function ht(e){return this.get(e)}function dt(e,t){return t(e)}class ft{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let r;return r=void 0===t?new this.Type(...this.dependencies.map(ht,e)):new this.Type(...this.dependencies.map(ht,e),...t),null==this.transformers?r:this.transformers.reduce(dt,r)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const pt={$isResolver:!0,resolve:(e,t)=>t};function mt(e){return"function"==typeof e.register}function vt(e){return function(e){return mt(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}const gt=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),yt="__DI_LOCATE_PARENT__",bt=new Map;class _t{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(it,pt),e instanceof Node&&e.addEventListener(yt,(e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())}))}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,r,n,o,s;const i=this.context;for(let a=0,c=e.length;a<c;++a)if(t=e[a],At(t))if(mt(t))t.register(this,i);else if(void 0!==t.prototype)Et.singleton(t,t).register(this);else for(r=Object.keys(t),o=0,s=r.length;o<s;++o)n=t[r[o]],At(n)&&(mt(n)?n.register(this,i):this.register(n));return--this.registerDepth,this}registerResolver(e,t){$t(e);const r=this.resolvers,n=r.get(e);return null==n?r.set(e,t):n instanceof ut&&4===n.strategy?n.state.push(t):r.set(e,new ut(e,4,[n,t])),t}registerTransformer(e,t){const r=this.getResolver(e);if(null==r)return!1;if(r.getFactory){const e=r.getFactory(this);return null!=e&&(e.registerTransformer(t),!0)}return!1}getResolver(e,t=!0){if($t(e),void 0!==e.resolve)return e;let r,n=this;for(;null!=n;){if(r=n.resolvers.get(e),null!=r)return r;if(null==n.parent){const r=vt(e)?this:n;return t?this.jitRegister(e,r):null}n=n.parent}return null}has(e,t=!1){return!!this.resolvers.has(e)||!(!t||null==this.parent)&&this.parent.has(e,!0)}get(e){if($t(e),e.$isResolver)return e.resolve(this,this);let t,r=this;for(;null!=r;){if(t=r.resolvers.get(e),null!=t)return t.resolve(r,this);if(null==r.parent){const n=vt(e)?this:r;return t=this.jitRegister(e,n),t.resolve(r,this)}r=r.parent}throw new Error(`Unable to resolve key: ${e}`)}getAll(e,t=!1){$t(e);const r=this;let n,o=r;if(t){let t=b;for(;null!=o;)n=o.resolvers.get(e),null!=n&&(t=t.concat(Ot(n,o,r))),o=o.parent;return t}for(;null!=o;){if(n=o.resolvers.get(e),null!=n)return Ot(n,o,r);if(o=o.parent,null==o)return b}return b}getFactory(e){let t=bt.get(e);if(void 0===t){if(Tt(e))throw new Error(`${e.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);bt.set(e,t=new ft(e,st.getDependencies(e)))}return t}registerFactory(e,t){bt.set(e,t)}createChild(e){return new _t(null,Object.assign({},this.config,e,{parentLocator:()=>this}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(gt.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(mt(e)){const r=e.register(t);if(!(r instanceof Object)||null==r.resolve){const r=t.resolvers.get(e);if(null!=r)return r;throw new Error("A valid resolver was not returned from the static register method")}return r}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const r=this.config.defaultResolver(e,t);return t.resolvers.set(e,r),r}}}const wt=new WeakMap;function St(e){return function(t,r,n){if(wt.has(n))return wt.get(n);const o=e(t,r,n);return wt.set(n,o),o}}const Et=Object.freeze({instance:(e,t)=>new ut(e,0,t),singleton:(e,t)=>new ut(e,1,t),transient:(e,t)=>new ut(e,2,t),callback:(e,t)=>new ut(e,3,t),cachedCallback:(e,t)=>new ut(e,3,St(t)),aliasTo:(e,t)=>new ut(t,5,e)});function $t(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function Ot(e,t,r){if(e instanceof ut&&4===e.strategy){const n=e.state;let o=n.length;const s=new Array(o);for(;o--;)s[o]=n[o].resolve(t,r);return s}return[e.resolve(t,r)]}const Ct="(anonymous)";function At(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Tt=function(){const e=new WeakMap;let t=!1,r="",n=0;return function(o){return t=e.get(o),void 0===t&&(r=o.toString(),n=r.length,t=n>=29&&n<=100&&125===r.charCodeAt(n-1)&&r.charCodeAt(n-2)<=32&&93===r.charCodeAt(n-3)&&101===r.charCodeAt(n-4)&&100===r.charCodeAt(n-5)&&111===r.charCodeAt(n-6)&&99===r.charCodeAt(n-7)&&32===r.charCodeAt(n-8)&&101===r.charCodeAt(n-9)&&118===r.charCodeAt(n-10)&&105===r.charCodeAt(n-11)&&116===r.charCodeAt(n-12)&&97===r.charCodeAt(n-13)&&110===r.charCodeAt(n-14)&&88===r.charCodeAt(n-15),e.set(o,t)),t}}(),xt={};function Pt(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=xt[e];if(void 0!==t)return t;const r=e.length;if(0===r)return xt[e]=!1;let n=0;for(let t=0;t<r;++t)if(n=e.charCodeAt(t),0===t&&48===n&&r>1||n<48||n>57)return xt[e]=!1;return xt[e]=!0}default:return!1}}function jt(e){return`${e.toLowerCase()}:presentation`}const Nt=new Map,Rt=Object.freeze({define(e,t,r){const n=jt(e);void 0===Nt.get(n)?Nt.set(n,t):Nt.set(n,!1),r.register(Et.instance(n,t))},forTag(e,t){const r=jt(e),n=Nt.get(r);if(!1===n){return st.findResponsibleContainer(t).get(r)}return n||null}});class kt{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?ce.create(t):t instanceof ce?t:ce.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class It extends Ae{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Rt.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new Dt(this===It?class extends It{}:this,e,t)}}function Mt(e,t,r){return"function"==typeof e?e(t,r):e}Je([j],It.prototype,"template",void 0),Je([j],It.prototype,"styles",void 0);class Dt{constructor(e,t,r){this.type=e,this.elementDefinition=t,this.overrideDefinition=r,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const r=this.definition,n=this.overrideDefinition,o=`${r.prefix||t.elementPrefix}-${r.baseName}`;t.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new kt(Mt(r.template,e,r),Mt(r.styles,e,r));e.definePresentation(t);let o=Mt(r.shadowOptions,e,r);e.shadowRootMode&&(o?n.shadowOptions||(o.mode=e.shadowRootMode):null!==o&&(o={mode:e.shadowRootMode})),e.defineElement({elementOptions:Mt(r.elementOptions,e,r),shadowOptions:o,attributes:Mt(r.attributes,e,r)})}})}}var Ft,Vt;function Lt(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}!function(e){e.ltr="ltr",e.rtl="rtl"}(Ft||(Ft={})),function(e){e.Canvas="Canvas",e.CanvasText="CanvasText",e.LinkText="LinkText",e.VisitedText="VisitedText",e.ActiveText="ActiveText",e.ButtonFace="ButtonFace",e.ButtonText="ButtonText",e.Field="Field",e.FieldText="FieldText",e.Highlight="Highlight",e.HighlightText="HighlightText",e.GrayText="GrayText"}(Vt||(Vt={}));const Ut=document.createElement("div");class zt{setProperty(e,t){A.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){A.queueUpdate((()=>this.target.removeProperty(e)))}}class Bt extends zt{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class Gt extends zt{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class Ht{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),P.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),A.queueUpdate((()=>{null!==this.target&&this.target.setProperty(e,t)}))}removeProperty(e){this.store.delete(e),A.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(e)}))}handleChange(e,t){const{sheet:r}=this.style;if(r){const e=r.insertRule(":host{}",r.cssRules.length);this.target=r.cssRules[e].style}else this.target=null}}Je([j],Ht.prototype,"target",void 0);class Wt{constructor(e){this.target=e.style}setProperty(e,t){A.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){A.queueUpdate((()=>this.target.removeProperty(e)))}}class qt{setProperty(e,t){qt.properties[e]=t;for(const r of qt.roots.values())Jt.getOrCreate(qt.normalizeRoot(r)).setProperty(e,t)}removeProperty(e){delete qt.properties[e];for(const t of qt.roots.values())Jt.getOrCreate(qt.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=qt;if(!t.has(e)){t.add(e);const r=Jt.getOrCreate(this.normalizeRoot(e));for(const e in qt.properties)r.setProperty(e,qt.properties[e])}}static unregisterRoot(e){const{roots:t}=qt;if(t.has(e)){t.delete(e);const r=Jt.getOrCreate(qt.normalizeRoot(e));for(const e in qt.properties)r.removeProperty(e)}}static normalizeRoot(e){return e===Ut?document:e}}qt.roots=new Set,qt.properties={};const Kt=new WeakMap,Yt=A.supportsAdoptedStyleSheets?class extends zt{constructor(e){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(ce.create([t]))}}:Ht,Jt=Object.freeze({getOrCreate(e){if(Kt.has(e))return Kt.get(e);let t;return e===Ut?t=new qt:e instanceof Document?t=A.supportsAdoptedStyleSheets?new Bt:new Gt:t=e instanceof Ae?new Yt(e):new Wt(e),Kt.set(e,t),t}});class Qt extends xe{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=Qt.uniqueId(),Qt.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new Qt({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return Qt.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){const t=rr.getOrCreate(e).get(this);if(void 0!==t)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof Qt&&(t=this.alias(t)),rr.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),rr.existsFor(e)&&rr.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(Ut,e),this}subscribe(e,t){const r=this.getOrCreateSubscriberSet(t);t&&!rr.existsFor(t)&&rr.getOrCreate(t),r.has(e)||r.add(e)}unsubscribe(e,t){const r=this.subscribers.get(t||this);r&&r.has(e)&&r.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach((e=>e.handleChange(t))),this.subscribers.has(e)&&this.subscribers.get(e).forEach((e=>e.handleChange(t)))}alias(e){return t=>e.getValueFor(t)}}Qt.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),Qt.tokensById=new Map;class Zt{constructor(e,t,r){this.source=e,this.token=t,this.node=r,this.dependencies=new Set,this.observer=P.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,I))}}class Xt{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),P.getNotifier(this).notify(e.id))}get(e){return P.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e)}all(){return this.values.entries()}}const er=new WeakMap,tr=new WeakMap;class rr{constructor(e){this.target=e,this.store=new Xt,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>{const r=Qt.getTokenById(t);if(r&&(r.notify(this.target),Qt.isCSSDesignToken(r))){const t=this.parent,n=this.isReflecting(r);if(t){const o=t.get(r),s=e.get(r);o===s||n?o===s&&n&&this.stopReflectToCSS(r):this.reflectToCSS(r)}else n||this.reflectToCSS(r)}}},er.set(e,this),P.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof Ae?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return er.get(e)||new rr(e)}static existsFor(e){return er.has(e)}static findParent(e){if(Ut!==e.target){let t=Lt(e.target);for(;null!==t;){if(er.has(t))return er.get(t);t=Lt(t)}return rr.getOrCreate(Ut)}return null}static findClosestAssignedNode(e,t){let r=t;do{if(r.has(e))return r;r=r.parent?r.parent:r.target!==Ut?rr.getOrCreate(Ut):null}while(null!==r);return null}get parent(){return tr.get(this)||null}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const r=this.getRaw(e);return void 0!==r?(this.hydrate(e,r),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=rr.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){Qt.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),Qt.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=rr.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){if(this.parent){tr.get(this).removeChild(this)}}appendChild(e){e.parent&&tr.get(e).removeChild(e);const t=this.children.filter((t=>e.contains(t)));tr.set(e,this),this.children.push(e),t.forEach((t=>e.appendChild(t))),P.getNotifier(this.store).subscribe(e);for(const[t,r]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):r)}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),P.getNotifier(this.store).unsubscribe(e),e.parent===this&&tr.delete(e)}contains(e){return function(e,t){let r=t;for(;null!==r;){if(r===e)return!0;r=Lt(r)}return!1}(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),rr.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),rr.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const r=Qt.getTokenById(t);r&&this.hydrate(r,this.getRaw(r))}hydrate(e,t){if(!this.has(e)){const r=this.bindingObservers.get(e);Qt.isDerivedDesignTokenValue(t)?r?r.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(r&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const r=new Zt(t,e,this);return this.bindingObservers.set(e,r),r}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}rr.cssCustomPropertyReflector=new class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){const{token:t,target:r}=e;this.add(t,r)}add(e,t){Jt.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(rr.getOrCreate(t).get(e)))}remove(e,t){Jt.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},Je([j],rr.prototype,"children",void 0);const nr=Object.freeze({create:function(e){return Qt.from(e)},notifyConnection:e=>!(!e.isConnected||!rr.existsFor(e))&&(rr.getOrCreate(e).bind(),!0),notifyDisconnection:e=>!(e.isConnected||!rr.existsFor(e))&&(rr.getOrCreate(e).unbind(),!0),registerRoot(e=Ut){qt.registerRoot(e)},unregisterRoot(e=Ut){qt.unregisterRoot(e)}});class or{constructor(e){this.listenerCache=new WeakMap,this.query=e}bind(e){const{query:t}=this,r=this.constructListener(e);r.bind(t)(),t.addListener(r),this.listenerCache.set(e,r)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeListener(t),this.listenerCache.delete(e))}}class sr extends or{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new sr(e,t)}constructListener(e){let t=!1;const r=this.styles;return function(){const{matches:n}=this;n&&!t?(e.$fastController.addStyles(r),t=n):!n&&t&&(e.$fastController.removeStyles(r),t=n)}}unbind(e){super.unbind(e),e.$fastController.removeStyles(this.styles)}}const ir=sr.with(window.matchMedia("(forced-colors)"));sr.with(window.matchMedia("(prefers-color-scheme: dark)")),sr.with(window.matchMedia("(prefers-color-scheme: light)"));const ar=":host([hidden]){display:none}";const cr={};cr[cr.Fatal=0]="Fatal",cr[cr.Error=0]="Error",cr[cr.Warn=1]="Warn",cr[cr.Log=2]="Log",cr[cr.Info=3]="Info",cr[cr.Success=3]="Success",cr[cr.Debug=4]="Debug",cr[cr.Trace=5]="Trace",cr[cr.Silent=-1/0]="Silent",cr[cr.Verbose=1/0]="Verbose";var lr={silent:{level:-1},fatal:{level:cr.Fatal},error:{level:cr.Error},warn:{level:cr.Warn},log:{level:cr.Log},info:{level:cr.Info},success:{level:cr.Success},debug:{level:cr.Debug},trace:{level:cr.Trace},verbose:{level:cr.Trace},ready:{level:cr.Info},start:{level:cr.Info}};function ur(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let hr=!1;const dr=[];class fr{constructor(e={}){this._reporters=e.reporters||[],this._types=e.types||lr,this.level=void 0!==e.level?e.level:3,this._defaults=e.defaults||{},this._async=void 0!==e.async?e.async:void 0,this._stdout=e.stdout,this._stderr=e.stderr,this._mockFn=e.mockFn,this._throttle=e.throttle||1e3,this._throttleMin=e.throttleMin||5;for(const e in this._types){const t={type:e,...this._types[e],...this._defaults};this[e]=this._wrapLogFn(t),this[e].raw=this._wrapLogFn(t,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}get stdout(){return this._stdout||console._stdout}get stderr(){return this._stderr||console._stderr}create(e){return new fr(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},e))}withDefaults(e){return this.create({defaults:Object.assign({},this._defaults,e)})}withTag(e){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+e:e})}addReporter(e){return this._reporters.push(e),this}removeReporter(e){if(e){const t=this._reporters.indexOf(e);if(t>=0)return this._reporters.splice(t,1)}else this._reporters.splice(0);return this}setReporters(e){return this._reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this._types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this._types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){hr=!0}resumeLogs(){hr=!1;const e=dr.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){if(this._mockFn=e||this._mockFn,"function"==typeof this._mockFn)for(const e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...r)=>{if(!hr)return this._logFn(e,r,t);dr.push([this,e,r,t])}}_logFn(e,t,r){if(e.level>this.level)return!!this._async&&Promise.resolve(!1);const n=Object.assign({date:new Date,args:[]},e);!r&&1===t.length&&ur(t[0])?Object.assign(n,t[0]):n.args=Array.from(t),n.message&&(n.args.unshift(n.message),delete n.message),n.additional&&(Array.isArray(n.additional)||(n.additional=n.additional.split("\n")),n.args.push("\n"+n.additional.join("\n")),delete n.additional),n.type="string"==typeof n.type?n.type.toLowerCase():"",n.tag="string"==typeof n.tag?n.tag.toLowerCase():"";const o=(e=!1)=>{const t=this._lastLogCount-this._throttleMin;if(this._lastLog&&t>0){const e=[...this._lastLog.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog,args:e}),this._lastLogCount=1}if(e){if(this._lastLog=n,this._async)return this._logAsync(n);this._log(n)}};clearTimeout(this._throttleTimeout);const s=this._lastLogTime?n.date-this._lastLogTime:0;if(this._lastLogTime=n.date,s<this._throttle)try{const e=JSON.stringify([n.type,n.tag,n.args]),t=this._lastLogSerialized===e;if(this._lastLogSerialized=e,t&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(o,this._throttle))}catch(e){}o(!0)}_log(e){for(const t of this._reporters)t.log(e,{async:!1,stdout:this.stdout,stderr:this.stderr})}_logAsync(e){return Promise.all(this._reporters.map((t=>t.log(e,{async:!0,stdout:this.stdout,stderr:this.stderr}))))}}fr.prototype.add=fr.prototype.addReporter,fr.prototype.remove=fr.prototype.removeReporter,fr.prototype.clear=fr.prototype.removeReporter,fr.prototype.withScope=fr.prototype.withTag,fr.prototype.mock=fr.prototype.mockTypes,fr.prototype.pause=fr.prototype.pauseLogs,fr.prototype.resume=fr.prototype.resumeLogs;class pr{constructor(e){this.options=Object.assign({},e),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}log(e){const t=e.level<1?console.__error||console.error:1===e.level&&console.warn?console.__warn||console.warn:console.__log||console.log,r="log"!==e.type?e.type:"",n=e.tag?e.tag:"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[n,r].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(s,o,...e.args)}}var mr="undefined"!=typeof window&&window.consola||function(){const e=new fr({reporters:[new pr]});return e.Consola=fr,e.LogLevel=cr,e.BrowserReporter=pr,e}();(function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=a(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,s=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){i=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(i)throw o}}}}var u={};u[u.Fatal=0]="Fatal",u[u.Error=0]="Error",u[u.Warn=1]="Warn",u[u.Log=2]="Log",u[u.Info=3]="Info",u[u.Success=3]="Success",u[u.Debug=4]="Debug",u[u.Trace=5]="Trace",u[u.Silent=-1/0]="Silent",u[u.Verbose=1/0]="Verbose";var h={silent:{level:-1},fatal:{level:u.Fatal},error:{level:u.Error},warn:{level:u.Warn},log:{level:u.Log},info:{level:u.Info},success:{level:u.Success},debug:{level:u.Debug},trace:{level:u.Trace},verbose:{level:u.Trace},ready:{level:u.Info},start:{level:u.Info}};function d(e){return t=e,!("[object Object]"!==Object.prototype.toString.call(t)||!e.message&&!e.args||e.stack);var t}var f=!1,p=[],m=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var n in e(this,t),this._reporters=r.reporters||[],this._types=r.types||h,this.level=void 0!==r.level?r.level:3,this._defaults=r.defaults||{},this._async=void 0!==r.async?r.async:void 0,this._stdout=r.stdout,this._stderr=r.stderr,this._mockFn=r.mockFn,this._throttle=r.throttle||1e3,this._throttleMin=r.throttleMin||5,this._types){var o=s(s({type:n},this._types[n]),this._defaults);this[n]=this._wrapLogFn(o),this[n].raw=this._wrapLogFn(o,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return r(t,[{key:"create",value:function(e){return new t(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},e))}},{key:"withDefaults",value:function(e){return this.create({defaults:Object.assign({},this._defaults,e)})}},{key:"withTag",value:function(e){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+e:e})}},{key:"addReporter",value:function(e){return this._reporters.push(e),this}},{key:"removeReporter",value:function(e){if(e){var t=this._reporters.indexOf(e);if(t>=0)return this._reporters.splice(t,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(e){return this._reporters=Array.isArray(e)?e:[e],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var e in this._types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}},{key:"restoreConsole",value:function(){for(var e in this._types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(e,t){var r=this;e&&(e.__write||(e.__write=e.write),e.write=function(e){r[t].raw(String(e).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}},{key:"pauseLogs",value:function(){f=!0}},{key:"resumeLogs",value:function(){f=!1;var e,t=l(p.splice(0));try{for(t.s();!(e=t.n()).done;){var r=e.value;r[0]._logFn(r[1],r[2])}}catch(e){t.e(e)}finally{t.f()}}},{key:"mockTypes",value:function(e){if(this._mockFn=e||this._mockFn,"function"==typeof this._mockFn)for(var t in this._types)this[t]=this._mockFn(t,this._types[t])||this[t],this[t].raw=this[t]}},{key:"_wrapLogFn",value:function(e,t){var r=this;return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];if(!f)return r._logFn(e,o,t);p.push([r,e,o,t])}}},{key:"_logFn",value:function(e,t,r){var n=this;if(e.level>this.level)return!!this._async&&Promise.resolve(!1);var o=Object.assign({date:new Date,args:[]},e);!r&&1===t.length&&d(t[0])?Object.assign(o,t[0]):o.args=Array.from(t),o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"",o.tag="string"==typeof o.tag?o.tag.toLowerCase():"";var a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=n._lastLogCount-n._throttleMin;if(n._lastLog&&t>0){var r=i(n._lastLog.args);t>1&&r.push("(repeated ".concat(t," times)")),n._log(s(s({},n._lastLog),{},{args:r})),n._lastLogCount=1}if(e){if(n._lastLog=o,n._async)return n._logAsync(o);n._log(o)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?o.date-this._lastLogTime:0;if(this._lastLogTime=o.date,c<this._throttle)try{var l=JSON.stringify([o.type,o.tag,o.args]),u=this._lastLogSerialized===l;if(this._lastLogSerialized=l,u&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(a,this._throttle))}catch(e){}a(!0)}},{key:"_log",value:function(e){var t,r=l(this._reporters);try{for(r.s();!(t=r.n()).done;)t.value.log(e,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(e){r.e(e)}finally{r.f()}}},{key:"_logAsync",value:function(e){var t=this;return Promise.all(this._reporters.map((function(r){return r.log(e,{async:!0,stdout:t.stdout,stderr:t.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),t}();m.prototype.add=m.prototype.addReporter,m.prototype.remove=m.prototype.removeReporter,m.prototype.clear=m.prototype.removeReporter,m.prototype.withScope=m.prototype.withTag,m.prototype.mock=m.prototype.mockTypes,m.prototype.pause=m.prototype.pauseLogs,m.prototype.resume=m.prototype.resumeLogs;var v,g=function(){function t(r){e(this,t),this.options=Object.assign({},r),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return r(t,[{key:"log",value:function(e){var t=e.level<1?console.__error||console.error:1===e.level&&console.warn?console.__warn||console.warn:console.__log||console.log,r="log"!==e.type?e.type:"",n=e.tag?e.tag:"",o=this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor,s="\n background: ".concat(o,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),a="%c".concat([n,r].filter(Boolean).join(":"));"string"==typeof e.args[0]?t.apply(void 0,["".concat(a,"%c ").concat(e.args[0]),s,""].concat(i(e.args.slice(1)))):t.apply(void 0,[a,s].concat(i(e.args)))}}]),t}();"undefined"!=typeof window&&window.consola||((v=new m({reporters:[new g]})).Consola=m,v.LogLevel=u,v.BrowserReporter=g)})();const vr={level:4};function gr(e,t=vr){return mr.create(t).withTag(e)}const yr=gr("foundation-utils");class br{constructor(){this.serialize=e=>JSON.stringify(e)}deserialize(e){return e&&e.ok?e.text().then((e=>JSON.parse(e))):(e&&e.data&&(e=e.data),JSON.parse(e))}}const _r=st.createInterface((e=>e.singleton(br)));function wr(e,t,r){return isNaN(e)||e<=t?t:e>=r?r:e}function Sr(e,t,r){return isNaN(e)||e<=t?0:e>=r?1:e/(r-t)}function Er(e,t,r){return isNaN(e)?t:t+e*(r-t)}function $r(e){return e*(Math.PI/180)}function Or(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:t+e*(r-t)}function Cr(e,t,r){if(e<=0)return t%360;if(e>=1)return r%360;const n=(t-r+360)%360;return n<=(r-t+360)%360?(t-n*e+360)%360:(t+n*e+360)%360}function Ar(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}class Tr{constructor(e,t,r){this.h=e,this.s=t,this.l=r}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.l)?null:new Tr(e.h,e.s,e.l)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.l===e.l}roundToPrecision(e){return new Tr(Ar(this.h,e),Ar(this.s,e),Ar(this.l,e))}toObject(){return{h:this.h,s:this.s,l:this.l}}}class xr{constructor(e,t,r){this.h=e,this.s=t,this.v=r}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.v)?null:new xr(e.h,e.s,e.v)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.v===e.v}roundToPrecision(e){return new xr(Ar(this.h,e),Ar(this.s,e),Ar(this.v,e))}toObject(){return{h:this.h,s:this.s,v:this.v}}}class Pr{constructor(e,t,r){this.l=e,this.a=t,this.b=r}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.a)||isNaN(e.b)?null:new Pr(e.l,e.a,e.b)}equalValue(e){return this.l===e.l&&this.a===e.a&&this.b===e.b}roundToPrecision(e){return new Pr(Ar(this.l,e),Ar(this.a,e),Ar(this.b,e))}toObject(){return{l:this.l,a:this.a,b:this.b}}}Pr.epsilon=216/24389,Pr.kappa=24389/27;class jr{constructor(e,t,r){this.l=e,this.c=t,this.h=r}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.c)||isNaN(e.h)?null:new jr(e.l,e.c,e.h)}equalValue(e){return this.l===e.l&&this.c===e.c&&this.h===e.h}roundToPrecision(e){return new jr(Ar(this.l,e),Ar(this.c,e),Ar(this.h,e))}toObject(){return{l:this.l,c:this.c,h:this.h}}}class Nr{constructor(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a="number"!=typeof n||isNaN(n)?1:n}static fromObject(e){return!e||isNaN(e.r)||isNaN(e.g)||isNaN(e.b)?null:new Nr(e.r,e.g,e.b,e.a)}equalValue(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}toStringHexRGB(){return"#"+[this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringHexRGBA(){return this.toStringHexRGB()+this.formatHexValue(this.a)}toStringHexARGB(){return"#"+[this.a,this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringWebRGB(){return`rgb(${Math.round(Er(this.r,0,255))},${Math.round(Er(this.g,0,255))},${Math.round(Er(this.b,0,255))})`}toStringWebRGBA(){return`rgba(${Math.round(Er(this.r,0,255))},${Math.round(Er(this.g,0,255))},${Math.round(Er(this.b,0,255))},${wr(this.a,0,1)})`}roundToPrecision(e){return new Nr(Ar(this.r,e),Ar(this.g,e),Ar(this.b,e),Ar(this.a,e))}clamp(){return new Nr(wr(this.r,0,1),wr(this.g,0,1),wr(this.b,0,1),wr(this.a,0,1))}toObject(){return{r:this.r,g:this.g,b:this.b,a:this.a}}formatHexValue(e){return function(e){const t=Math.round(wr(e,0,255)).toString(16);return 1===t.length?"0"+t:t}(Er(e,0,255))}}class Rr{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromObject(e){return!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.z)?null:new Rr(e.x,e.y,e.z)}equalValue(e){return this.x===e.x&&this.y===e.y&&this.z===e.z}roundToPrecision(e){return new Rr(Ar(this.x,e),Ar(this.y,e),Ar(this.z,e))}toObject(){return{x:this.x,y:this.y,z:this.z}}}function kr(e){return.2126*e.r+.7152*e.g+.0722*e.b}function Ir(e){function t(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}return kr(new Nr(t(e.r),t(e.g),t(e.b),1))}Rr.whitePoint=new Rr(.95047,1,1.08883);const Mr=(e,t)=>(e+.05)/(t+.05);function Dr(e,t){const r=Ir(e),n=Ir(t);return r>n?Mr(r,n):Mr(n,r)}function Fr(e){const t=Math.max(e.r,e.g,e.b),r=Math.min(e.r,e.g,e.b),n=t-r;let o=0;0!==n&&(o=t===e.r?(e.g-e.b)/n%6*60:t===e.g?60*((e.b-e.r)/n+2):60*((e.r-e.g)/n+4)),o<0&&(o+=360);const s=(t+r)/2;let i=0;return 0!==n&&(i=n/(1-Math.abs(2*s-1))),new Tr(o,i,s)}function Vr(e,t=1){const r=(1-Math.abs(2*e.l-1))*e.s,n=r*(1-Math.abs(e.h/60%2-1)),o=e.l-r/2;let s=0,i=0,a=0;return e.h<60?(s=r,i=n,a=0):e.h<120?(s=n,i=r,a=0):e.h<180?(s=0,i=r,a=n):e.h<240?(s=0,i=n,a=r):e.h<300?(s=n,i=0,a=r):e.h<360&&(s=r,i=0,a=n),new Nr(s+o,i+o,a+o,t)}function Lr(e){const t=Math.max(e.r,e.g,e.b),r=t-Math.min(e.r,e.g,e.b);let n=0;0!==r&&(n=t===e.r?(e.g-e.b)/r%6*60:t===e.g?60*((e.b-e.r)/r+2):60*((e.r-e.g)/r+4)),n<0&&(n+=360);let o=0;return 0!==t&&(o=r/t),new xr(n,o,t)}function Ur(e){let t=0;(Math.abs(e.b)>.001||Math.abs(e.a)>.001)&&(t=function(e){return e*(180/Math.PI)}(Math.atan2(e.b,e.a))),t<0&&(t+=360);const r=Math.sqrt(e.a*e.a+e.b*e.b);return new jr(e.l,r,t)}function zr(e){function t(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}const r=t(e.r),n=t(e.g),o=t(e.b);return new Rr(.4124564*r+.3575761*n+.1804375*o,.2126729*r+.7151522*n+.072175*o,.0193339*r+.119192*n+.9503041*o)}function Br(e,t=1){function r(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}const n=r(3.2404542*e.x-1.5371385*e.y-.4985314*e.z),o=r(-.969266*e.x+1.8760108*e.y+.041556*e.z),s=r(.0556434*e.x-.2040259*e.y+1.0572252*e.z);return new Nr(n,o,s,t)}function Gr(e){return function(e){function t(e){return e>Pr.epsilon?Math.pow(e,1/3):(Pr.kappa*e+16)/116}const r=t(e.x/Rr.whitePoint.x),n=t(e.y/Rr.whitePoint.y),o=t(e.z/Rr.whitePoint.z);return new Pr(116*n-16,500*(r-n),200*(n-o))}(zr(e))}function Hr(e,t=1){return Br(function(e){const t=(e.l+16)/116,r=t+e.a/500,n=t-e.b/200,o=Math.pow(r,3),s=Math.pow(t,3),i=Math.pow(n,3);let a=0;a=o>Pr.epsilon?o:(116*r-16)/Pr.kappa;let c=0;c=e.l>Pr.epsilon*Pr.kappa?s:e.l/Pr.kappa;let l=0;return l=i>Pr.epsilon?i:(116*n-16)/Pr.kappa,a=Rr.whitePoint.x*a,c=Rr.whitePoint.y*c,l=Rr.whitePoint.z*l,new Rr(a,c,l)}(e),t)}function Wr(e){return Ur(Gr(e))}function qr(e,t=1){return Hr(function(e){let t=0,r=0;return 0!==e.h&&(t=Math.cos($r(e.h))*e.c,r=Math.sin($r(e.h))*e.c),new Pr(e.l,t,r)}(e),t)}function Kr(e,t,r=18){const n=Wr(e);let o=n.c+t*r;return o<0&&(o=0),qr(new jr(n.l,o,n.h))}function Yr(e,t){return e*t}function Jr(e,t){return new Nr(Yr(e.r,t.r),Yr(e.g,t.g),Yr(e.b,t.b),1)}function Qr(e,t){return wr(e<.5?2*t*e:1-2*(1-t)*(1-e),0,1)}function Zr(e,t){return new Nr(Qr(e.r,t.r),Qr(e.g,t.g),Qr(e.b,t.b),1)}var Xr,en;function tn(e,t,r,n){if(isNaN(e)||e<=0)return r;if(e>=1)return n;switch(t){case en.HSL:return Vr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Tr(Cr(e,t.h,r.h),Or(e,t.s,r.s),Or(e,t.l,r.l))}(e,Fr(r),Fr(n)));case en.HSV:return function(e,t=1){const r=e.s*e.v,n=r*(1-Math.abs(e.h/60%2-1)),o=e.v-r;let s=0,i=0,a=0;return e.h<60?(s=r,i=n,a=0):e.h<120?(s=n,i=r,a=0):e.h<180?(s=0,i=r,a=n):e.h<240?(s=0,i=n,a=r):e.h<300?(s=n,i=0,a=r):e.h<360&&(s=r,i=0,a=n),new Nr(s+o,i+o,a+o,t)}(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new xr(Cr(e,t.h,r.h),Or(e,t.s,r.s),Or(e,t.v,r.v))}(e,Lr(r),Lr(n)));case en.XYZ:return Br(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Rr(Or(e,t.x,r.x),Or(e,t.y,r.y),Or(e,t.z,r.z))}(e,zr(r),zr(n)));case en.LAB:return Hr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Pr(Or(e,t.l,r.l),Or(e,t.a,r.a),Or(e,t.b,r.b))}(e,Gr(r),Gr(n)));case en.LCH:return qr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new jr(Or(e,t.l,r.l),Or(e,t.c,r.c),Cr(e,t.h,r.h))}(e,Wr(r),Wr(n)));default:return function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Nr(Or(e,t.r,r.r),Or(e,t.g,r.g),Or(e,t.b,r.b),Or(e,t.a,r.a))}(e,r,n)}}!function(e){e[e.Burn=0]="Burn",e[e.Color=1]="Color",e[e.Darken=2]="Darken",e[e.Dodge=3]="Dodge",e[e.Lighten=4]="Lighten",e[e.Multiply=5]="Multiply",e[e.Overlay=6]="Overlay",e[e.Screen=7]="Screen"}(Xr||(Xr={})),function(e){e[e.RGB=0]="RGB",e[e.HSL=1]="HSL",e[e.HSV=2]="HSV",e[e.XYZ=3]="XYZ",e[e.LAB=4]="LAB",e[e.LCH=5]="LCH"}(en||(en={}));class rn{constructor(e){if(null==e||0===e.length)throw new Error("The stops argument must be non-empty");this.stops=this.sortColorScaleStops(e)}static createBalancedColorScale(e){if(null==e||0===e.length)throw new Error("The colors argument must be non-empty");const t=new Array(e.length);for(let r=0;r<e.length;r++)0===r?t[r]={color:e[r],position:0}:r===e.length-1?t[r]={color:e[r],position:1}:t[r]={color:e[r],position:r*(1/(e.length-1))};return new rn(t)}getColor(e,t=en.RGB){if(1===this.stops.length)return this.stops[0].color;if(e<=0)return this.stops[0].color;if(e>=1)return this.stops[this.stops.length-1].color;let r=0;for(let t=0;t<this.stops.length;t++)this.stops[t].position<=e&&(r=t);let n=r+1;n>=this.stops.length&&(n=this.stops.length-1);return tn((e-this.stops[r].position)*(1/(this.stops[n].position-this.stops[r].position)),t,this.stops[r].color,this.stops[n].color)}trim(e,t,r=en.RGB){if(e<0||t>1||t<e)throw new Error("Invalid bounds");if(e===t)return new rn([{color:this.getColor(e,r),position:0}]);const n=[];for(let r=0;r<this.stops.length;r++)this.stops[r].position>=e&&this.stops[r].position<=t&&n.push(this.stops[r]);if(0===n.length)return new rn([{color:this.getColor(e),position:e},{color:this.getColor(t),position:t}]);n[0].position!==e&&n.unshift({color:this.getColor(e),position:e}),n[n.length-1].position!==t&&n.push({color:this.getColor(t),position:t});const o=t-e,s=new Array(n.length);for(let t=0;t<n.length;t++)s[t]={color:n[t].color,position:(n[t].position-e)/o};return new rn(s)}findNextColor(e,t,r=!1,n=en.RGB,o=.005,s=32){isNaN(e)||e<=0?e=0:e>=1&&(e=1);const i=this.getColor(e,n),a=r?0:1;if(Dr(i,this.getColor(a,n))<=t)return a;let c=r?0:e,l=r?e:0,u=a,h=0;for(;h<=s;){u=Math.abs(l-c)/2+c;const e=Dr(i,this.getColor(u,n));if(Math.abs(e-t)<=o)return u;e>t?r?c=u:l=u:r?l=u:c=u,h++}return u}clone(){const e=new Array(this.stops.length);for(let t=0;t<e.length;t++)e[t]={color:this.stops[t].color,position:this.stops[t].position};return new rn(e)}sortColorScaleStops(e){return e.sort(((e,t)=>{const r=e.position,n=t.position;return r<n?-1:r>n?1:0}))}}const nn=/^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;function on(e){const t=nn.exec(e);if(null===t)return null;let r=t[1];if(3===r.length){const e=r.charAt(0),t=r.charAt(1),n=r.charAt(2);r=e.concat(e,t,t,n,n)}const n=parseInt(r,16);return isNaN(n)?null:new Nr(Sr((16711680&n)>>>16,0,255),Sr((65280&n)>>>8,0,255),Sr(255&n,0,255),1)}class sn{constructor(e){this.config=Object.assign({},sn.defaultPaletteConfig,e),this.palette=[],this.updatePaletteColors()}updatePaletteGenerationValues(e){let t=!1;for(const r in e)this.config[r]&&(this.config[r].equalValue?this.config[r].equalValue(e[r])||(this.config[r]=e[r],t=!0):e[r]!==this.config[r]&&(this.config[r]=e[r],t=!0));return t&&this.updatePaletteColors(),t}updatePaletteColors(){const e=this.generatePaletteColorScale();for(let t=0;t<this.config.steps;t++)this.palette[t]=e.getColor(t/(this.config.steps-1),this.config.interpolationMode)}generatePaletteColorScale(){const e=Fr(this.config.baseColor),t=new rn([{position:0,color:this.config.scaleColorLight},{position:.5,color:this.config.baseColor},{position:1,color:this.config.scaleColorDark}]).trim(this.config.clipLight,1-this.config.clipDark);let r=t.getColor(0),n=t.getColor(1);if(e.s>=this.config.saturationAdjustmentCutoff&&(r=Kr(r,this.config.saturationLight),n=Kr(n,this.config.saturationDark)),0!==this.config.multiplyLight){const e=Jr(this.config.baseColor,r);r=tn(this.config.multiplyLight,this.config.interpolationMode,r,e)}if(0!==this.config.multiplyDark){const e=Jr(this.config.baseColor,n);n=tn(this.config.multiplyDark,this.config.interpolationMode,n,e)}if(0!==this.config.overlayLight){const e=Zr(this.config.baseColor,r);r=tn(this.config.overlayLight,this.config.interpolationMode,r,e)}if(0!==this.config.overlayDark){const e=Zr(this.config.baseColor,n);n=tn(this.config.overlayDark,this.config.interpolationMode,n,e)}return this.config.baseScalePosition?this.config.baseScalePosition<=0?new rn([{position:0,color:this.config.baseColor},{position:1,color:n.clamp()}]):this.config.baseScalePosition>=1?new rn([{position:0,color:r.clamp()},{position:1,color:this.config.baseColor}]):new rn([{position:0,color:r.clamp()},{position:this.config.baseScalePosition,color:this.config.baseColor},{position:1,color:n.clamp()}]):new rn([{position:0,color:r.clamp()},{position:.5,color:this.config.baseColor},{position:1,color:n.clamp()}])}}sn.defaultPaletteConfig={baseColor:on("#808080"),steps:11,interpolationMode:en.RGB,scaleColorLight:new Nr(1,1,1,1),scaleColorDark:new Nr(0,0,0,1),clipLight:.185,clipDark:.16,saturationAdjustmentCutoff:.05,saturationLight:.35,saturationDark:1.25,overlayLight:0,overlayDark:.25,multiplyLight:0,multiplyDark:0,baseScalePosition:.5},sn.greyscalePaletteConfig={baseColor:on("#808080"),steps:11,interpolationMode:en.RGB,scaleColorLight:new Nr(1,1,1,1),scaleColorDark:new Nr(0,0,0,1),clipLight:0,clipDark:0,saturationAdjustmentCutoff:0,saturationLight:0,saturationDark:0,overlayLight:0,overlayDark:0,multiplyLight:0,multiplyDark:0,baseScalePosition:.5},sn.defaultPaletteConfig.scaleColorLight,sn.defaultPaletteConfig.scaleColorDark;class an{constructor(e){this.palette=[],this.config=Object.assign({},an.defaultPaletteConfig,e),this.regenPalettes()}regenPalettes(){let e=this.config.steps;(isNaN(e)||e<3)&&(e=3);const t=.14,r=new Nr(t,t,t,1),n=new sn(Object.assign(Object.assign({},sn.greyscalePaletteConfig),{baseColor:r,baseScalePosition:86/94,steps:e})).palette,o=(kr(this.config.baseColor)+Fr(this.config.baseColor).l)/2,s=this.matchRelativeLuminanceIndex(o,n)/(e-1),i=this.matchRelativeLuminanceIndex(t,n)/(e-1),a=Fr(this.config.baseColor),c=Vr(Tr.fromObject({h:a.h,s:a.s,l:t})),l=Vr(Tr.fromObject({h:a.h,s:a.s,l:.06})),u=new Array(5);u[0]={position:0,color:new Nr(1,1,1,1)},u[1]={position:s,color:this.config.baseColor},u[2]={position:i,color:c},u[3]={position:.99,color:l},u[4]={position:1,color:new Nr(0,0,0,1)};const h=new rn(u);this.palette=new Array(e);for(let t=0;t<e;t++){const r=h.getColor(t/(e-1),en.RGB);this.palette[t]=r}}matchRelativeLuminanceIndex(e,t){let r=Number.MAX_VALUE,n=0,o=0;const s=t.length;for(;o<s;o++){const s=Math.abs(kr(t[o])-e);s<r&&(r=s,n=o)}return n}}function cn(e,t){const r=e.relativeLuminance>t.relativeLuminance?e:t,n=e.relativeLuminance>t.relativeLuminance?t:e;return(r.relativeLuminance+.05)/(n.relativeLuminance+.05)}an.defaultPaletteConfig={baseColor:on("#808080"),steps:94};const ln=Object.freeze({create:(e,t,r)=>new un(e,t,r),from:e=>new un(e.r,e.g,e.b)});class un extends Nr{constructor(e,t,r){super(e,t,r,1),this.toColorString=this.toStringHexRGB,this.contrast=cn.bind(null,this),this.createCSS=this.toColorString,this.relativeLuminance=Ir(this)}static fromObject(e){return new un(e.r,e.g,e.b)}}function hn(e,t,r=0,n=e.length-1){if(n===r)return e[r];const o=Math.floor((n-r)/2)+r;return t(e[o])?hn(e,t,r,o):hn(e,t,o+1,n)}const dn=(-.1+Math.sqrt(.21))/2;function fn(e){return function(e){return e.relativeLuminance<=dn}(e)?-1:1}const pn=Object.freeze({create:function(e,t,r){return"number"==typeof e?pn.from(ln.create(e,t,r)):pn.from(e)},from:function(e){return function(e){const t={r:0,g:0,b:0,toColorString:()=>"",contrast:()=>0,relativeLuminance:0};for(const r in t)if(typeof t[r]!=typeof e[r])return!1;return!0}(e)?mn.from(e):mn.from(ln.create(e.r,e.g,e.b))}});class mn{constructor(e,t){this.closestIndexCache=new Map,this.source=e,this.swatches=t,this.reversedSwatches=Object.freeze([...this.swatches].reverse()),this.lastIndex=this.swatches.length-1}colorContrast(e,t,r,n){void 0===r&&(r=this.closestIndexOf(e));let o=this.swatches;const s=this.lastIndex;let i=r;void 0===n&&(n=fn(e));return-1===n&&(o=this.reversedSwatches,i=s-i),hn(o,(r=>cn(e,r)>=t),i,s)}get(e){return this.swatches[e]||this.swatches[wr(e,0,this.lastIndex)]}closestIndexOf(e){if(this.closestIndexCache.has(e.relativeLuminance))return this.closestIndexCache.get(e.relativeLuminance);let t=this.swatches.indexOf(e);if(-1!==t)return this.closestIndexCache.set(e.relativeLuminance,t),t;const r=this.swatches.reduce(((t,r)=>Math.abs(r.relativeLuminance-e.relativeLuminance)<Math.abs(t.relativeLuminance-e.relativeLuminance)?r:t));return t=this.swatches.indexOf(r),this.closestIndexCache.set(e.relativeLuminance,t),t}static from(e){return new mn(e,Object.freeze(new an({baseColor:Nr.fromObject(e)}).palette.map((e=>{const t=on(e.toStringHexRGB());return ln.create(t.r,t.g,t.b)}))))}}const vn=ln.create(1,1,1),gn=ln.create(0,0,0),yn=ln.from(on("#808080")),bn=ln.from(on("#DA1A5F"));function _n(e){return ln.create(e,e,e)}function wn(e,t,r,n,o,s){return Math.max(e.closestIndexOf(_n(t))+r,n,o,s)}const{create:Sn}=nr;function En(e){return nr.create({name:e,cssCustomPropertyName:null})}Sn("body-font").withDefault('aktiv-grotesk, "Segoe UI", Arial, Helvetica, sans-serif');const $n=Sn("base-height-multiplier").withDefault(10);Sn("base-horizontal-spacing-multiplier").withDefault(3);const On=Sn("base-layer-luminance").withDefault(.23),Cn=Sn("control-corner-radius").withDefault(4),An=Sn("density").withDefault(0),Tn=Sn("design-unit").withDefault(4);Sn("direction").withDefault(Ft.ltr),Sn("disabled-opacity").withDefault(.3);const xn=Sn("stroke-width").withDefault(1);Sn("focus-stroke-width").withDefault(2),Sn("type-ramp-base-font-size").withDefault("14px"),Sn("type-ramp-base-line-height").withDefault("20px"),Sn("type-ramp-minus-1-font-size").withDefault("12px"),Sn("type-ramp-minus-1-line-height").withDefault("16px"),Sn("type-ramp-minus-2-font-size").withDefault("10px"),Sn("type-ramp-minus-2-line-height").withDefault("16px"),Sn("type-ramp-plus-1-font-size").withDefault("16px"),Sn("type-ramp-plus-1-line-height").withDefault("24px"),Sn("type-ramp-plus-2-font-size").withDefault("20px"),Sn("type-ramp-plus-2-line-height").withDefault("28px"),Sn("type-ramp-plus-3-font-size").withDefault("28px"),Sn("type-ramp-plus-3-line-height").withDefault("36px"),Sn("type-ramp-plus-4-font-size").withDefault("34px"),Sn("type-ramp-plus-4-line-height").withDefault("44px"),Sn("type-ramp-plus-5-font-size").withDefault("46px"),Sn("type-ramp-plus-5-line-height").withDefault("56px"),Sn("type-ramp-plus-6-font-size").withDefault("60px"),Sn("type-ramp-plus-6-line-height").withDefault("72px"),En("accent-fill-rest-delta").withDefault(0);const Pn=En("accent-fill-hover-delta").withDefault(4),jn=En("accent-fill-active-delta").withDefault(-5),Nn=En("accent-fill-focus-delta").withDefault(0),Rn=En("accent-foreground-rest-delta").withDefault(0),kn=En("accent-foreground-hover-delta").withDefault(6),In=En("accent-foreground-active-delta").withDefault(-4),Mn=En("accent-foreground-focus-delta").withDefault(0),Dn=En("neutral-fill-rest-delta").withDefault(7),Fn=En("neutral-fill-hover-delta").withDefault(10),Vn=En("neutral-fill-active-delta").withDefault(5),Ln=En("neutral-fill-focus-delta").withDefault(0),Un=En("neutral-fill-input-rest-delta").withDefault(0),zn=En("neutral-fill-input-hover-delta").withDefault(0),Bn=En("neutral-fill-input-active-delta").withDefault(0),Gn=En("neutral-fill-input-focus-delta").withDefault(0),Hn=En("neutral-fill-stealth-rest-delta").withDefault(0),Wn=En("neutral-fill-stealth-hover-delta").withDefault(5),qn=En("neutral-fill-stealth-active-delta").withDefault(3),Kn=En("neutral-fill-stealth-focus-delta").withDefault(0),Yn=En("neutral-fill-strong-rest-delta").withDefault(0),Jn=En("neutral-fill-strong-hover-delta").withDefault(8),Qn=En("neutral-fill-strong-active-delta").withDefault(-5),Zn=En("neutral-fill-strong-focus-delta").withDefault(0),Xn=En("neutral-fill-layer-rest-delta").withDefault(3),eo=En("neutral-stroke-rest-delta").withDefault(25),to=En("neutral-stroke-hover-delta").withDefault(40),ro=En("neutral-stroke-active-delta").withDefault(16),no=En("neutral-stroke-focus-delta").withDefault(25),oo=En("neutral-stroke-divider-rest-delta").withDefault(8),so=Sn("neutral-color").withDefault(yn),io=En("neutral-palette").withDefault((e=>pn.from(so.getValueFor(e)))),ao=Sn("accent-color").withDefault(bn),co=En("accent-palette").withDefault((e=>pn.from(ao.getValueFor(e)))),lo=En("neutral-layer-card-container-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=On.getValueFor(e),n=Xn.getValueFor(e),t.get(t.closestIndexOf(_n(r))+n);var t,r,n}});Sn("neutral-layer-card-container").withDefault((e=>lo.getValueFor(e).evaluate(e)));const uo=En("neutral-layer-floating-recipe").withDefault({evaluate:e=>function(e,t,r){const n=e.closestIndexOf(_n(t))-r;return e.get(n-r)}(io.getValueFor(e),On.getValueFor(e),Xn.getValueFor(e))});Sn("neutral-layer-floating").withDefault((e=>uo.getValueFor(e).evaluate(e)));const ho=En("neutral-layer-1-recipe").withDefault({evaluate:e=>function(e,t){return e.get(e.closestIndexOf(_n(t)))}(io.getValueFor(e),On.getValueFor(e))}),fo=Sn("neutral-layer-1").withDefault((e=>ho.getValueFor(e).evaluate(e))),po=En("neutral-layer-2-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=On.getValueFor(e),n=Xn.getValueFor(e),o=Dn.getValueFor(e),s=Fn.getValueFor(e),i=Vn.getValueFor(e),t.get(wn(t,r,n,o,s,i));var t,r,n,o,s,i}});Sn("neutral-layer-2").withDefault((e=>po.getValueFor(e).evaluate(e)));const mo=En("neutral-layer-3-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=On.getValueFor(e),n=Xn.getValueFor(e),o=Dn.getValueFor(e),s=Fn.getValueFor(e),i=Vn.getValueFor(e),t.get(wn(t,r,n,o,s,i)+n);var t,r,n,o,s,i}});Sn("neutral-layer-3").withDefault((e=>mo.getValueFor(e).evaluate(e)));const vo=En("neutral-layer-4-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=On.getValueFor(e),n=Xn.getValueFor(e),o=Dn.getValueFor(e),s=Fn.getValueFor(e),i=Vn.getValueFor(e),t.get(wn(t,r,n,o,s,i)+2*n);var t,r,n,o,s,i}});Sn("neutral-layer-4").withDefault((e=>vo.getValueFor(e).evaluate(e)));const go=Sn("fill-color").withDefault((e=>fo.getValueFor(e)));var yo;!function(e){e[e.normal=4.5]="normal",e[e.large=7]="large"}(yo||(yo={}));const bo=Sn({name:"accent-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s,i,a,c){const l=e.source,u=t.closestIndexOf(r)>=Math.max(i,a,c)?-1:1,h=e.closestIndexOf(l),d=h+-1*u*n,f=d+u*o,p=d+u*s;return{rest:e.get(d),hover:e.get(h),active:e.get(f),focus:e.get(p)}}(co.getValueFor(e),io.getValueFor(e),t||go.getValueFor(e),Pn.getValueFor(e),jn.getValueFor(e),Nn.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e),Vn.getValueFor(e))}),_o=Sn("accent-fill-rest").withDefault((e=>bo.getValueFor(e).evaluate(e).rest)),wo=Sn("accent-fill-hover").withDefault((e=>bo.getValueFor(e).evaluate(e).hover)),So=Sn("accent-fill-active").withDefault((e=>bo.getValueFor(e).evaluate(e).active)),Eo=Sn("accent-fill-focus").withDefault((e=>bo.getValueFor(e).evaluate(e).focus)),$o=e=>(t,r)=>function(e,t){return e.contrast(vn)>=t?vn:gn}(r||_o.getValueFor(t),e),Oo=En("foreground-on-accent-recipe").withDefault({evaluate:(e,t)=>$o(yo.normal)(e,t)});Sn("foreground-on-accent-rest").withDefault((e=>Oo.getValueFor(e).evaluate(e,_o.getValueFor(e)))),Sn("foreground-on-accent-hover").withDefault((e=>Oo.getValueFor(e).evaluate(e,wo.getValueFor(e)))),Sn("foreground-on-accent-active").withDefault((e=>Oo.getValueFor(e).evaluate(e,So.getValueFor(e)))),Sn("foreground-on-accent-focus").withDefault((e=>Oo.getValueFor(e).evaluate(e,Eo.getValueFor(e))));const Co=En("foreground-on-accent-large-recipe").withDefault({evaluate:(e,t)=>$o(yo.large)(e,t)});Sn("foreground-on-accent-rest-large").withDefault((e=>Co.getValueFor(e).evaluate(e,_o.getValueFor(e)))),Sn("foreground-on-accent-hover-large").withDefault((e=>Co.getValueFor(e).evaluate(e,wo.getValueFor(e)))),Sn("foreground-on-accent-active-large").withDefault((e=>Co.getValueFor(e).evaluate(e,So.getValueFor(e)))),Sn("foreground-on-accent-focus-large").withDefault((e=>Co.getValueFor(e).evaluate(e,Eo.getValueFor(e))));const Ao=e=>(t,r)=>function(e,t,r,n,o,s,i){const a=e.source,c=e.closestIndexOf(a),l=fn(t),u=c+(1===l?Math.min(n,o):Math.max(l*n,l*o)),h=e.colorContrast(t,r,u,l),d=e.closestIndexOf(h),f=d+l*Math.abs(n-o);let p,m;return(1===l?n<o:l*n>l*o)?(p=d,m=f):(p=f,m=d),{rest:e.get(p),hover:e.get(m),active:e.get(p+l*s),focus:e.get(p+l*i)}}(co.getValueFor(t),r||go.getValueFor(t),e,Rn.getValueFor(t),kn.getValueFor(t),In.getValueFor(t),Mn.getValueFor(t)),To=Sn({name:"accent-foreground-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>Ao(yo.normal)(e,t)});Sn("accent-foreground-rest").withDefault((e=>To.getValueFor(e).evaluate(e).rest)),Sn("accent-foreground-hover").withDefault((e=>To.getValueFor(e).evaluate(e).hover)),Sn("accent-foreground-active").withDefault((e=>To.getValueFor(e).evaluate(e).active)),Sn("accent-foreground-focus").withDefault((e=>To.getValueFor(e).evaluate(e).focus));const xo=Sn({name:"neutral-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=e.closestIndexOf(t),a=i>=Math.max(r,n,o,s)?-1:1;return{rest:e.get(i+a*r),hover:e.get(i+a*n),active:e.get(i+a*o),focus:e.get(i+a*s)}}(io.getValueFor(e),t||go.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e),Vn.getValueFor(e),Ln.getValueFor(e))});Sn("neutral-fill-rest").withDefault((e=>xo.getValueFor(e).evaluate(e).rest)),Sn("neutral-fill-hover").withDefault((e=>xo.getValueFor(e).evaluate(e).hover)),Sn("neutral-fill-active").withDefault((e=>xo.getValueFor(e).evaluate(e).active)),Sn("neutral-fill-focus").withDefault((e=>xo.getValueFor(e).evaluate(e).focus));const Po=Sn({name:"neutral-fill-input-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=fn(t),a=e.closestIndexOf(t);return{rest:e.get(a-i*r),hover:e.get(a-i*n),active:e.get(a-i*o),focus:e.get(a-i*s)}}(io.getValueFor(e),t||go.getValueFor(e),Un.getValueFor(e),zn.getValueFor(e),Bn.getValueFor(e),Gn.getValueFor(e))});Sn("neutral-fill-input-rest").withDefault((e=>Po.getValueFor(e).evaluate(e).rest)),Sn("neutral-fill-input-hover").withDefault((e=>Po.getValueFor(e).evaluate(e).hover)),Sn("neutral-fill-input-active").withDefault((e=>Po.getValueFor(e).evaluate(e).active)),Sn("neutral-fill-input-focus").withDefault((e=>Po.getValueFor(e).evaluate(e).focus));const jo=Sn({name:"neutral-fill-stealth-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s,i,a,c,l){const u=Math.max(r,n,o,s,i,a,c,l),h=e.closestIndexOf(t),d=h>=u?-1:1;return{rest:e.get(h+d*r),hover:e.get(h+d*n),active:e.get(h+d*o),focus:e.get(h+d*s)}}(io.getValueFor(e),t||go.getValueFor(e),Hn.getValueFor(e),Wn.getValueFor(e),qn.getValueFor(e),Kn.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e),Vn.getValueFor(e),Ln.getValueFor(e))});Sn("neutral-fill-stealth-rest").withDefault((e=>jo.getValueFor(e).evaluate(e).rest)),Sn("neutral-fill-stealth-hover").withDefault((e=>jo.getValueFor(e).evaluate(e).hover)),Sn("neutral-fill-stealth-active").withDefault((e=>jo.getValueFor(e).evaluate(e).active)),Sn("neutral-fill-stealth-focus").withDefault((e=>jo.getValueFor(e).evaluate(e).focus));const No=Sn({name:"neutral-fill-strong-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=fn(t),a=e.closestIndexOf(e.colorContrast(t,4.5)),c=a+i*Math.abs(r-n);let l,u;return(1===i?r<n:i*r>i*n)?(l=a,u=c):(l=c,u=a),{rest:e.get(l),hover:e.get(u),active:e.get(l+i*o),focus:e.get(l+i*s)}}(io.getValueFor(e),t||go.getValueFor(e),Yn.getValueFor(e),Jn.getValueFor(e),Qn.getValueFor(e),Zn.getValueFor(e))});Sn("neutral-fill-strong-rest").withDefault((e=>No.getValueFor(e).evaluate(e).rest)),Sn("neutral-fill-strong-hover").withDefault((e=>No.getValueFor(e).evaluate(e).hover)),Sn("neutral-fill-strong-active").withDefault((e=>No.getValueFor(e).evaluate(e).active)),Sn("neutral-fill-strong-focus").withDefault((e=>No.getValueFor(e).evaluate(e).focus));const Ro=En("neutral-fill-layer-recipe").withDefault({evaluate:(e,t)=>function(e,t,r){const n=e.closestIndexOf(t);return e.get(n-(n<r?-1*r:r))}(io.getValueFor(e),t||go.getValueFor(e),Xn.getValueFor(e))});Sn("neutral-fill-layer-rest").withDefault((e=>Ro.getValueFor(e).evaluate(e)));const ko=En("focus-stroke-outer-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=go.getValueFor(e),t.colorContrast(r,3.5);var t,r}}),Io=Sn("focus-stroke-outer").withDefault((e=>ko.getValueFor(e).evaluate(e))),Mo=En("focus-stroke-inner-recipe").withDefault({evaluate:e=>{return t=co.getValueFor(e),r=go.getValueFor(e),n=Io.getValueFor(e),t.colorContrast(n,3.5,t.closestIndexOf(t.source),-1*fn(r));var t,r,n}});Sn("focus-stroke-inner").withDefault((e=>Mo.getValueFor(e).evaluate(e)));const Do=En("neutral-foreground-hint-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=go.getValueFor(e),t.colorContrast(r,4.5);var t,r}});Sn("neutral-foreground-hint").withDefault((e=>Do.getValueFor(e).evaluate(e)));const Fo=En("neutral-foreground-recipe").withDefault({evaluate:e=>{return t=io.getValueFor(e),r=go.getValueFor(e),t.colorContrast(r,14);var t,r}});Sn("neutral-foreground-rest").withDefault((e=>Fo.getValueFor(e).evaluate(e)));const Vo=Sn({name:"neutral-stroke-recipe",cssCustomPropertyName:null}).withDefault({evaluate:e=>function(e,t,r,n,o,s){const i=e.closestIndexOf(t),a=fn(t),c=i+a*r,l=c+a*(n-r),u=c+a*(o-r),h=c+a*(s-r);return{rest:e.get(c),hover:e.get(l),active:e.get(u),focus:e.get(h)}}(io.getValueFor(e),go.getValueFor(e),eo.getValueFor(e),to.getValueFor(e),ro.getValueFor(e),no.getValueFor(e))});Sn("neutral-stroke-rest").withDefault((e=>Vo.getValueFor(e).evaluate(e).rest)),Sn("neutral-stroke-hover").withDefault((e=>Vo.getValueFor(e).evaluate(e).hover)),Sn("neutral-stroke-active").withDefault((e=>Vo.getValueFor(e).evaluate(e).active)),Sn("neutral-stroke-focus").withDefault((e=>Vo.getValueFor(e).evaluate(e).focus));const Lo=En("neutral-stroke-divider-recipe").withDefault({evaluate:(e,t)=>function(e,t,r){return e.get(e.closestIndexOf(t)+fn(t)*r)}(io.getValueFor(e),t||go.getValueFor(e),oo.getValueFor(e))});var Uo;Sn("neutral-stroke-divider-rest").withDefault((e=>Lo.getValueFor(e).evaluate(e))),nr.create({name:"height-number",cssCustomPropertyName:null}).withDefault((e=>($n.getValueFor(e)+An.getValueFor(e))*Tn.getValueFor(e)));var zo=new Uint8Array(16);function Bo(){if(!Uo&&!(Uo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Uo(zo)}var Go=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ho=[],Wo=0;Wo<256;++Wo)Ho.push((Wo+256).toString(16).substr(1));function qo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ho[e[t+0]]+Ho[e[t+1]]+Ho[e[t+2]]+Ho[e[t+3]]+"-"+Ho[e[t+4]]+Ho[e[t+5]]+"-"+Ho[e[t+6]]+Ho[e[t+7]]+"-"+Ho[e[t+8]]+Ho[e[t+9]]+"-"+Ho[e[t+10]]+Ho[e[t+11]]+Ho[e[t+12]]+Ho[e[t+13]]+Ho[e[t+14]]+Ho[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Go.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}function Ko(e,t,r){var n=(e=e||{}).random||(e.rng||Bo)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return qo(n)}class Yo{constructor(){}createId(e=!1){const t=Ko();return e&&yr.debug(`UUID.createID ${t}`),t}createRemoteId(e=!1){return i(this,void 0,void 0,(function*(){const t=Ko();return e&&yr.debug(`UUID.createRemoteID ${t}`),t}))}}const Jo=st.createInterface((e=>e.singleton(Yo))),Qo=gr("foundation-comms"),Zo=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i");class Xo{constructor(){this.cachedMetadata=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}}o([j],Xo.prototype,"cachedMetadata",void 0);const es=st.createInterface((e=>e.singleton(Xo)));function ts(e){return"function"==typeof e}function rs(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ns=rs((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function os(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ss=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var i=c(s),a=i.next();!a.done;a=i.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}else s.remove(this);var h=this.initialTeardown;if(ts(h))try{h()}catch(e){o=e instanceof ns?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=c(d),p=f.next();!p.done;p=f.next()){var m=p.value;try{cs(m)}catch(e){o=null!=o?o:[],e instanceof ns?o=u(u([],l(o)),l(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}}if(o)throw new ns(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)cs(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&os(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&os(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),is=ss.EMPTY;function as(e){return e instanceof ss||e&&"closed"in e&&ts(e.remove)&&ts(e.add)&&ts(e.unsubscribe)}function cs(e){ts(e)?e():e.unsubscribe()}var ls={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},us={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=us.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,u([e,t],l(r))):setTimeout.apply(void 0,u([e,t],l(r)))},clearTimeout:function(e){var t=us.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function hs(e){us.setTimeout((function(){throw e}))}function ds(){}var fs=ps("C",void 0,void 0);function ps(e,t,r){return{kind:e,value:t,error:r}}var ms=null;function vs(e){if(ls.useDeprecatedSynchronousErrorHandling){var t=!ms;if(t&&(ms={errorThrown:!1,error:null}),e(),t){var r=ms,n=r.errorThrown,o=r.error;if(ms=null,n)throw o}}else e()}var gs=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,as(t)&&t.add(r)):r.destination=$s,r}return r(t,e),t.create=function(e,t,r){return new ws(e,t,r)},t.prototype.next=function(e){this.isStopped?Es(function(e){return ps("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Es(function(e){return ps("E",void 0,e)}(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Es(fs,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ss),ys=Function.prototype.bind;function bs(e,t){return ys.call(e,t)}var _s=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Ss(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ss(e)}else Ss(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ss(e)}},e}(),ws=function(e){function t(t,r,n){var o,s,i=e.call(this)||this;ts(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i&&ls.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return i.unsubscribe()},o={next:t.next&&bs(t.next,s),error:t.error&&bs(t.error,s),complete:t.complete&&bs(t.complete,s)}):o=t;return i.destination=new _s(o),i}return r(t,e),t}(gs);function Ss(e){hs(e)}function Es(e,t){var r=ls.onStoppedNotification;r&&us.setTimeout((function(){return r(e,t)}))}var $s={closed:!0,next:ds,error:function(e){throw e},complete:ds},Os="function"==typeof Symbol&&Symbol.observable||"@@observable";function Cs(e){return e}var As=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,s=(n=e)&&n instanceof gs||function(e){return e&&ts(e.next)&&ts(e.error)&&ts(e.complete)}(n)&&as(n)?e:new ws(e,t,r);return vs((function(){var e=o,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?o._subscribe(s):o._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Ts(t))((function(t,n){var o=new ws({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Os]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?Cs:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ts(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function Ts(e){var t;return null!==(t=null!=e?e:ls.Promise)&&void 0!==t?t:Promise}function xs(e){return function(t){if(function(e){return ts(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function Ps(e,t,r,n,o){return new js(e,t,r,n,o)}var js=function(e){function t(t,r,n,o,s,i){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=i,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return r(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(gs),Ns=rs((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Rs=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r(t,e),t.prototype.lift=function(e){var t=new ks(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ns},t.prototype.next=function(e){var t=this;vs((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=c(t.currentObservers),s=o.next();!s.done;s=o.next()){s.value.next(e)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;vs((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;vs((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,o=r.isStopped,s=r.observers;return n||o?is:(this.currentObservers=null,s.push(e),new ss((function(){t.currentObservers=null,os(s,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new As;return e.source=this,e},t.create=function(e,t){return new ks(e,t)},t}(As),ks=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return r(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:is},t}(Rs),Is=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Rs),Ms={now:function(){return(Ms.delegate||Date).now()},delegate:void 0},Ds=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Ms);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}return r(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,s=r._infiniteTimeWindow,i=r._timestampProvider,a=r._windowTime;n||(o.push(t),!s&&o.push(i.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,s=(o?1:2)*t;if(t<1/0&&s<n.length&&n.splice(0,n.length-s),!o){for(var i=r.now(),a=0,c=1;c<n.length&&n[c]<=i;c+=2)a=c;a&&n.splice(0,a+1)}},t}(Rs),Fs=function(e){function t(t,r){return e.call(this)||this}return r(t,e),t.prototype.schedule=function(e,t){return this},t}(ss),Vs={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Vs.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,u([e,t],l(r))):setInterval.apply(void 0,u([e,t],l(r)))},clearInterval:function(e){var t=Vs.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Ls=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return r(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Vs.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&Vs.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,os(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Fs),Us=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=Ms.now,e}(),zs=function(e){function t(t,r){void 0===r&&(r=Us.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return r(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(Us),Bs=new zs(Ls),Gs=Bs;function Hs(e){return e&&ts(e.schedule)}function Ws(e){return Hs((t=e)[t.length-1])?e.pop():void 0;var t}var qs=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ks(e){return ts(null==e?void 0:e.then)}function Ys(e){return ts(e[Os])}function Js(e){return Symbol.asyncIterator&&ts(null==e?void 0:e[Symbol.asyncIterator])}function Qs(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Zs="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Xs(e){return ts(null==e?void 0:e[Zs])}function ei(e){return d(this,arguments,(function(){var t,r,n;return a(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,h(t.read())];case 3:return r=o.sent(),n=r.value,r.done?[4,h(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,h(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function ti(e){return ts(null==e?void 0:e.getReader)}function ri(e){if(e instanceof As)return e;if(null!=e){if(Ys(e))return o=e,new As((function(e){var t=o[Os]();if(ts(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(qs(e))return n=e,new As((function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()}));if(Ks(e))return r=e,new As((function(e){r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,hs)}));if(Js(e))return ni(e);if(Xs(e))return t=e,new As((function(e){var r,n;try{for(var o=c(t),s=o.next();!s.done;s=o.next()){var i=s.value;if(e.next(i),e.closed)return}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.complete()}));if(ti(e))return ni(ei(e))}var t,r,n,o;throw Qs(e)}function ni(e){return new As((function(t){(function(e,t){var r,n,o,s;return i(this,void 0,void 0,(function(){var i,c;return a(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=f(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(i=n.value,t.next(i),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=a.sent(),o={error:c},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function oi(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var s=t.schedule((function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(s),!o)return s}function si(e,t){return void 0===t&&(t=0),xs((function(r,n){r.subscribe(Ps(n,(function(r){return oi(n,e,(function(){return n.next(r)}),t)}),(function(){return oi(n,e,(function(){return n.complete()}),t)}),(function(r){return oi(n,e,(function(){return n.error(r)}),t)})))}))}function ii(e,t){return void 0===t&&(t=0),xs((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}function ai(e,t){if(!e)throw new Error("Iterable cannot be null");return new As((function(r){oi(r,t,(function(){var n=e[Symbol.asyncIterator]();oi(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}function ci(e,t){if(null!=e){if(Ys(e))return function(e,t){return ri(e).pipe(ii(t),si(t))}(e,t);if(qs(e))return function(e,t){return new As((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}(e,t);if(Ks(e))return function(e,t){return ri(e).pipe(ii(t),si(t))}(e,t);if(Js(e))return ai(e,t);if(Xs(e))return function(e,t){return new As((function(r){var n;return oi(r,t,(function(){n=e[Zs](),oi(r,t,(function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)}),0,!0)})),function(){return ts(null==n?void 0:n.return)&&n.return()}}))}(e,t);if(ti(e))return function(e,t){return ai(ei(e),t)}(e,t)}throw Qs(e)}function li(e,t){return t?ci(e,t):ri(e)}function ui(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return li(e,Ws(e))}function hi(e,t){var r=ts(e)?e:function(){return e},n=function(e){return e.error(r())};return new As(t?function(e){return t.schedule(n,0,e)}:n)}function di(e,t,r){return void 0===r&&(r=1/0),ts(t)?di((function(r,n){return function(e,t){return xs((function(r,n){var o=0;r.subscribe(Ps(n,(function(r){n.next(e.call(t,r,o++))})))}))}((function(e,o){return t(r,e,n,o)}))(ri(e(r,n)))}),r):("number"==typeof t&&(r=t),xs((function(t,n){return function(e,t,r,n,o,s,i,a){var c=[],l=0,u=0,h=!1,d=function(){!h||c.length||l||t.complete()},f=function(e){return l<n?p(e):c.push(e)},p=function(e){s&&t.next(e),l++;var a=!1;ri(r(e,u++)).subscribe(Ps(t,(function(e){null==o||o(e),s?f(e):t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{l--;for(var e=function(){var e=c.shift();i?oi(t,i,(function(){return p(e)})):p(e)};c.length&&l<n;)e();d()}catch(e){t.error(e)}})))};return e.subscribe(Ps(t,f,(function(){h=!0,d()}))),function(){null==a||a()}}(t,n,e,r)})))}function fi(){return void 0===(e=1)&&(e=1/0),di(Cs,e);var e}function pi(e,t,r){void 0===e&&(e=0),void 0===r&&(r=Gs);var n=-1;return null!=t&&(Hs(t)?r=t:n=t),new As((function(t){var o,s=(o=e)instanceof Date&&!isNaN(o)?+e-r.now():e;s<0&&(s=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=n?this.schedule(void 0,n):t.complete())}),s)}))}function mi(e,t){return xs((function(r,n){var o=null,s=0,i=!1,a=function(){return i&&!o&&n.complete()};r.subscribe(Ps(n,(function(r){null==o||o.unsubscribe();var i=0,c=s++;ri(e(r,c)).subscribe(o=Ps(n,(function(e){return n.next(t?t(r,e,c,i++):e)}),(function(){o=null,a()})))}),(function(){i=!0,a()})))}))}function vi(e,t){return void 0===t&&(t=!1),xs((function(r,n){var o=0;r.subscribe(Ps(n,(function(r){var s=e(r,o++);(s||t)&&n.next(r),!s&&n.complete()})))}))}class gi{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e)))}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID)}captureReturnUrl(){const{pathname:e,search:t,hash:r}=location;if("/login"===e)return;const n=`${"/"!==e?e:""}`;this.returnUrl=`${n}${t}${r}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,r){"local"===r?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const yi=st.createInterface((e=>e.singleton(gi)));class bi{serialize(e){return JSON.stringify(e)}deserialize(e){return e?"string"==typeof e?JSON.parse(e):e.data?JSON.parse(e.data):e.text().then((e=>JSON.parse(e))):Promise.resolve({})}}const _i=st.createInterface((e=>e.singleton(bi)));let wi=class{constructor(e){this.serializer=e}get(e,t){return i(this,void 0,void 0,(function*(){const r=yield fetch(e,Object.assign(Object.assign({},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(r)}))}post(e,t){return i(this,void 0,void 0,(function*(){const r=yield fetch(e,Object.assign(Object.assign({},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(r)}))}};wi=o([s(0,_i)],wi);const Si=st.createInterface((e=>e.singleton(wi)));var Ei,$i,Oi,Ci;!function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(Ei||(Ei={})),function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}($i||($i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(Oi||(Oi={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(Ci||(Ci={}));let Ai=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case Ei.BASIC:t={USER_NAME:e.username,PASSWORD:e.password};break;case Ei.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken};break;case Ei.SSO:t={SSO_TOKEN:e.ssoToken};break;case Ei.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,r;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(r=e.sessionId)&&void 0!==r?r:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:Oi.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createMetaRequestMessage(e,t=Oi.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:Oi.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken")}}}createChangePasswordMessage(e,t,r){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:r}}}createForgotPasswordMessage(e,t,r=e){return{USER_NAME:r,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,r,n=e){return{USER_NAME:n,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Oi.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:r}}}createMoreRowsMessage(e){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.MORE_ROWS,DETAILS:{SOURCE_REF:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};Ai=o([s(0,yi),s(1,Jo)],Ai);const Ti=st.createInterface((e=>e.singleton(Ai))),xi=st.createInterface(),Pi=st.createInterface();let ji,Ni;try{ji=HTTP_CONFIG}catch(e){}try{Ni=FORCE_HTTP}catch(e){}const Ri={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},ji&&ji.length?JSON.parse(ji):{})};let ki=class e{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,r,n,o,s=Ri){this.http=e,this.messageBuilder=t,this.session=r,this.metaCache=n,this.serializer=o,this.config=s,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new Is(this._isConnected),this.ongoingTurbo={},this.streams=new Map}checkHost(){return i(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:$i.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===$i.HEARTBEAT_PONG))}catch(e){return Qo.error(e),!1}}))}send(t,r){return this.http.post(e.getUrl(this.host,t),{body:e.getBody(t),headers:e.getHeaders(t)})}httpMode(){return!0}setValidSession(e){Qo.warn("setValidSession() called while in http polling mode.")}connect(e){return i(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return i(this,void 0,void 0,(function*(){const r=this.messageBuilder.createDataLogonMessage(e,t);return Qo.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (snapshot) message created -> `,r),this.send(r).then((e=>(this.dataLogoff(r.SOURCE_REF).catch((e=>Qo.error(e))),e)))}))}stream(e,t,r,n){const o=this.messageBuilder.createDataLogonMessage(e,n);Qo.debug(`HTTP MODE - ${o.MESSAGE_TYPE} (stream) message created -> `,o);const s=o.SOURCE_REF;this.streams.set(s,{SOURCE_REF:s,POLLING_FREQUENCY:new Is(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const i=this.streams.get(s).POLLING_FREQUENCY,a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fi()(li(e,Ws(e)))}(li(this.send(o)),i.pipe(mi((e=>{return void 0===(t=e)&&(t=0),void 0===r&&(r=Bs),t<0&&(t=0),pi(t,t,r);var t,r}))).pipe(mi((()=>li(this.getMessage(o)))))).pipe(vi((()=>this.streams.has(s))),(c=()=>{Qo.debug(`Terminating stream for ${e} - ${s}`),this.dataLogoff(s)},xs((function(e,t){try{e.subscribe(t)}finally{t.add(c)}}))));var c;return this.streams.get(s).STREAM=a,a}getMessage(t){return i(this,void 0,void 0,(function*(){return this.http.get(e.getUrl(this.host,t),{headers:e.getHeaders(t)})}))}getMoreRows(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return Qo.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}dataLogoff(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(Qo.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e,t=!0){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e);return Qo.debug(`HTTP MODE - ${t.MESSAGE_TYPE} (metadata) message created -> `,t),this.send(t).then((e=>e.DETAILS))}))}getJSONSchema(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,Oi.JSON_SCHEMA_REQUEST);return Qo.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const r=this.messageBuilder.createRequestMessage(e,t);return Qo.debug(`HTTP MODE! - ${r.MESSAGE_TYPE} (request server) message created -> `,r),this.send(r)}commitEvent(e,t){return i(this,void 0,void 0,(function*(){const r=this.messageBuilder.createCommitMessage(e,t);return Qo.debug(`HTTP MODE! - ${r.MESSAGE_TYPE} (commit) message created -> `,r),this.send(r).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var r;if(!(null===(r=null==t?void 0:t.MESSAGE_TYPE)||void 0===r?void 0:r.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void Qo.debug(`${e} polling frequency is already accelerated.`);const n=this.config.polling.POLLING_MAP[e];if(!(null==n?void 0:n.TEMP_FREQUENCY)||!n.AMOUNT_OF_POLLS)return;const o=n.TEMP_FREQUENCY,s=o*n.AMOUNT_OF_POLLS,i=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of n.QUERIES)a[e]=o,i[e]||(i[e]=this.config.polling.POLLING_FREQUENCY);Qo.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${o}ms DURATION=${s}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{Qo.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:i}}),this.ongoingTurbo[e]=!1}),s)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const r=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=r,Qo.debug(`Setting polling frequency for ${t} = ${r}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(r)}))}}static getHeaders(e){const t={"Content-type":"application/json; charset=UTF-8","source-ref":e.SOURCE_REF};return e.SESSION_AUTH_TOKEN&&(t["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===Oi.EVENT_LOGOUT&&(t["SESSION-ID"]=e.SESSION_ID),t}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const r=t.MESSAGE_TYPE;let n=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return r===Oi.DATA_LOGON&&(n=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${n}`}};o([j],ki.prototype,"host",void 0),o([j],ki.prototype,"isWorking",void 0),o([j],ki.prototype,"_isConnected",void 0),o([N],ki.prototype,"isConnected",null),ki=o([s(0,Si),s(1,Ti),s(2,yi),s(3,es),s(4,_r),s(5,ct(Pi))],ki);const Ii=st.createInterface((e=>e.singleton(ki)));var Mi={url:"",deserializer:function(e){return JSON.parse(e.data)},serializer:function(e){return JSON.stringify(e)}},Di=function(e){function t(t,r){var o=e.call(this)||this;if(o._socket=null,t instanceof As)o.destination=r,o.source=t;else{var s=o._config=n({},Mi);if(o._output=new Rs,"string"==typeof t)s.url=t;else for(var i in t)t.hasOwnProperty(i)&&(s[i]=t[i]);if(!s.WebSocketCtor&&WebSocket)s.WebSocketCtor=WebSocket;else if(!s.WebSocketCtor)throw new Error("no WebSocket constructor can be found");o.destination=new Ds}return o}return r(t,e),t.prototype.lift=function(e){var r=new t(this._config,this.destination);return r.operator=e,r.source=this,r},t.prototype._resetState=function(){this._socket=null,this.source||(this.destination=new Ds),this._output=new Rs},t.prototype.multiplex=function(e,t,r){var n=this;return new As((function(o){try{n.next(e())}catch(e){o.error(e)}var s=n.subscribe({next:function(e){try{r(e)&&o.next(e)}catch(e){o.error(e)}},error:function(e){return o.error(e)},complete:function(){return o.complete()}});return function(){try{n.next(t())}catch(e){o.error(e)}s.unsubscribe()}}))},t.prototype._connectSocket=function(){var e=this,t=this._config,r=t.WebSocketCtor,n=t.protocol,o=t.url,s=t.binaryType,i=this._output,a=null;try{a=n?new r(o,n):new r(o),this._socket=a,s&&(this._socket.binaryType=s)}catch(e){return void i.error(e)}var c=new ss((function(){e._socket=null,a&&1===a.readyState&&a.close()}));a.onopen=function(t){if(!e._socket)return a.close(),void e._resetState();var r=e._config.openObserver;r&&r.next(t);var n=e.destination;e.destination=gs.create((function(t){if(1===a.readyState)try{var r=e._config.serializer;a.send(r(t))}catch(t){e.destination.error(t)}}),(function(t){var r=e._config.closingObserver;r&&r.next(void 0),t&&t.code?a.close(t.code,t.reason):i.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),e._resetState()}),(function(){var t=e._config.closingObserver;t&&t.next(void 0),a.close(),e._resetState()})),n&&n instanceof Ds&&c.add(n.subscribe(e.destination))},a.onerror=function(t){e._resetState(),i.error(t)},a.onclose=function(t){a===e._socket&&e._resetState();var r=e._config.closeObserver;r&&r.next(t),t.wasClean?i.complete():i.error(t)},a.onmessage=function(t){try{var r=e._config.deserializer;i.next(r(t))}catch(e){i.error(e)}}},t.prototype._subscribe=function(e){var t=this,r=this.source;return r?r.subscribe(e):(this._socket||this._connectSocket(),this._output.subscribe(e),e.add((function(){var e=t._socket;0===t._output.observers.length&&(!e||1!==e.readyState&&0!==e.readyState||e.close(),t._resetState())})),e)},t.prototype.unsubscribe=function(){var t=this._socket;!t||1!==t.readyState&&0!==t.readyState||t.close(),this._resetState(),e.prototype.unsubscribe.call(this)},t}(ks);const Fi=1e4,Vi=6e4;var Li;!function(e){e.Linear="linear",e.Exponential="exponential"}(Li||(Li={}));const Ui=(e,t)=>{const{reconnectInterval:r=Fi}=e,n=r>Vi?Vi:r,o=Math.round(Math.log2(Vi/n));return n*Math.pow(2,t%o)},zi=(e,t)=>{const{reconnectInterval:r=Fi}=e;return r>Vi?Vi:r};class Bi extends Rs{constructor(){super()}}class Gi{constructor(e,t,r,n){this._message=e,this._onMessage=t,this._onError=r,this._isSubscription=n}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let Hi=class{isConnectedChanged(e,t){this.isConnectedSubject.next(t)}constructor(e,t,r,n){this.messageBuilder=e,this.session=t,this.serializer=r,this.uuid=n,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.isConnectedSubject=new Is(!1),this.isConnected=!1,this.hasValidSession=!1,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.isReconnecting=!1,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e,t,r){return this.url=e,this.connectOptions=t,this.reconnectOptions=r,new Promise((e=>{var t,r,n,o;Qo.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`);(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(r=this.socketSubscription)||void 0===r||r.unsubscribe(),this.websocket=new Di({url:this.url,openObserver:{next:()=>{this.isConnected=!0,this.session.setSessionStorageItem("hostUrl",this.url),this.prepareHeartbeat(),Qo.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.disconnectedByServer=!t.wasClean,this.isConnected=!1,Qo.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:this.serializer.serialize,deserializer:this.serializer.deserialize});this.socketSubscription=this.websocket.subscribe(null!==(o=null===(n=this.connectOptions)||void 0===n?void 0:n.connectObserver)&&void 0!==o?o:{next:e=>i(this,void 0,void 0,(function*(){var t;const r=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,Qo.info,r);const{SOURCE_REF:n,MESSAGE_TYPE:o}=e,s=this.getMessageHandler(n,o);if(!s)return;let i=!1;switch(e.MESSAGE_TYPE){case Oi.EVENT_LOGIN_AUTH_ACK:{this.hasValidSession=!0;const r=e.DETAILS;r.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=r.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case $i.LOGOUT_ACK:return this.hasValidSession=!1,s.onReceivedMessage.call(this,e),void this.cleanMessages();case $i.LOGON_ACK:return;case $i.LOGOFF_ACK:if(e.LOGGED_OUT&&this.hasValidSession){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);t?t.MESSAGE_TYPE===Oi.EVENT_LOGIN_AUTH_ACK&&(this.session.setAuthResult(t),this.wsMessageHandlers.forEach((e=>{e.isSubscription&&(e.sentMessage.SESSION_AUTH_TOKEN=t.SESSION_AUTH_TOKEN,this.websocket.next(e.sentMessage))}))):this.hasValidSession=!1}break;case $i.QUERY_UPDATE:if(!s.isSubscription){const e=this.messageBuilder.createDataLogoffMessage(n);this.send(e)}break;case $i.MSG_NACK:i=!0}i?s.onReceivedError.call(this,{receivedMessage:e,sentMessage:s.sentMessage}):s.onReceivedMessage.call(this,e),this.wsMessages.next(e),s.isSubscription||this.removeMessageHandler(n)})),error:e=>{Qo.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.disconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():Qo.info("Connection is now closed")}})}))}prepareHeartbeat(){var e,t,r,n;this.heartbeatSubscription&&this.heartbeatSubscription.unsubscribe();const o=()=>i(this,void 0,void 0,(function*(){if(!this.isConnected)return;const e={MESSAGE_TYPE:$i.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId()},t=yield this.send(e);this.heartbeatIsEnabled=t.MESSAGE_TYPE===$i.HEARTBEAT_PONG&&t.SOURCE_REF===e.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(n=null===(r=this.connectOptions)||void 0===r?void 0:r.heartbeatInterval)&&void 0!==n?n:this.heartbeatInterval;this.heartbeatSubscription=pi(e,e).pipe(vi((()=>this.websocket&&this.isConnected)),function(e,t,r){var n=ts(e)||t||r?{next:e,error:t,complete:r}:e;return n?xs((function(e,t){var r;null===(r=n.subscribe)||void 0===r||r.call(n);var o=!0;e.subscribe(Ps(t,(function(e){var r;null===(r=n.next)||void 0===r||r.call(n,e),t.next(e)}),(function(){var e;o=!1,null===(e=n.complete)||void 0===e||e.call(n),t.complete()}),(function(e){var r;o=!1,null===(r=n.error)||void 0===r||r.call(n,e),t.error(e)}),(function(){var e,t;o&&(null===(e=n.unsubscribe)||void 0===e||e.call(n)),null===(t=n.finalize)||void 0===t||t.call(n)})))})):Cs}((()=>this.heartbeatLoggingIsEnabled&&Qo.debug(`Sending a heartbeat ping every ${e} ms`)))).subscribe((()=>o()))}}reconnect(){var e,t,r,n,o;const s=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||s)return;this.isReconnecting=!0;const i=(null===(r=this.reconnectOptions)||void 0===r?void 0:r.reconnectStrategy)===Li.Exponential?Ui:zi,a=this.isConnectedSubject.asObservable().pipe(mi((e=>e?ui(-1):((e,t)=>new As((r=>{let n,o=0;return function s(){r.next(o),clearTimeout(n),n=setTimeout(s,t(e,o)),o+=1}(),()=>{clearTimeout(n)}})))(this.reconnectOptions,i).pipe(di((e=>{var t,r,n;let o;return o=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(n=null===(r=this.reconnectOptions)||void 0===r?void 0:r.reconnectAttempts)&&void 0!==n?n:10,e<o?ui(e):hi((()=>new Error(`Max reconnect attempts ${o} reached.`)))}))))),vi((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(o=null===(n=this.reconnectOptions)||void 0===n?void 0:n.reconnectObserver)&&void 0!==o?o:{next:e=>{Qo.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;Qo.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.isReconnecting=!1},complete:()=>{Qo.info(this.isConnected?"Reconnected":"Disconnected"),this.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.isConnected=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new Bi,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return void Promise.reject(new Error("WebSocket connection is closed"));const r=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,Qo.info,r),new Promise(((r,n)=>{const o=e=>{r(e)},s=e=>{n(e)};t&&this.setMessageHandler(e,o,s),this.websocket.next(e)}))}sendForStream(e,t,r){if(!this.isConnected)return hi((()=>new Error("WebSocket connection is closed")));if(!this.hasValidSession)return hi((()=>new Error("WebSocket connection is open but there is no valid/active session, please check your auth flow")));const n=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,Qo.info,n),this.setMessageHandler(e,t,r,!0),this.websocket.next(e),li(this.wsMessages.pipe((o=t=>t.SOURCE_REF===e.SOURCE_REF,xs((function(e,t){var r=0;e.subscribe(Ps(t,(function(e){return o.call(s,e,r++)&&t.next(e)})))})))));var o,s}setMessageHandler(e,t,r,n=!1){const o=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,Qo.debug,o),this.wsMessageHandlers.set(e.SOURCE_REF,new Gi(e,t,r,n))}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const r=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,Qo.debug,r),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,r){switch(e){case $i.HEARTBEAT_PING:case $i.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(r);break;default:this.messageLoggingIsEnabled&&t(r)}}};o([j],Hi.prototype,"websocket",void 0),o([j],Hi.prototype,"wsMessages",void 0),o([j],Hi.prototype,"wsMessageHandlers",void 0),o([j],Hi.prototype,"isConnected",void 0),o([j],Hi.prototype,"disconnectedByServer",void 0),o([j],Hi.prototype,"hasValidSession",void 0),o([j],Hi.prototype,"heartbeatIsEnabled",void 0),o([j],Hi.prototype,"isReconnecting",void 0),Hi=o([s(0,Ti),s(1,yi),s(2,_i),s(3,Jo)],Hi);const Wi=st.createInterface((e=>e.singleton(Hi))),qi={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0}};let Ki=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}constructor(e,t,r,n=qi){this.socket=e,this.messageBuilder=t,this.metaCache=r,this.config=n,this.isWorking=!1}httpMode(){return!1}setValidSession(e){this.socket.hasValidSession=e}send(e,t){return this.socket.send(e,t)}connect(e){return i(this,void 0,void 0,(function*(){return this.socket.reset(),Zo.test(e)?this.socket.connect(e,this.config.connect,this.config.reconnect):(Qo.error(`Specified host (${e}) is not valid WebSocket url. Connection will not proceed.`),void Qo.warn("Make sure the host url starts with wss:// or ws://"))}))}disconnect(){this.socket.reset()}snapshot(e,t){return i(this,void 0,void 0,(function*(){const r=this.messageBuilder.createDataLogonMessage(e,t);return Qo.debug(`${r.MESSAGE_TYPE} (snapshot) message created -> `,r),this.socket.send(r)}))}stream(e,t,r,n){const o=this.messageBuilder.createDataLogonMessage(e,n);return Qo.debug(`${o.MESSAGE_TYPE} (stream) message created -> `,o),this.socket.sendForStream(o,t,r)}getMoreRows(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return Qo.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t,!1)}))}dataLogoff(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return Qo.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e,t=!0){var r;return i(this,void 0,void 0,(function*(){if(t&&(yield function(e,t=300){const r=n=>{e()?n():setTimeout((()=>r(n)),t)};return new Promise(r)}((()=>!1===this.isWorking)),this.metaCache.hasMetadataFor(e)))return Qo.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const n=this.messageBuilder.createMetaRequestMessage(e);let o;Qo.debug(`${n.MESSAGE_TYPE} (metadata) message created -> `,n);try{this.isWorking=!0;const e=yield this.socket.send(n);o=null!==(r=null==e?void 0:e.DETAILS)&&void 0!==r?r:[]}finally{o&&this.metaCache.setMetadataFor(e,o),this.isWorking=!1}return o}))}getJSONSchema(e){return i(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,Oi.JSON_SCHEMA_REQUEST);return Qo.debug(`${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.socket.send(t)}))}request(e,t){const r=this.messageBuilder.createRequestMessage(e,t);return Qo.debug(`${r.MESSAGE_TYPE} (request server) message created -> `,r),this.socket.send(r)}commitEvent(e,t){return i(this,void 0,void 0,(function*(){const r=this.messageBuilder.createCommitMessage(e,t);return Qo.debug(`${r.MESSAGE_TYPE} (commit) message created -> `,r),this.socket.send(r)}))}};o([j],Ki.prototype,"isWorking",void 0),o([N],Ki.prototype,"isConnected",null),Ki=o([s(0,Wi),s(1,Ti),s(2,es),s(3,ct(xi))],Ki);const Yi="true"===Ni||!1,Ji=st.createInterface((e=>e.singleton(Ki))),Qi=st.createInterface((e=>Yi?e.aliasTo(Ii):e.aliasTo(Ji))),Zi=Pe` ${Xi="block",`${ar}:host{display:${Xi}}`} :host{border: calc(${xn} * 1px) solid transparent;margin: 0;border-radius: calc(${Cn} * 1px);padding: calc(${Tn} * 1px);min-width: 64px}.form-controls{display: grid;grid-gap: calc(${Tn} * 1px);grid-column-gap: calc(${Tn} * 7px);grid-template-columns: repeat(2, 1fr)}.form-group{display: flex;flex-direction: column}.required::after{content: ' *';color: #f00}.label{font-size: calc(${Tn} * 1px + 0.7vmin)}.actions{display: flex;align-items: center;justify-content: center;padding: calc(${Tn} * 2px)}.error{border-bottom: 2px solid red}.errors{color: #f00;font-size: 11px;width: calc(100% - 70px)}.submit-button{width: 70px}`.withBehaviors(ir(Pe` :host{background: ${Vt.Canvas};border-color: ${Vt.CanvasText}}`));var Xi,ea=Object.prototype;var ta=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ea)};var ra=function(e,t){return function(r){return e(t(r))}},na=ra(Object.keys,Object),oa=ta,sa=na,ia=Object.prototype.hasOwnProperty;var aa=function(e){if(!oa(e))return sa(e);var t=[];for(var r in Object(e))ia.call(e,r)&&"constructor"!=r&&t.push(r);return t},ca="object"==typeof p&&p&&p.Object===Object&&p,la=ca,ua="object"==typeof self&&self&&self.Object===Object&&self,ha=la||ua||Function("return this")(),da=ha.Symbol,fa=da,pa=Object.prototype,ma=pa.hasOwnProperty,va=pa.toString,ga=fa?fa.toStringTag:void 0;var ya=function(e){var t=ma.call(e,ga),r=e[ga];try{e[ga]=void 0;var n=!0}catch(e){}var o=va.call(e);return n&&(t?e[ga]=r:delete e[ga]),o},ba=Object.prototype.toString;var _a=ya,wa=function(e){return ba.call(e)},Sa="[object Null]",Ea="[object Undefined]",$a=da?da.toStringTag:void 0;var Oa=function(e){return null==e?void 0===e?Ea:Sa:$a&&$a in Object(e)?_a(e):wa(e)};var Ca=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Aa=Oa,Ta=Ca,xa="[object AsyncFunction]",Pa="[object Function]",ja="[object GeneratorFunction]",Na="[object Proxy]";var Ra,ka=function(e){if(!Ta(e))return!1;var t=Aa(e);return t==Pa||t==ja||t==xa||t==Na},Ia=ha["__core-js_shared__"],Ma=(Ra=/[^.]+$/.exec(Ia&&Ia.keys&&Ia.keys.IE_PROTO||""))?"Symbol(src)_1."+Ra:"";var Da=function(e){return!!Ma&&Ma in e},Fa=Function.prototype.toString;var Va=function(e){if(null!=e){try{return Fa.call(e)}catch(e){}try{return e+""}catch(e){}}return""},La=ka,Ua=Da,za=Ca,Ba=Va,Ga=/^\[object .+?Constructor\]$/,Ha=Function.prototype,Wa=Object.prototype,qa=Ha.toString,Ka=Wa.hasOwnProperty,Ya=RegExp("^"+qa.call(Ka).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ja=function(e){return!(!za(e)||Ua(e))&&(La(e)?Ya:Ga).test(Ba(e))},Qa=function(e,t){return null==e?void 0:e[t]};var Za=function(e,t){var r=Qa(e,t);return Ja(r)?r:void 0},Xa=Za(ha,"DataView"),ec=Za(ha,"Map"),tc=Za(ha,"Promise"),rc=Za(ha,"Set"),nc=Za(ha,"WeakMap"),oc=Xa,sc=ec,ic=tc,ac=rc,cc=nc,lc=Oa,uc=Va,hc="[object Map]",dc="[object Promise]",fc="[object Set]",pc="[object WeakMap]",mc="[object DataView]",vc=uc(oc),gc=uc(sc),yc=uc(ic),bc=uc(ac),_c=uc(cc),wc=lc;(oc&&wc(new oc(new ArrayBuffer(1)))!=mc||sc&&wc(new sc)!=hc||ic&&wc(ic.resolve())!=dc||ac&&wc(new ac)!=fc||cc&&wc(new cc)!=pc)&&(wc=function(e){var t=lc(e),r="[object Object]"==t?e.constructor:void 0,n=r?uc(r):"";if(n)switch(n){case vc:return mc;case gc:return hc;case yc:return dc;case bc:return fc;case _c:return pc}return t});var Sc=wc;var Ec=function(e){return null!=e&&"object"==typeof e},$c=Oa,Oc=Ec,Cc="[object Arguments]";var Ac=function(e){return Oc(e)&&$c(e)==Cc},Tc=Ec,xc=Object.prototype,Pc=xc.hasOwnProperty,jc=xc.propertyIsEnumerable,Nc=Ac(function(){return arguments}())?Ac:function(e){return Tc(e)&&Pc.call(e,"callee")&&!jc.call(e,"callee")},Rc=Nc,kc=Array.isArray,Ic=9007199254740991;var Mc=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ic},Dc=ka,Fc=Mc;var Vc=function(e){return null!=e&&Fc(e.length)&&!Dc(e)},Lc={exports:{}};var Uc=function(){return!1};!function(e,t){var r=ha,n=Uc,o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o?r.Buffer:void 0,a=(i?i.isBuffer:void 0)||n;e.exports=a}(Lc,Lc.exports);var zc=Oa,Bc=Mc,Gc=Ec,Hc={};Hc["[object Float32Array]"]=Hc["[object Float64Array]"]=Hc["[object Int8Array]"]=Hc["[object Int16Array]"]=Hc["[object Int32Array]"]=Hc["[object Uint8Array]"]=Hc["[object Uint8ClampedArray]"]=Hc["[object Uint16Array]"]=Hc["[object Uint32Array]"]=!0,Hc["[object Arguments]"]=Hc["[object Array]"]=Hc["[object ArrayBuffer]"]=Hc["[object Boolean]"]=Hc["[object DataView]"]=Hc["[object Date]"]=Hc["[object Error]"]=Hc["[object Function]"]=Hc["[object Map]"]=Hc["[object Number]"]=Hc["[object Object]"]=Hc["[object RegExp]"]=Hc["[object Set]"]=Hc["[object String]"]=Hc["[object WeakMap]"]=!1;var Wc=function(e){return Gc(e)&&Bc(e.length)&&!!Hc[zc(e)]};var qc=function(e){return function(t){return e(t)}},Kc={exports:{}};!function(e,t){var r=ca,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n&&r.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=i}(Kc,Kc.exports);var Yc=Wc,Jc=qc,Qc=Kc.exports,Zc=Qc&&Qc.isTypedArray,Xc=Zc?Jc(Zc):Yc,el=aa,tl=Sc,rl=Rc,nl=kc,ol=Vc,sl=Lc.exports,il=ta,al=Xc,cl="[object Map]",ll="[object Set]",ul=Object.prototype.hasOwnProperty;var hl=function(e){if(null==e)return!0;if(ol(e)&&(nl(e)||"string"==typeof e||"function"==typeof e.splice||sl(e)||al(e)||rl(e)))return!e.length;var t=tl(e);if(t==cl||t==ll)return!e.size;if(il(e))return!el(e).length;for(var r in e)if(ul.call(e,r))return!1;return!0};var dl=function(e,t,r,n){var o=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r};var fl=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});var pl=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},ml=Oa,vl=Ec,gl="[object Symbol]";var yl=function(e){return"symbol"==typeof e||vl(e)&&ml(e)==gl},bl=pl,_l=kc,wl=yl,Sl=1/0,El=da?da.prototype:void 0,$l=El?El.toString:void 0;var Ol=function e(t){if("string"==typeof t)return t;if(_l(t))return bl(t,e)+"";if(wl(t))return $l?$l.call(t):"";var r=t+"";return"0"==r&&1/t==-Sl?"-0":r},Cl=Ol;var Al=function(e){return null==e?"":Cl(e)},Tl=fl,xl=Al,Pl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jl=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Nl=function(e){return(e=xl(e))&&e.replace(Pl,Tl).replace(jl,"")},Rl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var kl=function(e){return e.match(Rl)||[]},Il=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ml=function(e){return Il.test(e)},Dl="\\ud800-\\udfff",Fl="\\u2700-\\u27bf",Vl="a-z\\xdf-\\xf6\\xf8-\\xff",Ll="A-Z\\xc0-\\xd6\\xd8-\\xde",Ul="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zl="["+Ul+"]",Bl="\\d+",Gl="["+Fl+"]",Hl="["+Vl+"]",Wl="[^"+Dl+Ul+Bl+Fl+Vl+Ll+"]",ql="(?:\\ud83c[\\udde6-\\uddff]){2}",Kl="[\\ud800-\\udbff][\\udc00-\\udfff]",Yl="["+Ll+"]",Jl="(?:"+Hl+"|"+Wl+")",Ql="(?:"+Yl+"|"+Wl+")",Zl="(?:['’](?:d|ll|m|re|s|t|ve))?",Xl="(?:['’](?:D|LL|M|RE|S|T|VE))?",eu="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",tu="[\\ufe0e\\ufe0f]?",ru=tu+eu+("(?:\\u200d(?:"+["[^"+Dl+"]",ql,Kl].join("|")+")"+tu+eu+")*"),nu="(?:"+[Gl,ql,Kl].join("|")+")"+ru,ou=RegExp([Yl+"?"+Hl+"+"+Zl+"(?="+[zl,Yl,"$"].join("|")+")",Ql+"+"+Xl+"(?="+[zl,Yl+Jl,"$"].join("|")+")",Yl+"?"+Jl+"+"+Zl,Yl+"+"+Xl,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bl,nu].join("|"),"g");var su=kl,iu=Ml,au=Al,cu=function(e){return e.match(ou)||[]};var lu=function(e,t,r){return e=au(e),void 0===(t=r?void 0:t)?iu(e)?cu(e):su(e):e.match(t)||[]},uu=dl,hu=Nl,du=lu,fu=RegExp("['’]","g");var pu=function(e){return function(t){return uu(du(hu(t).replace(fu,"")),e,"")}};var mu=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++n<o;)s[n]=e[n+t];return s},vu=mu;var gu=function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:vu(e,t,r)},yu=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var bu=function(e){return yu.test(e)};var _u=function(e){return e.split("")},wu="\\ud800-\\udfff",Su="["+wu+"]",Eu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$u="\\ud83c[\\udffb-\\udfff]",Ou="[^"+wu+"]",Cu="(?:\\ud83c[\\udde6-\\uddff]){2}",Au="[\\ud800-\\udbff][\\udc00-\\udfff]",Tu="(?:"+Eu+"|"+$u+")"+"?",xu="[\\ufe0e\\ufe0f]?",Pu=xu+Tu+("(?:\\u200d(?:"+[Ou,Cu,Au].join("|")+")"+xu+Tu+")*"),ju="(?:"+[Ou+Eu+"?",Eu,Cu,Au,Su].join("|")+")",Nu=RegExp($u+"(?="+$u+")|"+ju+Pu,"g");var Ru=_u,ku=bu,Iu=function(e){return e.match(Nu)||[]};var Mu=gu,Du=bu,Fu=function(e){return ku(e)?Iu(e):Ru(e)},Vu=Al;var Lu=function(e){return function(t){t=Vu(t);var r=Du(t)?Fu(t):void 0,n=r?r[0]:t.charAt(0),o=r?Mu(r,1).join(""):t.slice(1);return n[e]()+o}}("toUpperCase"),Uu=pu((function(e,t,r){return e+(r?" ":"")+Lu(t)})),zu=Uu;var Bu=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},Gu=9007199254740991,Hu=/^(?:0|[1-9]\d*)$/;var Wu=function(e,t){var r=typeof e;return!!(t=null==t?Gu:t)&&("number"==r||"symbol"!=r&&Hu.test(e))&&e>-1&&e%1==0&&e<t},qu=Bu,Ku=Rc,Yu=kc,Ju=Lc.exports,Qu=Wu,Zu=Xc,Xu=Object.prototype.hasOwnProperty;var eh=function(e,t){var r=Yu(e),n=!r&&Ku(e),o=!r&&!n&&Ju(e),s=!r&&!n&&!o&&Zu(e),i=r||n||o||s,a=i?qu(e.length,String):[],c=a.length;for(var l in e)!t&&!Xu.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Qu(l,c))||a.push(l);return a},th=eh,rh=aa,nh=Vc;var oh=function(e){return nh(e)?th(e):rh(e)};var sh=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},ih=Rc,ah=kc,ch=da?da.isConcatSpreadable:void 0;var lh=sh,uh=function(e){return ah(e)||ih(e)||!!(ch&&e&&e[ch])};var hh=function e(t,r,n,o,s){var i=-1,a=t.length;for(n||(n=uh),s||(s=[]);++i<a;){var c=t[i];r>0&&n(c)?r>1?e(c,r-1,n,o,s):lh(s,c):o||(s[s.length]=c)}return s};var dh=function(e){return e};var fh=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},ph=fh,mh=Math.max;var vh=function(e,t,r){return t=mh(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=mh(n.length-t,0),i=Array(s);++o<s;)i[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(i),ph(e,this,a)}};var gh=function(e){return function(){return e}},yh=Za,bh=function(){try{var e=yh(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_h=bh,wh=gh,Sh=_h,Eh=Sh?function(e,t){return Sh(e,"toString",{configurable:!0,enumerable:!1,value:wh(t),writable:!0})}:dh,$h=Eh,Oh=800,Ch=16,Ah=Date.now;var Th=function(e){var t=0,r=0;return function(){var n=Ah(),o=Ch-(n-r);if(r=n,o>0){if(++t>=Oh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},xh=Th($h),Ph=dh,jh=vh,Nh=xh;var Rh=function(e,t){return Nh(jh(e,t,Ph),e+"")},kh=Za(Object,"create"),Ih=kh;var Mh=function(){this.__data__=Ih?Ih(null):{},this.size=0};var Dh=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Fh=kh,Vh="__lodash_hash_undefined__",Lh=Object.prototype.hasOwnProperty;var Uh=function(e){var t=this.__data__;if(Fh){var r=t[e];return r===Vh?void 0:r}return Lh.call(t,e)?t[e]:void 0},zh=kh,Bh=Object.prototype.hasOwnProperty;var Gh=kh,Hh="__lodash_hash_undefined__";var Wh=Mh,qh=Dh,Kh=Uh,Yh=function(e){var t=this.__data__;return zh?void 0!==t[e]:Bh.call(t,e)},Jh=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gh&&void 0===t?Hh:t,this};function Qh(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Qh.prototype.clear=Wh,Qh.prototype.delete=qh,Qh.prototype.get=Kh,Qh.prototype.has=Yh,Qh.prototype.set=Jh;var Zh=Qh;var Xh=function(){this.__data__=[],this.size=0};var ed=function(e,t){return e===t||e!=e&&t!=t},td=ed;var rd=function(e,t){for(var r=e.length;r--;)if(td(e[r][0],t))return r;return-1},nd=rd,od=Array.prototype.splice;var sd=function(e){var t=this.__data__,r=nd(t,e);return!(r<0)&&(r==t.length-1?t.pop():od.call(t,r,1),--this.size,!0)},id=rd;var ad=function(e){var t=this.__data__,r=id(t,e);return r<0?void 0:t[r][1]},cd=rd;var ld=rd;var ud=function(e,t){var r=this.__data__,n=ld(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},hd=Xh,dd=sd,fd=ad,pd=function(e){return cd(this.__data__,e)>-1},md=ud;function vd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vd.prototype.clear=hd,vd.prototype.delete=dd,vd.prototype.get=fd,vd.prototype.has=pd,vd.prototype.set=md;var gd=vd,yd=Zh,bd=gd,_d=ec;var wd=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},Sd=wd;var Ed=function(e,t){var r=e.__data__;return Sd(t)?r["string"==typeof t?"string":"hash"]:r.map},$d=Ed;var Od=Ed;var Cd=Ed;var Ad=Ed;var Td=function(){this.size=0,this.__data__={hash:new yd,map:new(_d||bd),string:new yd}},xd=function(e){var t=$d(this,e).delete(e);return this.size-=t?1:0,t},Pd=function(e){return Od(this,e).get(e)},jd=function(e){return Cd(this,e).has(e)},Nd=function(e,t){var r=Ad(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Rd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Rd.prototype.clear=Td,Rd.prototype.delete=xd,Rd.prototype.get=Pd,Rd.prototype.has=jd,Rd.prototype.set=Nd;var kd=Rd,Id="__lodash_hash_undefined__";var Md=kd,Dd=function(e){return this.__data__.set(e,Id),this},Fd=function(e){return this.__data__.has(e)};function Vd(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Md;++t<r;)this.add(e[t])}Vd.prototype.add=Vd.prototype.push=Dd,Vd.prototype.has=Fd;var Ld=Vd;var Ud=function(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1};var zd=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},Bd=Ud,Gd=function(e){return e!=e},Hd=zd;var Wd=function(e,t,r){return t==t?Hd(e,t,r):Bd(e,Gd,r)},qd=Wd;var Kd=function(e,t){return!!(null==e?0:e.length)&&qd(e,t,0)>-1};var Yd=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var Jd=function(e,t){return e.has(t)};var Qd=function(){};var Zd=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},Xd=rc,ef=Qd,tf=Xd&&1/Zd(new Xd([,-0]))[1]==1/0?function(e){return new Xd(e)}:ef,rf=Ld,nf=Kd,of=Yd,sf=Jd,af=tf,cf=Zd,lf=200;var uf=function(e,t,r){var n=-1,o=nf,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=of;else if(s>=lf){var l=t?null:af(e);if(l)return cf(l);i=!1,o=sf,c=new rf}else c=t?[]:a;e:for(;++n<s;){var u=e[n],h=t?t(u):u;if(u=r||0!==u?u:0,i&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),a.push(u)}else o(c,h,r)||(c!==a&&c.push(h),a.push(u))}return a},hf=Vc,df=Ec;var ff=function(e){return df(e)&&hf(e)},pf=hh,mf=uf,vf=ff;Rh((function(e){return mf(pf(e,1,vf,!0))}));var gf=gd;var yf=gd,bf=ec,_f=kd,wf=200;var Sf=gd,Ef=function(){this.__data__=new gf,this.size=0},$f=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Of=function(e){return this.__data__.get(e)},Cf=function(e){return this.__data__.has(e)},Af=function(e,t){var r=this.__data__;if(r instanceof yf){var n=r.__data__;if(!bf||n.length<wf-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _f(n)}return r.set(e,t),this.size=r.size,this};function Tf(e){var t=this.__data__=new Sf(e);this.size=t.size}Tf.prototype.clear=Ef,Tf.prototype.delete=$f,Tf.prototype.get=Of,Tf.prototype.has=Cf,Tf.prototype.set=Af;var xf=Tf,Pf=_h;var jf=function(e,t,r){"__proto__"==t&&Pf?Pf(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Nf=jf,Rf=ed;var kf=function(e,t,r){(void 0!==r&&!Rf(e[t],r)||void 0===r&&!(t in e))&&Nf(e,t,r)};var If=function(e){return function(t,r,n){for(var o=-1,s=Object(t),i=n(t),a=i.length;a--;){var c=i[e?a:++o];if(!1===r(s[c],c,s))break}return t}},Mf=If(),Df={exports:{}};!function(e,t){var r=ha,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n?r.Buffer:void 0,i=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=i?i(r):new e.constructor(r);return e.copy(n),n}}(Df,Df.exports);var Ff=ha.Uint8Array,Vf=Ff;var Lf=function(e){var t=new e.constructor(e.byteLength);return new Vf(t).set(new Vf(e)),t},Uf=Lf;var zf=function(e,t){var r=t?Uf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var Bf=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},Gf=Ca,Hf=Object.create,Wf=function(){function e(){}return function(t){if(!Gf(t))return{};if(Hf)return Hf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),qf=ra(Object.getPrototypeOf,Object),Kf=Wf,Yf=qf,Jf=ta;var Qf=function(e){return"function"!=typeof e.constructor||Jf(e)?{}:Kf(Yf(e))},Zf=Oa,Xf=qf,ep=Ec,tp="[object Object]",rp=Function.prototype,np=Object.prototype,op=rp.toString,sp=np.hasOwnProperty,ip=op.call(Object);var ap=function(e){if(!ep(e)||Zf(e)!=tp)return!1;var t=Xf(e);if(null===t)return!0;var r=sp.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&op.call(r)==ip};var cp=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},lp=jf,up=ed,hp=Object.prototype.hasOwnProperty;var dp=function(e,t,r){var n=e[t];hp.call(e,t)&&up(n,r)&&(void 0!==r||t in e)||lp(e,t,r)},fp=dp,pp=jf;var mp=function(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),o?pp(r,a,c):fp(r,a,c)}return r};var vp=Ca,gp=ta,yp=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},bp=Object.prototype.hasOwnProperty;var _p=eh,wp=function(e){if(!vp(e))return yp(e);var t=gp(e),r=[];for(var n in e)("constructor"!=n||!t&&bp.call(e,n))&&r.push(n);return r},Sp=Vc;var Ep=function(e){return Sp(e)?_p(e,!0):wp(e)},$p=mp,Op=Ep;var Cp=kf,Ap=Df.exports,Tp=zf,xp=Bf,Pp=Qf,jp=Rc,Np=kc,Rp=ff,kp=Lc.exports,Ip=ka,Mp=Ca,Dp=ap,Fp=Xc,Vp=cp,Lp=function(e){return $p(e,Op(e))};var Up=xf,zp=kf,Bp=Mf,Gp=function(e,t,r,n,o,s,i){var a=Vp(e,r),c=Vp(t,r),l=i.get(c);if(l)Cp(e,r,l);else{var u=s?s(a,c,r+"",e,t,i):void 0,h=void 0===u;if(h){var d=Np(c),f=!d&&kp(c),p=!d&&!f&&Fp(c);u=c,d||f||p?Np(a)?u=a:Rp(a)?u=xp(a):f?(h=!1,u=Ap(c,!0)):p?(h=!1,u=Tp(c,!0)):u=[]:Dp(c)||jp(c)?(u=a,jp(a)?u=Lp(a):Mp(a)&&!Ip(a)||(u=Pp(c))):h=!1}h&&(i.set(c,u),o(u,c,n,s,i),i.delete(c)),Cp(e,r,u)}},Hp=Ca,Wp=Ep,qp=cp;var Kp=function e(t,r,n,o,s){t!==r&&Bp(r,(function(i,a){if(s||(s=new Up),Hp(i))Gp(t,r,a,n,e,o,s);else{var c=o?o(qp(t,a),i,a+"",t,r,s):void 0;void 0===c&&(c=i),zp(t,a,c)}}),Wp)},Yp=ed,Jp=Vc,Qp=Wu,Zp=Ca;var Xp=function(e,t,r){if(!Zp(r))return!1;var n=typeof t;return!!("number"==n?Jp(r)&&Qp(t,r.length):"string"==n&&t in r)&&Yp(r[t],e)},em=Rh,tm=Xp;var rm=function(e){return em((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,i&&tm(r[0],r[1],i)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,s)}return t}))},nm=Kp,om=rm((function(e,t,r){nm(e,t,r)}));var sm=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},im=mp,am=oh;var cm=function(e,t){return e&&im(t,am(t),e)},lm=mp,um=Ep;var hm=function(e,t){return e&&lm(t,um(t),e)};var dm=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[o++]=i)}return s};var fm=function(){return[]},pm=dm,mm=fm,vm=Object.prototype.propertyIsEnumerable,gm=Object.getOwnPropertySymbols,ym=gm?function(e){return null==e?[]:(e=Object(e),pm(gm(e),(function(t){return vm.call(e,t)})))}:mm,bm=mp,_m=ym;var wm=function(e,t){return bm(e,_m(e),t)},Sm=sh,Em=qf,$m=ym,Om=fm,Cm=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Sm(t,$m(e)),e=Em(e);return t}:Om,Am=mp,Tm=Cm;var xm=function(e,t){return Am(e,Tm(e),t)},Pm=sh,jm=kc;var Nm=function(e,t,r){var n=t(e);return jm(e)?n:Pm(n,r(e))},Rm=Nm,km=ym,Im=oh;var Mm=function(e){return Rm(e,Im,km)},Dm=Nm,Fm=Cm,Vm=Ep;var Lm=function(e){return Dm(e,Vm,Fm)},Um=Object.prototype.hasOwnProperty;var zm=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Um.call(e,"index")&&(r.index=e.index,r.input=e.input),r},Bm=Lf;var Gm=function(e,t){var r=t?Bm(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Hm=/\w*$/;var Wm=function(e){var t=new e.constructor(e.source,Hm.exec(e));return t.lastIndex=e.lastIndex,t},qm=da?da.prototype:void 0,Km=qm?qm.valueOf:void 0;var Ym=Lf,Jm=Gm,Qm=Wm,Zm=function(e){return Km?Object(Km.call(e)):{}},Xm=zf,ev="[object Boolean]",tv="[object Date]",rv="[object Map]",nv="[object Number]",ov="[object RegExp]",sv="[object Set]",iv="[object String]",av="[object Symbol]",cv="[object ArrayBuffer]",lv="[object DataView]",uv="[object Float32Array]",hv="[object Float64Array]",dv="[object Int8Array]",fv="[object Int16Array]",pv="[object Int32Array]",mv="[object Uint8Array]",vv="[object Uint8ClampedArray]",gv="[object Uint16Array]",yv="[object Uint32Array]";var bv=function(e,t,r){var n=e.constructor;switch(t){case cv:return Ym(e);case ev:case tv:return new n(+e);case lv:return Jm(e,r);case uv:case hv:case dv:case fv:case pv:case mv:case vv:case gv:case yv:return Xm(e,r);case rv:return new n;case nv:case iv:return new n(e);case ov:return Qm(e);case sv:return new n;case av:return Zm(e)}},_v=Sc,wv=Ec,Sv="[object Map]";var Ev=function(e){return wv(e)&&_v(e)==Sv},$v=qc,Ov=Kc.exports,Cv=Ov&&Ov.isMap,Av=Cv?$v(Cv):Ev,Tv=Sc,xv=Ec,Pv="[object Set]";var jv=function(e){return xv(e)&&Tv(e)==Pv},Nv=qc,Rv=Kc.exports,kv=Rv&&Rv.isSet,Iv=kv?Nv(kv):jv,Mv=xf,Dv=sm,Fv=dp,Vv=cm,Lv=hm,Uv=Df.exports,zv=Bf,Bv=wm,Gv=xm,Hv=Mm,Wv=Lm,qv=Sc,Kv=zm,Yv=bv,Jv=Qf,Qv=kc,Zv=Lc.exports,Xv=Av,eg=Ca,tg=Iv,rg=oh,ng=Ep,og=1,sg=2,ig=4,ag="[object Arguments]",cg="[object Function]",lg="[object GeneratorFunction]",ug="[object Object]",hg={};hg[ag]=hg["[object Array]"]=hg["[object ArrayBuffer]"]=hg["[object DataView]"]=hg["[object Boolean]"]=hg["[object Date]"]=hg["[object Float32Array]"]=hg["[object Float64Array]"]=hg["[object Int8Array]"]=hg["[object Int16Array]"]=hg["[object Int32Array]"]=hg["[object Map]"]=hg["[object Number]"]=hg[ug]=hg["[object RegExp]"]=hg["[object Set]"]=hg["[object String]"]=hg["[object Symbol]"]=hg["[object Uint8Array]"]=hg["[object Uint8ClampedArray]"]=hg["[object Uint16Array]"]=hg["[object Uint32Array]"]=!0,hg["[object Error]"]=hg[cg]=hg["[object WeakMap]"]=!1;var dg=function e(t,r,n,o,s,i){var a,c=r&og,l=r&sg,u=r&ig;if(n&&(a=s?n(t,o,s,i):n(t)),void 0!==a)return a;if(!eg(t))return t;var h=Qv(t);if(h){if(a=Kv(t),!c)return zv(t,a)}else{var d=qv(t),f=d==cg||d==lg;if(Zv(t))return Uv(t,c);if(d==ug||d==ag||f&&!s){if(a=l||f?{}:Jv(t),!c)return l?Gv(t,Lv(a,t)):Bv(t,Vv(a,t))}else{if(!hg[d])return s?t:{};a=Yv(t,d,c)}}i||(i=new Mv);var p=i.get(t);if(p)return p;i.set(t,a),tg(t)?t.forEach((function(o){a.add(e(o,r,n,o,t,i))})):Xv(t)&&t.forEach((function(o,s){a.set(s,e(o,r,n,s,t,i))}));var m=h?void 0:(u?l?Wv:Hv:l?ng:rg)(t);return Dv(m||t,(function(o,s){m&&(o=t[s=o]),Fv(a,s,e(o,r,n,s,t,i))})),a},fg=dg,pg=1,mg=4;var vg=function(e){return fg(e,pg|mg)},gg={};!function(e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var o in r){var s=r[o];t.call(n,s)?n[s].push(o):n[s]=[o]}return n}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}}(gg);var yg={},bg=gg,_g=yg,wg=Array.prototype.push;function Sg(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function Eg(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function $g(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var o=n[0]=t.apply(void 0,n);return e.apply(void 0,n),o}}}var Og=function e(t,r,n,o){var s="function"==typeof r,i=r===Object(r);if(i&&(o=n,n=r,r=void 0),null==n)throw new TypeError;o||(o={});var a={cap:!("cap"in o)||o.cap,curry:!("curry"in o)||o.curry,fixed:!("fixed"in o)||o.fixed,immutable:!("immutable"in o)||o.immutable,rearg:!("rearg"in o)||o.rearg},c=s?n:_g,l="curry"in o&&o.curry,u="fixed"in o&&o.fixed,h="rearg"in o&&o.rearg,d=s?n.runInContext():void 0,f=s?n:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},p=f.ary,m=f.assign,v=f.clone,g=f.curry,y=f.forEach,b=f.isArray,_=f.isError,w=f.isFunction,S=f.isWeakMap,E=f.keys,$=f.rearg,O=f.toInteger,C=f.toPath,A=E(bg.aryMethod),T={castArray:function(e){return function(){var t=arguments[0];return b(t)?e(Eg(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[1],r=e(arguments[0],t),n=r.length;return a.cap&&"number"==typeof t?(t=t>2?t-2:1,n&&n<=t?r:Sg(r,t)):r}},mixin:function(e){return function(t){var r=this;if(!w(r))return e(r,Object(t));var n=[];return y(E(t),(function(e){w(t[e])&&n.push([e,r.prototype[e]])})),e(r,Object(t)),y(n,(function(e){var t=e[1];w(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]})),r}},nthArg:function(e){return function(t){var r=t<0?1:O(t)+1;return g(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return g(e(t,r),n)}},runInContext:function(r){return function(n){return e(t,r(n),o)}}};function x(e,t){if(a.cap){var r=bg.iterateeRearg[e];if(r)return function(e,t){return k(e,(function(e){var r=t.length;return function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}($(Sg(e,r),t),r)}))}(t,r);var n=!s&&bg.iterateeAry[e];if(n)return function(e,t){return k(e,(function(e){return"function"==typeof e?Sg(e,t):e}))}(t,n)}return t}function P(e,t,r){if(a.fixed&&(u||!bg.skipFixed[e])){var n=bg.methodSpread[e],o=n&&n.start;return void 0===o?p(t,r):function(e,t){return function(){for(var r=arguments.length,n=r-1,o=Array(r);r--;)o[r]=arguments[r];var s=o[t],i=o.slice(0,t);return s&&wg.apply(i,s),t!=n&&wg.apply(i,o.slice(t+1)),e.apply(this,i)}}(t,o)}return t}function j(e,t,r){return a.rearg&&r>1&&(h||!bg.skipRearg[e])?$(t,bg.methodRearg[e]||bg.aryRearg[r]):t}function N(e,t){for(var r=-1,n=(t=C(t)).length,o=n-1,s=v(Object(e)),i=s;null!=i&&++r<n;){var a=t[r],c=i[a];null==c||w(c)||_(c)||S(c)||(i[a]=v(r==o?c:Object(c))),i=i[a]}return s}function R(t,r){var n=bg.aliasToReal[t]||t,i=bg.remap[n]||n,a=o;return function(t){var o=s?d:f,c=s?d[i]:r,l=m(m({},a),t);return e(o,n,c,l)}}function k(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var o=a.rearg?0:r-1;return n[o]=t(n[o]),e.apply(void 0,n)}}function I(e,t,r){var n,o=bg.aliasToReal[e]||e,s=t,i=T[o];return i?s=i(t):a.immutable&&(bg.mutate.array[o]?s=$g(t,Eg):bg.mutate.object[o]?s=$g(t,function(e){return function(t){return e({},t)}}(t)):bg.mutate.set[o]&&(s=$g(t,N))),y(A,(function(e){return y(bg.aryMethod[e],(function(t){if(o==t){var r=bg.methodSpread[o],i=r&&r.afterRearg;return n=i?P(o,j(o,s,e),e):j(o,P(o,s,e),e),n=function(e,t,r){return l||a.curry&&r>1?g(t,r):t}(0,n=x(o,n),e),!1}})),!n})),n||(n=s),n==t&&(n=l?g(n,1):function(){return t.apply(this,arguments)}),n.convert=R(o,t),n.placeholder=t.placeholder=r,n}if(!i)return I(r,n,c);var M=n,D=[];return y(A,(function(e){y(bg.aryMethod[e],(function(e){var t=M[bg.remap[e]||e];t&&D.push([e,I(e,t,M)])}))})),y(E(M),(function(e){var t=M[e];if("function"==typeof t){for(var r=D.length;r--;)if(D[r][0]==e)return;t.convert=R(e,t),D.push([e,t])}})),y(D,(function(e){M[e[0]]=e[1]})),M.convert=function(e){return M.runInContext.convert(e)(void 0)},M.placeholder=M,y(E(M),(function(e){y(bg.realToAlias[e]||[],(function(t){M[t]=M[e]}))})),M},Cg=nc&&new nc,Ag=Cg,Tg=Ag?function(e,t){return Ag.set(e,t),e}:dh,xg=Tg,Pg=Wf,jg=Ca;var Ng=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pg(e.prototype),n=e.apply(r,t);return jg(n)?n:r}},Rg=Ng,kg=ha,Ig=1;var Mg=function(e,t,r){var n=t&Ig,o=Rg(e);return function t(){return(this&&this!==kg&&this instanceof t?o:e).apply(n?r:this,arguments)}},Dg=Math.max;var Fg=function(e,t,r,n){for(var o=-1,s=e.length,i=r.length,a=-1,c=t.length,l=Dg(s-i,0),u=Array(c+l),h=!n;++a<c;)u[a]=t[a];for(;++o<i;)(h||o<s)&&(u[r[o]]=e[o]);for(;l--;)u[a++]=e[o++];return u},Vg=Math.max;var Lg=function(e,t,r,n){for(var o=-1,s=e.length,i=-1,a=r.length,c=-1,l=t.length,u=Vg(s-a,0),h=Array(u+l),d=!n;++o<u;)h[o]=e[o];for(var f=o;++c<l;)h[f+c]=t[c];for(;++i<a;)(d||o<s)&&(h[f+r[i]]=e[o++]);return h};var Ug=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n};var zg=function(){},Bg=Wf,Gg=zg,Hg=4294967295;function Wg(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Hg,this.__views__=[]}Wg.prototype=Bg(Gg.prototype),Wg.prototype.constructor=Wg;var qg=Wg,Kg=Cg,Yg=Kg?function(e){return Kg.get(e)}:Qd,Jg=Yg,Qg={},Zg=Object.prototype.hasOwnProperty;var Xg=function(e){for(var t=e.name+"",r=Qg[t],n=Zg.call(Qg,t)?r.length:0;n--;){var o=r[n],s=o.func;if(null==s||s==e)return o.name}return t},ey=Wf,ty=zg;function ry(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}ry.prototype=ey(ty.prototype),ry.prototype.constructor=ry;var ny=qg,oy=ry,sy=Bf;var iy=qg,ay=ry,cy=zg,ly=kc,uy=Ec,hy=function(e){if(e instanceof ny)return e.clone();var t=new oy(e.__wrapped__,e.__chain__);return t.__actions__=sy(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},dy=Object.prototype.hasOwnProperty;function fy(e){if(uy(e)&&!ly(e)&&!(e instanceof iy)){if(e instanceof ay)return e;if(dy.call(e,"__wrapped__"))return hy(e)}return new ay(e)}fy.prototype=cy.prototype,fy.prototype.constructor=fy;var py=qg,my=Jg,vy=Xg,gy=fy;var yy=function(e){var t=vy(e),r=gy[t];if("function"!=typeof r||!(t in py.prototype))return!1;if(e===r)return!0;var n=my(r);return!!n&&e===n[0]},by=Th(xg),_y=/\{\n\/\* \[wrapped with (.+)\] \*/,wy=/,? & /;var Sy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var Ey=sm,$y=Kd,Oy=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var Cy=function(e){var t=e.match(_y);return t?t[1].split(wy):[]},Ay=function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Sy,"{\n/* [wrapped with "+t+"] */\n")},Ty=xh,xy=function(e,t){return Ey(Oy,(function(r){var n="_."+r[0];t&r[1]&&!$y(e,n)&&e.push(n)})),e.sort()};var Py=function(e,t,r){var n=t+"";return Ty(e,Ay(n,xy(Cy(n),r)))},jy=yy,Ny=by,Ry=Py,ky=1,Iy=2,My=4,Dy=8,Fy=32,Vy=64;var Ly=function(e,t,r,n,o,s,i,a,c,l){var u=t&Dy;t|=u?Fy:Vy,(t&=~(u?Vy:Fy))&My||(t&=~(ky|Iy));var h=[e,t,o,u?s:void 0,u?i:void 0,u?void 0:s,u?void 0:i,a,c,l],d=r.apply(void 0,h);return jy(e)&&Ny(d,h),d.placeholder=n,Ry(d,e,t)};var Uy=function(e){return e.placeholder},zy=Bf,By=Wu,Gy=Math.min;var Hy=function(e,t){for(var r=e.length,n=Gy(t.length,r),o=zy(e);n--;){var s=t[n];e[n]=By(s,r)?o[s]:void 0}return e},Wy="__lodash_placeholder__";var qy=function(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var i=e[r];i!==t&&i!==Wy||(e[r]=Wy,s[o++]=r)}return s},Ky=Fg,Yy=Lg,Jy=Ug,Qy=Ng,Zy=Ly,Xy=Uy,eb=Hy,tb=qy,rb=ha,nb=1,ob=2,sb=8,ib=16,ab=128,cb=512;var lb=function e(t,r,n,o,s,i,a,c,l,u){var h=r&ab,d=r&nb,f=r&ob,p=r&(sb|ib),m=r&cb,v=f?void 0:Qy(t);return function g(){for(var y=arguments.length,b=Array(y),_=y;_--;)b[_]=arguments[_];if(p)var w=Xy(g),S=Jy(b,w);if(o&&(b=Ky(b,o,s,p)),i&&(b=Yy(b,i,a,p)),y-=S,p&&y<u){var E=tb(b,w);return Zy(t,r,e,g.placeholder,n,b,E,c,l,u-y)}var $=d?n:this,O=f?$[t]:t;return y=b.length,c?b=eb(b,c):m&&y>1&&b.reverse(),h&&l<y&&(b.length=l),this&&this!==rb&&this instanceof g&&(O=v||Qy(O)),O.apply($,b)}},ub=fh,hb=Ng,db=lb,fb=Ly,pb=Uy,mb=qy,vb=ha;var gb=function(e,t,r){var n=hb(e);return function o(){for(var s=arguments.length,i=Array(s),a=s,c=pb(o);a--;)i[a]=arguments[a];var l=s<3&&i[0]!==c&&i[s-1]!==c?[]:mb(i,c);return(s-=l.length)<r?fb(e,t,db,o.placeholder,void 0,i,l,void 0,void 0,r-s):ub(this&&this!==vb&&this instanceof o?n:e,this,i)}},yb=fh,bb=Ng,_b=ha,wb=1;var Sb=function(e,t,r,n){var o=t&wb,s=bb(e);return function t(){for(var i=-1,a=arguments.length,c=-1,l=n.length,u=Array(l+a),h=this&&this!==_b&&this instanceof t?s:e;++c<l;)u[c]=n[c];for(;a--;)u[c++]=arguments[++i];return yb(h,o?r:this,u)}},Eb=Fg,$b=Lg,Ob=qy,Cb="__lodash_placeholder__",Ab=1,Tb=2,xb=4,Pb=8,jb=128,Nb=256,Rb=Math.min;var kb=/\s/;var Ib=function(e){for(var t=e.length;t--&&kb.test(e.charAt(t)););return t},Mb=Ib,Db=/^\s+/;var Fb=function(e){return e?e.slice(0,Mb(e)+1).replace(Db,""):e},Vb=Ca,Lb=yl,Ub=NaN,zb=/^[-+]0x[0-9a-f]+$/i,Bb=/^0b[01]+$/i,Gb=/^0o[0-7]+$/i,Hb=parseInt;var Wb=function(e){if("number"==typeof e)return e;if(Lb(e))return Ub;if(Vb(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Vb(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Fb(e);var r=Bb.test(e);return r||Gb.test(e)?Hb(e.slice(2),r?2:8):zb.test(e)?Ub:+e},qb=1/0,Kb=17976931348623157e292;var Yb=function(e){return e?(e=Wb(e))===qb||e===-qb?(e<0?-1:1)*Kb:e==e?e:0:0===e?e:0},Jb=Yb;var Qb=function(e){var t=Jb(e),r=t%1;return t==t?r?t-r:t:0},Zb=xg,Xb=Mg,e_=gb,t_=lb,r_=Sb,n_=Jg,o_=function(e,t){var r=e[1],n=t[1],o=r|n,s=o<(Ab|Tb|jb),i=n==jb&&r==Pb||n==jb&&r==Nb&&e[7].length<=t[8]||n==(jb|Nb)&&t[7].length<=t[8]&&r==Pb;if(!s&&!i)return e;n&Ab&&(e[2]=t[2],o|=r&Ab?0:xb);var a=t[3];if(a){var c=e[3];e[3]=c?Eb(c,a,t[4]):a,e[4]=c?Ob(e[3],Cb):t[4]}return(a=t[5])&&(c=e[5],e[5]=c?$b(c,a,t[6]):a,e[6]=c?Ob(e[5],Cb):t[6]),(a=t[7])&&(e[7]=a),n&jb&&(e[8]=null==e[8]?t[8]:Rb(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e},s_=by,i_=Py,a_=Qb,c_="Expected a function",l_=1,u_=2,h_=8,d_=16,f_=32,p_=64,m_=Math.max;var v_=function(e,t,r,n,o,s,i,a){var c=t&u_;if(!c&&"function"!=typeof e)throw new TypeError(c_);var l=n?n.length:0;if(l||(t&=~(f_|p_),n=o=void 0),i=void 0===i?i:m_(a_(i),0),a=void 0===a?a:a_(a),l-=o?o.length:0,t&p_){var u=n,h=o;n=o=void 0}var d=c?void 0:n_(e),f=[e,t,r,n,o,u,h,s,i,a];if(d&&o_(f,d),e=f[0],t=f[1],r=f[2],n=f[3],o=f[4],!(a=f[9]=void 0===f[9]?c?0:e.length:m_(f[9]-l,0))&&t&(h_|d_)&&(t&=~(h_|d_)),t&&t!=l_)p=t==h_||t==d_?e_(e,t,a):t!=f_&&t!=(l_|f_)||o.length?t_.apply(void 0,f):r_(e,t,r,n);else var p=Xb(e,t,r);return i_((d?Zb:s_)(p,f),e,t)},g_=v_,y_=128;var b_=function(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,g_(e,y_,void 0,void 0,void 0,void 0,t)},__=dg,w_=4;var S_=function(e){return __(e,w_)},E_=v_,$_=8;function O_(e,t,r){var n=E_(e,$_,void 0,void 0,void 0,void 0,void 0,t=r?void 0:t);return n.placeholder=O_.placeholder,n}O_.placeholder={};var C_=O_,A_=Oa,T_=Ec,x_=ap,P_="[object DOMException]",j_="[object Error]";var N_=function(e){if(!T_(e))return!1;var t=A_(e);return t==j_||t==P_||"string"==typeof e.message&&"string"==typeof e.name&&!x_(e)},R_=Sc,k_=Ec,I_="[object WeakMap]";var M_=function(e){return k_(e)&&R_(e)==I_};var D_=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},F_=Ld,V_=D_,L_=Jd,U_=1,z_=2;var B_=function(e,t,r,n,o,s){var i=r&U_,a=e.length,c=t.length;if(a!=c&&!(i&&c>a))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var h=-1,d=!0,f=r&z_?new F_:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var p=e[h],m=t[h];if(n)var v=i?n(m,p,h,t,e,s):n(p,m,h,e,t,s);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!V_(t,(function(e,t){if(!L_(f,t)&&(p===e||o(p,e,r,n,s)))return f.push(t)}))){d=!1;break}}else if(p!==m&&!o(p,m,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d};var G_=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},H_=Ff,W_=ed,q_=B_,K_=G_,Y_=Zd,J_=1,Q_=2,Z_="[object Boolean]",X_="[object Date]",ew="[object Error]",tw="[object Map]",rw="[object Number]",nw="[object RegExp]",ow="[object Set]",sw="[object String]",iw="[object Symbol]",aw="[object ArrayBuffer]",cw="[object DataView]",lw=da?da.prototype:void 0,uw=lw?lw.valueOf:void 0;var hw=function(e,t,r,n,o,s,i){switch(r){case cw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aw:return!(e.byteLength!=t.byteLength||!s(new H_(e),new H_(t)));case Z_:case X_:case rw:return W_(+e,+t);case ew:return e.name==t.name&&e.message==t.message;case nw:case sw:return e==t+"";case tw:var a=K_;case ow:var c=n&J_;if(a||(a=Y_),e.size!=t.size&&!c)return!1;var l=i.get(e);if(l)return l==t;n|=Q_,i.set(e,t);var u=q_(a(e),a(t),n,o,s,i);return i.delete(e),u;case iw:if(uw)return uw.call(e)==uw.call(t)}return!1},dw=Mm,fw=1,pw=Object.prototype.hasOwnProperty;var mw=function(e,t,r,n,o,s){var i=r&fw,a=dw(e),c=a.length;if(c!=dw(t).length&&!i)return!1;for(var l=c;l--;){var u=a[l];if(!(i?u in t:pw.call(t,u)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var f=!0;s.set(e,t),s.set(t,e);for(var p=i;++l<c;){var m=e[u=a[l]],v=t[u];if(n)var g=i?n(v,m,u,t,e,s):n(m,v,u,e,t,s);if(!(void 0===g?m===v||o(m,v,r,n,s):g)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return s.delete(e),s.delete(t),f},vw=xf,gw=B_,yw=hw,bw=mw,_w=Sc,ww=kc,Sw=Lc.exports,Ew=Xc,$w=1,Ow="[object Arguments]",Cw="[object Array]",Aw="[object Object]",Tw=Object.prototype.hasOwnProperty;var xw=function(e,t,r,n,o,s){var i=ww(e),a=ww(t),c=i?Cw:_w(e),l=a?Cw:_w(t),u=(c=c==Ow?Aw:c)==Aw,h=(l=l==Ow?Aw:l)==Aw,d=c==l;if(d&&Sw(e)){if(!Sw(t))return!1;i=!0,u=!1}if(d&&!u)return s||(s=new vw),i||Ew(e)?gw(e,t,r,n,o,s):yw(e,t,c,r,n,o,s);if(!(r&$w)){var f=u&&Tw.call(e,"__wrapped__"),p=h&&Tw.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,v=p?t.value():t;return s||(s=new vw),o(m,v,r,n,s)}}return!!d&&(s||(s=new vw),bw(e,t,r,n,o,s))},Pw=Ec;var jw=function e(t,r,n,o,s){return t===r||(null==t||null==r||!Pw(t)&&!Pw(r)?t!=t&&r!=r:xw(t,r,n,o,e,s))},Nw=xf,Rw=jw,kw=1,Iw=2;var Mw=function(e,t,r,n){var o=r.length,s=o,i=!n;if(null==e)return!s;for(e=Object(e);o--;){var a=r[o];if(i&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){var c=(a=r[o])[0],l=e[c],u=a[1];if(i&&a[2]){if(void 0===l&&!(c in e))return!1}else{var h=new Nw;if(n)var d=n(l,u,c,e,t,h);if(!(void 0===d?Rw(u,l,kw|Iw,n,h):d))return!1}}return!0},Dw=Ca;var Fw=function(e){return e==e&&!Dw(e)},Vw=Fw,Lw=oh;var Uw=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},zw=Mw,Bw=function(e){for(var t=Lw(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Vw(o)]}return t},Gw=Uw;var Hw=function(e){var t=Bw(e);return 1==t.length&&t[0][2]?Gw(t[0][0],t[0][1]):function(r){return r===e||zw(r,e,t)}},Ww=kc,qw=yl,Kw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yw=/^\w*$/;var Jw=function(e,t){if(Ww(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!qw(e))||(Yw.test(e)||!Kw.test(e)||null!=t&&e in Object(t))},Qw=kd,Zw="Expected a function";function Xw(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Zw);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var i=e.apply(this,n);return r.cache=s.set(o,i)||s,i};return r.cache=new(Xw.Cache||Qw),r}Xw.Cache=Qw;var eS=Xw,tS=500;var rS=function(e){var t=eS(e,(function(e){return r.size===tS&&r.clear(),e})),r=t.cache;return t},nS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oS=/\\(\\)?/g,sS=rS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(nS,(function(e,r,n,o){t.push(n?o.replace(oS,"$1"):r||e)})),t})),iS=kc,aS=Jw,cS=sS,lS=Al;var uS=function(e,t){return iS(e)?e:aS(e,t)?[e]:cS(lS(e))},hS=yl,dS=1/0;var fS=function(e){if("string"==typeof e||hS(e))return e;var t=e+"";return"0"==t&&1/e==-dS?"-0":t},pS=uS,mS=fS;var vS=function(e,t){for(var r=0,n=(t=pS(t,e)).length;null!=e&&r<n;)e=e[mS(t[r++])];return r&&r==n?e:void 0},gS=vS;var yS=function(e,t,r){var n=null==e?void 0:gS(e,t);return void 0===n?r:n};var bS=uS,_S=Rc,wS=kc,SS=Wu,ES=Mc,$S=fS;var OS=function(e,t,r){for(var n=-1,o=(t=bS(t,e)).length,s=!1;++n<o;){var i=$S(t[n]);if(!(s=null!=e&&r(e,i)))break;e=e[i]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&ES(o)&&SS(i,o)&&(wS(e)||_S(e))},CS=function(e,t){return null!=e&&t in Object(e)},AS=OS;var TS=jw,xS=yS,PS=function(e,t){return null!=e&&AS(e,t,CS)},jS=Jw,NS=Fw,RS=Uw,kS=fS,IS=1,MS=2;var DS=vS;var FS=function(e){return function(t){return null==t?void 0:t[e]}},VS=function(e){return function(t){return DS(t,e)}},LS=Jw,US=fS;var zS=Hw,BS=function(e,t){return jS(e)&&NS(t)?RS(kS(e),t):function(r){var n=xS(r,e);return void 0===n&&n===t?PS(r,e):TS(t,n,IS|MS)}},GS=dh,HS=kc,WS=function(e){return LS(e)?FS(US(e)):VS(e)};var qS=function(e){return"function"==typeof e?e:null==e?GS:"object"==typeof e?HS(e)?BS(e[0],e[1]):zS(e):WS(e)},KS=dg,YS=qS,JS=1;var QS=function(e){return YS("function"==typeof e?e:KS(e,JS))},ZS=hh;var XS=function(e){return(null==e?0:e.length)?ZS(e,1):[]},eE=vh,tE=xh;var rE=function(e){return tE(eE(e,void 0,XS),e+"")},nE=v_,oE=rE((function(e,t){return nE(e,256,void 0,void 0,void 0,t)})),sE=pl,iE=Bf,aE=kc,cE=yl,lE=sS,uE=fS,hE=Al;var dE=Og,fE={ary:b_,assign:cm,clone:S_,curry:C_,forEach:sm,isArray:kc,isError:N_,isFunction:ka,isWeakMap:M_,iteratee:QS,keys:aa,rearg:oE,toInteger:Qb,toPath:function(e){return aE(e)?sE(e,uE):cE(e)?[e]:iE(lE(hE(e)))}};var pE=function(e,t,r){return dE(fE,e,t,r)},mE=dp,vE=uS,gE=Wu,yE=Ca,bE=fS;var _E=function(e,t,r,n){if(!yE(e))return e;for(var o=-1,s=(t=vE(t,e)).length,i=s-1,a=e;null!=a&&++o<s;){var c=bE(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=i){var u=a[c];void 0===(l=n?n(u,c,a):void 0)&&(l=yE(u)?u:gE(t[o+1])?[]:{})}mE(a,c,l),a=a[c]}return e},wE=_E;var SE=pE("set",(function(e,t,r){return null==e?e:wE(e,t,r)}));SE.placeholder=yg;var EE=SE,$E=Mf,OE=oh;var CE=function(e,t){return e&&$E(e,t,OE)},AE=Vc;var TE=function(e,t){return function(r,n){if(null==r)return r;if(!AE(r))return e(r,n);for(var o=r.length,s=t?o:-1,i=Object(r);(t?s--:++s<o)&&!1!==n(i[s],s,i););return r}},xE=TE(CE);var PE=function(e,t){var r=[];return xE(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},jE=dm,NE=PE,RE=qS,kE=kc;var IE=function(e,t){return(kE(e)?jE:NE)(e,RE(t))},ME=jw;var DE=function(e,t){return ME(e,t)},FE=yl;var VE=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],i=t(s);if(null!=i&&(void 0===a?i==i&&!FE(i):r(i,a)))var a=i,c=s}return c};var LE=VE,UE=function(e,t){return e>t},zE=qS;var BE=function(e,t){return e&&e.length?LE(e,zE(t),UE):void 0},GE=Oa,HE=kc,WE=Ec,qE="[object String]";var KE=pl;var YE=function(e,t){return KE(t,(function(t){return e[t]}))},JE=oh;var QE=Wd,ZE=Vc,XE=function(e){return"string"==typeof e||!HE(e)&&WE(e)&&GE(e)==qE},e$=Qb,t$=function(e){return null==e?[]:YE(e,JE(e))},r$=Math.max;var n$=function(e,t,r,n){e=ZE(e)?e:t$(e),r=r&&!n?e$(r):0;var o=e.length;return r<0&&(r=r$(o+r,0)),XE(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&QE(e,t,r)>-1},o$=qS,s$=Vc,i$=oh;var a$=function(e){return function(t,r,n){var o=Object(t);if(!s$(t)){var s=o$(r);t=i$(t),r=function(e){return s(o[e],e,o)}}var i=e(t,r,n);return i>-1?o[s?t[i]:i]:void 0}},c$=Ud,l$=qS,u$=Qb,h$=Math.max;var d$=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:u$(r);return o<0&&(o=h$(n+o,0)),c$(e,l$(t),o)},f$=a$(d$),p$=Math.ceil,m$=Math.max;var v$=function(e,t,r,n){for(var o=-1,s=m$(p$((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i},g$=v$,y$=Xp,b$=Yb;var _$=function(e){return function(t,r,n){return n&&"number"!=typeof n&&y$(t,r,n)&&(r=n=void 0),t=b$(t),void 0===r?(r=t,t=0):r=b$(r),n=void 0===n?t<r?1:-1:b$(n),g$(t,r,n,e)}}(),w$=Object.prototype.hasOwnProperty;var S$=function(e,t){return null!=e&&w$.call(e,t)},E$=OS;var $$=function(e,t){return null!=e&&E$(e,t,S$)},O$={exports:{}},C$={},A$={},T$={},x$={},P$={},j$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)a(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const s=new n("+");function i(e,...t){const r=[l(e[0])];let o=0;for(;o<t.length;)r.push(s),a(r,t[o]),r.push(s,l(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function a(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:l(Array.isArray(o)?o.join(","):o))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=a,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new n(l(e))},e.safeStringify=l,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(j$);var N$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=j$;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class s extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=s;const i=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:t.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[o];if(i){const e=i.get(s);if(e)return e}else i=this._values[o]=new Map;i.set(s,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(o,s,i={},a){let c=t.nil;for(const l in o){const u=o[l];if(!u)continue;const h=i[l]=i[l]||new Map;u.forEach((o=>{if(h.has(o))return;h.set(o,n.Started);let i=s(o);if(i){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(o)))throw new r(o);c=t._`${c}${i}${this.opts._n}`}h.set(o,n.Completed)}))}return c}}}(N$),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=j$,r=N$;var n=j$;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=N$;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return T(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class d extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(P(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class p extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends f{}class v extends p{}v.kind="else";class g extends p{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(j(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}g.kind="if";class y extends p{}y.kind="for";class b extends y{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends y{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${t} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends y{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class S extends p{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class E extends f{render(e){return"return "+super.render(e)}}E.kind="return";class $ extends p{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends p{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class C extends p{render(e){return"finally"+super.render(e)}}C.kind="finally";function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function T(e,r){return r instanceof t._CodeOrName?A(e,r.names):e}function x(e,r,n){return e instanceof t.Name?s(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=s(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var o;function s(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function P(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${I(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new i(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new d(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new b(e),t)}forRange(e,t,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const i=this._scope.toName(e);return this._for(new _(s,i,t,n),(()=>o(i)))}forOf(e,n,o,s=r.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(i,t._`${e}[${r}]`),o(i)}))}return this._for(new w("of",s,i,n),(()=>o(i)))}forIn(e,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const i=this._scope.toName(e);return this._for(new w("in",s,i,n),(()=>o(i)))}endFor(){return this._endBlockNode(y)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new $;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return r&&(this._currNode=n.finally=new C,this.code(r)),this._endBlockNode(O,C)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new S(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=j;const N=k(e.operators.AND);e.and=function(...e){return e.reduce(N)};const R=k(e.operators.OR);function k(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${I(r)} ${e} ${I(n)}`}function I(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(R)}}(P$);var R$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=P$,r=j$;function n(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||d(e,`unknown keyword: "${r}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function i(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function a({mergeNames:e,mergeToName:r,mergeValues:n,resultToName:o}){return(s,i,a,c)=>{const l=void 0===a?i:a instanceof t.Name?(i instanceof t.Name?e(s,i,a):r(s,i,a),a):i instanceof t.Name?(r(s,a,i),i):n(i,a);return c!==t.Name||l instanceof t.Name?l:o(s,l)}}function c(e,r){if(!0===r)return e.var("props",!0);const n=e.var("props",t._`{}`);return void 0!==r&&l(e,n,r),n}function l(e,r,n){Object.keys(n).forEach((n=>e.assign(t._`${r}${(0,t.getProperty)(n)}`,!0)))}e.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!o(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=o,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:r},n,o,s){if(!s){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return t._`${n}`}return t._`${e}${r}${(0,t.getProperty)(o)}`},e.unescapeFragment=function(e){return i(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=i,e.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},e.mergeEvaluated={props:a({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>{e.if(t._`${r} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,t._`${n} || {}`).code(t._`Object.assign(${n}, ${r})`)))})),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>{!0===r?e.assign(n,!0):(e.assign(n,t._`${n} || {}`),l(e,n,r))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:c}),items:a({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>e.assign(n,t._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`))),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>e.assign(n,!0===r||t._`${n} > ${r} ? ${n} : ${r}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=c,e.setEvaluated=l;const u={};var h;function d(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h=e.Type||(e.Type={})),e.getErrorPath=function(e,r,n){if(e instanceof t.Name){const o=r===h.Num;return n?o?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:o?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,t.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=d}(R$);var k$={};Object.defineProperty(k$,"__esModule",{value:!0});const I$=P$,M$={data:new I$.Name("data"),valCxt:new I$.Name("valCxt"),instancePath:new I$.Name("instancePath"),parentData:new I$.Name("parentData"),parentDataProperty:new I$.Name("parentDataProperty"),rootData:new I$.Name("rootData"),dynamicAnchors:new I$.Name("dynamicAnchors"),vErrors:new I$.Name("vErrors"),errors:new I$.Name("errors"),this:new I$.Name("this"),self:new I$.Name("self"),scope:new I$.Name("scope"),json:new I$.Name("json"),jsonPos:new I$.Name("jsonPos"),jsonLen:new I$.Name("jsonLen"),jsonPart:new I$.Name("jsonPart")};k$.default=M$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=P$,r=R$,n=k$;function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${o}]`)),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function s(e,r){const{gen:n,validateName:o,schemaEnv:s}=e;s.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,i,c){const{it:l}=r,{gen:u,compositeRule:h,allErrors:d}=l,f=a(r,n,i);(null!=c?c:h||d)?o(u,f):s(l,t._`[${f}]`)},e.reportExtraError=function(t,r=e.keywordError,i){const{it:c}=t,{gen:l,compositeRule:u,allErrors:h}=c;o(l,a(t,r,i)),u||h||s(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:s,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",i,n.default.errors,(i=>{e.const(c,t._`${n.default.vErrors}[${i}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${c}.schema`,o),e.assign(t._`${c}.data`,s))}))};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,o){const{createErrors:s}=e.it;return!1===s?t._`{}`:function(e,r,o={}){const{gen:s,it:a}=e,u=[c(a,o),l(e,o)];return function(e,{params:r,message:o},s){const{keyword:a,data:c,schemaValue:l,it:u}=e,{opts:h,propertyName:d,topSchemaRef:f,schemaPath:p}=u;s.push([i.keyword,a],[i.params,"function"==typeof r?r(e):r||t._`{}`]),h.messages&&s.push([i.message,"function"==typeof o?o(e):o]);h.verbose&&s.push([i.schema,l],[i.parentSchema,t._`${f}${p}`],[n.default.data,c]);d&&s.push([i.propertyName,d])}(e,r,u),s.object(...u)}(e,r,o)}function c({errorPath:e},{instancePath:o}){const s=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,s)]}function l({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:s}){let a=s?n:t.str`${n}/${e}`;return o&&(a=t.str`${a}${(0,r.getErrorPath)(o,r.Type.Str)}`),[i.schemaPath,a]}}(x$),Object.defineProperty(T$,"__esModule",{value:!0}),T$.boolOrEmptySchema=T$.topBoolOrEmptySchema=void 0;const D$=x$,F$=P$,V$=k$,L$={message:"boolean schema is false"};function U$(e,t){const{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,D$.reportError)(o,L$,void 0,t)}T$.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?U$(e,!1):"object"==typeof r&&!0===r.$async?t.return(V$.default.data):(t.assign(F$._`${n}.errors`,null),t.return(!0))},T$.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),U$(e)):r.var(t,!0)};var z$={},B$={};Object.defineProperty(B$,"__esModule",{value:!0}),B$.getRules=B$.isJSONType=void 0;const G$=new Set(["string","number","integer","boolean","null","object","array"]);B$.isJSONType=function(e){return"string"==typeof e&&G$.has(e)},B$.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var H$={};function W$(e,t){return t.rules.some((t=>q$(e,t)))}function q$(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(H$,"__esModule",{value:!0}),H$.shouldUseRule=H$.shouldUseGroup=H$.schemaHasRulesForType=void 0,H$.schemaHasRulesForType=function({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&W$(e,n)},H$.shouldUseGroup=W$,H$.shouldUseRule=q$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=B$,r=H$,n=x$,o=P$,s=R$;var i;function a(e){const r=Array.isArray(e)?e:e?[e]:[];if(r.every(t.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(i=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){const t=a(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=a,e.coerceAndCheckDataType=function(e,t){const{gen:n,data:s,opts:a}=e,l=function(e,t){return t?e.filter((e=>c.has(e)||"array"===t&&"array"===e)):[]}(t,a.coerceTypes),h=t.length>0&&!(0===l.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(h){const r=u(t,s,a.strictNumbers,i.Wrong);n.if(r,(()=>{l.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,a=n.let("dataType",o._`typeof ${s}`),l=n.let("coerced",o._`undefined`);"array"===i.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,o._`${s}[0]`).assign(a,o._`typeof ${s}`).if(u(t,s,i.strictNumbers),(()=>n.assign(l,s)))));n.if(o._`${l} !== undefined`);for(const e of r)(c.has(e)||"array"===e&&"array"===i.coerceTypes)&&h(e);function h(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(l,o._`"" + ${s}`).elseIf(o._`${s} === null`).assign(l,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${s} === null
|
|
16
|
-
|| (${a} == "string" && ${s} && ${s} == +${s})`).assign(l,o._`+${s}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${s} === null
|
|
17
|
-
|| (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(l,o._`+${s}`);case"boolean":return void n.elseIf(o._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(l,!1).elseIf(o._`${s} === "true" || ${s} === 1`).assign(l,!0);case"null":return n.elseIf(o._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(l,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number"
|
|
18
|
-
|| ${a} === "boolean" || ${s} === null`).assign(l,o._`[${s}]`)}}n.else(),d(e),n.endIf(),n.if(o._`${l} !== undefined`,(()=>{n.assign(s,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,l)}))}(e,t,l):d(e)}))}return h};const c=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=i.Correct){const s=n===i.Correct?o.operators.EQ:o.operators.NEQ;let a;switch(e){case"null":return o._`${t} ${s} null`;case"array":a=o._`Array.isArray(${t})`;break;case"object":a=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=c(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=c();break;default:return o._`typeof ${t} ${s} ${e}`}return n===i.Correct?a:(0,o.not)(a);function c(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function u(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let i;const a=(0,s.toHash)(e);if(a.array&&a.object){const e=o._`typeof ${t} != "object"`;i=a.null?e:o._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=o.nil;a.number&&delete a.integer;for(const e in a)i=(0,o.and)(i,l(e,t,r,n));return i}e.checkDataType=l,e.checkDataTypes=u;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,h)}e.reportTypeError=d}(z$);var K$={};Object.defineProperty(K$,"__esModule",{value:!0}),K$.assignDefaults=void 0;const Y$=P$,J$=R$;function Q$(e,t,r){const{gen:n,compositeRule:o,data:s,opts:i}=e;if(void 0===r)return;const a=Y$._`${s}${(0,Y$.getProperty)(t)}`;if(o)return void(0,J$.checkStrictMode)(e,`default is ignored for: ${a}`);let c=Y$._`${a} === undefined`;"empty"===i.useDefaults&&(c=Y$._`${c} || ${a} === null || ${a} === ""`),n.if(c,Y$._`${a} = ${(0,Y$.stringify)(r)}`)}K$.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)Q$(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>Q$(e,r,t.default)))};var Z$={},X$={};Object.defineProperty(X$,"__esModule",{value:!0}),X$.validateUnion=X$.validateArray=X$.usePattern=X$.callValidateCode=X$.schemaProperties=X$.allSchemaProperties=X$.noPropertyInData=X$.propertyInData=X$.isOwnProperty=X$.hasPropFunc=X$.reportMissingProp=X$.checkMissingProp=X$.checkReportMissingProp=void 0;const eO=P$,tO=R$,rO=k$,nO=R$;function oO(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:eO._`Object.prototype.hasOwnProperty`})}function sO(e,t,r){return eO._`${oO(e)}.call(${t}, ${r})`}function iO(e,t,r,n){const o=eO._`${t}${(0,eO.getProperty)(r)} === undefined`;return n?(0,eO.or)(o,(0,eO.not)(sO(e,t,r))):o}function aO(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}X$.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:o}=e;r.if(iO(r,n,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:eO._`${t}`},!0),e.error()}))},X$.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,o){return(0,eO.or)(...n.map((n=>(0,eO.and)(iO(e,t,n,r.ownProperties),eO._`${o} = ${n}`))))},X$.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},X$.hasPropFunc=oO,X$.isOwnProperty=sO,X$.propertyInData=function(e,t,r,n){const o=eO._`${t}${(0,eO.getProperty)(r)} !== undefined`;return n?eO._`${o} && ${sO(e,t,r)}`:o},X$.noPropertyInData=iO,X$.allSchemaProperties=aO,X$.schemaProperties=function(e,t){return aO(t).filter((r=>!(0,tO.alwaysValidSchema)(e,t[r])))},X$.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,l){const u=l?eO._`${e}, ${t}, ${n}${o}`:t,h=[[rO.default.instancePath,(0,eO.strConcat)(rO.default.instancePath,s)],[rO.default.parentData,i.parentData],[rO.default.parentDataProperty,i.parentDataProperty],[rO.default.rootData,rO.default.rootData]];i.opts.dynamicRef&&h.push([rO.default.dynamicAnchors,rO.default.dynamicAnchors]);const d=eO._`${u}, ${r.object(...h)}`;return c!==eO.nil?eO._`${a}.call(${c}, ${d})`:eO._`${a}(${d})`};const cO=eO._`new RegExp`;X$.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:eO._`${"new RegExp"===o.code?cO:(0,nO.useFunc)(e,o)}(${r}, ${n})`})},X$.validateArray=function(e){const{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return i((()=>t.assign(e,!1))),e}return t.var(s,!0),i((()=>t.break())),s;function i(o){const i=t.const("len",eO._`${r}.length`);t.forRange("i",0,i,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:tO.Type.Num},s),t.if((0,eO.not)(s),o)}))}},X$.validateUnion=function(e){const{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,tO.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},i);t.assign(s,eO._`${s} || ${i}`);e.mergeValidEvaluated(a,i)||t.if((0,eO.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))},Object.defineProperty(Z$,"__esModule",{value:!0}),Z$.validateKeywordUsage=Z$.validSchemaType=Z$.funcKeywordCode=Z$.macroKeywordCode=void 0;const lO=P$,uO=k$,hO=X$,dO=x$;function fO(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,lO._`${n.parentData}[${n.parentDataProperty}]`)))}function pO(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,lO.stringify)(r)})}Z$.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),c=pO(r,n,a);!1!==i.opts.validateSchema&&i.self.validateSchema(a,!0);const l=r.name("valid");e.subschema({schema:a,schemaPath:lO.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},Z$.funcKeywordCode=function(e,t){var r;const{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(c,t);const l=!a&&t.compile?t.compile.call(c.self,s,i,c):t.validate,u=pO(n,o,l),h=n.let("valid");function d(r=(t.async?lO._`await `:lO.nil)){const o=c.opts.passContext?uO.default.this:uO.default.self,s=!("compile"in t&&!a||!1===t.schema);n.assign(h,lO._`${r}${(0,hO.callValidateCode)(e,u,o,s)}`,t.modifying)}function f(e){var r;n.if((0,lO.not)(null!==(r=t.valid)&&void 0!==r?r:h),e)}e.block$data(h,(function(){if(!1===t.errors)d(),t.modifying&&fO(e),f((()=>e.error()));else{const r=t.async?function(){const e=n.let("ruleErrs",null);return n.try((()=>d(lO._`await `)),(t=>n.assign(h,!1).if(lO._`${t} instanceof ${c.ValidationError}`,(()=>n.assign(e,lO._`${t}.errors`)),(()=>n.throw(t))))),e}():function(){const e=lO._`${u}.errors`;return n.assign(e,null),d(lO.nil),e}();t.modifying&&fO(e),f((()=>function(e,t){const{gen:r}=e;r.if(lO._`Array.isArray(${t})`,(()=>{r.assign(uO.default.vErrors,lO._`${uO.default.vErrors} === null ? ${t} : ${uO.default.vErrors}.concat(${t})`).assign(uO.default.errors,lO._`${uO.default.vErrors}.length`),(0,dO.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:h)},Z$.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},Z$.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const i=o.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}};var mO={};Object.defineProperty(mO,"__esModule",{value:!0}),mO.extendSubschemaMode=mO.extendSubschemaData=mO.getSubschema=void 0;const vO=P$,gO=R$;mO.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(void 0!==t&&void 0!==n)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const n=e.schema[t];return void 0===r?{schema:n,schemaPath:vO._`${e.schemaPath}${(0,vO.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:vO._`${e.schemaPath}${(0,vO.getProperty)(t)}${(0,vO.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,gO.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===o||void 0===s||void 0===i)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},mO.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(void 0!==r){const{errorPath:o,dataPathArr:s,opts:i}=t;c(a.let("data",vO._`${t.data}${(0,vO.getProperty)(r)}`,!0)),e.errorPath=vO.str`${o}${(0,gO.getErrorPath)(r,n,i.jsPropertySyntax)}`,e.parentDataProperty=vO._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}if(void 0!==o){c(o instanceof vO.Name?o:a.let("data",o,!0)),void 0!==i&&(e.propertyName=i)}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}s&&(e.dataTypes=s)},mO.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r};var yO={},bO=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;0!=o--;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r},_O={exports:{}},wO=_O.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),SO(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function SO(e,t,r,n,o,s,i,a,c,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in t(n,o,s,i,a,c,l),n){var h=n[u];if(Array.isArray(h)){if(u in wO.arrayKeywords)for(var d=0;d<h.length;d++)SO(e,t,r,h[d],o+"/"+u+"/"+d,s,o,u,n,d)}else if(u in wO.propsKeywords){if(h&&"object"==typeof h)for(var f in h)SO(e,t,r,h[f],o+"/"+u+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,u,n,f)}else(u in wO.keywords||e.allKeys&&!(u in wO.skipKeywords))&&SO(e,t,r,h,o+"/"+u,s,o,u,n)}r(n,o,s,i,a,c,l)}}wO.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},wO.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},wO.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},wO.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Object.defineProperty(yO,"__esModule",{value:!0}),yO.getSchemaRefs=yO.resolveUrl=yO.normalizeId=yO._getFullPath=yO.getFullPath=yO.inlineRef=void 0;const EO=R$,$O=bO,OO=_O.exports,CO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);yO.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!TO(e):!!t&&xO(e)<=t)};const AO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function TO(e){for(const t in e){if(AO.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(TO))return!0;if("object"==typeof r&&TO(r))return!0}return!1}function xO(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!CO.has(r)&&("object"==typeof e[r]&&(0,EO.eachItem)(e[r],(e=>t+=xO(e))),t===1/0))return 1/0}return t}function PO(e,t="",r){!1!==r&&(t=RO(t));const n=e.parse(t);return jO(e,n)}function jO(e,t){return e.serialize(t).split("#")[0]+"#"}yO.getFullPath=PO,yO._getFullPath=jO;const NO=/#\/?$/;function RO(e){return e?e.replace(NO,""):""}yO.normalizeId=RO,yO.resolveUrl=function(e,t,r){return r=RO(r),e.resolve(t,r)};const kO=/^[a-z_][-a-z0-9._]*$/i;yO.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,o=RO(e[r]||t),s={"":o},i=PO(n,o,!1),a={},c=new Set;return OO(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const h=i+t;let d=s[o];function f(t){const r=this.opts.uriResolver.resolve;if(t=RO(d?r(d,t):t),c.has(t))throw u(t);c.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==RO(h)&&("#"===t[0]?(l(e,a[t],t),a[t]=e):this.refs[t]=h),t}function p(e){if("string"==typeof e){if(!kO.test(e))throw new Error(`invalid anchor "${e}"`);f.call(this,`#${e}`)}}"string"==typeof e[r]&&(d=f.call(this,e[r])),p.call(this,e.$anchor),p.call(this,e.$dynamicAnchor),s[t]=d})),a;function l(e,t,r){if(void 0!==t&&!$O(e,t))throw u(r)}function u(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Object.defineProperty(A$,"__esModule",{value:!0}),A$.getData=A$.KeywordCxt=A$.validateFunctionCode=void 0;const IO=T$,MO=z$,DO=H$,FO=z$,VO=K$,LO=Z$,UO=mO,zO=P$,BO=k$,GO=yO,HO=R$,WO=x$;function qO({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,zO._`${BO.default.data}, ${BO.default.valCxt}`,n.$async,(()=>{e.code(zO._`"use strict"; ${KO(r,o)}`),function(e,t){e.if(BO.default.valCxt,(()=>{e.var(BO.default.instancePath,zO._`${BO.default.valCxt}.${BO.default.instancePath}`),e.var(BO.default.parentData,zO._`${BO.default.valCxt}.${BO.default.parentData}`),e.var(BO.default.parentDataProperty,zO._`${BO.default.valCxt}.${BO.default.parentDataProperty}`),e.var(BO.default.rootData,zO._`${BO.default.valCxt}.${BO.default.rootData}`),t.dynamicRef&&e.var(BO.default.dynamicAnchors,zO._`${BO.default.valCxt}.${BO.default.dynamicAnchors}`)}),(()=>{e.var(BO.default.instancePath,zO._`""`),e.var(BO.default.parentData,zO._`undefined`),e.var(BO.default.parentDataProperty,zO._`undefined`),e.var(BO.default.rootData,BO.default.data),t.dynamicRef&&e.var(BO.default.dynamicAnchors,zO._`{}`)}))}(e,o),e.code(s)})):e.func(t,zO._`${BO.default.data}, ${function(e){return zO._`{${BO.default.instancePath}="", ${BO.default.parentData}, ${BO.default.parentDataProperty}, ${BO.default.rootData}=${BO.default.data}${e.dynamicRef?zO._`, ${BO.default.dynamicAnchors}={}`:zO.nil}}={}`}(o)}`,n.$async,(()=>e.code(KO(r,o)).code(s)))}function KO(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?zO._`/*# sourceURL=${r} */`:zO.nil}function YO(e,t){QO(e)&&(ZO(e),JO(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&eC(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,GO.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",BO.default.errors);XO(e,s),n.var(t,zO._`${s} === ${BO.default.errors}`)}(e,t):(0,IO.boolOrEmptySchema)(e,t)}function JO({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function QO(e){return"boolean"!=typeof e.schema}function ZO(e){(0,HO.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,HO.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function XO(e,t){if(e.opts.jtd)return tC(e,[],!1,t);const r=(0,MO.getSchemaTypes)(e.schema);tC(e,r,!(0,MO.coerceAndCheckDataType)(e,r),t)}function eC({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const s=r.$comment;if(!0===o.$comment)e.code(zO._`${BO.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){const r=zO.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(zO._`${BO.default.self}.opts.$comment(${s}, ${r}, ${o}.schema)`)}}function tC(e,t,r,n){const{gen:o,schema:s,data:i,allErrors:a,opts:c,self:l}=e,{RULES:u}=l;function h(l){(0,DO.shouldUseGroup)(s,l)&&(l.type?(o.if((0,FO.checkDataType)(l.type,i,c.strictNumbers)),rC(e,l),1===t.length&&t[0]===l.type&&r&&(o.else(),(0,FO.reportTypeError)(e)),o.endIf()):rC(e,l),a||o.if(zO._`${BO.default.errors} === ${n||0}`))}!s.$ref||!c.ignoreKeywordsWithRef&&(0,HO.schemaHasRulesButRef)(s,u)?(c.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{oC(e.dataTypes,t)||sC(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)oC(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&sC(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,DO.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>nC(t,e)))&&sC(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),o.block((()=>{for(const e of u.rules)h(e);h(u.post)}))):o.block((()=>aC(e,"$ref",u.all.$ref.definition)))}function rC(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,VO.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,DO.shouldUseRule)(n,r)&&aC(e,r.keyword,r.definition,t.type)}))}function nC(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function oC(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function sC(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,HO.checkStrictMode)(e,t,e.opts.strictTypes)}A$.validateFunctionCode=function(e){QO(e)&&(ZO(e),JO(e))?function(e){const{schema:t,opts:r,gen:n}=e;qO(e,(()=>{r.$comment&&t.$comment&&eC(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,HO.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(BO.default.vErrors,null),n.let(BO.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",zO._`${r}.evaluated`),t.if(zO._`${e.evaluated}.dynamicProps`,(()=>t.assign(zO._`${e.evaluated}.props`,zO._`undefined`))),t.if(zO._`${e.evaluated}.dynamicItems`,(()=>t.assign(zO._`${e.evaluated}.items`,zO._`undefined`)))}(e),XO(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if(zO._`${BO.default.errors} === 0`,(()=>t.return(BO.default.data)),(()=>t.throw(zO._`new ${o}(${BO.default.vErrors})`))):(t.assign(zO._`${n}.errors`,BO.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof zO.Name&&e.assign(zO._`${t}.props`,r);n instanceof zO.Name&&e.assign(zO._`${t}.items`,n)}(e),t.return(zO._`${BO.default.errors} === 0`))}(e)}))}(e):qO(e,(()=>(0,IO.topBoolOrEmptySchema)(e)))};class iC{constructor(e,t,r){if((0,LO.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,HO.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",uC(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,LO.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",BO.default.errors))}result(e,t,r){this.failResult((0,zO.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,zO.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(zO._`${t} !== undefined && (${(0,zO.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?WO.reportExtraError:WO.reportError)(this,this.def.error,t)}$dataError(){(0,WO.reportError)(this,this.def.$dataError||WO.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,WO.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=zO.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=zO.nil,t=zO.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:s}=this;r.if((0,zO.or)(zO._`${n} === undefined`,t)),e!==zO.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==zO.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,zO.or)(function(){if(r.length){if(!(t instanceof zO.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return zO._`${(0,FO.checkDataTypes)(e,t,o.opts.strictNumbers,FO.DataType.Wrong)}`}return zO.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return zO._`!${r}(${t})`}return zO.nil}())}subschema(e,t){const r=(0,UO.getSubschema)(this.it,e);(0,UO.extendSubschemaData)(r,this.it,e),(0,UO.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return YO(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=HO.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=HO.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,zO.Name))),!0}}function aC(e,t,r,n){const o=new iC(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,LO.funcKeywordCode)(o,r):"macro"in r?(0,LO.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,LO.funcKeywordCode)(o,r)}A$.KeywordCxt=iC;const cC=/^\/(?:[^~]|~0|~1)*$/,lC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function uC(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(""===e)return BO.default.rootData;if("/"===e[0]){if(!cC.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=BO.default.rootData}else{const i=lC.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(o=i[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=r[t-a],!o)return s}let i=s;const a=o.split("/");for(const e of a)e&&(s=zO._`${s}${(0,zO.getProperty)((0,HO.unescapeJsonPointer)(e))}`,i=zO._`${i} && ${s}`);return i;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}A$.getData=uC;var hC={};Object.defineProperty(hC,"__esModule",{value:!0});class dC extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}hC.default=dC;var fC={};Object.defineProperty(fC,"__esModule",{value:!0});const pC=yO;class mC extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,pC.resolveUrl)(e,t,r),this.missingSchema=(0,pC.normalizeId)((0,pC.getFullPath)(e,this.missingRef))}}fC.default=mC;var vC={};Object.defineProperty(vC,"__esModule",{value:!0}),vC.resolveSchema=vC.getCompilingSchema=vC.resolveRef=vC.compileSchema=vC.SchemaEnv=void 0;const gC=P$,yC=hC,bC=k$,_C=yO,wC=R$,SC=A$;class EC{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,_C.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function $C(e){const t=CC.call(this,e);if(t)return t;const r=(0,_C.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new gC.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s});let a;e.$async&&(a=i.scopeValue("Error",{ref:yC.default,code:gC._`require("ajv/dist/runtime/validation_error").default`}));const c=i.scopeName("validate");e.validateName=c;const l={gen:i,allErrors:this.opts.allErrors,data:bC.default.data,parentData:bC.default.parentData,parentDataProperty:bC.default.parentDataProperty,dataNames:[bC.default.data],dataPathArr:[gC.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,gC.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:gC.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:gC._`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,SC.validateFunctionCode)(l),i.optimize(this.opts.code.optimize);const t=i.toString();u=`${i.scopeRefs(bC.default.scope)}return ${t}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const r=new Function(`${bC.default.self}`,`${bC.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:c,validateCode:t,scopeValues:i._values}),this.opts.unevaluated){const{props:e,items:t}=l;r.evaluated={props:e instanceof gC.Name?void 0:e,items:t instanceof gC.Name?void 0:t,dynamicProps:e instanceof gC.Name,dynamicItems:t instanceof gC.Name},r.source&&(r.source.evaluated=(0,gC.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),t}finally{this._compilations.delete(e)}}function OC(e){return(0,_C.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:$C.call(this,e)}function CC(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function AC(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||TC.call(this,e,t)}function TC(e,t){const r=this.opts.uriResolver.parse(t),n=(0,_C._getFullPath)(this.opts.uriResolver,r);let o=(0,_C.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return PC.call(this,r,e);const s=(0,_C.normalizeId)(n),i=this.refs[s]||this.schemas[s];if("string"==typeof i){const t=TC.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return PC.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||$C.call(this,i),s===(0,_C.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,_C.resolveUrl)(this.opts.uriResolver,o,n)),new EC({schema:t,schemaId:r,root:e,baseId:o})}return PC.call(this,r,i)}}vC.SchemaEnv=EC,vC.compileSchema=$C,vC.resolveRef=function(e,t,r){var n;r=(0,_C.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let s=AC.call(this,e,r);if(void 0===s){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:i}=this.opts;o&&(s=new EC({schema:o,schemaId:i,root:e,baseId:t}))}return void 0!==s?e.refs[r]=OC.call(this,s):void 0},vC.getCompilingSchema=CC,vC.resolveSchema=TC;const xC=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function PC(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,wC.unescapeFragment)(n)];if(void 0===e)return;const o="object"==typeof(r=e)&&r[this.opts.schemaId];!xC.has(n)&&o&&(t=(0,_C.resolveUrl)(this.opts.uriResolver,t,o))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,wC.schemaHasRulesButRef)(r,this.RULES)){const e=(0,_C.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=TC.call(this,n,e)}const{schemaId:i}=this.opts;return s=s||new EC({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}var jC={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},NC={},RC={exports:{}};
|
|
19
|
-
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
20
|
-
!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function s(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function a(e){var n="[A-Za-z]",o="[0-9]",s=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+r("%[89A-Fa-f]"+s+"%"+s+s)+"|"+r("%"+s+s)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",a),l=e?"[\\uE000-\\uF8FF]":"[]",u=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(u,a,"[\\:]"))+"*");var h=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),d=r(h+"\\."+h+"\\."+h+"\\."+h),f=r(s+"{1,4}"),p=r(r(f+"\\:"+f)+"|"+d),m=r(r(f+"\\:")+"{6}"+p),v=r("\\:\\:"+r(f+"\\:")+"{5}"+p),g=r(r(f)+"?\\:\\:"+r(f+"\\:")+"{4}"+p),y=r(r(r(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+r(f+"\\:")+"{3}"+p),b=r(r(r(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+r(f+"\\:")+"{2}"+p),_=r(r(r(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),w=r(r(r(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),S=r(r(r(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),E=r(r(r(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),$=r([m,v,g,y,b,_,w,S,E].join("|")),O=r(r(u+"|"+i)+"+");r("[vV]"+s+"+\\."+t(u,a,"[\\:]")+"+"),r(r(i+"|"+t(u,a))+"*");var C=r(i+"|"+t(u,a,"[\\:\\@]"));return r(r(i+"|"+t(u,a,"[\\@]"))+"+"),r(r(C+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+$+")"+r(r("\\%25|\\%(?!"+s+"{2})")+"("+O+")")+"?\\]?$")}}var c=a(!1),l=a(!0),u=function(){function e(e,t){var r=[],n=!0,o=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,s=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},d=2147483647,f=36,p=1,m=26,v=38,g=700,y=72,b=128,_="-",w=/^xn--/,S=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,$={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=f-p,C=Math.floor,A=String.fromCharCode;function T(e){throw new RangeError($[e])}function x(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function P(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+x((e=e.replace(E,".")).split("."),t).join(".")}function j(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&o)<<10)+(1023&s)+65536):(t.push(o),r--)}else t.push(o)}return t}var N=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:f},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},k=function(e,t,r){var n=0;for(e=r?C(e/g):e>>1,e+=C(e/t);e>O*m>>1;n+=f)e=C(e/O);return C(n+(O+1)*e/(e+v))},I=function(e){var t=[],r=e.length,n=0,o=b,s=y,i=e.lastIndexOf(_);i<0&&(i=0);for(var a=0;a<i;++a)e.charCodeAt(a)>=128&&T("not-basic"),t.push(e.charCodeAt(a));for(var c=i>0?i+1:0;c<r;){for(var l=n,u=1,h=f;;h+=f){c>=r&&T("invalid-input");var v=N(e.charCodeAt(c++));(v>=f||v>C((d-n)/u))&&T("overflow"),n+=v*u;var g=h<=s?p:h>=s+m?m:h-s;if(v<g)break;var w=f-g;u>C(d/w)&&T("overflow"),u*=w}var S=t.length+1;s=k(n-l,S,0==l),C(n/S)>d-o&&T("overflow"),o+=C(n/S),n%=S,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},M=function(e){var t=[],r=(e=j(e)).length,n=b,o=0,s=y,i=!0,a=!1,c=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var h=l.value;h<128&&t.push(A(h))}}catch(e){a=!0,c=e}finally{try{!i&&u.return&&u.return()}finally{if(a)throw c}}var v=t.length,g=v;for(v&&t.push(_);g<r;){var w=d,S=!0,E=!1,$=void 0;try{for(var O,x=e[Symbol.iterator]();!(S=(O=x.next()).done);S=!0){var P=O.value;P>=n&&P<w&&(w=P)}}catch(e){E=!0,$=e}finally{try{!S&&x.return&&x.return()}finally{if(E)throw $}}var N=g+1;w-n>C((d-o)/N)&&T("overflow"),o+=(w-n)*N,n=w;var I=!0,M=!1,D=void 0;try{for(var F,V=e[Symbol.iterator]();!(I=(F=V.next()).done);I=!0){var L=F.value;if(L<n&&++o>d&&T("overflow"),L==n){for(var U=o,z=f;;z+=f){var B=z<=s?p:z>=s+m?m:z-s;if(U<B)break;var G=U-B,H=f-B;t.push(A(R(B+G%H,0))),U=C(G/H)}t.push(A(R(U,0))),s=k(o,N,g==v),o=0,++g}}}catch(e){M=!0,D=e}finally{try{!I&&V.return&&V.return()}finally{if(M)throw D}}++o,++n}return t.join("")},D=function(e){return P(e,(function(e){return w.test(e)?I(e.slice(4).toLowerCase()):e}))},F=function(e){return P(e,(function(e){return S.test(e)?"xn--"+M(e):e}))},V={version:"2.1.0",ucs2:{decode:j,encode:function(e){return String.fromCodePoint.apply(String,h(e))}},decode:I,encode:M,toASCII:F,toUnicode:D},L={};function U(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function z(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function B(e,t){function r(e){var r=z(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,U).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,U).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,U).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,U).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,U).replace(t.PCT_ENCODED,o)),e}function G(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(G).join("."):e}function W(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),o=n[1],s=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),a=u(i,2),c=a[0],l=a[1],h=l?l.split(":").map(G):[],d=c.split(":").map(G),f=t.IPV4ADDRESS.test(d[d.length-1]),p=f?7:8,m=d.length-p,v=Array(p),g=0;g<p;++g)v[g]=h[g]||d[m+g]||"";f&&(v[p-1]=H(v[p-1],t));var y=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],_=void 0;if(b&&b.length>1){var w=v.slice(0,b.index),S=v.slice(b.index+b.length);_=w.join(":")+"::"+S.join(":")}else _=v.join(":");return s&&(_+="%"+s),_}return e}var q=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,K=void 0==="".match(/(){0}/)[1];function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?l:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(q);if(o){K?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=W(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=L[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)B(r,n);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=V.toASCII(r.host.replace(n.PCT_ENCODED,z).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}B(r,c)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?l:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(W(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Z=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?l:c,n=[],o=L[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?V.toUnicode(e.host):V.toASCII(e.host.replace(r.PCT_ENCODED,z).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}B(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=J(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===s&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Y(re(e,r),r),t=Y(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Y(e,n),Y(t,n),n,!0),n)}function se(e,t){return"string"==typeof e?e=re(Y(e,t),t):"object"===n(e)&&(e=Y(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Y(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Y(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function ae(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:c.ESCAPE,U)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:c.PCT_ENCODED,z)}var le={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ue={scheme:"https",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize};function he(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=he(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(he(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),o=n[0],s=n[1];e.path=o&&"/"!==o?o:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},fe={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},pe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ve="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ve+"%"+ve+ve+"%"+ve+ve)+"|"+r("%[89A-Fa-f]"+ve+"%"+ve+ve)+"|"+r("%"+ve+ve)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),_e="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",we=new RegExp(me,"g"),Se=new RegExp(ge,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),$e=new RegExp(t("[^]",me,_e),"g"),Oe=$e;function Ce(e){var t=z(e);return t.match(we)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,s={},i=r.query.split("&"),a=0,c=i.length;a<c;++a){var l=i[a].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),h=0,d=u.length;h<d;++h)n.push(u[h]);break;case"subject":r.subject=ce(l[1],t);break;case"body":r.body=ce(l[1],t);break;default:o=!0,s[ce(l[0],t)]=ce(l[1],t)}}o&&(r.headers=s)}r.query=void 0;for(var f=0,p=n.length;f<p;++f){var m=n[f].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=V.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[f]=m.join("@")}return r},serialize:function(e,t){var r=e,n=s(e.to);if(n){for(var i=0,a=n.length;i<a;++i){var c=String(n[i]),l=c.lastIndexOf("@"),u=c.slice(0,l).replace(Se,Ce).replace(Se,o).replace(Ee,U),h=c.slice(l+1);try{h=t.iri?V.toUnicode(h):V.toASCII(ce(h,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=u+"@"+h}r.path=n.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var f=[];for(var p in d)d[p]!==pe[p]&&f.push(p.replace(Se,Ce).replace(Se,o).replace($e,U)+"="+d[p].replace(Se,Ce).replace(Se,o).replace(Oe,U));return f.length&&(r.query=f.join("&")),r}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",s=r[1].toLowerCase(),i=r[2],a=o+":"+(t.nid||s),c=L[a];n.nid=s,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),s=L[o];s&&(e=s.serialize(e,t));var i=e,a=e.nss;return i.path=(n||t.nid)+":"+a,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,je={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Pe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};L[le.scheme]=le,L[ue.scheme]=ue,L[de.scheme]=de,L[fe.scheme]=fe,L[Ae.scheme]=Ae,L[xe.scheme]=xe,L[je.scheme]=je,e.SCHEMES=L,e.pctEncChar=U,e.pctDecChars=z,e.parse=Y,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=se,e.equal=ie,e.escapeComponent=ae,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,RC.exports),Object.defineProperty(NC,"__esModule",{value:!0});const kC=RC.exports;kC.code='require("ajv/dist/runtime/uri").default',NC.default=kC,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=A$;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=P$;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=hC,o=fC,s=B$,i=vC,a=P$,c=yO,l=z$,u=R$,h=jC,d=NC,f=(e,t)=>new RegExp(e,t);f.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function b(e){var t,r,n,o,s,i,a,c,l,u,h,p,m,v,g,b,_,w,S,E,$,O,C,A,T;const x=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===P||void 0===P?1:P||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:f,R=null!==(o=e.uriResolver)&&void 0!==o?o:d.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:x)||void 0===i||i,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:x)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:x)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(h=e.strictTuples)&&void 0!==h?h:x)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=e.strictRequired)&&void 0!==m?m:x)&&void 0!==v&&v,code:e.code?{...e.code,optimize:j,regExp:N}:{optimize:j,regExp:N},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:y,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:y,meta:null===(_=e.meta)||void 0===_||_,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===($=e.addUsedSchema)||void 0===$||$,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(C=e.validateFormats)||void 0===C||C,unicodeRegExp:null===(A=e.unicodeRegExp)||void 0===A||A,int32range:null===(T=e.int32range)||void 0===T||T,uriResolver:R}}class _{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),w.call(this,v,e,"NOT SUPPORTED"),w.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=C.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new i.SchemaEnv({schema:{},schemaId:r});if(t=i.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(x.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>P.call(this,e))),this;N.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>P.call(this,e,n):e=>n.type.forEach((t=>P.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=o[e];n&&s&&(o[e]=k(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,c.normalizeId)(s||r);const u=c.getSchemaRefs.call(this,e,r);return l=new i.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:u}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,n="error"){for(const o in e){const s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function S(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function C(){const e={...this.opts};for(const t of p)delete e[t];return e}e.default=_,_.ValidationError=n.default,_.MissingRefError=o.default;const A={log(){},warn(){},error(){}};const T=/^[a-z_$][a-z0-9_$:-]*$/i;function x(e,t){const{RULES:r}=this;if((0,u.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!T.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function P(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=o?s.post:s.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?j.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function j(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=k(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(e){return{anyOf:[e,R]}}}(C$);var IC={},MC={},DC={};Object.defineProperty(DC,"__esModule",{value:!0});const FC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};DC.default=FC;var VC={};Object.defineProperty(VC,"__esModule",{value:!0}),VC.callRef=VC.getValidate=void 0;const LC=fC,UC=X$,zC=P$,BC=k$,GC=vC,HC=R$,WC={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:c}=n,{root:l}=s;if(("#"===r||"#/"===r)&&o===l.baseId)return function(){if(s===l)return KC(e,i,s,s.$async);const r=t.scopeValue("root",{ref:l});return KC(e,zC._`${r}.validate`,l,l.$async)}();const u=GC.resolveRef.call(c,l,o,r);if(void 0===u)throw new LC.default(n.opts.uriResolver,o,r);return u instanceof GC.SchemaEnv?function(t){const r=qC(e,t);KC(e,r,t,t.$async)}(u):function(n){const o=t.scopeValue("schema",!0===a.code.source?{ref:n,code:(0,zC.stringify)(n)}:{ref:n}),s=t.name("valid"),i=e.subschema({schema:n,dataTypes:[],schemaPath:zC.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(i),e.ok(s)}(u)}};function qC(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):zC._`${r.scopeValue("wrapper",{ref:t})}.validate`}function KC(e,t,r,n){const{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:c}=s,l=c.passContext?BC.default.this:zC.nil;function u(e){const t=zC._`${e}.errors`;o.assign(BC.default.vErrors,zC._`${BC.default.vErrors} === null ? ${t} : ${BC.default.vErrors}.concat(${t})`),o.assign(BC.default.errors,zC._`${BC.default.vErrors}.length`)}function h(e){var t;if(!s.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==s.props)if(n&&!n.dynamicProps)void 0!==n.props&&(s.props=HC.mergeEvaluated.props(o,n.props,s.props));else{const t=o.var("props",zC._`${e}.evaluated.props`);s.props=HC.mergeEvaluated.props(o,t,s.props,zC.Name)}if(!0!==s.items)if(n&&!n.dynamicItems)void 0!==n.items&&(s.items=HC.mergeEvaluated.items(o,n.items,s.items));else{const t=o.var("items",zC._`${e}.evaluated.items`);s.items=HC.mergeEvaluated.items(o,t,s.items,zC.Name)}}n?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");const r=o.let("valid");o.try((()=>{o.code(zC._`await ${(0,UC.callValidateCode)(e,t,l)}`),h(t),i||o.assign(r,!0)}),(e=>{o.if(zC._`!(${e} instanceof ${s.ValidationError})`,(()=>o.throw(e))),u(e),i||o.assign(r,!1)})),e.ok(r)}():e.result((0,UC.callValidateCode)(e,t,l),(()=>h(t)),(()=>u(t)))}VC.getValidate=qC,VC.callRef=KC,VC.default=WC,Object.defineProperty(MC,"__esModule",{value:!0});const YC=VC,JC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",DC.default,YC.default];MC.default=JC;var QC={},ZC={};Object.defineProperty(ZC,"__esModule",{value:!0});const XC=P$,eA=XC.operators,tA={maximum:{okStr:"<=",ok:eA.LTE,fail:eA.GT},minimum:{okStr:">=",ok:eA.GTE,fail:eA.LT},exclusiveMaximum:{okStr:"<",ok:eA.LT,fail:eA.GTE},exclusiveMinimum:{okStr:">",ok:eA.GT,fail:eA.LTE}},rA={message:({keyword:e,schemaCode:t})=>XC.str`must be ${tA[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>XC._`{comparison: ${tA[e].okStr}, limit: ${t}}`},nA={keyword:Object.keys(tA),type:"number",schemaType:"number",$data:!0,error:rA,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(XC._`${r} ${tA[t].fail} ${n} || isNaN(${r})`)}};ZC.default=nA;var oA={};Object.defineProperty(oA,"__esModule",{value:!0});const sA=P$,iA={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>sA.str`must be multiple of ${e}`,params:({schemaCode:e})=>sA._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?sA._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:sA._`${i} !== parseInt(${i})`;e.fail$data(sA._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};oA.default=iA;var aA={},cA={};function lA(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}Object.defineProperty(cA,"__esModule",{value:!0}),cA.default=lA,lA.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(aA,"__esModule",{value:!0});const uA=P$,hA=R$,dA=cA,fA={message:({keyword:e,schemaCode:t})=>uA.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>uA._`{limit: ${e}}`},pA={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:fA,code(e){const{keyword:t,data:r,schemaCode:n,it:o}=e,s="maxLength"===t?uA.operators.GT:uA.operators.LT,i=!1===o.opts.unicode?uA._`${r}.length`:uA._`${(0,hA.useFunc)(e.gen,dA.default)}(${r})`;e.fail$data(uA._`${i} ${s} ${n}`)}};aA.default=pA;var mA={};Object.defineProperty(mA,"__esModule",{value:!0});const vA=X$,gA=P$,yA={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>gA.str`must match pattern "${e}"`,params:({schemaCode:e})=>gA._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?gA._`(new RegExp(${o}, ${i}))`:(0,vA.usePattern)(e,n);e.fail$data(gA._`!${a}.test(${t})`)}};mA.default=yA;var bA={};Object.defineProperty(bA,"__esModule",{value:!0});const _A=P$,wA={message:({keyword:e,schemaCode:t})=>_A.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>_A._`{limit: ${e}}`},SA={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wA,code(e){const{keyword:t,data:r,schemaCode:n}=e,o="maxProperties"===t?_A.operators.GT:_A.operators.LT;e.fail$data(_A._`Object.keys(${r}).length ${o} ${n}`)}};bA.default=SA;var EA={};Object.defineProperty(EA,"__esModule",{value:!0});const $A=X$,OA=P$,CA=R$,AA={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>OA.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>OA._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&0===r.length)return;const c=r.length>=a.loopRequired;if(i.allErrors?function(){if(c||s)e.block$data(OA.nil,l);else for(const t of r)(0,$A.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(c||s){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(s,(0,$A.propertyInData)(t,o,r,a.ownProperties)),t.if((0,OA.not)(s),(()=>{e.error(),t.break()}))}),OA.nil)}(i,r))),e.ok(r)}else t.if((0,$A.checkMissingProp)(e,r,i)),(0,$A.reportMissingProp)(e,i),t.else()}(),a.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=i.schemaEnv.baseId+i.errSchemaPath;(0,CA.checkStrictMode)(i,`required property "${e}" is not defined at "${t}" (strictRequired)`,i.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,$A.noPropertyInData)(t,o,r,a.ownProperties),(()=>e.error()))}))}}};EA.default=AA;var TA={};Object.defineProperty(TA,"__esModule",{value:!0});const xA=P$,PA={message:({keyword:e,schemaCode:t})=>xA.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>xA._`{limit: ${e}}`},jA={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:PA,code(e){const{keyword:t,data:r,schemaCode:n}=e,o="maxItems"===t?xA.operators.GT:xA.operators.LT;e.fail$data(xA._`${r}.length ${o} ${n}`)}};TA.default=jA;var NA={},RA={};Object.defineProperty(RA,"__esModule",{value:!0});const kA=bO;kA.code='require("ajv/dist/runtime/equal").default',RA.default=kA,Object.defineProperty(NA,"__esModule",{value:!0});const IA=z$,MA=P$,DA=R$,FA=RA,VA={message:({params:{i:e,j:t}})=>MA.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>MA._`{i: ${e}, j: ${t}}`},LA={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:VA,code(e){const{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;const c=t.let("valid"),l=s.items?(0,IA.getSchemaTypes)(s.items):[];function u(n,o){const s=t.name("item"),i=(0,IA.checkDataTypes)(l,s,a.opts.strictNumbers,IA.DataType.Wrong),u=t.const("indices",MA._`{}`);t.for(MA._`;${n}--;`,(()=>{t.let(s,MA._`${r}[${n}]`),t.if(i,MA._`continue`),l.length>1&&t.if(MA._`typeof ${s} == "string"`,MA._`${s} += "_"`),t.if(MA._`typeof ${u}[${s}] == "number"`,(()=>{t.assign(o,MA._`${u}[${s}]`),e.error(),t.assign(c,!1).break()})).code(MA._`${u}[${s}] = ${n}`)}))}function h(n,o){const s=(0,DA.useFunc)(t,FA.default),i=t.name("outer");t.label(i).for(MA._`;${n}--;`,(()=>t.for(MA._`${o} = ${n}; ${o}--;`,(()=>t.if(MA._`${s}(${r}[${n}], ${r}[${o}])`,(()=>{e.error(),t.assign(c,!1).break(i)}))))))}e.block$data(c,(function(){const n=t.let("i",MA._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(c,!0),t.if(MA._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?u:h)(n,o)))}),MA._`${i} === false`),e.ok(c)}};NA.default=LA;var UA={};Object.defineProperty(UA,"__esModule",{value:!0});const zA=P$,BA=R$,GA=RA,HA={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>zA._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&"object"==typeof s?e.fail$data(zA._`!${(0,BA.useFunc)(t,GA.default)}(${r}, ${o})`):e.fail(zA._`${s} !== ${r}`)}};UA.default=HA;var WA={};Object.defineProperty(WA,"__esModule",{value:!0});const qA=P$,KA=R$,YA=RA,JA={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>qA._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&0===o.length)throw new Error("enum must have non-empty array");const a=o.length>=i.opts.loopEnum;let c;const l=()=>null!=c?c:c=(0,KA.useFunc)(t,YA.default);let u;if(a||n)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",s,(e=>t.if(qA._`${l()}(${r}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(o))throw new Error("ajv implementation error");const e=t.const("vSchema",s);u=(0,qA.or)(...o.map(((t,n)=>function(e,t){const n=o[t];return"object"==typeof n&&null!==n?qA._`${l()}(${r}, ${e}[${t}])`:qA._`${r} === ${n}`}(e,n))))}e.pass(u)}};WA.default=JA,Object.defineProperty(QC,"__esModule",{value:!0});const QA=oA,ZA=aA,XA=mA,eT=bA,tT=EA,rT=TA,nT=NA,oT=UA,sT=WA,iT=[ZC.default,QA.default,ZA.default,XA.default,eT.default,tT.default,rT.default,nT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},oT.default,sT.default];QC.default=iT;var aT={},cT={};Object.defineProperty(cT,"__esModule",{value:!0}),cT.validateAdditionalItems=void 0;const lT=P$,uT=R$,hT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>lT.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>lT._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?dT(e,n):(0,uT.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function dT(e,t){const{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;const a=r.const("len",lT._`${o}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(lT._`${a} <= ${t.length}`);else if("object"==typeof n&&!(0,uT.alwaysValidSchema)(i,n)){const n=r.var("valid",lT._`${a} <= ${t.length}`);r.if((0,lT.not)(n),(()=>function(n){r.forRange("i",t.length,a,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:uT.Type.Num},n),i.allErrors||r.if((0,lT.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}cT.validateAdditionalItems=dT,cT.default=hT;var fT={},pT={};Object.defineProperty(pT,"__esModule",{value:!0}),pT.validateTuple=void 0;const mT=P$,vT=R$,gT=X$,yT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return bT(e,"additionalItems",t);r.items=!0,(0,vT.alwaysValidSchema)(r,t)||e.ok((0,gT.validateArray)(e))}};function bT(e,t,r=e.schema){const{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;!function(e){const{opts:n,errSchemaPath:o}=a,s=r.length,c=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!c){const e=`"${i}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,vT.checkStrictMode)(a,e,n.strictTuples)}}(o),a.opts.unevaluated&&r.length&&!0!==a.items&&(a.items=vT.mergeEvaluated.items(n,r.length,a.items));const c=n.name("valid"),l=n.const("len",mT._`${s}.length`);r.forEach(((t,r)=>{(0,vT.alwaysValidSchema)(a,t)||(n.if(mT._`${l} > ${r}`,(()=>e.subschema({keyword:i,schemaProp:r,dataProp:r},c))),e.ok(c))}))}pT.validateTuple=bT,pT.default=yT,Object.defineProperty(fT,"__esModule",{value:!0});const _T=pT,wT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,_T.validateTuple)(e,"items")};fT.default=wT;var ST={};Object.defineProperty(ST,"__esModule",{value:!0});const ET=P$,$T=R$,OT=X$,CT=cT,AT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>ET.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ET._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,(0,$T.alwaysValidSchema)(n,t)||(o?(0,CT.validateAdditionalItems)(e,o):e.ok((0,OT.validateArray)(e)))}};ST.default=AT;var TT={};Object.defineProperty(TT,"__esModule",{value:!0});const xT=P$,PT=R$,jT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?xT.str`must contain at least ${e} valid item(s)`:xT.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?xT._`{minContains: ${e}}`:xT._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;let i,a;const{minContains:c,maxContains:l}=n;s.opts.next?(i=void 0===c?1:c,a=l):i=1;const u=t.const("len",xT._`${o}.length`);if(e.setParams({min:i,max:a}),void 0===a&&0===i)return void(0,PT.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==a&&i>a)return(0,PT.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,PT.alwaysValidSchema)(s,r)){let t=xT._`${u} >= ${i}`;return void 0!==a&&(t=xT._`${t} && ${u} <= ${a}`),void e.pass(t)}s.items=!0;const h=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);f(e,(()=>t.if(e,(()=>function(e){t.code(xT._`${e}++`),void 0===a?t.if(xT._`${e} >= ${i}`,(()=>t.assign(h,!0).break())):(t.if(xT._`${e} > ${a}`,(()=>t.assign(h,!1).break())),1===i?t.assign(h,!0):t.if(xT._`${e} >= ${i}`,(()=>t.assign(h,!0))))}(r)))))}function f(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:PT.Type.Num,compositeRule:!0},r),n()}))}void 0===a&&1===i?f(h,(()=>t.if(h,(()=>t.break())))):0===i?(t.let(h,!0),void 0!==a&&t.if(xT._`${o}.length > 0`,d)):(t.let(h,!1),d()),e.result(h,(()=>e.reset()))}};TT.default=jT;var NT={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=P$,r=R$,n=X$;e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
|
|
21
|
-
missingProperty: ${o},
|
|
22
|
-
depsCount: ${r},
|
|
23
|
-
deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),i(e,r)}};function s(e,r=e.schema){const{gen:o,data:s,it:i}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const c in r){const l=r[c];if(0===l.length)continue;const u=(0,n.propertyInData)(o,s,c,i.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),i.allErrors?o.if(u,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(o.if(t._`${u} && (${(0,n.checkMissingProp)(e,l,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function i(e,t=e.schema){const{gen:o,data:s,keyword:i,it:a}=e,c=o.name("valid");for(const l in t)(0,r.alwaysValidSchema)(a,t[l])||(o.if((0,n.propertyInData)(o,s,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>o.var(c,!0))),e.ok(c))}e.validatePropertyDeps=s,e.validateSchemaDeps=i,e.default=o}(NT);var RT={};Object.defineProperty(RT,"__esModule",{value:!0});const kT=P$,IT=R$,MT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>kT._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:o}=e;if((0,IT.alwaysValidSchema)(o,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,kT.not)(s),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(s)}};RT.default=MT;var DT={};Object.defineProperty(DT,"__esModule",{value:!0});const FT=X$,VT=P$,LT=k$,UT=R$,zT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>VT._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:c}=i;if(i.props=!0,"all"!==c.removeAdditional&&(0,UT.alwaysValidSchema)(i,r))return;const l=(0,FT.allSchemaProperties)(n.properties),u=(0,FT.allSchemaProperties)(n.patternProperties);function h(e){t.code(VT._`delete ${o}[${e}]`)}function d(n){if("all"===c.removeAdditional||c.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(a||t.break());if("object"==typeof r&&!(0,UT.alwaysValidSchema)(i,r)){const r=t.name("valid");"failing"===c.removeAdditional?(f(n,r,!1),t.if((0,VT.not)(r),(()=>{e.reset(),h(n)}))):(f(n,r),a||t.if((0,VT.not)(r),(()=>t.break())))}}}function f(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:UT.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",o,(r=>{l.length||u.length?t.if(function(r){let o;if(l.length>8){const e=(0,UT.schemaRefOrVal)(i,n.properties,"properties");o=(0,FT.isOwnProperty)(t,e,r)}else o=l.length?(0,VT.or)(...l.map((e=>VT._`${r} === ${e}`))):VT.nil;return u.length&&(o=(0,VT.or)(o,...u.map((t=>VT._`${(0,FT.usePattern)(e,t)}.test(${r})`)))),(0,VT.not)(o)}(r),(()=>d(r))):d(r)})),e.ok(VT._`${s} === ${LT.default.errors}`)}};DT.default=zT;var BT={};Object.defineProperty(BT,"__esModule",{value:!0});const GT=A$,HT=X$,WT=R$,qT=DT,KT={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&qT.default.code(new GT.KeywordCxt(s,qT.default,"additionalProperties"));const i=(0,HT.allSchemaProperties)(r);for(const e of i)s.definedProperties.add(e);s.opts.unevaluated&&i.length&&!0!==s.props&&(s.props=WT.mergeEvaluated.props(t,(0,WT.toHash)(i),s.props));const a=i.filter((e=>!(0,WT.alwaysValidSchema)(s,r[e])));if(0===a.length)return;const c=t.name("valid");for(const r of a)l(r)?u(r):(t.if((0,HT.propertyInData)(t,o,r,s.opts.ownProperties)),u(r),s.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(c);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c)}}};BT.default=KT;var YT={};Object.defineProperty(YT,"__esModule",{value:!0});const JT=X$,QT=P$,ZT=R$,XT=R$,ex={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,JT.allSchemaProperties)(r),c=a.filter((e=>(0,ZT.alwaysValidSchema)(s,r[e])));if(0===a.length||c.length===a.length&&(!s.opts.unevaluated||!0===s.props))return;const l=i.strictSchema&&!i.allowMatchingProperties&&o.properties,u=t.name("valid");!0===s.props||s.props instanceof QT.Name||(s.props=(0,XT.evaluatedPropsToName)(t,s.props));const{props:h}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,ZT.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function f(r){t.forIn("key",n,(n=>{t.if(QT._`${(0,JT.usePattern)(e,r)}.test(${n})`,(()=>{const o=c.includes(r);o||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:XT.Type.Str},u),s.opts.unevaluated&&!0!==h?t.assign(QT._`${h}[${n}]`,!0):o||s.allErrors||t.if((0,QT.not)(u),(()=>t.break()))}))}))}!function(){for(const e of a)l&&d(e),s.allErrors?f(e):(t.var(u,!0),f(e),t.if(u))}()}};YT.default=ex;var tx={};Object.defineProperty(tx,"__esModule",{value:!0});const rx=R$,nx={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,rx.alwaysValidSchema)(n,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};tx.default=nx;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});const sx={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:X$.validateUnion,error:{message:"must match a schema in anyOf"}};ox.default=sx;var ix={};Object.defineProperty(ix,"__esModule",{value:!0});const ax=P$,cx=R$,lx={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>ax._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;const s=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block((function(){s.forEach(((r,n)=>{let s;(0,cx.alwaysValidSchema)(o,r)?t.var(c,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&t.if(ax._`${c} && ${i}`).assign(i,!1).assign(a,ax._`[${a}, ${n}]`).else(),t.if(c,(()=>{t.assign(i,!0),t.assign(a,n),s&&e.mergeEvaluated(s,ax.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};ix.default=lx;var ux={};Object.defineProperty(ux,"__esModule",{value:!0});const hx=R$,dx={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,hx.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};ux.default=dx;var fx={};Object.defineProperty(fx,"__esModule",{value:!0});const px=P$,mx=R$,vx={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>px.str`must match "${e.ifClause}" schema`,params:({params:e})=>px._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,mx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const o=gx(n,"then"),s=gx(n,"else");if(!o&&!s)return;const i=t.let("valid",!0),a=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(t)}(),e.reset(),o&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(a,c("then",r),c("else",r))}else o?t.if(a,c("then")):t.if((0,px.not)(a),c("else"));function c(r,n){return()=>{const o=e.subschema({keyword:r},a);t.assign(i,a),e.mergeValidEvaluated(o,i),n?t.assign(n,px._`${r}`):e.setParams({ifClause:r})}}e.pass(i,(()=>e.error(!0)))}};function gx(e,t){const r=e.schema[t];return void 0!==r&&!(0,mx.alwaysValidSchema)(e,r)}fx.default=vx;var yx={};Object.defineProperty(yx,"__esModule",{value:!0});const bx=R$,_x={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,bx.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};yx.default=_x,Object.defineProperty(aT,"__esModule",{value:!0});const wx=cT,Sx=fT,Ex=pT,$x=ST,Ox=TT,Cx=NT,Ax=RT,Tx=DT,xx=BT,Px=YT,jx=tx,Nx=ox,Rx=ix,kx=ux,Ix=fx,Mx=yx;aT.default=function(e=!1){const t=[jx.default,Nx.default,Rx.default,kx.default,Ix.default,Mx.default,Ax.default,Tx.default,Cx.default,xx.default,Px.default];return e?t.push(Sx.default,$x.default):t.push(wx.default,Ex.default),t.push(Ox.default),t};var Dx={},Fx={};Object.defineProperty(Fx,"__esModule",{value:!0});const Vx=P$,Lx={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>Vx.str`must match format "${e}"`,params:({schemaCode:e})=>Vx._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:u,self:h}=a;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:h.formats,code:c.code.formats}),s=r.const("fDef",Vx._`${o}[${i}]`),a=r.let("fType"),l=r.let("format");r.if(Vx._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(a,Vx._`${s}.type || "string"`).assign(l,Vx._`${s}.validate`)),(()=>r.assign(a,Vx._`"string"`).assign(l,s))),e.fail$data((0,Vx.or)(!1===c.strictSchema?Vx.nil:Vx._`${i} && !${l}`,function(){const e=u.$async?Vx._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:Vx._`${l}(${n})`,r=Vx._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return Vx._`${l} && ${l} !== true && ${a} === ${t} && !${r}`}()))}():function(){const o=h.formats[s];if(!o)return void function(){if(!1===c.strictSchema)return void h.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===o)return;const[i,a,d]=function(e){const t=e instanceof RegExp?(0,Vx.regexpCode)(e):c.code.formats?Vx._`${c.code.formats}${(0,Vx.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,Vx._`${n}.validate`];return["string",e,n]}(o);i===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return Vx._`await ${d}(${n})`}return"function"==typeof a?Vx._`${d}(${n})`:Vx._`${d}.test(${n})`}())}())}};Fx.default=Lx,Object.defineProperty(Dx,"__esModule",{value:!0});const Ux=[Fx.default];Dx.default=Ux;var zx={};Object.defineProperty(zx,"__esModule",{value:!0}),zx.contentVocabulary=zx.metadataVocabulary=void 0,zx.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],zx.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(IC,"__esModule",{value:!0});const Bx=QC,Gx=aT,Hx=Dx,Wx=zx,qx=[MC.default,Bx.default,(0,Gx.default)(),Hx.default,Wx.metadataVocabulary,Wx.contentVocabulary];IC.default=qx;var Kx={},Yx={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(Yx),Object.defineProperty(Kx,"__esModule",{value:!0});const Jx=P$,Qx=Yx,Zx=vC,Xx=R$,eP={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Qx.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>Jx._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const c=t.let("valid",!1),l=t.const("tag",Jx._`${r}${(0,Jx.getProperty)(a)}`);function u(r){const n=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(o,Jx.Name),n}t.if(Jx._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=c(o);let n=!0;for(let t=0;t<i.length;t++){let o=i[t];(null==o?void 0:o.$ref)&&!(0,Xx.schemaHasRulesButRef)(o,s.self.RULES)&&(o=Zx.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==o?void 0:o.$ref),o instanceof Zx.SchemaEnv&&(o=o.schema));const u=null===(e=null==o?void 0:o.properties)||void 0===e?void 0:e[a];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);n=n&&(r||c(o)),l(u,t)}if(!n)throw new Error(`discriminator: "${a}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(a)}function l(e,t){if(e.const)u(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`);for(const r of e.enum)u(r,t)}}function u(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${a}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(Jx._`${l} === ${e}`),t.assign(c,u(r[e]));t.else(),e.error(!1,{discrError:Qx.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}()),(()=>e.error(!1,{discrError:Qx.DiscrError.Tag,tag:l,tagName:a}))),e.ok(c)}};Kx.default=eP;var tP={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=C$,n=IC,o=Kx,s=tP,i=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,i):s;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=A$;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=P$;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=hC;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=fC;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(O$,O$.exports);var rP=m(O$.exports),nP={exports:{}},oP={};!function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,s),time:t(a,c),"date-time":t((function(e){const t=e.split(l);return 2===t.length&&o(t[0])&&a(t[1],!0)}),u),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return h.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(g.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return f.lastIndex=0,f.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=m&&e>=p}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=r.exec(e);if(!t)return!1;const o=+t[1],s=+t[2],i=+t[3];return s>=1&&s<=12&&i>=1&&i<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(o)?29:n[s])}function s(e,t){if(e&&t)return e>t?1:e<t?-1:0}const i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(e,t){const r=i.exec(e);if(!r)return!1;const n=+r[1],o=+r[2],s=+r[3],a=r[5];return(n<=23&&o<=59&&s<=59||23===n&&59===o&&60===s)&&(!t||""!==a)}function c(e,t){if(!e||!t)return;const r=i.exec(e),n=i.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const l=/t|\s/i;function u(e,t){if(!e||!t)return;const[r,n]=e.split(l),[o,i]=t.split(l),a=s(r,o);return void 0!==a?a||c(n,i):void 0}const h=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const p=-(2**31),m=2**31-1;function v(){return!0}const g=/[^\\]\\Z/}(oP);var sP={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=O$.exports,r=P$,n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:e,schemaCode:t})=>r.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${o[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:n,data:s,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const h=new t.KeywordCxt(c,u.RULES.all.format.definition,"format");function d(e){return r._`${e}.compare(${s}, ${i}) ${o[a].fail} 0`}h.$data?function(){const t=n.scopeValue("formats",{ref:u.formats,code:l.code.formats}),o=n.const("fmt",r._`${t}[${h.schemaCode}]`);e.fail$data(r.or(r._`typeof ${o} != "object"`,r._`${o} instanceof RegExp`,r._`typeof ${o}.compare != "function"`,d(o)))}():function(){const t=h.schema,o=u.formats[t];if(!o||!0===o)return;if("object"!=typeof o||o instanceof RegExp||"function"!=typeof o.compare)throw new Error(`"${a}": format "${t}" does not define "compare" function`);const s=n.scopeValue("formats",{key:t,ref:o,code:l.code.formats?r._`${l.code.formats}${r.getProperty(t)}`:void 0});e.fail$data(d(s))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(sP),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=oP,n=sP,o=P$,s=new o.Name("fullFormats"),i=new o.Name("fastFormats"),a=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,s),e;const[o,a]="fast"===t.mode?[r.fastFormats,i]:[r.fullFormats,s];return c(e,t.formats||r.formatNames,o,a),t.keywords&&n.default(e),e};function c(e,t,r,n){var s,i;null!==(s=(i=e.opts.code).formats)&&void 0!==s||(i.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}a.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(nP,nP.exports);var iP=m(nP.exports);const aP="additionalProperties",cP="required";class lP{constructor(e){this.findOption=e,this.schemaObject=e=>{const t=this.properties(e),r={type:"object",properties:t,additionalProperties:this.findOption(t)(aP)},n=this.findOption(t)(cP);return n.length>0&&(r.required=n),r},this.properties=e=>Object.keys(e).reduce(((t,r)=>(t[r]=this.property(e[r]),t)),{}),this.property=e=>{switch(typeof e){case"string":return{type:"string"};case"boolean":return{type:"boolean"};case"number":return Number.isInteger(e)?{type:"integer"}:{type:"number"};case"object":return null==e?{type:"null"}:this.schemaObjectOrArray(e);default:return{}}},this.schemaObjectOrArray=e=>e instanceof Array?this.schemaArray(e):this.schemaObject(e),this.schemaArray=e=>{if(e.length>0){const t=((e,t)=>{const r={};return e.filter((e=>{const n=t(e);return!r.hasOwnProperty(n)&&(r[n]=!0,!0)}))})(e.map(this.property),(e=>JSON.stringify(e)));return 1===t.length?{type:"array",items:t[0]}:{type:"array",items:{oneOf:t}}}return{type:"array",items:{}}}}}const uP=(e,t={})=>new lP((e=>r=>{switch(r){case aP:return!t.hasOwnProperty(aP)||t[aP];case cP:return t.hasOwnProperty(cP)?t[cP](e):Object.keys(e);default:return}})).schemaObject(e);var hP;!function(e){e.HIDE="HIDE",e.SHOW="SHOW",e.ENABLE="ENABLE",e.DISABLE="DISABLE"}(hP||(hP={}));const dP=e=>"object"==typeof e&&null!==e&&"string"==typeof e.i18n,fP=e=>void 0!==e.elements,pP={restrict:!1,trim:!1,showUnfocusedDescription:!1,hideRequiredAsterisk:!1},mP=(e={})=>om({},pP,e),vP=(e=mP(),t)=>t.type===zj?mP(t.config):e,gP=(e,t)=>{if(void 0===e)return[];return e(t)?[]:e.errors},yP={data:{},schema:{},uischema:void 0,errors:[],validator:void 0,ajv:void 0,validationMode:"ValidateAndShow",additionalErrors:[]},bP=(e,t)=>((t.hasOwnProperty("id")||t.hasOwnProperty("$id"))&&e.removeSchema(t),e),_P=(e,t)=>{if(t){if(wP(t.options))return t.options.ajv;if(void 0!==t.options&&ka(t.options.compile))return t.options}return e.ajv?t?.schema?bP(e.ajv,t.schema):e.ajv:Aj()},wP=e=>!!e&&void 0!==e.ajv,SP=(e,t)=>t&&EP(t.options)?t.options.validationMode:e.validationMode,EP=e=>!!e&&void 0!==e.validationMode,$P=(e,t)=>{return t&&((r=t.options)&&void 0!==r.additionalErrors)?t.options.additionalErrors:e.additionalErrors;var r},OP=(e=yP,t)=>{switch(t.type){case Rj:{const r=_P(e,t),n=SP(e,t),o="NoValidation"===n?void 0:r.compile(t.schema),s=gP(o,t.data),i=$P(e,t);return{...e,data:t.data,schema:t.schema,uischema:t.uischema,additionalErrors:i,errors:s,validator:o,ajv:r,validationMode:n}}case kj:{const r=_P(e,t),n=SP(e,t);let o=e.validator,s=e.errors;e.schema!==t.schema||e.validationMode!==n||e.ajv!==r?(o="NoValidation"===n?void 0:r.compile(t.schema),s=gP(o,t.data)):e.data!==t.data&&(s=gP(o,t.data));const i=$P(e,t);return e.data!==t.data||e.schema!==t.schema||e.uischema!==t.uischema||e.ajv!==r||e.errors!==s||e.validator!==o||e.validationMode!==n||e.additionalErrors!==i?{...e,data:t.data,schema:t.schema,uischema:t.uischema,ajv:r,errors:DE(s,e.errors)?e.errors:s,validator:o,validationMode:n,additionalErrors:i}:e}case Ij:{const r=t.ajv,n="NoValidation"===e.validationMode?void 0:r.compile(e.schema),o=gP(n,e.data);return{...e,validator:n,errors:o}}case Hj:{const r=t.schema&&e.ajv&&"NoValidation"!==e.validationMode?bP(e.ajv,t.schema).compile(t.schema):e.validator,n=gP(r,e.data);return{...e,validator:r,schema:t.schema,errors:n}}case Wj:return{...e,uischema:t.uischema};case Mj:if(void 0===t.path||null===t.path)return e;if(""===t.path){const r=t.updater(vg(e.data)),n=gP(e.validator,r);return{...e,data:r,errors:n}}{const r=yS(e.data,t.path),n=t.updater(vg(r)),o=EE(t.path,n,void 0===e.data?{}:e.data),s=gP(e.validator,o);return{...e,data:o,errors:s}}case Dj:return{...e,errors:t.errors};case qj:if(e.validationMode===t.validationMode)return e;if("NoValidation"===t.validationMode){const r=gP(void 0,e.data);return{...e,errors:r,validationMode:t.validationMode}}if("NoValidation"===e.validationMode){const r=bP(e.ajv,e.schema).compile(e.schema),n=gP(r,e.data);return{...e,validator:r,errors:n,validationMode:t.validationMode}}return{...e,validationMode:t.validationMode};default:return e}},CP=e=>{const t=e.dataPath;if(t)return t.replace(/\//g,".").substr(1);var r=e.instancePath;r=r.replace(/\//g,".");const n=(e=>{switch(e.keyword){case"required":case"dependencies":return e.params.missingProperty;case"additionalProperties":return e.params.additionalProperty;default:return}})(e);return void 0===n||r.endsWith(n)||(r=`${r}.${n}`),r=r.replace(/^./,"")},AP=e=>"object"===e?.type||!!e?.properties,TP=["additionalProperties","allOf","anyOf","oneOf"],xP=(e,t,r)=>n=>{const o=n.errors??[],s=n.additionalErrors??[];return((e,t,r)=>n=>{const o=IE(n,(e=>"oneOf"===e.keyword||"anyOf"===e.keyword)).map((e=>CP(e)));return IE(n,(n=>{if(-1!==TP.indexOf(n.keyword))return!1;const s=CP(n);let i=r(s);const a=n.parentSchema;return i&&!AP(a)&&-1!==o.findIndex((t=>e.startsWith(t)))&&(i=i&&DE(a,t)),i}))})(e,t,r)("ValidateAndHide"===n.validationMode?s:[...o,...s])},PP=(e,t)=>dP(t)?t.i18n:e?.i18n??void 0,jP=(e,t,r)=>PP(e,t)??(e=>e?.split(".").filter((e=>!/^\d+$/.test(e))).join(".")||"root")(r),NP=(e,t,r,n)=>`${jP(e,t,r)}.${n}`,RP=(e,t)=>t,kP=(e,t,r)=>{const n=t(NP(e.parentSchema,r,CP(e),`error.${e.keyword}`),void 0,{error:e});if(void 0!==n)return n;const o=t(`error.${e.keyword}`,void 0,{error:e});if(void 0!==o)return o;const s=t(e.message,void 0,{error:e});return void 0!==s?s:"required"===e.keyword&&e.message?.startsWith("must have required property")?t("is a required property","is a required property",{error:e}):e.message},IP={locale:"en",translate:RP,translateError:kP},MP=(e=IP,t)=>{switch(t.type){case Jj:{const r=t.locale??IP.locale,n=t.translator??IP.translate,o=t.errorTranslator??IP.translateError;return r!==e.locale||n!==e.translate||o!==e.translateError?{...e,locale:r,translate:n,translateError:o}:e}case Yj:return{...e,translate:t.translator??RP,translateError:t.errorTranslator??kP};case Kj:return{...e,locale:t.locale??navigator.languages[0]};default:return e}},DP=e=>!hl(e)&&void 0!==e.scope,FP=e=>(t,r,n)=>{if(hl(t)||!DP(t))return!1;if(hl(r))return!1;const o=t.scope;if(hl(o))return!1;let s=r;return vj(r,"object")&&(s=ij(r,o,n?.rootSchema)),void 0!==s&&e(s,n?.rootSchema)},VP=e=>FP((t=>!hl(t)&&vj(t,e))),LP=e=>t=>!hl(t)&&t.type===e,UP=(...e)=>(t,r,n)=>e.reduce(((e,o)=>e&&o(t,r,n)),!0),zP=(...e)=>(t,r,n)=>e.reduce(((e,o)=>e||o(t,r,n)),!1),BP=(e,t)=>(r,n,o)=>t(r,n,o)?e:-1,GP=UP(LP("Control"),VP("boolean")),HP=UP(LP("Control"),zP(FP((e=>e.hasOwnProperty("enum"))),FP((e=>e.hasOwnProperty("const"))))),WP=UP(LP("Control"),VP("string")),qP=(e,t)=>r=>((e,t)=>xP(e,t,(t=>t===e)))(e,t)(r.jsonforms.core),KP=e=>e.jsonforms.config,YP=()=>e=>(e=>void 0===e?RP:e.translate)(yS(e,"jsonforms.i18n")),JP=()=>e=>(e=>void 0===e?kP:e.translateError)(yS(e,"jsonforms.i18n")),QP=e=>(e=>yS(e,"data"))(yS(e,"jsonforms.core")),ZP=e=>(e=>yS(e,"schema"))(yS(e,"jsonforms.core")),XP=e=>(e=>yS(e,"uischema"))(yS(e,"jsonforms.core")),ej=e=>(e=>yS(e,"ajv"))(yS(e,"jsonforms.core")),tj=e=>yS(e,"jsonforms.renderers"),rj=e=>yS(e,"jsonforms.cells"),nj=(e,t)=>{if(!(e=>!!e&&"object"==typeof e)(r=e)||"string"!=typeof r.scope)return t??"";var r;const n=(e=>{const t=e.replace(/(anyOf|allOf|oneOf)\/[\d]\//g,"").replace(/(then|else)\//g,"").split("/").map(oj),r="#"===t[0]||""===t[0];return _$(r?2:1,t.length,2).map((e=>t[e]))})(e.scope);return hl(n)?t??"":((e,t)=>{let r=e;return hl(e)||hl(t)||t.startsWith("[")||(r=e+"."),hl(r)?t:hl(t)?r:`${r}${t}`})(t,n.join("."))},oj=e=>e?.replace(/~1/g,"/").replace(/~0/,"~"),sj=(e,t)=>{if(hl(t))return e;return t.split(".").map((e=>decodeURIComponent(e))).reduce(((e,t)=>{if(e&&e.hasOwnProperty(t))return e[t]}),e)},ij=(e,t,r)=>{const n=t?.split("/").map(oj);return aj(e,n,r)},aj=(e,t,r)=>{if(hl(e))return;if(e.$ref&&(e=ij(r,e.$ref,r)),!t||0===t.length)return e;const[n,...o]=t;if("#"===(s=n)||void 0===s||""===s)return aj(e,o,r);var s;const i=yS(e,n),a=aj(i,o,r);if(a)return a;if("properties"===n||"items"===n){let t;const s=[].concat(e.oneOf??[],e.allOf??[],e.anyOf??[],e.then??[],e.else??[]);for(const e of s)if(t=aj(e,[n,...o],r),t)break;return t}},cj=(e,t)=>nj(e,t),lj=(e,t,r,n)=>{if((e=>"AND"===e.type)(t))return t.conditions.reduce(((t,o)=>t&&lj(e,o,r,n)),!0);if((e=>"OR"===e.type)(t))return t.conditions.reduce(((t,o)=>t||lj(e,o,r,n)),!1);if((e=>"LEAF"===e.type)(t)){return sj(e,cj(t,r))===t.expectedValue}if((e=>$$(e,"schema"))(t)){const o=sj(e,cj(t,r));return n.validate(t.schema,o)}return!0},uj=(e,t,r,n)=>{const o=e.rule.condition;return lj(t,o,r,n)},hj=e=>!(!e.rule||e.rule.effect!==hP.SHOW&&e.rule.effect!==hP.HIDE),dj=(e,t,r=undefined,n)=>!e.rule||((e,t,r=undefined,n)=>{const o=uj(e,t,r,n);switch(e.rule.effect){case hP.HIDE:return!o;case hP.SHOW:return o;default:return!0}})(e,t,r,n),fj=(e,t,r=undefined,n)=>!e.rule||((e,t,r=undefined,n)=>{const o=uj(e,t,r,n);switch(e.rule.effect){case hP.DISABLE:return!o;case hP.ENABLE:return o;default:return!0}})(e,t,r,n),pj=(e,t,r,n,o,s)=>!e?.jsonforms?.readonly&&(r&&(e=>!(!e.rule||e.rule.effect!==hP.ENABLE&&e.rule.effect!==hP.DISABLE))(r)?fj(r,o,t?.path,ej(e)):"boolean"==typeof r?.options?.readonly?!r.options.readonly:"boolean"==typeof r?.options?.readOnly?!r.options.readOnly:"boolean"==typeof s?.readonly?!s.readonly:"boolean"==typeof s?.readOnly?!s.readOnly:!0!==n?.readOnly&&("boolean"!=typeof t?.enabled||t.enabled)),mj=e=>null==e?"":e.join("\n"),vj=(e,t)=>n$(gj(e),t),gj=e=>{if(hl(e))return[];if(!hl(e.type)&&"string"==typeof e.type)return[e.type];if(kc(e.type))return e.type;if(!hl(e.properties)||!hl(e.additionalProperties))return["object"];if(!hl(e.items))return["array"];if(!hl(e.allOf)){const t=f$(e.allOf,(e=>0!==gj(e).length));if(t)return gj(t)}return[]},yj={schema:ij,data:sj},bj=(e,t)=>{if(t&&"string"==typeof t.title)return t.title;if("string"==typeof e.scope){const t=e.scope,r=oj(t.substr(t.lastIndexOf("/")+1));return zu(r)}return""},_j=(e,t)=>({text:e,show:t}),wj=(e,t,r)=>{let n="string"==typeof e?e:JSON.stringify(e);return t&&(n=t(r?`${r}.${n}`:n,n)),{label:n,value:e}},Sj=(e,t)=>{const{uischema:r}=t,n=QP(e),o=nj(r,t.path),s=void 0===t.visible||hj(r)?dj(r,n,t.path,ej(e)):t.visible,i=r,a=t.id,c=ZP(e),l=void 0!==i.scope&&((e,t,r)=>{const n=t.split("/"),o=n[n.length-1],s=n.slice(0,n.length-2).join("/"),i=yj.schema(e,s,r);return void 0!==i&&void 0!==i.required&&-1!==i.required.indexOf(o)})(t.schema,i.scope,c),u=yj.schema(t.schema||c,i.scope,c),h=qP(o,u)(e),d=void 0!==u?u.description:"",f=yj.data(n,o),p=((e,t)=>{const r=e.label;if("boolean"==typeof r)return _j(bj(e,t),r);if("string"==typeof r)return _j(r,!0);if("object"==typeof r){const n="string"==typeof r.text?r.text:bj(e,t),o="boolean"!=typeof r.show||r.show;return _j(n,o)}return _j(bj(e,t),!0)})(r,u),m=p.show?p.text:"",v=KP(e),g=pj(e,t,r,u||c,n,v),y=u??c,b=YP()(e),_=JP()(e),w=b(NP(y,r,o,"label"),m,{schema:y,uischema:r,path:o,errors:h}),S=b(NP(y,r,o,"description"),d,{schema:y,uischema:r,path:o,errors:h}),E=((e,t,r,n,o,s)=>{if(e.length>0&&r){const t=NP(n,o,s,"error.custom"),i=r(t,void 0,{schema:n,uischema:o,path:s,errors:e});if(void 0!==i)return i}return mj(e.map((e=>t(e,r,o))))})(h,_,b,y,r,o);return{data:f,description:S,errors:E,label:w,visible:s,enabled:g,id:a,path:o,required:l,uischema:r,schema:y,config:KP(e),cells:t.cells||e.jsonforms.cells,rootSchema:c}},Ej=e=>({handleChange(t,r){e(Xj(t,(()=>r)))}}),$j={visible:!0,enabled:!0,path:"",direction:"column"},Oj=e=>"HorizontalLayout"===e.type?"row":"VerticalLayout"===e.type?"column":$j.direction,Cj=(e,t)=>{const r=QP(e),{uischema:n}=t,o=void 0===t.visible||hj(n)?dj(t.uischema,r,t.path,ej(e)):t.visible,s=yj.data(r,t.path),i=KP(e),a=pj(e,t,n,void 0,r,i),c=YP()(e),l=(u=n)&&"object"==typeof u?((e,t)=>{if(!1===e.label)return;if((void 0===e.label||null===e.label||!0===e.label)&&!dP(e))return;const r="string"==typeof e.label?e.label:JSON.stringify(e.label),n=PP(void 0,e);return t("string"==typeof n?`${n}.label`:r,r,{uischema:e})})(n,c):void 0;var u;return{...$j,renderers:t.renderers||tj(e),cells:t.cells||rj(e),visible:o,enabled:a,path:t.path,data:s,uischema:t.uischema,schema:t.schema,direction:t.direction??Oj(n),config:i,label:l}},Aj=e=>{const t=new rP({allErrors:!0,verbose:!0,strict:!1,...e});return iP(t),t},Tj=e=>({type:e,elements:[]}),xj=e=>({type:"Control",scope:e}),Pj=(e,t,r,n,o,s)=>{if(!hl(e)&&void 0!==e.$ref)return Pj(ij(s,e.$ref,s),t,r,n,o,s);if((e=>!(hl(e)||hl(e.oneOf)&&hl(e.anyOf)&&hl(e.allOf)))(e)){const e=xj(r);return t.push(e),e}const i=gj(e);if(0===i.length)return null;if(i.length>1){const e=xj(r);return t.push(e),e}if("#"===r&&"object"===i[0]){const i=Tj(o);if(t.push(i),e.properties&&oh(e.properties).length>1&&((e,t)=>{if(!hl(t)){const r=zu(t);if((e=>"Group"===e.type)(e))e.label=r;else{const t={type:"Label",text:r};e.elements.push(t)}}})(i,n),!hl(e.properties)){const t=r+"/properties";Object.keys(e.properties).map((r=>{let n=e.properties[r];const a=`${t}/${c=r,c?.replace(/~/g,"~0").replace(/\//g,"~1")}`;var c;void 0!==n.$ref&&(n=ij(s,n.$ref,s)),Pj(n,i.elements,a,r,o,s)}))}return i}switch(i[0]){case"object":case"array":case"string":case"number":case"integer":case"boolean":const n=xj(r);return t.push(n),n;default:throw new Error("Unknown type: "+JSON.stringify(e))}},jj=(e,t="VerticalLayout",r="#",n=e)=>((e,t)=>{if(!hl(e)&&!fP(e)){const r=Tj(t);return r.elements.push(e),r}return e})(Pj(e,[],r,"",t,n),t),Nj=jj,Rj="jsonforms/INIT",kj="jsonforms/UPDATE_CORE",Ij="jsonforms/SET_AJV",Mj="jsonforms/UPDATE",Dj="jsonforms/UPDATE_ERRORS",Fj="jsonforms/ADD_RENDERER",Vj="jsonforms/REMOVE_RENDERER",Lj="jsonforms/ADD_CELL",Uj="jsonforms/REMOVE_CELL",zj="jsonforms/SET_CONFIG",Bj="jsonforms/ADD_UI_SCHEMA",Gj="jsonforms/REMOVE_UI_SCHEMA",Hj="jsonforms/SET_SCHEMA",Wj="jsonforms/SET_UISCHEMA",qj="jsonforms/SET_VALIDATION_MODE",Kj="jsonforms/SET_LOCALE",Yj="jsonforms/SET_TRANSLATOR",Jj="jsonforms/UPDATE_I18N",Qj="jsonforms/ADD_DEFAULT_DATA",Zj="jsonforms/REMOVE_DEFAULT_DATA",Xj=(e,t)=>({type:Mj,path:e,updater:t});var eN=Object.freeze({__proto__:null,INIT:Rj,UPDATE_CORE:kj,SET_AJV:Ij,UPDATE_DATA:Mj,UPDATE_ERRORS:Dj,VALIDATE:"jsonforms/VALIDATE",ADD_RENDERER:Fj,REMOVE_RENDERER:Vj,ADD_CELL:Lj,REMOVE_CELL:Uj,SET_CONFIG:zj,ADD_UI_SCHEMA:Bj,REMOVE_UI_SCHEMA:Gj,SET_SCHEMA:Hj,SET_UISCHEMA:Wj,SET_VALIDATION_MODE:qj,SET_LOCALE:Kj,SET_TRANSLATOR:Yj,UPDATE_I18N:Jj,ADD_DEFAULT_DATA:Qj,REMOVE_DEFAULT_DATA:Zj,init:(e,t=uP(e),r,n)=>({type:Rj,data:e,schema:t,uischema:"object"==typeof r?r:jj(t),options:n}),updateCore:(e,t,r,n)=>({type:kj,data:e,schema:t,uischema:r,options:n}),registerDefaultData:(e,t)=>({type:Qj,schemaPath:e,data:t}),unregisterDefaultData:e=>({type:Zj,schemaPath:e}),setAjv:e=>({type:Ij,ajv:e}),update:Xj,updateErrors:e=>({type:Dj,errors:e}),registerRenderer:(e,t)=>({type:Fj,tester:e,renderer:t}),registerCell:(e,t)=>({type:Lj,tester:e,cell:t}),unregisterCell:(e,t)=>({type:Uj,tester:e,cell:t}),unregisterRenderer:(e,t)=>({type:Vj,tester:e,renderer:t}),setConfig:e=>({type:zj,config:e}),setValidationMode:e=>({type:qj,validationMode:e}),registerUISchema:(e,t)=>({type:Bj,tester:e,uischema:t}),unregisterUISchema:e=>({type:Gj,tester:e}),setLocale:e=>({type:Kj,locale:e}),setSchema:e=>({type:Hj,schema:e}),setTranslator:(e,t)=>({type:Yj,translator:e,errorTranslator:t}),updateI18n:(e,t,r)=>({type:Jj,locale:e,translator:t,errorTranslator:r}),setUISchema:e=>({type:Wj,uischema:e})});const tN={"^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$":"Invalid phone number. Must match +###-###-######"},rN=(e,t,r)=>{var n;return"pattern"===(null==e?void 0:e.keyword)?null!==(n=tN[e.params.pattern])&&void 0!==n?n:"Invalid pattern.":kP(e,t,r)},nN=ae`<template>${Be((e=>e.jsonforms&&e.dispatch&&e.props),ae`<dispatch-renderer :jsonforms=${e=>e.jsonforms}:dispatch=${e=>e.dispatch}:props=${e=>e.props}?submitted=${e=>e.submitted}/>`)}</template>`,oN=Pe``,sN=(e,t,r)=>{var n,o,s,i;return null!==(i=null===(s=null===(o=null===(n=null==r?void 0:r.options)||void 0===n?void 0:n.i18n)||void 0===o?void 0:o.error)||void 0===s?void 0:s[e.keyword])&&void 0!==i?i:rN(e,t,r)};let iN=class extends Ae{constructor(){super(...arguments),this.dispatch=e=>{this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:OP(this.jsonforms.core,e)}),this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors})},this.validate=e=>{var t,r,n;const o=null===(r=null===(t=this.jsonforms)||void 0===t?void 0:t.core)||void 0===r?void 0:r.data;if(!o)return[];const s=[];return null===(n=null==e?void 0:e.elements)||void 0===n||n.forEach((e=>{var t,r,n,i;const a=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.validateFn;if("function"!=typeof a)return;const c=null===(n=null===(r=null==e?void 0:e.scope)||void 0===r?void 0:r.split("/"))||void 0===n?void 0:n.pop(),l=null==e?void 0:e.label;let u=null!==(i=a(o,c,l))&&void 0!==i?i:[];Array.isArray(u)||(u=[u]),s.push(...u)})),s}}schemaChanged(){var e,t,r,n;if(!this.schema)return;const o=null!==(e=this.uischema)&&void 0!==e?e:Nj(this.schema);this.uischema||console.log("UI schema not provided. Auto generated schema:",o);const s=this.validate(o);this.jsonforms={core:(()=>{const e={data:this.data,schema:this.schema,uischema:o};return OP(e,eN.init(this.data,this.schema,o,{validationMode:this.validationMode||"ValidateAndShow",ajv:this.ajv,additionalErrors:s}))})(),config:vP(void 0,eN.setConfig(this.config)),i18n:MP(this.i18n,eN.updateI18n(null===(t=this.i18n)||void 0===t?void 0:t.locale,null===(r=this.i18n)||void 0===r?void 0:r.translate,(null===(n=this.i18n)||void 0===n?void 0:n.translateError)||sN)),renderers:this.renderers,readonly:this.readonly},this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors})}uischemaChanged(){this.schemaChanged()}dataChanged(){this.schemaChanged()}renderersChanged(){this.schemaChanged()}validationModeChanged(){this.schemaChanged()}ajvChanged(){this.schemaChanged()}readonlyChanged(){this.schemaChanged()}configChanged(){this.schemaChanged()}get props(){var e;if(!this.schema&&!this.uischema)return;return{uischema:null!==(e=this.uischema)&&void 0!==e?e:Nj(this.schema),schema:this.schema,path:"",enabled:!0,visible:!0}}};o([ge({mode:"boolean"})],iN.prototype,"submitted",void 0),o([j],iN.prototype,"jsonforms",void 0),o([j],iN.prototype,"i18n",void 0),o([j],iN.prototype,"schema",void 0),o([j],iN.prototype,"uischema",void 0),o([j],iN.prototype,"data",void 0),o([j],iN.prototype,"renderers",void 0),o([j],iN.prototype,"validationMode",void 0),o([j],iN.prototype,"ajv",void 0),o([ge({mode:"boolean"})],iN.prototype,"readonly",void 0),o([j],iN.prototype,"config",void 0),iN=o([Te({name:"json-forms",template:nN,styles:oN})],iN);const aN=ae`<template>${Be((e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible}),ae`<div class="wrapperRoot" id=${e=>e.control.id+e.control.uischema.scope}><div for="${e=>e.control.id+"-input"}" class="label">${e=>e.computedLabel}</div><div class="wrapper"><slot></slot></div><div class="${e=>e.control.errors&&e.touched?"error":"description"}">${e=>e.control.errors&&e.touched?e.control.errors:e.showDescription?e.control.description:""}</div></div>`)}</template>`,cN=Pe` .wrapperRoot{margin-bottom: 20px}.label{color: rgb(135, 155, 166);font-family: Roboto-Medium, sans-serif;font-style: normal;margin-bottom: 4px;display: flex;justify-content: space-between}.error{font-size: 12px;color: #f9644d;margin-left: 10px}.wrapper{display: flex;width: 100%}`;let lN=class extends Ae{get showDescription(){return!((e,t,r,n)=>void 0===t||void 0!==t&&!e||!n&&!r)(this.control.visible,this.control.description,this.control.isFocused,!!this.control.config.showUnfocusedDescription)}get computedLabel(){return((e,t,r)=>`${e??""}${t&&!r?"*":""}`)(this.control.label,this.control.required,!!this.control.config.hideRequiredAsterisk)}};o([j],lN.prototype,"control",void 0),o([j],lN.prototype,"touched",void 0),o([N],lN.prototype,"showDescription",null),o([N],lN.prototype,"computedLabel",null),lN=o([Te({name:"control-wrapper",styles:cN,template:aN})],lN);const uN=ae`<template>${e=>e.determinedRenderer.renderer}</template>`,hN=Pe``;let dN=class extends Ae{constructor(){super(...arguments),this.createRenderer=()=>{if(!this.jsonforms||!this.dispatch||!this.props)return;var e,t;const r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}((e={jsonforms:this.jsonforms},{renderers:(t=this.props).renderers||yS(e.jsonforms,"renderers"),cells:t.cells||yS(e.jsonforms,"cells"),schema:t.schema||ZP(e),rootSchema:ZP(e),uischema:t.uischema||XP(e),path:t.path,enabled:t.enabled,config:KP(e)}),["rootSchema"]);this.renderer=r,this.control=((e,t,r,n)=>{const o=Object.assign({},n({jsonforms:t},e)),s=null==Ej?void 0:Ej(r);return Object.assign(Object.assign({},o),s)})(this.props,this.jsonforms,this.dispatch,this.determinedRenderer.mapper)}}jsonformsChanged(){this.createRenderer()}propsChanged(){this.createRenderer()}submittedChanged(){this.touched=!!this.submitted}onBlur(){this.touched=!0}get determinedRenderer(){const e=BE(this.renderer.renderers,(e=>e.tester(this.renderer.uischema,this.renderer.schema)));return void 0===e||-1===e.tester(this.renderer.uischema,this.renderer.schema)?(console.error("UnknownRenderer this.renderer.uischema",this.renderer.uischema),{renderer:"UnknownRenderer"}):e}disconnectedCallback(){super.disconnectedCallback(),this.touched=!1,this.submitted=!1}};o([j],dN.prototype,"jsonforms",void 0),o([j],dN.prototype,"props",void 0),o([j],dN.prototype,"touched",void 0),o([ge({mode:"boolean"})],dN.prototype,"submitted",void 0),o([j],dN.prototype,"dispatch",void 0),o([j],dN.prototype,"control",void 0),o([j],dN.prototype,"renderer",void 0),dN=o([Te({name:"dispatch-renderer",template:uN,styles:hN})],dN);const fN=ae`<template><json-forms ?readonly=${e=>e.readonly}?submitted=${e=>e.submitted}:renderers=${e=>e.renderers}:uischema=${e=>e.uischema}:schema=${e=>e.jsonSchema}:data=${e=>e.data}@data-change=${(e,t)=>e.onChange(t.event)}></json-forms>${Be((e=>!e.readonly),ae`<div class="actions"><div class="errors">${e=>e.submissionErrors}</div><fast-button @click="${e=>e._submit()}" ?disable=${e=>!e.submitting}class="submit-button" appearance="accent">
|
|
24
|
-
Submit </fast-button></div>`)}</template>`,pN={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-checkbox :checked=${e=>e.control.data}?disabled=${e=>!e.control.enabled}:autofocus=${e=>e.control.config.focus}:placeholder=${e=>e.control.config.placeholder}@change=${(e,t)=>{e.control.handleChange(e.control.path,t.event.target.checked),e.onBlur()}}></zero-checkbox></control-wrapper></template>`,tester:BP(3,zP(GP,FP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>vj(e,"boolean"))))))),mapper:Sj},mN=e=>t=>{if(!t||!DP(t))return!1;const r=t.options;return!(!r||!r[e])},vN={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-multiselect style="width: 100%" :selectedOptions=${e=>e.control.data||[]}@selectionChange=${(e,t)=>{e.control.handleChange(e.control.path,t.event.detail),e.onBlur()}}><multiselect-datasource resourceName=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.allOptionsResourceName}}value-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.valueField}}label-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.labelField}}></multiselect-datasource></zero-multiselect></control-wrapper></template>`,tester:BP(4,UP(mN("allOptionsResourceName"),zP(FP((e=>vj(e,"array"))),FP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>vj(e,"array")))))))),mapper:Sj},gN={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-combobox style="width: 100%" placeholder=${e=>e.control.label}?disabled=${e=>!e.control.enabled}:value=${e=>e.control.data||""}@value-change=${(e,t)=>{var r;const n=null===(r=t.event.detail)||void 0===r?void 0:r.value;e.control.handleChange(e.control.path,n),e.onBlur()}}><options-datasource resourceName=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.allOptionsResourceName}}value-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.valueField}}label-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.labelField}}:data=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.data}}:initialSelectedValue=${e=>e.control.data}></options-datasource></zero-combobox></control-wrapper></template>`,tester:BP(4,zP(mN("allOptionsResourceName"),mN("data"))),mapper:Sj},yN={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field :value=${e=>void 0===e.control.data||null===e.control.data?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e.control.data)}@change="${(e,t)=>e.control.handleChange(e.control.path,t.event.target.control.valueAsNumber)}}" id=${e=>e.control.path}type="date" data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}@blur=${e=>e.onBlur()}style="width: 100%"></zero-text-field></control-wrapper></template>`,tester:BP(4,FP((e=>"org.joda.time.DateTime"===e.description))),mapper:Sj},bN=zP(HP,FP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>e.hasOwnProperty("enum")))))),_N={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-combobox style="width: 100%" ?disabled=${e=>!e.control.enabled}:value=${e=>{var t;return(null===(t=e.control.options.find((t=>t.value===e.control.data)))||void 0===t?void 0:t.label)||""}}@change=${(e,t)=>{var r;e.control.handleChange(e.control.path,null===(r=e.control.options.find((e=>e.label===t.event.target.value)))||void 0===r?void 0:r.value),e.onBlur()}}>${Ye((e=>e.control.options),ae`<zero-option>${e=>e.label}</zero-option>`)}</zero-combobox></control-wrapper></template>`,tester:BP(3,bN),mapper:(e,t)=>{const r=Sj(e,t),n=t.options||(r.schema.enum||r.schema.oneOf.find((e=>e.hasOwnProperty("enum"))).enum).map((t=>wj(t,YP()(e),jP(r.schema,r.uischema,r.path))))||r.schema.const&&[wj(r.schema.const,YP()(e),jP(r.schema,r.uischema,r.path))];return Object.assign(Object.assign({},r),{options:n})}},wN={renderer:ae`<template><pre :value=${e=>e.control.data||""}id=${e=>e.control.path}data-test-id=${e=>e.control.path}style="display: none"></pre></template>`,tester:BP(5,((e,t,r)=>{var n,o;return null!==(o=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.hidden)&&void 0!==o&&o})),mapper:Sj},SN={renderer:ae`<template><div>${Ye((e=>e.control.uischema.elements),ae`<dispatch-renderer ?submitted=${(e,t)=>t.parent.submitted}:dispatch=${(e,t)=>t.parent.dispatch}:jsonforms=${(e,t)=>t.parent.jsonforms}:props=${(e,t)=>({uischema:e,schema:t.parent.control.schema,renderers:t.parent.control.renderers,path:t.parent.control.path,enabled:t.parent.control.enabled})}></dispatch-renderer>`)}</div></template>`,tester:BP(2,fP),mapper:Cj},EN={renderer:ae`<template><div style="max-width:600px;
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: row;
|
|
27
|
-
flex-wrap: wrap;
|
|
28
|
-
justify-content: space-between;">${Ye((e=>e.control.uischema.elements),ae`<div style="width: 49%"><dispatch-renderer ?submitted=${(e,t)=>t.parent.submitted}:dispatch=${(e,t)=>t.parent.dispatch}:jsonforms=${(e,t)=>t.parent.jsonforms}:props=${(e,t)=>({uischema:e,schema:t.parent.control.schema,renderers:t.parent.control.renderers,path:t.parent.control.path,enabled:t.parent.control.enabled})}></dispatch-renderer></div>`)}</div></template>`,tester:BP(2,(e=>"LayoutVertical2Columns"===e.type)),mapper:Cj},$N=e=>vj(e,"number")||vj(e,"integer"),ON={renderer:ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field :value=${e=>void 0===e.control.data?"":e.control.data}@change=${(e,t)=>{const r=parseFloat(t.event.target.value);return e.control.handleChange(e.control.path,isNaN(r)?void 0:r)}}placeholder=${e=>e.control.label}id=${e=>e.control.path}data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}@blur=${e=>e.onBlur()}style="width: 100%"></zero-text-field></control-wrapper></template>`,tester:BP(3,FP((e=>$N(e)||e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>$N(e)))))),mapper:Sj},CN=ae`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field type=${e=>{var t,r;return(null===(r=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===r?void 0:r.isPassword)?"password":"text"}}:value=${e=>e.control.data||""}@change=${(e,t)=>e.control.handleChange(e.control.path,t.event.target.value)}placeholder=${e=>e.control.label}id=${e=>e.control.path}data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}style="width: 100%" @blur=${e=>e.onBlur()}></zero-text-field></control-wrapper></template>`,AN=gr("foundation-form"),TN={renderer:CN,tester:BP(2,WP),mapper:Sj},xN=[{renderer:CN,tester:BP(1,DP),mapper:Sj},TN,pN,EN,SN,ON,vN,_N,gN,yN,wN];e.Form=class extends It{constructor(){super(...arguments),this.renderers=xN,this.errors=[],this.data={}}resourceNameChanged(){var e,t;return i(this,void 0,void 0,(function*(){if(this.resourceName){const r=yield this.connect.getJSONSchema(this.resourceName);this.jsonSchema=null===(t=null===(e=null==r?void 0:r.INBOUND)||void 0===e?void 0:e.properties)||void 0===t?void 0:t.DETAILS}this.removeDataProperties()}))}removeDataProperties(){if(!this.jsonSchema||!this.data)return;const e=Object.keys(this.jsonSchema.properties);Object.keys(this.data).forEach((t=>{e.includes(t)||(delete this.data[t],AN.debug("Removing key ",t,"from provided data because it is not part of the payload"))}))}_submit(){return i(this,void 0,void 0,(function*(){const e=Object.assign({},this.data);if(this.submissionErrors="",this.submitted=!0,AN.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.errors.length&&this.resourceName){this.submitting=!0;const t=yield this.connect.commitEvent(this.resourceName,{DETAILS:e});this.submitting=!1,t.ERROR?(this.$emit("submit-failure",{payload:e,errors:t.ERROR}),this.submissionErrors=t.ERROR.map((e=>e.CODE+": "+e.TEXT)).toString()):this.$emit("submit-success",{payload:e})}}))}onChange(e){AN.debug({event:e}),e.detail&&(this.data=e.detail.data,this.errors=e.detail.errors)}disconnectedCallback(){super.disconnectedCallback(),this.submitted=!1,this.submissionErrors="",this.jsonSchema=void 0,this.resourceName=void 0,this.data={}}},o([ge],e.Form.prototype,"resourceName",void 0),o([j],e.Form.prototype,"uischema",void 0),o([j],e.Form.prototype,"renderers",void 0),o([j],e.Form.prototype,"jsonSchema",void 0),o([Qi],e.Form.prototype,"connect",void 0),o([j],e.Form.prototype,"data",void 0),o([j],e.Form.prototype,"submitting",void 0),o([j],e.Form.prototype,"submitted",void 0),o([j],e.Form.prototype,"submissionErrors",void 0),o([ge({mode:"boolean"})],e.Form.prototype,"readonly",void 0),e.Form=o([Te({name:"foundation-form",template:fN,styles:Zi})],e.Form);e.genesisErrorTranslator=rN,e.logger=AN,e.mustMatch=e=>(t,r,n)=>{if(!(null==r?void 0:r.length)||!(null==e?void 0:e.length)||!t)return[];const o=null==t?void 0:t[e],s=null==t?void 0:t[r];return(null==o?void 0:o.length)&&(null==s?void 0:s.length)&&o!==s?[{instancePath:`/${r}`,message:`Needs to match ${e}`,schemaPath:"",keyword:"",params:{}}]:[]},Object.defineProperty(e,"__esModule",{value:!0})}({});
|