@mmlogic/components 0.4.3 → 0.5.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.
Files changed (80) hide show
  1. package/dist/cjs/client-layout-RZ3Ix-4a.js +87 -0
  2. package/dist/cjs/{index-CAzwGt9u.js → index-DzRfoAPz.js} +36 -9
  3. package/dist/cjs/index.cjs.js +56 -81
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mosterdcomponents.cjs.js +3 -3
  6. package/dist/cjs/{mrd-boolean-field_24.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +146 -274
  7. package/dist/collection/collection-manifest.json +1 -2
  8. package/dist/collection/components/documents/mrd-document-container/mrd-document-container.css +0 -17
  9. package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +12 -4
  10. package/dist/collection/components/documents/mrd-document-list/mrd-document-list.css +9 -43
  11. package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +14 -6
  12. package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +3 -44
  13. package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +37 -85
  14. package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.css +0 -10
  15. package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.css +0 -7
  16. package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +0 -11
  17. package/dist/collection/components/fields/mrd-hyperlink-field/mrd-hyperlink-field.css +0 -3
  18. package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +6 -20
  19. package/dist/collection/components/fields/mrd-list-field/mrd-list-field.css +0 -4
  20. package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.css +0 -1
  21. package/dist/collection/components/fields/mrd-relation-field/mrd-relation-field.css +9 -35
  22. package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.css +0 -9
  23. package/dist/collection/components/form/mrd-field/mrd-field.css +0 -13
  24. package/dist/collection/components/form/mrd-form/mrd-form.css +0 -19
  25. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +3 -58
  26. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +25 -66
  27. package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
  28. package/dist/collection/components/table/mrd-table/mrd-table.js +1 -1
  29. package/dist/collection/dev/app.js +76 -40
  30. package/dist/collection/index.js +1 -0
  31. package/dist/collection/utils/document-attachments.js +20 -0
  32. package/dist/collection/{components/documents/mrd-file-preview → utils}/file-preview-kind.js +4 -4
  33. package/dist/collection/utils/i18n.js +0 -32
  34. package/dist/components/document-attachments.js +1 -0
  35. package/dist/components/field-helpers.js +1 -1
  36. package/dist/components/i18n.js +1 -1
  37. package/dist/components/index.js +1 -1
  38. package/dist/components/mrd-document-container2.js +1 -1
  39. package/dist/components/mrd-document-list2.js +1 -1
  40. package/dist/components/mrd-document-view2.js +1 -1
  41. package/dist/components/mrd-email-field2.js +1 -1
  42. package/dist/components/mrd-form.js +1 -1
  43. package/dist/components/mrd-hyperlink-field2.js +1 -1
  44. package/dist/components/mrd-image-field2.js +1 -1
  45. package/dist/components/mrd-layout-section.js +1 -1
  46. package/dist/components/mrd-number-field2.js +1 -1
  47. package/dist/components/mrd-relation-field2.js +1 -1
  48. package/dist/components/mrd-table2.js +1 -1
  49. package/dist/esm/client-layout-DCOAAH92.js +84 -0
  50. package/dist/esm/{index-DiSEJMA8.js → index-DiSe6vjv.js} +36 -9
  51. package/dist/esm/index.js +30 -80
  52. package/dist/esm/loader.js +3 -3
  53. package/dist/esm/mosterdcomponents.js +4 -4
  54. package/dist/esm/{mrd-boolean-field_24.entry.js → mrd-boolean-field_23.entry.js} +56 -183
  55. package/dist/mosterdcomponents/index.esm.js +1 -1
  56. package/dist/mosterdcomponents/mosterdcomponents.css +7 -1
  57. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  58. package/dist/mosterdcomponents/p-DCOAAH92.js +1 -0
  59. package/dist/mosterdcomponents/p-DiSe6vjv.js +2 -0
  60. package/dist/mosterdcomponents/p-b56f9802.entry.js +1 -0
  61. package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -2
  62. package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -2
  63. package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +21 -27
  64. package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +12 -15
  65. package/dist/types/components.d.ts +49 -187
  66. package/dist/types/index.d.ts +2 -0
  67. package/dist/types/stencil-public-runtime.d.ts +1 -0
  68. package/dist/types/types/client-layout.d.ts +8 -0
  69. package/dist/types/utils/document-attachments.d.ts +8 -0
  70. package/dist/types/utils/file-preview-kind.d.ts +9 -0
  71. package/package.json +10 -12
  72. package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.css +0 -59
  73. package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.js +0 -212
  74. package/dist/components/mrd-file-preview.d.ts +0 -11
  75. package/dist/components/mrd-file-preview.js +0 -1
  76. package/dist/components/mrd-file-preview2.js +0 -1
  77. package/dist/mosterdcomponents/p-DiSEJMA8.js +0 -2
  78. package/dist/mosterdcomponents/p-e816d459.entry.js +0 -1
  79. package/dist/types/components/documents/mrd-file-preview/file-preview-kind.d.ts +0 -9
  80. package/dist/types/components/documents/mrd-file-preview/mrd-file-preview.d.ts +0 -41
@@ -1,212 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { t } from "../../../utils/i18n";
3
- import { detectPreviewKind } from "./file-preview-kind";
4
- /**
5
- * Renders a signed URL inline as a PDF (native browser viewer, via `<iframe>`)
6
- * or an image (`<img>`), picked from `mimeType`/`fileName`. Purely
7
- * presentational: the signed URL is used directly as element `src` — a
8
- * navigation, not a fetch/XHR, so no CORS handling is needed here. Fetching
9
- * the signed URL itself is the host's responsibility, same as `mrdLoadImage` /
10
- * `setImagePreview` on mrd-layout-section.
11
- */
12
- export class MrdFilePreview {
13
- constructor() {
14
- /** Signed URL to render. */
15
- this.src = '';
16
- /** Declared mime type (e.g. 'application/pdf', 'image/png'), when known.
17
- * Authoritative over `fileName` when present. */
18
- this.mimeType = '';
19
- /** Original file name — used for extension-based detection when `mimeType`
20
- * is absent, and as alt/title text. */
21
- this.fileName = '';
22
- /** The file's own reference href (not the signed preview URL in `src`).
23
- * When set, an unsupported type falls back to the same download button
24
- * used elsewhere in the library, so hosts need no new wiring. */
25
- this.href = '';
26
- this.locale = navigator.language;
27
- this.imageFailed = false;
28
- this.onImageError = () => {
29
- this.imageFailed = true;
30
- };
31
- this.retry = () => {
32
- this.imageFailed = false;
33
- this.mrdPreviewReload.emit();
34
- };
35
- }
36
- srcChanged() {
37
- this.imageFailed = false;
38
- }
39
- render() {
40
- const kind = detectPreviewKind(this.mimeType, this.fileName);
41
- if (kind === 'pdf') {
42
- return (h(Host, null, h("iframe", { class: "mrd-file-preview__frame", src: this.src, title: this.fileName || 'preview' })));
43
- }
44
- if (kind === 'image') {
45
- if (this.imageFailed) {
46
- return (h(Host, null, h("div", { class: "mrd-file-preview__error" }, h("span", { class: "mrd-file-preview__error-text" }, t('preview_error', this.locale)), h("button", { type: "button", class: "mrd-file-preview__retry", onClick: this.retry }, t('retry', this.locale)))));
47
- }
48
- return (h(Host, null, h("img", { class: "mrd-file-preview__image", src: this.src, alt: this.fileName || '', onError: this.onImageError })));
49
- }
50
- return (h(Host, null, h("div", { class: "mrd-file-preview__unsupported" }, h("span", null, t('preview_unsupported', this.locale)), this.href && (h("button", { type: "button", class: "mrd-file-preview__download", onClick: () => this.mrdDownload.emit({ href: this.href, fileName: this.fileName }) }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M12 3v12m0 0l-4-4m4 4l4-4M4 21h16" })), t('download', this.locale))))));
51
- }
52
- static get is() { return "mrd-file-preview"; }
53
- static get encapsulation() { return "scoped"; }
54
- static get originalStyleUrls() {
55
- return {
56
- "$": ["mrd-file-preview.scss"]
57
- };
58
- }
59
- static get styleUrls() {
60
- return {
61
- "$": ["mrd-file-preview.css"]
62
- };
63
- }
64
- static get properties() {
65
- return {
66
- "src": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": "Signed URL to render."
79
- },
80
- "getter": false,
81
- "setter": false,
82
- "reflect": false,
83
- "attribute": "src",
84
- "defaultValue": "''"
85
- },
86
- "mimeType": {
87
- "type": "string",
88
- "mutable": false,
89
- "complexType": {
90
- "original": "string",
91
- "resolved": "string",
92
- "references": {}
93
- },
94
- "required": false,
95
- "optional": false,
96
- "docs": {
97
- "tags": [],
98
- "text": "Declared mime type (e.g. 'application/pdf', 'image/png'), when known.\nAuthoritative over `fileName` when present."
99
- },
100
- "getter": false,
101
- "setter": false,
102
- "reflect": false,
103
- "attribute": "mime-type",
104
- "defaultValue": "''"
105
- },
106
- "fileName": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": false,
116
- "docs": {
117
- "tags": [],
118
- "text": "Original file name \u2014 used for extension-based detection when `mimeType`\nis absent, and as alt/title text."
119
- },
120
- "getter": false,
121
- "setter": false,
122
- "reflect": false,
123
- "attribute": "file-name",
124
- "defaultValue": "''"
125
- },
126
- "href": {
127
- "type": "string",
128
- "mutable": false,
129
- "complexType": {
130
- "original": "string",
131
- "resolved": "string",
132
- "references": {}
133
- },
134
- "required": false,
135
- "optional": false,
136
- "docs": {
137
- "tags": [],
138
- "text": "The file's own reference href (not the signed preview URL in `src`).\nWhen set, an unsupported type falls back to the same download button\nused elsewhere in the library, so hosts need no new wiring."
139
- },
140
- "getter": false,
141
- "setter": false,
142
- "reflect": false,
143
- "attribute": "href",
144
- "defaultValue": "''"
145
- },
146
- "locale": {
147
- "type": "string",
148
- "mutable": false,
149
- "complexType": {
150
- "original": "string",
151
- "resolved": "string",
152
- "references": {}
153
- },
154
- "required": false,
155
- "optional": false,
156
- "docs": {
157
- "tags": [],
158
- "text": ""
159
- },
160
- "getter": false,
161
- "setter": false,
162
- "reflect": false,
163
- "attribute": "locale",
164
- "defaultValue": "navigator.language"
165
- }
166
- };
167
- }
168
- static get states() {
169
- return {
170
- "imageFailed": {}
171
- };
172
- }
173
- static get events() {
174
- return [{
175
- "method": "mrdPreviewReload",
176
- "name": "mrdPreviewReload",
177
- "bubbles": true,
178
- "cancelable": true,
179
- "composed": true,
180
- "docs": {
181
- "tags": [],
182
- "text": "The image failed to load \u2014 most likely an expired signed URL. Host\nshould fetch a fresh signed URL and update `src`.\nNote: this is only raised for images. Browsers don't reliably surface\nHTTP-level failures (e.g. a 403 on an expired URL) through an iframe's\nload/error events, so the same detection isn't available for PDFs."
183
- },
184
- "complexType": {
185
- "original": "void",
186
- "resolved": "void",
187
- "references": {}
188
- }
189
- }, {
190
- "method": "mrdDownload",
191
- "name": "mrdDownload",
192
- "bubbles": true,
193
- "cancelable": true,
194
- "composed": true,
195
- "docs": {
196
- "tags": [],
197
- "text": "Download the file. Same shape as mrd-document-view / mrd-layout-section's\nmrdDownload \u2014 host resolves `href` to a signed URL."
198
- },
199
- "complexType": {
200
- "original": "{ href: string; fileName: string }",
201
- "resolved": "{ href: string; fileName: string; }",
202
- "references": {}
203
- }
204
- }];
205
- }
206
- static get watchers() {
207
- return [{
208
- "propName": "src",
209
- "methodName": "srcChanged"
210
- }];
211
- }
212
- }
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface MrdFilePreview extends Components.MrdFilePreview, HTMLElement {}
4
- export const MrdFilePreview: {
5
- prototype: MrdFilePreview;
6
- new (): MrdFilePreview;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1 +0,0 @@
1
- import{M as r,d as e}from"./mrd-file-preview2.js";const o=r,s=e;export{o as MrdFilePreview,s as defineCustomElement}
@@ -1 +0,0 @@
1
- import{proxyCustomElement as e,HTMLElement as r,createEvent as i,h as t,Host as s,transformTag as d}from"@stencil/core/internal/client";import{t as o}from"./i18n.js";const l=new Set(["png","jpg","jpeg","gif","webp","svg","bmp"]),n=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdPreviewReload=i(this,"mrdPreviewReload",7),this.mrdDownload=i(this,"mrdDownload",7),this.src="",this.mimeType="",this.fileName="",this.href="",this.locale=navigator.language,this.imageFailed=!1,this.onImageError=()=>{this.imageFailed=!0},this.retry=()=>{this.imageFailed=!1,this.mrdPreviewReload.emit()}}srcChanged(){this.imageFailed=!1}render(){const e=function(e,r){const i=(null!=e?e:"").toLowerCase().trim();if(i)return"application/pdf"===i?"pdf":i.startsWith("image/")?"image":"unsupported";const t=function(e){if(!e)return null;const r=/\.([a-z0-9]+)$/i.exec(e);return r?r[1].toLowerCase():null}(r);return"pdf"===t?"pdf":t&&l.has(t)?"image":"unsupported"}(this.mimeType,this.fileName);return t(s,null,"pdf"===e?t("iframe",{class:"mrd-file-preview__frame",src:this.src,title:this.fileName||"preview"}):"image"===e?this.imageFailed?t("div",{class:"mrd-file-preview__error"},t("span",{class:"mrd-file-preview__error-text"},o("preview_error",this.locale)),t("button",{type:"button",class:"mrd-file-preview__retry",onClick:this.retry},o("retry",this.locale))):t("img",{class:"mrd-file-preview__image",src:this.src,alt:this.fileName||"",onError:this.onImageError}):t("div",{class:"mrd-file-preview__unsupported"},t("span",null,o("preview_unsupported",this.locale)),this.href&&t("button",{type:"button",class:"mrd-file-preview__download",onClick:()=>this.mrdDownload.emit({href:this.href,fileName:this.fileName})},t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M4 21h16"})),o("download",this.locale))))}static get watchers(){return{src:[{srcChanged:0}]}}static get style(){return".sc-mrd-file-preview-h{display:block;width:100%;height:100%}.mrd-file-preview__frame.sc-mrd-file-preview{display:block;width:100%;height:100%;border:none}.mrd-file-preview__image.sc-mrd-file-preview{display:block;max-width:100%;max-height:100%;margin:0 auto;object-fit:contain}.mrd-file-preview__error.sc-mrd-file-preview,.mrd-file-preview__unsupported.sc-mrd-file-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--mrd-space-3);width:100%;height:100%;min-height:8rem;padding:var(--mrd-space-6);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-sm);text-align:center}.mrd-file-preview__error-text.sc-mrd-file-preview{color:var(--mrd-color-danger)}.mrd-file-preview__retry.sc-mrd-file-preview,.mrd-file-preview__download.sc-mrd-file-preview{display:inline-flex;align-items:center;gap:var(--mrd-space-2);height:2rem;padding:0 var(--mrd-space-3);border:var(--mrd-border-width) solid var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius);background:var(--mrd-color-white);color:var(--mrd-color-neutral-700);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);font-weight:var(--mrd-font-weight-medium);cursor:pointer}.mrd-file-preview__retry.sc-mrd-file-preview:hover,.mrd-file-preview__download.sc-mrd-file-preview:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-900)}.mrd-file-preview__download.sc-mrd-file-preview svg.sc-mrd-file-preview{width:0.9375rem;height:0.9375rem}"}},[2,"mrd-file-preview",{src:[1],mimeType:[1,"mime-type"],fileName:[1,"file-name"],href:[1],locale:[1],imageFailed:[32]},void 0,{src:[{srcChanged:0}]}]);function a(){"undefined"!=typeof customElements&&["mrd-file-preview"].forEach((e=>{"mrd-file-preview"===e&&(customElements.get(d(e))||customElements.define(d(e),n))}))}export{n as M,a as d}
@@ -1,2 +0,0 @@
1
- function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),s=new Map,r=new Map,c="http://www.w3.org/1999/xlink",u="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&a.u?$(w):a.raf(w))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},w=()=>{b(m),b(v),(h=m.length>0)&&a.raf(w)},$=t=>f().then(t),g=y(v,!0);function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,S,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?x(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,N);const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N={forEach:(t,e)=>t.map(P).forEach(e),map:(t,e)=>t.map(P).map(e).map(R)},P=t=>({vattrs:t.v,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.O,vtext:t.m}),R=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),C(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);return e.v=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},D=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,H=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},T=(t,e)=>{const n=H(t);return{emit:t=>A(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},A=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},U=(t,e,o,i,s,r)=>{if(o===i)return;let f=l(t,e),d=e.toLowerCase();if("class"===e){const e=t.classList,n=z(o);let l=z(i);e.remove(...n.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!n.includes(t))))}else if("style"===e){for(const e in o)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)o&&i[e]===o[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if("ref"===e)i&&tt(i,t);else if(f||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const o=e.slice(5);let l;{const e=n(t);if(e&&e.o&&e.o.t){const t=e.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==i||!1===i?!1===i&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===i?"":i))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=i}catch(t){}return}{const n=M(i);if((f||n&&null!==i)&&!s)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const n=null==i?"":i;"list"===e?f=!1:null!=o&&t[e]===n||("function"==typeof t.__lookupSetter__(e)?t[e]=n:t.setAttribute(e,n))}}catch(t){}let l=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(e=d,l=!0),null==i||!1===i?!1===i&&""!==t.getAttribute(e)||(l?t.removeAttributeNS(c,e):t.removeAttribute(e)):(!f||4&r||s)&&!n&&1===t.nodeType&&(i=!0===i?"":i,l?t.setAttributeNS(c,e,i):t.setAttribute(e,i))}}else if(e="-"===e[2]?e.slice(3):l(u,d)?d.slice(2):d[2]+e.slice(3),o||i){const n=e.endsWith(F);e=e.replace(V,""),o&&a.rel(t,e,o,n),i&&a.ael(t,e,i,n)}},W=/\s/,z=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),F="Capture",V=RegExp(F+"$"),q=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},i=e.v||{};for(const t of G(Object.keys(l)))t in i||U(o,t,l[t],void 0,n,e.u);for(const t of G(Object.keys(i)))U(o,t,l[t],i[t],n,e.u)};function G(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Y=!1,Z=[],_=[],B=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.S=u.document.createTextNode(o.m);else{if(Y||(Y="svg"===o.O),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=u.document.createElementNS(Y?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),Y&&"foreignObject"===o.O&&(Y=!1),q(null,o,Y),null!=O&&void 0!==O&&l["s-si"]!==O&&l.classList.add(l["s-si"]=O),o.$){const e="template"===o.O?l.content:l;for(s=0;s<o.$.length;++s)i=B(t,o,s),i&&e.appendChild(i)}"svg"===o.O?Y=!1:"foreignObject"===l.tagName&&(Y=!0)}return l["s-hn"]=S,l},I=(t,e,n,o,l,i)=>{let s,r=t;for("template"===n.O&&(r=r.content);l<=i;++l)o[l]&&(s=B(null,n,l),s&&(o[l].S=s,et(r,s,e)))},J=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;X(e),t&&t.remove()}}},K=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),Q=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,i=e.$,s=e.O,r=e.m;null==r?(q(t,e,Y="svg"===s||"foreignObject"!==s&&Y),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,m=o[0],v=o[h];const y="template"===n.O?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(K(d,m,l))Q(d,m,l),d=e[++r],m=o[++c];else if(K(p,v,l))Q(p,v,l),p=e[--f],v=o[--h];else if(K(d,v,l))Q(d,v,l),et(y,d.S,p.S.nextSibling),d=e[++r],v=o[--h];else if(K(p,m,l))Q(p,m,l),et(y,p.S,d.S),p=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.O!==m.O?i=B(e&&e[c],n,u):(Q(s,m,l),e[u]=void 0,i=s.S),m=o[++c]):(i=B(e&&e[c],n,c),m=o[++c]),i&&et(d.S.parentNode,i,d.S)}r>f?I(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&J(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),I(o,null,e,i,0,i.length-1)):!n&&null!==l&&J(l,0,l.length-1),Y&&"svg"===s&&(Y=!1)):t.m!==r&&(o.data=r)},X=t=>{t.v&&t.v.ref&&Z.push((()=>t.v.ref(null))),t.$&&t.$.map(X)},tt=(t,e)=>{_.push((()=>t(e)))},et=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),nt=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},ot=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);nt(t,t.C);const n=()=>lt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},lt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.L.length&&t.L.forEach((t=>t(n))),l=ft(o,"componentWillLoad",void 0,n)):l=ft(o,"componentWillUpdate",void 0,n),l=it(l,(()=>ft(o,"componentWillRender",void 0,n))),it(l,(()=>rt(t,o,e)))},it=(t,e)=>st(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),st=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=E(e),s=r.get(i);if(!u.document)return i;if(t=11===t.nodeType?t:u.document,s)if("string"==typeof s){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(i)){l=u.document.createElement("style"),l.textContent=s;const c=null!=(n=a.N)?n:j(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ct(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ut(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ct=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||x(null,null),i=(t=>t&&t.O===L)(e)?e:C(null,null,e);if(S=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.O=null,i.u|=4,t.P=i,i.S=l.S=o,O=o["s-sc"],Q(l,i,n),Z.forEach((t=>t())),Z.length=0,_.forEach((t=>t())),_.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},ut=t=>{const e=t.$hostElement$,n=t.i,o=t.C;ft(n,"componentDidRender",void 0,e),64&t.u?ft(n,"componentDidUpdate",void 0,e):(t.u|=64,dt(e),ft(n,"componentDidLoad",void 0,e),t.R(e),o||at()),t.D(e),t.M&&(t.M(),t.M=void 0),512&t.u&&$((()=>ot(t,!1))),t.u&=-517},at=()=>{$((()=>A(u,"appload",{detail:{namespace:"mosterdcomponents"}})))},ft=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const s=n(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,a=s.i;if(o=D(o,l.t[e][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(s.l.set(e,o),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[n,l]]=Object.entries(t);(128&u||1&l)&&(a?a[n](o,c,e):s.L.push((()=>{s.i[n](o,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,c,e)&&!(16&u))return;16&u||ot(s,!1)}}},ht=(e,o,l)=>{var i,s;const r=e.prototype;{e.watchers&&!o.H&&(o.H=e.watchers),e.deserializers&&!o.T&&(o.T=e.deserializers),e.serializers&&!o.A&&(o.A=e.serializers);const c=Object.entries(null!=(i=o.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(o.t[e][0]|=2048),c&&(o.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&o.t[e][0]))return((t,e)=>n(this).l.get(e))(0,e);const t=n(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=n(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,D(t,i)),void pt(this,e,t=32&i?this[e]:s.$hostElement$[e],o);{if(!(1&l&&4096&o.t[e][0]))return pt(this,e,t,o),void(1&l&&!s.i&&s.L.push((()=>{4096&o.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const n=()=>{const n=s.i[e];!s.l.get(e)&&n&&s.l.set(e,n),s.i[e]=D(t,i),pt(this,e,s.i[e],o)};s.i?n():s.L.push((()=>{n()}))}}}})}else 1&l&&64&i&&Object.defineProperty(r,e,{value(...t){var o;const l=n(this);return null==(o=null==l?void 0:l.U)?void 0:o.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&i!==l){const n=a.i,r=null==(s=o.H)?void 0:s[e];null==r||r.forEach((o=>{const[[s,r]]=Object.entries(o);null!=n[s]&&(128&t||1&r)&&n[s].call(n,i,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(r,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=o.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},mt=(t,e)=>{ft(t,"connectedCallback",void 0,e)},vt=(t,e)=>{ft(t,"disconnectedCallback",void 0,e||t)},yt=(t,e={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],c=e.exclude||[],f=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var o,u,p;const h={u:e[0],h:e[1],t:e[2],W:e[3]};h.t=e[2],h.H=null!=(o=e[4])?o:{},h.A=null!=(u=e[5])?u:{},h.T=null!=(p=e[6])?p:{};const m=h.h,w=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,F:new Map};n.U=new Promise((t=>n.D=t)),n.V=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.L=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,h)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=n(t);if(!e)return;const o=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?mt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>mt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){nt(e,e.C=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.q){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.q;if(!o)return;const l=s.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.G}" was not found`);o.isProxied||(n.H=o.watchers,n.A=o.serializers,n.T=o.deserializers,ht(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,r(),mt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,c=()=>ot(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(n){i(n,t),e.M&&(e.M(),e.M=void 0),e.R&&e.R(t)}})(t,e,o)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=n(t);(null==e?void 0:e.i)?vt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>vt(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.S)instanceof Node&&!e.P.S.isConnected&&delete e.P.S}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.V}};h.q=t[0],c.includes(m)||f.get(m)||(l.push(m),f.define(m,ht(w,h,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=a.N)?o:j(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):a.jmp((()=>y=setTimeout(at,30)))},bt=t=>a.N=t;export{L as H,yt as b,T as c,H as g,C as h,f as p,o as r,bt as s,g as w}