@vonage/vivid 5.16.0 → 5.17.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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.cjs +3 -3
- package/action-group/index.js +5 -5
- package/alert/index.cjs +3 -3
- package/alert/index.js +17 -17
- package/audio-player/index.cjs +16 -16
- package/audio-player/index.js +27 -27
- package/avatar/index.cjs +2 -2
- package/avatar/index.js +6 -6
- package/badge/index.cjs +2 -2
- package/badge/index.js +6 -6
- package/banner/index.cjs +3 -3
- package/banner/index.js +15 -15
- package/bundled/base-color-picker.cjs +2 -2
- package/bundled/base-color-picker.js +5 -5
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +2 -2
- package/bundled/calendar-picker.template.js +498 -498
- package/bundled/definition10.cjs +18 -30
- package/bundled/definition10.js +53 -155
- package/bundled/definition11.cjs +10 -19
- package/bundled/definition11.js +25 -74
- package/bundled/definition12.cjs +72 -18
- package/bundled/definition12.js +171 -107
- package/bundled/definition13.cjs +18 -17
- package/bundled/definition13.js +45 -65
- package/bundled/definition14.cjs +5 -10
- package/bundled/definition14.js +9 -27
- package/bundled/definition15.cjs +17 -71
- package/bundled/definition15.js +64 -181
- package/bundled/definition16.cjs +12 -4
- package/bundled/definition16.js +79 -14
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +119 -70
- package/bundled/definition18.cjs +87 -12
- package/bundled/definition18.js +409 -52
- package/bundled/definition19.cjs +5 -87
- package/bundled/definition19.js +14 -422
- package/bundled/definition2.cjs +3 -3
- package/bundled/definition2.js +27 -27
- package/bundled/definition20.cjs +30 -5
- package/bundled/definition20.js +159 -9
- package/bundled/definition21.cjs +28 -19
- package/bundled/definition21.js +164 -47
- package/bundled/definition22.cjs +38 -23
- package/bundled/definition22.js +64 -82
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +15 -15
- package/bundled/definition4.cjs +23 -38
- package/bundled/definition4.js +82 -64
- package/bundled/definition5.cjs +2 -2
- package/bundled/definition5.js +5 -5
- package/bundled/definition6.cjs +2 -2
- package/bundled/definition6.js +24 -24
- package/bundled/definition9.cjs +12 -30
- package/bundled/definition9.js +55 -148
- package/bundled/divider.cjs +1 -1
- package/bundled/divider.js +5 -5
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +1 -1
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +43 -43
- package/bundled/picker-field.template.cjs +7 -7
- package/bundled/picker-field.template.js +14 -14
- package/bundled/slider.template.cjs +7 -7
- package/bundled/slider.template.js +12 -12
- package/bundled/slottable-request.cjs +1 -1
- package/bundled/slottable-request.js +8 -38
- package/bundled/time-selection-picker.template.cjs +4 -4
- package/bundled/time-selection-picker.template.js +35 -35
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/calendar/index.cjs +11 -11
- package/calendar/index.js +30 -237
- package/calendar-event/index.cjs +3 -3
- package/calendar-event/index.js +4 -4
- package/card/index.cjs +14 -11
- package/card/index.js +16 -13
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +1 -1
- package/color-picker/definition.cjs +1 -1
- package/color-picker/definition.js +1 -1
- package/color-picker/index.cjs +6 -6
- package/color-picker/index.js +24 -24
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +9 -8
- package/combobox/index.js +32 -28
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1027 -615
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +17 -17
- package/data-grid/index.js +261 -264
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +12 -12
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -7
- package/date-time-picker/index.cjs +4 -4
- package/date-time-picker/index.js +24 -24
- package/dial-pad/index.cjs +3 -2
- package/dial-pad/index.js +6 -5
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +5 -5
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/index.cjs +3 -3
- package/fab/index.js +8 -8
- package/file-picker/index.cjs +16 -13
- package/file-picker/index.js +31 -28
- package/header/index.cjs +4 -4
- package/header/index.js +5 -5
- package/index.cjs +24 -21
- package/index.js +11 -11
- package/lib/combobox/combobox.d.ts +0 -3
- package/lib/date-time-picker/date-time-picker.d.ts +0 -4
- package/lib/dial-pad/dial-pad.d.ts +6 -2
- package/lib/dialog/dialog.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/option/option.d.ts +0 -1
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/alignment.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/character-count.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/public-interface.d.ts +6 -0
- package/lib/searchable-select/option-tag.d.ts +0 -1
- package/lib/table/definition.d.ts +2 -1
- package/lib/table/table-header-cell.d.ts +3 -0
- package/lib/table/table-sorting-button.d.ts +415 -0
- package/lib/table/table-sorting-button.template.d.ts +3 -0
- package/locales/de-DE.cjs +4 -178
- package/locales/de-DE.js +2 -179
- package/locales/en-GB.cjs +4 -9
- package/locales/en-GB.js +2 -10
- package/locales/en-US.cjs +268 -2
- package/locales/en-US.js +265 -1
- package/locales/ja-JP.cjs +4 -171
- package/locales/ja-JP.js +2 -172
- package/locales/zh-CN.cjs +4 -172
- package/locales/zh-CN.js +2 -173
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav-disclosure/index.cjs +3 -3
- package/nav-disclosure/index.js +8 -8
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +7 -7
- package/note/index.cjs +2 -2
- package/note/index.js +6 -6
- package/number-field/index.cjs +4 -4
- package/number-field/index.js +31 -31
- package/option/definition.cjs +1 -1
- package/option/definition.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +7 -8
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +15 -15
- package/popover/index.cjs +4 -4
- package/popover/index.js +5 -5
- package/progress/index.cjs +2 -2
- package/progress/index.js +5 -5
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +4 -4
- package/radio-group/index.js +10 -10
- package/range-slider/index.cjs +4 -4
- package/range-slider/index.js +17 -17
- package/rich-text-editor/definition.cjs +1 -0
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +13 -13
- package/rich-text-editor/index.js +1886 -1829
- package/rich-text-view/index.cjs +1 -1
- package/rich-text-view/index.js +8 -8
- package/searchable-select/index.cjs +12 -12
- package/searchable-select/index.js +25 -25
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +7 -7
- package/selectable-box/index.js +11 -11
- package/shared/foundation/test-utilities/fixture.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/simple-color-picker/index.cjs +3 -3
- package/simple-color-picker/index.js +10 -10
- package/split-button/index.cjs +5 -5
- package/split-button/index.js +10 -10
- package/status/index.cjs +2 -2
- package/status/index.js +12 -12
- package/switch/index.cjs +3 -3
- package/switch/index.js +5 -5
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/table/definition.cjs +17 -14
- package/table/definition.js +3 -2
- package/table/index.cjs +19 -10
- package/table/index.js +69 -21
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +4 -4
- package/tag/index.cjs +7 -7
- package/tag/index.js +9 -9
- package/tag-group/index.cjs +3 -3
- package/tag-group/index.js +5 -5
- package/text-area/index.cjs +2 -2
- package/text-area/index.js +12 -12
- package/text-field/definition.cjs +1 -1
- package/text-field/definition.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +3 -3
- package/tree-view/index.js +17 -17
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4347 -9
- package/unbundled/calendar-picker.template.js +4345 -7
- package/unbundled/chunk.cjs +0 -22
- package/unbundled/definition13.cjs +1 -8
- package/unbundled/definition13.js +1 -8
- package/unbundled/definition14.cjs +2 -2
- package/unbundled/definition14.js +2 -2
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition21.cjs +1 -2
- package/unbundled/definition21.js +1 -2
- package/unbundled/definition22.cjs +7 -2
- package/unbundled/definition22.js +7 -2
- package/unbundled/definition24.cjs +98 -979
- package/unbundled/definition24.js +93 -974
- package/unbundled/definition25.cjs +37 -322
- package/unbundled/definition25.js +33 -318
- package/unbundled/definition26.cjs +317 -91
- package/unbundled/definition26.js +313 -87
- package/unbundled/definition27.cjs +94 -192
- package/unbundled/definition27.js +91 -183
- package/unbundled/definition28.cjs +387 -395
- package/unbundled/definition28.js +387 -395
- package/unbundled/definition29.cjs +189 -110
- package/unbundled/definition29.js +180 -107
- package/unbundled/definition30.cjs +520 -36
- package/unbundled/definition30.js +519 -35
- package/unbundled/definition32.cjs +477 -477
- package/unbundled/definition32.js +475 -475
- package/unbundled/definition33.cjs +87 -2
- package/unbundled/definition33.js +77 -4
- package/unbundled/definition35.cjs +2 -2
- package/unbundled/definition35.js +2 -2
- package/unbundled/definition36.cjs +1 -1
- package/unbundled/definition36.js +1 -1
- package/unbundled/definition37.cjs +6 -2
- package/unbundled/definition37.js +6 -2
- package/unbundled/definition38.cjs +7 -5
- package/unbundled/definition38.js +7 -5
- package/unbundled/definition39.cjs +1 -0
- package/unbundled/definition39.js +1 -0
- package/unbundled/definition42.cjs +22 -11
- package/unbundled/definition42.js +22 -11
- package/unbundled/definition49.cjs +3 -3
- package/unbundled/definition49.js +3 -3
- package/unbundled/definition56.cjs +437 -9506
- package/unbundled/definition56.js +340 -9415
- package/unbundled/definition57.cjs +5 -5
- package/unbundled/definition57.js +5 -5
- package/unbundled/definition58.cjs +4 -3
- package/unbundled/definition58.js +2 -1
- package/unbundled/definition59.cjs +4 -3
- package/unbundled/definition59.js +4 -3
- package/unbundled/definition62.cjs +2 -2
- package/unbundled/definition62.js +2 -2
- package/unbundled/definition64.cjs +1 -1
- package/unbundled/definition64.js +1 -1
- package/unbundled/definition71.cjs +2 -2
- package/unbundled/definition71.js +2 -2
- package/unbundled/definition72.cjs +1 -2
- package/unbundled/definition72.js +1 -2
- package/unbundled/definition75.cjs +3 -51711
- package/unbundled/definition75.js +1 -51711
- package/unbundled/listbox.cjs +1 -1
- package/unbundled/listbox.js +1 -1
- package/unbundled/localized.cjs +2 -2
- package/unbundled/localized.js +1 -1
- package/unbundled/picker-field.template.cjs +1 -1
- package/unbundled/picker-field.template.js +1 -1
- package/unbundled/slottable-request.cjs +2 -3168
- package/unbundled/slottable-request.js +3 -3097
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/index.cjs +3 -3
- package/video-player/index.js +9 -9
- package/vivid.api.json +220 -282
- package/unbundled/chunk.js +0 -33
- package/unbundled/en-US.cjs +0 -447
- package/unbundled/en-US.js +0 -443
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var e,t=`fast-kernel`;try{if(document.currentScript)e=document.currentScript.getAttribute(t);else{let n=document.getElementsByTagName(`script`);e=n[n.length-1].getAttribute(t)}}catch{e=`isolate`}var n;switch(e){case`share`:n=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case`share-v2`:n=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:let e=`-${Math.random().toString(36).substring(2,8)}`;n=Object.freeze({updateQueue:`1.2${e}`,observable:`2.2${e}`,contextEvent:`3.2${e}`,elementRegistry:`4.2${e}`});break}var r=e=>typeof e==`function`,i=e=>typeof e==`string`,a=()=>void 0;(function(){if(!(typeof globalThis<`u`))if(typeof global<`u`)global.globalThis=global;else if(typeof self<`u`)self.globalThis=self;else if(typeof window<`u`)window.globalThis=window;else{let e=Function(`return this`)();e.globalThis=e}})(),(function(){`requestIdleCallback`in globalThis||(globalThis.requestIdleCallback=function(e,t){let n=Date.now();return setTimeout(()=>{e({didTimeout:t?.timeout?Date.now()-n>=t.timeout:!1,timeRemaining:()=>0})},1)},globalThis.cancelIdleCallback=function(e){clearTimeout(e)})})();var o={configurable:!1,enumerable:!1,writable:!1};globalThis.FAST===void 0&&Reflect.defineProperty(globalThis,`FAST`,Object.assign({value:Object.create(null)},o));var s=globalThis.FAST;if(s.getById===void 0){let e=Object.create(null);Reflect.defineProperty(s,`getById`,Object.assign({value(t,n){let r=e[t];return r===void 0&&(r=n?e[t]=n():null),r}},o))}s.error===void 0&&Object.assign(s,{warn(){},error(e){return Error(`Error ${e}`)},addMessages(){}});var c=Object.freeze([]);function l(){let e=new Map;return Object.freeze({register(t){return e.has(t.type)?!1:(e.set(t.type,t),!0)},getByType(t){return e.get(t)},getForInstance(t){if(t!=null)return e.get(t.constructor)}})}function u(){let e=new WeakMap;return function(t){let n=e.get(t);if(n===void 0){let r=Reflect.getPrototypeOf(t);for(;n===void 0&&r!==null;)n=e.get(r),r=Reflect.getPrototypeOf(r);n=n===void 0?[]:n.slice(0),e.set(t,n)}return n}}function d(e){e.prototype.toJSON=a}var f=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),p=e=>e,ee=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy(`fast-html`,{createHTML:p}):{createHTML:p},m=Object.freeze({createHTML(e){return ee.createHTML(e)},protect(e,t,n,r){return r}}),te=m,h=Object.freeze({get policy(){return m},setPolicy(e){if(m!==te)throw s.error(1201);m=e},setAttribute(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)},setBooleanAttribute(e,t,n){n?e.setAttribute(t,``):e.removeAttribute(t)}}),g=s.getById(n.updateQueue,()=>{let e=[],t=[],n=globalThis.requestAnimationFrame,r=!0;function i(){if(t.length)throw t.shift()}function a(n){try{n.call()}catch(n){if(r)t.push(n),setTimeout(i,0);else throw e.length=0,n}}function o(){let t=0;for(;t<e.length;)if(a(e[t]),t++,t>1024){for(let n=0,r=e.length-t;n<r;n++)e[n]=e[n+t];e.length-=t,t=0}e.length=0}function s(t){e.push(t),e.length<2&&(r?n(o):o())}return Object.freeze({enqueue:s,next:()=>new Promise(s),process:o,setMode:e=>r=e})}),_=class{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return this.spillover===void 0?this.sub1===e||this.sub2===e:this.spillover.indexOf(e)!==-1}subscribe(e){let t=this.spillover;if(t===void 0){if(this.has(e))return;if(this.sub1===void 0){this.sub1=e;return}if(this.sub2===void 0){this.sub2=e;return}this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else t.indexOf(e)===-1&&t.push(e)}unsubscribe(e){let t=this.spillover;if(t===void 0)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}notify(e){let t=this.spillover,n=this.subject;if(t===void 0){let t=this.sub1,r=this.sub2;t!==void 0&&t.handleChange(n,e),r!==void 0&&r.handleChange(n,e)}else for(let r=0,i=t.length;r<i;++r)t[r].handleChange(n,e)}},ne=class{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,n;(t=this.subscribers[e])==null||t.notify(e),(n=this.subjectSubscribers)==null||n.notify(e)}subscribe(e,t){let n;n=t?this.subscribers[t]??(this.subscribers[t]=new _(this.subject)):this.subjectSubscribers??=new _(this.subject),n.subscribe(e)}unsubscribe(e,t){var n,r;t?(n=this.subscribers[t])==null||n.unsubscribe(e):(r=this.subjectSubscribers)==null||r.unsubscribe(e)}},v=Object.freeze({unknown:void 0,coupled:1}),y=s.getById(n.observable,()=>{let e=g.enqueue,t=/(:|&&|\|\||if|\?\.)/,n=new WeakMap,a,o=e=>{throw s.error(1101)};function c(e){let t=e.$fastController??n.get(e);return t===void 0&&(Array.isArray(e)?t=o(e):n.set(e,t=new ne(e))),t}let l=u();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return a!==void 0&&a.watch(e,this.name),e[this.field]}setValue(e,t){let n=this.field,i=e[n];if(i!==t){e[n]=t;let a=e[this.callback];r(a)&&a.call(e,i,t),c(e).notify(this.name)}}}class p extends _{constructor(e,t,n=!1){super(e,t),this.expression=e,this.isVolatileBinding=n,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;let t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==v.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&this.last!==null&&this.dispose();let n=a;a=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let r;try{r=this.expression(e,t)}finally{a=n}return r}disconnect(){this.dispose()}dispose(){if(this.last!==null){let e=this.first;for(;e!==void 0;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){let n=this.last,r=c(e),i=n===null?this.first:{};if(i.propertySource=e,i.propertyName=t,i.notifier=r,r.subscribe(this,t),n!==null){if(!this.needsRefresh){let t;a=void 0,t=n.propertySource[n.propertyName],a=this,e===t&&(this.needsRefresh=!0)}n.next=i}this.last=i}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){this.last!==null&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;e!==void 0;)yield e,e=e.next}}return d(p),Object.freeze({setArrayObserverFactory(e){o=e},getNotifier:c,track(e,t){a&&a.watch(e,t)},trackVolatile(){a&&(a.needsRefresh=!0)},notify(e,t){c(e).notify(t)},defineProperty(e,t){i(t)&&(t=new f(t)),l(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:l,binding(e,t,n=this.isVolatileBinding(e)){return new p(e,t,n)},isVolatileBinding(e){return t.test(e.toString())}})});function re(e,t){y.defineProperty(e,t)}function ie(e,t,n){return Object.assign({},n,{get(){return y.trackVolatile(),n.get.apply(this)}})}var ae=s.getById(n.contextEvent,()=>{let e=null;return{get(){return e},set(t){e=t}}}),b=Object.freeze({default:{index:0,length:0,get event(){return b.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent(){return ae.get()},setEvent(e){ae.set(e)}}),x=class{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}},oe=class extends x{createObserver(e){return y.binding(this.evaluate,e,this.isVolatile)}};function se(e,t,n=y.isVolatileBinding(e)){return new oe(e,t,n)}var ce=class extends x{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}};d(ce);function le(e,t){return new ce(e,t)}var ue;function de(e){return e.map(e=>e instanceof S?de(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}var S=class e{constructor(t){this.styles=t,this.targets=new WeakSet,this._strategy=null,this.behaviors=t.map(t=>t instanceof e?t.behaviors:null).reduce((e,t)=>t===null?e:e===null?t:e.concat(t),null)}get strategy(){return this._strategy===null&&this.withStrategy(ue),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=this.behaviors===null?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(de(this.styles)),this}static setDefaultStrategy(e){ue=e}static normalize(t){return t===void 0?void 0:Array.isArray(t)?new e(t):t instanceof e?t:new e([t])}};S.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&`replace`in CSSStyleSheet.prototype;var fe=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,pe=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,me=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,he=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,ge=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,_e=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function ve(e){return e&&e.nodeType===Node.COMMENT_NODE}var C=Object.freeze({attributeMarkerName:`data-fe-b`,attributeBindingSeparator:` `,contentBindingStartMarker(e,t){return`fe-b$$start$$${e}$$${t}$$fe-b`},contentBindingEndMarker(e,t){return`fe-b$$end$$${e}$$${t}$$fe-b`},repeatStartMarker(e){return`fe-repeat$$start$$${e}$$fe-repeat`},repeatEndMarker(e){return`fe-repeat$$end$$${e}$$fe-repeat`},isContentBindingStartMarker(e){return fe.test(e)},isContentBindingEndMarker(e){return pe.test(e)},isRepeatViewStartMarker(e){return me.test(e)},isRepeatViewEndMarker(e){return he.test(e)},isElementBoundaryStartMarker(e){return ve(e)&&ge.test(e.data.trim())},isElementBoundaryEndMarker(e){return ve(e)&&_e.test(e.data)},parseAttributeBinding(e){let t=e.getAttribute(this.attributeMarkerName);return t===null?t:t.split(this.attributeBindingSeparator).map(e=>parseInt(e))},parseEnumeratedAttributeBinding(e){let t=[],n=this.attributeMarkerName.length+1,r=`${this.attributeMarkerName}-`;for(let i of e.getAttributeNames())if(i.startsWith(r)){let e=Number(i.slice(n));if(!Number.isNaN(e))t.push(e);else throw Error(`Invalid attribute marker name: ${i}. Expected format is ${r}<number>.`)}return t.length===0?null:t},parseContentBindingStartMarker(e){return xe(fe,e)},parseContentBindingEndMarker(e){return xe(pe,e)},parseRepeatStartMarker(e){return ye(me,e)},parseRepeatEndMarker(e){return ye(he,e)},parseElementBoundaryStartMarker(e){return be(ge,e.trim())},parseElementBoundaryEndMarker(e){return be(_e,e)}});function ye(e,t){let n=e.exec(t);return n===null?n:parseInt(n[1])}function be(e,t){let n=e.exec(t);return n===null?n:n[1]}function xe(e,t){let n=e.exec(t);return n===null?n:[parseInt(n[1]),n[2]]}var w=Symbol.for(`fe-hydration`);function T(e){return e[w]===w}var Se=`fast-${Math.random().toString(36).substring(2,8)}`,E=`${Se}{`,D=`}${Se}`,Ce=D.length,we=0,O=()=>`${Se}-${++we}`,Te=Object.freeze({interpolation:e=>`${E}${e}${D}`,attribute:e=>`${O()}="${E}${e}${D}"`,comment:e=>`<!--${E}${e}${D}-->`}),k=Object.freeze({parse(e,t){let n=e.split(E);if(n.length===1)return null;let r=[];for(let e=0,i=n.length;e<i;++e){let i=n[e],a=i.indexOf(D),o;if(a===-1)o=i;else{let e=i.substring(0,a);r.push(t[e]),o=i.substring(a+Ce)}o!==``&&r.push(o)}return r}}),A=l(),j=Object.freeze({getForInstance:A.getForInstance,getByType:A.getByType,define(e,t){return t||={},t.type=e,A.register(t),e},assignAspect(e,t){if(!t){e.aspectType=f.content;return}switch(e.sourceAspect=t,t[0]){case`:`:e.targetAspect=t.substring(1),e.aspectType=e.targetAspect===`classList`?f.tokenList:f.property;break;case`?`:e.targetAspect=t.substring(1),e.aspectType=f.booleanAttribute;break;case`@`:e.targetAspect=t.substring(1),e.aspectType=f.event;break;default:e.targetAspect=t,e.aspectType=f.attribute;break}}}),Ee=class{constructor(e){this.options=e}createHTML(e){return Te.attribute(e(this))}createBehavior(){return this}};d(Ee);var De=class extends Error{constructor(e,t,n){super(e),this.factories=t,this.node=n}};function M(e){return e.nodeType===Node.COMMENT_NODE}function Oe(e){return e.nodeType===Node.TEXT_NODE}function ke(e,t){let n=document.createRange();return n.setStart(e,0),n.setEnd(t,M(t)||Oe(t)?t.data.length:t.childNodes.length),n}function Ae(e){return e instanceof DocumentFragment&&`mode`in e}function je(e,t,n){let r=ke(e,t),i=r.commonAncestorContainer,a=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode(e){return r.comparePoint(e,0)===0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),o={},s={},c=a.currentNode=e;for(;c!==null;){switch(c.nodeType){case Node.ELEMENT_NODE:Me(c,n,o);break;case Node.COMMENT_NODE:Ne(c,a,n,o,s);break}c=a.nextNode()}return r.detach(),{targets:o,boundaries:s}}function Me(e,t,n){let r=C.parseAttributeBinding(e)??C.parseEnumeratedAttributeBinding(e);if(r!==null){for(let i of r){if(!t[i])throw new De(`HydrationView was unable to successfully target factory on ${e.nodeName} inside ${e.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,t,e);N(t[i],e,n)}e.removeAttribute(C.attributeMarkerName)}}function Ne(e,t,n,r,i){if(C.isElementBoundaryStartMarker(e)){Pe(e,t);return}if(C.isContentBindingStartMarker(e.data)){let a=C.parseContentBindingStartMarker(e.data);if(a===null)return;let[o,s]=a,c=n[o],l=[],u=t.nextSibling();e.data=``;let d=u;for(;u!==null;){if(M(u)){let e=C.parseContentBindingEndMarker(u.data);if(e&&e[1]===s)break}l.push(u),u=t.nextSibling()}if(u===null){let t=e.getRootNode();throw Error(`Error hydrating Comment node inside "${Ae(t)?t.host.nodeName:t.nodeName}".`)}u.data=``,l.length===1&&Oe(l[0])?N(c,l[0],r):(u!==d&&u.previousSibling!==null&&(i[c.targetNodeId]={first:d,last:u.previousSibling}),N(c,u.parentNode.insertBefore(document.createTextNode(``),u),r))}}function Pe(e,t){let n=C.parseElementBoundaryStartMarker(e.data),r=t.nextSibling();for(;r!==null;){if(M(r)){let e=C.parseElementBoundaryEndMarker(r.data);if(e&&e===n)break}r=t.nextSibling()}}function N(e,t,n){if(e.targetNodeId===void 0)throw Error(`Factory could not be target to the node`);n[e.targetNodeId]=t}var Fe;function P(e,t){let n=e.parentNode,r=e,i;for(;r!==t;){if(i=r.nextSibling,!i)throw Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);n.removeChild(r),r=i}n.removeChild(t)}var Ie=class{constructor(){this.index=0,this.length=0}get event(){return b.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}},F=class extends Ie{constructor(e,t,n){super(),this.fragment=e,this.factories=t,this.targets=n,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=v.unknown,this.context=this,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{let t=this.lastChild;if(e.previousSibling===t)return;let n=e.parentNode,r=this.firstChild,i;for(;r!==t;)i=r.nextSibling,n.insertBefore(r,e),r=i;n.insertBefore(t,e)}}remove(){let e=this.fragment,t=this.lastChild,n=this.firstChild,r;for(;n!==t;)r=n.nextSibling,e.appendChild(n),n=r;e.appendChild(t)}dispose(){P(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let n=this.behaviors;if(n===null){this.source=e,this.context=t,this.behaviors=n=Array(this.factories.length);let r=this.factories;for(let e=0,t=r.length;e<t;++e){let t=r[e].createBehavior();t.bind(this),n[e]=t}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){let e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(e.length!==0){P(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,n=e.length;t<n;++t)e[t].unbind()}}};d(F),y.defineProperty(F.prototype,`index`),y.defineProperty(F.prototype,`length`);var I={unhydrated:`unhydrated`,hydrating:`hydrating`,hydrated:`hydrated`},Le=class extends Error{constructor(e,t,n,r){super(e),this.factory=t,this.fragment=n,this.templateString=r}},Re=class extends Ie{constructor(e,t,n,r){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=n,this.hostBindingTarget=r,this[Fe]=w,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=v.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=I.unhydrated,this._bindingViewBoundaries={},this._targets={},this.factories=n.compile().factories}get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}insertBefore(e){if(this.fragment!==null)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{let t=this.lastChild;if(e.previousSibling===t)return;let n=e.parentNode,r=this.firstChild,i;for(;r!==t;)i=r.nextSibling,n.insertBefore(r,e),r=i;n.insertBefore(t,e)}}appendTo(e){this.fragment!==null&&e.appendChild(this.fragment)}remove(){let e=this.fragment||=document.createDocumentFragment(),t=this.lastChild,n=this.firstChild,r;for(;n!==t;){if(r=n.nextSibling,!r)throw Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(n),n=r}e.appendChild(t)}bind(e,t=this){if(this.hydrationStage!==I.hydrated&&(this._hydrationStage=I.hydrating),this.source===e)return;let n=this.behaviors;if(n===null){this.source=e,this.context=t;try{let{targets:e,boundaries:t}=je(this.firstChild,this.lastChild,this.factories);this._targets=e,this._bindingViewBoundaries=t}catch(e){if(e instanceof De){let t=this.sourceTemplate.html;typeof t!=`string`&&(t=t.innerHTML),e.templateString=t}throw e}this.behaviors=n=Array(this.factories.length);let r=this.factories;for(let e=0,t=r.length;e<t;++e){let t=r[e];if(t.targetNodeId===`h`&&this.hostBindingTarget&&N(t,this.hostBindingTarget,this._targets),t.targetNodeId in this.targets){let r=t.createBehavior();r.bind(this),n[e]=r}else{let e=this.sourceTemplate.html;typeof e!=`string`&&(e=e.innerHTML);let n=(this.firstChild?.getRootNode()).host?.nodeName||`unknown`,r=t,i=[`HydrationView was unable to successfully target bindings inside "<${n.toLowerCase()}>".`,`
|
|
2
2
|
Mismatch Details:`,` - Expected target node ID: "${t.targetNodeId}"`,` - Available target IDs: [${Object.keys(this.targets).join(`, `)||`none`}]`];throw t.targetTagName&&i.push(` - Expected tag name: "${t.targetTagName}"`),r.sourceAspect&&i.push(` - Source aspect: "${r.sourceAspect}"`),r.aspectType!==void 0&&i.push(` - Aspect type: ${r.aspectType}`),i.push(`
|
|
3
3
|
This usually means:`,` 1. The server-rendered HTML doesn't match the client template`,` 2. The hydration markers are missing or corrupted`,` 3. The DOM structure was modified before hydration`,`\nTemplate: ${e.slice(0,200)}${e.length>200?`...`:``}`),new Le(i.join(`
|
|
4
|
-
`),t,ke(this.firstChild,this.lastChild).cloneContents(),e)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0,this._hydrationStage=I.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){P(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){let e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}};Fe=w,d(Re);function ze(e){return e.create!==void 0}function Be(e,t,n,r){if(n??=``,ze(n)){e.textContent=``;let t=e.$fastView;if(t===void 0)if(T(r)&&T(n)&&r.bindingViewBoundaries[this.targetNodeId]!==void 0&&r.hydrationStage!==I.hydrated){let e=r.bindingViewBoundaries[this.targetNodeId];t=n.hydrate(e.first,e.last)}else t=n.create();else e.$fastTemplate!==n&&(t.isComposed&&(t.remove(),t.unbind()),t=n.create());t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(r.source,r.context)):(t.isComposed=!0,t.bind(r.source,r.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=n)}else{let t=e.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=n}}function Ve(e,t,n){let r=`${this.id}-t`,i=e[r]??(e[r]={v:0,cv:Object.create(null)}),a=i.cv,o=i.v,s=e[t];if(n!=null&&n.length){let e=n.split(/\s+/);for(let t=0,n=e.length;t<n;++t){let n=e[t];n!==``&&(a[n]=o,s.add(n))}}if(i.v=o+1,o!==0){--o;for(let e in a)a[e]===o&&s.remove(e)}}var He={[f.attribute]:h.setAttribute,[f.booleanAttribute]:h.setBooleanAttribute,[f.property]:(e,t,n)=>e[t]=n,[f.content]:Be,[f.tokenList]:Ve,[f.event]:()=>void 0},L=class{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=f.content}createHTML(e){return Te.interpolation(e(this))}createBehavior(){if(this.updateTarget===null){let e=He[this.aspectType],t=this.dataBinding.policy??this.policy;if(!e)throw s.error(1205);this.data=`${this.id}-d`,this.updateTarget=t.protect(this.targetTagName,this.aspectType,this.targetAspect,e)}return this}bind(e){let t=e.targets[this.targetNodeId],n=T(e)&&e.hydrationStage&&e.hydrationStage!==I.hydrated;switch(this.aspectType){case f.event:t[this.data]=e,t.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case f.content:e.onUnbind(this);default:let r=t[this.data]??(t[this.data]=this.dataBinding.createObserver(this,this));if(r.target=t,r.controller=e,n&&(this.aspectType===f.attribute||this.aspectType===f.booleanAttribute)){r.bind(e);break}this.updateTarget(t,this.targetAspect,r.bind(e),e);break}}unbind(e){let t=e.targets[this.targetNodeId].$fastView;t!==void 0&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){let t=e.currentTarget[this.data];if(t.isBound){b.setEvent(e);let n=this.dataBinding.evaluate(t.source,t.context);b.setEvent(null),n!==!0&&e.preventDefault()}}handleChange(e,t){let n=t.target,r=t.controller;this.updateTarget(n,this.targetAspect,t.bind(r),r)}};j.define(L,{aspected:!0});var Ue=(e,t)=>`${e}.${t}`,We={},R={index:0,node:null};function Ge(e){e.startsWith(`fast-`)||s.warn(1204,{name:e})}var Ke=new Proxy(document.createElement(`div`),{get(e,t){Ge(t);let n=Reflect.get(e,t);return r(n)?n.bind(e):n},set(e,t,n){return Ge(t),Reflect.set(e,t,n)}}),qe=class{constructor(e,t,n){this.fragment=e,this.directives=t,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,n,r,i){this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(t,n,r)),e.id=e.id??O(),e.targetNodeId=n,e.targetTagName=i,e.policy=e.policy??this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,n){let r=this.descriptors;if(t===`r`||t===`h`||r[t])return;if(!r[e]){let t=e.lastIndexOf(`.`),n=e.substring(0,t),r=parseInt(e.substring(t+1));this.addTargetDescriptor(n,e,r)}let i=We[t];if(!i){let r=`_${t}`;We[t]=i={get(){return this[r]??(this[r]=this[e].childNodes[n])}}}r[t]=i}createView(e){let t=this.fragment.cloneNode(!0),n=Object.create(this.proto);n.r=t,n.h=e??Ke;for(let e of this.nodeIds)n[e];return new F(t,this.factories,n)}};function Je(e,t,n,r,i,a=!1){let o=n.attributes,s=e.directives;for(let c=0,l=o.length;c<l;++c){let u=o[c],d=u.value,f=k.parse(d,s),p=null;f===null?a&&(p=new L(le(()=>d,e.policy)),j.assignAspect(p,u.name)):p=z.aggregate(f,e.policy),p!==null&&(n.removeAttributeNode(u),c--,l--,e.addFactory(p,t,r,i,n.tagName))}}function Ye(e,t,n,r,a){let o=k.parse(t.textContent,e.directives);if(o===null)return R.node=t.nextSibling,R.index=a+1,R;let s,c=s=t;for(let t=0,l=o.length;t<l;++t){let l=o[t];t!==0&&(a++,r=Ue(n,a),s=c.parentNode.insertBefore(document.createTextNode(``),c.nextSibling)),i(l)?s.textContent=l:(s.textContent=` `,j.assignAspect(l),e.addFactory(l,n,r,a,null)),c=s}return R.index=a+1,R.node=c.nextSibling,R}function Xe(e,t,n){let r=0,i=t.firstChild;for(;i;){let t=Ze(e,n,i,r);i=t.node,r=t.index}}function Ze(e,t,n,r){let i=Ue(t,r);switch(n.nodeType){case 1:Je(e,t,n,i,r),Xe(e,n,i);break;case 3:return Ye(e,n,t,i,r);case 8:let a=k.parse(n.data,e.directives);a!==null&&e.addFactory(z.aggregate(a),t,i,r,null);break}return R.index=r+1,R.node=n.nextSibling,R}function Qe(e,t){return e&&e.nodeType==8&&k.parse(e.data,t)!==null}var $e=`TEMPLATE`,z={compile(e,t,n=h.policy){let r;if(i(e)){r=document.createElement($e),r.innerHTML=n.createHTML(e);let t=r.content.firstElementChild;t!==null&&t.tagName===$e&&(r=t)}else r=e;!r.content.firstChild&&!r.content.lastChild&&r.content.appendChild(document.createComment(``));let a=document.adoptNode(r.content),o=new qe(a,t,n);return Je(o,``,r,`h`,0,!0),(Qe(a.firstChild,t)||a.childNodes.length===1&&Object.keys(t).length>0)&&a.insertBefore(document.createComment(``),a.firstChild),Xe(o,a,`r`),R.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=h.policy){if(e.length===1)return e[0];let n,r=!1,a,o=e.length,s=e.map(e=>i(e)?()=>e:(n=e.sourceAspect||n,r||=e.dataBinding.isVolatile,a||=e.dataBinding.policy,e.dataBinding.evaluate)),c=new L(se((e,t)=>{let n=``;for(let r=0;r<o;++r)n+=s[r](e,t);return n},a??t,r));return j.assignAspect(c,n),c}},et=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,tt=Object.create(null),B=class{constructor(e,t=tt){this.html=e,this.factories=t}createHTML(e){let t=this.factories;for(let n in t)e(t[n]);return this.html}};B.empty=new B(``),j.define(B);function nt(e,t,n,r=j.getForInstance(e)){if(r.aspected){let n=et.exec(t);n!==null&&j.assignAspect(e,n[2])}return e.createHTML(n)}var rt=class e{constructor(e,t={},n){this.policy=n,this.result=null,this.html=e,this.factories=t}compile(){return this.result===null&&(this.result=z.compile(this.html,this.factories,this.policy)),this.result}create(e){return this.compile().createView(e)}inline(){return new B(i(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(e){if(this.result)throw s.error(1208);if(this.policy)throw s.error(1207);return this.policy=e,this}render(e,t,n){let r=this.create(n);return r.bind(e),r.appendTo(t),r}static create(t,n,i){let a=``,o=Object.create(null),s=e=>{let t=e.id??=O();return o[t]=e,t};for(let e=0,i=t.length-1;e<i;++e){let i=t[e],o=n[e],c;if(a+=i,r(o))o=new L(se(o));else if(o instanceof x)o=new L(o);else if(!(c=j.getForInstance(o))){let e=o;o=new L(le(()=>e))}a+=nt(o,i,s,c)}return new e(a+t[t.length-1],o,i)}};d(rt);var V=((e,...t)=>{if(Array.isArray(e)&&Array.isArray(e.raw))return rt.create(e,t);throw s.error(1206)});V.partial=e=>new B(e);var it=`boolean`,at=`reflect`,ot=Object.freeze({locate:u()}),st={toView(e){return e?`true`:`false`},fromView(e){return!(e==null||e===`false`||e===!1||e===0)}};function ct(e){if(e==null)return null;let t=e*1;return isNaN(t)?null:t}var lt={toView(e){let t=ct(e);return t&&t.toString()},fromView:ct},ut=class e{constructor(e,t,n=t.toLowerCase(),r=at,i){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=n,this.mode=r,this.converter=i,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,r===it&&i===void 0&&(this.converter=st)}setValue(e,t){let n=e[this.fieldName],r=this.converter;r!==void 0&&(t=r.fromView(t)),n!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](n,t),e.$fastController.notify(this.name))}getValue(e){return y.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){let t=this.mode,n=this.guards;n.has(e)||t===`fromView`||g.enqueue(()=>{n.add(e);let r=e[this.fieldName];switch(t){case at:let t=this.converter;h.setAttribute(e,this.attribute,t===void 0?r:t.toView(r));break;case it:h.setBooleanAttribute(e,this.attribute,r);break}n.delete(e)})}static collect(t,...n){let r=[];n.push(ot.locate(t));for(let a=0,o=n.length;a<o;++a){let o=n[a];if(o!==void 0)for(let n=0,a=o.length;n<a;++n){let a=o[n];i(a)?r.push(new e(t,a)):r.push(new e(t,a.property,a.attribute,a.mode,a.converter))}}return r}};function dt(e,t){let n;function r(e,t){arguments.length>1&&(n.property=t),ot.locate(e.constructor).push(n)}if(arguments.length>1){n={},r(e,t);return}return n=e===void 0?{}:e,r}var ft=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},pt={mode:`open`},mt={},H=new Set,U=s.getById(n.elementRegistry,()=>l()),ht={deferAndHydrate:`defer-and-hydrate`},W=class e{constructor(t,n=t.definition){this.platformDefined=!1,i(n)&&(n={name:n}),this.type=t,this.name=n.name,this.template=n.template,this.templateOptions=n.templateOptions,this.registry=n.registry??customElements;let r=t.prototype,a=ut.collect(t,n.attributes),o=Array(a.length),s={},c={};for(let e=0,t=a.length;e<t;++e){let t=a[e];o[e]=t.attribute,s[t.name]=t,c[t.attribute]=t,y.defineProperty(r,t)}Reflect.defineProperty(t,`observedAttributes`,{value:o,enumerable:!0}),this.attributes=a,this.propertyLookup=s,this.attributeLookup=c,this.shadowOptions=n.shadowOptions===void 0?pt:n.shadowOptions===null?void 0:Object.assign(Object.assign({},pt),n.shadowOptions),this.elementOptions=n.elementOptions===void 0?mt:Object.assign(Object.assign({},mt),n.elementOptions),this.styles=S.normalize(n.styles),U.register(this),y.defineProperty(e.isRegistered,this.name),e.isRegistered[this.name]=this.type}get isDefined(){return this.platformDefined}define(e=this.registry){var t,n;let r=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,r,this.elementOptions),(n=(t=this.lifecycleCallbacks)?.elementDidDefine)==null||n.call(t,this.name)),this}static compose(t,n){return H.has(t)||U.getByType(t)?new e(class extends t{},n):new e(t,n)}static registerBaseType(e){H.add(e)}static composeAsync(t,n){return new Promise(r=>{(H.has(t)||U.getByType(t))&&r(new e(class extends t{},n));let i=new e(t,n);y.getNotifier(i).subscribe({handleChange:()=>{var e,t;(t=(e=i.lifecycleCallbacks)?.templateDidUpdate)==null||t.call(e,i.name),r(i)}},`template`)})}};W.isRegistered={},W.getByType=U.getByType,W.getForInstance=U.getForInstance,W.registerAsync=e=>ft(void 0,void 0,void 0,function*(){return new Promise(t=>{W.isRegistered[e]&&t(W.isRegistered[e]),y.getNotifier(W.isRegistered).subscribe({handleChange:()=>t(W.isRegistered[e])},e)})}),y.defineProperty(W.prototype,`template`);var gt=class extends MutationObserver{constructor(e){function t(e){this.callback.call(null,e.filter(e=>this.observedNodes.has(e.target)))}super(t),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}},_t=Object.freeze({create(e){let t=[],n={},r=null,i=!1;return{source:e,context:b.default,targets:n,get isBound(){return i},addBehaviorFactory(e,t){let n=e;n.id=n.id??O(),n.targetNodeId=n.targetNodeId??O(),n.targetTagName=t.tagName??null,n.policy=n.policy??h.policy,this.addTarget(n.targetNodeId,t),this.addBehavior(n.createBehavior())},addTarget(e,t){n[e]=t},addBehavior(e){t.push(e),i&&e.bind(this)},onUnbind(e){r===null&&(r=[]),r.push(e)},connectedCallback(e){i||(i=!0,t.forEach(e=>e.bind(this)))},disconnectedCallback(e){i&&(i=!1,r!==null&&r.forEach(e=>e.unbind(this)))}}}}),vt={bubbles:!0,composed:!0,cancelable:!0},G=`isConnected`,yt=new WeakMap;function K(e){return e.shadowRoot??yt.get(e)??null}var bt,q=class e extends ne{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;let n=y.getAccessors(e);if(n.length>0){let t=this.boundObservables=Object.create(null);for(let r=0,i=n.length;r<i;++r){let i=n[r].name,a=e[i];a!==void 0&&(delete e[i],t[i]=a)}}}get isConnected(){return y.track(this,G),this.stage===1}get context(){return this.view?.context??b.default}get isBound(){return this.view?.isBound??!1}get sourceLifetime(){return this.view?.sourceLifetime}get template(){if(this._template===null){let e=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():e.template&&(this._template=e.template??null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(this._shadowRootOptions===void 0&&e!==void 0){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),e.mode===`closed`&&yt.set(this.source,t))}}get mainStyles(){if(this._mainStyles===null){let e=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():e.styles&&(this._mainStyles=e.styles??null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}onUnbind(e){var t;(t=this.view)==null||t.onUnbind(e)}addBehavior(e){let t=this.behaviors??=new Map,n=t.get(e)??0;n===0?(t.set(e,1),e.addedCallback&&e.addedCallback(this),e.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&e.connectedCallback(this)):t.set(e,n+1)}removeBehavior(e,t=!1){let n=this.behaviors;if(n===null)return;let r=n.get(e);r!==void 0&&(r===1||t?(n.delete(e),e.disconnectedCallback&&this.stage!==3&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):n.set(e,r-1))}addStyles(e){if(!e)return;let t=this.source;if(e instanceof HTMLElement)(K(t)??this.source).append(e);else if(!e.isAttachedTo(t)){let n=e.behaviors;if(e.addStylesTo(t),n!==null)for(let e=0,t=n.length;e<t;++e)this.addBehavior(n[e])}}removeStyles(e){if(!e)return;let t=this.source;if(e instanceof HTMLElement)(K(t)??t).removeChild(e);else if(e.isAttachedTo(t)){let n=e.behaviors;if(e.removeStylesFrom(t),n!==null)for(let e=0,t=n.length;e<t;++e)this.removeBehavior(n[e])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,y.notify(this,G))}bindObservables(){if(this.boundObservables!==null){let e=this.source,t=this.boundObservables,n=Object.keys(t);for(let r=0,i=n.length;r<i;++r){let i=n[r];e[i]=t[i]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){let e=this.behaviors;if(e!==null){this.guardBehaviorConnection=!0;for(let t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){let e=this.behaviors;if(e!==null)for(let t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,y.notify(this,G),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(e,t,n){let r=this.definition.attributeLookup[e];r!==void 0&&r.onAttributeChangedCallback(this.source,n)}emit(e,t,n){return this.stage===1?this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},vt),n))):!1}renderTemplate(e){let t=this.source,n=K(t)??t;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=n.firstChild;e!==null;e=n.firstChild)n.removeChild(e)}e&&(this.view=e.render(t,n,t),this.view.sourceLifetime=v.coupled)}static forCustomElement(t,n=!1){let r=t.$fastController;if(r!==void 0&&!n)return r;let i=W.getForInstance(t);if(i===void 0)throw s.error(1401);return y.getNotifier(i).subscribe({handleChange:()=>{e.forCustomElement(t,!0),t.$fastController.connect()}},`template`),y.getNotifier(i).subscribe({handleChange:()=>{e.forCustomElement(t,!0),t.$fastController.connect()}},`shadowOptions`),t.$fastController=new bt(t,i)}static setStrategy(e){bt=e}};d(q),q.setStrategy(q);function J(e){return`adoptedStyleSheets`in e?e:K(e)??e.getRootNode()}var xt=class e{constructor(t){let n=e.styleSheetCache;this.sheets=t.map(e=>{if(e instanceof CSSStyleSheet)return e;let t=n.get(e);return t===void 0&&(t=new CSSStyleSheet,t.replaceSync(e),n.set(e,t)),t})}addStylesTo(e){Et(J(e),this.sheets)}removeStylesFrom(e){Dt(J(e),this.sheets)}};xt.styleSheetCache=new Map;var St=0,Ct=()=>`fast-${++St}`;function wt(e){return e===document?document.body:e}var Tt=class{constructor(e){this.styles=e,this.styleClass=Ct()}addStylesTo(e){e=wt(J(e));let t=this.styles,n=this.styleClass;for(let r=0;r<t.length;r++){let i=document.createElement(`style`);i.innerHTML=t[r],i.className=n,e.append(i)}}removeStylesFrom(e){e=wt(J(e));let t=e.querySelectorAll(`.${this.styleClass}`);for(let n=0,r=t.length;n<r;++n)e.removeChild(t[n])}},Et=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},Dt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(S.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Et=(e,t)=>{e.adoptedStyleSheets.push(...t)},Dt=(e,t)=>{for(let n of t){let t=e.adoptedStyleSheets.indexOf(n);t!==-1&&e.adoptedStyleSheets.splice(t,1)}}}catch{}S.setDefaultStrategy(xt)}else S.setDefaultStrategy(Tt);var Ot=`defer-hydration`,kt=`needs-hydration`,Y=class e extends q{get shadowOptions(){return super.shadowOptions}set shadowOptions(e){super.shadowOptions=e,(this.hasExistingShadowRoot||e!==void 0&&!this.template)&&this.definition.templateOptions===ht.deferAndHydrate&&(this.source.toggleAttribute(Ot,!0),this.source.toggleAttribute(kt,!0))}addHydratingInstance(){if(!e.hydratingInstances)return;let t=this.definition.name,n=e.hydratingInstances.get(t);n||(n=new Set,e.hydratingInstances.set(t,n)),n.add(this.source)}static config(t){return e.lifecycleCallbacks=t,this}static hydrationObserverHandler(t){for(let n of t)n.target.hasAttribute(`defer-hydration`)||(e.hydrationObserver.unobserve(n.target),n.target.$fastController.connect())}static checkHydrationComplete(t){var n,r;if(t.didTimeout){e.idleCallbackId=requestIdleCallback(e.checkHydrationComplete,{timeout:50});return}e.hydratingInstances?.size===0&&((r=(n=e.lifecycleCallbacks)?.hydrationComplete)==null||r.call(n),q.setStrategy(q))}connect(){var t,n,r;if(this.needsHydration=this.needsHydration??this.source.hasAttribute(kt),this.needsHydration&&((n=(t=e.lifecycleCallbacks)?.elementWillHydrate)==null||n.call(t,this.definition.name)),this.source.hasAttribute(`defer-hydration`)){this.addHydratingInstance(),e.hydrationObserver.observe(this.source,{attributeFilter:[Ot]});return}if(!this.needsHydration){super.connect(),this.removeHydratingInstance();return}if(this.stage===3){if(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.template)if(T(this.template)){let e=this.source,t=K(e)??e,n=t.firstChild,i=t.lastChild;e.shadowRoot===null&&(C.isElementBoundaryStartMarker(n)&&(n.data=``,n=n.nextSibling),C.isElementBoundaryEndMarker(i)&&(i.data=``,i=i.previousSibling)),this.view=this.template.hydrate(n,i,e),(r=this.view)==null||r.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(kt),this.needsInitialization=this.needsHydration=!1,this.removeHydratingInstance(),y.notify(this,G)}}removeHydratingInstance(){var t,n;if(!e.hydratingInstances)return;let r=this.definition.name,i=e.hydratingInstances.get(r);(n=(t=e.lifecycleCallbacks)?.elementDidHydrate)==null||n.call(t,this.definition.name),i&&(i.delete(this.source),i.size||e.hydratingInstances.delete(r),e.idleCallbackId&&cancelIdleCallback(e.idleCallbackId),e.idleCallbackId=requestIdleCallback(e.checkHydrationComplete,{timeout:50}))}disconnect(){super.disconnect(),e.hydrationObserver.unobserve(this.source)}static install(){q.setStrategy(e)}};Y.hydrationObserver=new gt(Y.hydrationObserverHandler),Y.idleCallbackId=null,Y.hydratingInstances=new Map;function At(e){let t=class extends e{constructor(){super(),q.forCustomElement(this)}$emit(e,t,n){return this.$fastController.emit(e,t,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,n){this.$fastController.onAttributeChangedCallback(e,t,n)}};return W.registerBaseType(t),t}function jt(e,t){return r(e)?W.compose(e,t):W.compose(this,e)}function Mt(e,t){return r(e)?new Promise(n=>{W.composeAsync(e,t).then(e=>{n(e)})}).then(e=>e.define().type):new Promise(t=>{W.composeAsync(this,e).then(e=>{t(e)})}).then(e=>e.define().type)}function Nt(e,t){return r(e)?W.compose(e,t).define().type:W.compose(this,e).define().type}function Pt(e){return At(e)}var Ft=Object.assign(At(HTMLElement),{from:Pt,define:Nt,compose:jt,defineAsync:Mt});function It(e,t){return e instanceof Function?e(t):e}var Lt=new Set,X=new Map,Rt=e=>(t=`vwc`)=>{let n=e=>`${t}-${e}`,r=e=>{let i=n(e.name),a=e.type;if(a.componentName=e.name,Lt.has(i))return;X.has(a)&&X.get(a)!==i&&(a=class extends a{}),Lt.add(i),X.set(a,i);for(let t of e.dependencies)r(t);let o=new Map([[e.type,i],...e.dependencies.map(e=>[e.type,n(e.name)])]),s={tagFor:(t,n)=>{if(!o.has(t))throw Error(`Could not get tag for ${t.name} as it is not a dependency of ${e.name}.`);let r=o.get(t);return n?r:V.partial(r)},tagForNonDependency(e){return n(e)}};W.compose(a,{...e.options,template:It(e.template,s),name:`${t}-${e.name}`}).define()};r(e)},zt=(e,t,n,r,i)=>({name:e,type:t,template:n,dependencies:r,options:i}),Bt=new WeakMap,Vt=e=>{let t=Bt.get(e);return t||(t=[],Bt.set(e,t)),t},Ht=(e,t)=>{Vt(e).push(t)},Ut=(e,t)=>{Vt(e).forEach(n=>n(e,t))},Wt=e=>e===`delegate`,Gt=e=>`vvd${e.charAt(0).toUpperCase()}${e.slice(1)}`,Kt=(e,t)=>{if(Wt(e._vividAriaBehaviour)){let n=e[t];e[`_${t}`]=null,e.removeAttribute($(t)),e[`_${t}`]=n,e[t]===null?delete e.dataset[Gt(t)]:e.dataset[Gt(t)]=e[t]}else h.setAttribute(e,$(t),e[t])},Z=new WeakMap,qt=(e,t)=>{let n=Z.get(e);n?n.add(t):Z.set(e,new Set([t]))},Jt=(e,t)=>{e.isConnected?Kt(e,t):qt(e,t)},Yt=e=>{let t=Z.get(e);if(t){for(let n of t)Kt(e,n);Z.delete(e)}},Q=`role.ariaAtomic.ariaAutoComplete.ariaBusy.ariaChecked.ariaColCount.ariaColIndex.ariaColIndexText.ariaColSpan.ariaCurrent.ariaDescription.ariaDisabled.ariaExpanded.ariaHasPopup.ariaHidden.ariaInvalid.ariaKeyShortcuts.ariaLabel.ariaLevel.ariaLive.ariaModal.ariaMultiLine.ariaMultiSelectable.ariaOrientation.ariaPlaceholder.ariaPosInSet.ariaPressed.ariaReadOnly.ariaRequired.ariaRoleDescription.ariaRowCount.ariaRowIndex.ariaRowIndexText.ariaRowSpan.ariaSelected.ariaSetSize.ariaSort.ariaValueMax.ariaValueMin.ariaValueNow.ariaValueText.ariaRelevant`.split(`.`),$=e=>e.replace(`aria`,`aria-`).toLowerCase(),Xt=e=>{class t extends e{constructor(...e){super(...e),this._vividAriaBehaviour=`default`;for(let e of Q)this[`_${e}`]=null}connectedCallback(){super.connectedCallback(),Yt(this)}}for(let e of Q)dt({attribute:$(e),mode:`fromView`})(t.prototype,e),t.prototype[`${e}Changed`]=function(){Jt(this,e),this._vividAriaBehaviour!==`default`&&Ut(this,e)};return t};function Zt(){let e=new WeakMap;return t=>(e.has(t)||e.set(t,[]),e.get(t))}var Qt=Zt(),$t=e=>(t,n)=>{Qt(t.constructor).push({newPropertyName:n,...e})},en=e=>{class t extends e{#e(e){let t=!1,n=!1,r=t=>n&&e.fromDeprecated(t[e.deprecatedPropertyName])===t[e.newPropertyName],i=n=>t&&e.toDeprecated&&e.toDeprecated(n[e.newPropertyName])===n[e.deprecatedPropertyName],a={handleChange(a,o){if(o===e.newPropertyName){if(t=!0,!e.toDeprecated||r(a))return;a[e.deprecatedPropertyName]=e.toDeprecated(a[e.newPropertyName])}if(o===e.deprecatedPropertyName){if(n=!0,i(a))return;a[e.newPropertyName]=e.fromDeprecated(a[e.deprecatedPropertyName])}}},o=y.getNotifier(this);o.subscribe(a,e.newPropertyName),o.subscribe(a,e.deprecatedPropertyName)}constructor(...e){super(...e);for(let e of Qt(this.constructor))this.#e(e)}}return t},tn=class extends Xt(en(Ft)){static{this.VIVID_VERSION=`5.16.0`}connectedCallback(){super.connectedCallback();let e=this.constructor.componentName;this.setAttribute(`data-vvd-component`,e)}};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return S}});
|
|
4
|
+
`),t,ke(this.firstChild,this.lastChild).cloneContents(),e)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0,this._hydrationStage=I.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){P(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){let e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}};Fe=w,d(Re);function ze(e){return e.create!==void 0}function Be(e,t,n,r){if(n??=``,ze(n)){e.textContent=``;let t=e.$fastView;if(t===void 0)if(T(r)&&T(n)&&r.bindingViewBoundaries[this.targetNodeId]!==void 0&&r.hydrationStage!==I.hydrated){let e=r.bindingViewBoundaries[this.targetNodeId];t=n.hydrate(e.first,e.last)}else t=n.create();else e.$fastTemplate!==n&&(t.isComposed&&(t.remove(),t.unbind()),t=n.create());t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(r.source,r.context)):(t.isComposed=!0,t.bind(r.source,r.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=n)}else{let t=e.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=n}}function Ve(e,t,n){let r=`${this.id}-t`,i=e[r]??(e[r]={v:0,cv:Object.create(null)}),a=i.cv,o=i.v,s=e[t];if(n!=null&&n.length){let e=n.split(/\s+/);for(let t=0,n=e.length;t<n;++t){let n=e[t];n!==``&&(a[n]=o,s.add(n))}}if(i.v=o+1,o!==0){--o;for(let e in a)a[e]===o&&s.remove(e)}}var He={[f.attribute]:h.setAttribute,[f.booleanAttribute]:h.setBooleanAttribute,[f.property]:(e,t,n)=>e[t]=n,[f.content]:Be,[f.tokenList]:Ve,[f.event]:()=>void 0},L=class{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=f.content}createHTML(e){return Te.interpolation(e(this))}createBehavior(){if(this.updateTarget===null){let e=He[this.aspectType],t=this.dataBinding.policy??this.policy;if(!e)throw s.error(1205);this.data=`${this.id}-d`,this.updateTarget=t.protect(this.targetTagName,this.aspectType,this.targetAspect,e)}return this}bind(e){let t=e.targets[this.targetNodeId],n=T(e)&&e.hydrationStage&&e.hydrationStage!==I.hydrated;switch(this.aspectType){case f.event:t[this.data]=e,t.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case f.content:e.onUnbind(this);default:let r=t[this.data]??(t[this.data]=this.dataBinding.createObserver(this,this));if(r.target=t,r.controller=e,n&&(this.aspectType===f.attribute||this.aspectType===f.booleanAttribute)){r.bind(e);break}this.updateTarget(t,this.targetAspect,r.bind(e),e);break}}unbind(e){let t=e.targets[this.targetNodeId].$fastView;t!==void 0&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){let t=e.currentTarget[this.data];if(t.isBound){b.setEvent(e);let n=this.dataBinding.evaluate(t.source,t.context);b.setEvent(null),n!==!0&&e.preventDefault()}}handleChange(e,t){let n=t.target,r=t.controller;this.updateTarget(n,this.targetAspect,t.bind(r),r)}};j.define(L,{aspected:!0});var Ue=(e,t)=>`${e}.${t}`,We={},R={index:0,node:null};function Ge(e){e.startsWith(`fast-`)||s.warn(1204,{name:e})}var Ke=new Proxy(document.createElement(`div`),{get(e,t){Ge(t);let n=Reflect.get(e,t);return r(n)?n.bind(e):n},set(e,t,n){return Ge(t),Reflect.set(e,t,n)}}),qe=class{constructor(e,t,n){this.fragment=e,this.directives=t,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,n,r,i){this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(t,n,r)),e.id=e.id??O(),e.targetNodeId=n,e.targetTagName=i,e.policy=e.policy??this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,n){let r=this.descriptors;if(t===`r`||t===`h`||r[t])return;if(!r[e]){let t=e.lastIndexOf(`.`),n=e.substring(0,t),r=parseInt(e.substring(t+1));this.addTargetDescriptor(n,e,r)}let i=We[t];if(!i){let r=`_${t}`;We[t]=i={get(){return this[r]??(this[r]=this[e].childNodes[n])}}}r[t]=i}createView(e){let t=this.fragment.cloneNode(!0),n=Object.create(this.proto);n.r=t,n.h=e??Ke;for(let e of this.nodeIds)n[e];return new F(t,this.factories,n)}};function Je(e,t,n,r,i,a=!1){let o=n.attributes,s=e.directives;for(let c=0,l=o.length;c<l;++c){let u=o[c],d=u.value,f=k.parse(d,s),p=null;f===null?a&&(p=new L(le(()=>d,e.policy)),j.assignAspect(p,u.name)):p=z.aggregate(f,e.policy),p!==null&&(n.removeAttributeNode(u),c--,l--,e.addFactory(p,t,r,i,n.tagName))}}function Ye(e,t,n,r,a){let o=k.parse(t.textContent,e.directives);if(o===null)return R.node=t.nextSibling,R.index=a+1,R;let s,c=s=t;for(let t=0,l=o.length;t<l;++t){let l=o[t];t!==0&&(a++,r=Ue(n,a),s=c.parentNode.insertBefore(document.createTextNode(``),c.nextSibling)),i(l)?s.textContent=l:(s.textContent=` `,j.assignAspect(l),e.addFactory(l,n,r,a,null)),c=s}return R.index=a+1,R.node=c.nextSibling,R}function Xe(e,t,n){let r=0,i=t.firstChild;for(;i;){let t=Ze(e,n,i,r);i=t.node,r=t.index}}function Ze(e,t,n,r){let i=Ue(t,r);switch(n.nodeType){case 1:Je(e,t,n,i,r),Xe(e,n,i);break;case 3:return Ye(e,n,t,i,r);case 8:let a=k.parse(n.data,e.directives);a!==null&&e.addFactory(z.aggregate(a),t,i,r,null);break}return R.index=r+1,R.node=n.nextSibling,R}function Qe(e,t){return e&&e.nodeType==8&&k.parse(e.data,t)!==null}var $e=`TEMPLATE`,z={compile(e,t,n=h.policy){let r;if(i(e)){r=document.createElement($e),r.innerHTML=n.createHTML(e);let t=r.content.firstElementChild;t!==null&&t.tagName===$e&&(r=t)}else r=e;!r.content.firstChild&&!r.content.lastChild&&r.content.appendChild(document.createComment(``));let a=document.adoptNode(r.content),o=new qe(a,t,n);return Je(o,``,r,`h`,0,!0),(Qe(a.firstChild,t)||a.childNodes.length===1&&Object.keys(t).length>0)&&a.insertBefore(document.createComment(``),a.firstChild),Xe(o,a,`r`),R.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=h.policy){if(e.length===1)return e[0];let n,r=!1,a,o=e.length,s=e.map(e=>i(e)?()=>e:(n=e.sourceAspect||n,r||=e.dataBinding.isVolatile,a||=e.dataBinding.policy,e.dataBinding.evaluate)),c=new L(se((e,t)=>{let n=``;for(let r=0;r<o;++r)n+=s[r](e,t);return n},a??t,r));return j.assignAspect(c,n),c}},et=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,tt=Object.create(null),B=class{constructor(e,t=tt){this.html=e,this.factories=t}createHTML(e){let t=this.factories;for(let n in t)e(t[n]);return this.html}};B.empty=new B(``),j.define(B);function nt(e,t,n,r=j.getForInstance(e)){if(r.aspected){let n=et.exec(t);n!==null&&j.assignAspect(e,n[2])}return e.createHTML(n)}var rt=class e{constructor(e,t={},n){this.policy=n,this.result=null,this.html=e,this.factories=t}compile(){return this.result===null&&(this.result=z.compile(this.html,this.factories,this.policy)),this.result}create(e){return this.compile().createView(e)}inline(){return new B(i(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(e){if(this.result)throw s.error(1208);if(this.policy)throw s.error(1207);return this.policy=e,this}render(e,t,n){let r=this.create(n);return r.bind(e),r.appendTo(t),r}static create(t,n,i){let a=``,o=Object.create(null),s=e=>{let t=e.id??=O();return o[t]=e,t};for(let e=0,i=t.length-1;e<i;++e){let i=t[e],o=n[e],c;if(a+=i,r(o))o=new L(se(o));else if(o instanceof x)o=new L(o);else if(!(c=j.getForInstance(o))){let e=o;o=new L(le(()=>e))}a+=nt(o,i,s,c)}return new e(a+t[t.length-1],o,i)}};d(rt);var V=((e,...t)=>{if(Array.isArray(e)&&Array.isArray(e.raw))return rt.create(e,t);throw s.error(1206)});V.partial=e=>new B(e);var it=`boolean`,at=`reflect`,ot=Object.freeze({locate:u()}),st={toView(e){return e?`true`:`false`},fromView(e){return!(e==null||e===`false`||e===!1||e===0)}};function ct(e){if(e==null)return null;let t=e*1;return isNaN(t)?null:t}var lt={toView(e){let t=ct(e);return t&&t.toString()},fromView:ct},ut=class e{constructor(e,t,n=t.toLowerCase(),r=at,i){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=n,this.mode=r,this.converter=i,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,r===it&&i===void 0&&(this.converter=st)}setValue(e,t){let n=e[this.fieldName],r=this.converter;r!==void 0&&(t=r.fromView(t)),n!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](n,t),e.$fastController.notify(this.name))}getValue(e){return y.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){let t=this.mode,n=this.guards;n.has(e)||t===`fromView`||g.enqueue(()=>{n.add(e);let r=e[this.fieldName];switch(t){case at:let t=this.converter;h.setAttribute(e,this.attribute,t===void 0?r:t.toView(r));break;case it:h.setBooleanAttribute(e,this.attribute,r);break}n.delete(e)})}static collect(t,...n){let r=[];n.push(ot.locate(t));for(let a=0,o=n.length;a<o;++a){let o=n[a];if(o!==void 0)for(let n=0,a=o.length;n<a;++n){let a=o[n];i(a)?r.push(new e(t,a)):r.push(new e(t,a.property,a.attribute,a.mode,a.converter))}}return r}};function dt(e,t){let n;function r(e,t){arguments.length>1&&(n.property=t),ot.locate(e.constructor).push(n)}if(arguments.length>1){n={},r(e,t);return}return n=e===void 0?{}:e,r}var ft=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},pt={mode:`open`},mt={},H=new Set,U=s.getById(n.elementRegistry,()=>l()),ht={deferAndHydrate:`defer-and-hydrate`},W=class e{constructor(t,n=t.definition){this.platformDefined=!1,i(n)&&(n={name:n}),this.type=t,this.name=n.name,this.template=n.template,this.templateOptions=n.templateOptions,this.registry=n.registry??customElements;let r=t.prototype,a=ut.collect(t,n.attributes),o=Array(a.length),s={},c={};for(let e=0,t=a.length;e<t;++e){let t=a[e];o[e]=t.attribute,s[t.name]=t,c[t.attribute]=t,y.defineProperty(r,t)}Reflect.defineProperty(t,`observedAttributes`,{value:o,enumerable:!0}),this.attributes=a,this.propertyLookup=s,this.attributeLookup=c,this.shadowOptions=n.shadowOptions===void 0?pt:n.shadowOptions===null?void 0:Object.assign(Object.assign({},pt),n.shadowOptions),this.elementOptions=n.elementOptions===void 0?mt:Object.assign(Object.assign({},mt),n.elementOptions),this.styles=S.normalize(n.styles),U.register(this),y.defineProperty(e.isRegistered,this.name),e.isRegistered[this.name]=this.type}get isDefined(){return this.platformDefined}define(e=this.registry){var t,n;let r=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,r,this.elementOptions),(n=(t=this.lifecycleCallbacks)?.elementDidDefine)==null||n.call(t,this.name)),this}static compose(t,n){return H.has(t)||U.getByType(t)?new e(class extends t{},n):new e(t,n)}static registerBaseType(e){H.add(e)}static composeAsync(t,n){return new Promise(r=>{(H.has(t)||U.getByType(t))&&r(new e(class extends t{},n));let i=new e(t,n);y.getNotifier(i).subscribe({handleChange:()=>{var e,t;(t=(e=i.lifecycleCallbacks)?.templateDidUpdate)==null||t.call(e,i.name),r(i)}},`template`)})}};W.isRegistered={},W.getByType=U.getByType,W.getForInstance=U.getForInstance,W.registerAsync=e=>ft(void 0,void 0,void 0,function*(){return new Promise(t=>{W.isRegistered[e]&&t(W.isRegistered[e]),y.getNotifier(W.isRegistered).subscribe({handleChange:()=>t(W.isRegistered[e])},e)})}),y.defineProperty(W.prototype,`template`);var gt=class extends MutationObserver{constructor(e){function t(e){this.callback.call(null,e.filter(e=>this.observedNodes.has(e.target)))}super(t),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}},_t=Object.freeze({create(e){let t=[],n={},r=null,i=!1;return{source:e,context:b.default,targets:n,get isBound(){return i},addBehaviorFactory(e,t){let n=e;n.id=n.id??O(),n.targetNodeId=n.targetNodeId??O(),n.targetTagName=t.tagName??null,n.policy=n.policy??h.policy,this.addTarget(n.targetNodeId,t),this.addBehavior(n.createBehavior())},addTarget(e,t){n[e]=t},addBehavior(e){t.push(e),i&&e.bind(this)},onUnbind(e){r===null&&(r=[]),r.push(e)},connectedCallback(e){i||(i=!0,t.forEach(e=>e.bind(this)))},disconnectedCallback(e){i&&(i=!1,r!==null&&r.forEach(e=>e.unbind(this)))}}}}),vt={bubbles:!0,composed:!0,cancelable:!0},G=`isConnected`,yt=new WeakMap;function K(e){return e.shadowRoot??yt.get(e)??null}var bt,q=class e extends ne{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;let n=y.getAccessors(e);if(n.length>0){let t=this.boundObservables=Object.create(null);for(let r=0,i=n.length;r<i;++r){let i=n[r].name,a=e[i];a!==void 0&&(delete e[i],t[i]=a)}}}get isConnected(){return y.track(this,G),this.stage===1}get context(){return this.view?.context??b.default}get isBound(){return this.view?.isBound??!1}get sourceLifetime(){return this.view?.sourceLifetime}get template(){if(this._template===null){let e=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():e.template&&(this._template=e.template??null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(this._shadowRootOptions===void 0&&e!==void 0){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),e.mode===`closed`&&yt.set(this.source,t))}}get mainStyles(){if(this._mainStyles===null){let e=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():e.styles&&(this._mainStyles=e.styles??null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}onUnbind(e){var t;(t=this.view)==null||t.onUnbind(e)}addBehavior(e){let t=this.behaviors??=new Map,n=t.get(e)??0;n===0?(t.set(e,1),e.addedCallback&&e.addedCallback(this),e.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&e.connectedCallback(this)):t.set(e,n+1)}removeBehavior(e,t=!1){let n=this.behaviors;if(n===null)return;let r=n.get(e);r!==void 0&&(r===1||t?(n.delete(e),e.disconnectedCallback&&this.stage!==3&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):n.set(e,r-1))}addStyles(e){if(!e)return;let t=this.source;if(e instanceof HTMLElement)(K(t)??this.source).append(e);else if(!e.isAttachedTo(t)){let n=e.behaviors;if(e.addStylesTo(t),n!==null)for(let e=0,t=n.length;e<t;++e)this.addBehavior(n[e])}}removeStyles(e){if(!e)return;let t=this.source;if(e instanceof HTMLElement)(K(t)??t).removeChild(e);else if(e.isAttachedTo(t)){let n=e.behaviors;if(e.removeStylesFrom(t),n!==null)for(let e=0,t=n.length;e<t;++e)this.removeBehavior(n[e])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,y.notify(this,G))}bindObservables(){if(this.boundObservables!==null){let e=this.source,t=this.boundObservables,n=Object.keys(t);for(let r=0,i=n.length;r<i;++r){let i=n[r];e[i]=t[i]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){let e=this.behaviors;if(e!==null){this.guardBehaviorConnection=!0;for(let t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){let e=this.behaviors;if(e!==null)for(let t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,y.notify(this,G),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(e,t,n){let r=this.definition.attributeLookup[e];r!==void 0&&r.onAttributeChangedCallback(this.source,n)}emit(e,t,n){return this.stage===1?this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},vt),n))):!1}renderTemplate(e){let t=this.source,n=K(t)??t;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=n.firstChild;e!==null;e=n.firstChild)n.removeChild(e)}e&&(this.view=e.render(t,n,t),this.view.sourceLifetime=v.coupled)}static forCustomElement(t,n=!1){let r=t.$fastController;if(r!==void 0&&!n)return r;let i=W.getForInstance(t);if(i===void 0)throw s.error(1401);return y.getNotifier(i).subscribe({handleChange:()=>{e.forCustomElement(t,!0),t.$fastController.connect()}},`template`),y.getNotifier(i).subscribe({handleChange:()=>{e.forCustomElement(t,!0),t.$fastController.connect()}},`shadowOptions`),t.$fastController=new bt(t,i)}static setStrategy(e){bt=e}};d(q),q.setStrategy(q);function J(e){return`adoptedStyleSheets`in e?e:K(e)??e.getRootNode()}var xt=class e{constructor(t){let n=e.styleSheetCache;this.sheets=t.map(e=>{if(e instanceof CSSStyleSheet)return e;let t=n.get(e);return t===void 0&&(t=new CSSStyleSheet,t.replaceSync(e),n.set(e,t)),t})}addStylesTo(e){Et(J(e),this.sheets)}removeStylesFrom(e){Dt(J(e),this.sheets)}};xt.styleSheetCache=new Map;var St=0,Ct=()=>`fast-${++St}`;function wt(e){return e===document?document.body:e}var Tt=class{constructor(e){this.styles=e,this.styleClass=Ct()}addStylesTo(e){e=wt(J(e));let t=this.styles,n=this.styleClass;for(let r=0;r<t.length;r++){let i=document.createElement(`style`);i.innerHTML=t[r],i.className=n,e.append(i)}}removeStylesFrom(e){e=wt(J(e));let t=e.querySelectorAll(`.${this.styleClass}`);for(let n=0,r=t.length;n<r;++n)e.removeChild(t[n])}},Et=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},Dt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(S.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Et=(e,t)=>{e.adoptedStyleSheets.push(...t)},Dt=(e,t)=>{for(let n of t){let t=e.adoptedStyleSheets.indexOf(n);t!==-1&&e.adoptedStyleSheets.splice(t,1)}}}catch{}S.setDefaultStrategy(xt)}else S.setDefaultStrategy(Tt);var Ot=`defer-hydration`,kt=`needs-hydration`,Y=class e extends q{get shadowOptions(){return super.shadowOptions}set shadowOptions(e){super.shadowOptions=e,(this.hasExistingShadowRoot||e!==void 0&&!this.template)&&this.definition.templateOptions===ht.deferAndHydrate&&(this.source.toggleAttribute(Ot,!0),this.source.toggleAttribute(kt,!0))}addHydratingInstance(){if(!e.hydratingInstances)return;let t=this.definition.name,n=e.hydratingInstances.get(t);n||(n=new Set,e.hydratingInstances.set(t,n)),n.add(this.source)}static config(t){return e.lifecycleCallbacks=t,this}static hydrationObserverHandler(t){for(let n of t)n.target.hasAttribute(`defer-hydration`)||(e.hydrationObserver.unobserve(n.target),n.target.$fastController.connect())}static checkHydrationComplete(t){var n,r;if(t.didTimeout){e.idleCallbackId=requestIdleCallback(e.checkHydrationComplete,{timeout:50});return}e.hydratingInstances?.size===0&&((r=(n=e.lifecycleCallbacks)?.hydrationComplete)==null||r.call(n),q.setStrategy(q))}connect(){var t,n,r;if(this.needsHydration=this.needsHydration??this.source.hasAttribute(kt),this.needsHydration&&((n=(t=e.lifecycleCallbacks)?.elementWillHydrate)==null||n.call(t,this.definition.name)),this.source.hasAttribute(`defer-hydration`)){this.addHydratingInstance(),e.hydrationObserver.observe(this.source,{attributeFilter:[Ot]});return}if(!this.needsHydration){super.connect(),this.removeHydratingInstance();return}if(this.stage===3){if(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.template)if(T(this.template)){let e=this.source,t=K(e)??e,n=t.firstChild,i=t.lastChild;e.shadowRoot===null&&(C.isElementBoundaryStartMarker(n)&&(n.data=``,n=n.nextSibling),C.isElementBoundaryEndMarker(i)&&(i.data=``,i=i.previousSibling)),this.view=this.template.hydrate(n,i,e),(r=this.view)==null||r.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(kt),this.needsInitialization=this.needsHydration=!1,this.removeHydratingInstance(),y.notify(this,G)}}removeHydratingInstance(){var t,n;if(!e.hydratingInstances)return;let r=this.definition.name,i=e.hydratingInstances.get(r);(n=(t=e.lifecycleCallbacks)?.elementDidHydrate)==null||n.call(t,this.definition.name),i&&(i.delete(this.source),i.size||e.hydratingInstances.delete(r),e.idleCallbackId&&cancelIdleCallback(e.idleCallbackId),e.idleCallbackId=requestIdleCallback(e.checkHydrationComplete,{timeout:50}))}disconnect(){super.disconnect(),e.hydrationObserver.unobserve(this.source)}static install(){q.setStrategy(e)}};Y.hydrationObserver=new gt(Y.hydrationObserverHandler),Y.idleCallbackId=null,Y.hydratingInstances=new Map;function At(e){let t=class extends e{constructor(){super(),q.forCustomElement(this)}$emit(e,t,n){return this.$fastController.emit(e,t,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,n){this.$fastController.onAttributeChangedCallback(e,t,n)}};return W.registerBaseType(t),t}function jt(e,t){return r(e)?W.compose(e,t):W.compose(this,e)}function Mt(e,t){return r(e)?new Promise(n=>{W.composeAsync(e,t).then(e=>{n(e)})}).then(e=>e.define().type):new Promise(t=>{W.composeAsync(this,e).then(e=>{t(e)})}).then(e=>e.define().type)}function Nt(e,t){return r(e)?W.compose(e,t).define().type:W.compose(this,e).define().type}function Pt(e){return At(e)}var Ft=Object.assign(At(HTMLElement),{from:Pt,define:Nt,compose:jt,defineAsync:Mt});function It(e,t){return e instanceof Function?e(t):e}var Lt=new Set,X=new Map,Rt=e=>(t=`vwc`)=>{let n=e=>`${t}-${e}`,r=e=>{let i=n(e.name),a=e.type;if(a.componentName=e.name,Lt.has(i))return;X.has(a)&&X.get(a)!==i&&(a=class extends a{}),Lt.add(i),X.set(a,i);for(let t of e.dependencies)r(t);let o=new Map([[e.type,i],...e.dependencies.map(e=>[e.type,n(e.name)])]),s={tagFor:(t,n)=>{if(!o.has(t))throw Error(`Could not get tag for ${t.name} as it is not a dependency of ${e.name}.`);let r=o.get(t);return n?r:V.partial(r)},tagForNonDependency(e){return n(e)}};W.compose(a,{...e.options,template:It(e.template,s),name:`${t}-${e.name}`}).define()};r(e)},zt=(e,t,n,r,i)=>({name:e,type:t,template:n,dependencies:r,options:i}),Bt=new WeakMap,Vt=e=>{let t=Bt.get(e);return t||(t=[],Bt.set(e,t)),t},Ht=(e,t)=>{Vt(e).push(t)},Ut=(e,t)=>{Vt(e).forEach(n=>n(e,t))},Wt=e=>e===`delegate`,Gt=e=>`vvd${e.charAt(0).toUpperCase()}${e.slice(1)}`,Kt=(e,t)=>{if(Wt(e._vividAriaBehaviour)){let n=e[t];e[`_${t}`]=null,e.removeAttribute($(t)),e[`_${t}`]=n,e[t]===null?delete e.dataset[Gt(t)]:e.dataset[Gt(t)]=e[t]}else h.setAttribute(e,$(t),e[t])},Z=new WeakMap,qt=(e,t)=>{let n=Z.get(e);n?n.add(t):Z.set(e,new Set([t]))},Jt=(e,t)=>{e.isConnected?Kt(e,t):qt(e,t)},Yt=e=>{let t=Z.get(e);if(t){for(let n of t)Kt(e,n);Z.delete(e)}},Q=`role.ariaAtomic.ariaAutoComplete.ariaBusy.ariaChecked.ariaColCount.ariaColIndex.ariaColIndexText.ariaColSpan.ariaCurrent.ariaDescription.ariaDisabled.ariaExpanded.ariaHasPopup.ariaHidden.ariaInvalid.ariaKeyShortcuts.ariaLabel.ariaLevel.ariaLive.ariaModal.ariaMultiLine.ariaMultiSelectable.ariaOrientation.ariaPlaceholder.ariaPosInSet.ariaPressed.ariaReadOnly.ariaRequired.ariaRoleDescription.ariaRowCount.ariaRowIndex.ariaRowIndexText.ariaRowSpan.ariaSelected.ariaSetSize.ariaSort.ariaValueMax.ariaValueMin.ariaValueNow.ariaValueText.ariaRelevant`.split(`.`),$=e=>e.replace(`aria`,`aria-`).toLowerCase(),Xt=e=>{class t extends e{constructor(...e){super(...e),this._vividAriaBehaviour=`default`;for(let e of Q)this[`_${e}`]=null}connectedCallback(){super.connectedCallback(),Yt(this)}}for(let e of Q)dt({attribute:$(e),mode:`fromView`})(t.prototype,e),t.prototype[`${e}Changed`]=function(){Jt(this,e),this._vividAriaBehaviour!==`default`&&Ut(this,e)};return t};function Zt(){let e=new WeakMap;return t=>(e.has(t)||e.set(t,[]),e.get(t))}var Qt=Zt(),$t=e=>(t,n)=>{Qt(t.constructor).push({newPropertyName:n,...e})},en=e=>{class t extends e{#e(e){let t=!1,n=!1,r=t=>n&&e.fromDeprecated(t[e.deprecatedPropertyName])===t[e.newPropertyName],i=n=>t&&e.toDeprecated&&e.toDeprecated(n[e.newPropertyName])===n[e.deprecatedPropertyName],a={handleChange(a,o){if(o===e.newPropertyName){if(t=!0,!e.toDeprecated||r(a))return;a[e.deprecatedPropertyName]=e.toDeprecated(a[e.newPropertyName])}if(o===e.deprecatedPropertyName){if(n=!0,i(a))return;a[e.newPropertyName]=e.fromDeprecated(a[e.deprecatedPropertyName])}}},o=y.getNotifier(this);o.subscribe(a,e.newPropertyName),o.subscribe(a,e.deprecatedPropertyName)}constructor(...e){super(...e);for(let e of Qt(this.constructor))this.#e(e)}}return t},tn=class extends Xt(en(Ft)){static{this.VIVID_VERSION=`5.17.0`}connectedCallback(){super.connectedCallback();let e=this.constructor.componentName;this.setAttribute(`data-vvd-component`,e)}};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return S}});
|
package/bundled/vivid-element.js
CHANGED
|
@@ -1787,7 +1787,7 @@ var Qt = Zt(), $t = (e) => (t, n) => {
|
|
|
1787
1787
|
return t;
|
|
1788
1788
|
}, tn = class extends Xt(en(Ft)) {
|
|
1789
1789
|
static {
|
|
1790
|
-
this.VIVID_VERSION = "5.
|
|
1790
|
+
this.VIVID_VERSION = "5.17.0";
|
|
1791
1791
|
}
|
|
1792
1792
|
connectedCallback() {
|
|
1793
1793
|
super.connectedCallback();
|
package/calendar/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../bundled/vivid-element.cjs`),t=require(`../bundled/repeat.cjs`),n=require(`../bundled/decorate.cjs`),r=require(`../bundled/class-names.cjs`),i=require(`../bundled/enums.cjs`),a=require(`../bundled/calendar-event.cjs`);var o=`:host{block-size:inherit;max-block-size:inherit;display:block;overflow:auto}ol{margin:0;padding:0;list-style:none}[role=grid i]{z-index:0;grid-template-columns:min-content auto;grid-template-areas:"filler column-headers""row-headers calendar";inline-size:max(100%,500px);min-inline-size:880px;margin:auto;display:grid;position:relative}.row-headers{grid-area:row-headers;grid-template-rows:repeat(24,1fr);margin-inline-end:2px;display:grid}.row-headers>[role=rowheader i]{justify-content:flex-end;align-items:flex-end;display:flex}.row-headers>[role=rowheader i]>time{font:var(--vvd-typography-base-condensed);text-transform:uppercase;white-space:nowrap;font-size:small;line-height:1}.sticky-column .row-headers,.sticky-all .row-headers{z-index:1;background-color:var(--calendar-column-background-color,var(--vvd-color-canvas));margin-inline-end:3px;position:sticky;inset-inline-start:0}.calendar-row{display:contents}.calendar-grid-presentation{background:var(--vvd-color-surface-2dp);counter-reset:listing;filter:var(--vvd-shadow-surface-2dp);border-radius:8px;grid-template:repeat(24,1fr)/repeat(7,1fr);grid-area:calendar;grid-auto-flow:column;gap:1px;display:grid;overflow:hidden}.hours{display:contents}.hours>[role=listitem i]{grid-column:1/8;grid-row:var(--row);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));pointer-events:none;position:relative}.hours>[role=listitem i]:not(:first-child):after{border-block-end:var(--vvd-color-neutral-100) 1px solid;content:"";inline-size:100%;margin-block-start:-1px;position:absolute}.hours>[role=listitem i]:nth-child(24n+1){--row:1}.hours>[role=listitem i]:nth-child(24n+2){--row:2}.hours>[role=listitem i]:nth-child(24n+3){--row:3}.hours>[role=listitem i]:nth-child(24n+4){--row:4}.hours>[role=listitem i]:nth-child(24n+5){--row:5}.hours>[role=listitem i]:nth-child(24n+6){--row:6}.hours>[role=listitem i]:nth-child(24n+7){--row:7}.hours>[role=listitem i]:nth-child(24n+8){--row:8}.hours>[role=listitem i]:nth-child(24n+9){--row:9}.hours>[role=listitem i]:nth-child(24n+10){--row:10}.hours>[role=listitem i]:nth-child(24n+11){--row:11}.hours>[role=listitem i]:nth-child(24n+12){--row:12}.hours>[role=listitem i]:nth-child(24n+13){--row:13}.hours>[role=listitem i]:nth-child(24n+14){--row:14}.hours>[role=listitem i]:nth-child(24n+15){--row:15}.hours>[role=listitem i]:nth-child(24n+16){--row:16}.hours>[role=listitem i]:nth-child(24n+17){--row:17}.hours>[role=listitem i]:nth-child(24n+18){--row:18}.hours>[role=listitem i]:nth-child(24n+19){--row:19}.hours>[role=listitem i]:nth-child(24n+20){--row:20}.hours>[role=listitem i]:nth-child(24n+21){--row:21}.hours>[role=listitem i]:nth-child(24n+22){--row:22}.hours>[role=listitem i]:nth-child(24n+23){--row:23}.hours>[role=listitem i]:nth-child(24n+24){--row:24}[role=gridcell i]{grid-auto-flow:column;gap:1px;display:grid}[role=gridcell i],[role=columnheader i],[role=columnheader i] [role=button i]{position:relative}[role=gridcell i]:before,[role=columnheader i]:before,[role=columnheader i] [role=button i]:before{z-index:-1;background-color:var(--vvd-color-information-400);content:"";position:absolute;inset:0}[role=gridcell i]:focus,[role=columnheader i]:focus,[role=columnheader i] [role=button i]:focus{outline:none}[role=gridcell i]:not(:focus-visible):before,[role=columnheader i]:not(:focus-visible):before,[role=columnheader i] [role=button i]:not(:focus-visible):before{display:none}.columns{display:contents}.columns>[role=gridcell i]{grid-column:var(--column);grid-row:1/25;position:relative}.columns>[role=gridcell i]:first-child{--column:1}.columns>[role=gridcell i]:nth-child(2){--column:2}.columns>[role=gridcell i]:nth-child(3){--column:3}.columns>[role=gridcell i]:nth-child(4){--column:4}.columns>[role=gridcell i]:nth-child(5){--column:5}.columns>[role=gridcell i]:nth-child(6){--column:6}.columns>[role=gridcell i]:nth-child(7){--column:7}.columns>[role=gridcell i]:not(:first-child):after{border-inline-end:var(--vvd-color-neutral-100) 1px solid;content:"";block-size:100%;margin-inline-start:-1px;position:absolute}.column-headers{grid-area:column-headers;grid-template-columns:repeat(7,1fr);display:grid}.column-headers [role=columnheader i] h2{font:var(--vvd-typography-heading-4);grid-template-columns:1fr auto 1fr;align-items:baseline;margin:0;display:grid}.column-headers [role=columnheader i] h2>em{font:inherit;inline-size:min-content;inset-inline-start:0}.column-headers [role=columnheader i] h2>small{font:var(--vvd-typography-base-condensed);text-transform:uppercase}.sticky-header .column-headers,.sticky-all .column-headers{z-index:1;background-color:var(--calendar-header-background-color,var(--vvd-color-canvas));margin-block-end:3px;position:sticky;inset-block-start:0}.filler{background-color:#0000;grid-area:filler}.sticky-header .filler,.sticky-all .filler,.sticky-column .filler{z-index:2;background-color:var(--calendar-header-background-color,var(--vvd-color-canvas));margin-block-end:3px;position:sticky}.sticky-column .filler{inset-inline-start:0}.sticky-header .filler{inset-block-start:0}.sticky-all .filler{inset-block-start:0;inset-inline-start:0}`,s=`ArrowUp`,c=`ArrowRight`,l=`ArrowDown`,u=`ArrowLeft`;function d(e){return e instanceof HTMLElement&&(e.matches(`[role="gridcell"i]`)||e.matches(`[role="columnheader"i]`))}var f=e=>e.matches(`[role="columnheader"i]`)?`[role="gridcell"i]`:`[role="columnheader"i]`;function p(e,t){if(t.parentNode instanceof HTMLElement)switch(e){case c:return t.nextElementSibling||t.parentNode.firstElementChild;case u:return t.previousElementSibling||t.parentNode.lastElementChild;case s:case l:{let{children:e}=t.parentNode,n=Array.from(e).indexOf(t);return this.shadowRoot.querySelector(`${f(t)}:nth-child(${n+1})`)}}}function m(e,t){if(e!==`ArrowDown`)return;let n=t.closest(`[role="columnheader"i]`),r=this.shadowRoot.querySelectorAll(`[role="columnheader"i]`),i=Array.from(r).indexOf(n);return this.shadowRoot.querySelector(`[role="gridcell"i]:nth-child(${i+1})`)}function h(e){return typeof e==`object`&&!!e&&e[`@@functional/placeholder`]===!0}function g(e){return function t(n){return arguments.length===0||h(n)?t:e.apply(this,arguments)}}function _(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return h(n)?t:g(function(t){return e(n,t)});default:return h(n)&&h(r)?t:h(n)?g(function(t){return e(t,r)}):h(r)?g(function(t){return e(n,t)}):e(n,r)}}}var v=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)===`[object Array]`};function y(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function b(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}function x(e){var t=String(e).match(/^function (\w*)/);return t==null?``:t[1]}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function C(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var w=typeof Object.is==`function`?Object.is:C,T=Object.prototype.toString,E=function(){return T.call(arguments)===`[object Arguments]`?function(e){return T.call(e)===`[object Arguments]`}:function(e){return S(`callee`,e)}}(),D=!{toString:null}.propertyIsEnumerable(`toString`),O=[`constructor`,`valueOf`,`isPrototypeOf`,`toString`,`propertyIsEnumerable`,`hasOwnProperty`,`toLocaleString`],k=function(){"use strict";return arguments.propertyIsEnumerable(`length`)}(),A=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},j=g(typeof Object.keys==`function`&&!k?function(e){return Object(e)===e?Object.keys(e):[]}:function(e){if(Object(e)!==e)return[];var t,n,r=[],i=k&&E(e);for(t in e)S(t,e)&&(!i||t!==`length`)&&(r[r.length]=t);if(D)for(n=O.length-1;n>=0;)t=O[n],S(t,e)&&!A(r,t)&&(r[r.length]=t),--n;return r}),M=g(function(e){return e===null?`Null`:e===void 0?`Undefined`:Object.prototype.toString.call(e).slice(8,-1)});function N(e,t,n,r){var i=y(e),a=y(t);function o(e,t){return P(e,t,n.slice(),r.slice())}return!b(function(e,t){return!b(o,t,e)},a,i)}function P(e,t,n,r){if(w(e,t))return!0;var i=M(e);if(i!==M(t))return!1;if(typeof e[`fantasy-land/equals`]==`function`||typeof t[`fantasy-land/equals`]==`function`)return typeof e[`fantasy-land/equals`]==`function`&&e[`fantasy-land/equals`](t)&&typeof t[`fantasy-land/equals`]==`function`&&t[`fantasy-land/equals`](e);if(typeof e.equals==`function`||typeof t.equals==`function`)return typeof e.equals==`function`&&e.equals(t)&&typeof t.equals==`function`&&t.equals(e);switch(i){case`Arguments`:case`Array`:case`Object`:if(typeof e.constructor==`function`&&x(e.constructor)===`Promise`)return e===t;break;case`Boolean`:case`Number`:case`String`:if(!(typeof e==typeof t&&w(e.valueOf(),t.valueOf())))return!1;break;case`Date`:if(!w(e.valueOf(),t.valueOf()))return!1;break;case`Error`:return e.name===t.name&&e.message===t.message;case`RegExp`:if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;--a}switch(i){case`Map`:return e.size===t.size?N(e.entries(),t.entries(),n.concat([e]),r.concat([t])):!1;case`Set`:return e.size===t.size?N(e.values(),t.values(),n.concat([e]),r.concat([t])):!1;case`Arguments`:case`Array`:case`Object`:case`Boolean`:case`Number`:case`String`:case`Date`:case`Error`:case`RegExp`:case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`ArrayBuffer`:break;default:return!1}var o=j(e);if(o.length!==j(t).length)return!1;var s=n.concat([e]),c=r.concat([t]);for(a=o.length-1;a>=0;){var l=o[a];if(!(S(l,t)&&P(t[l],e[l],s,c)))return!1;--a}return!0}var F=_(function(e,t){return P(e,t,[],[])});function I(e){return Object.prototype.toString.call(e)===`[object Object]`}function L(e){return Object.prototype.toString.call(e)===`[object String]`}var R=g(function(e){return!e});function z(e){var t=Object.prototype.toString.call(e);return t===`[object Uint8ClampedArray]`||t===`[object Int8Array]`||t===`[object Uint8Array]`||t===`[object Int16Array]`||t===`[object Uint16Array]`||t===`[object Int32Array]`||t===`[object Uint32Array]`||t===`[object Float32Array]`||t===`[object Float64Array]`||t===`[object BigInt64Array]`||t===`[object BigUint64Array]`}var B=g(function(e){return e!=null&&typeof e[`fantasy-land/empty`]==`function`?e[`fantasy-land/empty`]():e!=null&&e.constructor!=null&&typeof e.constructor[`fantasy-land/empty`]==`function`?e.constructor[`fantasy-land/empty`]():e!=null&&typeof e.empty==`function`?e.empty():e!=null&&e.constructor!=null&&typeof e.constructor.empty==`function`?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:v(e)?[]:L(e)?``:I(e)?{}:E(e)?function(){return arguments}():z(e)?e.constructor.from(``):void 0}),V=g(function(e){return e!=null&&F(e,B(e))});function H(e){let t=e.closest(`[role="gridcell"i], [role="columnheader"i]`);if(t){let{parentElement:e}=t;if(e)return e.children&&Array.from(e.children).indexOf(t)}}function U(e,t,n){let r=t.closest(`[role="rowheader"], [role="gridcell"i]`);if(r){let t=r.getBoundingClientRect(),i=(e.clientY-t.y)/(t.height/n);return Math.round((i+2**-52)*100)/100}}var W=function(e){if(!(e instanceof KeyboardEvent||e instanceof MouseEvent))throw Error(`Invalid event. Event must be instance of KeyboardEvent or MouseEvent`);let[t]=e.composedPath();if(!(t&&t instanceof HTMLElement&&this.shadowRoot.contains(t)))throw Error(`Invalid event. Event must contain a target object which is a direct descendant of calendar`);let n=H(t),r;e instanceof MouseEvent&&(r=U(e,t,this._hours));let i={...n!=null&&{day:n},...r!=null&&{hour:r}};return R(V(i))?i:null},G=e=>{let t=window.getComputedStyle(e).overflowY,n=window.getComputedStyle(e).overflowX;return{vertical:(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight,horizontal:(n===`auto`||n===`scroll`)&&e.scrollWidth>e.clientWidth}},K=class extends e.t{constructor(...e){super(...e),this.hour12=!1,this.stickyMode=i.o.All,this._hours=24,this._days=7,this.hoursAsDatetime=Array.from({length:this._hours-1}).fill(new Date(new Date().setHours(0,0,0))).map((e,t)=>new Date(e.setHours(++t))),this._generateDaysArr=e=>{if(e.length==this._days)return e;let t=new Date(e[e.length-1]);return t.setDate(t.getDate()+1),this._generateDaysArr([...e,t])},this.getEventContext=W}get#e(){let{activeElement:e}=document;return e instanceof a.t?e:null}getCalendarEventContainingCell(e){let t=e.getAttribute(`slot`);return this.shadowRoot.querySelector(`slot[name="${t}"i]`).parentElement}arrowKeysInteractions(e){let{activeElement:t}=this.shadowRoot,n;n=d(t)?p.call(this,e,t):this.#e?this.getCalendarEventContainingCell(this.#e):t?.matches(`em[role="button"i]`)?m.call(this,e,t):this.shadowRoot.querySelector(`[role="columnheader"i]`),this.activateElement(n)}activateElement(e){e?.addEventListener(`blur`,({target:e})=>e.setAttribute(`tabindex`,`-1`),{once:!0}),e?.setAttribute(`tabindex`,`0`),e?.focus()}onKeydown({key:e}){let t=[s,c,l,u].some(t=>t==e);return t&&this.arrowKeysInteractions(e),!t}connectedCallback(){super.connectedCallback(),this.initializeScrollPosition()}initializeScrollPosition(){if(!G(this).vertical)return;let t=this.scrollHeight/this._hours*7;e.O.enqueue(()=>{this.scrollTo({top:t})})}};n.t([e.l],K.prototype,`datetime`,void 0),n.t([e.l({attribute:`start-day`})],K.prototype,`startDay`,void 0),n.t([e.l],K.prototype,`locales`,void 0),n.t([e.l({mode:`boolean`})],K.prototype,`hour12`,void 0),n.t([e.l({attribute:`sticky-mode`,mode:`fromView`})],K.prototype,`stickyMode`,void 0);function q(e){let t=e=>`0${e}`.slice(-2);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}var J=new Map([[`sunday`,0],[`monday`,1]]);function Y(e=new Date,t){e=new Date(e);let n=J.get(t);n??=1;let r=e.getDate()-(e.getDay()+7-n)%7;return new Date(e.setDate(r))}var X=({stickyMode:e})=>r.t([`sticky-${e}`,!!e]),Z=()=>e.d` <div class="row-headers" role="row">
|
|
1
|
+
const e=require(`../bundled/vivid-element.cjs`),t=require(`../bundled/repeat.cjs`),n=require(`../bundled/enums.cjs`),r=require(`../bundled/decorate.cjs`),i=require(`../bundled/class-names.cjs`),a=require(`../bundled/calendar-event.cjs`);var o=`:host{block-size:inherit;max-block-size:inherit;display:block;overflow:auto}ol{margin:0;padding:0;list-style:none}[role=grid i]{z-index:0;grid-template-columns:min-content auto;grid-template-areas:"filler column-headers""row-headers calendar";inline-size:max(100%,500px);min-inline-size:880px;margin:auto;display:grid;position:relative}.row-headers{grid-area:row-headers;grid-template-rows:repeat(24,1fr);margin-inline-end:2px;display:grid}.row-headers>[role=rowheader i]{justify-content:flex-end;align-items:flex-end;display:flex}.row-headers>[role=rowheader i]>time{font:var(--vvd-typography-base-condensed);text-transform:uppercase;white-space:nowrap;font-size:small;line-height:1}.sticky-column .row-headers,.sticky-all .row-headers{z-index:1;background-color:var(--calendar-column-background-color,var(--vvd-color-canvas));margin-inline-end:3px;position:sticky;inset-inline-start:0}.calendar-row{display:contents}.calendar-grid-presentation{background:var(--vvd-color-surface-2dp);counter-reset:listing;filter:var(--vvd-shadow-surface-2dp);border-radius:8px;grid-template:repeat(24,1fr)/repeat(7,1fr);grid-area:calendar;grid-auto-flow:column;gap:1px;display:grid;overflow:hidden}.hours{display:contents}.hours>[role=listitem i]{grid-column:1/8;grid-row:var(--row);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));pointer-events:none;position:relative}.hours>[role=listitem i]:not(:first-child):after{border-block-end:var(--vvd-color-neutral-100) 1px solid;content:"";inline-size:100%;margin-block-start:-1px;position:absolute}.hours>[role=listitem i]:nth-child(24n+1){--row:1}.hours>[role=listitem i]:nth-child(24n+2){--row:2}.hours>[role=listitem i]:nth-child(24n+3){--row:3}.hours>[role=listitem i]:nth-child(24n+4){--row:4}.hours>[role=listitem i]:nth-child(24n+5){--row:5}.hours>[role=listitem i]:nth-child(24n+6){--row:6}.hours>[role=listitem i]:nth-child(24n+7){--row:7}.hours>[role=listitem i]:nth-child(24n+8){--row:8}.hours>[role=listitem i]:nth-child(24n+9){--row:9}.hours>[role=listitem i]:nth-child(24n+10){--row:10}.hours>[role=listitem i]:nth-child(24n+11){--row:11}.hours>[role=listitem i]:nth-child(24n+12){--row:12}.hours>[role=listitem i]:nth-child(24n+13){--row:13}.hours>[role=listitem i]:nth-child(24n+14){--row:14}.hours>[role=listitem i]:nth-child(24n+15){--row:15}.hours>[role=listitem i]:nth-child(24n+16){--row:16}.hours>[role=listitem i]:nth-child(24n+17){--row:17}.hours>[role=listitem i]:nth-child(24n+18){--row:18}.hours>[role=listitem i]:nth-child(24n+19){--row:19}.hours>[role=listitem i]:nth-child(24n+20){--row:20}.hours>[role=listitem i]:nth-child(24n+21){--row:21}.hours>[role=listitem i]:nth-child(24n+22){--row:22}.hours>[role=listitem i]:nth-child(24n+23){--row:23}.hours>[role=listitem i]:nth-child(24n+24){--row:24}[role=gridcell i]{grid-auto-flow:column;gap:1px;display:grid}[role=gridcell i],[role=columnheader i],[role=columnheader i] [role=button i]{position:relative}[role=gridcell i]:before,[role=columnheader i]:before,[role=columnheader i] [role=button i]:before{z-index:-1;background-color:var(--vvd-color-information-400);content:"";position:absolute;inset:0}[role=gridcell i]:focus,[role=columnheader i]:focus,[role=columnheader i] [role=button i]:focus{outline:none}[role=gridcell i]:not(:focus-visible):before,[role=columnheader i]:not(:focus-visible):before,[role=columnheader i] [role=button i]:not(:focus-visible):before{display:none}.columns{display:contents}.columns>[role=gridcell i]{grid-column:var(--column);grid-row:1/25;position:relative}.columns>[role=gridcell i]:first-child{--column:1}.columns>[role=gridcell i]:nth-child(2){--column:2}.columns>[role=gridcell i]:nth-child(3){--column:3}.columns>[role=gridcell i]:nth-child(4){--column:4}.columns>[role=gridcell i]:nth-child(5){--column:5}.columns>[role=gridcell i]:nth-child(6){--column:6}.columns>[role=gridcell i]:nth-child(7){--column:7}.columns>[role=gridcell i]:not(:first-child):after{border-inline-end:var(--vvd-color-neutral-100) 1px solid;content:"";block-size:100%;margin-inline-start:-1px;position:absolute}.column-headers{grid-area:column-headers;grid-template-columns:repeat(7,1fr);display:grid}.column-headers [role=columnheader i] h2{font:var(--vvd-typography-heading-4);grid-template-columns:1fr auto 1fr;align-items:baseline;margin:0;display:grid}.column-headers [role=columnheader i] h2>em{font:inherit;inline-size:min-content;inset-inline-start:0}.column-headers [role=columnheader i] h2>small{font:var(--vvd-typography-base-condensed);text-transform:uppercase}.sticky-header .column-headers,.sticky-all .column-headers{z-index:1;background-color:var(--calendar-header-background-color,var(--vvd-color-canvas));margin-block-end:3px;position:sticky;inset-block-start:0}.filler{background-color:#0000;grid-area:filler}.sticky-header .filler,.sticky-all .filler,.sticky-column .filler{z-index:2;background-color:var(--calendar-header-background-color,var(--vvd-color-canvas));margin-block-end:3px;position:sticky}.sticky-column .filler{inset-inline-start:0}.sticky-header .filler{inset-block-start:0}.sticky-all .filler{inset-block-start:0;inset-inline-start:0}`,s=`ArrowUp`,c=`ArrowRight`,l=`ArrowDown`,u=`ArrowLeft`;function d(e){return e instanceof HTMLElement&&(e.matches(`[role="gridcell"i]`)||e.matches(`[role="columnheader"i]`))}var f=e=>e.matches(`[role="columnheader"i]`)?`[role="gridcell"i]`:`[role="columnheader"i]`;function p(e,t){if(t.parentNode instanceof HTMLElement)switch(e){case c:return t.nextElementSibling||t.parentNode.firstElementChild;case u:return t.previousElementSibling||t.parentNode.lastElementChild;case s:case l:{let{children:e}=t.parentNode,n=Array.from(e).indexOf(t);return this.shadowRoot.querySelector(`${f(t)}:nth-child(${n+1})`)}}}function m(e,t){if(e!==`ArrowDown`)return;let n=t.closest(`[role="columnheader"i]`),r=this.shadowRoot.querySelectorAll(`[role="columnheader"i]`),i=Array.from(r).indexOf(n);return this.shadowRoot.querySelector(`[role="gridcell"i]:nth-child(${i+1})`)}function h(e){let t=e.closest(`[role="gridcell"i], [role="columnheader"i]`);if(t){let{parentElement:e}=t;if(e)return e.children&&Array.from(e.children).indexOf(t)}}function g(e,t,n){let r=t.closest(`[role="rowheader"], [role="gridcell"i]`);if(r){let t=r.getBoundingClientRect(),i=(e.clientY-t.y)/(t.height/n);return Math.round((i+2**-52)*100)/100}}var _=function(e){if(!(e instanceof KeyboardEvent||e instanceof MouseEvent))throw Error(`Invalid event. Event must be instance of KeyboardEvent or MouseEvent`);let[t]=e.composedPath();if(!(t&&t instanceof HTMLElement&&this.shadowRoot.contains(t)))throw Error(`Invalid event. Event must contain a target object which is a direct descendant of calendar`);let n=h(t),r;e instanceof MouseEvent&&(r=g(e,t,this._hours));let i={...n!=null&&{day:n},...r!=null&&{hour:r}};return Object.keys(i).length>0?i:null},v=e=>{let t=window.getComputedStyle(e).overflowY,n=window.getComputedStyle(e).overflowX;return{vertical:(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight,horizontal:(n===`auto`||n===`scroll`)&&e.scrollWidth>e.clientWidth}},y=class extends e.t{constructor(...e){super(...e),this.hour12=!1,this.stickyMode=n.o.All,this._hours=24,this._days=7,this.hoursAsDatetime=Array.from({length:this._hours-1}).fill(new Date(new Date().setHours(0,0,0))).map((e,t)=>new Date(e.setHours(++t))),this._generateDaysArr=e=>{if(e.length==this._days)return e;let t=new Date(e[e.length-1]);return t.setDate(t.getDate()+1),this._generateDaysArr([...e,t])},this.getEventContext=_}get#e(){let{activeElement:e}=document;return e instanceof a.t?e:null}getCalendarEventContainingCell(e){let t=e.getAttribute(`slot`);return this.shadowRoot.querySelector(`slot[name="${t}"i]`).parentElement}arrowKeysInteractions(e){let{activeElement:t}=this.shadowRoot,n;n=d(t)?p.call(this,e,t):this.#e?this.getCalendarEventContainingCell(this.#e):t?.matches(`em[role="button"i]`)?m.call(this,e,t):this.shadowRoot.querySelector(`[role="columnheader"i]`),this.activateElement(n)}activateElement(e){e?.addEventListener(`blur`,({target:e})=>e.setAttribute(`tabindex`,`-1`),{once:!0}),e?.setAttribute(`tabindex`,`0`),e?.focus()}onKeydown({key:e}){let t=[s,c,l,u].some(t=>t==e);return t&&this.arrowKeysInteractions(e),!t}connectedCallback(){super.connectedCallback(),this.initializeScrollPosition()}initializeScrollPosition(){if(!v(this).vertical)return;let t=this.scrollHeight/this._hours*7;e.O.enqueue(()=>{this.scrollTo({top:t})})}};r.t([e.l],y.prototype,`datetime`,void 0),r.t([e.l({attribute:`start-day`})],y.prototype,`startDay`,void 0),r.t([e.l],y.prototype,`locales`,void 0),r.t([e.l({mode:`boolean`})],y.prototype,`hour12`,void 0),r.t([e.l({attribute:`sticky-mode`,mode:`fromView`})],y.prototype,`stickyMode`,void 0);function b(e){let t=e=>`0${e}`.slice(-2);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}var x=new Map([[`sunday`,0],[`monday`,1]]);function S(e=new Date,t){e=new Date(e);let n=x.get(t);n??=1;let r=e.getDate()-(e.getDay()+7-n)%7;return new Date(e.setDate(r))}var C=({stickyMode:e})=>i.t([`sticky-${e}`,!!e]),w=()=>e.d` <div class="row-headers" role="row">
|
|
2
2
|
${t.n(e=>e.hoursAsDatetime,e.d`<span role="rowheader">
|
|
3
3
|
<time
|
|
4
4
|
datetime="${(e,t)=>new Intl.DateTimeFormat(t.parent.locales,{hour:`numeric`,minute:`numeric`,hour12:!1}).format(e)}"
|
|
@@ -6,9 +6,9 @@ const e=require(`../bundled/vivid-element.cjs`),t=require(`../bundled/repeat.cjs
|
|
|
6
6
|
${(e,t)=>new Intl.DateTimeFormat(t.parent.locales,{hour:`numeric`,hour12:t.parent.hour12}).format(e)}
|
|
7
7
|
</time>
|
|
8
8
|
</span>`)}
|
|
9
|
-
</div>`,
|
|
10
|
-
${t.n(e=>e._generateDaysArr([
|
|
11
|
-
<time datetime=${e=>
|
|
9
|
+
</div>`,T=()=>e.d` <div class="column-headers" role="row">
|
|
10
|
+
${t.n(e=>e._generateDaysArr([S(e.datetime,e.startDay)]),e.d` <div role="columnheader" tabindex="-1">
|
|
11
|
+
<time datetime=${e=>b(e)}>
|
|
12
12
|
<h2>
|
|
13
13
|
<!-- TODO add to column aria-labelledby or describedby to count
|
|
14
14
|
events and related day e.g. "3 events, Sunday, March 8" -->
|
|
@@ -25,29 +25,29 @@ const e=require(`../bundled/vivid-element.cjs`),t=require(`../bundled/repeat.cjs
|
|
|
25
25
|
</h2>
|
|
26
26
|
</time>
|
|
27
27
|
</div>`)}
|
|
28
|
-
</div
|
|
28
|
+
</div>`,E=e.d`
|
|
29
29
|
<div role="gridcell" tabindex="-1">
|
|
30
30
|
<slot name="day-${(e,t)=>t.index}"></slot>
|
|
31
31
|
</div>
|
|
32
|
-
`,
|
|
32
|
+
`,D=e.d`
|
|
33
33
|
<div
|
|
34
34
|
role="grid"
|
|
35
|
-
class="${
|
|
35
|
+
class="${C}"
|
|
36
36
|
@keydown=${(e,t)=>e.onKeydown(t.event)}
|
|
37
37
|
>
|
|
38
38
|
<div class="filler"></div>
|
|
39
|
-
${
|
|
39
|
+
${T}
|
|
40
40
|
<div class="calendar-row" role="rowgroup">
|
|
41
|
-
${
|
|
41
|
+
${w}
|
|
42
42
|
<div class="calendar-grid-presentation" role="presentation">
|
|
43
43
|
<div class="hours" role="list">
|
|
44
44
|
${t.n(e=>Array.from({length:e.hoursAsDatetime.length+1}),e.d` <div role="listitem"></div>`)}
|
|
45
45
|
</div>
|
|
46
46
|
<div class="columns" role="row">
|
|
47
|
-
${t.n(e=>Array.from(Array(e._days))
|
|
47
|
+
${t.n(e=>Array.from(Array(e._days)),E,{positioning:!0})}
|
|
48
48
|
</div>
|
|
49
49
|
<slot></slot>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
|
-
`,
|
|
53
|
+
`,O=e.o(`calendar`,y,D,[],{styles:o,shadowOptions:{delegatesFocus:!0}});e.s(O)();
|