@genesislcap/design-system-configurator 15.79.1 → 15.80.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.
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[65],{31274(e,t,o){o.d(t,{u:()=>i});var r=o(60416);const i=(e,t,o)=>{(0,r.u_)(e);const i=t.split("-")[0],a=document.createElement(`${i}-dialog`),n=o?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(o):(0,r.jE)("dialog-container",t);n.appendChild(a),a.notification=e,a.show()}},60416(e,t,o){o.d(t,{cL:()=>u,jE:()=>p,uP:()=>d,u_:()=>c});var r=o(66506),i=o(52945),a=o(68424);const n=(0,r.createLogger)("foundation-notifications");let s=null;const l=new Map,d=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.body)&&void 0!==o?o:"Something went wrong"}`},c=e=>{var t,o;n.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.logLevel)||r.LogLevels.debug)})},p=(e,t)=>{let o=document.querySelector(`#${e}`);if(!o)if(l.has(e))o=l.get(e);else{const t=(0,i.fI)(document).find(t=>t.id===e);t&&(o=t,l.set(e,t))}if(!o){o=document.createElement("div"),o.setAttribute("id",e),o.style.zIndex="9999";const{element:t,prefix:r}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(o),s=t;else if(s)s.appendChild(o);else{const e=document.createElement(`${r}-design-system-provider`);e.appendChild(o),document.body.appendChild(e),s=e}}return o},u=e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const r=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(r)return r.style.position="relative",r;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return m()},m=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},70997(e,t,o){function r(e,t,o){const r=e=>"function"==typeof e?e:()=>e,i=r(t),a=r(o);return(t,o)=>e(t,o)?i(t,o):a(t,o)}o.d(t,{q:()=>r})},80273(e,t,o){o.d(t,{Du:()=>l,IT:()=>n,WP:()=>i,f4:()=>s,zz:()=>a});var r=o(52945);const i=(e,t)=>{(0,r.O5)(e,t)};var a,n;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(n||(n={}));const s=(e,t=a.Normal,o=n.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${o};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}},80065(e,t,o){o.r(t),o.d(t,{ColorPalette:()=>mr,ColorToken:()=>gr,ColorTokens:()=>wr,DesignSystemEditor:()=>Qo,DesignSystemExport:()=>cr,DesignSystemPreview:()=>Hr,EventName:()=>jo,PreviewApp:()=>Mr,PreviewComponents:()=>sr,PreviewForm:()=>Nr,PreviewGrid:()=>Ur,TypographyTokens:()=>Cr,defaultBodyFont:()=>Yo,fontFamilies:()=>Ho});var r=o(55823),i=o(57963),a=o(21409),n=o(83453),s=o.n(n),l=o(60496),d=o(33681),c=o(38370),p=o(54634),u=o(85090),m=o(31679),h=o(66506);const v=(0,h.createLogger)("foundation-form"),g=(e,t,o,r)=>{var i,a,n;if(!e||!o)return"";const s=e.filter(e=>e&&"anyOf"===e.keyword);if(0===s.length)return"";const l=null===(i=null==t?void 0:t.errorMessage)||void 0===i?void 0:i.anyOf,d=r||l,c="/"+o.replace(/\./g,"/"),p=s.find(e=>{const t=e.instancePath||"",o=e.schema;if(t===c)return!0;if(Array.isArray(o)){return o.flatMap(e=>t+"/"+Object.keys(e).flatMap(t=>e[t])).includes(c)}return!1});if(p){const e=p.schema||(null===(a=p.parentSchema)||void 0===a?void 0:a.anyOf);if(Array.isArray(e)){const t=new Set;e.forEach(e=>{(e&&Array.isArray(e.required)?e.required:[]).forEach(e=>t.add(e))});const r=o.split(".").pop();if(!r||!t.has(r))return"";const i=(null===(n=p.parentSchema)||void 0===n?void 0:n.properties)||{},a=Array.from(t).map(e=>((e,t)=>{const o=t[e]||{},r=["required"];return"number"==typeof o.minLength&&r.push("minLength"),"number"==typeof o.maxLength&&r.push("maxLength"),"number"==typeof o.minimum&&r.push("minimum"),"number"==typeof o.maximum&&r.push("maximum"),"number"!=typeof o.exclusiveMinimum&&!0!==o.exclusiveMinimum||r.push("exclusiveMinimum"),"number"!=typeof o.exclusiveMaximum&&!0!==o.exclusiveMaximum||r.push("exclusiveMaximum"),"string"==typeof o.pattern&&r.push("pattern"),o.type&&r.push(`type:${o.type}`),`${e}${r.length>1?` (${r.join(", ")})`:""}`})(e,i));if(1===a.length)return d||`Field ${a[0]} is required.`;const s=2===a.length?`${a[0]} or ${a[1]}`:`${a.slice(0,-1).join(", ")}, or ${a[a.length-1]}`;return d||`One of ${s} must be provided.`}return d||p.message||""}return""},b=(y="foundation-form",d.css`
1
+ "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[65],{31274(e,t,o){o.d(t,{u:()=>i});var r=o(60416);const i=(e,t,o)=>{(0,r.u_)(e);const i=t.split("-")[0],a=document.createElement(`${i}-dialog`),n=o?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(o):(0,r.jE)("dialog-container",t);n.appendChild(a),a.notification=e,a.show()}},60416(e,t,o){o.d(t,{cL:()=>u,jE:()=>p,uP:()=>d,u_:()=>c});var r=o(66506),i=o(52945),a=o(68424);const n=(0,r.createLogger)("foundation-notifications");let s=null;const l=new Map,d=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.body)&&void 0!==o?o:"Something went wrong"}`},c=e=>{var t,o;n.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.logLevel)||r.LogLevels.debug)})},p=(e,t)=>{let o=document.querySelector(`#${e}`);if(!o)if(l.has(e))o=l.get(e);else{const t=(0,i.fI)(document).find(t=>t.id===e);t&&(o=t,l.set(e,t))}if(!o){o=document.createElement("div"),o.setAttribute("id",e),o.style.zIndex="9999";const{element:t,prefix:r}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(o),s=t;else if(s)s.appendChild(o);else{const e=document.createElement(`${r}-design-system-provider`);e.appendChild(o),document.body.appendChild(e),s=e}}return o},u=e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const r=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(r)return r.style.position="relative",r;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return m()},m=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},70997(e,t,o){function r(e,t,o){const r=e=>"function"==typeof e?e:()=>e,i=r(t),a=r(o);return(t,o)=>e(t,o)?i(t,o):a(t,o)}o.d(t,{q:()=>r})},80273(e,t,o){o.d(t,{Du:()=>l,IT:()=>n,WP:()=>i,f4:()=>s,zz:()=>a});var r=o(52945);const i=(e,t)=>{(0,r.O5)(e,t)};var a,n;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(n||(n={}));const s=(e,t=a.Normal,o=n.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${o};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}},80065(e,t,o){o.r(t),o.d(t,{ColorPalette:()=>vr,ColorToken:()=>yr,ColorTokens:()=>Sr,DesignSystemEditor:()=>er,DesignSystemExport:()=>ur,DesignSystemPreview:()=>Gr,EventName:()=>Bo,PreviewApp:()=>Er,PreviewComponents:()=>dr,PreviewForm:()=>zr,PreviewGrid:()=>Hr,TypographyTokens:()=>Ir,defaultBodyFont:()=>Vo,fontFamilies:()=>Go});var r=o(55823),i=o(36716),a=o(21409),n=o(83453),s=o.n(n),l=o(60496),d=o(33681),c=o(38370),p=o(54634),u=o(85090),m=o(31679),h=o(66506);const v=(0,h.createLogger)("foundation-form"),g=(e,t,o,r)=>{var i,a,n;if(!e||!o)return"";const s=e.filter(e=>e&&"anyOf"===e.keyword);if(0===s.length)return"";const l=null===(i=null==t?void 0:t.errorMessage)||void 0===i?void 0:i.anyOf,d=r||l,c="/"+o.replace(/\./g,"/"),p=s.find(e=>{const t=e.instancePath||"",o=e.schema;if(t===c)return!0;if(Array.isArray(o)){return o.flatMap(e=>t+"/"+Object.keys(e).flatMap(t=>e[t])).includes(c)}return!1});if(p){const e=p.schema||(null===(a=p.parentSchema)||void 0===a?void 0:a.anyOf);if(Array.isArray(e)){const t=new Set;e.forEach(e=>{(e&&Array.isArray(e.required)?e.required:[]).forEach(e=>t.add(e))});const r=o.split(".").pop();if(!r||!t.has(r))return"";const i=(null===(n=p.parentSchema)||void 0===n?void 0:n.properties)||{},a=Array.from(t).map(e=>((e,t)=>{const o=t[e]||{},r=["required"];return"number"==typeof o.minLength&&r.push("minLength"),"number"==typeof o.maxLength&&r.push("maxLength"),"number"==typeof o.minimum&&r.push("minimum"),"number"==typeof o.maximum&&r.push("maximum"),"number"!=typeof o.exclusiveMinimum&&!0!==o.exclusiveMinimum||r.push("exclusiveMinimum"),"number"!=typeof o.exclusiveMaximum&&!0!==o.exclusiveMaximum||r.push("exclusiveMaximum"),"string"==typeof o.pattern&&r.push("pattern"),o.type&&r.push(`type:${o.type}`),`${e}${r.length>1?` (${r.join(", ")})`:""}`})(e,i));if(1===a.length)return d||`Field ${a[0]} is required.`;const s=2===a.length?`${a[0]} or ${a[1]}`:`${a.slice(0,-1).join(", ")}, or ${a[a.length-1]}`;return d||`One of ${s} must be provided.`}return d||p.message||""}return""},b=(y="foundation-form",d.css`
2
2
  ${y} .foundation-control-wrapper-root {
3
3
  margin-bottom: var(--wrapper-root-margin-bottom, calc(var(--design-unit) * 4px));
4
4
  }
@@ -1180,17 +1180,16 @@
1180
1180
  `})}
1181
1181
  </template>
1182
1182
  `)(e.prefix)}
1183
- `,tester:(0,l.Hc7)(3,_e),mapper:l.kOB},Ne=e=>t=>{if(!t||!(0,l.c0N)(t))return!1;const o=t.options;return!(!o||!o[e])},Pe=(0,l.Uo6)((0,l.or)(Ne("allOptionsResourceName"),Ne("data")),(0,l.or)(Ne("delimiter"),(0,l.f4S)(e=>(0,l.dfR)(e,"array")),(0,l.f4S)(e=>e.hasOwnProperty("oneOf")&&e.oneOf.some(e=>(0,l.dfR)(e,"array")))));le.MultiselectDatasource;const ze={renderer:d.html`
1184
- ${e=>((e="rapid")=>d.html`
1183
+ `,tester:(0,l.Hc7)(3,_e),mapper:l.kOB},Ne=e=>t=>{if(!t||!(0,l.c0N)(t))return!1;const o=t.options;return!(!o||!o[e])},Pe=(0,l.Uo6)((0,l.or)(Ne("allOptionsResourceName"),Ne("data")),(0,l.or)(Ne("delimiter"),(0,l.f4S)(e=>(0,l.dfR)(e,"array")),(0,l.f4S)(e=>e.hasOwnProperty("oneOf")&&e.oneOf.some(e=>(0,l.dfR)(e,"array")))));le.MultiselectDatasource;const ze=e=>null==e||""===String(e).trim(),Oe=(e="rapid")=>d.html`
1185
1184
  <template>
1186
1185
  ${f({prefix:e,innerTemplate:d.html`
1187
1186
  <${e}-multiselect
1188
1187
  style="width: 100%"
1189
1188
  async=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.async}}
1190
1189
  ?disabled=${e=>!e.control.enabled}
1191
- :selectedOptions=${e=>(e=>{var t,o;const r=null===(o=null===(t=null==e?void 0:e.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.delimiter,i=null==e?void 0:e.data;return r?i?i.split(r):[]:i||[]})(e.control)}
1190
+ :selectedOptions=${e=>(e=>{var t,o;const r=null===(o=null===(t=null==e?void 0:e.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.delimiter,i=null==e?void 0:e.data;return r?"string"==typeof i?i.split(r).filter(e=>!ze(e)):Array.isArray(i)?i:[]:i||[]})(e.control)}
1192
1191
  tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
1193
- @selectionChange=${(e,t)=>{const o=((e,t)=>{var o,r;const i=null===(r=null===(o=null==e?void 0:e.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.delimiter;return i?t&&t.length?t.join(i):void 0:t})(e.control,t.event.detail);e.control.handleChange(e.control.path,o),e.$emit("change"),e.onBlur()}}
1192
+ @selectionChange=${(e,t)=>{const o=((e,t)=>{var o,r;const i=null===(r=null===(o=null==e?void 0:e.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.delimiter;if(!i)return t;const a=Array.isArray(t)?t.filter(e=>!ze(e)):[];return a.length?a.join(i):void 0})(e.control,t.event.detail);e.control.handleChange(e.control.path,o),e.$emit("change"),e.onBlur()}}
1194
1193
  id=${e=>e.control.path}
1195
1194
  data-test-id=${e=>e.control.path}
1196
1195
  >
@@ -1204,8 +1203,9 @@
1204
1203
  </${e}-multiselect>
1205
1204
  `})}
1206
1205
  </template>
1207
- `)(e.prefix)}
1208
- `,tester:(0,l.Hc7)(4,Pe),mapper:l.kOB};le.OptionsDatasource;const Oe=new WeakMap,Fe=(e="rapid")=>d.html`
1206
+ `,Fe={renderer:d.html`
1207
+ ${e=>Oe(e.prefix)}
1208
+ `,tester:(0,l.Hc7)(4,Pe),mapper:l.kOB};le.OptionsDatasource;const je=new WeakMap,Ue=(e="rapid")=>d.html`
1209
1209
  <template>
1210
1210
  <style>
1211
1211
  ${A(e)}
@@ -1218,7 +1218,7 @@
1218
1218
  autocomplete=${e=>{var t;return"startsWith"===(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)?"both":"list"}}
1219
1219
  filter-mode=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)||"contains"}}
1220
1220
  ?disabled=${e=>!e.control.enabled}
1221
- :value=${e=>(e=>{var t;const o=e.control.data;if(!o)return"";const r=null===(t=e.control.uischema.options)||void 0===t?void 0:t.data;if(r){const e=r.find(e=>e.value===o);return String((null==e?void 0:e.label)||o)}const i=Oe.get(e),a=e.control.path,n="undefined"!=typeof CSS?CSS.escape(a):a,s=e.querySelector(`#${n}`);return((e,t,o)=>t===e&&!!o)(o,i,null==s?void 0:s.value)?s.value:(Oe.set(e,o),String(o))})(e)}
1221
+ :value=${e=>(e=>{var t;const o=e.control.data;if(!o)return"";const r=null===(t=e.control.uischema.options)||void 0===t?void 0:t.data;if(r){const e=r.find(e=>e.value===o);return String((null==e?void 0:e.label)||o)}const i=je.get(e),a=e.control.path,n="undefined"!=typeof CSS?CSS.escape(a):a,s=e.querySelector(`#${n}`);return((e,t,o)=>t===e&&!!o)(o,i,null==s?void 0:s.value)?s.value:(je.set(e,o),String(o))})(e)}
1222
1222
  tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
1223
1223
  @value-change=${(e,t)=>{var o;const r=null===(o=t.event.detail)||void 0===o?void 0:o.value;e.control.handleChange(e.control.path,r),e.onBlur()}}
1224
1224
  id=${e=>e.control.path}
@@ -1241,15 +1241,15 @@
1241
1241
  </${e}-combobox>
1242
1242
  `})}
1243
1243
  </template>
1244
- `,je={renderer:d.html`
1245
- ${e=>Fe(e.prefix)}
1246
- `,tester:(0,l.Hc7)(4,(0,l.or)(Ne("allOptionsResourceName"),Ne("data"))),mapper:l.kOB},Ue=e=>{var t,o;return(null===(t=e.schema)||void 0===t?void 0:t.hasOwnProperty("oneOf"))?e.schema.oneOf.some(e=>e.genesisType===ie.DATETIME)?"datetime-local":"date":(null===(o=e.schema)||void 0===o?void 0:o.genesisType)===ie.DATETIME?"datetime-local":"date"};const Be=(e="rapid")=>d.html`
1244
+ `,Be={renderer:d.html`
1245
+ ${e=>Ue(e.prefix)}
1246
+ `,tester:(0,l.Hc7)(4,(0,l.or)(Ne("allOptionsResourceName"),Ne("data"))),mapper:l.kOB},He=e=>{var t,o;return(null===(t=e.schema)||void 0===t?void 0:t.hasOwnProperty("oneOf"))?e.schema.oneOf.some(e=>e.genesisType===ie.DATETIME)?"datetime-local":"date":(null===(o=e.schema)||void 0===o?void 0:o.genesisType)===ie.DATETIME?"datetime-local":"date"};const Ye=(e="rapid")=>d.html`
1247
1247
  <template>
1248
1248
  ${f({prefix:e,innerTemplate:d.html`
1249
1249
  <${e}-text-field
1250
- :value=${e=>function(e){if(null==e.data||""===e.data)return"";const t=Ue(e),o=new Date(e.data),r=e=>e.toString().padStart(2,"0"),i="datetime-local"!==t,a=i?o.getUTCFullYear():o.getFullYear(),n=r((i?o.getUTCMonth():o.getMonth())+1),s=r(i?o.getUTCDate():o.getDate()),l=r(o.getHours()),d=r(o.getMinutes());return`${a}-${n}-${s}`+("datetime-local"===t?`T${l}:${d}`:"")}(e.control)}
1250
+ :value=${e=>function(e){if(null==e.data||""===e.data)return"";const t=He(e),o=new Date(e.data),r=e=>e.toString().padStart(2,"0"),i="datetime-local"!==t,a=i?o.getUTCFullYear():o.getFullYear(),n=r((i?o.getUTCMonth():o.getMonth())+1),s=r(i?o.getUTCDate():o.getDate()),l=r(o.getHours()),d=r(o.getMinutes());return`${a}-${n}-${s}`+("datetime-local"===t?`T${l}:${d}`:"")}(e.control)}
1251
1251
  id=${e=>e.control.path}
1252
- type="${e=>Ue(e.control)}"
1252
+ type="${e=>He(e.control)}"
1253
1253
  data-test-id=${e=>e.control.path}
1254
1254
  ?required=${e=>e.control.required}
1255
1255
  ?disabled=${e=>!e.control.enabled}
@@ -1259,9 +1259,9 @@
1259
1259
  ></${e}-text-field>
1260
1260
  `})}
1261
1261
  </template>
1262
- `,He={renderer:d.html`
1263
- ${e=>Be(e.prefix)}
1264
- `,tester:(0,l.Hc7)(4,he),mapper:l.kOB},Ye={renderer:d.html`
1262
+ `,Ge={renderer:d.html`
1263
+ ${e=>Ye(e.prefix)}
1264
+ `,tester:(0,l.Hc7)(4,he),mapper:l.kOB},Ve={renderer:d.html`
1265
1265
  ${e=>((e="rapid")=>d.html`
1266
1266
  <template>
1267
1267
  ${(0,d.when)(e=>e.control.visible,d.html`
@@ -1271,7 +1271,7 @@
1271
1271
  `)}
1272
1272
  </template>
1273
1273
  `)(e.prefix)}
1274
- `,tester:(0,l.Hc7)(5,e=>{var t;return!0===(null===(t=e.options)||void 0===t?void 0:t.divider)}),mapper:l.kOB},Ge=(0,l.or)(l.pyz,(0,l.f4S)(e=>e.hasOwnProperty("oneOf")&&e.oneOf.some(e=>e.hasOwnProperty("enum")))),Ve=(e,t)=>t?t(e.label):(0,ce.capitalCase)(e.label),We=e=>{var t,o;let r=e.control.data;if(!r&&(r=(e=>{var t,o,r,i,a,n;const s=null===(r=null===(o=null===(t=e.control.schema)||void 0===t?void 0:t.oneOf)||void 0===o?void 0:o.find(e=>e.hasOwnProperty("default")))||void 0===r?void 0:r.default;if(!s)return;const l=(0,ce.capitalCase)(s),d=null===(a=null===(i=e.control.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter,c=null===(n=e.control.options.find(e=>Ve(e,d)===l))||void 0===n?void 0:n.value;return c?(e.control.handleChange(e.control.path,c),c):void 0})(e),!r))return"";const i=e.control.options.find(e=>e.value===r);if(!i)return"";const a=null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.labelRowFormatter;return Ve(i,a)},Ze=(e="rapid")=>d.html`
1274
+ `,tester:(0,l.Hc7)(5,e=>{var t;return!0===(null===(t=e.options)||void 0===t?void 0:t.divider)}),mapper:l.kOB},We=(0,l.or)(l.pyz,(0,l.f4S)(e=>e.hasOwnProperty("oneOf")&&e.oneOf.some(e=>e.hasOwnProperty("enum")))),Ze=(e,t)=>t?t(e.label):(0,ce.capitalCase)(e.label),qe=e=>{var t,o;let r=e.control.data;if(!r&&(r=(e=>{var t,o,r,i,a,n;const s=null===(r=null===(o=null===(t=e.control.schema)||void 0===t?void 0:t.oneOf)||void 0===o?void 0:o.find(e=>e.hasOwnProperty("default")))||void 0===r?void 0:r.default;if(!s)return;const l=(0,ce.capitalCase)(s),d=null===(a=null===(i=e.control.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter,c=null===(n=e.control.options.find(e=>Ze(e,d)===l))||void 0===n?void 0:n.value;return c?(e.control.handleChange(e.control.path,c),c):void 0})(e),!r))return"";const i=e.control.options.find(e=>e.value===r);if(!i)return"";const a=null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.labelRowFormatter;return Ze(i,a)},Xe=(e="rapid")=>d.html`
1275
1275
  <template>
1276
1276
  <style>
1277
1277
  ${A(e)}
@@ -1282,21 +1282,21 @@
1282
1282
  autocomplete=${e=>{var t;return"startsWith"===(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)?"both":"list"}}
1283
1283
  filter-mode=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)||"contains"}}
1284
1284
  ?disabled=${e=>!e.control.enabled}
1285
- :value=${e=>We(e)}
1285
+ :value=${e=>qe(e)}
1286
1286
  tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
1287
- @change=${(e,t)=>((e,t)=>{var o,r,i;const a=null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.labelRowFormatter;e.control.handleChange(e.control.path,null===(i=e.control.options.find(e=>Ve(e,a)===t))||void 0===i?void 0:i.value),e.onBlur()})(e,t.event.target.value)}
1287
+ @change=${(e,t)=>((e,t)=>{var o,r,i;const a=null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.labelRowFormatter;e.control.handleChange(e.control.path,null===(i=e.control.options.find(e=>Ze(e,a)===t))||void 0===i?void 0:i.value),e.onBlur()})(e,t.event.target.value)}
1288
1288
  id=${e=>e.control.path}
1289
1289
  data-test-id=${e=>e.control.path}
1290
1290
  >
1291
1291
  ${(0,d.repeat)(e=>e.control.options,d.html`
1292
- <${e}-option>${(e,t)=>{var o,r,i,a;return Ve(e,null===(a=null===(i=null===(r=null===(o=t.parent)||void 0===o?void 0:o.control)||void 0===r?void 0:r.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter)}}</${e}-option>
1292
+ <${e}-option>${(e,t)=>{var o,r,i,a;return Ze(e,null===(a=null===(i=null===(r=null===(o=t.parent)||void 0===o?void 0:o.control)||void 0===r?void 0:r.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter)}}</${e}-option>
1293
1293
  `)}
1294
1294
  </${e}-combobox>
1295
1295
  `})}
1296
1296
  </template>
1297
- `,qe={renderer:d.html`
1298
- ${e=>Ze(e.prefix)}
1299
- `,tester:(0,l.Hc7)(3,Ge),mapper:(e,t)=>{const o=(0,l.kOB)(e,t),r=t.options||(o.schema.enum||o.schema.oneOf.find(e=>e.hasOwnProperty("enum")).enum).map(t=>(0,l.Gem)(t,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path)))||o.schema.const&&[(0,l.Gem)(o.schema.const,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path))];return Object.assign(Object.assign({},o),{options:r})}},Xe={renderer:d.html`
1297
+ `,Je={renderer:d.html`
1298
+ ${e=>Xe(e.prefix)}
1299
+ `,tester:(0,l.Hc7)(3,We),mapper:(e,t)=>{const o=(0,l.kOB)(e,t),r=t.options||(o.schema.enum||o.schema.oneOf.find(e=>e.hasOwnProperty("enum")).enum).map(t=>(0,l.Gem)(t,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path)))||o.schema.const&&[(0,l.Gem)(o.schema.const,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path))];return Object.assign(Object.assign({},o),{options:r})}},Qe={renderer:d.html`
1300
1300
  ${e=>((e="rapid")=>d.html`
1301
1301
  <template>
1302
1302
  <style>
@@ -1318,7 +1318,7 @@
1318
1318
  `})}
1319
1319
  </template>
1320
1320
  `)(e.prefix)}
1321
- `,tester:(0,l.Hc7)(10,Ne("radio")),mapper:l.kOB},Je={renderer:d.html`
1321
+ `,tester:(0,l.Hc7)(10,Ne("radio")),mapper:l.kOB},Ke={renderer:d.html`
1322
1322
  <template>
1323
1323
  <pre
1324
1324
  :value=${e=>e.control.data||""}
@@ -1327,7 +1327,7 @@
1327
1327
  style="display: none"
1328
1328
  ></pre>
1329
1329
  </template>
1330
- `,tester:(0,l.Hc7)(5,(e,t,o)=>{var r,i;return null!==(i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.hidden)&&void 0!==i&&i}),mapper:l.kOB},Qe=e=>t=>(0,l.dfR)(t,"array")&&t.hasOwnProperty("items")&&t.items.type===e,Ke=e=>(0,l.f4S)(t=>t.hasOwnProperty("oneOf")&&t.oneOf.some(Qe(e))||Qe(e)(t)),et=d.html`
1330
+ `,tester:(0,l.Hc7)(5,(e,t,o)=>{var r,i;return null!==(i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.hidden)&&void 0!==i&&i}),mapper:l.kOB},et=e=>t=>(0,l.dfR)(t,"array")&&t.hasOwnProperty("items")&&t.items.type===e,tt=e=>(0,l.f4S)(t=>t.hasOwnProperty("oneOf")&&t.oneOf.some(et(e))||et(e)(t)),ot=d.html`
1331
1331
  <template>
1332
1332
  <div style="${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.border)?"padding: 5px; border-radius: 3px; border: 1px solid var(--neutral-stroke-rest);":""}}">
1333
1333
  ${f({prefix:"rapid",innerTemplate:d.html`
@@ -1335,18 +1335,18 @@
1335
1335
  `})}
1336
1336
  </div>
1337
1337
  </template>
1338
- `,tt={renderer:et,tester:(0,l.Hc7)(2,Ke("object")),mapper:l.i8T,dispatchMapper:l.oid},ot={renderer:d.html`
1338
+ `,rt={renderer:ot,tester:(0,l.Hc7)(2,tt("object")),mapper:l.i8T,dispatchMapper:l.oid},it={renderer:d.html`
1339
1339
  <template>
1340
1340
  <categorization-wrapper :form=${e=>e} :control=${e=>e.control}></categorization-wrapper>
1341
1341
  </template>
1342
- `,tester:(0,l.Hc7)(2,e=>"Categorization"===e.type),mapper:l.n93},rt=e=>{const{innerTemplate:t,hideLabel:o=!1}=e;return d.html`
1342
+ `,tester:(0,l.Hc7)(2,e=>"Categorization"===e.type),mapper:l.n93},at=e=>{const{innerTemplate:t,hideLabel:o=!1}=e;return d.html`
1343
1343
  ${(0,d.when)(e=>{var t;return!!(null===(t=e.control)||void 0===t?void 0:t.label)&&!o},d.html`
1344
1344
  <div class="fl-layout-label">${e=>e.control.label}</div>
1345
1345
  `)}
1346
1346
  ${(0,d.when)(e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible},t)}
1347
- `},it={renderer:d.html`
1347
+ `},nt={renderer:d.html`
1348
1348
  <template>
1349
- ${rt({innerTemplate:d.html`
1349
+ ${at({innerTemplate:d.html`
1350
1350
  <div class="fl-vertical-layout">
1351
1351
  ${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
1352
1352
  <dispatch-renderer
@@ -1360,16 +1360,16 @@
1360
1360
  </div>
1361
1361
  `})}
1362
1362
  </template>
1363
- `,tester:(0,l.Hc7)(2,l.nWz),mapper:l.n93};let at=class extends d.FASTElement{constructor(){super(...arguments),this.hideLabel=!1}connectedCallback(){super.connectedCallback(),v.warn("<layout-wrapper> is deprecated and will be removed in a future major version. Migrate to the `layoutWrapperTemplate` function for light-DOM rendering.")}};(0,r.Cg)([d.observable],at.prototype,"control",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"hide-label"})],at.prototype,"hideLabel",void 0),at=(0,r.Cg)([(0,d.customElement)({name:"layout-wrapper",template:d.html`
1363
+ `,tester:(0,l.Hc7)(2,l.nWz),mapper:l.n93};let st=class extends d.FASTElement{constructor(){super(...arguments),this.hideLabel=!1}connectedCallback(){super.connectedCallback(),v.warn("<layout-wrapper> is deprecated and will be removed in a future major version. Migrate to the `layoutWrapperTemplate` function for light-DOM rendering.")}};(0,r.Cg)([d.observable],st.prototype,"control",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"hide-label"})],st.prototype,"hideLabel",void 0),st=(0,r.Cg)([(0,d.customElement)({name:"layout-wrapper",template:d.html`
1364
1364
  ${(0,d.when)(e=>e.control.label&&!e.hideLabel,d.html`
1365
1365
  <div style="color: var(--neutral-foreground-hint);">${e=>e.control.label}</div>
1366
1366
  `)}
1367
1367
  ${(0,d.when)(e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible},d.html`
1368
1368
  <slot></slot>
1369
1369
  `)}
1370
- `})],at);const nt={renderer:d.html`
1370
+ `})],st);const lt={renderer:d.html`
1371
1371
  <template>
1372
- ${rt({innerTemplate:d.html`
1372
+ ${at({innerTemplate:d.html`
1373
1373
  <div class="fl-form-grid-layout">
1374
1374
  ${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
1375
1375
  <dispatch-renderer
@@ -1383,9 +1383,9 @@
1383
1383
  </div>
1384
1384
  `})}
1385
1385
  </template>
1386
- `,tester:(0,l.Hc7)(2,e=>"FormGridLayout"===e.type),mapper:l.n93},st={renderer:d.html`
1386
+ `,tester:(0,l.Hc7)(2,e=>"FormGridLayout"===e.type),mapper:l.n93},dt={renderer:d.html`
1387
1387
  <template>
1388
- ${rt({hideLabel:!0,innerTemplate:d.html`
1388
+ ${at({hideLabel:!0,innerTemplate:d.html`
1389
1389
  <div class="fl-group-layout">
1390
1390
  ${(0,d.when)(e=>e.control.label,d.html`
1391
1391
  <div for="${e=>e.control.path+"-wrapper"}" class="fl-group-label">
@@ -1404,9 +1404,9 @@
1404
1404
  </div>
1405
1405
  `})}
1406
1406
  </template>
1407
- `,tester:(0,l.Hc7)(2,l.IZG),mapper:l.n93},lt={renderer:d.html`
1407
+ `,tester:(0,l.Hc7)(2,l.IZG),mapper:l.n93},ct={renderer:d.html`
1408
1408
  <template>
1409
- ${rt({innerTemplate:d.html`
1409
+ ${at({innerTemplate:d.html`
1410
1410
  <div class="fl-horizontal-layout">
1411
1411
  ${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
1412
1412
  <dispatch-renderer
@@ -1421,13 +1421,13 @@
1421
1421
  </div>
1422
1422
  `})}
1423
1423
  </template>
1424
- `,tester:(0,l.Hc7)(2,e=>"HorizontalLayout"===e.type),mapper:l.n93},dt={renderer:d.html`
1424
+ `,tester:(0,l.Hc7)(2,e=>"HorizontalLayout"===e.type),mapper:l.n93},pt={renderer:d.html`
1425
1425
  <template>
1426
1426
  <stepper-wrapper :form=${e=>e} :control=${e=>e.control}></stepper-wrapper>
1427
1427
  </template>
1428
- `,tester:(0,l.Hc7)(3,e=>"Stepper"===e.type),mapper:l.n93},ct={renderer:d.html`
1428
+ `,tester:(0,l.Hc7)(3,e=>"Stepper"===e.type),mapper:l.n93},ut={renderer:d.html`
1429
1429
  <template>
1430
- ${rt({innerTemplate:d.html`
1430
+ ${at({innerTemplate:d.html`
1431
1431
  <div class="fl-2-column-layout">
1432
1432
  ${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
1433
1433
  <div class="fl-2-column-item">
@@ -1443,7 +1443,7 @@
1443
1443
  </div>
1444
1444
  `})}
1445
1445
  </template>
1446
- `,tester:(0,l.Hc7)(2,e=>"LayoutVertical2Columns"===e.type),mapper:l.n93};const pt=d.html`
1446
+ `,tester:(0,l.Hc7)(2,e=>"LayoutVertical2Columns"===e.type),mapper:l.n93};const mt=d.html`
1447
1447
  <template>
1448
1448
  <vertical-categorization-wrapper
1449
1449
  :form=${e=>e}
@@ -1451,24 +1451,24 @@
1451
1451
  height=${e=>{var t,o;return null!==(o=function(e){if("object"==typeof e&&null!==e&&"vertical"===e.type)return e.height}(null===(t=e.control.uischema.options)||void 0===t?void 0:t.layout))&&void 0!==o?o:""}}
1452
1452
  ></vertical-categorization-wrapper>
1453
1453
  </template>
1454
- `,ut={renderer:pt,tester:(0,l.Hc7)(3,e=>{var t,o;return"Categorization"===e.type&&(void 0!==(o=null===(t=e.options)||void 0===t?void 0:t.layout)&&("vertical"===o||"object"==typeof o&&"vertical"===o.type))}),mapper:l.n93},mt=e=>e.control.uischema.options,ht={renderer:d.html`
1454
+ `,ht={renderer:mt,tester:(0,l.Hc7)(3,e=>{var t,o;return"Categorization"===e.type&&(void 0!==(o=null===(t=e.options)||void 0===t?void 0:t.layout)&&("vertical"===o||"object"==typeof o&&"vertical"===o.type))}),mapper:l.n93},vt=e=>e.control.uischema.options,gt={renderer:d.html`
1455
1455
  ${e=>((e="rapid")=>d.html`
1456
1456
  <template>
1457
1457
  ${f({prefix:e,innerTemplate:d.html`
1458
1458
  <${e}-multicolumn-dropdown
1459
1459
  style="width: 100%;"
1460
- resource-name=${e=>mt(e).allOptionsResourceName}
1461
- value-key=${e=>mt(e).valueField}
1462
- label-key=${e=>mt(e).labelField}
1460
+ resource-name=${e=>vt(e).allOptionsResourceName}
1461
+ value-key=${e=>vt(e).valueField}
1462
+ label-key=${e=>vt(e).labelField}
1463
1463
  ?disabled=${e=>!e.control.enabled}
1464
- ?dropdown-above=${e=>{var t,o;return null!==(o=null===(t=mt(e).dropdownPlacement)||void 0===t?void 0:t.startsWith("top"))&&void 0!==o&&o}}
1465
- ?dropdown-left=${e=>{var t,o;return null!==(o=null===(t=mt(e).dropdownPlacement)||void 0===t?void 0:t.endsWith("left"))&&void 0!==o&&o}}
1466
- ?advanced-search-req=${e=>!!mt(e).advancedSearchReq}
1467
- :searchKey=${e=>mt(e).searchKey}
1468
- :request=${e=>mt(e).request}
1469
- :columnDefinitions=${e=>mt(e).columnDefinitions}
1470
- :baseCriteria=${e=>mt(e).baseCriteria}
1471
- :dropdownWidth=${e=>mt(e).dropdownWidth}
1464
+ ?dropdown-above=${e=>{var t,o;return null!==(o=null===(t=vt(e).dropdownPlacement)||void 0===t?void 0:t.startsWith("top"))&&void 0!==o&&o}}
1465
+ ?dropdown-left=${e=>{var t,o;return null!==(o=null===(t=vt(e).dropdownPlacement)||void 0===t?void 0:t.endsWith("left"))&&void 0!==o&&o}}
1466
+ ?advanced-search-req=${e=>!!vt(e).advancedSearchReq}
1467
+ :searchKey=${e=>vt(e).searchKey}
1468
+ :request=${e=>vt(e).request}
1469
+ :columnDefinitions=${e=>vt(e).columnDefinitions}
1470
+ :baseCriteria=${e=>vt(e).baseCriteria}
1471
+ :dropdownWidth=${e=>vt(e).dropdownWidth}
1472
1472
  :value=${e=>e.control.data}
1473
1473
  id=${e=>e.control.path}
1474
1474
  data-test-id=${e=>e.control.path}
@@ -1477,22 +1477,22 @@
1477
1477
  `})}
1478
1478
  </template>
1479
1479
  `)(e.prefix)}
1480
- `,tester:(0,l.Hc7)(5,Ne("columnDefinitions")),mapper:l.kOB},vt={maximumFractionDigits:3,minimumFractionDigits:0},gt=e=>e.schema,bt=(e,t)=>null!=(null==t?void 0:t.maximumInputPrecision)?t.maximumInputPrecision:(e=>{var t,o;return ye(e)||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>ye(e)))&&void 0!==o&&o})(e)?18:12;function yt(e,t){var o;const r=t.event.currentTarget,i=String(null!==(o=null==r?void 0:r.value)&&void 0!==o?o:"");if(""===i)return e.control.handleChange(e.control.path,R(t.event,e.control.schema));const a=parseFloat(i);if(isNaN(a))return;const n=(e=>{var t,o;return(0,l.dfR)(e,"string")||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>(0,l.dfR)(e,"string")))&&void 0!==o&&o})(gt(e.control))?i:a;return e.control.handleChange(e.control.path,n)}const ft={renderer:d.html`
1480
+ `,tester:(0,l.Hc7)(5,Ne("columnDefinitions")),mapper:l.kOB},bt={maximumFractionDigits:3,minimumFractionDigits:0},yt=e=>e.schema,ft=(e,t)=>null!=(null==t?void 0:t.maximumInputPrecision)?t.maximumInputPrecision:(e=>{var t,o;return ye(e)||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>ye(e)))&&void 0!==o&&o})(e)?18:12;function $t(e,t){var o;const r=t.event.currentTarget,i=String(null!==(o=null==r?void 0:r.value)&&void 0!==o?o:"");if(""===i)return e.control.handleChange(e.control.path,R(t.event,e.control.schema));const a=parseFloat(i);if(isNaN(a))return;const n=(e=>{var t,o;return(0,l.dfR)(e,"string")||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>(0,l.dfR)(e,"string")))&&void 0!==o&&o})(yt(e.control))?i:a;return e.control.handleChange(e.control.path,n)}const wt={renderer:d.html`
1481
1481
  ${e=>((e="rapid")=>d.html`
1482
1482
  <template>
1483
1483
  ${f({prefix:e,innerTemplate:d.html`
1484
1484
  <${e}-number-field
1485
1485
  withFormatting=${e=>{var t;return!(null===(t=e.control.uischema.options)||void 0===t?void 0:t.withoutFormatting)}}
1486
- :options=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.formatOptions)||vt}}
1486
+ :options=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.formatOptions)||bt}}
1487
1487
  autocomplete=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.autocomplete)||"off"}}
1488
1488
  prefix=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.prefix}}
1489
1489
  suffix=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.suffix}}
1490
1490
  ?hide-affix-from-screen-reader=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.hideAffixFromScreenReader}}
1491
1491
  :value=${e=>null==e.control.data?"":String(e.control.data)}
1492
- :maximumInputPrecision=${e=>bt(gt(e.control),e.control.uischema.options)}
1492
+ :maximumInputPrecision=${e=>ft(yt(e.control),e.control.uischema.options)}
1493
1493
  tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
1494
- @change=${yt}
1495
- @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?yt(e,t):void 0}}
1494
+ @change=${$t}
1495
+ @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?$t(e,t):void 0}}
1496
1496
  placeholder=${e=>e.control.uischema.placeholder||""}
1497
1497
  id=${e=>e.control.path}
1498
1498
  data-test-id=${e=>e.control.path}
@@ -1505,7 +1505,7 @@
1505
1505
  `})}
1506
1506
  </template>
1507
1507
  `)(e.prefix)}
1508
- `,tester:(0,l.Hc7)(3,fe),mapper:l.kOB},$t={renderer:d.html`
1508
+ `,tester:(0,l.Hc7)(3,fe),mapper:l.kOB},xt={renderer:d.html`
1509
1509
  ${e=>((e="rapid")=>d.html`
1510
1510
  <template>
1511
1511
  <style>
@@ -1543,14 +1543,14 @@
1543
1543
  `})}
1544
1544
  </template>
1545
1545
  `)(e.prefix)}
1546
- `,tester:(0,l.Hc7)(5,Ne("segmented")),mapper:l.kOB};function wt(e,t){const o=t.event.target.value;e.control.handleChange(e.control.path,""===o?[]:o.split(",").map(e=>e.trimStart()))}const xt={renderer:d.html`
1546
+ `,tester:(0,l.Hc7)(5,Ne("segmented")),mapper:l.kOB};function St(e,t){const o=t.event.target.value;e.control.handleChange(e.control.path,""===o?[]:o.split(",").map(e=>e.trimStart()))}const Ct={renderer:d.html`
1547
1547
  ${e=>((e="rapid")=>d.html`
1548
1548
  <template>
1549
1549
  ${f({prefix:e,innerTemplate:d.html`
1550
1550
  <${e}-text-field
1551
1551
  :value=${e=>(e=>{var t;const o=e.control.data;return"string"==typeof o&&e.control.handleChange(e.control.path,o.split(",")),(null===(t=e.control.data)||void 0===t?void 0:t.toString())||""})(e)}
1552
1552
  tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
1553
- @change=${wt}
1553
+ @change=${St}
1554
1554
  placeholder=${e=>e.control.uischema.placeholder||e.control.label}
1555
1555
  id=${e=>e.control.path}
1556
1556
  data-test-id=${e=>e.control.path}
@@ -1562,11 +1562,11 @@
1562
1562
  `})}
1563
1563
  </template>
1564
1564
  `)(e.prefix)}
1565
- `,tester:(0,l.Hc7)(3,Ke("string")),mapper:l.kOB};var St=o(70997);function Ct(e,t){var o,r;const i=function(e,t="none"){const o="function"==typeof t?t(e):"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():e;return""===o?void 0:o}(t.event.target.value,null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.textTransform);e.control.handleChange(e.control.path,null!=i?i:R(t.event,e.control.schema))}const At=d.html`
1565
+ `,tester:(0,l.Hc7)(3,tt("string")),mapper:l.kOB};var At=o(70997);function It(e,t){var o,r;const i=function(e,t="none"){const o="function"==typeof t?t(e):"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():e;return""===o?void 0:o}(t.event.target.value,null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.textTransform);e.control.handleChange(e.control.path,null!=i?i:R(t.event,e.control.schema))}const kt=d.html`
1566
1566
  ${e=>((e="rapid")=>d.html`
1567
1567
  <template>
1568
1568
  ${f({prefix:e,innerTemplate:d.html`
1569
- ${(0,St.q)(e=>{var t,o;return!(null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.textarea)},d.html`
1569
+ ${(0,At.q)(e=>{var t,o;return!(null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.textarea)},d.html`
1570
1570
  <${e}-text-field
1571
1571
  part="text-field"
1572
1572
  autocomplete=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.autocomplete)||"off"}}
@@ -1575,8 +1575,8 @@
1575
1575
  ?hide-affix-from-screen-reader=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.hideAffixFromScreenReader}}
1576
1576
  type=${e=>{var t,o;return(null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.isPassword)?"password":"text"}}
1577
1577
  :value=${e=>e.control.data||""}
1578
- @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?Ct(e,t):void 0}}
1579
- @change=${Ct}
1578
+ @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?It(e,t):void 0}}
1579
+ @change=${It}
1580
1580
  placeholder=${e=>e.control.uischema.placeholder||""}
1581
1581
  id=${e=>e.control.path}
1582
1582
  data-test-id=${e=>e.control.path}
@@ -1589,8 +1589,8 @@
1589
1589
  <${e}-text-area
1590
1590
  part="text-area"
1591
1591
  :value=${e=>e.control.data||""}
1592
- @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?Ct(e,t):void 0}}
1593
- @change=${Ct}
1592
+ @input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?It(e,t):void 0}}
1593
+ @change=${It}
1594
1594
  placeholder=${e=>e.control.uischema.placeholder||""}
1595
1595
  id=${e=>e.control.path}
1596
1596
  data-test-id=${e=>e.control.path}
@@ -1604,11 +1604,11 @@
1604
1604
  `})}
1605
1605
  </template>
1606
1606
  `)(e.prefix)}
1607
- `;var It=o(85031),kt=o.n(It);function Mt(e,t){if(""===e)return e;if(!t)return e;switch(Lt(t)){case"integer":case"number":{const t=parseFloat(e);return isNaN(t)?e:t}case"boolean":{const t=e.toLowerCase();return!!["true","yes","1"].includes(t)||!["false","no","0"].includes(t)&&e}default:return e}}function Lt(e){if(e.type)return Array.isArray(e.type)?e.type[0]:e.type;const t=e.oneOf||e.anyOf;if(t)for(const e of t)if("object"==typeof e&&e.type&&"null"!==e.type)return Array.isArray(e.type)?e.type[0]:e.type}function Et(e){const t=[];function o(e){var r,i,a;if("Control"===e.type&&e.scope){const o=function(e){const t=e.match(/^#\/properties\/(.+)$/);return t?t[1]:null}(e.scope);if(o){if("items"===o&&(null===(r=e.options)||void 0===r?void 0:r.childUiSchema)){const o=e.options.childUiSchema,r="function"==typeof o?o(0,void 0,void 0):o;if(r){const e=Et(r);t.push(...e)}return}const a=!0===(null===(i=e.options)||void 0===i?void 0:i.hidden),n=e.label;t.push({fieldName:o,label:n,isHidden:a})}}if(e.elements)for(const t of e.elements)o(t);if(null===(a=e.options)||void 0===a?void 0:a.childElements)for(const t of e.options.childElements)o(t)}if(e.elements)for(const t of e.elements)o(t);const r=e.options,i=null==r?void 0:r.childElements;if(i)for(const e of i)o(e);return t}function Tt(e,t,o){const r=Lt(t);if(t.enum&&t.enum.length>0)return String(t.enum[0]);if(void 0!==t.const)return String(t.const);if(void 0!==t.default)return String(t.default);if(t.examples&&Array.isArray(t.examples)&&t.examples.length>0)return String(t.examples[0]);switch(r){case"string":return function(e,t){const o=e.toLowerCase();if(t.format)switch(t.format){case"date":return"2024-01-15";case"date-time":return"2024-01-15T10:30:00Z";case"time":return"10:30:00";case"email":return"user@example.com";case"uri":case"url":return"https://example.com";case"uuid":return"550e8400-e29b-41d4-a716-446655440000";case"hostname":return"example.com";case"ipv4":return"192.168.1.1";case"ipv6":return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}if(o.includes("email"))return"user@example.com";if(o.includes("phone")||o.includes("tel"))return"+1234567890";if(o.includes("date")||o.includes("time"))return o.includes("time")&&!o.includes("date")?"10:30:00":"2024-01-15";if(o.includes("url")||o.includes("link")||o.includes("website"))return"https://example.com";if(o.includes("name"))return o.includes("first")?"John":o.includes("last")?"Doe":"Sample Name";if(o.includes("address"))return"123 Main Street";if(o.includes("city"))return"New York";if(o.includes("country"))return"USA";if(o.includes("description")||o.includes("comment")||o.includes("notes"))return"Sample description";if(o.includes("id")||o.includes("code"))return"ABC123";const r=t.minLength||0,i=50,a=t.maxLength||i;let n=`Sample ${e}`;n.length<r&&(n=n.padEnd(r,"_"));n.length>a&&(n=n.substring(0,a));return n}(e,t);case"integer":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(Math.ceil(r));const a=Math.min(Math.max(1,r),i);return String(Math.floor(a))}(t);case"number":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(r);const a=1.5,n=Math.min(Math.max(a,r),i);return String(n)}(t);case"boolean":return"true";case"array":case"object":return"";default:return o?`sample_${e.toLowerCase()}`:""}}function Rt(e){if(!e)return"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){return`"${e.replace(/"/g,'""')}"`}return e}function _t(e){return e.replace(/^\$/,"").replace(/\[(\d+)\]/g,".$1").split(/[./]/).filter(Boolean)}function Dt(e,t,o){return(null==e?void 0:e.length)?e.map(e=>{const r=function(e,t,o){let r=null;if(t){const o=_t(t),i=e?_t(e):[];i.length<=o.length&&i.every((e,t)=>o[o.length-i.length+t]===e)||o.push(...i),"DETAILS"===o[0]&&o.shift(),r=o.length?`/${o.join("/")}`:null}else e&&(r=e.startsWith("/")?e:`/${e}`);if(!r)return null;if(o)return`${o.startsWith("/")?o.replace(/\/$/,""):`/${o.replace(/\/$/,"")}`}${r}`;return r}(e.FIELD,e.PATH,o);if(!r)return null;const i={keyword:"serverValidation",message:e.TEXT,instancePath:r,schemaPath:"",params:{code:e.CODE}};if(t)try{const e=function(e){const t=e.replace(/^\//,"").split("/").filter(Boolean);if(0===t.length)return"#";let o="#";for(let e=0;e<t.length;e+=1){const r=t[e];0===e?o+=`/properties/${r}`:/^\d+$/.test(r)?o+=`/items/${r}`:o+=`/properties/${r}`}return o}(r),o=t,a=l.XKv.schema(o,e,o);a&&(i.parentSchema=a)}catch(e){}return i}).filter(e=>null!==e):[]}var Nt=o(31274);const Pt=(e,t,o)=>new Promise(r=>{((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let r={title:e.title,body:e.body},i={};null!=e.logLevel&&(r=Object.assign({logLevel:e.logLevel},r)),e.dialog&&(i=Object.assign({dialog:e.dialog},i),r=Object.assign({config:i},r)),(0,Nt.u)(r,t,o)})({title:"Confirm Submission",body:e,dialog:{confirmingActions:[{label:"Submit",action:()=>r(!0)}],dismissingAction:{label:"Cancel",action:()=>r(!1)}}},`${t}-form`,o)});const zt={renderer:At,tester:(0,l.Hc7)(2,l.Nyt),mapper:l.kOB},Ot=[{renderer:At,tester:(0,l.Hc7)(1,l.c0N),mapper:l.kOB},zt,De,xt,tt,ot,ut,st,lt,nt,ct,it,dt,ft,ze,qe,Xe,je,He,Je,Ye,ht,$t];let Ft=class extends((0,a.S)(c.FoundationElement)){constructor(){super(...arguments),this.prefix="rapid",this.approvalMessageLabel="Approval Message",this.serverFieldErrors=[],this.approvalMessage="",this.pendingPayload=null,this.renderers=Ot,this.additionalRenderers=[],this.mergedRenderers=Ot,this.errors=[],this.data={},this.submitButtonText="Submit",this.bulkSubmitButtonText="Submit All",this.resetButtonText="Reset",this.bulkInsertMinItems=1,this.reviewButtonText="Review",this.reviewHeading="Review",this.rowSubmitStatuses=new Map,this.reviewMode=!1,this.reviewSections=[]}resourceNameChanged(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(this.jsonSchema=void 0,this.originalDetailsSchema=void 0,this.resourceName){const o=yield this.connect.getJSONSchema(this.resourceName);if(!o)return;const r=new(s())(o.INBOUND),i=null===(e=(yield r.resolve()).properties)||void 0===e?void 0:e.DETAILS,a=null===(t=(yield r.resolve()).properties)||void 0===t?void 0:t.APPROVAL_MESSAGE;this.originalDetailsSchema=i,this.setApprovalMessage&&i?this.jsonSchema=Object.assign(Object.assign({},i),{properties:Object.assign(Object.assign({},i.properties),{APPROVAL_MESSAGE:a})}):this.jsonSchema=i,this.bulkInsert&&this.jsonSchema&&(this.transformSchemaForBulkInsert(),yield d.DOM.nextUpdate(),this.initializeBulkInsertData())}})}initializeBulkInsertData(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.items)||0===this.data.items.length){const e=[];for(let t=0;t<this.bulkInsertMinItems;t+=1)e.push({});this.data=Object.assign(Object.assign({},this.data),{items:e})}}transformSchemaForBulkInsert(){if(!this.originalDetailsSchema)return;const e={type:"array",items:this.originalDetailsSchema,minItems:this.bulkInsertMinItems};void 0!==this.bulkInsertMaxItems&&(e.maxItems=this.bulkInsertMaxItems),this.jsonSchema={type:"object",properties:{items:e},required:["items"]},this.userProvidedUiSchema||(this.userProvidedUiSchema=this.uischema),this.uischema&&function(e){var t;return null===(t=null==e?void 0:e.elements)||void 0===t?void 0:t.some(e=>"#/properties/items"===e.scope&&"Control"===e.type)}(this.uischema)||(this.uischema=function(e){const t={addLabel:"Add another",deleteLabel:""};return e&&(t.childUiSchema=e),{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/items",options:t}]}}(this.userProvidedUiSchema))}renderersChanged(){this.updateMergedRenderers()}additionalRenderersChanged(){this.updateMergedRenderers()}updateMergedRenderers(){const{renderers:e=[],additionalRenderers:t=[]}=this;this.mergedRenderers=[...e,...t]}get reviewRecordId(){if(!this.reviewIdField)return;const e=Le(this.data,this.reviewIdField);return null==e?void 0:String(e)}_submit(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.submitting){if(this.confirmationMessage){const e=(e=>{let t=e.parentElement;for(;t;){if(t.tagName&&(t.tagName.toLowerCase().includes("modal")||t.classList.contains("edit-modal")))return t;t=t.parentElement}})(this);e||v.warn("No modal parent found for confirmation dialog. Dialog may not display as expected.");if(!(yield Pt(this.confirmationMessage,this.prefix,e)))return}if(function(e,t){if(!t||!e)return!1;const o=Object.keys(t.properties);let r=0;return Object.keys(e).forEach(t=>{o.includes(t)||(delete e[t],r+=1,v.debug("Removing key ",t,"from provided data because it is not part of the payload"))}),r>0}(this.data,this.jsonSchema)&&(this.data=Object.assign({},this.data),yield d.DOM.nextUpdate()),this.submitted=!0,!this.bulkInsert)return this.showSubmitReview&&!this.hasValidationErrors()?(this.reviewSections=yield $e(this.data||{},this.userProvidedUiSchema||this.uischema,this.originalDetailsSchema||this.jsonSchema),void(this.reviewMode=!0)):void(yield this._performSubmit());yield this._submitBulk()}})}backFromReview(){this.reviewMode=!1}_submitFromReview(){return(0,r.sH)(this,void 0,void 0,function*(){this.reviewMode=!1,yield this._performSubmit()})}hasValidationErrors(){var e,t,o,r,i,a,n,s;const l=this.jsonFormsEl;return l?(null!==(r=null===(o=null===(t=null===(e=l.jsonforms)||void 0===e?void 0:e.core)||void 0===t?void 0:t.errors)||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0||(null!==(s=null===(n=null===(a=null===(i=l.jsonforms)||void 0===i?void 0:i.core)||void 0===a?void 0:a.additionalErrors)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0:this.errors.length>0}_performSubmit(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({},this.data),t=this.buildCommitPayload(e);if(v.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.hasValidationErrors()&&this.resourceName){let o;this.submitting=!0;try{o=yield this.connect.commitEvent(this.resourceName,t)}catch(t){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:e,errors:o})}if(this.submitting=!1,o.ERROR){o.ERROR.find(e=>"APPROVAL_MESSAGE_MISSING"===e.CODE)&&!this.setApprovalMessage?(this.pendingPayload=e,this.showApprovalModal()):(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:e,errors:o.ERROR}))}else this.$emit("submit-success",{payload:e,response:o})}})}_submitBulk(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t=(null===(e=this.data)||void 0===e?void 0:e.items)||[];if(t.length<this.bulkInsertMinItems){const e={CODE:"BULK_INSERT_MIN_ITEMS",TEXT:`At least ${this.bulkInsertMinItems} item(s) required`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(void 0!==this.bulkInsertMaxItems&&t.length>this.bulkInsertMaxItems){const e={CODE:"BULK_INSERT_MAX_ITEMS",TEXT:`Maximum ${this.bulkInsertMaxItems} item(s) allowed`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(v.debug({bulkItems:t,errors:this.errors}),this.$emit("submit",{payload:this.data,errors:this.errors}),0===t.length||this.errors.length||!this.resourceName)return;this.submitting=!0;const o={successful:[],failed:[]};try{for(let e=0;e<t.length;e+=1){const t=this.rowSubmitStatuses.get(e);"success"!==(null==t?void 0:t.status)&&this.rowSubmitStatuses.set(e,{status:"pending"})}this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses});for(let e=0;e<t.length;e+=1){const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))continue;const i=t[e],a=this.buildCommitPayload(i,!0);this.updateRowStatus(e,{status:"submitting"});try{const t=yield this.connect.commitEvent(this.resourceName,a);t.ERROR?(o.failed.push({item:i,index:e,errors:t.ERROR}),this.updateRowStatus(e,{status:"failed",errors:t.ERROR})):(o.successful.push({item:i,index:e,response:t}),this.updateRowStatus(e,{status:"success",response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];o.failed.push({item:i,index:e,errors:r}),this.updateRowStatus(e,{status:"failed",errors:r})}}}finally{this.submitting=!1}this.$emit("bulk-submit-complete",o),0===o.failed.length?(this.serverFieldErrors=[],this.$emit("submit-success",{payload:this.data,results:o})):0===o.successful.length?(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-failure",{payload:this.data,errors:o.failed.flatMap(e=>e.errors)})):(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-partial-success",{payload:this.data,results:o}))})}updateRowStatus(e,t){this.rowSubmitStatuses.set(e,t),this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses,index:e,status:t})}clearRowSubmitStatuses(){this.rowSubmitStatuses=new Map}submitSingleRow(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;if(!this.bulkInsert)return void v.warn("submitSingleRow called but bulkInsert is not enabled");const o=((null===(t=this.data)||void 0===t?void 0:t.items)||[])[e];if(!o)return void v.warn(`submitSingleRow: No item found at index ${e}`);const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))return void v.debug(`Row ${e} already submitted successfully`);if(!this.resourceName)return void v.warn("submitSingleRow: No resourceName configured");this.updateRowStatus(e,{status:"submitting"});const i=this.buildCommitPayload(o,!0);try{const t=yield this.connect.commitEvent(this.resourceName,i);t.ERROR?(this.updateRowStatus(e,{status:"failed",errors:t.ERROR}),this.applyServerFieldErrors(t.ERROR,`/items/${e}`),this.$emit("row-submit-failure",{index:e,item:o,errors:t.ERROR})):(this.updateRowStatus(e,{status:"success",response:t}),this.$emit("row-submit-success",{index:e,item:o,response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];this.updateRowStatus(e,{status:"failed",errors:r}),this.$emit("row-submit-failure",{index:e,item:o,errors:r})}})}filterDataByUiSchema(e){if(!this.userProvidedUiSchema)return e;const t=Et(this.userProvidedUiSchema).filter(e=>!e.isHidden).map(e=>e.fieldName);if(0===t.length)return e;const o={};for(const r of t)r in e&&(o[r]=e[r]);return o}buildCommitPayload(e,t=!1){const o=t?this.filterDataByUiSchema(e):e;if(this.setApprovalMessage){const{APPROVAL_MESSAGE:e}=o;return{DETAILS:(0,r.Tt)(o,["APPROVAL_MESSAGE"]),APPROVAL_MESSAGE:e}}return{DETAILS:o}}get isSubmitHidden(){return!this.readonly&&!this.hideSubmit}get isResetVisible(){return!this.readonly&&this.showReset}deepClone(){const e=super.deepClone();try{e.uischema=structuredClone(this.uischema),e.jsonSchema=structuredClone(this.jsonSchema)}catch(e){v.error("Error cloning form",e)}return e}submitPart(e){this.submitted=!0}onChange(e){v.debug("Form data changed:",e.detail),e.detail&&(e.stopPropagation(),this.data=e.detail.data,this.errors=e.detail.errors,e.detail.additionalErrors.length&&(this.errors=[...this.errors,...e.detail.additionalErrors]),this.$emit("data-change",e.detail))}disconnectedCallback(){super.disconnectedCallback(),this.reset()}handleResetClicked(){this.reset(),this.$emit("reset-clicked")}reset(e=!0){this.submitted=!1,this.reviewMode=!1,this.reviewSections=[],this.clearRowSubmitStatuses(),this.serverFieldErrors=[],e&&(this.data={}),d.Observable.notify(this,"submitted")}applyServerFieldErrors(e,t){this.serverFieldErrors=Dt(e,this.jsonSchema,t)}applyBulkServerFieldErrors(e){this.serverFieldErrors=e.flatMap(({index:e,errors:t})=>Dt(t,this.jsonSchema,`/items/${e}`))}showApprovalModal(){this.approvalMessage="",this.approvalModal&&this.approvalModal.show()}closeApprovalModal(){this.approvalMessage="",this.pendingPayload=null,this.approvalModal&&this.approvalModal.close()}submitWithApproval(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.approvalMessage||!this.approvalMessage.trim())return void v.warn("Approval message is required");if(!this.pendingPayload)return v.error("No pending payload to submit"),void this.closeApprovalModal();this.submitting=!0;const e={DETAILS:this.pendingPayload,APPROVAL_MESSAGE:this.approvalMessage},t=this.pendingPayload;let o;try{o=yield this.connect.commitEvent(this.resourceName,e)}catch(e){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(e)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:t,errors:o})}this.submitting=!1,o.ERROR?(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:t,errors:o.ERROR})):(this.$emit("submit-success",{payload:t,response:o}),this.closeApprovalModal())})}handleCsvFileSelected(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,o;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){try{const e=function(e){var t,o,r;const i=[];if(!(null==e?void 0:e.trim()))return i.push("CSV file is empty"),{headers:[],rows:[],errors:i};const a=kt().parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!1}),n=null!==(t=a.meta.fields)&&void 0!==t?t:[];if(0===n.length)return i.push("CSV file has no headers"),{headers:[],rows:[],errors:i};for(const e of a.errors)i.push(null!==(o=e.message)&&void 0!==o?o:`Parse error at row ${null!==(r=e.row)&&void 0!==r?r:"?"}`);const s=a.data.map(e=>{const t={};for(const o of n){const r=e[o];t[o]=null==r?"":String(r)}return t});return{headers:n,rows:s,errors:i}}(yield r.text());if(e.errors.length>0)return this.$emit("csv-parse-error",{errors:e.errors,fileName:r.name}),v.warn("CSV parse errors:",e.errors),void this.clearCsvFileInput();if(0===e.rows.length)return this.$emit("csv-parse-error",{errors:["CSV file contains no data rows"],fileName:r.name}),void this.clearCsvFileInput();const{mappedRows:t,unmappedColumns:i}=function(e,t,o){var r,i;if(!(null==t?void 0:t.properties)||0===e.length)return{mappedRows:[],unmappedColumns:[]};const a=Object.keys(t.properties),n=new Map;if(o){const e=Et(o);for(const{fieldName:o,label:r}of e)r&&r.trim()&&t.properties[o]&&n.set(r.trim().toLowerCase(),o)}const s=new Map,l=[];if(e.length>0){const t=Object.keys(null!==(r=e[0])&&void 0!==r?r:{});for(const e of t){const t=e.toUpperCase();let r=a.find(e=>e.toUpperCase()===t);!r&&o&&(r=null!==(i=n.get(e.trim().toLowerCase()))&&void 0!==i?i:void 0),r?s.set(e,r):l.push(e)}}const d=e.map(e=>{var o;const r={};for(const[i,a]of s){const n=e[i],s=null===(o=t.properties)||void 0===o?void 0:o[a];r[a]=Mt(n,s)}return r});return{mappedRows:d,unmappedColumns:l}}(e.rows,this.originalDetailsSchema,this.uischema);if(0===t.length)return this.$emit("csv-parse-error",{errors:["No CSV columns could be matched to form fields"],fileName:r.name}),void this.clearCsvFileInput();const a=(null===(o=this.data)||void 0===o?void 0:o.items)||[];let n=t;if(void 0!==this.bulkInsertMaxItems){const e=this.bulkInsertMaxItems-a.length;if(e<=0)return this.$emit("csv-parse-error",{errors:[`Maximum of ${this.bulkInsertMaxItems} items already reached`],fileName:r.name}),void this.clearCsvFileInput();t.length>e&&(n=t.slice(0,e),v.warn(`Truncated CSV import from ${t.length} to ${e} rows due to max items limit`))}this.data={items:[...a,...n]},this.$emit("csv-imported",{rowCount:n.length,totalRowsInFile:t.length,unmappedColumns:i,fileName:r.name}),v.debug("CSV imported successfully",{rowCount:n.length,unmappedColumns:i})}catch(e){this.$emit("csv-parse-error",{errors:[`Failed to read CSV file: ${String(e)}`],fileName:r.name}),v.error("CSV import error:",e)}this.clearCsvFileInput()}})}clearCsvFileInput(){this.csvFileInput&&(this.csvFileInput.value="")}downloadCsvTemplate(){if(!this.originalDetailsSchema)return v.warn("Cannot download CSV template: schema not available"),void this.$emit("csv-template-error",{error:"Schema not available"});const e=function(e,t,o=!0,r=!0){if(!(null==e?void 0:e.properties))return"";const i=new Set(e.required||[]),a=[],n=[],s=t?Et(t):null;if(s&&s.length>0)for(const{fieldName:t,label:o,isHidden:r}of s){if(r)continue;const s=e.properties[t];if(!s)continue;a.push(o&&o.trim()?o.trim():t);const l=Tt(t,s,i.has(t));n.push(Rt(l))}else for(const[t,r]of Object.entries(e.properties)){const e=i.has(t);if(!o&&!e)continue;a.push(t);const s=Tt(t,r,e);n.push(Rt(s))}if(0===a.length)return"";const l=`${a.map(e=>Rt(e)).join(",")}\n${n.join(",")}`;return r?"\ufeff"+l:l}(this.originalDetailsSchema,this.uischema);if(!e)return v.warn("Cannot download CSV template: no fields in schema"),void this.$emit("csv-template-error",{error:"No fields found in schema"});const t=`${this.resourceName?this.resourceName.replace(/^EVENT_/,"").toLowerCase():"bulk_insert"}_template.csv`;!function(e,t="template.csv"){const o=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}(e,t),this.$emit("csv-template-downloaded",{fileName:t}),v.debug("CSV template downloaded:",t)}};(0,r.Cg)([(0,d.attr)({attribute:"design-system-prefix"})],Ft.prototype,"prefix",void 0),(0,r.Cg)([d.attr],Ft.prototype,"resourceName",void 0),(0,r.Cg)([(0,d.attr)({attribute:"confirmation-message"})],Ft.prototype,"confirmationMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"set-approval-message",mode:"boolean"})],Ft.prototype,"setApprovalMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"approval-message-label"})],Ft.prototype,"approvalMessageLabel",void 0),(0,r.Cg)([d.observable],Ft.prototype,"serverFieldErrors",void 0),(0,r.Cg)([d.observable],Ft.prototype,"approvalMessage",void 0),(0,r.Cg)([d.observable],Ft.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Ft.prototype,"renderers",void 0),(0,r.Cg)([d.observable],Ft.prototype,"additionalRenderers",void 0),(0,r.Cg)([d.observable],Ft.prototype,"mergedRenderers",void 0),(0,r.Cg)([d.observable],Ft.prototype,"jsonSchema",void 0),(0,r.Cg)([i.dm],Ft.prototype,"connect",void 0),(0,r.Cg)([d.observable],Ft.prototype,"data",void 0),(0,r.Cg)([d.observable],Ft.prototype,"submitting",void 0),(0,r.Cg)([d.observable],Ft.prototype,"submitted",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],Ft.prototype,"readonly",void 0),(0,r.Cg)([(0,d.attr)({attribute:"hide-submit-button",mode:"boolean"})],Ft.prototype,"hideSubmit",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-reset-button",mode:"boolean"})],Ft.prototype,"showReset",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert",mode:"boolean"})],Ft.prototype,"bulkInsert",void 0),(0,r.Cg)([(0,d.attr)({attribute:"submit-button-text"})],Ft.prototype,"submitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-submit-button-text"})],Ft.prototype,"bulkSubmitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"reset-button-text"})],Ft.prototype,"resetButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-min-items",converter:{fromView:e=>parseInt(e,10)||1,toView:e=>String(e)}})],Ft.prototype,"bulkInsertMinItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-max-items",converter:{fromView:e=>e?parseInt(e,10):void 0,toView:e=>void 0!==e?String(e):""}})],Ft.prototype,"bulkInsertMaxItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-submit-review",mode:"boolean"})],Ft.prototype,"showSubmitReview",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-button-text"})],Ft.prototype,"reviewButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-heading"})],Ft.prototype,"reviewHeading",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-id-field"})],Ft.prototype,"reviewIdField",void 0),(0,r.Cg)([d.observable],Ft.prototype,"rowSubmitStatuses",void 0),(0,r.Cg)([d.observable],Ft.prototype,"reviewMode",void 0),(0,r.Cg)([d.observable],Ft.prototype,"reviewSections",void 0),(0,r.Cg)([d.volatile],Ft.prototype,"isSubmitHidden",null),(0,r.Cg)([d.volatile],Ft.prototype,"isResetVisible",null),Ft=(0,r.Cg)([(0,d.customElement)({name:"foundation-form",template:Re,styles:I,shadowOptions:null})],Ft);const jt=Symbol("component-type"),Ut=Symbol("component-instance"),Bt="foundation-layout-autosave",Ht="f-layout-key",Yt="36px",Gt=()=>{const e=(0,le.designTokensMap)();if(!e.value)return Yt;const{style:t,space:o}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*o.designUnit.$value-4+"px"},Vt=()=>{const e=(0,le.selectCustomToken)("rapid","layout","item","border","width");if(!(null==e?void 0:e.$value))return 0;const t=parseFloat(String(e.$value));return Number.isNaN(t)?0:t};class Wt extends Error{constructor(e){super(e)}}class Zt extends Error{constructor(e){super(e)}}const qt="first-loaded",Xt="item-added",Jt="item-removed",Qt="item-resized",Kt="state-changed",eo="change-title",to="autosave",oo=(0,h.createLogger)("foundation-layout");const ro=new Map;function io(e){return ro.get(e)}function ao(){const e=this.parentElement;switch(e[jt]){case"root":case"horizontal":case"vertical":case"tabs":return e;default:throw new Wt("Using layout region outside of layout root")}}const no=e=>({horizontal:"column",vertical:"row",tabs:"stack"}[e]),so=d.html`
1607
+ `;var Mt=o(85031),Lt=o.n(Mt);function Et(e,t){if(""===e)return e;if(!t)return e;switch(Tt(t)){case"integer":case"number":{const t=parseFloat(e);return isNaN(t)?e:t}case"boolean":{const t=e.toLowerCase();return!!["true","yes","1"].includes(t)||!["false","no","0"].includes(t)&&e}default:return e}}function Tt(e){if(e.type)return Array.isArray(e.type)?e.type[0]:e.type;const t=e.oneOf||e.anyOf;if(t)for(const e of t)if("object"==typeof e&&e.type&&"null"!==e.type)return Array.isArray(e.type)?e.type[0]:e.type}function Rt(e){const t=[];function o(e){var r,i,a;if("Control"===e.type&&e.scope){const o=function(e){const t=e.match(/^#\/properties\/(.+)$/);return t?t[1]:null}(e.scope);if(o){if("items"===o&&(null===(r=e.options)||void 0===r?void 0:r.childUiSchema)){const o=e.options.childUiSchema,r="function"==typeof o?o(0,void 0,void 0):o;if(r){const e=Rt(r);t.push(...e)}return}const a=!0===(null===(i=e.options)||void 0===i?void 0:i.hidden),n=e.label;t.push({fieldName:o,label:n,isHidden:a})}}if(e.elements)for(const t of e.elements)o(t);if(null===(a=e.options)||void 0===a?void 0:a.childElements)for(const t of e.options.childElements)o(t)}if(e.elements)for(const t of e.elements)o(t);const r=e.options,i=null==r?void 0:r.childElements;if(i)for(const e of i)o(e);return t}function _t(e,t,o){const r=Tt(t);if(t.enum&&t.enum.length>0)return String(t.enum[0]);if(void 0!==t.const)return String(t.const);if(void 0!==t.default)return String(t.default);if(t.examples&&Array.isArray(t.examples)&&t.examples.length>0)return String(t.examples[0]);switch(r){case"string":return function(e,t){const o=e.toLowerCase();if(t.format)switch(t.format){case"date":return"2024-01-15";case"date-time":return"2024-01-15T10:30:00Z";case"time":return"10:30:00";case"email":return"user@example.com";case"uri":case"url":return"https://example.com";case"uuid":return"550e8400-e29b-41d4-a716-446655440000";case"hostname":return"example.com";case"ipv4":return"192.168.1.1";case"ipv6":return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}if(o.includes("email"))return"user@example.com";if(o.includes("phone")||o.includes("tel"))return"+1234567890";if(o.includes("date")||o.includes("time"))return o.includes("time")&&!o.includes("date")?"10:30:00":"2024-01-15";if(o.includes("url")||o.includes("link")||o.includes("website"))return"https://example.com";if(o.includes("name"))return o.includes("first")?"John":o.includes("last")?"Doe":"Sample Name";if(o.includes("address"))return"123 Main Street";if(o.includes("city"))return"New York";if(o.includes("country"))return"USA";if(o.includes("description")||o.includes("comment")||o.includes("notes"))return"Sample description";if(o.includes("id")||o.includes("code"))return"ABC123";const r=t.minLength||0,i=50,a=t.maxLength||i;let n=`Sample ${e}`;n.length<r&&(n=n.padEnd(r,"_"));n.length>a&&(n=n.substring(0,a));return n}(e,t);case"integer":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(Math.ceil(r));const a=Math.min(Math.max(1,r),i);return String(Math.floor(a))}(t);case"number":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(r);const a=1.5,n=Math.min(Math.max(a,r),i);return String(n)}(t);case"boolean":return"true";case"array":case"object":return"";default:return o?`sample_${e.toLowerCase()}`:""}}function Dt(e){if(!e)return"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){return`"${e.replace(/"/g,'""')}"`}return e}function Nt(e){return e.replace(/^\$/,"").replace(/\[(\d+)\]/g,".$1").split(/[./]/).filter(Boolean)}function Pt(e,t,o){return(null==e?void 0:e.length)?e.map(e=>{const r=function(e,t,o){let r=null;if(t){const o=Nt(t),i=e?Nt(e):[];i.length<=o.length&&i.every((e,t)=>o[o.length-i.length+t]===e)||o.push(...i),"DETAILS"===o[0]&&o.shift(),r=o.length?`/${o.join("/")}`:null}else e&&(r=e.startsWith("/")?e:`/${e}`);if(!r)return null;if(o)return`${o.startsWith("/")?o.replace(/\/$/,""):`/${o.replace(/\/$/,"")}`}${r}`;return r}(e.FIELD,e.PATH,o);if(!r)return null;const i={keyword:"serverValidation",message:e.TEXT,instancePath:r,schemaPath:"",params:{code:e.CODE}};if(t)try{const e=function(e){const t=e.replace(/^\//,"").split("/").filter(Boolean);if(0===t.length)return"#";let o="#";for(let e=0;e<t.length;e+=1){const r=t[e];0===e?o+=`/properties/${r}`:/^\d+$/.test(r)?o+=`/items/${r}`:o+=`/properties/${r}`}return o}(r),o=t,a=l.XKv.schema(o,e,o);a&&(i.parentSchema=a)}catch(e){}return i}).filter(e=>null!==e):[]}var zt=o(31274);const Ot=(e,t,o)=>new Promise(r=>{((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let r={title:e.title,body:e.body},i={};null!=e.logLevel&&(r=Object.assign({logLevel:e.logLevel},r)),e.dialog&&(i=Object.assign({dialog:e.dialog},i),r=Object.assign({config:i},r)),(0,zt.u)(r,t,o)})({title:"Confirm Submission",body:e,dialog:{confirmingActions:[{label:"Submit",action:()=>r(!0)}],dismissingAction:{label:"Cancel",action:()=>r(!1)}}},`${t}-form`,o)});const Ft={renderer:kt,tester:(0,l.Hc7)(2,l.Nyt),mapper:l.kOB},jt=[{renderer:kt,tester:(0,l.Hc7)(1,l.c0N),mapper:l.kOB},Ft,De,Ct,rt,it,ht,dt,ct,lt,ut,nt,pt,wt,Fe,Je,Qe,Be,Ge,Ke,Ve,gt,xt];let Ut=class extends((0,a.S)(c.FoundationElement)){constructor(){super(...arguments),this.prefix="rapid",this.approvalMessageLabel="Approval Message",this.serverFieldErrors=[],this.approvalMessage="",this.pendingPayload=null,this.renderers=jt,this.additionalRenderers=[],this.mergedRenderers=jt,this.errors=[],this.data={},this.submitButtonText="Submit",this.bulkSubmitButtonText="Submit All",this.resetButtonText="Reset",this.bulkInsertMinItems=1,this.reviewButtonText="Review",this.reviewHeading="Review",this.rowSubmitStatuses=new Map,this.reviewMode=!1,this.reviewSections=[]}resourceNameChanged(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(this.jsonSchema=void 0,this.originalDetailsSchema=void 0,this.resourceName){const o=yield this.connect.getJSONSchema(this.resourceName);if(!o)return;const r=new(s())(o.INBOUND),i=null===(e=(yield r.resolve()).properties)||void 0===e?void 0:e.DETAILS,a=null===(t=(yield r.resolve()).properties)||void 0===t?void 0:t.APPROVAL_MESSAGE;this.originalDetailsSchema=i,this.setApprovalMessage&&i?this.jsonSchema=Object.assign(Object.assign({},i),{properties:Object.assign(Object.assign({},i.properties),{APPROVAL_MESSAGE:a})}):this.jsonSchema=i,this.bulkInsert&&this.jsonSchema&&(this.transformSchemaForBulkInsert(),yield d.DOM.nextUpdate(),this.initializeBulkInsertData())}})}initializeBulkInsertData(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.items)||0===this.data.items.length){const e=[];for(let t=0;t<this.bulkInsertMinItems;t+=1)e.push({});this.data=Object.assign(Object.assign({},this.data),{items:e})}}transformSchemaForBulkInsert(){if(!this.originalDetailsSchema)return;const e={type:"array",items:this.originalDetailsSchema,minItems:this.bulkInsertMinItems};void 0!==this.bulkInsertMaxItems&&(e.maxItems=this.bulkInsertMaxItems),this.jsonSchema={type:"object",properties:{items:e},required:["items"]},this.userProvidedUiSchema||(this.userProvidedUiSchema=this.uischema),this.uischema&&function(e){var t;return null===(t=null==e?void 0:e.elements)||void 0===t?void 0:t.some(e=>"#/properties/items"===e.scope&&"Control"===e.type)}(this.uischema)||(this.uischema=function(e){const t={addLabel:"Add another",deleteLabel:""};return e&&(t.childUiSchema=e),{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/items",options:t}]}}(this.userProvidedUiSchema))}renderersChanged(){this.updateMergedRenderers()}additionalRenderersChanged(){this.updateMergedRenderers()}updateMergedRenderers(){const{renderers:e=[],additionalRenderers:t=[]}=this;this.mergedRenderers=[...e,...t]}get reviewRecordId(){if(!this.reviewIdField)return;const e=Le(this.data,this.reviewIdField);return null==e?void 0:String(e)}_submit(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.submitting){if(this.confirmationMessage){const e=(e=>{let t=e.parentElement;for(;t;){if(t.tagName&&(t.tagName.toLowerCase().includes("modal")||t.classList.contains("edit-modal")))return t;t=t.parentElement}})(this);e||v.warn("No modal parent found for confirmation dialog. Dialog may not display as expected.");if(!(yield Ot(this.confirmationMessage,this.prefix,e)))return}if(function(e,t){if(!t||!e)return!1;const o=Object.keys(t.properties);let r=0;return Object.keys(e).forEach(t=>{o.includes(t)||(delete e[t],r+=1,v.debug("Removing key ",t,"from provided data because it is not part of the payload"))}),r>0}(this.data,this.jsonSchema)&&(this.data=Object.assign({},this.data),yield d.DOM.nextUpdate()),this.submitted=!0,!this.bulkInsert)return this.showSubmitReview&&!this.hasValidationErrors()?(this.reviewSections=yield $e(this.data||{},this.userProvidedUiSchema||this.uischema,this.originalDetailsSchema||this.jsonSchema),void(this.reviewMode=!0)):void(yield this._performSubmit());yield this._submitBulk()}})}backFromReview(){this.reviewMode=!1}_submitFromReview(){return(0,r.sH)(this,void 0,void 0,function*(){this.reviewMode=!1,yield this._performSubmit()})}hasValidationErrors(){var e,t,o,r,i,a,n,s;const l=this.jsonFormsEl;return l?(null!==(r=null===(o=null===(t=null===(e=l.jsonforms)||void 0===e?void 0:e.core)||void 0===t?void 0:t.errors)||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0||(null!==(s=null===(n=null===(a=null===(i=l.jsonforms)||void 0===i?void 0:i.core)||void 0===a?void 0:a.additionalErrors)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0:this.errors.length>0}_performSubmit(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({},this.data),t=this.buildCommitPayload(e);if(v.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.hasValidationErrors()&&this.resourceName){let o;this.submitting=!0;try{o=yield this.connect.commitEvent(this.resourceName,t)}catch(t){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:e,errors:o})}if(this.submitting=!1,o.ERROR){o.ERROR.find(e=>"APPROVAL_MESSAGE_MISSING"===e.CODE)&&!this.setApprovalMessage?(this.pendingPayload=e,this.showApprovalModal()):(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:e,errors:o.ERROR}))}else this.$emit("submit-success",{payload:e,response:o})}})}_submitBulk(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t=(null===(e=this.data)||void 0===e?void 0:e.items)||[];if(t.length<this.bulkInsertMinItems){const e={CODE:"BULK_INSERT_MIN_ITEMS",TEXT:`At least ${this.bulkInsertMinItems} item(s) required`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(void 0!==this.bulkInsertMaxItems&&t.length>this.bulkInsertMaxItems){const e={CODE:"BULK_INSERT_MAX_ITEMS",TEXT:`Maximum ${this.bulkInsertMaxItems} item(s) allowed`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(v.debug({bulkItems:t,errors:this.errors}),this.$emit("submit",{payload:this.data,errors:this.errors}),0===t.length||this.errors.length||!this.resourceName)return;this.submitting=!0;const o={successful:[],failed:[]};try{for(let e=0;e<t.length;e+=1){const t=this.rowSubmitStatuses.get(e);"success"!==(null==t?void 0:t.status)&&this.rowSubmitStatuses.set(e,{status:"pending"})}this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses});for(let e=0;e<t.length;e+=1){const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))continue;const i=t[e],a=this.buildCommitPayload(i,!0);this.updateRowStatus(e,{status:"submitting"});try{const t=yield this.connect.commitEvent(this.resourceName,a);t.ERROR?(o.failed.push({item:i,index:e,errors:t.ERROR}),this.updateRowStatus(e,{status:"failed",errors:t.ERROR})):(o.successful.push({item:i,index:e,response:t}),this.updateRowStatus(e,{status:"success",response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];o.failed.push({item:i,index:e,errors:r}),this.updateRowStatus(e,{status:"failed",errors:r})}}}finally{this.submitting=!1}this.$emit("bulk-submit-complete",o),0===o.failed.length?(this.serverFieldErrors=[],this.$emit("submit-success",{payload:this.data,results:o})):0===o.successful.length?(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-failure",{payload:this.data,errors:o.failed.flatMap(e=>e.errors)})):(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-partial-success",{payload:this.data,results:o}))})}updateRowStatus(e,t){this.rowSubmitStatuses.set(e,t),this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses,index:e,status:t})}clearRowSubmitStatuses(){this.rowSubmitStatuses=new Map}submitSingleRow(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;if(!this.bulkInsert)return void v.warn("submitSingleRow called but bulkInsert is not enabled");const o=((null===(t=this.data)||void 0===t?void 0:t.items)||[])[e];if(!o)return void v.warn(`submitSingleRow: No item found at index ${e}`);const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))return void v.debug(`Row ${e} already submitted successfully`);if(!this.resourceName)return void v.warn("submitSingleRow: No resourceName configured");this.updateRowStatus(e,{status:"submitting"});const i=this.buildCommitPayload(o,!0);try{const t=yield this.connect.commitEvent(this.resourceName,i);t.ERROR?(this.updateRowStatus(e,{status:"failed",errors:t.ERROR}),this.applyServerFieldErrors(t.ERROR,`/items/${e}`),this.$emit("row-submit-failure",{index:e,item:o,errors:t.ERROR})):(this.updateRowStatus(e,{status:"success",response:t}),this.$emit("row-submit-success",{index:e,item:o,response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];this.updateRowStatus(e,{status:"failed",errors:r}),this.$emit("row-submit-failure",{index:e,item:o,errors:r})}})}filterDataByUiSchema(e){if(!this.userProvidedUiSchema)return e;const t=Rt(this.userProvidedUiSchema).filter(e=>!e.isHidden).map(e=>e.fieldName);if(0===t.length)return e;const o={};for(const r of t)r in e&&(o[r]=e[r]);return o}buildCommitPayload(e,t=!1){const o=t?this.filterDataByUiSchema(e):e;if(this.setApprovalMessage){const{APPROVAL_MESSAGE:e}=o;return{DETAILS:(0,r.Tt)(o,["APPROVAL_MESSAGE"]),APPROVAL_MESSAGE:e}}return{DETAILS:o}}get isSubmitHidden(){return!this.readonly&&!this.hideSubmit}get isResetVisible(){return!this.readonly&&this.showReset}deepClone(){const e=super.deepClone();try{e.uischema=structuredClone(this.uischema),e.jsonSchema=structuredClone(this.jsonSchema)}catch(e){v.error("Error cloning form",e)}return e}submitPart(e){this.submitted=!0}onChange(e){v.debug("Form data changed:",e.detail),e.detail&&(e.stopPropagation(),this.data=e.detail.data,this.errors=e.detail.errors,e.detail.additionalErrors.length&&(this.errors=[...this.errors,...e.detail.additionalErrors]),this.$emit("data-change",e.detail))}disconnectedCallback(){super.disconnectedCallback(),this.reset()}handleResetClicked(){this.reset(),this.$emit("reset-clicked")}reset(e=!0){this.submitted=!1,this.reviewMode=!1,this.reviewSections=[],this.clearRowSubmitStatuses(),this.serverFieldErrors=[],e&&(this.data={}),d.Observable.notify(this,"submitted")}applyServerFieldErrors(e,t){this.serverFieldErrors=Pt(e,this.jsonSchema,t)}applyBulkServerFieldErrors(e){this.serverFieldErrors=e.flatMap(({index:e,errors:t})=>Pt(t,this.jsonSchema,`/items/${e}`))}showApprovalModal(){this.approvalMessage="",this.approvalModal&&this.approvalModal.show()}closeApprovalModal(){this.approvalMessage="",this.pendingPayload=null,this.approvalModal&&this.approvalModal.close()}submitWithApproval(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.approvalMessage||!this.approvalMessage.trim())return void v.warn("Approval message is required");if(!this.pendingPayload)return v.error("No pending payload to submit"),void this.closeApprovalModal();this.submitting=!0;const e={DETAILS:this.pendingPayload,APPROVAL_MESSAGE:this.approvalMessage},t=this.pendingPayload;let o;try{o=yield this.connect.commitEvent(this.resourceName,e)}catch(e){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(e)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:t,errors:o})}this.submitting=!1,o.ERROR?(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:t,errors:o.ERROR})):(this.$emit("submit-success",{payload:t,response:o}),this.closeApprovalModal())})}handleCsvFileSelected(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,o;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){try{const e=function(e){var t,o,r;const i=[];if(!(null==e?void 0:e.trim()))return i.push("CSV file is empty"),{headers:[],rows:[],errors:i};const a=Lt().parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!1}),n=null!==(t=a.meta.fields)&&void 0!==t?t:[];if(0===n.length)return i.push("CSV file has no headers"),{headers:[],rows:[],errors:i};for(const e of a.errors)i.push(null!==(o=e.message)&&void 0!==o?o:`Parse error at row ${null!==(r=e.row)&&void 0!==r?r:"?"}`);const s=a.data.map(e=>{const t={};for(const o of n){const r=e[o];t[o]=null==r?"":String(r)}return t});return{headers:n,rows:s,errors:i}}(yield r.text());if(e.errors.length>0)return this.$emit("csv-parse-error",{errors:e.errors,fileName:r.name}),v.warn("CSV parse errors:",e.errors),void this.clearCsvFileInput();if(0===e.rows.length)return this.$emit("csv-parse-error",{errors:["CSV file contains no data rows"],fileName:r.name}),void this.clearCsvFileInput();const{mappedRows:t,unmappedColumns:i}=function(e,t,o){var r,i;if(!(null==t?void 0:t.properties)||0===e.length)return{mappedRows:[],unmappedColumns:[]};const a=Object.keys(t.properties),n=new Map;if(o){const e=Rt(o);for(const{fieldName:o,label:r}of e)r&&r.trim()&&t.properties[o]&&n.set(r.trim().toLowerCase(),o)}const s=new Map,l=[];if(e.length>0){const t=Object.keys(null!==(r=e[0])&&void 0!==r?r:{});for(const e of t){const t=e.toUpperCase();let r=a.find(e=>e.toUpperCase()===t);!r&&o&&(r=null!==(i=n.get(e.trim().toLowerCase()))&&void 0!==i?i:void 0),r?s.set(e,r):l.push(e)}}const d=e.map(e=>{var o;const r={};for(const[i,a]of s){const n=e[i],s=null===(o=t.properties)||void 0===o?void 0:o[a];r[a]=Et(n,s)}return r});return{mappedRows:d,unmappedColumns:l}}(e.rows,this.originalDetailsSchema,this.uischema);if(0===t.length)return this.$emit("csv-parse-error",{errors:["No CSV columns could be matched to form fields"],fileName:r.name}),void this.clearCsvFileInput();const a=(null===(o=this.data)||void 0===o?void 0:o.items)||[];let n=t;if(void 0!==this.bulkInsertMaxItems){const e=this.bulkInsertMaxItems-a.length;if(e<=0)return this.$emit("csv-parse-error",{errors:[`Maximum of ${this.bulkInsertMaxItems} items already reached`],fileName:r.name}),void this.clearCsvFileInput();t.length>e&&(n=t.slice(0,e),v.warn(`Truncated CSV import from ${t.length} to ${e} rows due to max items limit`))}this.data={items:[...a,...n]},this.$emit("csv-imported",{rowCount:n.length,totalRowsInFile:t.length,unmappedColumns:i,fileName:r.name}),v.debug("CSV imported successfully",{rowCount:n.length,unmappedColumns:i})}catch(e){this.$emit("csv-parse-error",{errors:[`Failed to read CSV file: ${String(e)}`],fileName:r.name}),v.error("CSV import error:",e)}this.clearCsvFileInput()}})}clearCsvFileInput(){this.csvFileInput&&(this.csvFileInput.value="")}downloadCsvTemplate(){if(!this.originalDetailsSchema)return v.warn("Cannot download CSV template: schema not available"),void this.$emit("csv-template-error",{error:"Schema not available"});const e=function(e,t,o=!0,r=!0){if(!(null==e?void 0:e.properties))return"";const i=new Set(e.required||[]),a=[],n=[],s=t?Rt(t):null;if(s&&s.length>0)for(const{fieldName:t,label:o,isHidden:r}of s){if(r)continue;const s=e.properties[t];if(!s)continue;a.push(o&&o.trim()?o.trim():t);const l=_t(t,s,i.has(t));n.push(Dt(l))}else for(const[t,r]of Object.entries(e.properties)){const e=i.has(t);if(!o&&!e)continue;a.push(t);const s=_t(t,r,e);n.push(Dt(s))}if(0===a.length)return"";const l=`${a.map(e=>Dt(e)).join(",")}\n${n.join(",")}`;return r?"\ufeff"+l:l}(this.originalDetailsSchema,this.uischema);if(!e)return v.warn("Cannot download CSV template: no fields in schema"),void this.$emit("csv-template-error",{error:"No fields found in schema"});const t=`${this.resourceName?this.resourceName.replace(/^EVENT_/,"").toLowerCase():"bulk_insert"}_template.csv`;!function(e,t="template.csv"){const o=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}(e,t),this.$emit("csv-template-downloaded",{fileName:t}),v.debug("CSV template downloaded:",t)}};(0,r.Cg)([(0,d.attr)({attribute:"design-system-prefix"})],Ut.prototype,"prefix",void 0),(0,r.Cg)([d.attr],Ut.prototype,"resourceName",void 0),(0,r.Cg)([(0,d.attr)({attribute:"confirmation-message"})],Ut.prototype,"confirmationMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"set-approval-message",mode:"boolean"})],Ut.prototype,"setApprovalMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"approval-message-label"})],Ut.prototype,"approvalMessageLabel",void 0),(0,r.Cg)([d.observable],Ut.prototype,"serverFieldErrors",void 0),(0,r.Cg)([d.observable],Ut.prototype,"approvalMessage",void 0),(0,r.Cg)([d.observable],Ut.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Ut.prototype,"renderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"additionalRenderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"mergedRenderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"jsonSchema",void 0),(0,r.Cg)([i.dm],Ut.prototype,"connect",void 0),(0,r.Cg)([d.observable],Ut.prototype,"data",void 0),(0,r.Cg)([d.observable],Ut.prototype,"submitting",void 0),(0,r.Cg)([d.observable],Ut.prototype,"submitted",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],Ut.prototype,"readonly",void 0),(0,r.Cg)([(0,d.attr)({attribute:"hide-submit-button",mode:"boolean"})],Ut.prototype,"hideSubmit",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-reset-button",mode:"boolean"})],Ut.prototype,"showReset",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert",mode:"boolean"})],Ut.prototype,"bulkInsert",void 0),(0,r.Cg)([(0,d.attr)({attribute:"submit-button-text"})],Ut.prototype,"submitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-submit-button-text"})],Ut.prototype,"bulkSubmitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"reset-button-text"})],Ut.prototype,"resetButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-min-items",converter:{fromView:e=>parseInt(e,10)||1,toView:e=>String(e)}})],Ut.prototype,"bulkInsertMinItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-max-items",converter:{fromView:e=>e?parseInt(e,10):void 0,toView:e=>void 0!==e?String(e):""}})],Ut.prototype,"bulkInsertMaxItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-submit-review",mode:"boolean"})],Ut.prototype,"showSubmitReview",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-button-text"})],Ut.prototype,"reviewButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-heading"})],Ut.prototype,"reviewHeading",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-id-field"})],Ut.prototype,"reviewIdField",void 0),(0,r.Cg)([d.observable],Ut.prototype,"rowSubmitStatuses",void 0),(0,r.Cg)([d.observable],Ut.prototype,"reviewMode",void 0),(0,r.Cg)([d.observable],Ut.prototype,"reviewSections",void 0),(0,r.Cg)([d.volatile],Ut.prototype,"isSubmitHidden",null),(0,r.Cg)([d.volatile],Ut.prototype,"isResetVisible",null),Ut=(0,r.Cg)([(0,d.customElement)({name:"foundation-form",template:Re,styles:I,shadowOptions:null})],Ut);const Bt=Symbol("component-type"),Ht=Symbol("component-instance"),Yt="foundation-layout-autosave",Gt="f-layout-key",Vt="36px",Wt=()=>{const e=(0,le.designTokensMap)();if(!e.value)return Vt;const{style:t,space:o}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*o.designUnit.$value-4+"px"},Zt=()=>{const e=(0,le.selectCustomToken)("rapid","layout","item","border","width");if(!(null==e?void 0:e.$value))return 0;const t=parseFloat(String(e.$value));return Number.isNaN(t)?0:t};class qt extends Error{constructor(e){super(e)}}class Xt extends Error{constructor(e){super(e)}}const Jt="first-loaded",Qt="item-added",Kt="item-removed",eo="item-resized",to="state-changed",oo="change-title",ro="autosave",io=(0,h.createLogger)("foundation-layout");const ao=new Map;function no(e){return ao.get(e)}function so(){const e=this.parentElement;switch(e[Bt]){case"root":case"horizontal":case"vertical":case"tabs":return e;default:throw new qt("Using layout region outside of layout root")}}const lo=e=>({horizontal:"column",vertical:"row",tabs:"stack"}[e]),co=d.html`
1608
1608
  <template>
1609
1609
  <slot class="target"></slot>
1610
1610
  </template>
1611
- `,lo=["horizontal","vertical","tabs"];var co;class po extends c.FoundationElement{constructor(){super(...arguments),this.closable=!1,this[co]="item"}connectedCallback(){var e;let t;super.connectedCallback();const o=io(this.registration);if(this.slottedElements=this.shadowRoot.querySelector("slot.target").assignedElements(),o&&this.slottedElements.length>0)throw new Wt(`Cannot use both factory registration and slotted content for registration "${this.registration}". Either register a factory via registerFactory() OR provide slotted content, but not both.`);t=o?this.cacheElementsAndRegister({factory:o,id:this.registration}):this.cacheElementsAndRegister({elements:this.slottedElements,id:this.registration});const r={type:"component",componentType:t,title:null!==(e=this.title)&&void 0!==e?e:`Item ${t}`,reorderEnabled:!0,isClosable:this.closable,size:this.size};this.getParentLayoutComponent().addItemFromChild(r),this.requestLayoutReload()}getParentLayoutComponent(){return ao.apply(this)}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}co=jt,(0,r.Cg)([d.attr],po.prototype,"title",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],po.prototype,"closable",void 0),(0,r.Cg)([d.attr],po.prototype,"size",void 0),(0,r.Cg)([d.attr],po.prototype,"registration",void 0);const uo=po.compose({baseName:"layout-item",template:so});var mo;const ho=lo[0];class vo extends c.FoundationElement{constructor(){super(...arguments),this.type=ho,this[mo]="horizontal"}connectedCallback(){super.connectedCallback(),lo.includes(this.type)||(this.type=ho,oo.warn(`Using invalid attribute "type", defaulting to ${ho}`)),this[jt]=this.type,this.setupLayoutRegion()}setupLayoutRegion(){this.layoutConfig=this.getParentLayoutComponent().addItemFromChild(this.constructLayoutConfig())}constructLayoutConfig(){return{type:no(this[jt]),content:[],size:this.size}}getParentLayoutComponent(){return ao.apply(this)}addItemFromChild(e){return this.layoutConfig.content.push(e),this.layoutConfig.content[this.layoutConfig.content.length-1]}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}mo=jt,(0,r.Cg)([d.attr],vo.prototype,"size",void 0),(0,r.Cg)([d.attr],vo.prototype,"type",void 0);const go=vo.compose({baseName:"layout-region",template:so});var bo=o(37619),yo=o(34814),fo=o(79271),$o=o(98316),wo=o(32808);const xo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMTQ0IDMyaC0xMjhDNy4xNTYgMzIgMCAzOS4xNiAwIDQ4djEyOEMwIDE4NC44IDcuMTU2IDE5MiAxNiAxOTJTMzIgMTg0LjggMzIgMTc2VjY0aDExMkMxNTIuOCA2NCAxNjAgNTYuODQgMTYwIDQ4UzE1Mi44IDMyIDE0NCAzMnpNMTQ0IDQ0OEgzMnYtMTEyQzMyIDMyNy4yIDI0Ljg0IDMyMCAxNiAzMjBTMCAzMjcuMiAwIDMzNnYxMjhDMCA0NzIuOCA3LjE1NiA0ODAgMTYgNDgwaDEyOEMxNTIuOCA0ODAgMTYwIDQ3Mi44IDE2MCA0NjRTMTUyLjggNDQ4IDE0NCA0NDh6TTQzMiAzMjBjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZWNDQ4aC0xMTJjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZzNy4xNTYgMTYgMTYgMTZoMTI4YzguODQ0IDAgMTYtNy4xNTYgMTYtMTZ2LTEyOEM0NDggMzI3LjIgNDQwLjggMzIwIDQzMiAzMjB6TTQzMiAzMmgtMTI4QzI5NS4yIDMyIDI4OCAzOS4xNiAyODggNDhTMjk1LjIgNjQgMzA0IDY0SDQxNnYxMTJDNDE2IDE4NC44IDQyMy4yIDE5MiA0MzIgMTkyUzQ0OCAxODQuOCA0NDggMTc2di0xMjhDNDQ4IDM5LjE2IDQ0MC44IDMyIDQzMiAzMnoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",So="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCA0NjRDMCA0NTUuMiA3LjE2NCA0NDggMTYgNDQ4SDQ5NkM1MDQuOCA0NDggNTEyIDQ1NS4yIDUxMiA0NjRDNTEyIDQ3Mi44IDUwNC44IDQ4MCA0OTYgNDgwSDE2QzcuMTY0IDQ4MCAwIDQ3Mi44IDAgNDY0eiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",Co="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMzE1LjMgNDExLjNjLTYuMjUzIDYuMjUzLTE2LjM3IDYuMjUzLTIyLjYzIDBMMTYwIDI3OC42bC0xMzIuNyAxMzIuN2MtNi4yNTMgNi4yNTMtMTYuMzcgNi4yNTMtMjIuNjMgMGMtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M0wxMzcuNCAyNTZMNC42OSAxMjMuM2MtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwTDE2MCAyMzMuNGwxMzIuNy0xMzIuN2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwYzYuMjUzIDYuMjUzIDYuMjUzIDE2LjM3IDAgMjIuNjNMMTgyLjYgMjU2bDEzMi43IDEzMi43QzMyMS42IDM5NC45IDMyMS42IDQwNS4xIDMxNS4zIDQxMS4zeiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",Ao="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNC4yNTEgMTgxLjFDNy4zOTIgMTc3LjcgMTEuNjkgMTc1LjEgMTYgMTc1LjFjMy44OTEgMCA3Ljc4MSAxLjQwNiAxMC44NiA0LjI1bDE5Ny4xIDE4MS4xbDE5Ny4xLTE4MS4xYzYuNS02IDE2LjY0LTUuNjI1IDIyLjYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Io="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDApIi8+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNDY5MiAwIDAgMS40NjkyIDQ5OS45OTA2IDQ5OS45OTA2KSIgaWQ9IjE3OTM0MSI+IDxnIHN0eWxlPSIiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSI+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDIyLjIyMjIgMCAwIDIyLjIyMjIgLTQ0LjQ0NDcgNDQuNDQ0MSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE2LCAtMjApIiBkPSJNIDI3IDMzIEggNSBhIDIgMiAwIDAgMSAtMiAtMiBWIDkgQSAyIDIgMCAwIDEgNSA3IEggMTUgViA5IEggNSBWIDMxIEggMjcgViAyMSBoIDIgViAzMSBBIDIgMiAwIDAgMSAyNyAzMyBaIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4gPC9nPiA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgyMi4yMjIyIDAgMCAyMi4yMjIyIDEzNy42NzEyIC0xMzcuNjcxNSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTI0LjE5NTIsIC0xMS44MDQ4KSIgZD0iTSAxOCAzIGEgMSAxIDAgMCAwIDAgMiBIIDI5LjU5IEwgMTUuNzQgMTguODUgYSAxIDEgMCAxIDAgMS40MSAxLjQxIEwgMzEgNi40MSBWIDE4IGEgMSAxIDAgMCAwIDIgMCBWIDMgWiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+IDwvZz4gPGcgdHJhbnNmb3JtPSJtYXRyaXgoMjIuMjIyMiAwIDAgMjIuMjIyMiAtMC4wMDA0IC0wLjAwMDQpIj4gPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBpcy1jdXN0b20tZm9udDogbm9uZTsgZm9udC1maWxlLXVybDogbm9uZTsgZmlsbDogcmdiKDAsMCwwKTsgZmlsbC1vcGFjaXR5OiAwOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB4PSItMTgiIHk9Ii0xOCIgcng9IjAiIHJ5PSIwIiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiLz4gPC9nPiA8L2c+IDwvZz4gPC9zdmc+Cg==",ko=`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${p.neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n cursor: move;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_title {\n color: white;\n padding-left: 10px;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`,Mo=d.css`
1611
+ `,po=["horizontal","vertical","tabs"];var uo;class mo extends c.FoundationElement{constructor(){super(...arguments),this.closable=!1,this[uo]="item"}connectedCallback(){var e;let t;super.connectedCallback();const o=no(this.registration);if(this.slottedElements=this.shadowRoot.querySelector("slot.target").assignedElements(),o&&this.slottedElements.length>0)throw new qt(`Cannot use both factory registration and slotted content for registration "${this.registration}". Either register a factory via registerFactory() OR provide slotted content, but not both.`);t=o?this.cacheElementsAndRegister({factory:o,id:this.registration}):this.cacheElementsAndRegister({elements:this.slottedElements,id:this.registration});const r={type:"component",componentType:t,title:null!==(e=this.title)&&void 0!==e?e:`Item ${t}`,reorderEnabled:!0,isClosable:this.closable,size:this.size};this.getParentLayoutComponent().addItemFromChild(r),this.requestLayoutReload()}getParentLayoutComponent(){return so.apply(this)}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}uo=Bt,(0,r.Cg)([d.attr],mo.prototype,"title",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],mo.prototype,"closable",void 0),(0,r.Cg)([d.attr],mo.prototype,"size",void 0),(0,r.Cg)([d.attr],mo.prototype,"registration",void 0);const ho=mo.compose({baseName:"layout-item",template:co});var vo;const go=po[0];class bo extends c.FoundationElement{constructor(){super(...arguments),this.type=go,this[vo]="horizontal"}connectedCallback(){super.connectedCallback(),po.includes(this.type)||(this.type=go,io.warn(`Using invalid attribute "type", defaulting to ${go}`)),this[Bt]=this.type,this.setupLayoutRegion()}setupLayoutRegion(){this.layoutConfig=this.getParentLayoutComponent().addItemFromChild(this.constructLayoutConfig())}constructLayoutConfig(){return{type:lo(this[Bt]),content:[],size:this.size}}getParentLayoutComponent(){return so.apply(this)}addItemFromChild(e){return this.layoutConfig.content.push(e),this.layoutConfig.content[this.layoutConfig.content.length-1]}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}vo=Bt,(0,r.Cg)([d.attr],bo.prototype,"size",void 0),(0,r.Cg)([d.attr],bo.prototype,"type",void 0);const yo=bo.compose({baseName:"layout-region",template:co});var fo=o(37619),$o=o(34814),wo=o(79271),xo=o(98316),So=o(32808);const Co="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMTQ0IDMyaC0xMjhDNy4xNTYgMzIgMCAzOS4xNiAwIDQ4djEyOEMwIDE4NC44IDcuMTU2IDE5MiAxNiAxOTJTMzIgMTg0LjggMzIgMTc2VjY0aDExMkMxNTIuOCA2NCAxNjAgNTYuODQgMTYwIDQ4UzE1Mi44IDMyIDE0NCAzMnpNMTQ0IDQ0OEgzMnYtMTEyQzMyIDMyNy4yIDI0Ljg0IDMyMCAxNiAzMjBTMCAzMjcuMiAwIDMzNnYxMjhDMCA0NzIuOCA3LjE1NiA0ODAgMTYgNDgwaDEyOEMxNTIuOCA0ODAgMTYwIDQ3Mi44IDE2MCA0NjRTMTUyLjggNDQ4IDE0NCA0NDh6TTQzMiAzMjBjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZWNDQ4aC0xMTJjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZzNy4xNTYgMTYgMTYgMTZoMTI4YzguODQ0IDAgMTYtNy4xNTYgMTYtMTZ2LTEyOEM0NDggMzI3LjIgNDQwLjggMzIwIDQzMiAzMjB6TTQzMiAzMmgtMTI4QzI5NS4yIDMyIDI4OCAzOS4xNiAyODggNDhTMjk1LjIgNjQgMzA0IDY0SDQxNnYxMTJDNDE2IDE4NC44IDQyMy4yIDE5MiA0MzIgMTkyUzQ0OCAxODQuOCA0NDggMTc2di0xMjhDNDQ4IDM5LjE2IDQ0MC44IDMyIDQzMiAzMnoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Ao="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCA0NjRDMCA0NTUuMiA3LjE2NCA0NDggMTYgNDQ4SDQ5NkM1MDQuOCA0NDggNTEyIDQ1NS4yIDUxMiA0NjRDNTEyIDQ3Mi44IDUwNC44IDQ4MCA0OTYgNDgwSDE2QzcuMTY0IDQ4MCAwIDQ3Mi44IDAgNDY0eiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",Io="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMzE1LjMgNDExLjNjLTYuMjUzIDYuMjUzLTE2LjM3IDYuMjUzLTIyLjYzIDBMMTYwIDI3OC42bC0xMzIuNyAxMzIuN2MtNi4yNTMgNi4yNTMtMTYuMzcgNi4yNTMtMjIuNjMgMGMtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M0wxMzcuNCAyNTZMNC42OSAxMjMuM2MtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwTDE2MCAyMzMuNGwxMzIuNy0xMzIuN2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwYzYuMjUzIDYuMjUzIDYuMjUzIDE2LjM3IDAgMjIuNjNMMTgyLjYgMjU2bDEzMi43IDEzMi43QzMyMS42IDM5NC45IDMyMS42IDQwNS4xIDMxNS4zIDQxMS4zeiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",ko="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNC4yNTEgMTgxLjFDNy4zOTIgMTc3LjcgMTEuNjkgMTc1LjEgMTYgMTc1LjFjMy44OTEgMCA3Ljc4MSAxLjQwNiAxMC44NiA0LjI1bDE5Ny4xIDE4MS4xbDE5Ny4xLTE4MS4xYzYuNS02IDE2LjY0LTUuNjI1IDIyLjYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Mo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDApIi8+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNDY5MiAwIDAgMS40NjkyIDQ5OS45OTA2IDQ5OS45OTA2KSIgaWQ9IjE3OTM0MSI+IDxnIHN0eWxlPSIiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSI+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDIyLjIyMjIgMCAwIDIyLjIyMjIgLTQ0LjQ0NDcgNDQuNDQ0MSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE2LCAtMjApIiBkPSJNIDI3IDMzIEggNSBhIDIgMiAwIDAgMSAtMiAtMiBWIDkgQSAyIDIgMCAwIDEgNSA3IEggMTUgViA5IEggNSBWIDMxIEggMjcgViAyMSBoIDIgViAzMSBBIDIgMiAwIDAgMSAyNyAzMyBaIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4gPC9nPiA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgyMi4yMjIyIDAgMCAyMi4yMjIyIDEzNy42NzEyIC0xMzcuNjcxNSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTI0LjE5NTIsIC0xMS44MDQ4KSIgZD0iTSAxOCAzIGEgMSAxIDAgMCAwIDAgMiBIIDI5LjU5IEwgMTUuNzQgMTguODUgYSAxIDEgMCAxIDAgMS40MSAxLjQxIEwgMzEgNi40MSBWIDE4IGEgMSAxIDAgMCAwIDIgMCBWIDMgWiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+IDwvZz4gPGcgdHJhbnNmb3JtPSJtYXRyaXgoMjIuMjIyMiAwIDAgMjIuMjIyMiAtMC4wMDA0IC0wLjAwMDQpIj4gPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBpcy1jdXN0b20tZm9udDogbm9uZTsgZm9udC1maWxlLXVybDogbm9uZTsgZmlsbDogcmdiKDAsMCwwKTsgZmlsbC1vcGFjaXR5OiAwOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB4PSItMTgiIHk9Ii0xOCIgcng9IjAiIHJ5PSIwIiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiLz4gPC9nPiA8L2c+IDwvZz4gPC9zdmc+Cg==",Lo=`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${p.neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n cursor: move;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_title {\n color: white;\n padding-left: 10px;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`,Eo=d.css`
1612
1612
  * {
1613
1613
  --spinner-size: 50px;
1614
1614
  }
@@ -1676,9 +1676,9 @@
1676
1676
  left: calc(50% - (calc(var(--spinner-size) / 2)));
1677
1677
  top: calc(50% - (calc(var(--spinner-size) / 2)));
1678
1678
  }
1679
- `,Lo=d.css`
1679
+ `,To=d.css`
1680
1680
  ${"\n :host {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n }\n .layout-container {\n position: absolute;\n height: 100%;\n width: 100%;\n }\n"}
1681
- ${Mo}
1681
+ ${Eo}
1682
1682
 
1683
1683
  :host {
1684
1684
  --foundation-tab-height: calc(
@@ -1749,7 +1749,7 @@
1749
1749
  font-family: inherit;
1750
1750
  font-size: var(--type-ramp-minus-1-font-size);
1751
1751
  font-weight: 400;
1752
- height: var(--foundation-tab-height, ${Yt});
1752
+ height: var(--foundation-tab-height, ${Vt});
1753
1753
  margin-right: 2px;
1754
1754
  padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);
1755
1755
  float: left;
@@ -1767,11 +1767,11 @@
1767
1767
  display: flex;
1768
1768
  }
1769
1769
  .lm_header .lm_controls > * {
1770
- width: calc(var(--foundation-tab-height, ${Yt}) - 8px);
1771
- height: calc(var(--foundation-tab-height, ${Yt}) - 8px);
1770
+ width: calc(var(--foundation-tab-height, ${Vt}) - 8px);
1771
+ height: calc(var(--foundation-tab-height, ${Vt}) - 8px);
1772
1772
  background-repeat: no-repeat;
1773
1773
  background-position: center;
1774
- background-size: calc(var(--foundation-tab-height, ${Yt}) * 0.45);
1774
+ background-size: calc(var(--foundation-tab-height, ${Vt}) * 0.45);
1775
1775
  background-color: var(
1776
1776
  --icon-button-background,
1777
1777
  color-mix(in srgb, var(--neutral-fill-strong-rest), transparent 90%)
@@ -1787,17 +1787,17 @@
1787
1787
  }
1788
1788
 
1789
1789
  .lm_controls .lm_maximise {
1790
- background-image: url('${xo}');
1790
+ background-image: url('${Co}');
1791
1791
  }
1792
1792
  .lm_maximised .lm_controls .lm_maximise {
1793
- background-image: url('${So}');
1793
+ background-image: url('${Ao}');
1794
1794
  }
1795
1795
  .lm_controls .lm_close {
1796
- background-image: url('${Co}');
1796
+ background-image: url('${Io}');
1797
1797
  }
1798
1798
  .lm_header .lm_tab .lm_close_tab {
1799
- background-image: url('${Co}');
1800
- background-size: calc(var(--foundation-tab-height, ${Yt}) * 0.2777);
1799
+ background-image: url('${Io}');
1800
+ background-size: calc(var(--foundation-tab-height, ${Vt}) * 0.2777);
1801
1801
  background-repeat: no-repeat;
1802
1802
  background-position: center;
1803
1803
  margin-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);
@@ -1812,10 +1812,10 @@
1812
1812
  content: none;
1813
1813
  }
1814
1814
  .lm_header .lm_controls .lm_tabdropdown {
1815
- background-image: url('${Ao}');
1815
+ background-image: url('${ko}');
1816
1816
  }
1817
1817
  .lm_header .lm_tabdropdown_list {
1818
- top: var(--foundation-tab-height, ${Yt});
1818
+ top: var(--foundation-tab-height, ${Vt});
1819
1819
  right: 108px;
1820
1820
  background-color: var(--neutral-layer-3);
1821
1821
  border: 1px solid;
@@ -1829,7 +1829,7 @@
1829
1829
  white-space: nowrap;
1830
1830
  background-color: transparent;
1831
1831
  color: var(--neutral-foreground-rest);
1832
- height: var(--foundation-tab-height, ${Yt});
1832
+ height: var(--foundation-tab-height, ${Vt});
1833
1833
  border-radius: 0;
1834
1834
  overflow: visible;
1835
1835
  text-overflow: unset;
@@ -1935,8 +1935,8 @@
1935
1935
  user-select: none;
1936
1936
  }
1937
1937
  .lm_header .lm_tab .lm_close_tab {
1938
- width: calc(var(--foundation-tab-height, ${Yt}) * 0.3888);
1939
- height: calc(var(--foundation-tab-height, ${Yt}) * 0.3888);
1938
+ width: calc(var(--foundation-tab-height, ${Vt}) * 0.3888);
1939
+ height: calc(var(--foundation-tab-height, ${Vt}) * 0.3888);
1940
1940
  text-align: center;
1941
1941
  }
1942
1942
  .lm_stack.lm_left .lm_header,
@@ -2099,9 +2099,9 @@
2099
2099
  .lm_popin > .lm_icon {
2100
2100
  z-index: 20;
2101
2101
  } /*# sourceMappingURL=goldenlayout-base.css.map */
2102
- `;var Eo=o(79780);let To=class extends d.FASTElement{constructor(){super(...arguments),this.popoutRegistry=new Map}connectedCallback(){super.connectedCallback(),this.layoutKey=new URLSearchParams(window.location.search).get(Ht),this.setupChannel(),this.setupUnloadListener(),this.layoutKey?(this.startPolling(),this.channel.postMessage("popout-handshake",{layoutKey:this.layoutKey})):this.setupListener()}disconnectedCallback(){super.disconnectedCallback(),this.channel&&this.channel.close(),this.stopPolling(),this.teardownUnloadListener(),this.layoutKey||this.closeAllPopouts()}setupChannel(){const e=this.channelName||"f-layout-popout-channel";this.channel=(0,Eo.vp)(e),this.layoutKey&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-sync",e)){const{layoutKey:t,state:o}=e.data.detail;t===this.layoutKey&&void 0!==o&&this.applyStateToParent(o)}})}setupListener(){this.channel&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-update",e)){const{layoutKey:t,geometry:o,state:r}=e.data.detail,i=this.popoutRegistry.get(t);this.popoutRegistry.set(t,Object.assign(Object.assign({},i),{geometry:o,state:r})),this.emitAutosave()}else if(this.channel.isMessageType("popout-closed",e)){const{layoutKey:t}=e.data.detail;this.popoutRegistry.delete(t),this.emitAutosave()}else if(this.channel.isMessageType("popout-handshake",e)){const{layoutKey:t}=e.data.detail,o=this.popoutRegistry.get(t);o&&this.channel.postMessage("popout-sync",{layoutKey:t,geometry:o.geometry,state:o.state})}})}applyStateToParent(e){if(!this.parentLayout)return;const t=this.parentLayout.getLayoutComponents();for(const o of t)for(const t of o)t&&"function"==typeof t.applyState&&t.applyState(e)}setupUnloadListener(){this.unloadHandler=()=>{this.layoutKey?this.channel&&this.channel.postMessage("popout-closed",{layoutKey:this.layoutKey}):this.closeAllPopouts()},window.addEventListener("beforeunload",this.unloadHandler)}teardownUnloadListener(){this.unloadHandler&&(window.removeEventListener("beforeunload",this.unloadHandler),this.unloadHandler=null)}emitAutosave(){this.$emit(to,void 0,{bubbles:!0,composed:!0})}startPolling(){this.pollInterval=setInterval(()=>(0,r.sH)(this,void 0,void 0,function*(){const e=yield this.getGeometry(),t=this.getComponentState(),o={geometry:e,state:t},r=JSON.stringify(o);r!==this.lastUpdate&&(this.broadcastUpdate(e,t),this.lastUpdate=r)}),1e3)}stopPolling(){this.pollInterval&&clearInterval(this.pollInterval)}getGeometry(){return(0,r.sH)(this,void 0,void 0,function*(){const e=yield(()=>(0,r.sH)(this,void 0,void 0,function*(){var e;if("getScreenDetails"in window)try{return null===(e=(yield window.getScreenDetails()).currentScreen)||void 0===e?void 0:e.label}catch(e){return}}))();return{screenX:window.screenX,screenY:window.screenY,outerWidth:window.outerWidth,outerHeight:window.outerHeight,screenId:e}})}getComponentState(){if(!this.parentLayout)return;const e=this.parentLayout.getLayoutComponents();for(const t of e)for(const e of t)if(e&&"function"==typeof e.getCurrentState)return e.getCurrentState()}broadcastUpdate(e,t){this.channel&&this.layoutKey&&this.channel.postMessage("popout-update",{layoutKey:this.layoutKey,geometry:e,state:t})}openPopout(e,t,o){return(0,r.sH)(this,void 0,void 0,function*(){const r=new URL(window.location.toString()),i=new URLSearchParams;i.append(Ht,e),r.search=i.toString();let a="popup";const n=null==t?void 0:t.geometry;let s=null==n?void 0:n.screenX,l=null==n?void 0:n.screenY;if((null==n?void 0:n.screenId)&&"getScreenDetails"in window)try{const e=(yield window.getScreenDetails()).screens.find(e=>e.label===n.screenId);if(e){s>=e.availLeft&&s<e.availLeft+e.availWidth&&l>=e.availTop&&l<e.availTop+e.availHeight||(s=e.availLeft,l=e.availTop)}else s=void 0,l=void 0}catch(e){}n?(a+=`,width=${n.outerWidth},height=${n.outerHeight}`,void 0!==s&&(a+=`,left=${s}`),void 0!==l&&(a+=`,top=${l}`)):a+=",width=800,height=600";const d=window.open(r,`popout-${e}-${(null==o?void 0:o.createId())||Date.now()}`,a);return d?(this.popoutRegistry.set(e,{geometry:n||{},state:null==t?void 0:t.state,window:d}),d):(console.warn(`Popout window for ${e} was blocked.`),null)})}getRegistry(){const e={};for(const[t,o]of this.popoutRegistry.entries())e[t]={geometry:o.geometry,state:o.state};return e}restorePopouts(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.closeAllPopouts();for(const[t,o]of Object.entries(e))this.popoutRegistry.set(t,{geometry:o.geometry,state:o.state});const o=Array.from(this.popoutRegistry.keys());0!==o.length&&(yield Promise.all(o.map(e=>{const o=this.popoutRegistry.get(e);return this.openPopout(e,o,t)})))})}closeAllPopouts(){for(const e of this.popoutRegistry.values())e.window&&!e.window.closed&&e.window.close();this.popoutRegistry.clear()}};var Ro,_o;(0,r.Cg)([(0,d.attr)({attribute:"channel-name"})],To.prototype,"channelName",void 0),(0,r.Cg)([d.observable],To.prototype,"parentLayout",void 0),To=(0,r.Cg)([(0,d.customElement)({name:"foundation-layout-popout-controller",template:null,styles:null})],To);let Do=!1;const No={area:"right",multiple:{type:"tabs",size:"33%"}};class Po extends c.FoundationElement{constructor(){super(),this.layoutConfig={root:void 0},this.defaultLayoutConfig={root:void 0},this[_o]="root",this.reloadBuffer=500,this.reloadPending=!1,this.registeredComponents=0,this.missingItemPlaceholder=e=>`"${e}" cannot be loaded as it isn't registered with the layout system`,this.hasFirstLoaded=!1,this.usingDeclerativeAPI=!1,this.customButtons=[],this.dragging=!1,this.class="FoundationLayoutMain",this.lifecycleUpdateToken=void 0,this.popupMode=!1,this.popoutConfig=void 0,Ro.set(this,void 0),this.customTokensMap=(0,le.designTokensMap)(),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.cacheAndSaveLayout=this.cacheAndSaveLayout.bind(this),this.onPostItemRemoved=this.onPostItemRemoved.bind(this),this.onPreItemRemoved=this.onPreItemRemoved.bind(this),this.onAutosaveRequest=this.onAutosaveRequest.bind(this),this.onPreItemMaximised=this.onPreItemMaximised.bind(this),this.onPreItemMinimised=this.onPreItemMinimised.bind(this)}connectedCallback(){super.connectedCallback(),oo.debug("FoundationLayout connected to the DOM"),this.updateLifecycleToken(),this.layout=new bo.C(this.layoutElement),this.layout.resizeWithContainerAutomatically=!0,Do||((new CSSStyleSheet).replace(ko).then(e=>document.adoptedStyleSheets.push(e)).catch(e=>oo.error("Failed to replace styles:",e)),Do=!0),this.shadowRoot.addEventListener("dragStart",this.onDragStart,!0),this.shadowRoot.addEventListener("dragStop",this.onDragStop,!0),this.shadowRoot.addEventListener("closeButtonPre",this.onPreItemRemoved,!0),this.shadowRoot.addEventListener("closeButtonPressed",this.onPostItemRemoved,!0),this.shadowRoot.addEventListener("maximised",this.onPreItemMaximised,!0),this.shadowRoot.addEventListener("minimised",this.onPreItemMinimised,!0),this.shadowRoot.addEventListener(to,this.onAutosaveRequest,!0),this.initPopoutModeIfEnabled(),this.setupCustomButtons()}disconnectedCallback(){this.shadowRoot.removeEventListener("dragStart",this.onDragStart),this.shadowRoot.removeEventListener("dragStop",this.onDragStop),this.shadowRoot.removeEventListener("closeButtonPre",this.onPreItemRemoved),this.shadowRoot.removeEventListener("closeButtonPressed",this.onPostItemRemoved),this.shadowRoot.removeEventListener("maximised",this.onPreItemMaximised),this.shadowRoot.removeEventListener("minimised",this.onPreItemMinimised),this.shadowRoot.addEventListener(to,this.onAutosaveRequest)}onDragStart(){this.dragging=!0}onDragStop(){this.dragging=!1,this.cacheAndSaveLayout(),this.attatchResizeEvents()}onPostItemAdded(){this.$emit(Xt),this.cacheAndSaveLayout()}onPreItemRemoved(){this.updateLifecycleToken()}onPostItemRemoved(){this.$emit(Jt),this.cacheAndSaveLayout()}onPostItemResized(){this.$emit(Qt),this.cacheAndSaveLayout()}onAutosaveRequest(){this.cacheAndSaveLayout()}onPreItemMaximised(){this.updateLifecycleToken()}onPreItemMinimised(){this.updateLifecycleToken()}customTokensMapChanged(){this.customTokensMap.value&&this.hasFirstLoaded&&this.loadGLConfigAndSetup(this.layoutConfig)}static layoutRequiredRegistrations(e){const{c:t}=e,o=yo.bP.fromResolved(fo.nh.unminifyConfig(t)),r=[];return JSON.stringify(o,(e,t)=>("componentType"===e&&r.push(t),t)),r.sort()}registeredItems(){return this.layout.getRegisteredComponentTypeNames()}getLayout(){var e,t;return this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=[...e].map(e=>{var t;return null===(t=e.getCurrentState)||void 0===t?void 0:t.call(e)}),o=e[0][Ut];o?o.container.setState({instance:o.instance,orderedStates:t}):oo.warn("Component instance container not found for items:",e)}),{v:"1",c:fo.nh.minifyConfig(this.layout.saveLayout()),popouts:null!==(t=null===(e=this.popoutController)||void 0===e?void 0:e.getRegistry())&&void 0!==t?t:{}}}tryActivatePopoutMode(){if(!this.popupMode)return!1;const e={root:{type:"component",componentType:new URLSearchParams(window.location.search).get(Ht),isClosable:!1},settings:{hasHeaders:!1}};this.loadGLConfigAndSetup(e);const t=e=>{if(e.classList.contains("f-layout-popout"))return e;if(null===e.parentElement){const o=e.getRootNode().host;return o?t(o):null}return t(e.parentElement)},o=t(this);if(o){o.appendChild(this);let e=this.previousElementSibling;for(;e;)e.remove(),e=this.previousElementSibling}return this.autoSaveKey=void 0,!0}tryLoadLayoutFromLocalStorage(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Bt)||"{}");if(!(this.autoSaveKey in e))return!1;const t=JSON.parse(e[this.autoSaveKey]);return this.loadLayout(t,"placeholder",!0),!0}clearAutosaveAndRevertToDefault(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Bt)||"{}");return this.autoSaveKey in e&&(delete e[this.autoSaveKey],this.session.setLocalStorageItem(Bt,JSON.stringify(e))),!!this.defaultLayoutConfig.root&&(this.updateLifecycleToken(),this.layoutConfig=JSON.parse(JSON.stringify(this.defaultLayoutConfig)),this.loadGLConfigAndSetup(this.layoutConfig),this.cacheAndSaveLayout(),!0)}loadLayout(e,t="error",o=!1){var r;const i=this.registeredItems(),a=Po.layoutRequiredRegistrations(e),n=(s=i,a.filter(e=>!s.includes(e)));var s;if(0!==n.length&&"error"===t)throw new Wt(`Trying to load layout with extra components. The component(s) not currently loaded are "${[...new Set(n)]}"`);const l=yo.bP.fromResolved(fo.nh.unminifyConfig(e.c));o&&this.removeConfigCacheInformation(l),!this.popupMode&&this.popoutController&&this.popoutController.restorePopouts(null!==(r=e.popouts)&&void 0!==r?r:{},this.uuid),0!==n.length&&"placeholder"===t&&this.registerPlaceholdersAndSetClosable(l,n),this.loadGLConfigAndSetup(l);this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=e[0][Ut].container.getState().orderedStates;t&&[...e].map((e,o)=>{var r,i;return null===(r=e.applyState)||void 0===r?void 0:r.call(e,null!==(i=t[o])&&void 0!==i?i:null)})}),this.cacheAndSaveLayout()}addItem(e,t=No){var o,r,i;if("area"in t&&"100%"===(null===(o=t.multiple)||void 0===o?void 0:o.size))throw new Wt("Adding an item taking up 100% size is not defined behaviour. The size attribute is a relative size of the item inside its layout stack. If you’re trying to set an initial layout with a single item, you can omit the size attribute as implicitly it takes up the full layout. If you already have layout items and you’re trying to add a new one that takes up the entire layout then you need to delete all of the other items and add this item only.");const a=Array.isArray(e)?e:[e],n=1===a.length,s=a.map(e=>{const{registration:t,title:o,size:r,closable:i,showMaximiseButton:a}=e;if(!this.layout.getRegisteredComponentTypeNames().includes(t))throw new Zt(`Cannot add item '${t}' which is not registered with the layout system.`);return{type:"component",componentType:t,title:null!=o?o:`Item ${t}`,reorderEnabled:!0,isClosable:i||!1,size:n?void 0:r,header:{maximise:!1!==a&&"maximise"}}});if(this.updateLifecycleToken(),"nearRegistration"in t){if(!n)throw new Wt("nearRegistration placement only supports adding a single item at a time. Pass one RegisteredElementConfig, not an array.");if(void 0===this.layoutConfig.root)return this.layoutConfig={root:{type:"stack",content:s}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();const e=(Array.isArray(t.nearRegistration)?t.nearRegistration:[t.nearRegistration]).map(e=>({typeId:9,componentType:e}));return void 0!==this.layout.addItemAtLocation(s[0],e)?(this.cacheAndSaveLayout(),void this.onPostItemAdded()):(this.layoutConfig={root:{type:"row",content:[this.layoutConfig.root,{type:"stack",content:s}]}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded())}const l={type:no((null===(r=t.multiple)||void 0===r?void 0:r.type)||"tabs"),content:s,size:n?a[0].size:null===(i=t.multiple)||void 0===i?void 0:i.size};if(void 0===this.layoutConfig.root)return this.layoutConfig={root:l},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();this.cacheAndSaveLayout();const{area:d}=t;this.layoutConfig={root:{type:"top"===d||"bottom"===d?"column":"row",content:"right"===d||"bottom"===d?[this.layoutConfig.root,l]:[l,this.layoutConfig.root]}},this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemAdded()}removeItems(e,t=!1){let o=0;const r=r=>{var i;return!(0===(null===(i=r.content)||void 0===i?void 0:i.length)||"component"===r.type&&r.componentType===e&&(e=>t||e.isClosable)(r)&&(o+=1,1))},i=(e=>{var t,o;const i=e=>{var t,o;"component"!==e.type&&(null===(t=e.content)||void 0===t||t.forEach(i),e.content=null===(o=e.content)||void 0===o?void 0:o.filter(r),"stack"===e.type&&delete e.activeItemIndex)};return null===(t=null==e?void 0:e.content)||void 0===t||t.forEach(i),"stack"===e.type&&delete e.activeItemIndex,null===(o=null==e?void 0:e.content)||void 0===o?void 0:o.filter(r)})(this.layoutConfig.root);return 0===o?0:(this.layoutConfig=Object.assign(Object.assign({},this.layoutConfig),{root:i.length>0?Object.assign(Object.assign({},this.layoutConfig.root),{content:i}):void 0}),this.updateLifecycleToken(),this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemRemoved(),o)}registerItem(e,t){if(!this.layout.isInitialised)throw new Wt("Cannot add item via JS API until initialised");if(io(e))throw new Zt(`Registration "${e}" already has a factory registered via registerFactory(). Cannot register the same name via the JavaScript API. Use a different registration name or unregister the factory first.`);return"function"==typeof t?this.cacheElementsAndRegister({factory:t,id:e}):this.cacheElementsAndRegister({elements:t,id:e})}updateLifecycleToken(){this.lifecycleUpdateToken=this.uuid.createId()}requestLayoutReload(){this.reloadPending||(this.reloadPending=!0,setTimeout(()=>{var e;if(this.reloadPending=!1,this.hasFirstLoaded)this.loadGLConfigAndSetup(this.layoutConfig);else{this.hasFirstLoaded=!0,this.defaultLayoutConfig=JSON.parse(JSON.stringify(this.layoutConfig));this.tryLoadLayoutFromLocalStorage()||!1!==(null===(e=this.popoutConfig)||void 0===e?void 0:e.loadAutomatically)&&this.tryActivatePopoutMode()||this.loadGLConfigAndSetup(this.layoutConfig),this.$emit(qt)}},this.reloadBuffer))}addItemFromChild(e){if(void 0!==this.layoutConfig.root)throw new Wt("Cannot have multiple layout items as direct descendants of the layout root. You need to put the layout items within a layout region.");return this.usingDeclerativeAPI=!0,this.layoutConfig={root:e},this.layoutConfig.root}cacheElementsAndRegister(e){const t=e.id||`${this.registeredComponents+=1}`;if(this.layout.getRegisteredComponentTypeNames().includes(t))throw new Zt(`Cannot register item with already registered name: '${t}'`);const o=(()=>{if("factory"in e){const o=new Map,r=new Map,i=new Map;return(a,n)=>{var s;(null==n?void 0:n.instance)||(n.instance=this.uuid.createId()),a.state.instance=n.instance,a.state.originalTitle=null!==(s=n.originalTitle)&&void 0!==s?s:a.title;const l={container:a,instance:n.instance,registration:t},d=n.instance,c=i.get(d);if(c&&c!==a){oo.debug(`Recreating instance ${d} for registration ${t} due to container change`);const e=r.get(d);if(e&&"function"==typeof e)try{e()}catch(e){oo.error(`Error calling cleanup for instance ${d}:`,e)}o.delete(d),r.delete(d)}if(!o.has(d)){const t=document.createElement("div");t.style.width="100%",t.style.height="100%",t[Ut]=l;const i=e.factory(t);o.set(d,t),i&&r.set(d,i)}const p=o.get(d);p?(p[Ut]=l,a.element.appendChild(p),i.set(d,a),this.setupLayoutReceiveEvents(a,n)):oo.error(`Failed to get component container for instance ${d}`)}}{const o=document.createDocumentFragment();o[a.a]=!0,e.elements.forEach(e=>o.appendChild(e));const r=new Map;return(e,i)=>{var a;if((null==i?void 0:i.instance)||(i.instance=this.uuid.createId()),e.state.instance=i.instance,e.state.originalTitle=null!==(a=i.originalTitle)&&void 0!==a?a:e.title,!r.has(null==i?void 0:i.instance)){const e=document.createDocumentFragment();Array.from(o.children).forEach(t=>{e.appendChild(t.cloneNode(!0))}),r.set(i.instance,[...e.children])}const n={container:e,instance:i.instance,registration:t};r.get(i.instance).forEach(t=>{e.element.appendChild(t),t[Ut]=n}),this.setupLayoutReceiveEvents(e,i)}}})();return this.layout.registerComponentFactoryFunction(t,o),t}setupLayoutReceiveEvents(e,t){const o=e.state.originalTitle;e.element.addEventListener(eo,t=>{const r=null==t?void 0:t.detail;(null==r?void 0:r.title)&&(null==r?void 0:r.mode)||oo.error("Invalid change-title event.detail:",null==t?void 0:t.detail),e.setTitle(`${"suffix"===r.mode?o+" ":""}${r.title}`)})}cacheAndSaveLayout(){if(this.layoutConfig=yo.bP.fromResolved(this.layout.saveLayout()),this.autoSaveKey){const e=JSON.parse(this.session.getLocalStorageItem(Bt)||"{}");e[this.autoSaveKey]=JSON.stringify(this.getLayout()),this.session.setLocalStorageItem(Bt,JSON.stringify(e))}this.$emit(Kt)}registerPlaceholdersAndSetClosable(e,t){const o=document.createElement("p");o.style.textAlign="center",o.style.position="relative",o.style.top="50%";const r=e=>{var i;if("component"===e.type&&t.includes(e.componentType.toString())){const t=e.componentType.toString();e.isClosable=!0;const r=o.cloneNode();r.textContent=this.missingItemPlaceholder(t),this.registerItem(t,[r])}null===(i=e.content)||void 0===i||i.forEach(r)};r(e.root)}loadGLConfigAndSetup(e){const t={dimensions:{headerHeight:parseInt(Gt().replace("px","")),borderWidth:12,itemBorder:Vt()},header:{maximise:"maximise",minimise:"minimise",popout:!1}};this.hasFirstLoaded=!0;try{this.layout.loadLayout(Object.assign(Object.assign(Object.assign({},e),t),{dimensions:Object.assign(Object.assign({},t.dimensions),this.dimensionsConfig)}))}catch(e){this.handleGLRunErrors(e)}this.attatchResizeEvents()}handleGLRunErrors(e){if(e.message.includes("ROCCAS6692"))throw new Wt('Golden layout internal error ROCCAS6692. A maths error has accoured while calculating the layout item sizes. Verify you have not added an item with "size: 100%".');throw e}attatchResizeEvents(){void 0===(0,r.gn)(this,Ro,"f")&&(0,r.GG)(this,Ro,()=>this.onPostItemResized.bind(this)(),"f"),this.shadowRoot.querySelectorAll("div.lm_drag_handle").forEach(e=>{e.removeEventListener("click",(0,r.gn)(this,Ro,"f")),e.addEventListener("click",(0,r.gn)(this,Ro,"f"))})}setupCustomButtons(){this.layout.on("stackCreated",e=>{var t;const o=e.target.header.controlsContainerElement;null===(t=this.customButtons)||void 0===t||t.forEach(t=>{const r=document.createElement("div");r.classList.add("lm_custom_button"),r.style["background-image"]=`url('${t.svg}')`,r.addEventListener("click",()=>t.onClick(r,e.target.getActiveContentItem().container.element)),o.prepend(r)})})}getLayoutComponents(){return[...this.shadowRoot.querySelectorAll("div.lm_content")].map(e=>[...e.children])}removeConfigCacheInformation(e){const t=e=>{var o;null===(o=e.content)||void 0===o||o.forEach(e=>t(e)),"component"===e.type&&delete e.componentState.instance};return t(e.root),e}initPopoutModeIfEnabled(){if(!this.popoutConfig)return;oo.warn("Layout pop-out mode is enabled, this is an experimental feature and may change in future versions");const e=Object.assign(Object.assign({},this.popoutConfig),{loadAutomatically:!0,popoutDimension:Object.assign(Object.assign({},this.popoutConfig.popoutDimension),{width:960,height:720})});this.customButtons.push({svg:Io,onClick:(t,o)=>{var r,i;const a=o.firstChild[Ut].registration,n=o.firstChild,s=null===(r=null==n?void 0:n.getCurrentState)||void 0===r?void 0:r.call(n),l={screenX:void 0,screenY:void 0,outerWidth:e.popoutDimension.width,outerHeight:e.popoutDimension.height};null===(i=this.popoutController)||void 0===i||i.openPopout(a,{geometry:l,state:s},this.uuid),this.cacheAndSaveLayout()}}),this.popupMode=window.location.search.includes(Ht)}}Ro=new WeakMap,_o=jt,(0,r.Cg)([(0,d.attr)({attribute:"reload-buffer"})],Po.prototype,"reloadBuffer",void 0),(0,r.Cg)([wo.k],Po.prototype,"uuid",void 0),(0,r.Cg)([$o.N],Po.prototype,"session",void 0),(0,r.Cg)([(0,d.attr)({attribute:"auto-save-key"})],Po.prototype,"autoSaveKey",void 0),(0,r.Cg)([d.observable],Po.prototype,"missingItemPlaceholder",void 0),(0,r.Cg)([d.observable],Po.prototype,"hasFirstLoaded",void 0),(0,r.Cg)([d.observable],Po.prototype,"usingDeclerativeAPI",void 0),(0,r.Cg)([d.observable],Po.prototype,"dragging",void 0),(0,r.Cg)([d.observable],Po.prototype,"popupMode",void 0),(0,r.Cg)([d.observable],Po.prototype,"popoutConfig",void 0),(0,r.Cg)([d.observable],Po.prototype,"customTokensMap",void 0);const zo=d.html`
2102
+ `;var Ro=o(79780);let _o=class extends d.FASTElement{constructor(){super(...arguments),this.popoutRegistry=new Map}connectedCallback(){super.connectedCallback(),this.layoutKey=new URLSearchParams(window.location.search).get(Gt),this.setupChannel(),this.setupUnloadListener(),this.layoutKey?(this.startPolling(),this.channel.postMessage("popout-handshake",{layoutKey:this.layoutKey})):this.setupListener()}disconnectedCallback(){super.disconnectedCallback(),this.channel&&this.channel.close(),this.stopPolling(),this.teardownUnloadListener(),this.layoutKey||this.closeAllPopouts()}setupChannel(){const e=this.channelName||"f-layout-popout-channel";this.channel=(0,Ro.vp)(e),this.layoutKey&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-sync",e)){const{layoutKey:t,state:o}=e.data.detail;t===this.layoutKey&&void 0!==o&&this.applyStateToParent(o)}})}setupListener(){this.channel&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-update",e)){const{layoutKey:t,geometry:o,state:r}=e.data.detail,i=this.popoutRegistry.get(t);this.popoutRegistry.set(t,Object.assign(Object.assign({},i),{geometry:o,state:r})),this.emitAutosave()}else if(this.channel.isMessageType("popout-closed",e)){const{layoutKey:t}=e.data.detail;this.popoutRegistry.delete(t),this.emitAutosave()}else if(this.channel.isMessageType("popout-handshake",e)){const{layoutKey:t}=e.data.detail,o=this.popoutRegistry.get(t);o&&this.channel.postMessage("popout-sync",{layoutKey:t,geometry:o.geometry,state:o.state})}})}applyStateToParent(e){if(!this.parentLayout)return;const t=this.parentLayout.getLayoutComponents();for(const o of t)for(const t of o)t&&"function"==typeof t.applyState&&t.applyState(e)}setupUnloadListener(){this.unloadHandler=()=>{this.layoutKey?this.channel&&this.channel.postMessage("popout-closed",{layoutKey:this.layoutKey}):this.closeAllPopouts()},window.addEventListener("beforeunload",this.unloadHandler)}teardownUnloadListener(){this.unloadHandler&&(window.removeEventListener("beforeunload",this.unloadHandler),this.unloadHandler=null)}emitAutosave(){this.$emit(ro,void 0,{bubbles:!0,composed:!0})}startPolling(){this.pollInterval=setInterval(()=>(0,r.sH)(this,void 0,void 0,function*(){const e=yield this.getGeometry(),t=this.getComponentState(),o={geometry:e,state:t},r=JSON.stringify(o);r!==this.lastUpdate&&(this.broadcastUpdate(e,t),this.lastUpdate=r)}),1e3)}stopPolling(){this.pollInterval&&clearInterval(this.pollInterval)}getGeometry(){return(0,r.sH)(this,void 0,void 0,function*(){const e=yield(()=>(0,r.sH)(this,void 0,void 0,function*(){var e;if("getScreenDetails"in window)try{return null===(e=(yield window.getScreenDetails()).currentScreen)||void 0===e?void 0:e.label}catch(e){return}}))();return{screenX:window.screenX,screenY:window.screenY,outerWidth:window.outerWidth,outerHeight:window.outerHeight,screenId:e}})}getComponentState(){if(!this.parentLayout)return;const e=this.parentLayout.getLayoutComponents();for(const t of e)for(const e of t)if(e&&"function"==typeof e.getCurrentState)return e.getCurrentState()}broadcastUpdate(e,t){this.channel&&this.layoutKey&&this.channel.postMessage("popout-update",{layoutKey:this.layoutKey,geometry:e,state:t})}openPopout(e,t,o){return(0,r.sH)(this,void 0,void 0,function*(){const r=new URL(window.location.toString()),i=new URLSearchParams;i.append(Gt,e),r.search=i.toString();let a="popup";const n=null==t?void 0:t.geometry;let s=null==n?void 0:n.screenX,l=null==n?void 0:n.screenY;if((null==n?void 0:n.screenId)&&"getScreenDetails"in window)try{const e=(yield window.getScreenDetails()).screens.find(e=>e.label===n.screenId);if(e){s>=e.availLeft&&s<e.availLeft+e.availWidth&&l>=e.availTop&&l<e.availTop+e.availHeight||(s=e.availLeft,l=e.availTop)}else s=void 0,l=void 0}catch(e){}n?(a+=`,width=${n.outerWidth},height=${n.outerHeight}`,void 0!==s&&(a+=`,left=${s}`),void 0!==l&&(a+=`,top=${l}`)):a+=",width=800,height=600";const d=window.open(r,`popout-${e}-${(null==o?void 0:o.createId())||Date.now()}`,a);return d?(this.popoutRegistry.set(e,{geometry:n||{},state:null==t?void 0:t.state,window:d}),d):(console.warn(`Popout window for ${e} was blocked.`),null)})}getRegistry(){const e={};for(const[t,o]of this.popoutRegistry.entries())e[t]={geometry:o.geometry,state:o.state};return e}restorePopouts(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.closeAllPopouts();for(const[t,o]of Object.entries(e))this.popoutRegistry.set(t,{geometry:o.geometry,state:o.state});const o=Array.from(this.popoutRegistry.keys());0!==o.length&&(yield Promise.all(o.map(e=>{const o=this.popoutRegistry.get(e);return this.openPopout(e,o,t)})))})}closeAllPopouts(){for(const e of this.popoutRegistry.values())e.window&&!e.window.closed&&e.window.close();this.popoutRegistry.clear()}};var Do,No;(0,r.Cg)([(0,d.attr)({attribute:"channel-name"})],_o.prototype,"channelName",void 0),(0,r.Cg)([d.observable],_o.prototype,"parentLayout",void 0),_o=(0,r.Cg)([(0,d.customElement)({name:"foundation-layout-popout-controller",template:null,styles:null})],_o);let Po=!1;const zo={area:"right",multiple:{type:"tabs",size:"33%"}};class Oo extends c.FoundationElement{constructor(){super(),this.layoutConfig={root:void 0},this.defaultLayoutConfig={root:void 0},this[No]="root",this.reloadBuffer=500,this.reloadPending=!1,this.registeredComponents=0,this.missingItemPlaceholder=e=>`"${e}" cannot be loaded as it isn't registered with the layout system`,this.hasFirstLoaded=!1,this.usingDeclerativeAPI=!1,this.customButtons=[],this.dragging=!1,this.class="FoundationLayoutMain",this.lifecycleUpdateToken=void 0,this.popupMode=!1,this.popoutConfig=void 0,Do.set(this,void 0),this.customTokensMap=(0,le.designTokensMap)(),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.cacheAndSaveLayout=this.cacheAndSaveLayout.bind(this),this.onPostItemRemoved=this.onPostItemRemoved.bind(this),this.onPreItemRemoved=this.onPreItemRemoved.bind(this),this.onAutosaveRequest=this.onAutosaveRequest.bind(this),this.onPreItemMaximised=this.onPreItemMaximised.bind(this),this.onPreItemMinimised=this.onPreItemMinimised.bind(this)}connectedCallback(){super.connectedCallback(),io.debug("FoundationLayout connected to the DOM"),this.updateLifecycleToken(),this.layout=new fo.C(this.layoutElement),this.layout.resizeWithContainerAutomatically=!0,Po||((new CSSStyleSheet).replace(Lo).then(e=>document.adoptedStyleSheets.push(e)).catch(e=>io.error("Failed to replace styles:",e)),Po=!0),this.shadowRoot.addEventListener("dragStart",this.onDragStart,!0),this.shadowRoot.addEventListener("dragStop",this.onDragStop,!0),this.shadowRoot.addEventListener("closeButtonPre",this.onPreItemRemoved,!0),this.shadowRoot.addEventListener("closeButtonPressed",this.onPostItemRemoved,!0),this.shadowRoot.addEventListener("maximised",this.onPreItemMaximised,!0),this.shadowRoot.addEventListener("minimised",this.onPreItemMinimised,!0),this.shadowRoot.addEventListener(ro,this.onAutosaveRequest,!0),this.initPopoutModeIfEnabled(),this.setupCustomButtons()}disconnectedCallback(){this.shadowRoot.removeEventListener("dragStart",this.onDragStart),this.shadowRoot.removeEventListener("dragStop",this.onDragStop),this.shadowRoot.removeEventListener("closeButtonPre",this.onPreItemRemoved),this.shadowRoot.removeEventListener("closeButtonPressed",this.onPostItemRemoved),this.shadowRoot.removeEventListener("maximised",this.onPreItemMaximised),this.shadowRoot.removeEventListener("minimised",this.onPreItemMinimised),this.shadowRoot.addEventListener(ro,this.onAutosaveRequest)}onDragStart(){this.dragging=!0}onDragStop(){this.dragging=!1,this.cacheAndSaveLayout(),this.attatchResizeEvents()}onPostItemAdded(){this.$emit(Qt),this.cacheAndSaveLayout()}onPreItemRemoved(){this.updateLifecycleToken()}onPostItemRemoved(){this.$emit(Kt),this.cacheAndSaveLayout()}onPostItemResized(){this.$emit(eo),this.cacheAndSaveLayout()}onAutosaveRequest(){this.cacheAndSaveLayout()}onPreItemMaximised(){this.updateLifecycleToken()}onPreItemMinimised(){this.updateLifecycleToken()}customTokensMapChanged(){this.customTokensMap.value&&this.hasFirstLoaded&&this.loadGLConfigAndSetup(this.layoutConfig)}static layoutRequiredRegistrations(e){const{c:t}=e,o=$o.bP.fromResolved(wo.nh.unminifyConfig(t)),r=[];return JSON.stringify(o,(e,t)=>("componentType"===e&&r.push(t),t)),r.sort()}registeredItems(){return this.layout.getRegisteredComponentTypeNames()}getLayout(){var e,t;return this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=[...e].map(e=>{var t;return null===(t=e.getCurrentState)||void 0===t?void 0:t.call(e)}),o=e[0][Ht];o?o.container.setState({instance:o.instance,orderedStates:t}):io.warn("Component instance container not found for items:",e)}),{v:"1",c:wo.nh.minifyConfig(this.layout.saveLayout()),popouts:null!==(t=null===(e=this.popoutController)||void 0===e?void 0:e.getRegistry())&&void 0!==t?t:{}}}tryActivatePopoutMode(){if(!this.popupMode)return!1;const e={root:{type:"component",componentType:new URLSearchParams(window.location.search).get(Gt),isClosable:!1},settings:{hasHeaders:!1}};this.loadGLConfigAndSetup(e);const t=e=>{if(e.classList.contains("f-layout-popout"))return e;if(null===e.parentElement){const o=e.getRootNode().host;return o?t(o):null}return t(e.parentElement)},o=t(this);if(o){o.appendChild(this);let e=this.previousElementSibling;for(;e;)e.remove(),e=this.previousElementSibling}return this.autoSaveKey=void 0,!0}tryLoadLayoutFromLocalStorage(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");if(!(this.autoSaveKey in e))return!1;const t=JSON.parse(e[this.autoSaveKey]);return this.loadLayout(t,"placeholder",!0),!0}clearAutosaveAndRevertToDefault(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");return this.autoSaveKey in e&&(delete e[this.autoSaveKey],this.session.setLocalStorageItem(Yt,JSON.stringify(e))),!!this.defaultLayoutConfig.root&&(this.updateLifecycleToken(),this.layoutConfig=JSON.parse(JSON.stringify(this.defaultLayoutConfig)),this.loadGLConfigAndSetup(this.layoutConfig),this.cacheAndSaveLayout(),!0)}loadLayout(e,t="error",o=!1){var r;const i=this.registeredItems(),a=Oo.layoutRequiredRegistrations(e),n=(s=i,a.filter(e=>!s.includes(e)));var s;if(0!==n.length&&"error"===t)throw new qt(`Trying to load layout with extra components. The component(s) not currently loaded are "${[...new Set(n)]}"`);const l=$o.bP.fromResolved(wo.nh.unminifyConfig(e.c));o&&this.removeConfigCacheInformation(l),!this.popupMode&&this.popoutController&&this.popoutController.restorePopouts(null!==(r=e.popouts)&&void 0!==r?r:{},this.uuid),0!==n.length&&"placeholder"===t&&this.registerPlaceholdersAndSetClosable(l,n),this.loadGLConfigAndSetup(l);this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=e[0][Ht].container.getState().orderedStates;t&&[...e].map((e,o)=>{var r,i;return null===(r=e.applyState)||void 0===r?void 0:r.call(e,null!==(i=t[o])&&void 0!==i?i:null)})}),this.cacheAndSaveLayout()}addItem(e,t=zo){var o,r,i;if("area"in t&&"100%"===(null===(o=t.multiple)||void 0===o?void 0:o.size))throw new qt("Adding an item taking up 100% size is not defined behaviour. The size attribute is a relative size of the item inside its layout stack. If you’re trying to set an initial layout with a single item, you can omit the size attribute as implicitly it takes up the full layout. If you already have layout items and you’re trying to add a new one that takes up the entire layout then you need to delete all of the other items and add this item only.");const a=Array.isArray(e)?e:[e],n=1===a.length,s=a.map(e=>{const{registration:t,title:o,size:r,closable:i,showMaximiseButton:a}=e;if(!this.layout.getRegisteredComponentTypeNames().includes(t))throw new Xt(`Cannot add item '${t}' which is not registered with the layout system.`);return{type:"component",componentType:t,title:null!=o?o:`Item ${t}`,reorderEnabled:!0,isClosable:i||!1,size:n?void 0:r,header:{maximise:!1!==a&&"maximise"}}});if(this.updateLifecycleToken(),"nearRegistration"in t){if(!n)throw new qt("nearRegistration placement only supports adding a single item at a time. Pass one RegisteredElementConfig, not an array.");if(void 0===this.layoutConfig.root)return this.layoutConfig={root:{type:"stack",content:s}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();const e=(Array.isArray(t.nearRegistration)?t.nearRegistration:[t.nearRegistration]).map(e=>({typeId:9,componentType:e}));return void 0!==this.layout.addItemAtLocation(s[0],e)?(this.cacheAndSaveLayout(),void this.onPostItemAdded()):(this.layoutConfig={root:{type:"row",content:[this.layoutConfig.root,{type:"stack",content:s}]}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded())}const l={type:lo((null===(r=t.multiple)||void 0===r?void 0:r.type)||"tabs"),content:s,size:n?a[0].size:null===(i=t.multiple)||void 0===i?void 0:i.size};if(void 0===this.layoutConfig.root)return this.layoutConfig={root:l},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();this.cacheAndSaveLayout();const{area:d}=t;this.layoutConfig={root:{type:"top"===d||"bottom"===d?"column":"row",content:"right"===d||"bottom"===d?[this.layoutConfig.root,l]:[l,this.layoutConfig.root]}},this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemAdded()}removeItems(e,t=!1){let o=0;const r=r=>{var i;return!(0===(null===(i=r.content)||void 0===i?void 0:i.length)||"component"===r.type&&r.componentType===e&&(e=>t||e.isClosable)(r)&&(o+=1,1))},i=(e=>{var t,o;const i=e=>{var t,o;"component"!==e.type&&(null===(t=e.content)||void 0===t||t.forEach(i),e.content=null===(o=e.content)||void 0===o?void 0:o.filter(r),"stack"===e.type&&delete e.activeItemIndex)};return null===(t=null==e?void 0:e.content)||void 0===t||t.forEach(i),"stack"===e.type&&delete e.activeItemIndex,null===(o=null==e?void 0:e.content)||void 0===o?void 0:o.filter(r)})(this.layoutConfig.root);return 0===o?0:(this.layoutConfig=Object.assign(Object.assign({},this.layoutConfig),{root:i.length>0?Object.assign(Object.assign({},this.layoutConfig.root),{content:i}):void 0}),this.updateLifecycleToken(),this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemRemoved(),o)}registerItem(e,t){if(!this.layout.isInitialised)throw new qt("Cannot add item via JS API until initialised");if(no(e))throw new Xt(`Registration "${e}" already has a factory registered via registerFactory(). Cannot register the same name via the JavaScript API. Use a different registration name or unregister the factory first.`);return"function"==typeof t?this.cacheElementsAndRegister({factory:t,id:e}):this.cacheElementsAndRegister({elements:t,id:e})}updateLifecycleToken(){this.lifecycleUpdateToken=this.uuid.createId()}requestLayoutReload(){this.reloadPending||(this.reloadPending=!0,setTimeout(()=>{var e;if(this.reloadPending=!1,this.hasFirstLoaded)this.loadGLConfigAndSetup(this.layoutConfig);else{this.hasFirstLoaded=!0,this.defaultLayoutConfig=JSON.parse(JSON.stringify(this.layoutConfig));this.tryLoadLayoutFromLocalStorage()||!1!==(null===(e=this.popoutConfig)||void 0===e?void 0:e.loadAutomatically)&&this.tryActivatePopoutMode()||this.loadGLConfigAndSetup(this.layoutConfig),this.$emit(Jt)}},this.reloadBuffer))}addItemFromChild(e){if(void 0!==this.layoutConfig.root)throw new qt("Cannot have multiple layout items as direct descendants of the layout root. You need to put the layout items within a layout region.");return this.usingDeclerativeAPI=!0,this.layoutConfig={root:e},this.layoutConfig.root}cacheElementsAndRegister(e){const t=e.id||`${this.registeredComponents+=1}`;if(this.layout.getRegisteredComponentTypeNames().includes(t))throw new Xt(`Cannot register item with already registered name: '${t}'`);const o=(()=>{if("factory"in e){const o=new Map,r=new Map,i=new Map;return(a,n)=>{var s;(null==n?void 0:n.instance)||(n.instance=this.uuid.createId()),a.state.instance=n.instance,a.state.originalTitle=null!==(s=n.originalTitle)&&void 0!==s?s:a.title;const l={container:a,instance:n.instance,registration:t},d=n.instance,c=i.get(d);if(c&&c!==a){io.debug(`Recreating instance ${d} for registration ${t} due to container change`);const e=r.get(d);if(e&&"function"==typeof e)try{e()}catch(e){io.error(`Error calling cleanup for instance ${d}:`,e)}o.delete(d),r.delete(d)}if(!o.has(d)){const t=document.createElement("div");t.style.width="100%",t.style.height="100%",t[Ht]=l;const i=e.factory(t);o.set(d,t),i&&r.set(d,i)}const p=o.get(d);p?(p[Ht]=l,a.element.appendChild(p),i.set(d,a),this.setupLayoutReceiveEvents(a,n)):io.error(`Failed to get component container for instance ${d}`)}}{const o=document.createDocumentFragment();o[a.a]=!0,e.elements.forEach(e=>o.appendChild(e));const r=new Map;return(e,i)=>{var a;if((null==i?void 0:i.instance)||(i.instance=this.uuid.createId()),e.state.instance=i.instance,e.state.originalTitle=null!==(a=i.originalTitle)&&void 0!==a?a:e.title,!r.has(null==i?void 0:i.instance)){const e=document.createDocumentFragment();Array.from(o.children).forEach(t=>{e.appendChild(t.cloneNode(!0))}),r.set(i.instance,[...e.children])}const n={container:e,instance:i.instance,registration:t};r.get(i.instance).forEach(t=>{e.element.appendChild(t),t[Ht]=n}),this.setupLayoutReceiveEvents(e,i)}}})();return this.layout.registerComponentFactoryFunction(t,o),t}setupLayoutReceiveEvents(e,t){const o=e.state.originalTitle;e.element.addEventListener(oo,t=>{const r=null==t?void 0:t.detail;(null==r?void 0:r.title)&&(null==r?void 0:r.mode)||io.error("Invalid change-title event.detail:",null==t?void 0:t.detail),e.setTitle(`${"suffix"===r.mode?o+" ":""}${r.title}`)})}cacheAndSaveLayout(){if(this.layoutConfig=$o.bP.fromResolved(this.layout.saveLayout()),this.autoSaveKey){const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");e[this.autoSaveKey]=JSON.stringify(this.getLayout()),this.session.setLocalStorageItem(Yt,JSON.stringify(e))}this.$emit(to)}registerPlaceholdersAndSetClosable(e,t){const o=document.createElement("p");o.style.textAlign="center",o.style.position="relative",o.style.top="50%";const r=e=>{var i;if("component"===e.type&&t.includes(e.componentType.toString())){const t=e.componentType.toString();e.isClosable=!0;const r=o.cloneNode();r.textContent=this.missingItemPlaceholder(t),this.registerItem(t,[r])}null===(i=e.content)||void 0===i||i.forEach(r)};r(e.root)}loadGLConfigAndSetup(e){const t={dimensions:{headerHeight:parseInt(Wt().replace("px","")),borderWidth:12,itemBorder:Zt()},header:{maximise:"maximise",minimise:"minimise",popout:!1}};this.hasFirstLoaded=!0;try{this.layout.loadLayout(Object.assign(Object.assign(Object.assign({},e),t),{dimensions:Object.assign(Object.assign({},t.dimensions),this.dimensionsConfig)}))}catch(e){this.handleGLRunErrors(e)}this.attatchResizeEvents()}handleGLRunErrors(e){if(e.message.includes("ROCCAS6692"))throw new qt('Golden layout internal error ROCCAS6692. A maths error has accoured while calculating the layout item sizes. Verify you have not added an item with "size: 100%".');throw e}attatchResizeEvents(){void 0===(0,r.gn)(this,Do,"f")&&(0,r.GG)(this,Do,()=>this.onPostItemResized.bind(this)(),"f"),this.shadowRoot.querySelectorAll("div.lm_drag_handle").forEach(e=>{e.removeEventListener("click",(0,r.gn)(this,Do,"f")),e.addEventListener("click",(0,r.gn)(this,Do,"f"))})}setupCustomButtons(){this.layout.on("stackCreated",e=>{var t;const o=e.target.header.controlsContainerElement;null===(t=this.customButtons)||void 0===t||t.forEach(t=>{const r=document.createElement("div");r.classList.add("lm_custom_button"),r.style["background-image"]=`url('${t.svg}')`,r.addEventListener("click",()=>t.onClick(r,e.target.getActiveContentItem().container.element)),o.prepend(r)})})}getLayoutComponents(){return[...this.shadowRoot.querySelectorAll("div.lm_content")].map(e=>[...e.children])}removeConfigCacheInformation(e){const t=e=>{var o;null===(o=e.content)||void 0===o||o.forEach(e=>t(e)),"component"===e.type&&delete e.componentState.instance};return t(e.root),e}initPopoutModeIfEnabled(){if(!this.popoutConfig)return;io.warn("Layout pop-out mode is enabled, this is an experimental feature and may change in future versions");const e=Object.assign(Object.assign({},this.popoutConfig),{loadAutomatically:!0,popoutDimension:Object.assign(Object.assign({},this.popoutConfig.popoutDimension),{width:960,height:720})});this.customButtons.push({svg:Mo,onClick:(t,o)=>{var r,i;const a=o.firstChild[Ht].registration,n=o.firstChild,s=null===(r=null==n?void 0:n.getCurrentState)||void 0===r?void 0:r.call(n),l={screenX:void 0,screenY:void 0,outerWidth:e.popoutDimension.width,outerHeight:e.popoutDimension.height};null===(i=this.popoutController)||void 0===i||i.openPopout(a,{geometry:l,state:s},this.uuid),this.cacheAndSaveLayout()}}),this.popupMode=window.location.search.includes(Gt)}}Do=new WeakMap,No=Bt,(0,r.Cg)([(0,d.attr)({attribute:"reload-buffer"})],Oo.prototype,"reloadBuffer",void 0),(0,r.Cg)([So.k],Oo.prototype,"uuid",void 0),(0,r.Cg)([xo.N],Oo.prototype,"session",void 0),(0,r.Cg)([(0,d.attr)({attribute:"auto-save-key"})],Oo.prototype,"autoSaveKey",void 0),(0,r.Cg)([d.observable],Oo.prototype,"missingItemPlaceholder",void 0),(0,r.Cg)([d.observable],Oo.prototype,"hasFirstLoaded",void 0),(0,r.Cg)([d.observable],Oo.prototype,"usingDeclerativeAPI",void 0),(0,r.Cg)([d.observable],Oo.prototype,"dragging",void 0),(0,r.Cg)([d.observable],Oo.prototype,"popupMode",void 0),(0,r.Cg)([d.observable],Oo.prototype,"popoutConfig",void 0),(0,r.Cg)([d.observable],Oo.prototype,"customTokensMap",void 0);const Fo=d.html`
2103
2103
  <div class="html-spinner"></div>
2104
- `,Oo=d.html`
2104
+ `,jo=d.html`
2105
2105
  <template>
2106
2106
  ${(0,d.when)(e=>Boolean(e.popoutConfig),d.html`
2107
2107
  <foundation-layout-popout-controller
@@ -2110,10 +2110,10 @@
2110
2110
  channel-name="${e=>{var t;return null===(t=e.popoutConfig)||void 0===t?void 0:t.channelName}}"
2111
2111
  ></foundation-layout-popout-controller>
2112
2112
  `)}
2113
- ${(0,d.when)(e=>!e.hasFirstLoaded&&e.usingDeclerativeAPI,zo)}
2113
+ ${(0,d.when)(e=>!e.hasFirstLoaded&&e.usingDeclerativeAPI,Fo)}
2114
2114
  <div class="layout-container" ${(0,d.ref)("layoutElement")}></div>
2115
2115
  </template>
2116
- `,Fo={foundationLayout:Po.compose({baseName:"layout",styles:Lo,template:Oo}),foundationLayoutRegion:go,foundationLayoutItem:uo,register(e,...t){if(e)for(const o in this)"register"!==o&&this[o]().register(e,...t)}};var jo,Uo=o(93188),Bo=o(4852);!function(e){e.STYLES_CHANGED="styles-changed",e.DS_CHANGED="design-system-changed",e.APPLY_CUSTOM_DESIGN="apply-custom-design"}(jo||(jo={}));const Ho={Roboto:Uo.robotoFontFamily,"Segoe UI":'"Segoe UI", Arial, Helvetica, sans-serif',Monospace:'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace',"Times New Roman":'Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif',Garamond:'"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif',Georgia:'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif',Helvetica:'Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif',Verdana:'Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif'},Yo=Ho["Segoe UI"],Go=d.css`
2116
+ `,Uo={foundationLayout:Oo.compose({baseName:"layout",styles:To,template:jo}),foundationLayoutRegion:yo,foundationLayoutItem:ho,register(e,...t){if(e)for(const o in this)"register"!==o&&this[o]().register(e,...t)}};var Bo,Ho=o(93188),Yo=o(4852);!function(e){e.STYLES_CHANGED="styles-changed",e.DS_CHANGED="design-system-changed",e.APPLY_CUSTOM_DESIGN="apply-custom-design"}(Bo||(Bo={}));const Go={Roboto:Ho.robotoFontFamily,"Segoe UI":'"Segoe UI", Arial, Helvetica, sans-serif',Monospace:'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace',"Times New Roman":'Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif',Garamond:'"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif',Georgia:'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif',Helvetica:'Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif',Verdana:'Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif'},Vo=Go["Segoe UI"],Wo=d.css`
2117
2117
  ${(0,c.display)("block")} :host {
2118
2118
  width: 100%;
2119
2119
  display: inline-flex;
@@ -2245,7 +2245,7 @@
2245
2245
  rapid-button {
2246
2246
  margin: 0;
2247
2247
  }
2248
- `,Vo=d.html`
2248
+ `,Zo=d.html`
2249
2249
  <template>
2250
2250
  <div class="configuration">
2251
2251
  ${(0,d.when)(e=>!e.customDesignMode,d.html`
@@ -2468,7 +2468,7 @@
2468
2468
  <slot></slot>
2469
2469
  </div>
2470
2470
  </template>
2471
- `,Wo=({design_tokens:e})=>({accentColor:e.color.accent.$value,neutralColor:e.color.neutral.$value,luminance:e.mode.luminance.$value,density:e.style.density.$value,designUnit:e.space.designUnit.$value,borderRadius:e.style.borderRadius.$value,strokeWidth:e.style.strokeWidth.$value,baseHeightMultiplier:e.style.baseHeightMultiplier.$value,bodyFont:Object.keys(Ho).find(t=>Ho[t]===e.fontFamily.bodyFont.$value),baseFontSize:e.typography.baseFontSize.$value,baseLineHeight:e.typography.baseLineHeight.$value}),Zo=Wo(Uo.designTokens),qo={accent:"primary",neutral:"neutral",outline:"primary-outline",text:"link"},Xo={accent:"primary",neutral:"neutral",font:"text"},Jo={rapid:{prefix:"rapid",tokenDefaults:Zo,buttons:qo,badge:Xo},custom:{prefix:"rapid",tokenDefaults:null,buttons:qo,badge:Xo}};let Qo=class extends d.FASTElement{constructor(){super(...arguments),this.customDesignMode=!1,this.userSelections={},this.ds="rapid",this.darkMode=Zo.luminance===p.StandardLuminance.DarkMode,this.luminance=Zo.luminance,this.neutralColor=Zo.neutralColor,this.accentColor=Zo.accentColor,this.bodyFont=Zo.bodyFont,this.density=Zo.density,this.borderRadius=Zo.borderRadius,this.strokeWidth=Zo.strokeWidth,this.baseHeightMultiplier=Zo.baseHeightMultiplier,this.designUnit=Zo.designUnit,this.baseFontSize=Zo.baseFontSize,this.baseLineHeight=Zo.baseLineHeight,this.preserveOptions=!0,this.tokenUpdateInProgress=!1,this.changeHandler=e=>{if(e.target instanceof c.RadioGroup||e.target instanceof HTMLInputElement||e.target instanceof p.Combobox||e.target instanceof p.Select){const{name:t,value:o}=e.target;t&&o&&(this[t]=o,this.updateUserSelections(t,o),this.styleUpdate())}else if(e.target instanceof c.Slider){const t=parseInt(e.target.value),o=e.target.name;o&&Number.isInteger(t)&&(this[o]=t,this.updateUserSelections(o,t),this.styleUpdate())}},this.updateUserSelections=(e,t)=>{"ds"===e||this.tokenUpdateInProgress||(this.userSelections[e]=t)},this.modeChangeHandler=e=>{this.darkMode=e.target.checked,this.luminance=this.darkMode?p.StandardLuminance.DarkMode:p.StandardLuminance.LightMode,this.updateUserSelections("luminance",this.luminance),this.styleUpdate()},this.applyCustomDSTokens=e=>{const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=Wo(t);Jo.custom.tokenDefaults=e,this.setTokensFromDs(e),this.styleUpdate()})},this.resetChanges=()=>(0,r.sH)(this,void 0,void 0,function*(){this.userSelections={},this.setTokensFromDs(Jo[this.ds].tokenDefaults),this.styleUpdate()})}customDesignModeChanged(e,t){return(0,r.sH)(this,void 0,void 0,function*(){const e=[{name:"Rapid",value:"rapid"}];if(this.customDesignMode){const{appName:e="Custom Design",dsPrefix:t="custom"}=yield this.getAppDetails(),o={name:e,value:t};this.designSystems=[o],Jo.custom.prefix=t,Jo.custom.buttons=Jo[t].buttons,Jo.custom.badge=Jo[t].badge,this.ds="custom"}else this.designSystems=e})}dsChanged(e,t){const o={prefix:Jo[this.ds].prefix,buttonAppearanceAccent:Jo[this.ds].buttons.accent,buttonAppearanceNeutral:Jo[this.ds].buttons.neutral,buttonAppearanceOutline:Jo[this.ds].buttons.outline,buttonAppearanceText:Jo[this.ds].buttons.text,badgeAppearanceAccent:Jo[this.ds].badge.accent,badgeAppearanceNeutral:Jo[this.ds].badge.neutral,badgeText:Jo[this.ds].badge.font};this.$emit(jo.DS_CHANGED,o),this.preserveOptions||(this.userSelections={}),this.setTokensFromDs(Jo[this.ds].tokenDefaults),this.styleUpdate()}styleUpdate(){const e={accentColor:this.accentColor,neutralColor:this.neutralColor,bodyFont:Ho[this.bodyFont],luminance:this.luminance,density:this.density,designUnit:this.designUnit,borderRadius:this.borderRadius,strokeWidth:this.strokeWidth,baseHeightMultiplier:this.baseHeightMultiplier,baseFontSize:this.baseFontSize,baseLineHeight:this.baseLineHeight};this.$emit(jo.STYLES_CHANGED,e)}setTokensFromDs(e){this.tokenUpdateInProgress=!0,Object.keys(e).forEach(t=>{this.preserveOptions&&void 0!==this.userSelections[t]?this[t]=this.userSelections[t]:this[t]=e[t]}),this.darkMode=this.luminance===p.StandardLuminance.DarkMode,d.DOM.queueUpdate(()=>{this.tokenUpdateInProgress=!1})}getAppDetails(){return fetch("api/details").then(e=>e.ok&&e.json()).then(e=>e).catch(e=>{console.error("Error fetching tokens:",e)})}connectedCallback(){super.connectedCallback(),this.userSelections={},(0,Uo.loadRobotoFontFaces)(),d.DOM.queueUpdate(()=>{this.styleUpdate()}),document.body.addEventListener(jo.APPLY_CUSTOM_DESIGN,e=>{this.applyCustomDSTokens(e)})}};(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"custom-design-mode"})],Qo.prototype,"customDesignMode",void 0),(0,r.Cg)([d.observable],Qo.prototype,"designSystems",void 0),(0,r.Cg)([d.observable],Qo.prototype,"ds",void 0),(0,r.Cg)([d.attr],Qo.prototype,"darkMode",void 0),(0,r.Cg)([d.observable],Qo.prototype,"neutralColor",void 0),(0,r.Cg)([d.observable],Qo.prototype,"accentColor",void 0),(0,r.Cg)([d.observable],Qo.prototype,"bodyFont",void 0),(0,r.Cg)([d.observable],Qo.prototype,"density",void 0),(0,r.Cg)([d.observable],Qo.prototype,"borderRadius",void 0),(0,r.Cg)([d.observable],Qo.prototype,"strokeWidth",void 0),(0,r.Cg)([d.observable],Qo.prototype,"baseHeightMultiplier",void 0),(0,r.Cg)([d.observable],Qo.prototype,"designUnit",void 0),(0,r.Cg)([d.observable],Qo.prototype,"baseFontSize",void 0),(0,r.Cg)([d.observable],Qo.prototype,"baseLineHeight",void 0),(0,r.Cg)([d.observable],Qo.prototype,"preserveOptions",void 0),Qo=(0,r.Cg)([(0,d.customElement)({name:"design-system-editor",template:Vo,styles:Go})],Qo);const Ko=(0,h.createLogger)("documentation-components");var er=o(80273),tr=o(83912);const or=e=>{const t=(e=>{const t=(0,tr.parseColorHexRGB)(e);return t?p.SwatchRGB.from(t):null})(e);return t?p.PaletteRGB.create(t):null},rr=(e,t,o)=>{const r=e.getValueFor(o).match(/^(\d+)([a-z]+)/i),i=r[1],a=r[2];return Number(i)+t+a},ir=(e,t)=>{const o=or(e.neutralColor);p.neutralPalette.setValueFor(t,o);const r=or(e.accentColor);p.accentPalette.setValueFor(t,r),p.baseLayerLuminance.setValueFor(t,e.luminance),p.density.setValueFor(t,e.density),p.controlCornerRadius.setValueFor(t,e.borderRadius),p.strokeWidth.setValueFor(t,e.strokeWidth),p.designUnit.setValueFor(t,e.designUnit),p.bodyFont.setValueFor(t,e.bodyFont),p.typeRampBaseFontSize.setValueFor(t,e.baseFontSize),p.typeRampBaseLineHeight.setValueFor(t,e.baseLineHeight),p.typeRampMinus1FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.minusOne,t)),p.typeRampMinus1LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.minusOne,t)),p.typeRampMinus2FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.minusTwo,t)),p.typeRampMinus2LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.minusTwo,t)),p.typeRampPlus1FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusOne,t)),p.typeRampPlus1LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusOne,t)),p.typeRampPlus2FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusTwo,t)),p.typeRampPlus2LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusTwo,t)),p.typeRampPlus3FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusThree,t)),p.typeRampPlus3LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusThree,t)),p.typeRampPlus4FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusFour,t)),p.typeRampPlus4LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusFour,t)),p.typeRampPlus5FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusFive,t)),p.typeRampPlus5LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusFive,t)),p.typeRampPlus6FontSize.setValueFor(t,rr(p.typeRampBaseFontSize,er.Du.plusSix,t)),p.typeRampPlus6LineHeight.setValueFor(t,rr(p.typeRampBaseLineHeight,er.Du.plusSix,t))},ar=d.css`
2471
+ `,qo=({design_tokens:e})=>({accentColor:e.color.accent.$value,neutralColor:e.color.neutral.$value,luminance:e.mode.luminance.$value,density:e.style.density.$value,designUnit:e.space.designUnit.$value,borderRadius:e.style.borderRadius.$value,strokeWidth:e.style.strokeWidth.$value,baseHeightMultiplier:e.style.baseHeightMultiplier.$value,bodyFont:Object.keys(Go).find(t=>Go[t]===e.fontFamily.bodyFont.$value),baseFontSize:e.typography.baseFontSize.$value,baseLineHeight:e.typography.baseLineHeight.$value}),Xo=qo(Ho.designTokens),Jo={accent:"primary",neutral:"neutral",outline:"primary-outline",text:"link"},Qo={accent:"primary",neutral:"neutral",font:"text"},Ko={rapid:{prefix:"rapid",tokenDefaults:Xo,buttons:Jo,badge:Qo},custom:{prefix:"rapid",tokenDefaults:null,buttons:Jo,badge:Qo}};let er=class extends d.FASTElement{constructor(){super(...arguments),this.customDesignMode=!1,this.userSelections={},this.ds="rapid",this.darkMode=Xo.luminance===p.StandardLuminance.DarkMode,this.luminance=Xo.luminance,this.neutralColor=Xo.neutralColor,this.accentColor=Xo.accentColor,this.bodyFont=Xo.bodyFont,this.density=Xo.density,this.borderRadius=Xo.borderRadius,this.strokeWidth=Xo.strokeWidth,this.baseHeightMultiplier=Xo.baseHeightMultiplier,this.designUnit=Xo.designUnit,this.baseFontSize=Xo.baseFontSize,this.baseLineHeight=Xo.baseLineHeight,this.preserveOptions=!0,this.tokenUpdateInProgress=!1,this.changeHandler=e=>{if(e.target instanceof c.RadioGroup||e.target instanceof HTMLInputElement||e.target instanceof p.Combobox||e.target instanceof p.Select){const{name:t,value:o}=e.target;t&&o&&(this[t]=o,this.updateUserSelections(t,o),this.styleUpdate())}else if(e.target instanceof c.Slider){const t=parseInt(e.target.value),o=e.target.name;o&&Number.isInteger(t)&&(this[o]=t,this.updateUserSelections(o,t),this.styleUpdate())}},this.updateUserSelections=(e,t)=>{"ds"===e||this.tokenUpdateInProgress||(this.userSelections[e]=t)},this.modeChangeHandler=e=>{this.darkMode=e.target.checked,this.luminance=this.darkMode?p.StandardLuminance.DarkMode:p.StandardLuminance.LightMode,this.updateUserSelections("luminance",this.luminance),this.styleUpdate()},this.applyCustomDSTokens=e=>{const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=qo(t);Ko.custom.tokenDefaults=e,this.setTokensFromDs(e),this.styleUpdate()})},this.resetChanges=()=>(0,r.sH)(this,void 0,void 0,function*(){this.userSelections={},this.setTokensFromDs(Ko[this.ds].tokenDefaults),this.styleUpdate()})}customDesignModeChanged(e,t){return(0,r.sH)(this,void 0,void 0,function*(){const e=[{name:"Rapid",value:"rapid"}];if(this.customDesignMode){const{appName:e="Custom Design",dsPrefix:t="custom"}=yield this.getAppDetails(),o={name:e,value:t};this.designSystems=[o],Ko.custom.prefix=t,Ko.custom.buttons=Ko[t].buttons,Ko.custom.badge=Ko[t].badge,this.ds="custom"}else this.designSystems=e})}dsChanged(e,t){const o={prefix:Ko[this.ds].prefix,buttonAppearanceAccent:Ko[this.ds].buttons.accent,buttonAppearanceNeutral:Ko[this.ds].buttons.neutral,buttonAppearanceOutline:Ko[this.ds].buttons.outline,buttonAppearanceText:Ko[this.ds].buttons.text,badgeAppearanceAccent:Ko[this.ds].badge.accent,badgeAppearanceNeutral:Ko[this.ds].badge.neutral,badgeText:Ko[this.ds].badge.font};this.$emit(Bo.DS_CHANGED,o),this.preserveOptions||(this.userSelections={}),this.setTokensFromDs(Ko[this.ds].tokenDefaults),this.styleUpdate()}styleUpdate(){const e={accentColor:this.accentColor,neutralColor:this.neutralColor,bodyFont:Go[this.bodyFont],luminance:this.luminance,density:this.density,designUnit:this.designUnit,borderRadius:this.borderRadius,strokeWidth:this.strokeWidth,baseHeightMultiplier:this.baseHeightMultiplier,baseFontSize:this.baseFontSize,baseLineHeight:this.baseLineHeight};this.$emit(Bo.STYLES_CHANGED,e)}setTokensFromDs(e){this.tokenUpdateInProgress=!0,Object.keys(e).forEach(t=>{this.preserveOptions&&void 0!==this.userSelections[t]?this[t]=this.userSelections[t]:this[t]=e[t]}),this.darkMode=this.luminance===p.StandardLuminance.DarkMode,d.DOM.queueUpdate(()=>{this.tokenUpdateInProgress=!1})}getAppDetails(){return fetch("api/details").then(e=>e.ok&&e.json()).then(e=>e).catch(e=>{console.error("Error fetching tokens:",e)})}connectedCallback(){super.connectedCallback(),this.userSelections={},(0,Ho.loadRobotoFontFaces)(),d.DOM.queueUpdate(()=>{this.styleUpdate()}),document.body.addEventListener(Bo.APPLY_CUSTOM_DESIGN,e=>{this.applyCustomDSTokens(e)})}};(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"custom-design-mode"})],er.prototype,"customDesignMode",void 0),(0,r.Cg)([d.observable],er.prototype,"designSystems",void 0),(0,r.Cg)([d.observable],er.prototype,"ds",void 0),(0,r.Cg)([d.attr],er.prototype,"darkMode",void 0),(0,r.Cg)([d.observable],er.prototype,"neutralColor",void 0),(0,r.Cg)([d.observable],er.prototype,"accentColor",void 0),(0,r.Cg)([d.observable],er.prototype,"bodyFont",void 0),(0,r.Cg)([d.observable],er.prototype,"density",void 0),(0,r.Cg)([d.observable],er.prototype,"borderRadius",void 0),(0,r.Cg)([d.observable],er.prototype,"strokeWidth",void 0),(0,r.Cg)([d.observable],er.prototype,"baseHeightMultiplier",void 0),(0,r.Cg)([d.observable],er.prototype,"designUnit",void 0),(0,r.Cg)([d.observable],er.prototype,"baseFontSize",void 0),(0,r.Cg)([d.observable],er.prototype,"baseLineHeight",void 0),(0,r.Cg)([d.observable],er.prototype,"preserveOptions",void 0),er=(0,r.Cg)([(0,d.customElement)({name:"design-system-editor",template:Zo,styles:Wo})],er);const tr=(0,h.createLogger)("documentation-components");var or=o(80273),rr=o(83912);const ir=e=>{const t=(e=>{const t=(0,rr.parseColorHexRGB)(e);return t?p.SwatchRGB.from(t):null})(e);return t?p.PaletteRGB.create(t):null},ar=(e,t,o)=>{const r=e.getValueFor(o).match(/^(\d+)([a-z]+)/i),i=r[1],a=r[2];return Number(i)+t+a},nr=(e,t)=>{const o=ir(e.neutralColor);p.neutralPalette.setValueFor(t,o);const r=ir(e.accentColor);p.accentPalette.setValueFor(t,r),p.baseLayerLuminance.setValueFor(t,e.luminance),p.density.setValueFor(t,e.density),p.controlCornerRadius.setValueFor(t,e.borderRadius),p.strokeWidth.setValueFor(t,e.strokeWidth),p.designUnit.setValueFor(t,e.designUnit),p.bodyFont.setValueFor(t,e.bodyFont),p.typeRampBaseFontSize.setValueFor(t,e.baseFontSize),p.typeRampBaseLineHeight.setValueFor(t,e.baseLineHeight),p.typeRampMinus1FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.minusOne,t)),p.typeRampMinus1LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.minusOne,t)),p.typeRampMinus2FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.minusTwo,t)),p.typeRampMinus2LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.minusTwo,t)),p.typeRampPlus1FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusOne,t)),p.typeRampPlus1LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusOne,t)),p.typeRampPlus2FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusTwo,t)),p.typeRampPlus2LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusTwo,t)),p.typeRampPlus3FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusThree,t)),p.typeRampPlus3LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusThree,t)),p.typeRampPlus4FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusFour,t)),p.typeRampPlus4LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusFour,t)),p.typeRampPlus5FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusFive,t)),p.typeRampPlus5LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusFive,t)),p.typeRampPlus6FontSize.setValueFor(t,ar(p.typeRampBaseFontSize,or.Du.plusSix,t)),p.typeRampPlus6LineHeight.setValueFor(t,ar(p.typeRampBaseLineHeight,or.Du.plusSix,t))},sr=d.css`
2472
2472
  :host {
2473
2473
  --badge-fill-primary: var(--accent-fill-rest);
2474
2474
  --badge-fill-neutral: var(--neutral-fill-rest);
@@ -2561,7 +2561,7 @@
2561
2561
  display: flex;
2562
2562
  flex-direction: column;
2563
2563
  }
2564
- `,nr=d.html`
2564
+ `,lr=d.html`
2565
2565
  ${e=>{return t=e.prefix,d.html`
2566
2566
  <template>
2567
2567
  <${t}-design-system-provider ${(0,d.ref)("provider")}>
@@ -2988,7 +2988,7 @@
2988
2988
  </${t}-design-system-provider>
2989
2989
  </template>
2990
2990
  `;var t}}
2991
- `;let sr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>Ko.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>Ko.debug("DELETE!!!",e)},{name:"Edit",callback:e=>Ko.debug("EDIT!!!",e)},{name:"Wait",callback:e=>Ko.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(jo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Yo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{ir(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],sr.prototype,"modal",void 0),(0,r.Cg)([d.attr],sr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],sr.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],sr.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],sr.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],sr.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],sr.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],sr.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],sr.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],sr.prototype,"cards",void 0),(0,r.Cg)([d.observable],sr.prototype,"countries",void 0),(0,r.Cg)([d.observable],sr.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],sr.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],sr.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],sr.prototype,"provider",void 0),sr=(0,r.Cg)([(0,d.customElement)({name:"preview-components",template:nr,styles:ar})],sr);const lr=d.css`
2991
+ `;let dr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>tr.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>tr.debug("DELETE!!!",e)},{name:"Edit",callback:e=>tr.debug("EDIT!!!",e)},{name:"Wait",callback:e=>tr.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Bo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Vo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{nr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],dr.prototype,"modal",void 0),(0,r.Cg)([d.attr],dr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],dr.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],dr.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],dr.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],dr.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],dr.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],dr.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],dr.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],dr.prototype,"cards",void 0),(0,r.Cg)([d.observable],dr.prototype,"countries",void 0),(0,r.Cg)([d.observable],dr.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],dr.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],dr.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],dr.prototype,"provider",void 0),dr=(0,r.Cg)([(0,d.customElement)({name:"preview-components",template:lr,styles:sr})],dr);const cr=d.css`
2992
2992
  .export {
2993
2993
  display: flex;
2994
2994
  justify-content: center;
@@ -2999,7 +2999,7 @@
2999
2999
  display: flex;
3000
3000
  justify-content: space-between;
3001
3001
  }
3002
- `,dr=d.html`
3002
+ `,pr=d.html`
3003
3003
  <template>
3004
3004
  <div class="export">
3005
3005
  <rapid-button appearance="accent" @click="${e=>e.showModal()}">Save Changes</rapid-button>
@@ -3020,7 +3020,7 @@
3020
3020
  </rapid-modal>
3021
3021
  </div>
3022
3022
  </template>
3023
- `;let cr=class extends d.FASTElement{constructor(){super(...arguments),this.formatValues=e=>{const t={design_tokens:{color:{accent:{$value:e.accentColor,$type:"color"},neutral:{$value:e.neutralColor,$type:"color"}},fontFamily:{bodyFont:{$value:e.bodyFont,$type:"fontFamily"}},typography:{baseFontSize:{$value:e.baseFontSize,$type:"dimension"},baseLineHeight:{$value:e.baseLineHeight,$type:"dimension"}},mode:{luminance:{$value:e.luminance,$type:"number"}},style:{density:{$value:e.density,$type:"number"},baseHeightMultiplier:{$value:e.baseHeightMultiplier,$type:"number"},borderRadius:{$value:e.borderRadius,$type:"number"},strokeWidth:{$value:e.strokeWidth,$type:"number"}},space:{designUnit:{$value:e.designUnit,$type:"number"}}}};return JSON.stringify(t,null,3)},this.showModal=()=>this.modal.show(),this.closeModal=()=>this.modal.close(),this.updateTokens=()=>{fetch("api/tokens",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:this.value})}).then(e=>{if(!e.ok)throw new Error(`API request failed with status ${e.status}`);return e.json()}).then(e=>{Ko.log("Tokens saved successfully:",e),this.$emit(jo.APPLY_CUSTOM_DESIGN,e.message)}).catch(e=>{Ko.error("Error saving tokens:",e)}),this.closeModal()}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{const t=e;this.value=this.formatValues(t.detail)})}};(0,r.Cg)([d.attr],cr.prototype,"value",void 0),(0,r.Cg)([d.attr],cr.prototype,"tokensPath",void 0),cr=(0,r.Cg)([(0,d.customElement)({name:"design-system-export",template:dr,styles:lr})],cr);const pr=d.css`
3023
+ `;let ur=class extends d.FASTElement{constructor(){super(...arguments),this.formatValues=e=>{const t={design_tokens:{color:{accent:{$value:e.accentColor,$type:"color"},neutral:{$value:e.neutralColor,$type:"color"}},fontFamily:{bodyFont:{$value:e.bodyFont,$type:"fontFamily"}},typography:{baseFontSize:{$value:e.baseFontSize,$type:"dimension"},baseLineHeight:{$value:e.baseLineHeight,$type:"dimension"}},mode:{luminance:{$value:e.luminance,$type:"number"}},style:{density:{$value:e.density,$type:"number"},baseHeightMultiplier:{$value:e.baseHeightMultiplier,$type:"number"},borderRadius:{$value:e.borderRadius,$type:"number"},strokeWidth:{$value:e.strokeWidth,$type:"number"}},space:{designUnit:{$value:e.designUnit,$type:"number"}}}};return JSON.stringify(t,null,3)},this.showModal=()=>this.modal.show(),this.closeModal=()=>this.modal.close(),this.updateTokens=()=>{fetch("api/tokens",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:this.value})}).then(e=>{if(!e.ok)throw new Error(`API request failed with status ${e.status}`);return e.json()}).then(e=>{tr.log("Tokens saved successfully:",e),this.$emit(Bo.APPLY_CUSTOM_DESIGN,e.message)}).catch(e=>{tr.error("Error saving tokens:",e)}),this.closeModal()}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{const t=e;this.value=this.formatValues(t.detail)})}};(0,r.Cg)([d.attr],ur.prototype,"value",void 0),(0,r.Cg)([d.attr],ur.prototype,"tokensPath",void 0),ur=(0,r.Cg)([(0,d.customElement)({name:"design-system-export",template:pr,styles:cr})],ur);const mr=d.css`
3024
3024
  .colors {
3025
3025
  display: flex;
3026
3026
  flex-wrap: wrap;
@@ -3033,23 +3033,23 @@
3033
3033
  flex-grow: 1;
3034
3034
  height: 20px;
3035
3035
  }
3036
- `,ur=d.html`
3036
+ `,hr=d.html`
3037
3037
  <ul class="colors">
3038
3038
  ${(0,d.repeat)(e=>e.swatches,d.html`
3039
3039
  <li class="color" style="background-color: ${e=>e.toColorString()}"></li>
3040
3040
  `)}
3041
3041
  </ul>
3042
- `;let mr=class extends d.FASTElement{constructor(){super(...arguments),this.swatches=[]}typeChanged(){if(this.type){p[this.type+"Palette"].subscribe({handleChange:e=>{const t=e.token.getValueFor(this);this.swatches=[...t.swatches]}},this)}}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=or(t[`${this.type}Color`]);this.swatches=[...e.swatches]})}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)})}};(0,r.Cg)([d.observable],mr.prototype,"swatches",void 0),(0,r.Cg)([d.attr],mr.prototype,"type",void 0),mr=(0,r.Cg)([(0,d.customElement)({name:"color-palette",styles:pr,template:ur})],mr);const hr=d.css`
3042
+ `;let vr=class extends d.FASTElement{constructor(){super(...arguments),this.swatches=[]}typeChanged(){if(this.type){p[this.type+"Palette"].subscribe({handleChange:e=>{const t=e.token.getValueFor(this);this.swatches=[...t.swatches]}},this)}}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=ir(t[`${this.type}Color`]);this.swatches=[...e.swatches]})}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)})}};(0,r.Cg)([d.observable],vr.prototype,"swatches",void 0),(0,r.Cg)([d.attr],vr.prototype,"type",void 0),vr=(0,r.Cg)([(0,d.customElement)({name:"color-palette",styles:mr,template:hr})],vr);const gr=d.css`
3043
3043
  .preview {
3044
3044
  width: 40px;
3045
3045
  height: 40px;
3046
3046
  }
3047
- `,vr=d.html`
3047
+ `,br=d.html`
3048
3048
  <div
3049
3049
  class="preview"
3050
3050
  style="background-color: ${e=>p[e.tokenName].createCSS()}"
3051
3051
  ></div>
3052
- `;let gr=class extends d.FASTElement{};(0,r.Cg)([d.attr],gr.prototype,"tokenName",void 0),gr=(0,r.Cg)([(0,d.customElement)({name:"color-token",styles:hr,template:vr})],gr);const br=d.css`
3052
+ `;let yr=class extends d.FASTElement{};(0,r.Cg)([d.attr],yr.prototype,"tokenName",void 0),yr=(0,r.Cg)([(0,d.customElement)({name:"color-token",styles:gr,template:br})],yr);const fr=d.css`
3053
3053
  .container {
3054
3054
  display: flex;
3055
3055
  width: 100%;
@@ -3097,7 +3097,7 @@
3097
3097
  .container > div:not(:last-child) {
3098
3098
  border-right: 1px solid #fafafa;
3099
3099
  }
3100
- `,yr=[{title:"Fill",subcategories:[{title:"Fill Colour",tokens:[{name:"fillColor",cssProperty:"--fill-color"}]},{title:"Accent Fill",tokens:[{name:"accentFillRest",cssProperty:"--accent-fill-rest"},{name:"accentFillHover",cssProperty:"--accent-fill-hover"},{name:"accentFillActive",cssProperty:"--accent-fill-active"},{name:"accentFillFocus",cssProperty:"--accent-fill-focus"}]},{title:"Neutral Fill",tokens:[{name:"neutralFillRest",cssProperty:"--neutral-fill-rest"},{name:"neutralFillHover",cssProperty:"--neutral-fill-hover"},{name:"neutralFillActive",cssProperty:"--neutral-fill-active"},{name:"neutralFillFocus",cssProperty:"--neutral-fill-focus"}]},{title:"Neutral Fill Input",tokens:[{name:"neutralFillInputRest",cssProperty:"--neutral-fill-input-rest"},{name:"neutralFillInputHover",cssProperty:"--neutral-fill-input-hover"},{name:"neutralFillInputActive",cssProperty:"--neutral-fill-input-active"},{name:"neutralFillInputFocus",cssProperty:"--neutral-fill-input-focus"}]},{title:"Neutral Fill Stealth",tokens:[{name:"neutralFillStealthRest",cssProperty:"--neutral-fill-stealth-rest"},{name:"neutralFillStealthHover",cssProperty:"--neutral-fill-stealth-hover"},{name:"neutralFillStealthActive",cssProperty:"--neutral-fill-stealth-active"},{name:"neutralFillStealthFocus",cssProperty:"--neutral-fill-stealth-focus"}]},{title:"Neutral Fill Strong",tokens:[{name:"neutralFillStrongRest",cssProperty:"--neutral-fill-strong-rest"},{name:"neutralFillStrongHover",cssProperty:"--neutral-fill-strong-hover"},{name:"neutralFillStrongActive",cssProperty:"--neutral-fill-strong-active"},{name:"neutralFillStrongFocus",cssProperty:"--neutral-fill-strong-focus"}]}]},{title:"Foreground",subcategories:[{title:"Neutral Foreground",tokens:[{name:"neutralForegroundRest",cssProperty:"--neutral-foreground-rest"},{name:"neutralForegroundHint",cssProperty:"--neutral-foreground-hint"}]},{title:"Accent Foreground",tokens:[{name:"accentForegroundRest",cssProperty:"--accent-foreground-rest"},{name:"accentForegroundHover",cssProperty:"--accent-foreground-hover"},{name:"accentForegroundActive",cssProperty:"--accent-foreground-active"},{name:"accentForegroundFocus",cssProperty:"--accent-foreground-focus"}]},{title:"Foreground on Accent",tokens:[{name:"foregroundOnAccentRest",cssProperty:"--foreground-on-accent-rest"},{name:"foregroundOnAccentHover",cssProperty:"--foreground-on-accent-hover"},{name:"foregroundOnAccentActive",cssProperty:"--foreground-on-accent-active"},{name:"foregroundOnAccentFocus",cssProperty:"--foreground-on-accent-focus"}]},{title:"Foreground on accent large",tokens:[{name:"foregroundOnAccentRestLarge",cssProperty:"--foreground-on-accent-rest-large"},{name:"foregroundOnAccentHoverLarge",cssProperty:"--foreground-on-accent-hover-large"},{name:"foregroundOnAccentActiveLarge",cssProperty:"--foreground-on-accent-active-large"},{name:"foregroundOnAccentFocusLarge",cssProperty:"--foreground-on-accent-focus-large"}]}]},{title:"Stroke",subcategories:[{title:"Focus Stroke",tokens:[{name:"focusStrokeOuter",cssProperty:"--focus-stroke-outer"},{name:"focusStrokeInner",cssProperty:"--focus-stroke-inner"}]},{title:"Neutral Stroke",tokens:[{name:"neutralStrokeRest",cssProperty:"---neutral-stroke-rest"},{name:"neutralStrokeHover",cssProperty:"--neutral-stroke-hover"},{name:"neutralStrokeActive",cssProperty:"--neutral-stroke-active"},{name:"neutralStrokeFocus",cssProperty:"--neutral-stroke-focus"}]},{title:"Neutral stroke divider",tokens:[{name:"neutralStrokeDividerRest",cssProperty:"--neutral-stroke-divider-rest"}]}]},{title:"Layer",subcategories:[{title:"Neutral Layers",tokens:[{name:"neutralLayer1",cssProperty:"--neutral-layer-1"},{name:"neutralLayer2",cssProperty:"--neutral-layer-2"},{name:"neutralLayer3",cssProperty:"--neutral-layer-3"},{name:"neutralLayer4",cssProperty:"--neutral-layer-4"}]},{title:"Neutral Layer Card Container",tokens:[{name:"neutralLayerCardContainer",cssProperty:"--neutral-layer-card-container"}]},{title:"Neutral Fill Layer",tokens:[{name:"neutralFillLayerRest",cssProperty:"--neutral-fill-layer-rest"}]},{title:"Neutral Layer Floating",tokens:[{name:"neutralLayerFloating",cssProperty:"--neutral-layer-floating"}]}]}],fr=d.html`
3100
+ `,$r=[{title:"Fill",subcategories:[{title:"Fill Colour",tokens:[{name:"fillColor",cssProperty:"--fill-color"}]},{title:"Accent Fill",tokens:[{name:"accentFillRest",cssProperty:"--accent-fill-rest"},{name:"accentFillHover",cssProperty:"--accent-fill-hover"},{name:"accentFillActive",cssProperty:"--accent-fill-active"},{name:"accentFillFocus",cssProperty:"--accent-fill-focus"}]},{title:"Neutral Fill",tokens:[{name:"neutralFillRest",cssProperty:"--neutral-fill-rest"},{name:"neutralFillHover",cssProperty:"--neutral-fill-hover"},{name:"neutralFillActive",cssProperty:"--neutral-fill-active"},{name:"neutralFillFocus",cssProperty:"--neutral-fill-focus"}]},{title:"Neutral Fill Input",tokens:[{name:"neutralFillInputRest",cssProperty:"--neutral-fill-input-rest"},{name:"neutralFillInputHover",cssProperty:"--neutral-fill-input-hover"},{name:"neutralFillInputActive",cssProperty:"--neutral-fill-input-active"},{name:"neutralFillInputFocus",cssProperty:"--neutral-fill-input-focus"}]},{title:"Neutral Fill Stealth",tokens:[{name:"neutralFillStealthRest",cssProperty:"--neutral-fill-stealth-rest"},{name:"neutralFillStealthHover",cssProperty:"--neutral-fill-stealth-hover"},{name:"neutralFillStealthActive",cssProperty:"--neutral-fill-stealth-active"},{name:"neutralFillStealthFocus",cssProperty:"--neutral-fill-stealth-focus"}]},{title:"Neutral Fill Strong",tokens:[{name:"neutralFillStrongRest",cssProperty:"--neutral-fill-strong-rest"},{name:"neutralFillStrongHover",cssProperty:"--neutral-fill-strong-hover"},{name:"neutralFillStrongActive",cssProperty:"--neutral-fill-strong-active"},{name:"neutralFillStrongFocus",cssProperty:"--neutral-fill-strong-focus"}]}]},{title:"Foreground",subcategories:[{title:"Neutral Foreground",tokens:[{name:"neutralForegroundRest",cssProperty:"--neutral-foreground-rest"},{name:"neutralForegroundHint",cssProperty:"--neutral-foreground-hint"}]},{title:"Accent Foreground",tokens:[{name:"accentForegroundRest",cssProperty:"--accent-foreground-rest"},{name:"accentForegroundHover",cssProperty:"--accent-foreground-hover"},{name:"accentForegroundActive",cssProperty:"--accent-foreground-active"},{name:"accentForegroundFocus",cssProperty:"--accent-foreground-focus"}]},{title:"Foreground on Accent",tokens:[{name:"foregroundOnAccentRest",cssProperty:"--foreground-on-accent-rest"},{name:"foregroundOnAccentHover",cssProperty:"--foreground-on-accent-hover"},{name:"foregroundOnAccentActive",cssProperty:"--foreground-on-accent-active"},{name:"foregroundOnAccentFocus",cssProperty:"--foreground-on-accent-focus"}]},{title:"Foreground on accent large",tokens:[{name:"foregroundOnAccentRestLarge",cssProperty:"--foreground-on-accent-rest-large"},{name:"foregroundOnAccentHoverLarge",cssProperty:"--foreground-on-accent-hover-large"},{name:"foregroundOnAccentActiveLarge",cssProperty:"--foreground-on-accent-active-large"},{name:"foregroundOnAccentFocusLarge",cssProperty:"--foreground-on-accent-focus-large"}]}]},{title:"Stroke",subcategories:[{title:"Focus Stroke",tokens:[{name:"focusStrokeOuter",cssProperty:"--focus-stroke-outer"},{name:"focusStrokeInner",cssProperty:"--focus-stroke-inner"}]},{title:"Neutral Stroke",tokens:[{name:"neutralStrokeRest",cssProperty:"---neutral-stroke-rest"},{name:"neutralStrokeHover",cssProperty:"--neutral-stroke-hover"},{name:"neutralStrokeActive",cssProperty:"--neutral-stroke-active"},{name:"neutralStrokeFocus",cssProperty:"--neutral-stroke-focus"}]},{title:"Neutral stroke divider",tokens:[{name:"neutralStrokeDividerRest",cssProperty:"--neutral-stroke-divider-rest"}]}]},{title:"Layer",subcategories:[{title:"Neutral Layers",tokens:[{name:"neutralLayer1",cssProperty:"--neutral-layer-1"},{name:"neutralLayer2",cssProperty:"--neutral-layer-2"},{name:"neutralLayer3",cssProperty:"--neutral-layer-3"},{name:"neutralLayer4",cssProperty:"--neutral-layer-4"}]},{title:"Neutral Layer Card Container",tokens:[{name:"neutralLayerCardContainer",cssProperty:"--neutral-layer-card-container"}]},{title:"Neutral Fill Layer",tokens:[{name:"neutralFillLayerRest",cssProperty:"--neutral-fill-layer-rest"}]},{title:"Neutral Layer Floating",tokens:[{name:"neutralLayerFloating",cssProperty:"--neutral-layer-floating"}]}]}],wr=d.html`
3101
3101
  <div class="row">
3102
3102
  <div
3103
3103
  class="preview"
@@ -3109,19 +3109,19 @@
3109
3109
  ${(e,t)=>p[e.name].getValueFor(t.parentContext.parentContext.parent.provider).toColorString().toUpperCase()}
3110
3110
  </div>
3111
3111
  </div>
3112
- `,$r=d.html`
3112
+ `,xr=d.html`
3113
3113
  <div class="container" ${(0,d.ref)("provider")}>
3114
- ${(0,d.repeat)(()=>yr,d.html`
3114
+ ${(0,d.repeat)(()=>$r,d.html`
3115
3115
  <div class="column">
3116
3116
  <h3 class="header-title">${e=>e.title}</h3>
3117
3117
  ${(0,d.repeat)(e=>e.subcategories,d.html`
3118
3118
  <h4>${e=>e.title}</h4>
3119
- ${(0,d.repeat)(e=>e.tokens,fr)}
3119
+ ${(0,d.repeat)(e=>e.tokens,wr)}
3120
3120
  `)}
3121
3121
  </div>
3122
3122
  `)}
3123
3123
  </div>
3124
- `;let wr=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{const t=e.detail;ir(t,this.provider)})}};(0,r.Cg)([d.observable],wr.prototype,"provider",void 0),wr=(0,r.Cg)([(0,d.customElement)({name:"color-tokens",template:$r,styles:br})],wr);const xr=d.css`
3124
+ `;let Sr=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{const t=e.detail;nr(t,this.provider)})}};(0,r.Cg)([d.observable],Sr.prototype,"provider",void 0),Sr=(0,r.Cg)([(0,d.customElement)({name:"color-tokens",template:xr,styles:fr})],Sr);const Cr=d.css`
3125
3125
  table {
3126
3126
  background: var(--neutral-fill-rest);
3127
3127
  color: var(--neutral-foreground-rest);
@@ -3130,7 +3130,7 @@
3130
3130
  th {
3131
3131
  text-align: left;
3132
3132
  }
3133
- `,Sr=d.html`
3133
+ `,Ar=d.html`
3134
3134
  <table ${(0,d.ref)("provider")} style="font-family: ${()=>p.bodyFont.createCSS()}">
3135
3135
  <colgroup>
3136
3136
  <col style="width: 15%;" />
@@ -3358,7 +3358,7 @@
3358
3358
  </tr>
3359
3359
  </tbody>
3360
3360
  </table>
3361
- `;let Cr=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{const t=e.detail;ir(t,this.provider)})}};(0,r.Cg)([d.observable],Cr.prototype,"provider",void 0),Cr=(0,r.Cg)([(0,d.customElement)({name:"typography-tokens",template:Sr,styles:xr})],Cr);const Ar=d.css`
3361
+ `;let Ir=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{const t=e.detail;nr(t,this.provider)})}};(0,r.Cg)([d.observable],Ir.prototype,"provider",void 0),Ir=(0,r.Cg)([(0,d.customElement)({name:"typography-tokens",template:Ar,styles:Cr})],Ir);const kr=d.css`
3362
3362
  :host {
3363
3363
  background: var(--fill-color);
3364
3364
  color: var(--neutral-foreground-rest);
@@ -3374,7 +3374,7 @@
3374
3374
  margin-top: 24px;
3375
3375
  padding: 0 calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px);
3376
3376
  }
3377
- `,Ir=d.css`
3377
+ `,Mr=d.css`
3378
3378
  :host {
3379
3379
  --badge-fill-primary: var(--accent-fill-rest);
3380
3380
  --badge-fill-neutral: var(--neutral-fill-rest);
@@ -3407,7 +3407,7 @@
3407
3407
  grid-area: 1 / 2 / 3 / 3;
3408
3408
  }
3409
3409
  }
3410
- `,kr=d.html`
3410
+ `,Lr=d.html`
3411
3411
  ${e=>{return t=e.prefix,d.html`
3412
3412
  <template>
3413
3413
  <${t}-design-system-provider ${(0,d.ref)("provider")}>
@@ -3428,7 +3428,7 @@
3428
3428
  </${t}-design-system-provider>
3429
3429
  </template>
3430
3430
  `;var t}}
3431
- `;let Mr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>Ko.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>Ko.debug("DELETE!!!",e)},{name:"Edit",callback:e=>Ko.debug("EDIT!!!",e)},{name:"Wait",callback:e=>Ko.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(jo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Yo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{ir(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],Mr.prototype,"modal",void 0),(0,r.Cg)([d.attr],Mr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Mr.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],Mr.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Mr.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],Mr.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],Mr.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],Mr.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Mr.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],Mr.prototype,"cards",void 0),(0,r.Cg)([d.observable],Mr.prototype,"countries",void 0),(0,r.Cg)([d.observable],Mr.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],Mr.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],Mr.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],Mr.prototype,"provider",void 0),Mr=(0,r.Cg)([(0,d.customElement)({name:"preview-app",template:kr,styles:Ir})],Mr);const Lr={type:"VerticalLayout",elements:[{type:"Group",label:"Group 1",scope:"#/properties/group1",options:{childElements:[{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/group1/properties/NAME",label:"Name"}]}]}},{type:"Group",label:"Group 2",scope:"#/properties/group2",options:{childElements:[{type:"LayoutVertical2Columns",elements:[{type:"Control",scope:"#/properties/group2/properties/QUANTITY",label:"Quantity"},{type:"Control",scope:"#/properties/group2/properties/PRICE",label:"Price"},{type:"Control",scope:"#/properties/group2/properties/COUNTERPARTY_ID",options:{data:[{name:"Genesis Global",value:"GENESIS"},{name:"Acme Global",value:"ACME"}],valueField:"value",labelField:"name"},label:"Counterparty"},{type:"Control",scope:"#/properties/group2/properties/INSTRUMENT_ID",options:{data:[{name:"Bond",value:"BOND"},{name:"Equity",value:"EQUITY"}],valueField:"value",labelField:"name"},label:"Instrument"},{type:"Control",scope:"#/properties/group2/properties/SIDE",label:"Side"},{type:"Control",scope:"#/properties/group2/properties/TRADE_DATE",label:"Trade Date"},{type:"Control",scope:"#/properties/group2/properties/ACTIVE",label:"Active"}]}]}}]},Er={type:"object",properties:{group1:{type:"object",properties:{NAME:{type:"string"}}},group2:{type:"object",properties:{QUANTITY:{type:"number"},PRICE:{type:"number"},COUNTERPARTY_ID:{type:"string"},INSTRUMENT_ID:{type:"string"},SIDE:{type:"string",enum:["BUY","SELL"]},TRADE_DATE:{type:"number",format:"date",description:"org.joda.time.DateTime"},ACTIVE:{type:"boolean"}},required:["QUANTITY","PRICE"]}}},Tr={type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/users",options:{childUiSchema:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/firstname",label:"First Name"},{type:"Control",scope:"#/properties/lastname",label:"Last Name"},{type:"Control",scope:"#/properties/email",label:"Email"}]}}}]},Rr={type:"object",properties:{users:{type:"array",items:{type:"object",title:"Users",properties:{firstname:{type:"string"},lastname:{type:"string"},email:{type:"string",format:"email"}},required:["firstname"]}}}},_r=d.css`
3431
+ `;let Er=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>tr.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>tr.debug("DELETE!!!",e)},{name:"Edit",callback:e=>tr.debug("EDIT!!!",e)},{name:"Wait",callback:e=>tr.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Bo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Vo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{nr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],Er.prototype,"modal",void 0),(0,r.Cg)([d.attr],Er.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Er.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],Er.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Er.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],Er.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],Er.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],Er.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Er.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],Er.prototype,"cards",void 0),(0,r.Cg)([d.observable],Er.prototype,"countries",void 0),(0,r.Cg)([d.observable],Er.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],Er.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],Er.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],Er.prototype,"provider",void 0),Er=(0,r.Cg)([(0,d.customElement)({name:"preview-app",template:Lr,styles:Mr})],Er);const Tr={type:"VerticalLayout",elements:[{type:"Group",label:"Group 1",scope:"#/properties/group1",options:{childElements:[{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/group1/properties/NAME",label:"Name"}]}]}},{type:"Group",label:"Group 2",scope:"#/properties/group2",options:{childElements:[{type:"LayoutVertical2Columns",elements:[{type:"Control",scope:"#/properties/group2/properties/QUANTITY",label:"Quantity"},{type:"Control",scope:"#/properties/group2/properties/PRICE",label:"Price"},{type:"Control",scope:"#/properties/group2/properties/COUNTERPARTY_ID",options:{data:[{name:"Genesis Global",value:"GENESIS"},{name:"Acme Global",value:"ACME"}],valueField:"value",labelField:"name"},label:"Counterparty"},{type:"Control",scope:"#/properties/group2/properties/INSTRUMENT_ID",options:{data:[{name:"Bond",value:"BOND"},{name:"Equity",value:"EQUITY"}],valueField:"value",labelField:"name"},label:"Instrument"},{type:"Control",scope:"#/properties/group2/properties/SIDE",label:"Side"},{type:"Control",scope:"#/properties/group2/properties/TRADE_DATE",label:"Trade Date"},{type:"Control",scope:"#/properties/group2/properties/ACTIVE",label:"Active"}]}]}}]},Rr={type:"object",properties:{group1:{type:"object",properties:{NAME:{type:"string"}}},group2:{type:"object",properties:{QUANTITY:{type:"number"},PRICE:{type:"number"},COUNTERPARTY_ID:{type:"string"},INSTRUMENT_ID:{type:"string"},SIDE:{type:"string",enum:["BUY","SELL"]},TRADE_DATE:{type:"number",format:"date",description:"org.joda.time.DateTime"},ACTIVE:{type:"boolean"}},required:["QUANTITY","PRICE"]}}},_r={type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/users",options:{childUiSchema:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/firstname",label:"First Name"},{type:"Control",scope:"#/properties/lastname",label:"Last Name"},{type:"Control",scope:"#/properties/email",label:"Email"}]}}}]},Dr={type:"object",properties:{users:{type:"array",items:{type:"object",title:"Users",properties:{firstname:{type:"string"},lastname:{type:"string"},email:{type:"string",format:"email"}},required:["firstname"]}}}},Nr=d.css`
3432
3432
  :host {
3433
3433
  background: var(--fill-color);
3434
3434
  color: var(--neutral-foreground-rest);
@@ -3459,7 +3459,7 @@
3459
3459
  rapid-design-system-provider {
3460
3460
  display: inline;
3461
3461
  }
3462
- `,Dr=d.html`
3462
+ `,Pr=d.html`
3463
3463
  ${e=>{return t=e.prefix,d.html`
3464
3464
  <template>
3465
3465
  <${t}-design-system-provider ${(0,d.ref)("provider")}>
@@ -3483,7 +3483,7 @@
3483
3483
  </${t}-design-system-provider>
3484
3484
  </template>
3485
3485
  `;var t}}
3486
- `;let Nr=class extends d.FASTElement{constructor(){super(...arguments),this.jsonSchema=Er,this.uischema=Lr,this.jsonSchemaArray=Rr,this.uiSchemaArray=Tr,this.prefix="rapid",this.editedEntity={group1:{NAME:"Test Name"},group2:{COUNTERPARTY_ID:"GENESIS",INSTRUMENT_ID:"BOND"}},this.editedEntityArray={users:[{firstname:"Max",lastname:"Mustermann",age:25,email:"max@mustermann.com"},{firstname:"John",lastname:"Doe",age:35,email:"john@doe.com"}]}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(jo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Yo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{ir(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix}};(0,r.Cg)([d.observable],Nr.prototype,"jsonSchema",void 0),(0,r.Cg)([d.observable],Nr.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Nr.prototype,"jsonSchemaArray",void 0),(0,r.Cg)([d.observable],Nr.prototype,"uiSchemaArray",void 0),(0,r.Cg)([d.attr],Nr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Nr.prototype,"provider",void 0),(0,r.Cg)([d.observable],Nr.prototype,"editedEntity",void 0),(0,r.Cg)([d.observable],Nr.prototype,"editedEntityArray",void 0),Nr=(0,r.Cg)([(0,d.customElement)({name:"preview-form",template:Dr,styles:_r})],Nr);var Pr=o(55365),zr=o(39604);const Or=[{athlete:"Michael Phelps",age:23,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:8,silver:0,bronze:0,total:8,isActionDisabled:!0,BUY_SELL:"BUY"},{athlete:"Michael Phelps",age:19,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:6,silver:0,bronze:2,total:8,BUY_SELL:"SELL"},{athlete:"Michael Phelps",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:2,bronze:0,total:6,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:25,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:2,bronze:3,total:6,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Aleksey Nemov",age:24,country:"Russia",year:2e3,date:"01/10/2000",sport:"Gymnastics",gold:2,silver:1,bronze:3,total:6,BUY_SELL:"BUY"},{athlete:"Alicia Coutts",age:24,country:"Australia",year:2012,date:"12/08/2012",sport:"Swimming",gold:1,silver:3,bronze:1,total:5,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Missy Franklin",age:17,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:0,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Ryan Lochte",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Allison Schmitt",age:22,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:21,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Ian Thorpe",age:17,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:2,bronze:0,total:5,BUY_SELL:"BUY"},{athlete:"Dara Torres",age:33,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:3,total:5,BUY_SELL:"SELL"},{athlete:"Cindy Klassen",age:26,country:"Canada",year:2006,date:"26/02/2006",sport:"Speed Skating",gold:1,silver:2,bronze:2,total:5,BUY_SELL:"BUY"},{athlete:"Nastia Liukin",age:18,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Marit Bjørgen",age:29,country:"Norway",year:2010,date:"28/02/2010",sport:"Cross Country Skiing",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Sun Yang",age:20,country:"China",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Kirsty Coventry",age:24,country:"Zimbabwe",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Libby Lenton-Trickett",age:23,country:"Australia",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Ryan Lochte",age:24,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"BUY"},{athlete:"Inge de Bruijn",age:30,country:"Netherlands",year:2004,date:"29/08/2004",sport:"Swimming",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Petria Thomas",age:28,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Ian Thorpe",age:21,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Inge de Bruijn",age:27,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Gary Hall Jr.",age:25,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Michael Klim",age:23,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:2,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Susie O'Neill",age:27,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"SELL"},{athlete:"Jenny Thompson",age:27,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Pieter van den Hoogenband",age:22,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"An Hyeon-Su",age:20,country:"South Korea",year:2006,date:"26/02/2006",sport:"Short-Track Speed Skating",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Aliya Mustafina",age:17,country:"Russia",year:2012,date:"12/08/2012",sport:"Gymnastics",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Shawn Johnson",age:16,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"}],Fr=d.css`
3486
+ `;let zr=class extends d.FASTElement{constructor(){super(...arguments),this.jsonSchema=Rr,this.uischema=Tr,this.jsonSchemaArray=Dr,this.uiSchemaArray=_r,this.prefix="rapid",this.editedEntity={group1:{NAME:"Test Name"},group2:{COUNTERPARTY_ID:"GENESIS",INSTRUMENT_ID:"BOND"}},this.editedEntityArray={users:[{firstname:"Max",lastname:"Mustermann",age:25,email:"max@mustermann.com"},{firstname:"John",lastname:"Doe",age:35,email:"john@doe.com"}]}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Bo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Vo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{nr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix}};(0,r.Cg)([d.observable],zr.prototype,"jsonSchema",void 0),(0,r.Cg)([d.observable],zr.prototype,"uischema",void 0),(0,r.Cg)([d.observable],zr.prototype,"jsonSchemaArray",void 0),(0,r.Cg)([d.observable],zr.prototype,"uiSchemaArray",void 0),(0,r.Cg)([d.attr],zr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],zr.prototype,"provider",void 0),(0,r.Cg)([d.observable],zr.prototype,"editedEntity",void 0),(0,r.Cg)([d.observable],zr.prototype,"editedEntityArray",void 0),zr=(0,r.Cg)([(0,d.customElement)({name:"preview-form",template:Pr,styles:Nr})],zr);var Or=o(55365),Fr=o(39604);const jr=[{athlete:"Michael Phelps",age:23,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:8,silver:0,bronze:0,total:8,isActionDisabled:!0,BUY_SELL:"BUY"},{athlete:"Michael Phelps",age:19,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:6,silver:0,bronze:2,total:8,BUY_SELL:"SELL"},{athlete:"Michael Phelps",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:2,bronze:0,total:6,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:25,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:2,bronze:3,total:6,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Aleksey Nemov",age:24,country:"Russia",year:2e3,date:"01/10/2000",sport:"Gymnastics",gold:2,silver:1,bronze:3,total:6,BUY_SELL:"BUY"},{athlete:"Alicia Coutts",age:24,country:"Australia",year:2012,date:"12/08/2012",sport:"Swimming",gold:1,silver:3,bronze:1,total:5,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Missy Franklin",age:17,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:0,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Ryan Lochte",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Allison Schmitt",age:22,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:21,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Ian Thorpe",age:17,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:2,bronze:0,total:5,BUY_SELL:"BUY"},{athlete:"Dara Torres",age:33,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:3,total:5,BUY_SELL:"SELL"},{athlete:"Cindy Klassen",age:26,country:"Canada",year:2006,date:"26/02/2006",sport:"Speed Skating",gold:1,silver:2,bronze:2,total:5,BUY_SELL:"BUY"},{athlete:"Nastia Liukin",age:18,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Marit Bjørgen",age:29,country:"Norway",year:2010,date:"28/02/2010",sport:"Cross Country Skiing",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Sun Yang",age:20,country:"China",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Kirsty Coventry",age:24,country:"Zimbabwe",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Libby Lenton-Trickett",age:23,country:"Australia",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Ryan Lochte",age:24,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"BUY"},{athlete:"Inge de Bruijn",age:30,country:"Netherlands",year:2004,date:"29/08/2004",sport:"Swimming",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Petria Thomas",age:28,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Ian Thorpe",age:21,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Inge de Bruijn",age:27,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Gary Hall Jr.",age:25,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Michael Klim",age:23,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:2,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Susie O'Neill",age:27,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"SELL"},{athlete:"Jenny Thompson",age:27,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Pieter van den Hoogenband",age:22,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"An Hyeon-Su",age:20,country:"South Korea",year:2006,date:"26/02/2006",sport:"Short-Track Speed Skating",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Aliya Mustafina",age:17,country:"Russia",year:2012,date:"12/08/2012",sport:"Gymnastics",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Shawn Johnson",age:16,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"}],Ur=d.css`
3487
3487
  :host {
3488
3488
  background: var(--fill-color);
3489
3489
  color: var(--neutral-foreground-rest);
@@ -3498,7 +3498,7 @@
3498
3498
  .grid-height {
3499
3499
  height: 100%;
3500
3500
  }
3501
- `,jr=d.html`
3501
+ `,Br=d.html`
3502
3502
  ${e=>{return t=e.prefix,d.html`
3503
3503
  <template>
3504
3504
  <${t}-design-system-provider ${(0,d.ref)("provider")}>
@@ -3527,7 +3527,7 @@
3527
3527
  </${t}-design-system-provider>
3528
3528
  </template>
3529
3529
  `;var t}}
3530
- `;let Ur=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.rowData=[...Or],this.columnDefs=[{headerName:"#",colId:"rowNum",valueGetter:"node.id",width:80,pinned:"left"},{headerName:"Athlete",field:"athlete",width:150,pinned:"left"},{headerName:"Age",field:"age",width:90,pinned:"left"},{headerName:"Country",field:"country",width:150},{headerName:"Year",field:"year",width:90},{field:"BUY_SELL",headerName:"B/S",width:100,cellRenderer:Pr.IX.statusPill,cellRendererParams:e=>({text:e.value,backgroundColor:"BUY"===e.value||"LONG"===e.value?"green":"red"})},{headerName:"Date",field:"date",width:110,filter:"agDateColumnFilter",filterParams:{buttons:["apply","reset"],browserDatePicker:!0,comparator:(e,t)=>{if(null==t)return-1;const o=t.split("/"),r=new Date(Number(o[2]),Number(o[1])-1,Number(o[0]));return e.getTime()===r.getTime()?0:r<e?-1:r>e?1:0}}},{headerName:"Sport",field:"sport",width:150,editable:!0},{headerName:"Gold",field:"gold",width:100},{headerName:"Silver",field:"silver",width:100},{headerName:"Bronze",field:"bronze",width:100},{headerName:"Total",field:"total",width:100,pinned:"right"}],this.gridOptions={defaultColDef:{resizable:!0,filter:!0},debug:!1,columnDefs:this.columnDefs,rowData:this.rowData},this.myCustomCheckboxRenderer=e=>2012===e.value?`<div><span style="color: var(--warning-color); font-weight: bold;">${e.value}</span></div>`:e.value,this.multipleCustomFoundationColumnConfigs=[{headerName:"Country",field:"country",cellRenderer:Pr.IX.boolean},{headerName:"Year",field:"year",cellRenderer:this.myCustomCheckboxRenderer}],this.multipleActions=[{name:"View",callback:e=>console.log("VIEWW!!!",e)},{name:"Delete",callback:e=>console.log("DELETE!!!",e)},{name:"Edit",callback:e=>console.log("EDIT!!!",e)},{name:"Wait",callback:e=>console.log("WHAT???",e)}],this.multipleActionsMenuSlottedConfig=(0,zr.Al)(this.multipleActions,{headerName:"Multiple Actions",width:140},"⋮",!0,"stealth"),this.singleActionSlottedConfig={headerName:"Single Action",width:200,cellRenderer:Pr.IX.action,cellRendererParams:{actionClick:e=>console.log("CLICKED ON SINGLE ACTION!!!!",e),actionName:"Single Action",appearance:"accent",isDisabled:e=>!!e.isActionDisabled,dataTestId:"singleActionTestId#",uniqueFieldName:"UNIQUE_ID"}}}setGridOptions(){this.grid.gridOptions=this.gridOptions}connectedCallback(){super.connectedCallback(),document.body.addEventListener(jo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(jo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{this.setGridOptions(),p.bodyFont.withDefault(Yo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{ir(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,d.DOM.queueUpdate(()=>{this.setGridOptions()})}};(0,r.Cg)([d.observable],Ur.prototype,"grid",void 0),(0,r.Cg)([d.attr],Ur.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Ur.prototype,"provider",void 0),(0,r.Cg)([d.observable],Ur.prototype,"rowData",void 0),(0,r.Cg)([d.observable],Ur.prototype,"columnDefs",void 0),(0,r.Cg)([d.observable],Ur.prototype,"gridOptions",void 0),Ur=(0,r.Cg)([(0,d.customElement)({name:"preview-grid",template:jr,styles:Fr})],Ur);const Br=d.html`
3530
+ `;let Hr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.rowData=[...jr],this.columnDefs=[{headerName:"#",colId:"rowNum",valueGetter:"node.id",width:80,pinned:"left"},{headerName:"Athlete",field:"athlete",width:150,pinned:"left"},{headerName:"Age",field:"age",width:90,pinned:"left"},{headerName:"Country",field:"country",width:150},{headerName:"Year",field:"year",width:90},{field:"BUY_SELL",headerName:"B/S",width:100,cellRenderer:Or.IX.statusPill,cellRendererParams:e=>({text:e.value,backgroundColor:"BUY"===e.value||"LONG"===e.value?"green":"red"})},{headerName:"Date",field:"date",width:110,filter:"agDateColumnFilter",filterParams:{buttons:["apply","reset"],browserDatePicker:!0,comparator:(e,t)=>{if(null==t)return-1;const o=t.split("/"),r=new Date(Number(o[2]),Number(o[1])-1,Number(o[0]));return e.getTime()===r.getTime()?0:r<e?-1:r>e?1:0}}},{headerName:"Sport",field:"sport",width:150,editable:!0},{headerName:"Gold",field:"gold",width:100},{headerName:"Silver",field:"silver",width:100},{headerName:"Bronze",field:"bronze",width:100},{headerName:"Total",field:"total",width:100,pinned:"right"}],this.gridOptions={defaultColDef:{resizable:!0,filter:!0},debug:!1,columnDefs:this.columnDefs,rowData:this.rowData},this.myCustomCheckboxRenderer=e=>2012===e.value?`<div><span style="color: var(--warning-color); font-weight: bold;">${e.value}</span></div>`:e.value,this.multipleCustomFoundationColumnConfigs=[{headerName:"Country",field:"country",cellRenderer:Or.IX.boolean},{headerName:"Year",field:"year",cellRenderer:this.myCustomCheckboxRenderer}],this.multipleActions=[{name:"View",callback:e=>console.log("VIEWW!!!",e)},{name:"Delete",callback:e=>console.log("DELETE!!!",e)},{name:"Edit",callback:e=>console.log("EDIT!!!",e)},{name:"Wait",callback:e=>console.log("WHAT???",e)}],this.multipleActionsMenuSlottedConfig=(0,Fr.Al)(this.multipleActions,{headerName:"Multiple Actions",width:140},"⋮",!0,"stealth"),this.singleActionSlottedConfig={headerName:"Single Action",width:200,cellRenderer:Or.IX.action,cellRendererParams:{actionClick:e=>console.log("CLICKED ON SINGLE ACTION!!!!",e),actionName:"Single Action",appearance:"accent",isDisabled:e=>!!e.isActionDisabled,dataTestId:"singleActionTestId#",uniqueFieldName:"UNIQUE_ID"}}}setGridOptions(){this.grid.gridOptions=this.gridOptions}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Bo.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Bo.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{this.setGridOptions(),p.bodyFont.withDefault(Vo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{nr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,d.DOM.queueUpdate(()=>{this.setGridOptions()})}};(0,r.Cg)([d.observable],Hr.prototype,"grid",void 0),(0,r.Cg)([d.attr],Hr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Hr.prototype,"provider",void 0),(0,r.Cg)([d.observable],Hr.prototype,"rowData",void 0),(0,r.Cg)([d.observable],Hr.prototype,"columnDefs",void 0),(0,r.Cg)([d.observable],Hr.prototype,"gridOptions",void 0),Hr=(0,r.Cg)([(0,d.customElement)({name:"preview-grid",template:Br,styles:Ur})],Hr);const Yr=d.html`
3531
3531
  <template>
3532
3532
  <rapid-tabs>
3533
3533
  <rapid-tab slot="tab">Components</rapid-tab>
@@ -3560,5 +3560,5 @@
3560
3560
  </rapid-tab-panel>
3561
3561
  </rapid-tabs>
3562
3562
  </template>
3563
- `;let Hr=class extends d.FASTElement{};Hr=(0,r.Cg)([(0,d.customElement)({name:"design-system-preview",template:Br,styles:Ar})],Hr),(0,Uo.provideDesignSystem)().register(Uo.baseComponents,Bo.rapidGridComponents,Fo)}}]);
3564
- //# sourceMappingURL=65.a6e8a28b67bf967793cd1557e33cc6c3.js.map
3563
+ `;let Gr=class extends d.FASTElement{};Gr=(0,r.Cg)([(0,d.customElement)({name:"design-system-preview",template:Yr,styles:kr})],Gr),(0,Ho.provideDesignSystem)().register(Ho.baseComponents,Yo.rapidGridComponents,Uo)}}]);
3564
+ //# sourceMappingURL=65.2b105e1848ee3262ccd322159887ce9f.js.map