@iamproperty/components 7.2.1--beta3 → 7.2.1--beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js +1 -1
- package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
- package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/menu/menu.component.min.js +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.js +9 -10
- package/assets/js/components/rankings/rankings.component.min.js +4 -4
- package/assets/js/components/rankings/rankings.component.min.js.map +1 -1
- package/assets/js/components/record-card/record-card.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/table-ajax/table-ajax.component.min.js +1 -1
- package/assets/js/components/table-basic/table-basic.component.min.js +1 -1
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js +1 -1
- package/assets/js/components/table-submit/table-submit.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/ts/components/rankings/rankings.component.ts +4 -4
- package/dist/components.es.js +17 -17
- package/dist/components.umd.js +17 -17
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class a extends HTMLElement{constructor(){var t;super(),this.attachShadow({mode:"open"});const e=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"):`${e}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const B=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach(t=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),R(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){const o=t.target.closest("[data-modal]"),d=o.hasAttribute("data-modal")?o.getAttribute("data-modal"):o.getAttribute("data-filter"),m=document.querySelector(`dialog#${d}`);if(R(m),m.showModal(),m.focus(),!m.querySelector("iam-multi-step")){const s=m.offsetWidth;m.setAttribute("style",`max-width: ${s}px;`)}Array.from(m.querySelectorAll("[data-duplicate]")).forEach(s=>{const g=s.getAttribute("data-duplicate"),b=document.getElementById(g);if(s.checked!=b.checked){s.checked=b.checked;const f=new Event("change");s.dispatchEvent(f)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:d})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){const o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(m=>{m.classList.remove("active")});const d=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:o.id}});t.target.dispatchEvent(d),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){const o=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(d=>{d.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){let o=t.target.closest("dialog[open]");if(window.getComputedStyle(o).display==="contents"&&(o=o.parentNode.closest("dialog[open]")),!o.classList.contains("dialog--transactional")&&!o.classList.contains("dialog--acknowledgement")){const m=o.getBoundingClientRect();(t.clientX<m.left||t.clientX>m.right||t.clientY<m.top||t.clientY>m.bottom)&&(t.target.closest("dialog *")||o.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();const o=t.target.closest(".dialog__wrapper > button"),d=o.parentNode;let m="openPopover";const s=d.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=s&&o.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(k=>{k.removeAttribute("aria-expanded")}),s.hasAttribute("open"))s.close(),m="closePopover",s.removeAttribute("style"),o.removeAttribute("aria-expanded");else{s.show(),o.setAttribute("aria-expanded",!0);const k=o.getBoundingClientRect();let S=k.top,w=k.left;if(o.closest("iam-table")){const y=o.closest("iam-table").parentNode.getBoundingClientRect();S-=y.top,w-=y.left}s.classList.contains("dialog--fix")&&s.setAttribute("style",`position:fixed;top: ${S}px; left: ${w}px; margin: 3rem 0 0 0;`)}let g=s.getBoundingClientRect();const b=g.bottom-window.scrollY,f=window.innerHeight-window.scrollY;if(b>f){const k=s.hasAttribute("style")?s.getAttribute("style")+" ":"";s.setAttribute("style",k+"transform: translate(0, calc(-100% - 4rem))"),g=s.getBoundingClientRect(),g.top-window.scrollY<100&&s.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:m,id:o.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach(o=>{o.removeAttribute("aria-expanded")}))}),null),R=r=>{if(!r.querySelector(":scope .mh-lg")&&!r.querySelector("iam-multi-step")){r.innerHTML=`<div class="mh-lg">${r.innerHTML}</div>`;const t=r.querySelector(".mh-lg"),o=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(o){const d=o.previousSibling;t.before(o),d&&o.before(d)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function T(r,t){r&&t=="all"?(r.querySelector("input").indeterminate=!1,r.querySelector("input").checked=!0,r.querySelector("label").textContent="Select all"):r&&t==0?(r.querySelector("input").indeterminate=!1,r.querySelector("input").checked=!1,r.querySelector("label").textContent="Select all"):r&&t?(r.querySelector("input").indeterminate=!0,r.querySelector("input").checked=!1,r.querySelector("label").textContent=`${t} item${t>1?"s":""} selected`):r&&(r.querySelector("input").checked=!1,r.querySelector("input").indeterminate=!1,r.querySelector("label").textContent="Select all")}class j 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`,d=document.createElement("template");d.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/import g from"js-cookie";var $=function(L,o,r,a){function u(d){return d instanceof r?d:new r(function(h){h(d)})}return new(r||(r=Promise))(function(d,h){function b(n){try{m(a.next(n))}catch(f){h(f)}}function v(n){try{m(a.throw(n))}catch(f){h(f)}}function m(n){n.done?d(n.value):u(n.value).then(b,v)}m((a=a.apply(L,o||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class j extends HTMLElement{constructor(){var o;super(),this.attachShadow({mode:"open"});const r=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${r}/css/core.min.css`,u=document.createElement("template");u.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function A(o,l){function p(t,e,c=!0){let m=!1,s=e.getAttribute("name");if(!s)return!1;s.includes("[]")&&(s=s.replace("[]",`[${e.value}]`));let a=t.querySelector(`[data-name="${s}"]`);a&&e.getAttribute("type")=="checkbox"&&(m=!e.checked);const h=e.getAttribute("data-filter-text");if(a||(a=document.createElement("button"),t.appendChild(a)),a.setAttribute("type","button"),a.classList.add("filter"),a.classList.add("tag"),c&&a.classList.add("tag--not-set"),a.setAttribute("data-name",s),a.innerHTML=h.replace("$value",e.value),(!e.value||m)&&a.remove(),e.parentNode.closest("[data-filter-text]")){const n=e.parentNode.closest("[data-filter-text]");let i=!0;if(s="",n.querySelectorAll("input").forEach((r,d)=>{const f=r.getAttribute("name");if(s+=`${d!=0?",":""}${f}`,t.querySelector(`[data-name="${f}"]`)&&t.querySelector(`[data-name="${f}"]`).remove(),r.value){const u=document.createElement("button");u.setAttribute("type","button"),u.classList.add("filter"),u.classList.add("tag"),c&&a.classList.add("tag--not-set"),u.setAttribute("data-name",f),u.innerHTML=h.replace("$value",r.value),t.appendChild(u)}else i=!1}),t.querySelector(`[data-name="${s}"]`)&&t.querySelector(`[data-name="${s}"]`).remove(),i){let r=n.getAttribute("data-filter-text");n.querySelectorAll("input").forEach((f,u)=>{const y=f.getAttribute("name");t.querySelector(`[data-name="${y}"]`)&&t.querySelector(`[data-name="${y}"]`).remove(),r=r.replace(`$${u+1}`,f.value)});const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),c&&a.classList.add("tag--not-set"),d.setAttribute("data-name",s),d.innerHTML=r,t.appendChild(d)}}}Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach(t=>{p(l,t,!1)});const b=o.closest("dialog");b&&new MutationObserver(function(e){e[0].attributeName=="open"&&Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach(c=>{p(l,c,!1)})}).observe(b,{attributes:!0}),o.addEventListener("tags-set",function(){l.innerHTML="",Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach(t=>{p(l,t,!1)})}),Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach(t=>{t.addEventListener("change",function(e){o.hasAttribute("data-keep-same")||p(l,t),e.stopPropagation()})}),o.addEventListener("change",function(t){if(t&&t.target instanceof HTMLElement&&t.target.closest("input[data-filter-text]")){const e=t.target.closest("input[data-filter-text]");o.hasAttribute("data-keep-same")||p(l,e)}}),l.addEventListener("click",function(t){if(t&&t.target instanceof HTMLElement&&t.target.closest(".filter")){const e=t.target.closest(".filter"),c=e.getAttribute("data-name").split(",");for(let m=0;m<c.length;m++){const s=c[m];let a=`[name="${s}"]`;s.match(/\[(.*)\]/)&&(a=`[value="${s.replace(/.*\[(.*)\]/,"$1")}"]`);const h=o.querySelectorAll(a);for(let n=0;n<h.length;n++){const i=h[n];if(i.getAttribute("type")!="radio"&&i.getAttribute("type")!="checkbox"){i.value="";const r=new Event("force");o.hasAttribute("data-nosubmit")||i.closest("form").dispatchEvent(r)}else{i.checked=!1;const r=new Event("force");o.hasAttribute("data-nosubmit")||i.closest("form").dispatchEvent(r)}}}e.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",p=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${l}/css/core.min.css`,b=this.classList.toString(),t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const L=t=>t.charAt(0).toUpperCase()+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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class a extends HTMLElement{constructor(){var i;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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const m=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})},b=(r,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(e=>{r.addEventListener(e,function(i){const n={event:e,element:t,target:i.target};Object.keys(i.detail).forEach(o=>{const s=i.detail[o];n[o]=s}),window.dataLayer.push(n)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function v(l,s){const r=s.querySelector(".files"),i=s.querySelector(".drop-area"),e=l.querySelector("input"),f=l.hasAttribute("data-maxsize")?l.getAttribute("data-maxsize"):0,u=s.querySelector(".invalid-feedback.size"),h=s.querySelector(".invalid-feedback.ext"),o=e.cloneNode();i.append(o);const b=function(t){if(!e.hasAttribute("accept"))return!0;const a=t.split(".").pop();return!!e.getAttribute("accept").includes(a)};if(s.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(h.classList.remove("d-block"),u.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),s.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const a=new DataTransfer,{files:d}=e,n=t.target.closest(".files button");for(let p=0;p<d.length;p++){const g=d[p];g.name!=n.getAttribute("data-file")&&a.items.add(g)}e.files=a.files;const m=new Event("change");e.dispatchEvent(m);const c=new CustomEvent("fileRemoved",{detail:{removedFile:n?.dataset.file}});l.dispatchEvent(c)}}),o.addEventListener("change",()=>{if(e.hasAttribute("multiple")){const a=[...e.files,...o.files],d=[],n=new DataTransfer;for(let m=0;m<a.length;m++){const c=a[m],p=c.size/1e3;!d.includes(c.name)&&(f==0||p<f)&&b(c.name)&&n.items.add(c),b(c.name)||h.classList.add("d-block"),p>f&&u.classList.add("d-block"),d.push(c.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 a=e.files[0],d=a.size/1e3;if(!b(a.name)){h.classList.add("d-block");const n=new DataTransfer;e.files=n.files}if(d>f){u.classList.add("d-block");const n=new DataTransfer;e.files=n.files}}r.innerHTML="";for(const a of e.files)r.innerHTML+=`<span class="file" part="file">${a.name} <button data-file="${a.name}">Remove</button></span>`;const t=new CustomEvent("elementchange",{detail:{files:e.files}});if(l.dispatchEvent(t),e.files.length==0){const a=new CustomEvent("empty");l.dispatchEvent(a)}}),l.hasAttribute("data-filename")){const t=l.getAttribute("data-filename");t&&(r.innerHTML=`<span class="file">${t} <button data-file="${t}">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class y extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const p=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},h=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(o=>{e.addEventListener(o,function(r){const i={event:o,element:t,target:r.target};Object.keys(r.detail).forEach(d=>{const s=r.detail[d];i[d]=s}),window.dataLayer.push(i)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o 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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class b extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",l=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
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 i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
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.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class b extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",l=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class p extends HTMLElement{constructor(){super();const l=this.attachShadow({mode:"open"}),r=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${r}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function f(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(),c(i))},!1),i.hasAttribute("data-timeout")){const t=i.getAttribute("data-timeout"),o=new m(function(){c(i)},t);i.addEventListener("mouseenter",()=>{o.pause()}),i.addEventListener("mouseleave",()=>{o.resume()})}}function m(i,t){let o,n,e=t;this.pause=function(){window.clearTimeout(o),e-=new Date-n},this.resume=function(){n=new Date,window.clearTimeout(o),o=window.setTimeout(i,e)},this.resume()}const c=function(i){i.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class u 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`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${o}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const n=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},h=(t,C,i)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:C}),i.forEach(e=>{t.addEventListener(e,function(l){const a={event:e,element:C,target:l.target};Object.keys(l.detail).forEach(d=>{const o=l.detail[d];a[d]=o}),window.dataLayer.push(a)})}),!0);n("iam-rank");class p extends HTMLElement{constructor(){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>
|
|
@@ -27,20 +27,19 @@ class iamRankings extends HTMLElement {
|
|
|
27
27
|
document.head.insertAdjacentHTML('beforeend', `<style id="rankingsGlobal">${loadExtraCSS}</style>`);
|
|
28
28
|
}
|
|
29
29
|
connectedCallback() {
|
|
30
|
-
var _a, _b, _c, _d, _e, _f
|
|
31
|
-
const
|
|
32
|
-
this.
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
thirdText === null || thirdText === void 0 ? void 0 : thirdText.innerHTML = (_g = this.querySelector('tbody tr:nth-child(3) :is(td,th):nth-child(1)')) === null || _g === void 0 ? void 0 : _g.textContent;
|
|
30
|
+
var _a, _b, _c, _d, _e, _f;
|
|
31
|
+
const firstText = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.first-position');
|
|
32
|
+
const secondText = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.second-position');
|
|
33
|
+
const thirdText = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.third-position');
|
|
34
|
+
const max = this.hasAttribute('data-max') ? this.getAttribute('data-max') : 100;
|
|
35
|
+
firstText === null || firstText === void 0 ? void 0 : firstText.innerHTML = (_d = this.querySelector('tbody tr:nth-child(1) :is(td,th):nth-child(1)')) === null || _d === void 0 ? void 0 : _d.textContent;
|
|
36
|
+
secondText === null || secondText === void 0 ? void 0 : secondText.innerHTML = (_e = this.querySelector('tbody tr:nth-child(2) :is(td,th):nth-child(1)')) === null || _e === void 0 ? void 0 : _e.textContent;
|
|
37
|
+
thirdText === null || thirdText === void 0 ? void 0 : thirdText.innerHTML = (_f = this.querySelector('tbody tr:nth-child(3) :is(td,th):nth-child(1)')) === null || _f === void 0 ? void 0 : _f.textContent;
|
|
39
38
|
this.querySelectorAll('tbody tr').forEach((element) => {
|
|
40
39
|
var _a, _b, _c;
|
|
41
40
|
const value = (_b = (_a = element.querySelector('td:last-child')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
42
41
|
if (!element.querySelector(':first-child progress'))
|
|
43
|
-
(_c = element.querySelector(':first-child')) === null || _c === void 0 ? void 0 : _c.innerHTML += `<progress max="
|
|
42
|
+
(_c = element.querySelector(':first-child')) === null || _c === void 0 ? void 0 : _c.innerHTML += `<progress max="${max}" value="${value}"></progress>`;
|
|
44
43
|
});
|
|
45
44
|
trackComponent(this, 'iam-rank', ['select-card']);
|
|
46
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
|
-
*/const
|
|
4
|
+
*/const u=m=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:m})},b=(m,e,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),n.forEach(i=>{m.addEventListener(i,function(t){const o={event:i,element:e,target:t.target};Object.keys(t.detail).forEach(r=>{const a=t.detail[r];o[r]=a}),window.dataLayer.push(o)})}),!0);u("iam-rankings");class v 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>
|
|
6
6
|
@layer elements{mark{padding:.1875em;background-color:#ff0}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.display-1,.display-2,.display-3,.display-4){--line-height: 2rem;margin-top:0;margin-bottom:0;font-family:var(--font-heading);font-style:normal;font-weight:bold;line-height:var(--line-height);color:var(--colour-heading);clear:both;display:block;padding-bottom:2rem}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.display-1,.display-2,.display-3,.display-4) [class*=fa-]{margin-right:.5rem}:is(.h1,h1){--line-height: 3.5rem;font-size:3rem;padding-bottom:3rem;font-weight:900}@media screen and (min-width: 36em){:is(.h1,h1){font-size:4rem;--line-height: 4.5rem;padding-bottom:4rem}}:is(h2,.h2){font-size:2.25rem;--line-height: 2.75rem;padding-bottom:3rem;font-weight:900}@media screen and (min-width: 36em){:is(h2,.h2){font-size:3rem;--line-height: 3.5rem;padding-bottom:3rem}}:is(h3,.h3){font-size:1.75rem;--line-height: 2.25rem;padding-bottom:2.5rem;max-width:var(--content-max-width);font-weight:900}@media screen and (min-width: 36em){:is(h3,.h3){font-size:2rem;--line-height: 2.5rem;padding-bottom:2.5rem}}:is(.h4,h4,.h5,h5,.h6,h6){font-size:1.5rem;--line-height: 2rem;padding-bottom:2rem;max-width:var(--content-max-width)}p{margin-top:0;font-size:1rem;line-height:1.5rem;padding-bottom:3rem;max-width:var(--content-max-width);margin-bottom:0}p:has(+p){padding-bottom:1.5rem}:is(.lead,.strapline){font-size:1.125rem;line-height:1.75rem;padding-bottom:3rem;max-width:var(--content-max-width);font-weight:700}small,.small{font-size:0.875rem;line-height:1.5rem;padding-bottom:3rem;max-width:var(--content-max-width);font-family:arial,sans-serif;font-weight:normal}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}strong{font-weight:bolder;font-family:var(--font-heading);color:var(--colour-heading)}address{margin-bottom:1rem;font-style:normal;line-height:inherit}blockquote{margin:0;quotes:"\u201C" "\u201D" "\u2018" "\u2019";padding-bottom:3rem;overflow:hidden}blockquote p{font-size:1.5rem;line-height:2rem;padding-bottom:0}blockquote p:first-child:before{content:open-quote}blockquote p:last-of-type:after{content:close-quote}blockquote cite{font-size:1.125rem;line-height:2rem;padding-bottom:0;font-weight:bold;font-style:normal}.stat{font-size:4rem;line-height:4.5rem;font-weight:bold;color:var(--colour-heading);display:block;text-decoration:underline;text-underline-offset:.75rem;text-decoration-color:var(--colour-secondary);text-decoration-thickness:0.25rem;margin-bottom:4rem}}:is(.mh-sm,.mh-md,.mh-lg,.mh-sm-sm,.mh-sm-md,.mh-sm-lg,.mh-md-sm,.mh-md-md,.mh-md-lg,.mh-fluid):not(iam-table):not(.table__wrapper){padding-inline:var(--mh-padding-inline, 0);margin-inline:calc(var(--mh-padding-inline, 0)*-1)}:is(.mh-sm,.mh-md,.mh-lg,.mh-sm-sm,.mh-sm-md,.mh-sm-lg,.mh-md-sm,.mh-md-md,.mh-md-lg,.mh-fluid)::before{top:calc(100% - 1.5rem);bottom:0;left:0;right:0;height:1.5rem;position:sticky;display:block;background:linear-gradient(180deg, transparent 0%, var(--colour-canvas-2) 100%);z-index:2;margin-bottom:-1.5rem}:is(.mh-sm,.mh-md,.mh-lg,.mh-fluid){overflow:auto;overscroll-behavior:contain}:is(.mh-sm,.mh-md,.mh-lg,.mh-fluid)::before{content:""}.mh-sm{max-height:calc(12.5rem - var(--mh-modifier, 0rem))}.mh-md{max-height:calc(25rem - var(--mh-modifier, 0rem))}.mh-lg{max-height:calc(37.5rem - var(--mh-modifier, 0rem))}.mh-fluid{max-height:100%}@media screen and (min-width: 36em){:is(.mh-sm-sm,.mh-sm-md,.mh-sm-lg){overflow:auto;overscroll-behavior:contain}:is(.mh-sm-sm,.mh-sm-md,.mh-sm-lg)::before{content:""}.mh-sm-sm{max-height:calc(12.5rem - var(--mh-modifier, 0rem))}.mh-sm-md{max-height:calc(25rem - var(--mh-modifier, 0rem))}.mh-sm-lg{max-height:calc(37.5rem - var(--mh-modifier, 0rem))}}@media screen and (min-width: 62em){:is(.mh-md-sm,.mh-md-md,.mh-md-lg){overflow:auto;overscroll-behavior:contain}:is(.mh-md-sm,.mh-md-md,.mh-md-lg)::before{content:""}.mh-md-sm{max-height:calc(12.5rem - var(--mh-modifier, 0rem))}.mh-md-md{max-height:calc(25rem - var(--mh-modifier, 0rem))}.mh-md-lg{max-height:calc(37.5rem - var(--mh-modifier, 0rem))}}*,*::before,*::after{box-sizing:border-box}.podium{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;max-width:30rem;margin:auto}.podium>div{flex-basis:33.33%;flex-grow:0;flex-shrink:0;order:1}.podium>div iam-rank{margin:0;width:100%}.podium>div>span{display:block;font-size:0.875rem;line-height:1;font-weight:700;margin:0;padding-block:.5rem;text-align:center;max-width:100%;overflow:hidden}.podium>div:nth-child(1){order:2;padding:0}.podium>div:nth-child(2){padding:1rem 1rem 0 0}.podium>div:nth-child(3){order:3;padding:1rem 0 0 1rem}/*# sourceMappingURL=assets/css/components/rankings.component.css.map */
|
|
7
7
|
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
<div><iam-rank>3rd</iam-rank><span class="third-position"></span></div>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="mh-md" part="leaderboard"><slot></slot></div>
|
|
15
|
-
`,this.shadowRoot.appendChild(
|
|
16
|
-
</style>`)}connectedCallback(){var
|
|
15
|
+
`,this.shadowRoot.appendChild(e.content.cloneNode(!0)),document.getElementById("rankingsGlobal")||document.head.insertAdjacentHTML("beforeend",`<style id="rankingsGlobal">@layer elements{mark{padding:.1875em;background-color:#ff0}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.display-1,.display-2,.display-3,.display-4){--line-height: 2rem;margin-top:0;margin-bottom:0;font-family:var(--font-heading);font-style:normal;font-weight:bold;line-height:var(--line-height);color:var(--colour-heading);clear:both;display:block;padding-bottom:2rem}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.display-1,.display-2,.display-3,.display-4) [class*=fa-]{margin-right:.5rem}:is(.h1,h1){--line-height: 3.5rem;font-size:3rem;padding-bottom:3rem;font-weight:900}@media screen and (min-width: 36em){:is(.h1,h1){font-size:4rem;--line-height: 4.5rem;padding-bottom:4rem}}:is(h2,.h2){font-size:2.25rem;--line-height: 2.75rem;padding-bottom:3rem;font-weight:900}@media screen and (min-width: 36em){:is(h2,.h2){font-size:3rem;--line-height: 3.5rem;padding-bottom:3rem}}:is(h3,.h3){font-size:1.75rem;--line-height: 2.25rem;padding-bottom:2.5rem;max-width:var(--content-max-width);font-weight:900}@media screen and (min-width: 36em){:is(h3,.h3){font-size:2rem;--line-height: 2.5rem;padding-bottom:2.5rem}}:is(.h4,h4,.h5,h5,.h6,h6){font-size:1.5rem;--line-height: 2rem;padding-bottom:2rem;max-width:var(--content-max-width)}p{margin-top:0;font-size:1rem;line-height:1.5rem;padding-bottom:3rem;max-width:var(--content-max-width);margin-bottom:0}p:has(+p){padding-bottom:1.5rem}:is(.lead,.strapline){font-size:1.125rem;line-height:1.75rem;padding-bottom:3rem;max-width:var(--content-max-width);font-weight:700}small,.small{font-size:0.875rem;line-height:1.5rem;padding-bottom:3rem;max-width:var(--content-max-width);font-family:arial,sans-serif;font-weight:normal}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}strong{font-weight:bolder;font-family:var(--font-heading);color:var(--colour-heading)}address{margin-bottom:1rem;font-style:normal;line-height:inherit}blockquote{margin:0;quotes:"\u201C" "\u201D" "\u2018" "\u2019";padding-bottom:3rem;overflow:hidden}blockquote p{font-size:1.5rem;line-height:2rem;padding-bottom:0}blockquote p:first-child:before{content:open-quote}blockquote p:last-of-type:after{content:close-quote}blockquote cite{font-size:1.125rem;line-height:2rem;padding-bottom:0;font-weight:bold;font-style:normal}.stat{font-size:4rem;line-height:4.5rem;font-weight:bold;color:var(--colour-heading);display:block;text-decoration:underline;text-underline-offset:.75rem;text-decoration-color:var(--colour-secondary);text-decoration-thickness:0.25rem;margin-bottom:4rem}}*,*::before,*::after{box-sizing:border-box}iam-rankings table{display:block;width:100%;font-weight:normal;counter-reset:countItem}iam-rankings thead{display:none}iam-rankings tbody{display:contents}iam-rankings :is(td,th){font-weight:normal}iam-rankings tr.current{background-color:var(--colour-light)}iam-rankings tr.current :is(td,th){font-weight:bolder}iam-rankings tr{display:flex;width:100%;position:relative}iam-rankings tr:before{counter-increment:countItem;content:counter(countItem) ".";font-size:2rem;line-height:2.5rem;font-weight:bolder;color:var(--colour-primary);width:3rem;text-align:center;margin-top:.5rem}iam-rankings tr>*:first-child{width:100%;margin-right:0;padding-right:0}iam-rankings tr>*:last-child{position:absolute;top:0;right:0}iam-rankings tr progress{width:100%;height:1rem}iam-rankings tr:nth-child(1) progress{--colour: var(--chart-colour-1, #BEE8F8)}iam-rankings tr:nth-child(2) progress{--colour: var(--chart-colour-2, #A6DCC7)}iam-rankings tr:nth-child(3) progress{--colour: var(--chart-colour-3, #FAD0DA)}iam-rankings tr:nth-child(4) progress{--colour: var(--chart-colour-4, #AFCCF2)}iam-rankings tr:nth-child(5) progress{--colour: var(--chart-colour-5, #FFD2B4)}iam-rankings tr:nth-child(6) progress{--colour: var(--chart-colour-6, #CDF0F2)}iam-rankings tr:nth-child(7) progress{--colour: var(--chart-colour-7, #FFABC2)}iam-rankings tr:nth-child(8) progress{--colour: var(--chart-colour-8, #DCEAF2)}iam-rankings tr:nth-child(9) progress{--colour: var(--chart-colour-9, #EEBCB3)}iam-rankings tr:nth-child(10) progress{--colour: var(--chart-colour-10, #F0BDFF)}/*# sourceMappingURL=assets/css/components/rankings.global.css.map */
|
|
16
|
+
</style>`)}connectedCallback(){var e,n,i,t,o,r;const a=(e=this.shadowRoot)===null||e===void 0?void 0:e.querySelector(".first-position"),h=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(".second-position"),d=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelector(".third-position"),p=this.hasAttribute("data-max")?this.getAttribute("data-max"):100;a==null||(a.innerHTML=(t=this.querySelector("tbody tr:nth-child(1) :is(td,th):nth-child(1)"))===null||t===void 0?void 0:t.textContent),h==null||(h.innerHTML=(o=this.querySelector("tbody tr:nth-child(2) :is(td,th):nth-child(1)"))===null||o===void 0?void 0:o.textContent),d==null||(d.innerHTML=(r=this.querySelector("tbody tr:nth-child(3) :is(td,th):nth-child(1)"))===null||r===void 0?void 0:r.textContent),this.querySelectorAll("tbody tr").forEach(s=>{var l,c,g;const f=(c=(l=s.querySelector("td:last-child"))===null||l===void 0?void 0:l.textContent)===null||c===void 0?void 0:c.trim();s.querySelector(":first-child progress")||(g=s.querySelector(":first-child"))===null||g===void 0||(g.innerHTML+=`<progress max="${p}" value="${f}"></progress>`)}),b(this,"iam-rank",["select-card"])}}export{v as default};
|
|
17
17
|
//# sourceMappingURL=rankings.component.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rankings.component.min.js","sources":["../_global.js","rankings.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","import { trackComponent, trackComponentRegistered } from '../_global.js';\ntrackComponentRegistered('iam-rankings');\nclass iamRankings 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/rankings.component.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/rankings.global.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${loadCSS}\n </style>\n <div class=\"podium\">\n <div><iam-rank>1st</iam-rank><span class=\"first-position\"></span></div>\n <div><iam-rank>2nd</iam-rank><span class=\"second-position\"></span></div>\n <div><iam-rank>3rd</iam-rank><span class=\"third-position\"></span></div>\n </div>\n <div class=\"mh-md\" part=\"leaderboard\"><slot></slot></div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('rankingsGlobal'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"rankingsGlobal\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n var _a, _b, _c, _d, _e, _f
|
|
1
|
+
{"version":3,"file":"rankings.component.min.js","sources":["../_global.js","rankings.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","import { trackComponent, trackComponentRegistered } from '../_global.js';\ntrackComponentRegistered('iam-rankings');\nclass iamRankings 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/rankings.component.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/rankings.global.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${loadCSS}\n </style>\n <div class=\"podium\">\n <div><iam-rank>1st</iam-rank><span class=\"first-position\"></span></div>\n <div><iam-rank>2nd</iam-rank><span class=\"second-position\"></span></div>\n <div><iam-rank>3rd</iam-rank><span class=\"third-position\"></span></div>\n </div>\n <div class=\"mh-md\" part=\"leaderboard\"><slot></slot></div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('rankingsGlobal'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"rankingsGlobal\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n var _a, _b, _c, _d, _e, _f;\n const firstText = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.first-position');\n const secondText = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.second-position');\n const thirdText = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.third-position');\n const max = this.hasAttribute('data-max') ? this.getAttribute('data-max') : 100;\n firstText === null || firstText === void 0 ? void 0 : firstText.innerHTML = (_d = this.querySelector('tbody tr:nth-child(1) :is(td,th):nth-child(1)')) === null || _d === void 0 ? void 0 : _d.textContent;\n secondText === null || secondText === void 0 ? void 0 : secondText.innerHTML = (_e = this.querySelector('tbody tr:nth-child(2) :is(td,th):nth-child(1)')) === null || _e === void 0 ? void 0 : _e.textContent;\n thirdText === null || thirdText === void 0 ? void 0 : thirdText.innerHTML = (_f = this.querySelector('tbody tr:nth-child(3) :is(td,th):nth-child(1)')) === null || _f === void 0 ? void 0 : _f.textContent;\n this.querySelectorAll('tbody tr').forEach((element) => {\n var _a, _b, _c;\n const value = (_b = (_a = element.querySelector('td:last-child')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();\n if (!element.querySelector(':first-child progress'))\n (_c = element.querySelector(':first-child')) === null || _c === void 0 ? void 0 : _c.innerHTML += `<progress max=\"${max}\" value=\"${value}\"></progress>`;\n });\n trackComponent(this, 'iam-rank', ['select-card']);\n }\n}\nexport default iamRankings;\n"],"names":["trackComponentRegistered","componentName","trackComponent","component","trackEvents","eventName","event","eventDetails","eventKey","eventDetail","iamRankings","template","_a","_b","_c","_d","_e","_f","firstText","secondText","thirdText","max","element","value"],"mappings":";;;IAAO,MAAMA,EAA4BC,GAAkB,CAEvD,OAAO,UAAY,OAAO,WAAa,CAAE,EACzC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAASA,CACjB,CAAK,CACL,EACaC,EAAiB,CAACC,EAAWF,EAAeG,KAErD,OAAO,UAAY,OAAO,WAAa,CAAE,EACzC,OAAO,UAAU,KAAK,CAClB,MAAO,qBACP,QAASH,CACjB,CAAK,EACDG,EAAY,QAASC,GAAc,CAC/BF,EAAU,iBAAiBE,EAAW,SAAUC,EAAO,CACnD,MAAMC,EAAe,CACjB,MAAOF,EACP,QAASJ,EACT,OAAQK,EAAM,MACjB,EACD,OAAO,KAAKA,EAAM,MAAM,EAAE,QAASE,GAAa,CAC5C,MAAMC,EAAcH,EAAM,OAAOE,CAAQ,EACzCD,EAAaC,CAAQ,EAAIC,CACzC,CAAa,EACD,OAAO,UAAU,KAAKF,CAAY,CAC9C,CAAS,CACT,CAAK,EACM,IC5BXP,EAAyB,cAAc,EACvC,MAAMU,UAAoB,WAAY,CAClC,aAAc,CACV,MAAO,EACP,KAAK,aAAa,CAAE,KAAM,MAAM,CAAE,EACZ,SAAS,KAAK,aAAa,sBAAsB,GACjE,SAAS,KAAK,aAAa,sBAAsB,EAIvD,MAAMC,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAWrB,KAAK,WAAW,YAAYA,EAAS,QAAQ,UAAU,EAAI,CAAC,EAEvD,SAAS,eAAe,gBAAgB,GACzC,SAAS,KAAK,mBAAmB,YAAa;AAAA,SAAoD,CAC9G,CACI,mBAAoB,CAChB,IAAIC,EAAIC,EAAIC,EAAIC,EAAIC,EAAIC,EACxB,MAAMC,GAAaN,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,cAAc,iBAAiB,EAC1GO,GAAcN,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,cAAc,kBAAkB,EAC5GO,GAAaN,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,cAAc,iBAAiB,EAC1GO,EAAM,KAAK,aAAa,UAAU,EAAI,KAAK,aAAa,UAAU,EAAI,IAC5EH,GAAc,OAAwCA,EAAU,WAAaH,EAAK,KAAK,cAAc,+CAA+C,KAAO,MAAQA,IAAO,OAAS,OAASA,EAAG,aAC/LI,GAAe,OAAyCA,EAAW,WAAaH,EAAK,KAAK,cAAc,+CAA+C,KAAO,MAAQA,IAAO,OAAS,OAASA,EAAG,aAClMI,GAAc,OAAwCA,EAAU,WAAaH,EAAK,KAAK,cAAc,+CAA+C,KAAO,MAAQA,IAAO,OAAS,OAASA,EAAG,aAC/L,KAAK,iBAAiB,UAAU,EAAE,QAASK,GAAY,CACnD,IAAIV,EAAIC,EAAIC,EACZ,MAAMS,GAASV,GAAMD,EAAKU,EAAQ,cAAc,eAAe,KAAO,MAAQV,IAAO,OAAS,OAASA,EAAG,eAAiB,MAAQC,IAAO,OAAS,OAASA,EAAG,KAAM,EAChKS,EAAQ,cAAc,uBAAuB,IAC7CR,EAAKQ,EAAQ,cAAc,cAAc,KAAO,MAAQR,IAAO,SAAkBA,EAAG,WAAa,kBAAkBO,CAAG,YAAYE,CAAK,gBACxJ,CAAS,EACDrB,EAAe,KAAM,WAAY,CAAC,aAAa,CAAC,CACxD,CACA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const h=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},p=(t,a,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:a}),o.forEach(r=>{t.addEventListener(r,function(e){const d={event:r,element:a,target:e.target};Object.keys(e.detail).forEach(i=>{const c=e.detail[i];d[i]=c}),window.dataLayer.push(d)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/import $ from"js-cookie";const k=e=>e.replace(/ /g,"_"),j=function(e){return e=e.toLowerCase(),e=k(e),e=e.replace(/\W/g,""),e},b=(e,i,a)=>i.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,d)=>o?o[d]:a,e),S=e=>Array.isArray(e)||e!==null&&["function","object"].includes(typeof e);var L=function(e,i,a,o){function d(r){return r instanceof a?r:new a(function(n){n(r)})}return new(a||(a=Promise))(function(r,n){function y(s){try{t(o.next(s))}catch(p){n(p)}}function l(s){try{t(o.throw(s))}catch(p){n(p)}}function t(s){s.done?r(s.value):d(s.value).then(y,l)}t((o=o.apply(e,i||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class q extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class w extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",d=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${o}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.2.1--
|
|
2
|
+
* iamKey v7.2.1--beta4
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const U=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},Q=(a,e)=>String(a).padStart(e,"0"),Y=a=>a.charAt(0).toUpperCase()+a.slice(1),L=(a,e,t)=>e.split(/[\.\[\]\'\"]/).filter(i=>i).reduce((i,o)=>i?i[o]:t,a),J=(a=1)=>Math.floor(Math.random()*Date.now()*(a+1));var X=function(a,e,t,i){function o(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function b(n){try{s(i.next(n))}catch(m){r(m)}}function d(n){try{s(i.throw(n))}catch(m){r(m)}}function s(n){n.done?l(n.value):o(n.value).then(b,d)}s((i=i.apply(a,e||[])).next())})};const H=(a,e)=>{switch(a){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return e=Y(e)}},z=function(a){const e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach(i=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){const o=i.getAttribute("data-filter");let l=i.value;i.hasAttribute("data-date-from")&&(l+="-date-from"),i.hasAttribute("data-date-to")&&(l+="-date-to"),e[o]||(e[o]=[]),e[o].push(l)}}),e},G=a=>{let e=document.createElement("form");const t=a.querySelector("table");a.hasAttribute("data-filterby")?e=document.querySelector(`#${a.getAttribute("data-filterby")}`):a.closest("form")?e=a.closest("form"):t.parentNode.insertBefore(e,t.nextSibling),e.hasAttribute("data-ajax")&&a.setAttribute("data-ajax",e.getAttribute("data-ajax")),e.hasAttribute("data-schema")&&a.setAttribute("data-schema",e.getAttribute("data-schema"))},q=(a,e,t,i,o)=>{t.querySelector("[name=show]")||t.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${a.getAttribute("data-show")}" />`),t.querySelector("[name=page]")||t.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${a.getAttribute("data-page")}" />`),i.addEventListener("update-show",l=>{if(t.querySelector("[name=show]").value!=l.detail.show){t.querySelector("[name=show]").value=l.detail.show;const r=new CustomEvent("update-show",{detail:{show:l.detail.show}});a.dispatchEvent(r),N(a,i),o()}}),i.addEventListener("update-page",l=>{if(t.querySelector("[name=page]").value!=l.detail.page){t.querySelector("[name=page]").value=l.detail.page;const r=new CustomEvent("update-page",{detail:{page:l.detail.page}});if(a.dispatchEvent(r),N(a,i),o(),!a.hasAttribute("data-no-scroll")){const d=e.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:d,behavior:"smooth"})}}})},K=(a,e)=>{let t=document.createElement("form");return a.hasAttribute("data-filterby")?t=document.querySelector(`#${a.getAttribute("data-filterby")}`):a.closest("form")?t=a.closest("form"):e.parentNode.insertBefore(t,e.nextSibling),t},F=(a,e,t,i)=>{const o=a.shadowRoot.querySelector(".table__wrapper");a.hasAttribute("data-total")||a.setAttribute("data-total",a.querySelectorAll("tbody tr").length),a.hasAttribute("data-page")||a.setAttribute("data-page",1),a.hasAttribute("data-show")||a.setAttribute("data-show",5),a.hasAttribute("data-increment")||a.setAttribute("data-increment",a.getAttribute("data-show")),Z(a,i),I(e),tt(a,e),a.classList.contains("mh-sm")&&o.classList.add("mh-sm"),a.classList.contains("mh-md")&&o.classList.add("mh-md"),a.classList.contains("mh-lg")&&o.classList.add("mh-lg"),a.classList.contains("table--cta")&&(at(a,e),et(a,e))},Z=(a,e)=>{a.hasAttribute("data-total")&&e.setAttribute("data-total",a.getAttribute("data-total")),a.hasAttribute("data-page")&&e.setAttribute("data-page",a.getAttribute("data-page")),a.hasAttribute("data-show")&&e.setAttribute("data-show",a.getAttribute("data-show")),a.hasAttribute("data-increment")&&e.setAttribute("data-increment",a.getAttribute("data-show")),a.hasAttribute("data-page-jump")&&e.setAttribute("data-page-jump","true"),a.hasAttribute("data-per-page")&&e.setAttribute("data-per-page","true"),a.hasAttribute("data-item-count")&&e.setAttribute("data-item-count","true"),a.hasAttribute("data-loading")&&e.setAttribute("data-loading","true"),a.classList.contains("table--fullwidth")&&e.setAttribute("data-minimal","true")},N=(a,e)=>{a.setAttribute("data-total",e.getAttribute("data-total")),a.setAttribute("data-page",e.getAttribute("data-page")),a.setAttribute("data-show",e.getAttribute("data-show")),a.setAttribute("data-increment",e.getAttribute("data-show"))},$=a=>{a.getAttribute("data-total");const e=a.getAttribute("data-page"),t=a.getAttribute("data-show");a.getAttribute("data-increment");const i=a.querySelector("table"),o=e*t,l=o-t;Array.from(i.querySelectorAll("tbody tr")).forEach((r,b)=>{b>=l&&b<o?r.classList.add("show"):r.classList.remove("show")})},I=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach(i=>{const o=Array.from(i.querySelectorAll("th, td")),l=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","successful","failed"];o.forEach((r,b)=>{const d=e[b];if(typeof d<"u"){const s=document.createElement("div");s.innerHTML=d.innerHTML;const n=s.textContent||s.innerText||"";r.setAttribute("data-label",n),d.hasAttribute("data-td-class")&&r.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(r.setAttribute("data-format",d.getAttribute("data-format")),r.innerHTML=H(d.getAttribute("data-format"),r.textContent.trim())),l.includes(r.textContent.trim().toLowerCase())&&r.setAttribute("data-content",r.textContent.trim().toLowerCase())}})})},tt=(a,e)=>{if(a.classList.contains("table--fullwidth")&&!a.hasAttribute("data-expandable")||e.querySelectorAll("thead tr th").length<4&&!a.hasAttribute("data-expandable"))return!1;Array.from(e.querySelectorAll("thead tr")).forEach(t=>{e.querySelectorAll("thead tr th.expand-button-heading").length||t.insertAdjacentHTML("afterbegin",`<th class="${a.hasAttribute("data-expandable")?"th--fixed ":""}expand-button-heading"></th>`)}),Array.from(e.querySelectorAll("tbody tr")).forEach((t,i)=>{const o=t.getAttribute("data-view")==="full"?"aria-expanded":"";t.insertAdjacentHTML("afterbegin",`<td class="${a.hasAttribute("data-expandable")?"td--fixed ":""}td--expand"><button class="btn btn-compact btn-secondary btn-sm" data-expand-button ${o} data-index="${i}">Expand</button></td>`)}),e.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-expand-button]")){const i=t.target.closest("[data-expand-button]"),o=i.closest("tr");i.toggleAttribute("aria-expanded"),o.getAttribute("data-view")=="full"?o.setAttribute("data-view","default"):o.setAttribute("data-view","full"),i.blur(),a.dispatchEvent(new CustomEvent("row-expanded",{detail:{row:i.getAttribute("data-index")}}))}})},at=(a,e)=>{let t=0;Array.from(e.querySelectorAll("tbody tr")).forEach(i=>{const o=window.getComputedStyle(document.querySelector("html")),l=i.querySelector(":scope > *:last-child > *:first-child");if(l){l.classList.add("text-nowrap");let r=l.offsetWidth/parseFloat(o.fontSize);r+=1.8,t=t>r?t:r}}),a.style.setProperty("--cta-width",`${t}rem`)},et=(a,e)=>{function t(){Array.from(e.querySelectorAll("tr")).forEach(i=>{const o=i.offsetHeight;i.style.setProperty("--row-height",`${o}px`)})}new ResizeObserver(t).observe(e)},R=(a,e)=>{if(a.querySelector("iam-actionbar[data-selectall]")||document.querySelector(`iam-actionbar[data-for='${a.getAttribute("id")}']`)){const t=a.querySelector("iam-actionbar[data-selectall]")?a.querySelector("iam-actionbar[data-selectall]"):document.querySelector(`iam-actionbar[data-for='${a.getAttribute("id")}']`);it(a,e,t)}a.querySelectorAll(".dialog__wrapper .btn-compact").forEach(t=>{t.classList.add("btn-sm"),t.classList.add("m-0");const i=t.closest("tr"),o=t.closest("td"),r=Array.prototype.slice.call(i.children).indexOf(o);o.classList.add("td--fixed"),e.querySelector(`thead tr th:nth-child(${r+1})`).classList.add("th--fixed")})},it=(a,e,t)=>{Array.from(e.querySelectorAll("thead tr")).forEach(i=>{i.querySelector(".expand-button-heading")?i.querySelector(".expand-button-heading").insertAdjacentHTML("afterend",'<th class="th--fixed"></th>'):i.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(e.querySelectorAll("tbody tr")).forEach((i,o)=>{if(i.setAttribute("data-index",o+1),!i.querySelector(".selectrow")){const l=`row${J(o)}`;i.querySelector(".td--expand")?i.querySelector(".td--expand").insertAdjacentHTML("afterend",`<td class="td--fixed selectrow selected"><input type="checkbox" name="row" id="${l}" ${i.hasAttribute("data-selected")?'checked="true"':""}/><label for="${l}"><span class="visually-hidden">Select row</span></label></td>`):i.insertAdjacentHTML("afterbegin",`<td class="td--fixed selectrow selected"><input type="checkbox" name="row" id="${l}" ${i.hasAttribute("data-selected")?'checked="true"':""}/><label for="${l}"><span class="visually-hidden">Select row</span></label></td>`)}}),e.addEventListener("change",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest(".selectrow input")){const o=i.target.closest(".selectrow input"),l=i.target.closest("tr"),r=e.querySelectorAll('.selectrow input[type="checkbox"]').length,b=e.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;t.setAttribute("data-selected",r==b?"all":b);const d=new CustomEvent("row-selected",{detail:{rowIndex:l.getAttribute("data-index"),checked:!!o.checked}});a.dispatchEvent(d)}}),t.addEventListener("selected",i=>{if(i.detail.selected=="0"){Array.from(e.querySelectorAll('.selectrow input[type="checkbox"]')).forEach(l=>{l.checked=!1});const o=new CustomEvent("all-rows-unselected");a.dispatchEvent(o)}else if(i.detail.selected=="all"){Array.from(e.querySelectorAll('.selectrow input[type="checkbox"]')).forEach(l=>{l.checked=!0});const o=new CustomEvent("all-rows-selected");a.dispatchEvent(o)}})},st=(a,e,t,i,o)=>{lt(a,e),ot(a,e),t.addEventListener("change",l=>{l&&l.target instanceof HTMLElement&&l.target.closest("[data-sort]")&&O(e,t,o)}),rt(a,e,t,i,o)},lt=(a,e)=>{e.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")){const i=t.target.closest("[data-sort]");i.setAttribute("data-sort","true"),Array.from(e.querySelectorAll("th[data-sort]")).forEach(b=>{b!=i&&(b.setAttribute("data-sort",""),b.removeAttribute("data-order-by"),i.setAttribute("title","Click to sort ascending"))}),i.hasAttribute("data-order-by")&&i.getAttribute("data-order-by")=="asc"?(i.setAttribute("data-order-by","desc"),i.setAttribute("title","Click to sort ascending")):(i.setAttribute("data-order-by","asc"),i.setAttribute("title","Click to sort descending"));const o=new CustomEvent("sort-by-heading",{detail:{heading:i.textContent,sortBy:i.getAttribute("data-order-by"),ref:i.getAttribute("data-ref")}});a.dispatchEvent(o);const l=i.textContent.trim(),r=i.getAttribute("data-order-by");a.hasAttribute("data-submit")||P(e,l,r)}})},ot=(a,e)=>{var t;const i=a.querySelector("iam-actionbar");if(!i)return!1;const o=(t=i.shadowRoot)===null||t===void 0?void 0:t.querySelector("input#search");if(!o)return!1;const l=o.getAttribute("id"),r=o.parentNode,b={};e.querySelectorAll("tbody td:not(.td--fixed)").forEach(d=>{d.querySelector(".td__content")?b[d.querySelector(".td__content").textContent]=d.querySelector(".td__content").textContent:b[d.textContent]=d.textContent}),o.setAttribute("list",`${l}_list`),o.setAttribute("autocomplete","off"),r.querySelector("datalist")||(r.innerHTML+=`<datalist id="${l}_list"></datalist>`),r.querySelector("datalist").innerHTML=`${Object.keys(b).map(d=>`<option value="${d}"></option>`).join("")}`},O=(a,e,t)=>{if(e.getAttribute("data-ajax"))return!1;const i=a.querySelector("tbody");let o=e.querySelector('input[type="radio"][data-sort]:checked');if(e.querySelector("select[data-sort]")){const d=e.querySelector("select[data-sort]");o=e.querySelector(`select[data-sort] option:nth-child(${d.selectedIndex+1})`)}const l=o.getAttribute("data-sort"),r=o.getAttribute("data-order"),b=o.getAttribute("data-format");if(!l)return i.innerHTML=t.innerHTML,I(a),!1;P(a,l,r,b)},P=(a,e,t,i="")=>{const o=a.querySelector("tbody");let l=[];["asc","desc","descending"].includes(t)||(l=t.split(","));let r=[];Array.from(o.querySelectorAll("tr")).forEach(d=>{let s=d.querySelector('td[data-label="'+e+'"], th[data-label="'+e+'"]').textContent.trim();d.querySelector('[data-label="'+e+'"] .td__content')&&(s=d.querySelector('[data-label="'+e+'"] .td__content').textContent.trim()),l.length&&l.includes(s)&&(s=l.indexOf(s)),U(s)&&(s=Q(s,10)),i&&i=="date"&&(s=new Date(s));const n={index:s,row:d};r.push(n)}),r.sort((d,s)=>d.index>s.index?1:-1),(t=="descending"||t=="desc")&&(r=r.reverse());let b="";r.forEach(d=>{b+=d.row.outerHTML}),o.innerHTML=b},rt=(a,e,t,i,o)=>{let l;const r=function(s,n=!1){if(t.classList.contains("processing"))return!1;Array.from(t.querySelectorAll("iam-applied-filters")).forEach(m=>{const c=new Event("tags-set");m.dispatchEvent(c)}),s.type=="submit"&&(t.classList.add("processing"),Array.from(t.querySelectorAll("[data-duplicate]")).forEach(m=>{const c=m.getAttribute("data-duplicate"),u=document.getElementById(c),h=document.querySelector(`[for="${c}"] iam-card`);if(u.checked!=m.checked)if(h){const A=new Event("click");h.dispatchEvent(A)}else u.checked=m.checked}),t.classList.remove("processing")),D(a,e,t,i),B(a,e,t)};a.querySelector("iam-actionbar[data-search]")&&a.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",s=>{t.querySelector("input[data-search]")?t.querySelector("input[data-search]").value=s.detail.search:t.insertAdjacentHTML("beforeend",`<input type="hidden" name="search" data-search="${a.querySelector("iam-actionbar[data-search]").getAttribute("data-search")}" value="${s.detail.search}"/>`);const n=new CustomEvent("search-submit",{detail:s.details});a.dispatchEvent(n),clearTimeout(l),r(s)}),a.querySelector("iam-actionbar")&&!a.querySelector("iam-actionbar").closest("form")&&a.querySelector("iam-actionbar").addEventListener("change",s=>{t.querySelector(".duplicate-actionbar")||t.insertAdjacentHTML("beforeend",'<div class="duplicate-actionbar" style="visibility: hidden; pointer-events: none; position: absolute;"></div>'),t.querySelector(".duplicate-actionbar").innerHTML=a.querySelector("iam-actionbar").innerHTML,D(a,e,t,i)}),t.addEventListener("keyup",s=>{clearTimeout(l),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&(l=setTimeout(function(){r(s)},500))}),t.addEventListener("change",s=>{if(clearTimeout(l),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&r(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter][data-no-ajax]")?(D(a,e,t,i),B(e,t)):(s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&s.target.closest("form .dialog__wrapper > dialog")||s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&!s.target.closest("form dialog"))&&r(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-show]")&&r(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-mimic]")&&r(s),s&&s.target instanceof HTMLElement&&s.target.hasAttribute("id")){const n=s.target.getAttribute("id");document.querySelector(`[data-duplicate="${n}"]`)&&(document.querySelector(`[data-duplicate="${n}"]`).checked=s.target.checked)}}),t.addEventListener("click",s=>{if(clearTimeout(l),s&&s.target instanceof HTMLElement&&s.target.closest('dialog button:not([type="button"])')&&s.target.closest('dialog button:not([type="button"])').closest("dialog").close(),s&&s.target instanceof HTMLElement&&s.target.closest(".dialog__close")&&(s.preventDefault(),s.stopPropagation()),s&&s.target instanceof HTMLElement&&s.target.closest("[data-clear]")){t.classList.add("processing"),Array.from(t.querySelectorAll(".applied-filters")).forEach(m=>{m.innerHTML=""});const n=t.elements;for(let m=0;m<n.length;m++)switch(n[m].type.toLowerCase()?n[m].type.toLowerCase():"text"){case"text":case"password":case"textarea":n[m].value="";break;case"radio":case"checkbox":if(n[m].checked){const u=n[m],h=u.getAttribute("id"),A=document.querySelector(`[for="${h}"`);if(A.querySelector("iam-card")){const p=A.querySelector("iam-card"),f=new Event("click");p.dispatchEvent(f)}u.checked=!1}break;case"select-one":case"select-multi":n[m].selectedIndex=-1;break}t.classList.remove("processing"),t.hasAttribute("data-submit")||O(e,t,o),r(s)}}),t.addEventListener("submit",s=>{clearTimeout(l),t.hasAttribute("data-submit")||s.preventDefault(),r(s)}),t.addEventListener("force",s=>{r(s)}),t.addEventListener("paginate",s=>{r(s,!0)});const b=[],d=[];Array.from(t.querySelectorAll("[data-mimic]")).forEach(s=>{const n=s.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${n}"]`)).forEach(m=>{const c=m.closest("form");b.includes(c)||b.push(c),d.includes(n)||d.push(n)})}),b.forEach(s=>{const n=function(){const m=[],c=new FormData(s);for(const[u,h]of c)document.querySelector(`[data-mimic="${u}"]`)&&!m.includes(u)?(m.push(u),document.querySelector(`[data-mimic="${u}"]`).value=h):document.querySelector(`[data-mimic="${u}"]`)&&(document.querySelector(`[data-mimic="${u}"]`).value+=","+h);for(const u of m){const h=new Event("force");t.dispatchEvent(h)}for(const u of d)if(!c.has(u)&&s.querySelector(`[name="${u}"]`)){document.querySelector(`[data-mimic="${u}"]`).value="";const h=new Event("force");t.dispatchEvent(h)}};s.addEventListener("force",()=>{n()}),s.addEventListener("change",()=>{n()})})},D=(a,e,t,i)=>{e.classList.remove("table--filtered");const o=z(t),l=[];let r=0;const b=t.querySelector("[data-pagination]")?parseInt(t.querySelector("[data-pagination]").value):1,d=t.querySelector("[data-show]")?parseInt(t.querySelector("[data-show]").value):15;if(Array.from(e.querySelectorAll("tbody tr")).forEach(n=>{n.classList.remove("filtered"),n.classList.remove("filtered--matched"),n.classList.remove("filtered--show"),n.removeAttribute("data-filtered-by")}),t.querySelector("input[data-search]")){const n=t.querySelector("input[data-search]");e.querySelectorAll("thead tr th").forEach(m=>{l.push({column:`${m.textContent.trim()}`,value:`${n.value}`})})}Array.from(t.querySelectorAll("[data-filter-count]")).forEach(n=>{n.innerHTML="",n.parentNode.classList.remove("hover")});let s=0;Object.values(o).forEach(n=>{typeof n=="object"&&Object.values(n).length?s+=Object.values(n).length:s++}),s&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach(n=>{n.innerHTML+=`(${s})`,n.parentNode.classList.add("hover")}),e.classList.add("table--filtered");for(const[n,m]of Object.entries(o))Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach(c=>{let u=!1;m.forEach(h=>{const A=c.querySelector(`[data-label="${n}"]`);if(h.includes("-date-from")){const p=new Date(h.replace("-date-from","")),f=new Date(A.textContent.toLowerCase());p.setHours(0,0,0,0),f.setHours(0,0,0,0),f<p?(c.classList.add("less-than-from-date"),u=!1):!c.classList.contains("less-than-from-date")&&!c.classList.contains("greater-than-to-date")&&(u=!0)}else if(h.includes("-date-to")){const p=new Date(h.replace("-date-to","")),f=new Date(A.textContent.toLowerCase());p.setHours(0,0,0,0),f.setHours(0,0,0,0),f>p?(c.classList.add("greater-than-to-date"),u=!1):!c.classList.contains("less-than-from-date")&&!c.classList.contains("greater-than-to-date")&&(u=!0)}if(h&&h=="$today")h=H("date",new Date);else if(h&&h=="$yesterday"){const p=new Date;p.setDate(p.getDate()-1),h=H("date",p)}else if(h&&(h=="$thisWeek"||h=="$lastWeek")){const p=new Date,f=new Date(p.setDate(p.getDate()-(p.getDay()-1))),v=new Date(p.setDate(p.getDate()-p.getDay()+7)),x=new Date(A.textContent.toLowerCase());if(p.setHours(0,0,0,0),f.setHours(0,0,0,0),v.setHours(0,0,0,0),x.setHours(0,0,0,0),h=="$thisWeek")u=x>=f&&x<=v;else{const g=new Date(f.setDate(f.getDate()-7)),y=new Date(v.setDate(v.getDate()-7));g.setHours(0,0,0,0),y.setHours(0,0,0,0),u=x>=g&&x<=y}}else if(h&&h=="$thisMonth"){const p=new Date,f=p.getFullYear(),v=p.getMonth(),x=new Date(f,v,1),g=new Date(f,v+1,0),y=new Date(A.textContent.toLowerCase());x.setHours(0,0,0,0),g.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=x&&y<=g}else if(h&&h=="$lastMonth"){const p=new Date,f=p.getFullYear(),v=p.getMonth(),x=new Date(f,v-1,1),g=new Date(f,v,0),y=new Date(A.textContent.toLowerCase());x.setHours(0,0,0,0),g.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=x&&y<=g}A&&A.textContent.toLowerCase().includes(h.replace("-"," ").toLowerCase())&&(u=!0)}),u||(c.classList.add("filtered"),c.setAttribute("data-filtered-by",n))});Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach(n=>{let m=!(l.length>0&&l[0].value.length>=3);l.forEach(c=>{const u=n.querySelector(`[data-label="${c.column}"]`);u&&c.value.length>=3&&u.textContent.toLowerCase().includes(c.value.toLowerCase())&&(m=!0)}),m||n.classList.add("filtered")}),Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach(n=>{r++,n.classList.add("filtered--matched"),Math.ceil(r/d)==parseInt(b)&&n.classList.add("filtered--show")}),i&&(i.setAttribute("data-total",r),i.setAttribute("data-show",d),i.setAttribute("data-page",b))},B=(a,e,t)=>{Array.from(t.querySelectorAll("[data-query]")).forEach(o=>{const l=o.getAttribute("data-query");let r=0;if(l=="total")a.hasAttribute("data-total")?r=a.getAttribute("data-total"):r=(e.classList.contains("table--filtered"),e.querySelectorAll("tbody tr").length);else if(!l.includes(" == ")&&l.includes(" & ")){const b=l.split(" & ");let d="";b.forEach(s=>{d+=`:not([data-filtered-by="${s}"])`}),r=Array.from(e.querySelectorAll(`tbody tr${d}`)).length}else if(!l.includes(" == "))r=Array.from(e.querySelectorAll(`tbody tr:not([data-filtered-by="${l}"])`)).length;else if(l.includes(" && ")){const b=l.split(" && ");r=Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let s=!0;for(const n of Object.entries(b)){const m=n.split(" == ");(!d.querySelector(`td[data-label="${m[0]}"]`)||d.querySelector(`td[data-label="${m[0]}"]`).textContent!=`${m[1]}`)&&(s=!1)}return s}).length}else{const b=l.split(" == ");r=Array.from(e.querySelectorAll(`tbody tr.filtered--matched td[data-label="${b[0]}"], tbody tr[data-filtered-by="${b[0]}"] td[data-label="${b[0]}"]`)).filter(function(d){return d.textContent===b[1]}).length}o.hasAttribute("data-total")?o.setAttribute("data-total",r):o.innerHTML=r})},nt=(a,e,t,i)=>{t.setAttribute("method","get");const o=a.querySelector("iam-actionbar");o&&o.addEventListener("change",l=>{t.submit()})},dt=(a,e,t,i)=>{E(a,e,t,i);const o=a.querySelector("iam-actionbar");t.addEventListener("submit",l=>{E(a,e,t,i),l.preventDefault()}),o&&o.addEventListener("change",l=>{E(a,e,t,i)})},E=function(a,e,t,i){return X(this,void 0,void 0,function*(){a.querySelector("iam-actionbar")&&!a.querySelector("iam-actionbar").closest("form")&&(t.querySelector(".duplicate-actionbar")||t.insertAdjacentHTML("beforeend",'<div class="duplicate-actionbar" style="visibility: hidden; pointer-events: none; position: absolute;"></div>'),t.querySelector(".duplicate-actionbar").innerHTML=a.querySelector("iam-actionbar").innerHTML),t.querySelector("input[name=show]")||t.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${a.getAttribute("data-show")}" />`),t.querySelector("input[name=page]")||t.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${a.getAttribute("data-page")}" />`),t.querySelector("input[name=page]").value=a.getAttribute("data-page"),t.querySelector("input[name=show]").value=a.getAttribute("data-show");const o=new FormData(t),l=new URLSearchParams(o).toString(),r=e.querySelectorAll("thead tr th:not(.expand-button-heading)"),b=e.querySelector("tbody"),d=t.getAttribute("data-ajax");a.classList.add("table--loading");const s=z(t);Array.from(t.querySelectorAll("[data-filter-count]")).forEach(c=>{c.innerHTML="",c.parentNode.classList.remove("hover")});let n=0;Object.values(s).forEach(c=>{typeof c=="object"&&Object.values(c).length?n+=Object.values(c).length:n++}),n&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach(c=>{c.innerHTML+=`(${n})`,c.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[d]&&window.controller[d].abort(),window.controller[d]=new AbortController;const{signal:m}=controller[d];i.setAttribute("data-loading","true"),t.classList.add("processing");try{yield fetch(d+"?"+l,{signal:m,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(c=>c.json()).then(c=>{const u=t.hasAttribute("data-schema")?t.getAttribute("data-schema"):"data",h=t.hasAttribute("data-schema-total")?t.getAttribute("data-schema-total"):"meta.total",A=t.hasAttribute("data-schema-page")?t.getAttribute("data-schema-page"):"meta.current_page",p=L(c,h,15),f=L(c,A,1),v=L(c,u),x=a.hasAttribute("data-empty-msg")?a.getAttribute("data-empty-msg"):"No results found";v?(b.innerHTML="",v.forEach(g=>{const y=document.createElement("tr");r.forEach(w=>{let k="";const _=document.createElement("td");if(_.setAttribute("data-label",w.innerText),w.getAttribute("data-output")&&(k=w.getAttribute("data-output").replace(new RegExp(/{(.*?)}/,"gm"),function(M){return L(g,M.replace("{","").replace("}",""))})),w.hasAttribute("data-output-array")){const T=w.getAttribute("data-output"),M=L(g,T.replace("{","").replace("}",""));k="",M.forEach(j=>{const W=w.getAttribute("data-output-array");let S="";if(w.hasAttribute("data-output-array-property")&&w.hasAttribute("data-output-array-transform")){const C=L(j,w.getAttribute("data-output-array-property")),V=JSON.parse(w.getAttribute("data-output-array-transform"))[C];S=W.replace(`{${w.getAttribute("data-output-array-property")}}`,V)}S=S.replace(new RegExp(/{(.*?)}/,"gm"),function(C){return L(j,C.replace("{","").replace("}",""))}),k+=S})}w.hasAttribute("data-transform")&&(k=JSON.parse(w.getAttribute("data-transform"))[k],!k&&w.hasAttribute("data-default")&&(k=w.getAttribute("data-default"))),_.innerHTML=k,y.appendChild(_)}),b.appendChild(y)}),a.setAttribute("data-total",parseInt(p)),a.setAttribute("data-page",parseInt(f)),i.setAttribute("data-total",p),i.setAttribute("data-page",f),Array.from(t.querySelectorAll("[data-ajax-query]")).forEach(g=>{const y=L(c,g.getAttribute("data-ajax-query"),"");g.hasAttribute("data-total")?g.setAttribute("data-total",y):g.innerHTML=y}),parseInt(p)==0&&(b.innerHTML=`<tr><td colspan="100%"><span>${x}</span></td></tr>`),a.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:d,formData:l}),F(a,e,t,i),R(a,e,t,i)):b.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',i.removeAttribute("data-loading"),t.classList.remove("processing")})}catch(c){console.log(c)}})};class bt 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>
|