@iamproperty/components 7.5.1--beta7 → 7.5.1--beta9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  2. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  3. package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
  4. package/assets/js/components/advanced-select/advanced-select.component.min.js +1 -1
  5. package/assets/js/components/applied-filters/applied-filters.component.min.js +2 -2
  6. package/assets/js/components/applied-filters/applied-filters.component.min.js.map +1 -1
  7. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  8. package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
  9. package/assets/js/components/calendar/calendar.component.min.js +1 -1
  10. package/assets/js/components/card/card.component.min.js +1 -1
  11. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  12. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  13. package/assets/js/components/content/content.component.min.js +1 -1
  14. package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
  15. package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
  16. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  17. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  18. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  19. package/assets/js/components/header/header.component.min.js +1 -1
  20. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  21. package/assets/js/components/input/input.component.min.js +1 -1
  22. package/assets/js/components/input-range/input-range.component.min.js +1 -1
  23. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  24. package/assets/js/components/menu/menu.component.min.js +1 -1
  25. package/assets/js/components/milestone/milestone.component.min.js +1 -1
  26. package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
  27. package/assets/js/components/modal/modal.component.min.js +1 -1
  28. package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
  29. package/assets/js/components/multi-step-modal/multi-step-modal.component.min.js +1 -1
  30. package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
  31. package/assets/js/components/nav/nav.component.min.js +1 -1
  32. package/assets/js/components/notification/notification.component.min.js +1 -1
  33. package/assets/js/components/pagination/pagination.component.js +0 -1
  34. package/assets/js/components/pagination/pagination.component.min.js +2 -2
  35. package/assets/js/components/pagination/pagination.component.min.js.map +1 -1
  36. package/assets/js/components/password/password.component.min.js +1 -1
  37. package/assets/js/components/rank/rank.component.min.js +1 -1
  38. package/assets/js/components/rankings/rankings.component.min.js +1 -1
  39. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  40. package/assets/js/components/search/search.component.min.js +1 -1
  41. package/assets/js/components/slider/slider.component.min.js +1 -1
  42. package/assets/js/components/split-button/split-button.component.min.js +1 -1
  43. package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +1 -1
  44. package/assets/js/components/table/table.component.min.js +4 -4
  45. package/assets/js/components/table/table.component.min.js.map +1 -1
  46. package/assets/js/components/table-ajax/table-ajax.component.min.js +4 -4
  47. package/assets/js/components/table-ajax/table-ajax.component.min.js.map +1 -1
  48. package/assets/js/components/table-basic/table-basic.component.min.js +2 -2
  49. package/assets/js/components/table-basic/table-basic.component.min.js.map +1 -1
  50. package/assets/js/components/table-no-submit/table-no-submit.component.min.js +1 -1
  51. package/assets/js/components/table-no-submit/table-no-submit.component.min.js.map +1 -1
  52. package/assets/js/components/table-submit/table-submit.component.min.js +2 -2
  53. package/assets/js/components/table-submit/table-submit.component.min.js.map +1 -1
  54. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  55. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  56. package/assets/js/components/word-count/word-count.component.min.js +1 -1
  57. package/assets/js/modules/applied-filters.js +6 -5
  58. package/assets/js/modules/table.js +94 -26
  59. package/assets/js/scripts.bundle.js +1 -1
  60. package/assets/js/scripts.bundle.min.js +1 -1
  61. package/assets/ts/components/pagination/pagination.component.ts +0 -2
  62. package/assets/ts/modules/applied-filters.ts +8 -5
  63. package/assets/ts/modules/table.ts +88 -6
  64. package/dist/components.es.js +29 -29
  65. package/dist/components.umd.js +134 -134
  66. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const c=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})},r=(i,o,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),n.forEach(d=>{i.addEventListener(d,function(e){const t={event:d,element:o,target:e.target};Object.keys(e.detail).forEach(a=>{const s=e.detail[a];t[a]=s}),window.dataLayer.push(t)})}),!0);c("iam-accordion");class l extends HTMLElement{constructor(){var o;super(),this.attachShadow({mode:"open"});const n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const B=(h=1)=>Math.floor(Math.random()*Date.now()*(h+1));class j extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import Y from"js-cookie";function F(f,a,c,k=!1){let t=-1;c.closest(".datalist__wrapper")&&c.closest(".datalist__wrapper"),a.setAttribute("data-list",a.getAttribute("list")),a.setAttribute("list",""),a.hasAttribute("placeholder")&&a.setAttribute("data-placeholder",a.getAttribute("placeholder")),a.hasAttribute("placeholder")&&a.setAttribute("data-original-placeholder",a.getAttribute("placeholder")),a.addEventListener("focus",function(){a.value!=""&&(a.setAttribute("placeholder",a.value),a.setAttribute("data-value",a.value)),a.value=""}),a.addEventListener("blur",function(){a.hasAttribute("data-value")&&(a.value=a.getAttribute("data-value")),a.hasAttribute("data-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-placeholder"))});for(const o of c.options)o.innerHTML==""&&(o.innerHTML=o.value);c.addEventListener("click",function(o){if(o&&o.target instanceof HTMLElement&&o.target.closest("option")){const l=o.target.closest("option");a.value=l.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(a);for(const L of c.options)L.classList.remove("active");l.classList.add("active")}}),a.addEventListener("input",function(){a.removeAttribute("data-value"),t=-1;const o=a.value.toUpperCase();for(const l of c.options)l.value.toUpperCase().indexOf(o)>-1?(l.style.display="block",l.classList.remove("hide")):(l.style.display="none",l.classList.add("hide"))}),f.addEventListener("keydown",function(o){o.keyCode==40?(t++,p(c.options)):o.keyCode==38?(t--,p(c.options)):o.keyCode==13&&(o.preventDefault(),t>-1&&c.options&&c.options[t].click())});function p(o){if(!o)return!1;u(o),t>=o.length&&(t=0),t<0&&(t=o.length-1),o[t].classList.add("active")}function u(o){if(!o)return!1;for(let l=0;l<o.length;l++)o[l].classList.remove("active")}a.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const x=()=>{a.hasAttribute("data-original-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-original-placeholder")),a.removeAttribute("data-value"),a.value="";for(const l of c.options)l.classList.remove("active"),l.removeAttribute("style");const o=new CustomEvent("close-button-pressed");f.dispatchEvent(o)};(f.querySelector(".empty")?f.querySelector(".empty"):f.shadowRoot.querySelector(".empty")).addEventListener("click",function(o){x()}),f.addEventListener("empty",function(o){x()})}const G=f=>/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(f.trim());var A=function(f,a,c,k){function t(p){return p instanceof c?p:new c(function(u){u(p)})}return new(c||(c=Promise))(function(p,u){function x(l){try{o(k.next(l))}catch(L){u(L)}}function e(l){try{o(k.throw(l))}catch(L){u(L)}}function o(l){l.done?p(l.value):t(l.value).then(x,e)}o((k=k.apply(f,a||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class Q extends HTMLElement{constructor(){var a;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const c=document.createElement("template");c.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function f(n,t,o,a=!1){let s=-1;o.closest(".datalist__wrapper")&&o.closest(".datalist__wrapper"),t.setAttribute("data-list",t.getAttribute("list")),t.setAttribute("list",""),t.hasAttribute("placeholder")&&t.setAttribute("data-placeholder",t.getAttribute("placeholder")),t.hasAttribute("placeholder")&&t.setAttribute("data-original-placeholder",t.getAttribute("placeholder")),t.addEventListener("focus",function(){t.value!=""&&(t.setAttribute("placeholder",t.value),t.setAttribute("data-value",t.value)),t.value=""}),t.addEventListener("blur",function(){t.hasAttribute("data-value")&&(t.value=t.getAttribute("data-value")),t.hasAttribute("data-placeholder")&&t.setAttribute("placeholder",t.getAttribute("data-placeholder"))});for(const e of o.options)e.innerHTML==""&&(e.innerHTML=e.value);o.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("option")){const r=e.target.closest("option");t.value=r.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(t);for(const l of o.options)l.classList.remove("active");r.classList.add("active")}}),t.addEventListener("input",function(){t.removeAttribute("data-value"),s=-1;const e=t.value.toUpperCase();for(const r of o.options)r.value.toUpperCase().indexOf(e)>-1?(r.style.display="block",r.classList.remove("hide")):(r.style.display="none",r.classList.add("hide"))}),n.addEventListener("keydown",function(e){e.keyCode==40?(s++,c(o.options)):e.keyCode==38?(s--,c(o.options)):e.keyCode==13&&(e.preventDefault(),s>-1&&o.options&&o.options[s].click())});function c(e){if(!e)return!1;u(e),s>=e.length&&(s=0),s<0&&(s=e.length-1),e[s].classList.add("active")}function u(e){if(!e)return!1;for(let r=0;r<e.length;r++)e[r].classList.remove("active")}t.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const i=()=>{t.hasAttribute("data-original-placeholder")&&t.setAttribute("placeholder",t.getAttribute("data-original-placeholder")),t.removeAttribute("data-value"),t.value="";for(const r of o.options)r.classList.remove("active"),r.removeAttribute("style");const e=new CustomEvent("close-button-pressed");n.dispatchEvent(e)};(n.querySelector(".empty")?n.querySelector(".empty"):n.shadowRoot.querySelector(".empty")).addEventListener("click",function(e){i()}),n.addEventListener("empty",function(e){i()})}const b=n=>n.replace(/ /g,"_"),h=function(n){return n=n.toLowerCase(),n=b(n),n=n.replace(/\W/g,""),n};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Advanced select"});class m extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
- */function w(a,g){var m;const b=a.closest("dialog"),v=(e,t,r=!1)=>{let o=!1,i=t.getAttribute("name");if(!i)return!1;i.includes("[]")&&(i=i.replace("[]",`[${t.value}]`));let l=e.querySelector(`[data-name="${i}"]`);l&&t.getAttribute("type")=="checkbox"&&(o=!t.checked);const c=t.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),e.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),r||l.classList.add("tag--not-set"),l.setAttribute("data-name",i),l.innerHTML=c.replace("$value",t.value),(!t.value||o)&&l.remove(),t.parentNode.closest("[data-filter-text]")){const s=t.parentNode.closest("[data-filter-text]");let y=!0;if(i="",s.querySelectorAll("input").forEach((u,d)=>{const p=u.getAttribute("name");if(i+=`${d!=0?",":""}${p}`,e.querySelector(`[data-name="${p}"]`)&&e.querySelector(`[data-name="${p}"]`).remove(),u.value){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r||l.classList.add("tag--not-set"),n.setAttribute("data-name",p),n.innerHTML=c.replace("$value",u.value),e.appendChild(n)}else y=!1}),e.querySelector(`[data-name="${i}"]`)&&e.querySelector(`[data-name="${i}"]`).remove(),y){let u=s.getAttribute("data-filter-text");s.querySelectorAll("input").forEach((p,n)=>{const E=p.getAttribute("name");e.querySelector(`[data-name="${E}"]`)&&e.querySelector(`[data-name="${E}"]`).remove(),u=u.replace(`$${n+1}`,p.value)});const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r||l.classList.add("tag--not-set"),d.setAttribute("data-name",i),d.innerHTML=u,e.appendChild(d)}}},f=(e=!1)=>{g.innerHTML="",Array.from(a.querySelectorAll('input:is([type="checkbox"],[type="radio"]):checked, input:not([type="checkbox"], [type="radio"])')).forEach(t=>{v(g,t,e)})};f(!0),a.addEventListener("change",function(e){var t;if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){const r=!a.closest("dialog"),o=e.target.closest("input[data-filter-text]");if(!a.hasAttribute("data-keep-same")&&!a.querySelector("dialog")&&v(g,o,r),r){const i=new CustomEvent("update");(t=a.parentElement.closest("iam-applied-filters"))===null||t===void 0||t.dispatchEvent(i)}}});const h=e=>{const t=e.getAttribute("data-name").split(",");for(let r=0;r<t.length;r++){const o=t[r];let i=`[name="${o}"]`;o.match(/\[(.*)\]/)&&(i=`[value="${o.replace(/.*\[(.*)\]/,"$1")}"]`);const l=a.querySelectorAll(i);for(let c=0;c<l.length;c++){const s=l[c];s.getAttribute("type")!="radio"&&s.getAttribute("type")!="checkbox"?s.value="":s.checked=!1}}e.remove(),f()};g.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const t=e.target.closest(".filter"),r=t.getAttribute("data-name");if(h(t),a.querySelector("dialog iam-applied-filters")){const o=new CustomEvent("filter",{detail:r});a.querySelector("dialog iam-applied-filters").dispatchEvent(o)}}},!1),a.addEventListener("filter",e=>{const t=a.shadowRoot.querySelector(`[data-name="${e.detail}"]`);h(t)}),a.addEventListener("set-filters",e=>{f(!0)}),b&&((m=a.querySelector(".btn-primary"))===null||m===void 0||m.addEventListener("click",e=>{const t=new CustomEvent("update");if(a.parentElement.closest("iam-applied-filters")&&a.parentElement.closest("iam-applied-filters").dispatchEvent(t),a.parentElement&&a.parentElement.closest("iam-applied-filters")&&!a.parentElement.closest("iam-applied-filters").closest("dialog")){const r=new CustomEvent("set-filters");a.parentElement.closest("iam-applied-filters").dispatchEvent(r)}if(f(!0),!a.querySelector(".btn-primary").hasAttribute("command")){b.close();const r=new Event("close");b.dispatchEvent(r)}}))}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class A extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const g=this.classList.toString(),m=document.createElement("template");m.innerHTML=`
4
+ */function w(t,g){var m;const b=t.closest("dialog"),h=(e,a,r=!1)=>{let i=!1,o=a.getAttribute("name");if(!o)return!1;o.includes("[]")&&(o=o.replace("[]",`[${a.value}]`));let l=e.querySelector(`[data-name="${o}"]`);l&&a.getAttribute("type")=="checkbox"&&(i=!a.checked);const c=a.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),e.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),r||l.classList.add("tag--not-set"),l.setAttribute("data-name",o),l.innerHTML=c.replace("$value",a.value),(!a.value||i)&&l.remove(),a.parentNode.closest("[data-filter-text]")){const s=a.parentNode.closest("[data-filter-text]");let v=!0;if(o="",s.querySelectorAll("input").forEach((u,d)=>{const p=u.getAttribute("name");if(o+=`${d!=0?",":""}${p}`,e.querySelector(`[data-name="${p}"]`)&&e.querySelector(`[data-name="${p}"]`).remove(),u.value){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r||l.classList.add("tag--not-set"),n.setAttribute("data-name",p),n.innerHTML=c.replace("$value",u.value),e.appendChild(n)}else v=!1}),e.querySelector(`[data-name="${o}"]`)&&e.querySelector(`[data-name="${o}"]`).remove(),v){let u=s.getAttribute("data-filter-text");s.querySelectorAll("input").forEach((p,n)=>{const E=p.getAttribute("name");e.querySelector(`[data-name="${E}"]`)&&e.querySelector(`[data-name="${E}"]`).remove(),u=u.replace(`$${n+1}`,p.value)});const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r||l.classList.add("tag--not-set"),d.setAttribute("data-name",o),d.innerHTML=u,e.appendChild(d)}}},f=(e=!1)=>{g.innerHTML="",Array.from(t.querySelectorAll('input:is([type="checkbox"],[type="radio"]):checked, input:not([type="checkbox"], [type="radio"])')).forEach(a=>{h(g,a,e)})};f(!0),Array.from(t.querySelectorAll("input[data-filter-text]")).forEach(e=>{e.addEventListener("change",function(a){var r;const i=!t.closest("dialog");if(!t.hasAttribute("data-keep-same")&&!t.querySelector("dialog")&&h(g,e,i),i){const o=new CustomEvent("update");(r=t.parentElement.closest("iam-applied-filters"))===null||r===void 0||r.dispatchEvent(o)}})});const y=e=>{const a=e.getAttribute("data-name").split(",");for(let r=0;r<a.length;r++){const i=a[r];let o=`[name="${i}"]`;i.match(/\[(.*)\]/)&&(o=`[value="${i.replace(/.*\[(.*)\]/,"$1")}"]`);const l=t.querySelectorAll(o);for(let c=0;c<l.length;c++){const s=l[c];s.getAttribute("type")!="radio"&&s.getAttribute("type")!="checkbox"?s.value="":s.checked=!1;const v=new CustomEvent("change");s?.dispatchEvent(v)}}e.remove(),f()};g.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const a=e.target.closest(".filter"),r=a.getAttribute("data-name");if(y(a),t.querySelector("dialog iam-applied-filters")){const i=new CustomEvent("filter",{detail:r});t.querySelector("dialog iam-applied-filters").dispatchEvent(i)}}},!1),t.addEventListener("filter",e=>{const a=t.shadowRoot.querySelector(`[data-name="${e.detail}"]`);y(a)}),t.addEventListener("set-filters",e=>{f(!0)}),b&&((m=t.querySelector(".btn-primary"))===null||m===void 0||m.addEventListener("click",e=>{const a=new CustomEvent("update");if(t.parentElement.closest("iam-applied-filters")&&t.parentElement.closest("iam-applied-filters").dispatchEvent(a),t.parentElement&&t.parentElement.closest("iam-applied-filters")&&!t.parentElement.closest("iam-applied-filters").closest("dialog")){const r=new CustomEvent("set-filters");t.parentElement.closest("iam-applied-filters").dispatchEvent(r)}if(f(!0),!t.querySelector(".btn-primary").hasAttribute("command")){b.close();const r=new Event("close");b.dispatchEvent(r)}}))}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class A extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const g=this.classList.toString(),m=document.createElement("template");m.innerHTML=`
5
5
  <style>
6
6
  @layer elements{:is(.badge,.tag){font-size:1rem;line-height:1.625rem;border:none !important;margin:0;display:inline-block;text-align:center;white-space:nowrap;max-width:fit-content;color:#262626;position:relative;background:var(--wider-colour, var(--wider-colour-1));margin-bottom:1rem}:is(.badge,.tag):has(+:is(.badge,.tag)){margin-right:0.375rem}:is(.badge,.tag):empty{display:none}:is(.badge,.tag):is(.bg-primary,.bg-dark,.bg-danger){color:#fcfcfc !important}.badge{border-radius:0.375rem;padding:0 0.5rem}.badge--rounded{border-radius:1rem;min-width:1.625rem;padding:0}.tag{border-radius:1rem;padding:0 1rem}.tag:not(:has(i)):after{content:"\u2715";margin-left:.6em;font-weight:bold}.tag i{margin-left:.5rem}.tag:is(:hover,:focus,.hover,:focus-within,:focus-visible){background:var(--wider-colour-hover, var(--wider-colour-1-hover))}.tag:is(:active,.active){background:var(--wider-colour-active, var(--wider-colour-1-active))}.tag:has(input:disabled),.tag:disabled{background:var(--wider-colour-1) !important;color:#99adb1 !important}iam-multiselect:not(:defined) .tag,.tag.tag--toggle{background:var(--colour-canvas);outline:1px solid var(--colour-border)}.tag.tag--toggle:after{display:none}.tag.tag--toggle:is(:hover,:focus){background:#eee}.tag.tag--toggle:is(:active){background:#e0e0e0}.tag.tag--toggle:has(input:checked),.tag.tag--toggle.selected{background:#e9f9fd;outline:1px solid #1ebee6}.btn :is(.badge,.tag){position:relative;top:-1px}}.applied-filters:not(:empty){padding:1px 1px 1rem 1px}:host(.applied-filters--show-set) .tag--not-set{display:none}.tag:not(.tag--not-set){background:var(--wider-colour-3)}.tag.tag--not-set{background:var(--colour-canvas);outline:1px solid var(--colour-border)}/*# sourceMappingURL=assets/css/components/applied-filters.css.map */
7
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"applied-filters.component.min.js","sources":["../../modules/applied-filters.js","applied-filters.component.js"],"sourcesContent":["function createAppliedFilters(container, filters) {\n var _a;\n const dialog = container.closest('dialog');\n const addFilterButton = (filters, input, setFilter = false) => {\n let shouldRemoveFilter = false;\n let inputName = input.getAttribute('name');\n if (!inputName) {\n return false;\n }\n if (inputName.includes('[]')) {\n inputName = inputName.replace('[]', `[${input.value}]`);\n }\n let filter = filters.querySelector(`[data-name=\"${inputName}\"]`);\n if (filter && input.getAttribute('type') == 'checkbox')\n shouldRemoveFilter = !input.checked ? true : false;\n const filterText = input.getAttribute('data-filter-text');\n if (!filter) {\n filter = document.createElement('button');\n filters.appendChild(filter);\n }\n filter.setAttribute('type', 'button');\n filter.classList.add('filter');\n filter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n filter.setAttribute('data-name', inputName);\n filter.innerHTML = filterText.replace('$value', input.value);\n // If the value\n if (!input.value || shouldRemoveFilter)\n filter.remove();\n // If input has an ancestor with data-filter and all of inputs in that parent have been filled in then we need to transform the filter\n if (input.parentNode.closest('[data-filter-text]')) {\n const parent = input.parentNode.closest('[data-filter-text]');\n let allValuesSet = true;\n inputName = '';\n parent.querySelectorAll('input').forEach((element, index) => {\n const name = element.getAttribute('name');\n // create a joined inputname for the parent filter\n inputName += `${index != 0 ? ',' : ''}${name}`;\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n if (element.value) {\n const childFilter = document.createElement('button');\n childFilter.setAttribute('type', 'button');\n childFilter.classList.add('filter');\n childFilter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n childFilter.setAttribute('data-name', name);\n childFilter.innerHTML = filterText.replace('$value', element.value);\n filters.appendChild(childFilter);\n }\n else\n allValuesSet = false;\n });\n if (filters.querySelector(`[data-name=\"${inputName}\"]`))\n filters.querySelector(`[data-name=\"${inputName}\"]`).remove();\n if (allValuesSet) {\n let newFilterText = parent.getAttribute('data-filter-text');\n parent.querySelectorAll('input').forEach((element, index) => {\n const name = element.getAttribute('name');\n // Remove all the child filter tags\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n newFilterText = newFilterText.replace(`$${index + 1}`, element.value);\n });\n const parentFilter = document.createElement('button');\n parentFilter.setAttribute('type', 'button');\n parentFilter.classList.add('filter');\n parentFilter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n parentFilter.setAttribute('data-name', inputName);\n parentFilter.innerHTML = newFilterText;\n filters.appendChild(parentFilter);\n }\n }\n };\n const checkForChecked = (setFilter = false) => {\n filters.innerHTML = '';\n Array.from(container.querySelectorAll('input:is([type=\"checkbox\"],[type=\"radio\"]):checked, input:not([type=\"checkbox\"], [type=\"radio\"])')).forEach((input) => {\n addFilterButton(filters, input, setFilter);\n });\n };\n // Check for which inputs have been set, setting true sets the filter as set (blue)\n checkForChecked(true);\n // Create the main event listener for the component watching for inputs to change\n container.addEventListener('change', function (event) {\n var _a;\n if (event && event.target instanceof HTMLElement && event.target.closest('input[data-filter-text]')) {\n const setFilter = container.closest('dialog') ? false : true;\n const input = event.target.closest('input[data-filter-text]');\n if (!container.hasAttribute('data-keep-same') && !container.querySelector('dialog'))\n addFilterButton(filters, input, setFilter);\n if (setFilter) {\n const event = new CustomEvent('update');\n (_a = container.parentElement.closest('iam-applied-filters')) === null || _a === void 0 ? void 0 : _a.dispatchEvent(event);\n }\n }\n });\n const filterClicked = (filter) => {\n const names = filter.getAttribute('data-name').split(',');\n for (let t = 0; t < names.length; t++) {\n const name = names[t];\n let selector = `[name=\"${name}\"]`;\n if (name.match(/\\[(.*)\\]/)) {\n //const newName = name.replace(/\\[(.*)\\]/, `[]`);\n const value = name.replace(/.*\\[(.*)\\]/, `$1`);\n selector = `[value=\"${value}\"]`;\n }\n const inputs = container.querySelectorAll(selector);\n for (let i = 0; i < inputs.length; i++) {\n const input = inputs[i];\n if (input.getAttribute('type') != 'radio' && input.getAttribute('type') != 'checkbox') {\n input.value = '';\n }\n else {\n input.checked = false;\n }\n }\n }\n filter.remove();\n checkForChecked();\n };\n filters.addEventListener('click', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {\n const filter = event.target.closest('.filter');\n const filterName = filter.getAttribute('data-name');\n filterClicked(filter);\n // If you clicked on the filter on the parent component we want to tell the child component which filter to copy\n if (container.querySelector('dialog iam-applied-filters')) {\n const event = new CustomEvent('filter', { 'detail': filterName });\n container.querySelector('dialog iam-applied-filters').dispatchEvent(event);\n }\n }\n }, false);\n // Listen for \n container.addEventListener('filter', (e) => {\n const filter = container.shadowRoot.querySelector(`[data-name=\"${e.detail}\"]`);\n filterClicked(filter);\n });\n container.addEventListener('set-filters', (e) => {\n checkForChecked(true);\n });\n if (dialog) {\n // Force the filters inside of the dialog to effect the filters above\n (_a = container.querySelector('.btn-primary')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', (e) => {\n const event = new CustomEvent('update');\n if (container.parentElement.closest('iam-applied-filters'))\n container.parentElement.closest('iam-applied-filters').dispatchEvent(event);\n if (container.parentElement && container.parentElement.closest('iam-applied-filters') && !container.parentElement.closest('iam-applied-filters').closest('dialog')) {\n const event = new CustomEvent('set-filters');\n container.parentElement.closest('iam-applied-filters').dispatchEvent(event);\n }\n checkForChecked(true);\n if (!container.querySelector('.btn-primary').hasAttribute('command')) {\n dialog.close();\n const event = new Event('close');\n dialog.dispatchEvent(event);\n }\n });\n }\n}\nexport default createAppliedFilters;\n","import createAppliedFilters from '../../modules/applied-filters.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Applied Filters',\n});\nclass iamAppliedFilters extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const loadCSS = `@import \"${assetLocation}/css/components/applied-filters.css\";`;\n const classList = this.classList.toString();\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${loadCSS}\n </style>\n <div class=\"applied-filters ${classList}\"></div>\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n createAppliedFilters(this, this.shadowRoot.querySelector('.applied-filters'));\n }\n}\nexport default iamAppliedFilters;\n"],"names":["createAppliedFilters","container","filters","_a","dialog","addFilterButton","input","setFilter","shouldRemoveFilter","inputName","filter","filterText","parent","allValuesSet","element","index","name","childFilter","newFilterText","parentFilter","checkForChecked","event","filterClicked","names","t","selector","inputs","i","filterName","iamAppliedFilters","classList","template"],"mappings":";;;IAAA,SAASA,EAAqBC,EAAWC,EAAS,CAC9C,IAAIC,EACJ,MAAMC,EAASH,EAAU,QAAQ,QAAQ,EACnCI,EAAkB,C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AAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA;AAAA;AAAA;AAAA,kCAIKD,CAAS;AAAA;AAAA,MAGnC,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,mBAAoB,CAChB/B,EAAqB,KAAM,KAAK,WAAW,cAAc,kBAAkB,CAAC,CAChF,CACJ"}
1
+ {"version":3,"file":"applied-filters.component.min.js","sources":["../../modules/applied-filters.js","applied-filters.component.js"],"sourcesContent":["function createAppliedFilters(container, filters) {\n var _a;\n const dialog = container.closest('dialog');\n const addFilterButton = (filters, input, setFilter = false) => {\n let shouldRemoveFilter = false;\n let inputName = input.getAttribute('name');\n if (!inputName) {\n return false;\n }\n if (inputName.includes('[]')) {\n inputName = inputName.replace('[]', `[${input.value}]`);\n }\n let filter = filters.querySelector(`[data-name=\"${inputName}\"]`);\n if (filter && input.getAttribute('type') == 'checkbox')\n shouldRemoveFilter = !input.checked ? true : false;\n const filterText = input.getAttribute('data-filter-text');\n if (!filter) {\n filter = document.createElement('button');\n filters.appendChild(filter);\n }\n filter.setAttribute('type', 'button');\n filter.classList.add('filter');\n filter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n filter.setAttribute('data-name', inputName);\n filter.innerHTML = filterText.replace('$value', input.value);\n // If the value\n if (!input.value || shouldRemoveFilter)\n filter.remove();\n // If input has an ancestor with data-filter and all of inputs in that parent have been filled in then we need to transform the filter\n if (input.parentNode.closest('[data-filter-text]')) {\n const parent = input.parentNode.closest('[data-filter-text]');\n let allValuesSet = true;\n inputName = '';\n parent.querySelectorAll('input').forEach((element, index) => {\n const name = element.getAttribute('name');\n // create a joined inputname for the parent filter\n inputName += `${index != 0 ? ',' : ''}${name}`;\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n if (element.value) {\n const childFilter = document.createElement('button');\n childFilter.setAttribute('type', 'button');\n childFilter.classList.add('filter');\n childFilter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n childFilter.setAttribute('data-name', name);\n childFilter.innerHTML = filterText.replace('$value', element.value);\n filters.appendChild(childFilter);\n }\n else\n allValuesSet = false;\n });\n if (filters.querySelector(`[data-name=\"${inputName}\"]`))\n filters.querySelector(`[data-name=\"${inputName}\"]`).remove();\n if (allValuesSet) {\n let newFilterText = parent.getAttribute('data-filter-text');\n parent.querySelectorAll('input').forEach((element, index) => {\n const name = element.getAttribute('name');\n // Remove all the child filter tags\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n newFilterText = newFilterText.replace(`$${index + 1}`, element.value);\n });\n const parentFilter = document.createElement('button');\n parentFilter.setAttribute('type', 'button');\n parentFilter.classList.add('filter');\n parentFilter.classList.add('tag');\n if (!setFilter)\n filter.classList.add('tag--not-set');\n parentFilter.setAttribute('data-name', inputName);\n parentFilter.innerHTML = newFilterText;\n filters.appendChild(parentFilter);\n }\n }\n };\n const checkForChecked = (setFilter = false) => {\n filters.innerHTML = '';\n Array.from(container.querySelectorAll('input:is([type=\"checkbox\"],[type=\"radio\"]):checked, input:not([type=\"checkbox\"], [type=\"radio\"])')).forEach((input) => {\n addFilterButton(filters, input, setFilter);\n });\n };\n // Check for which inputs have been set, setting true sets the filter as set (blue)\n checkForChecked(true);\n // Create the main event listener for the component watching for inputs to change\n Array.from(container.querySelectorAll('input[data-filter-text]')).forEach((input) => {\n input.addEventListener('change', function (event) {\n var _a;\n const setFilter = container.closest('dialog') ? false : true;\n if (!container.hasAttribute('data-keep-same') && !container.querySelector('dialog'))\n addFilterButton(filters, input, setFilter);\n if (setFilter) {\n const event = new CustomEvent('update');\n (_a = container.parentElement.closest('iam-applied-filters')) === null || _a === void 0 ? void 0 : _a.dispatchEvent(event);\n }\n });\n });\n const filterClicked = (filter) => {\n const names = filter.getAttribute('data-name').split(',');\n for (let t = 0; t < names.length; t++) {\n const name = names[t];\n let selector = `[name=\"${name}\"]`;\n if (name.match(/\\[(.*)\\]/)) {\n //const newName = name.replace(/\\[(.*)\\]/, `[]`);\n const value = name.replace(/.*\\[(.*)\\]/, `$1`);\n selector = `[value=\"${value}\"]`;\n }\n const inputs = container.querySelectorAll(selector);\n for (let i = 0; i < inputs.length; i++) {\n const input = inputs[i];\n if (input.getAttribute('type') != 'radio' && input.getAttribute('type') != 'checkbox') {\n input.value = '';\n }\n else {\n input.checked = false;\n }\n const changeEvent = new CustomEvent('change');\n input === null || input === void 0 ? void 0 : input.dispatchEvent(changeEvent);\n }\n }\n filter.remove();\n checkForChecked();\n };\n filters.addEventListener('click', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {\n const filter = event.target.closest('.filter');\n const filterName = filter.getAttribute('data-name');\n filterClicked(filter);\n // If you clicked on the filter on the parent component we want to tell the child component which filter to copy\n if (container.querySelector('dialog iam-applied-filters')) {\n const event = new CustomEvent('filter', { 'detail': filterName });\n container.querySelector('dialog iam-applied-filters').dispatchEvent(event);\n }\n }\n }, false);\n // Listen for \n container.addEventListener('filter', (e) => {\n const filter = container.shadowRoot.querySelector(`[data-name=\"${e.detail}\"]`);\n filterClicked(filter);\n });\n container.addEventListener('set-filters', (e) => {\n checkForChecked(true);\n });\n if (dialog) {\n // Force the filters inside of the dialog to effect the filters above\n (_a = container.querySelector('.btn-primary')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', (e) => {\n const event = new CustomEvent('update');\n if (container.parentElement.closest('iam-applied-filters'))\n container.parentElement.closest('iam-applied-filters').dispatchEvent(event);\n if (container.parentElement && container.parentElement.closest('iam-applied-filters') && !container.parentElement.closest('iam-applied-filters').closest('dialog')) {\n const event = new CustomEvent('set-filters');\n container.parentElement.closest('iam-applied-filters').dispatchEvent(event);\n }\n checkForChecked(true);\n if (!container.querySelector('.btn-primary').hasAttribute('command')) {\n dialog.close();\n const event = new Event('close');\n dialog.dispatchEvent(event);\n }\n });\n }\n}\nexport default createAppliedFilters;\n","import createAppliedFilters from '../../modules/applied-filters.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Applied Filters',\n});\nclass iamAppliedFilters extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const loadCSS = `@import \"${assetLocation}/css/components/applied-filters.css\";`;\n const classList = this.classList.toString();\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${loadCSS}\n </style>\n <div class=\"applied-filters ${classList}\"></div>\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n createAppliedFilters(this, this.shadowRoot.querySelector('.applied-filters'));\n }\n}\nexport default iamAppliedFilters;\n"],"names":["createAppliedFilters","container","filters","_a","dialog","addFilterButton","input","setFilter","shouldRemoveFilter","inputName","filter","filterText","parent","allValuesSet","element","index","name","childFilter","newFilterText","parentFilter","checkForChecked","event","filterClicked","names","t","selector","inputs","i","changeEvent","filterName","iamAppliedFilters","classList","template"],"mappings":";;;IAAA,SAASA,EAAqBC,EAAWC,EAAS,CAC9C,IAAIC,EACJ,MAAMC,EAASH,EAAU,QAAQ,QAAQ,EACnCI,EAAkB,CAACH,EAASI,EAAOC,EAAY,KAAU,CAC3D,IAAIC,EAAqB,GACrBC,EAAYH,EAAM,aAAa,MAAM,EACzC,GAAI,CAACG,EACD,MAAO,GAEPA,EAAU,SAAS,IAAI,IACvBA,EAAYA,EAAU,QAAQ,KAAM,IAAIH,EAAM,KAAK,GAAG,GAE1D,IAAII,EAASR,EAAQ,cAAc,eAAeO,CAAS,IAAI,EAC3DC,GAAUJ,EAAM,aAAa,MAAM,GAAK,aACxCE,EAAsB,CAAAF,EAAM,SAChC,MAAMK,EAAaL,EAAM,aAAa,kBAAkB,EAgBxD,GAfKI,IACDA,EAAS,SAAS,cAAc,QAAQ,E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t.slice(1),M=t=>t.replace(/_/g," "),E=(t,r)=>{for(let e=1;e<=10;e++){if(t.hasAttribute(`data-colour-${e}`)){const a=t.getAttribute(`data-colour-${e}`);t.style.setProperty(`--chart-colour-${e}`,`var(--chart-colour-${a})`),t.style.setProperty(`--chart-colour-${e}-hover`,`var(--chart-colour-${a}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${e}]`)).forEach(a=>{const o=a.getAttribute(`data-colour-${e}`);a.style.setProperty(`--chart-colour-${e}-set`,`var(--chart-colour-${o})`),a.style.setProperty(`--chart-colour-${e}-hover`,`var(--chart-colour-${o}-hover)`)})}return!0},k=(t,r,e)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return P(t,r,e),!0;const a=r.querySelector(".chart__key");a.innerHTML="";const o=r.querySelector(".chart__guidelines");o.innerHTML="";const n=r.querySelector(".chart__yaxis");n.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(i=>{i.remove()});const{xaxis:c}=f(t);return A(t,e),T(r,e,a),K(t,o),X(t,n),c&&Y(r),!0},P=(t,r,e)=>{const a=r.querySelector(".chart__key");return a.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(o=>{o.remove()}),A(t,e),T(r,e,a),F(r),!0},N=function(t,r){const e=r.querySelector(".chart");e.addEventListener("mousemove",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest("td:not(:first-child")){const h=c.target.closest("td:not(:first-child").getBoundingClientRect(),s=c.clientX-h.left,l=c.clientY-h.top;e.setAttribute("style",`--cursor-x: ${s}px; --cursor-y: ${l}px;`)}});const a=r.querySelectorAll("label");Array.from(a).forEach(c=>{r.querySelector(`input#${c.getAttribute("for")}`).checked?c.setAttribute("part","key-checked"):c.setAttribute("part","key-unchecked")});const o=t.querySelector("table"),n=r.querySelector("table");r.addEventListener("change",function(c){const i=c.target,h=new CustomEvent("view-change",{detail:{"data-dataset":i.getAttribute("data-dataset"),label:i.getAttribute("data-label"),checked:i.checked}});t.dispatchEvent(h),Array.from(a).forEach(s=>{var l;!((l=r.querySelector(`input#${s.getAttribute("for")}`))===null||l===void 0)&&l.checked?s.setAttribute("part","key-checked"):s.setAttribute("part","key-unchecked")}),n.innerHTML=o.innerHTML,A(t,n),t.tagName=="IAM-DOUGHNUTCHART"&&F(r)})},R=function(t,r){const e=t.querySelector("table"),a=r.querySelector("table"),o=(h,s)=>{s.disconnect(),i.disconnect();for(const l of h)(l.attributeName=="class"||l.type==="attributes"||l.type==="attributes")&&(a.innerHTML=e.innerHTML,k(t,r,a));s.observe(e,{characterData:!0,subtree:!0}),i.observe(t,{attributes:!0})},n=(h,s)=>{s.disconnect(),i.disconnect();for(const l of h)(l.type=="characterData"||l.type=="childList"&&l.addedNodes.length)&&(a.innerHTML=e.innerHTML,k(t,r,a));s.observe(e,{characterData:!0,subtree:!0}),i.observe(t,{attributes:!0})},c=new MutationObserver(n),i=new MutationObserver(o);return c.observe(e,{characterData:!0,subtree:!0}),i.observe(t,{attributes:!0}),!0};function q(t,r){r>1&&(t=t-.25);const e=Math.cos(2*Math.PI*t),a=Math.sin(2*Math.PI*t);return[e*100,a*100]}const f=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),e=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,a=t.hasAttribute("data-max")?t.getAttribute("data-max"):V(t,r),o=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],n=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],c=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:e,max:a,yaxis:o,xaxis:c,guidelines:n}};function V(t,r){const e=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",a=Array.from(r.querySelectorAll(e)).map(n=>n.getAttribute("data-numeric")),o=Math.max(...a);return Math.ceil(o)}const x=function(t,r,e,a){let o=String(t);o=o.replace("\xA3",""),o=o.replace("%",""),o=o.replace(",",""),o=Number.parseFloat(o);let n=(o-r)/(e-r)*100,c=n,i=0;return a&&a!=0&&(i=(a-r)/(e-r)*100),r<0&&(i=Math.abs(r/(e-r)*100),o<0?(n=i-n,i=i-n,c=i):(n=n-i,c=n+i)),{percent:n,axis:c,bottom:i}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(o=>{let n=0;Array.from(o.querySelectorAll("td:not(:first-child)")).forEach(c=>{const i=c.cloneNode(!0);Array.from(i.querySelectorAll("*")).forEach(l=>{l.remove()});const h=parseFloat(i.textContent.replace("\xA3","").replace("%","").replace(",",""));c.setAttribute("data-numeric",h),c.setAttribute("data-value",i.textContent),getComputedStyle(c).display!="none"&&(n+=h),Array.from(c.querySelectorAll("a, button")).forEach((l,m)=>{m==0&&l.insertAdjacentHTML("beforeBegin","<hr/>"),l.classList.add("btn"),l.classList.add("btn-tertiary")})}),o.setAttribute("data-numeric",n)});const{min:e,max:a}=f(t);Array.from(r.querySelectorAll("tbody tr")).forEach((o,n)=>{const c=o.querySelector("td:first-child, th:first-child")?o.querySelector("td:first-child, th:first-child").textContent:"";o.setAttribute("part","group");const i=(o.getAttribute("data-numeric")-e)/(a-e)*100;o.style.setProperty("--percent",`${i}%`),Array.from(o.querySelectorAll("td:not([data-label])")).forEach((l,m)=>{m==0?l.setAttribute("part","xaxis-label"):l.setAttribute("part","value"),o.querySelectorAll("td").length>2&&l.setAttribute("data-label",r.querySelectorAll("thead th")[m].textContent)});const h=o.hasAttribute("data-min")?o.getAttribute("data-min"):e,s=o.hasAttribute("data-max")?o.getAttribute("data-max"):a;if(h<0){const l=Math.abs(h/(s-h)*100);t.setAttribute("style",`--min-bottom: ${l}%;`)}o.style.setProperty("--row-index",n+1),Array.from(o.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(l=>{if(getComputedStyle(l).display=="none")return;const y=l.innerHTML,g=Number.parseFloat(l.getAttribute("data-numeric")),d=Number.parseFloat(l.getAttribute("data-start"));if(l.querySelector("span[data-group]")||(l.innerHTML=`<span data-group="${c}" ${l.hasAttribute("data-label")?`data-label="${l.getAttribute("data-label")}"`:""} part="popover">${y}</span>`),!l.hasAttribute("style")){const{percent:u,bottom:v,axis:p}=x(g,h,s,d);l.setAttribute("data-percent",u),l.setAttribute("style",`--bottom:${v}%;--percent:${u}%;--axis:${p}%;`)}})})},U=function(t){const r=t.querySelector(".chart__wrapper"),e=t.querySelector(".chart__spacer span"),a=t.querySelector(".chart table");let o="";Array.from(a.querySelectorAll("tbody tr td:first-child")).forEach(n=>{typeof n.textContent<"u"&&n.textContent.length>o.length&&(o=n.textContent)}),r.setAttribute("data-longest-label",o),e.innerHTML=o},I=function(t){const r=t.querySelector(".chart__wrapper"),e=t.querySelector(".chart table");let a="";Array.from(e.querySelectorAll("tbody tr td:not(:first-child)")).forEach(o=>{typeof o.getAttribute("data-value")<"u"&&o.getAttribute("data-value").length>a.length&&(a=o.getAttribute("data-value"))}),r.setAttribute("data-longest-value",a)},T=function(t,r,e){const a=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let o;const n=Array.from(r.querySelectorAll("thead th"));return n.forEach((c,i)=>{i!=0&&(o=j(a,i,c.textContent,e,t,o)),i==50&&(n.length=i+1)}),!0};function j(t,r,e,a,o,n){var c;const i=document.createElement("input");i.setAttribute("name",`${t}-dataset-${r}`),i.setAttribute("id",`${t}-dataset-${r}`),i.setAttribute("data-dataset",`${r}`),i.setAttribute("data-label",`${e}`),i.checked=!0,i.setAttribute("type","checkbox"),r==1?o.prepend(i):o.insertBefore(i,n.nextSibling),n=i;const h=document.createElement("label");h.setAttribute("class","key btn btn-action"),h.setAttribute("for",`${t}-dataset-${r}`),h.setAttribute("data-label",`${e}`),h.setAttribute("part","key");const s=(c=o.querySelector(`tbody tr td:nth-child(${r+1})`))===null||c===void 0?void 0:c.getAttribute("data-numeric");return h.setAttribute("data-numeric",s),h.innerHTML=`${e}`,a.append(h),n}const K=function(t,r){const{min:e,max:a,yaxis:o}=f(t);let{guidelines:n}=f(t);n.length||(n=o),r.innerHTML="";for(let c=0;c<n.length;c++){const i=parseFloat(n[c].replace("\xA3","").replace("%","").replace(",","")),{axis:h}=x(i,e,a);r.innerHTML+=`<div class="guideline" style="--percent:${h}%;">${o.indexOf(n[c])!=-1?`<span>${n[c]}</span>`:""}</div>`}},X=function(t,r){const{min:e,max:a,yaxis:o}=f(t);r.innerHTML="";for(let n=0;n<o.length;n++){const c=parseFloat(o[n].replace("\xA3","").replace("%","")),{axis:i}=x(c,e,a);r.innerHTML+=`<div class="axis__point" style="--percent:${i}%;"><span>${o[n]}</span></div>`}},Y=function(t){const r=t.querySelector(".chart");let e=t.querySelector(".chart__xaxis");e||(e=document.createElement("div"),e.setAttribute("class","chart__xaxis")),r.prepend(e)},G=function(t){const r=t.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(r).forEach(e=>{const a=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;e.innerHTML=`<button class="tooltip" popovertarget="${a}" part="tooltip" style="anchor-name: --${a};">${e.textContent}</button><span id="${a}" style="position-anchor: --${a};" popover part="tooltip__content" class="tooltip__content">${e.getAttribute("title")}</span>`})},F=function(t){let r="";const e=t.querySelector(".chart");let a=t.querySelector(".doughnuts");a||(a=document.createElement("div"),a.setAttribute("class","doughnuts"),e.append(a)),Array.from(e.querySelectorAll("tbody tr")).forEach((o,n)=>{let c="",i="",h=0,s=0;const m=o.querySelectorAll("td")[0].innerHTML;let y=0;const g=o.getAttribute("data-numeric");Array.from(o.querySelectorAll("td")).forEach((d,u)=>{const v=getComputedStyle(d).display;if(u!=0&&v!="none"){let p=d.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),s+=p,y++}}),Array.from(o.querySelectorAll("td")).forEach((d,u)=>{var v,p;const _=getComputedStyle(d).display;if(u!=0&&y==1&&_!="none")c+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${d.getAttribute("style")} --path-index: ${u};"></path>`,i+=`<span class="h5 mb-0" part="popover">${L(M(d.getAttribute("data-label"))).trim()}<br/>${d.hasAttribute("data-second")?`${d.getAttribute("data-second-label")}: ${d.getAttribute("data-second")}<br/>`:""}${(v=d.querySelector('[part="popover"]'))===null||v===void 0?void 0:v.innerHTML}</span>`;else if(u!=0){let b=d.getAttribute("data-numeric");const H=_=="none"?"display: none;":"";b=b.replace("\xA3",""),b=b.replace("%",""),b=b.replace(",",""),b=Number.parseInt(b);const w=b/s,[z,$]=q(h,y),[S,C]=q(h+w,y),D=w>.5?1:0,B=["M 0 0",`L ${z?z.toFixed(0):0} ${$?$.toFixed(0):0}`,`A 100 100 0 ${D} 1 ${S?S.toFixed(0):0} ${C?C.toFixed(0):0}`,"L 0 0"].join(" ");c+=`<path d="${B}" style="${d.getAttribute("style")} --path-index: ${u};${H}"></path>`,i+=`<span class="h5 mb-0" part="popover">${L(M(d.getAttribute("data-label"))).trim()}<br/>${d.hasAttribute("data-second")?`${d.getAttribute("data-second-label")}: ${d.getAttribute("data-second")}<br/>`:""}${(p=d.querySelector('[part="popover"]'))===null||p===void 0?void 0:p.innerHTML}</span>`,_!="none"&&(h+=w)}}),r+=`<div class="doughnut">
5
5
  <svg viewBox="-105 -105 210 210" preserveAspectRatio="none" style="--row-index: ${n+1};">${c}</svg>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"bento-grid"});class n extends HTMLElement{constructor(){var o;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const P=T=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:T})},Y=(T,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(a=>{T.addEventListener(a,function(e){const r={event:a,element:t,target:e.target};Object.keys(e.detail).forEach(l=>{const d=e.detail[l];r[l]=d}),window.dataLayer.push(r)})}),!0),R=(T=1)=>Math.floor(Math.random()*Date.now()*(T+1));P("iam-calendar");class I extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=`<table class="table--day" role="presentation"><tbody>
5
5
  <tr class="allday"><th>All day</th></tr>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const g=s=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:s})},h=(s,r,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:r}),a.forEach(t=>{s.addEventListener(t,function(c){const d={event:t,element:r,target:c.target};Object.keys(c.detail).forEach(p=>{const o=c.detail[p];d[p]=o}),window.dataLayer.push(d)})}),!0),u=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=function(e){const t=[];return Array.from(e.querySelectorAll(":scope > div")).forEach((n,o)=>{n.hasAttribute("data-thumbnail")&&(t[o]=n.getAttribute("data-thumbnail"))}),t},W=function(e,t){const n=e.querySelectorAll(":scope > div").length;let o="";for(let a=1;a<=n;a++){let r=null,s="";t.length&&t[a-1]?(s="has-thumbnail",r=`<img src="${t[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,o+=`<button class="control-${a} ${s}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return o},x=function(e,t){return t==1?e:Math.ceil(e/t)*t-t+1},z=function(e,t){return(e-1)/(t-1)*100},$=function(e){let t;const n=e.shadowRoot.querySelector(".carousel"),o=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),s=e.querySelectorAll(":scope > div").length;let p=o.clientWidth,y=e.querySelector(":scope > div").scrollWidth,v=Math.round(p/y);r.setAttribute("min",1),r.setAttribute("step",v);let h=x(s,v);r.setAttribute("max",h),r.value=1;let b=z(1,h);r.style.setProperty("--percent",b+"%");let f,A="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(A="touchend",L="touchstart"),o.addEventListener("scroll",function(){clearTimeout(t),t=setTimeout(function(){const c=o.clientWidth,i=o.scrollWidth,m=o.scrollLeft;let l=Math.round(m/i*s)+1;const g=e.querySelector(":scope > div").scrollWidth,w=e.querySelector(":scope > div:last-child").offsetLeft,_=o.scrollLeft+c+o.getBoundingClientRect().left>=w+60,u=Math.round(c/g),k=Math.ceil(s/u)*u-s;r.setAttribute("step",u),k>0&&_&&(l=Math.floor(s/u)*u+1),Array.from(n.querySelectorAll(".carousel__controls button")).forEach(d=>{d.removeAttribute("aria-current")}),n.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?n.querySelector(".btn-prev").setAttribute("disabled","disabled"):n.querySelector(".btn-prev").removeAttribute("disabled"),l>s-u?n.querySelector(".btn-next").setAttribute("disabled","disabled"):n.querySelector(".btn-next").removeAttribute("disabled"),r.value=l,h=x(s,u),r.setAttribute("max",h),b=l/h*100,b=z(l,h),r.style.setProperty("--percent",b+"%")},100)},!1),a.addEventListener("click",function(c){for(let i=c.target;i&&i!=this;i=i.parentNode)if(typeof i.matches=="function"&&i.matches("button")){c.preventDefault(),Array.from(a.querySelectorAll("button")).forEach(g=>{g.removeAttribute("aria-current")}),i.setAttribute("aria-current",!0);const m=new CustomEvent("pip-clicked",{detail:{slide:i.getAttribute("data-slide")}});e.dispatchEvent(m);const l=e.querySelector(`:scope > *:nth-child(${i.getAttribute("data-slide")})`);o.scroll({top:0,left:l.offsetLeft-o.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(c){const i=o.clientWidth,m=e.querySelector(":scope > div").scrollWidth,l=Math.round(i/m),g=e.querySelector(":scope > div:last-child").offsetLeft,w=o.scrollLeft+i+o.getBoundingClientRect().left>=g+60,_=Math.ceil(s/l)*l-s,u=l-_,k=w&&_>0?u*m:o.clientWidth;for(let d=c.target;d&&d!=this;d=d.parentNode)if(typeof d.matches=="function"&&d.matches(".btn-next, .btn-prev")){const S=d.matches(".btn-next")?"next":"prev",E=new CustomEvent(`${S}-clicked`,{detail:{slide:d.getAttribute("data-go")}});e.dispatchEvent(E),c.preventDefault();const q=d.classList.contains("btn-prev")?o.scrollLeft-k:o.scrollLeft+o.clientWidth;o.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(){clearInterval(f),f=setInterval(function(){p=o.clientWidth,y=e.querySelector(":scope > div").scrollWidth,v=Math.round(p/y),r.setAttribute("step",v),h=x(s,v),r.setAttribute("max",h),b=z(r.value,h),r.style.setProperty("--percent",b+"%")},10)}),r.addEventListener(A,function(){clearInterval(f)}),r.addEventListener("change",function(){clearInterval(f);const c=e.querySelector(`:scope > *:nth-child(${r.value})`);o.scroll({top:0,left:c?c.offsetLeft-o.getBoundingClientRect().left:0,behavior:"smooth"});const i=new CustomEvent("slider-changed",{detail:{slide:r.value}});e.dispatchEvent(i)},!1)},P=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},I=(e,t,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),n.forEach(o=>{e.addEventListener(o,function(a){const r={event:o,element:t,target:a.target};Object.keys(a.detail).forEach(s=>{const p=a.detail[s];r[s]=p}),window.dataLayer.push(r)})}),!0);P("iam-carousel");class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class m extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */class s extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Dark mode button"});class a extends HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>::slotted(.toggle):after{--icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3e%3c!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license %28Commercial License%29 Copyright 2025 Fonticons, Inc.--%3e%3cpath d='M296 552L296 496C296 482.7 306.7 472 320 472C333.3 472 344 482.7 344 496L344 552C344 565.3 333.3 576 320 576C306.7 576 296 565.3 296 552zM296 144L296 88C296 74.7 306.7 64 320 64C333.3 64 344 74.7 344 88L344 144C344 157.3 333.3 168 320 168C306.7 168 296 157.3 296 144zM139 139C148.4 129.6 163.6 129.6 172.9 139L212.5 178.6C221.9 188 221.9 203.2 212.5 212.5C203.1 221.8 187.9 221.9 178.6 212.5L139 172.9C129.6 163.5 129.6 148.3 139 139zM427.5 427.5C436.9 418.1 452.1 418.1 461.4 427.5L501 467.1C510.4 476.5 510.4 491.7 501 501C491.6 510.3 476.4 510.4 467.1 501L427.5 461.4C418.1 452 418.1 436.8 427.5 427.5zM64 320C64 306.7 74.7 296 88 296L144 296C157.3 296 168 306.7 168 320C168 333.3 157.3 344 144 344L88 344C74.7 344 64 333.3 64 320zM472 320C472 306.7 482.7 296 496 296L552 296C565.3 296 576 306.7 576 320C576 333.3 565.3 344 552 344L496 344C482.7 344 472 333.3 472 320zM139 501C129.6 491.6 129.6 476.4 139 467.1L178.6 427.5C188 418.1 203.2 418.1 212.5 427.5C221.8 436.9 221.9 452.1 212.5 461.4L172.9 501C163.5 510.4 148.3 510.4 139 501zM427.5 212.5C418.1 203.1 418.1 187.9 427.5 178.6L467.1 139C476.5 129.6 491.7 129.6 501 139C510.3 148.4 510.4 163.6 501 172.9L461.4 212.5C452 221.9 436.8 221.9 427.5 212.5zM384 320C384 284.7 355.3 256 320 256C284.7 256 256 284.7 256 320C256 355.3 284.7 384 320 384C355.3 384 384 355.3 384 320zM208 320C208 258.1 258.1 208 320 208C381.9 208 432 258.1 432 320C432 381.9 381.9 432 320 432C258.1 432 208 381.9 208 320z'/%3e%3c/svg%3e");background:var(--colour-primary-theme);mask-image:var(--icon);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%;z-index:2}::slotted(.toggle.dark-theme):after{--icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3e%3c!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license %28Commercial License%29 Copyright 2025 Fonticons, Inc.--%3e%3cpath d='M503.8 153.8C504.8 157.4 508.2 160 512 160C515.8 160 519.1 157.5 520.2 153.8L531.2 115.2L569.8 104.2C573.4 103.2 576 99.8 576 96C576 92.2 573.5 88.9 569.8 87.8L531.2 76.8L520.2 38.2C519.2 34.6 515.8 32 512 32C508.2 32 504.9 34.5 503.8 38.2L492.8 76.8L454.2 87.8C450.6 88.8 448 92.2 448 96C448 99.8 450.5 103.1 454.2 104.2L492.8 115.2L503.8 153.8zM288 128C164.3 128 64 228.3 64 352C64 475.7 164.3 576 288 576C348.2 576 402.9 552.2 443.1 513.6C449.5 507.5 451.3 497.9 447.7 489.8C444.1 481.7 435.7 476.8 426.9 477.5C422.6 477.8 418.3 478 414 478C325.1 478 253 405.9 253 317C253 253.9 289.3 199.2 342.3 172.8C350.2 168.8 354.9 160.3 353.8 151.5C352.7 142.7 346.2 135.5 337.6 133.5C321.6 129.9 305 128 288 128zM419.2 332.8L435.8 390.8C437.4 396.3 442.4 400 448 400C453.6 400 458.7 396.2 460.2 390.8L476.8 332.8L534.8 316.2C540.3 314.6 544 309.6 544 304C544 298.4 540.2 293.3 534.8 291.8L476.8 275.2L460.2 217.2C458.6 211.7 453.6 208 448 208C442.4 208 437.3 211.8 435.8 217.2L419.2 275.2L361.2 291.8C355.7 293.4 352 298.4 352 304C352 309.6 355.8 314.7 361.2 316.2L419.2 332.8z'/%3e%3c/svg%3e")}/*# sourceMappingURL=assets/css/components/darkmode.component.css.map */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=t=>t.charAt(0).toUpperCase()+t.slice(1),L=t=>t.replace(/_/g," "),E=(t,r)=>{for(let a=1;a<=10;a++){if(t.hasAttribute(`data-colour-${a}`)){const i=t.getAttribute(`data-colour-${a}`);t.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${i})`),t.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${i}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${a}]`)).forEach(i=>{const o=i.getAttribute(`data-colour-${a}`);i.style.setProperty(`--chart-colour-${a}-set`,`var(--chart-colour-${o})`),i.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${o}-hover)`)})}return!0},w=(t,r,a)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return P(t,r,a),!0;const i=r.querySelector(".chart__key");i.innerHTML="";const o=r.querySelector(".chart__guidelines");o.innerHTML="";const n=r.querySelector(".chart__yaxis");n.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(c=>{c.remove()});const{xaxis:e}=m(t);return A(t,a),T(r,a,i),j(t,o),I(t,n),e&&X(r),!0},P=(t,r,a)=>{const i=r.querySelector(".chart__key");return i.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(o=>{o.remove()}),A(t,a),T(r,a,i),F(r),!0},R=function(t,r){const a=r.querySelector(".chart");a.addEventListener("mousemove",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("td:not(:first-child")){const l=e.target.closest("td:not(:first-child").getBoundingClientRect(),s=e.clientX-l.left,h=e.clientY-l.top;a.setAttribute("style",`--cursor-x: ${s}px; --cursor-y: ${h}px;`)}});const i=r.querySelectorAll("label");Array.from(i).forEach(e=>{r.querySelector(`input#${e.getAttribute("for")}`).checked?e.setAttribute("part","key-checked"):e.setAttribute("part","key-unchecked")});const o=t.querySelector("table"),n=r.querySelector("table");r.addEventListener("change",function(e){const c=e.target,l=new CustomEvent("view-change",{detail:{"data-dataset":c.getAttribute("data-dataset"),label:c.getAttribute("data-label"),checked:c.checked}});t.dispatchEvent(l),Array.from(i).forEach(s=>{var h;!((h=r.querySelector(`input#${s.getAttribute("for")}`))===null||h===void 0)&&h.checked?s.setAttribute("part","key-checked"):s.setAttribute("part","key-unchecked")}),n.innerHTML=o.innerHTML,A(t,n),t.tagName=="IAM-DOUGHNUTCHART"&&F(r)})},N=function(t,r){const a=t.querySelector("table"),i=r.querySelector("table"),o=(l,s)=>{s.disconnect(),c.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(i.innerHTML=a.innerHTML,w(t,r,i));s.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},n=(l,s)=>{s.disconnect(),c.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(i.innerHTML=a.innerHTML,w(t,r,i));s.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},e=new MutationObserver(n),c=new MutationObserver(o);return e.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0}),!0};function q(t,r){r>1&&(t=t-.25);const a=Math.cos(2*Math.PI*t),i=Math.sin(2*Math.PI*t);return[a*100,i*100]}const m=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),a=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,i=t.hasAttribute("data-max")?t.getAttribute("data-max"):U(t,r),o=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],n=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],e=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:a,max:i,yaxis:o,xaxis:e,guidelines:n}};function U(t,r){const a=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",i=Array.from(r.querySelectorAll(a)).map(n=>n.getAttribute("data-numeric")),o=Math.max(...i);return Math.ceil(o)}const x=function(t,r,a,i){let o=String(t);o=o.replace("\xA3",""),o=o.replace("%",""),o=o.replace(",",""),o=Number.parseFloat(o);let n=(o-r)/(a-r)*100,e=n,c=0;return i&&i!=0&&(c=(i-r)/(a-r)*100),r<0&&(c=Math.abs(r/(a-r)*100),o<0?(n=c-n,c=c-n,e=c):(n=n-c,e=n+c)),{percent:n,axis:e,bottom:c}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(o=>{let n=0;Array.from(o.querySelectorAll("td:not(:first-child)")).forEach(e=>{const c=e.cloneNode(!0);Array.from(c.querySelectorAll("*")).forEach(h=>{h.remove()});const l=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));e.setAttribute("data-numeric",l),e.setAttribute("data-value",c.textContent),getComputedStyle(e).display!="none"&&(n+=l),Array.from(e.querySelectorAll("a, button")).forEach((h,b)=>{b==0&&h.insertAdjacentHTML("beforeBegin","<hr/>"),h.classList.add("btn"),h.classList.add("btn-tertiary")})}),o.setAttribute("data-numeric",n)});const{min:a,max:i}=m(t);Array.from(r.querySelectorAll("tbody tr")).forEach((o,n)=>{const e=o.querySelector("td:first-child, th:first-child")?o.querySelector("td:first-child, th:first-child").textContent:"";o.setAttribute("part","group");const c=(o.getAttribute("data-numeric")-a)/(i-a)*100;o.style.setProperty("--percent",`${c}%`),Array.from(o.querySelectorAll("td:not([data-label])")).forEach((h,b)=>{b==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),o.querySelectorAll("td").length>2&&h.setAttribute("data-label",r.querySelectorAll("thead th")[b].textContent)});const l=o.hasAttribute("data-min")?o.getAttribute("data-min"):a,s=o.hasAttribute("data-max")?o.getAttribute("data-max"):i;if(l<0){const h=Math.abs(l/(s-l)*100);t.setAttribute("style",`--min-bottom: ${h}%;`)}o.style.setProperty("--row-index",n+1),Array.from(o.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(h=>{if(getComputedStyle(h).display=="none")return;const g=h.innerHTML,_=Number.parseFloat(h.getAttribute("data-numeric")),d=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${e}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${g}</span>`),!h.hasAttribute("style")){const{percent:v,bottom:y,axis:p}=x(_,l,s,d);h.setAttribute("data-percent",v),h.setAttribute("style",`--bottom:${y}%;--percent:${v}%;--axis:${p}%;`)}})})},T=function(t,r,a){const i=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let o;const n=Array.from(r.querySelectorAll("thead th"));return n.forEach((e,c)=>{c!=0&&(o=V(i,c,e.textContent,a,t,o)),c==50&&(n.length=c+1)}),!0};function V(t,r,a,i,o,n){var e;const c=document.createElement("input");c.setAttribute("name",`${t}-dataset-${r}`),c.setAttribute("id",`${t}-dataset-${r}`),c.setAttribute("data-dataset",`${r}`),c.setAttribute("data-label",`${a}`),c.checked=!0,c.setAttribute("type","checkbox"),r==1?o.prepend(c):o.insertBefore(c,n.nextSibling),n=c;const l=document.createElement("label");l.setAttribute("class","key btn btn-action"),l.setAttribute("for",`${t}-dataset-${r}`),l.setAttribute("data-label",`${a}`),l.setAttribute("part","key");const s=(e=o.querySelector(`tbody tr td:nth-child(${r+1})`))===null||e===void 0?void 0:e.getAttribute("data-numeric");return l.setAttribute("data-numeric",s),l.innerHTML=`${a}`,i.append(l),n}const j=function(t,r){const{min:a,max:i,yaxis:o}=m(t);let{guidelines:n}=m(t);n.length||(n=o),r.innerHTML="";for(let e=0;e<n.length;e++){const c=parseFloat(n[e].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=x(c,a,i);r.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${o.indexOf(n[e])!=-1?`<span>${n[e]}</span>`:""}</div>`}},I=function(t,r){const{min:a,max:i,yaxis:o}=m(t);r.innerHTML="";for(let n=0;n<o.length;n++){const e=parseFloat(o[n].replace("\xA3","").replace("%","")),{axis:c}=x(e,a,i);r.innerHTML+=`<div class="axis__point" style="--percent:${c}%;"><span>${o[n]}</span></div>`}},X=function(t){const r=t.querySelector(".chart");let a=t.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),r.prepend(a)},F=function(t){let r="";const a=t.querySelector(".chart");let i=t.querySelector(".doughnuts");i||(i=document.createElement("div"),i.setAttribute("class","doughnuts"),a.append(i)),Array.from(a.querySelectorAll("tbody tr")).forEach((o,n)=>{let e="",c="",l=0,s=0;const b=o.querySelectorAll("td")[0].innerHTML;let g=0;const _=o.getAttribute("data-numeric");Array.from(o.querySelectorAll("td")).forEach((d,v)=>{const y=getComputedStyle(d).display;if(v!=0&&y!="none"){let p=d.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),s+=p,g++}}),Array.from(o.querySelectorAll("td")).forEach((d,v)=>{var y,p;const f=getComputedStyle(d).display;if(v!=0&&g==1&&f!="none")e+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${d.getAttribute("style")} --path-index: ${v};"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(L(d.getAttribute("data-label"))).trim()}<br/>${d.hasAttribute("data-second")?`${d.getAttribute("data-second-label")}: ${d.getAttribute("data-second")}<br/>`:""}${(y=d.querySelector('[part="popover"]'))===null||y===void 0?void 0:y.innerHTML}</span>`;else if(v!=0){let u=d.getAttribute("data-numeric");const H=f=="none"?"display: none;":"";u=u.replace("\xA3",""),u=u.replace("%",""),u=u.replace(",",""),u=Number.parseInt(u);const k=u/s,[$,z]=q(l,g),[C,S]=q(l+k,g),D=k>.5?1:0,B=["M 0 0",`L ${$?$.toFixed(0):0} ${z?z.toFixed(0):0}`,`A 100 100 0 ${D} 1 ${C?C.toFixed(0):0} ${S?S.toFixed(0):0}`,"L 0 0"].join(" ");e+=`<path d="${B}" style="${d.getAttribute("style")} --path-index: ${v};${H}"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(L(d.getAttribute("data-label"))).trim()}<br/>${d.hasAttribute("data-second")?`${d.getAttribute("data-second-label")}: ${d.getAttribute("data-second")}<br/>`:""}${(p=d.querySelector('[part="popover"]'))===null||p===void 0?void 0:p.innerHTML}</span>`,f!="none"&&(l+=k)}}),r+=`<div class="doughnut">
5
5
  <svg viewBox="-105 -105 210 210" preserveAspectRatio="none" style="--row-index: ${n+1};">${e}</svg>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function f(l,a){const s=a.querySelector(".files"),r=a.querySelector(".drop-area"),e=l.querySelector("input"),b=l.hasAttribute("data-maxsize")?l.getAttribute("data-maxsize"):0,h=a.querySelector(".invalid-feedback.size"),u=a.querySelector(".invalid-feedback.ext"),o=e.cloneNode();r.append(o);const g=function(t){if(!e.hasAttribute("accept"))return!0;const i=t.split(".").pop();return!!e.getAttribute("accept").includes(i)};if(a.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(u.classList.remove("d-block"),h.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const i=new DataTransfer,{files:c}=e,n=t.target.closest(".files button");for(let p=0;p<c.length;p++){const v=c[p];v.name!=n.getAttribute("data-file")&&i.items.add(v)}e.files=i.files;const m=new Event("change");e.dispatchEvent(m);const d=new CustomEvent("fileRemoved",{detail:{removedFile:n?.dataset.file}});l.dispatchEvent(d)}}),o.addEventListener("change",()=>{if(e.hasAttribute("multiple")){const i=[...e.files,...o.files],c=[],n=new DataTransfer;for(let m=0;m<i.length;m++){const d=i[m],p=d.size/1e3;!c.includes(d.name)&&(b==0||p<b)&&g(d.name)&&n.items.add(d),g(d.name)||u.classList.add("d-block"),p>b&&h.classList.add("d-block"),c.push(d.name)}e.files=n.files}else e.files=o.files;const t=new Event("change");e.dispatchEvent(t)}),o.addEventListener("dragenter",()=>{o.classList.add("focus")}),o.addEventListener("dragleave",()=>{o.classList.remove("focus")}),o.addEventListener("drop",()=>{o.classList.remove("focus")}),e.addEventListener("change",()=>{if(e.files.length==1){const i=e.files[0],c=i.size/1e3;if(!g(i.name)){u.classList.add("d-block");const n=new DataTransfer;e.files=n.files}if(c>b){h.classList.add("d-block");const n=new DataTransfer;e.files=n.files}}s.innerHTML="";for(const i of e.files)s.innerHTML+=`<span class="file" part="file">${i.name} <button data-file="${i.name}" part="file__remove">Remove</button></span>`;const t=new CustomEvent("elementchange",{detail:{files:e.files}});if(l.dispatchEvent(t),e.files.length==0){const i=new CustomEvent("empty");l.dispatchEvent(i)}}),l.hasAttribute("data-filename")){const t=l.getAttribute("data-filename");t&&(s.innerHTML=`<span class="file" part="file">${t} <button data-file="${t}" part="file__remove">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const h=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},p=(a,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(e=>{a.addEventListener(e,function(i){const r={event:e,element:t,target:i.target};Object.keys(i.detail).forEach(d=>{const s=i.detail[d];r[d]=s}),window.dataLayer.push(r)})}),!0),g=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function r(s,t){i(s,t)}function i(s,t){let e;t.addEventListener("keyup",()=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",()=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach(e=>{const a=e.textContent.toLowerCase();e.classList.add("d-none"),a.includes(t.toLowerCase())&&e.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:t})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class n extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class r extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class v extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const w=m=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:m})};w("iam-iamPrefix");class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const n=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})};n("iam-iamPrefix");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class e extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */class p extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const l=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},m=(t,n,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),a.forEach(e=>{t.addEventListener(e,function(s){const d={event:e,element:n,target:s.target};Object.keys(s.detail).forEach(o=>{const i=s.detail[o];d[o]=i}),window.dataLayer.push(d)})}),!0),p=function(t){const n=t.dataset.status;if(!n)return;const a=t.shadowRoot.querySelector(".milestone-wrap"),e=document.createElement("span");e.setAttribute("part","status"),e.classList.add("milestone-status"),e.innerHTML=`${n} Step`,n==="Current"&&t.classList.add("current"),a.insertAdjacentElement("afterbegin",e)},u=function(t){const n=t.shadowRoot.querySelector(".task-wrap"),a=t.dataset.items?JSON.parse(t.dataset.items):[];a.length&&(a.forEach(e=>{const s=document.createElement("details"),d=document.createElement("summary"),o=document.createElement("div"),i=document.createElement("p");o.classList.add("task-details"),d.innerHTML=e.name,e.date_completed&&d.classList.add("complete"),s.appendChild(d),e.description&&(i.innerHTML=e.description,o.appendChild(i)),e.actions.length&&o.appendChild(h(e.actions,d)),s.appendChild(o),n.insertAdjacentElement("beforeend",s),s.addEventListener("click",()=>{s?.hasAttribute("open")?r("milestone-item-closed",e.name,t):r("milestone-item-opened",e.name,t)})}),t.appendChild(n))},r=function(t,n,a){const e=new CustomEvent(t,{detail:{title:n}});a.dispatchEvent(e)},h=function(t,n){const a=document.createElement("ul"),e=t.length,d=t.filter(o=>o.date_completed).length||0;if(!(e<1))return n.innerHTML+=` (${d}/${e})`,t.forEach(o=>{const i=document.createElement("li"),c=document.createElement("span");o.date_completed&&(i.classList.add("complete"),c.classList.add("action-date"),c.innerHTML=o.date_completed),i.innerHTML=o.action,i.appendChild(c),a.appendChild(i)}),a},w=function(t){p(t),u(t)};l("iam-milestone");class L extends HTMLElement{constructor(){var n;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const r=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},l=(t,s,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:s}),e.forEach(n=>{t.addEventListener(n,function(o){const a={event:n,element:s,target:o.target};Object.keys(o.detail).forEach(i=>{const d=o.detail[i];a[i]=d}),window.dataLayer.push(a)})}),!0),u=function(t){if(!t.dataset.showAllToggle)return;const e=document.createElement("button");e.innerHTML="Show next steps",e.classList.add("btn","btn-tertiary","show-all-toggle"),t.appendChild(e),e.addEventListener("click",()=>{t.classList.contains("show-all")?(e.innerHTML="Show next steps",t.classList.remove("show-all"),c("hide-future-items",t)):(e.innerHTML="Hide next steps",t.classList.add("show-all"),c("show-future-items",t))})},c=function(t,s){const e=new CustomEvent(t,{});s.dispatchEvent(e)},h=function(t){u(t)};r("iam-milestone-group");class m extends HTMLElement{constructor(){var s;super();const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const u=h=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:h})};u("iam-card");class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const g=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})},y=(c,e,u)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),u.forEach(l=>{c.addEventListener(l,function(i){const n={event:l,element:e,target:i.target};Object.keys(i.detail).forEach(d=>{const t=i.detail[d];n[d]=t}),window.dataLayer.push(n)})}),!0);g("iam-multi-step");class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const z=g=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:g})},E=(g,i,c)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:i}),c.forEach(d=>{g.addEventListener(d,function(e){const n={event:d,element:i,target:e.target};Object.keys(e.detail).forEach(a=>{const m=e.detail[a];n[a]=m}),window.dataLayer.push(n)})}),!0);z("iam-multi-step-modal");class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import k from"js-cookie";var w=function(v,e,m,r){function i(h){return h instanceof m?h:new m(function(d){d(h)})}return new(m||(m=Promise))(function(h,d){function u(c){try{s(r.next(c))}catch(p){d(p)}}function g(c){try{s(r.throw(c))}catch(p){d(p)}}function s(c){c.done?h(c.value):i(c.value).then(u,g)}s((r=r.apply(v,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class x extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class g extends HTMLElement{constructor(){super();const d=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function m(i){if(i.hasAttribute("data-type")&&i.getAttribute("data-type")=="toast"){let t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),i.closest(".notification__holder")||t.appendChild(i)}if(i.setAttribute("role","alert"),i.addEventListener("click",function(t){event&&event.target instanceof HTMLElement&&(event.target.closest("[data-dismiss-button]")||event.target.matches("[data-dismiss-button]"))&&(t.preventDefault(),f(i))},!1),i.hasAttribute("data-timeout")){const t=i.getAttribute("data-timeout"),o=new u(function(){f(i)},t);i.addEventListener("mouseenter",()=>{o.pause()}),i.addEventListener("mouseleave",()=>{o.resume()})}}function u(i,t){let o,e,n=t;this.pause=function(){window.clearTimeout(o),n-=new Date-e},this.resume=function(){e=new Date,window.clearTimeout(o),o=window.setTimeout(i,n)},this.resume()}const f=function(i){i.classList.add("d-none")},h=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})},b=(i,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(e=>{i.addEventListener(e,function(n){const a={event:e,element:t,target:n.target};Object.keys(n.detail).forEach(s=>{const c=n.detail[s];a[s]=c}),window.dataLayer.push(a)})}),!0);h("iam-notification");class p extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -175,7 +175,6 @@ class iamPagination extends HTMLElement {
175
175
  case 'data-page': {
176
176
  if (oldVal && oldVal != newVal) {
177
177
  this.setup();
178
- console.log(newVal);
179
178
  // Dispact the event for other components to use as triggers
180
179
  this.dispatchEvent(new CustomEvent('update-page', { detail: { page: newVal } }));
181
180
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.5.1--beta7
2
+ * iamKey v7.5.1--beta9
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -41,5 +41,5 @@
41
41
  `,this.shadowRoot.appendChild(a.content.cloneNode(!0))}connectedCallback(){const a=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",15),this.hasAttribute("data-page")||this.setAttribute("data-page",a.has("page")?a.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",a.has("show")?a.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));const n=this.shadowRoot.querySelector(".page-jump select"),t=this.shadowRoot.querySelector(".prev"),l=this.shadowRoot.querySelector(".next"),d=this.shadowRoot.querySelector(".per-page select"),r=this.shadowRoot.querySelector(".load-more");this.setup(),n.addEventListener("change",i=>{this.setAttribute("data-show",this.getAttribute("data-increment")),this.setAttribute("data-page",i.target.value)}),l.addEventListener("click",()=>{console.log(parseInt(this.getAttribute("data-page"))),this.setAttribute("data-page",parseInt(this.getAttribute("data-page"))+1)}),t.addEventListener("click",()=>{this.setAttribute("data-page",parseInt(this.getAttribute("data-page"))-1)}),d.addEventListener("change",i=>{this.setAttribute("data-increment",i.target.value)});const p=parseInt(this.getAttribute("data-increment")),o=parseInt(this.getAttribute("data-show"));o>=parseInt(this.getAttribute("data-total"))&&r.remove(),r.addEventListener("click",()=>{const i=o+p;this.setAttribute("data-show",i),i>parseInt(this.getAttribute("data-total"))&&r.remove()})}setup(){const a=this.shadowRoot.querySelector(".pagination"),n=this.shadowRoot.querySelector(".page-jump select"),t=this.shadowRoot.querySelector(".prev"),l=this.shadowRoot.querySelector(".next"),d=this.shadowRoot.querySelector(".item-count"),r=this.shadowRoot.querySelector(".per-page select"),p=this.shadowRoot.querySelector(".total-pages"),o=parseInt(this.getAttribute("data-page")),i=parseInt(this.getAttribute("data-total")),c=parseInt(this.getAttribute("data-show")),e=parseInt(this.getAttribute("data-increment")),m=Math.ceil(i/e);i>c&&a.classList.remove("d-none");let b="";for(let s=1;s<=m;s++)b+=`<option value="${s}" ${s==o?"selected":""}>${s}</option>`;n.innerHTML=b,p.innerHTML=`of ${m}`,o==m?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled"),o==1?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled");const u=o==1?1:(o-1)*c+1,h=o==1?c:o*c;d.innerHTML=`${u} - ${h>i?i:h} of ${i} items`;const g=[15,25,40,50];e&&r.value!=e&&!g.includes(e)&&(r.innerHTML=`<option value="${e}">${e}</option>
42
42
  <option value="${e*2}">${e*2}</option>
43
43
  <option value="${e*3}">${e*3}</option>
44
- <option value="${e*4}">${e*4}</option>`),r.value=e}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(a,n,t){switch(a){case"data-total":{n!=t&&this.setup();break}case"data-show":{n!=t&&(this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:t}})));break}case"data-increment":{n!=t&&(this.setAttribute("data-show",t),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:t}})));break}case"data-page":{n&&n!=t&&(this.setup(),console.log(t),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:t}})));break}}}}export{v as default};
44
+ <option value="${e*4}">${e*4}</option>`),r.value=e}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(a,n,t){switch(a){case"data-total":{n!=t&&this.setup();break}case"data-show":{n!=t&&(this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:t}})));break}case"data-increment":{n!=t&&(this.setAttribute("data-show",t),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:t}})));break}case"data-page":{n&&n!=t&&(this.setup(),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:t}})));break}}}}export{v as default};
45
45
  //# sourceMappingURL=pagination.component.min.js.map