@iamproperty/components 7.7.1--beta2 → 7.7.1--beta3
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/advanced-select/advanced-select.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/calendar/calendar.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/config/config.component.min.js +1 -1
- package/assets/js/components/content/content.component.min.js +1 -1
- package/assets/js/components/darkmode/darkmode.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/form/form.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/input/input.component.min.js +1 -1
- package/assets/js/components/input-range/input-range.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/milestone/milestone.component.min.js +1 -1
- package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
- package/assets/js/components/modal/modal.component.min.js +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multi-step-modal/multi-step-modal.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/password/password.component.min.js +1 -1
- package/assets/js/components/popover/popover.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.min.js +1 -1
- package/assets/js/components/rating/rating.component.min.js +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/split-button/split-button.component.min.js +1 -1
- package/assets/js/components/std-address-lookup/std-address-lookup.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/tag/tag.component.min.js +1 -1
- package/assets/js/components/tooltip/tooltip.component.min.js +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components/video-modal/video-modal.component.min.js +1 -1
- package/assets/js/components/word-count/word-count.component.min.js +1 -1
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const c=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})},r=(i,o,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),n.forEach(d=>{i.addEventListener(d,function(e){const t={event:d,element:o,target:e.target};Object.keys(e.detail).forEach(a=>{const s=e.detail[a];t[a]=s}),window.dataLayer.push(t)})}),!0);c("iam-accordion");class l extends HTMLElement{constructor(){var o;super(),this.attachShadow({mode:"open"});const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const F=(h=1)=>Math.floor(Math.random()*Date.now()*(h+1));class D extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function M(p){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var b in s)p[b]=s[b]}return p}var at={read:function(p){return p[0]==='"'&&(p=p.slice(1,-1)),p.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(p){return encodeURIComponent(p).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function X(p,a){function s(e,m,l){if(!(typeof document>"u")){l=M({},a,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var v="";for(var t in l)l[t]&&(v+="; "+t,l[t]!==!0&&(v+="="+l[t].split(";")[0]));return document.cookie=e+"="+p.write(m,e)+v}}function b(e){if(!(typeof document>"u"||arguments.length&&!e)){for(var m=document.cookie?document.cookie.split("; "):[],l={},v=0;v<m.length;v++){var t=m[v].split("="),o=t.slice(1).join("=");try{var d=decodeURIComponent(t[0]);if(l[d]=p.read(o,d),e===d)break}catch{}}return e?l[e]:l}}return Object.create({set:s,get:b,remove:function(e,m){s(e,"",M({},m,{expires:-1}))},withAttributes:function(e){return X(this.converter,M({},this.attributes,e))},withConverter:function(e){return X(M({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(p)}})}var it=X(at,{path:"/"});function ot(p,a,s,b=!1){let e=-1;s.closest(".datalist__wrapper")&&s.closest(".datalist__wrapper"),a.setAttribute("data-list",a.getAttribute("list")),a.setAttribute("list",""),a.hasAttribute("placeholder")&&a.setAttribute("data-placeholder",a.getAttribute("placeholder")),a.hasAttribute("placeholder")&&a.setAttribute("data-original-placeholder",a.getAttribute("placeholder")),a.addEventListener("focus",function(){a.value!=""&&(a.setAttribute("placeholder",a.value),a.setAttribute("data-value",a.value)),a.value=""}),a.addEventListener("keyup",function(){a.value!=""&&a.setAttribute("data-value",a.value)}),a.addEventListener("blur",function(){a.hasAttribute("data-value")&&(a.value=a.getAttribute("data-value")),a.hasAttribute("data-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-placeholder"))});for(const o of s.options)o.innerHTML==""&&(o.innerHTML=o.value);s.addEventListener("click",function(o){if(o&&o.target instanceof HTMLElement&&o.target.closest("option")){const d=o.target.closest("option");a.value=d.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(a);for(const L of s.options)L.classList.remove("active");d.classList.add("active"),setTimeout(()=>{p.dispatchEvent(new CustomEvent("update-value",{detail:{value:d.value}}))},0)}}),a.addEventListener("input",function(){if(a.removeAttribute("data-value"),e=-1,p.tagName!="IAM-ADDRESS-LOOKUP"){const o=a.value.toUpperCase();for(const d of s.options)d.value.toUpperCase().indexOf(o)>-1?(d.style.display="block",d.classList.remove("hide")):(d.style.display="none",d.classList.add("hide"))}}),p.addEventListener("keydown",function(o){o.keyCode==40?(e++,m(s.options)):o.keyCode==38?(e--,m(s.options)):o.keyCode==13&&(o.preventDefault(),e>-1&&s.options&&s.options[e].click())});function m(o){if(!o)return!1;l(o),e>=o.length&&(e=0),e<0&&(e=o.length-1),o[e].classList.add("active")}function l(o){if(!o)return!1;for(let d=0;d<o.length;d++)o[d].classList.remove("active")}a.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const v=()=>{a.removeAttribute("placeholder"),a.hasAttribute("data-original-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-original-placeholder")),a.removeAttribute("data-value"),a.value="";for(const d of s.options)d.classList.remove("active"),d.removeAttribute("style");const o=new CustomEvent("close-button-pressed");p.dispatchEvent(o)};(p.querySelector(".empty")?p.querySelector(".empty"):p.shadowRoot.querySelector(".empty")).addEventListener("click",function(o){v()}),p.addEventListener("empty",function(o){v()})}const rt=p=>/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(p.trim());var V=function(p,a,s,b){function e(m){return m instanceof s?m:new s(function(l){l(m)})}return new(s||(s=Promise))(function(m,l){function v(d){try{o(b.next(d))}catch(L){l(L)}}function t(d){try{o(b.throw(d))}catch(L){l(L)}}function o(d){d.done?m(d.value):e(d.value).then(v,t)}o((b=b.apply(p,a||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class nt extends HTMLElement{constructor(){var a;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function v(a,t,o,s=!1){let r=-1;o.closest(".datalist__wrapper")&&o.closest(".datalist__wrapper"),t.setAttribute("data-list",t.getAttribute("list")),t.setAttribute("list",""),t.hasAttribute("placeholder")&&t.setAttribute("data-placeholder",t.getAttribute("placeholder")),t.hasAttribute("placeholder")&&t.setAttribute("data-original-placeholder",t.getAttribute("placeholder")),t.addEventListener("focus",function(){t.value!=""&&(t.setAttribute("placeholder",t.value),t.setAttribute("data-value",t.value)),t.value=""}),t.addEventListener("keyup",function(){t.value!=""&&t.setAttribute("data-value",t.value)}),t.addEventListener("blur",function(){t.hasAttribute("data-value")&&(t.value=t.getAttribute("data-value")),t.hasAttribute("data-placeholder")&&t.setAttribute("placeholder",t.getAttribute("data-placeholder"))});for(const e of o.options)e.innerHTML==""&&(e.innerHTML=e.value);o.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("option")){const n=e.target.closest("option");t.value=n.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(t);for(const l of o.options)l.classList.remove("active");n.classList.add("active"),setTimeout(()=>{a.dispatchEvent(new CustomEvent("update-value",{detail:{value:n.value}}))},0)}}),t.addEventListener("input",function(){if(t.removeAttribute("data-value"),r=-1,a.tagName!="IAM-ADDRESS-LOOKUP"){const e=t.value.toUpperCase();for(const n of o.options)n.value.toUpperCase().indexOf(e)>-1?(n.style.display="block",n.classList.remove("hide")):(n.style.display="none",n.classList.add("hide"))}}),a.addEventListener("keydown",function(e){e.keyCode==40?(r++,c(o.options)):e.keyCode==38?(r--,c(o.options)):e.keyCode==13&&(e.preventDefault(),r>-1&&o.options&&o.options[r].click())});function c(e){if(!e)return!1;i(e),r>=e.length&&(r=0),r<0&&(r=e.length-1),e[r].classList.add("active")}function i(e){if(!e)return!1;for(let n=0;n<e.length;n++)e[n].classList.remove("active")}t.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const u=()=>{t.removeAttribute("placeholder"),t.hasAttribute("data-original-placeholder")&&t.setAttribute("placeholder",t.getAttribute("data-original-placeholder")),t.removeAttribute("data-value"),t.value="";for(const n of o.options)n.classList.remove("active"),n.removeAttribute("style");const e=new CustomEvent("close-button-pressed");a.dispatchEvent(e)};(a.querySelector(".empty")?a.querySelector(".empty"):a.shadowRoot.querySelector(".empty")).addEventListener("click",function(e){u()}),a.addEventListener("empty",function(e){u()})}const f=a=>a.replace(/ /g,"_"),b=function(a){return a=a.toLowerCase(),a=f(a),a=a.replace(/\W/g,""),a};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Advanced select"});class h 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`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function E(t,m){const g=t.closest("dialog"),b=(e,o,r=!1)=>{let s=!1,a=o.getAttribute("name");if(!a)return!1;a.includes("[]")&&(a=a.replace("[]",`[${o.value}]`));let l=e.querySelector(`[data-name="${a}"]`);l&&o.getAttribute("type")=="checkbox"&&(s=!o.checked);const c=o.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),e.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),r||l.classList.add("tag--not-set"),l.setAttribute("data-name",a),l.innerHTML=c.replace("$value",o.value),(!o.value||s)&&l.remove(),o.parentNode.closest("[data-filter-text]")){const i=o.parentNode.closest("[data-filter-text]");let v=!0;if(a="",i.querySelectorAll("input").forEach((u,n)=>{const p=u.getAttribute("name");if(a+=`${n!=0?",":""}${p}`,e.querySelector(`[data-name="${p}"]`)&&e.querySelector(`[data-name="${p}"]`).remove(),u.value){const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r||l.classList.add("tag--not-set"),d.setAttribute("data-name",p),d.innerHTML=c.replace("$value",u.value),e.appendChild(d)}else v=!1}),e.querySelector(`[data-name="${a}"]`)&&e.querySelector(`[data-name="${a}"]`).remove(),v){let u=i.getAttribute("data-filter-text");i.querySelectorAll("input").forEach((p,d)=>{const y=p.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),u=u.replace(`$${d+1}`,p.value)});const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r||l.classList.add("tag--not-set"),n.setAttribute("data-name",a),n.innerHTML=u,e.appendChild(n)}}},f=(e=!1)=>{m.innerHTML="",Array.from(t.querySelectorAll('input:is([type="checkbox"],[type="radio"]):checked, input:not([type="checkbox"], [type="radio"])')).forEach(o=>{b(m,o,e)})};f(!0),Array.from(t.querySelectorAll("input[data-filter-text]")).forEach(e=>{e.addEventListener("change",function(o){var r;const s=!t.closest("dialog");if(!t.hasAttribute("data-keep-same")&&!t.querySelector("dialog")&&b(m,e,s),s){const a=new CustomEvent("update");(r=t.parentElement.closest("iam-applied-filters"))===null||r===void 0||r.dispatchEvent(a)}})});const h=e=>{if(!e?.hasAttribute("data-name"))return!1;const o=e.getAttribute("data-name").split(",");for(let r=0;r<o.length;r++){const s=o[r];let a=`[name="${s}"]`;s.match(/\[(.*)\]/)&&(a=`[value="${s.replace(/.*\[(.*)\]/,"$1")}"]`);const l=t.querySelectorAll(a);for(let c=0;c<l.length;c++){const i=l[c];i.getAttribute("type")!="radio"&&i.getAttribute("type")!="checkbox"?i.value="":i.checked=!1;const v=new CustomEvent("change");i?.dispatchEvent(v)}}e.remove(),f()};if(m.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const o=e.target.closest(".filter"),r=o.getAttribute("data-name");h(o);const s=new CustomEvent("filter-clicked",{detail:r});if(t.dispatchEvent(s),t.querySelector("dialog iam-applied-filters")){const a=new CustomEvent("filter",{detail:r});t.querySelector("dialog iam-applied-filters").dispatchEvent(a)}}},!1),t.addEventListener("filter",e=>{const o=t.shadowRoot.querySelector(`[data-name="${e.detail}"]`);h(o)}),t.addEventListener("set-filters",e=>{f(!0)}),g){const e=t.querySelector(".btn-primary")?t.querySelector(".btn-primary"):t.shadowRoot.querySelector(".btn-primary");e?.addEventListener("click",o=>{const r=new CustomEvent("update"),s=new CustomEvent("submit");if(t.dispatchEvent(s),t.parentElement.closest("iam-applied-filters")&&t.parentElement.closest("iam-applied-filters").dispatchEvent(r),t.parentElement&&t.parentElement.closest("iam-applied-filters")&&!t.parentElement.closest("iam-applied-filters").closest("dialog")){const a=new CustomEvent("set-filters");t.parentElement.closest("iam-applied-filters").dispatchEvent(a)}if(f(!0),!t.querySelector(".btn-primary").hasAttribute("command")){g.close();const a=new Event("close");g.dispatchEvent(a)}})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const m=this.classList.toString(),g=document.createElement("template");g.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const M=t=>t.charAt(0).toUpperCase()+t.slice(1),q=t=>t.replace(/_/g," "),N=(t,r)=>{for(let a=1;a<=10;a++){if(t.hasAttribute(`data-colour-${a}`)){const o=t.getAttribute(`data-colour-${a}`);t.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${o})`),t.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${o}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${a}]`)).forEach(o=>{const e=o.getAttribute(`data-colour-${a}`);o.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${e})`),o.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${e}-hover)`)})}return!0},k=(t,r,a)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return R(t,r,a),!0;const o=r.querySelector(".chart__key");o.innerHTML="";const e=r.querySelector(".chart__guidelines");e.innerHTML="";const i=r.querySelector(".chart__yaxis");i.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(c=>{c.remove()});const{xaxis:n}=g(t);return A(t,a),T(r,a,o),X(t,e),E(t,i),n&&Y(r),!0},R=(t,r,a)=>{const o=r.querySelector(".chart__key");return o.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(e=>{e.remove()}),A(t,a),T(r,a,o),H(r),!0},V=function(t,r){const a=r.querySelector(".chart");a.addEventListener("mousemove",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest("td:not(:first-child")){const s=n.target.closest("td:not(:first-child").getBoundingClientRect(),d=n.clientX-s.left,l=n.clientY-s.top;a.setAttribute("style",`--cursor-x: ${d}px; --cursor-y: ${l}px;`)}});const o=r.querySelectorAll("label");Array.from(o).forEach(n=>{r.querySelector(`input#${n.getAttribute("for")}`).checked?n.setAttribute("part","key-checked"):n.setAttribute("part","key-unchecked")});const e=t.querySelector("table"),i=r.querySelector("table");r.addEventListener("change",function(n){const c=n.target,s=new CustomEvent("view-change",{detail:{"data-dataset":c.getAttribute("data-dataset"),label:c.getAttribute("data-label"),checked:c.checked}});t.dispatchEvent(s),Array.from(o).forEach(d=>{var l;!((l=r.querySelector(`input#${d.getAttribute("for")}`))===null||l===void 0)&&l.checked?d.setAttribute("part","key-checked"):d.setAttribute("part","key-unchecked")}),i.innerHTML=e.innerHTML,A(t,i),t.tagName=="IAM-DOUGHNUTCHART"&&H(r)})},U=function(t,r){const a=t.querySelector("table"),o=r.querySelector("table"),e=(s,d)=>{d.disconnect(),c.disconnect();for(const l of s)(l.attributeName=="class"||l.type==="attributes"||l.type==="attributes")&&(o.innerHTML=a.innerHTML,k(t,r,o));d.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},i=(s,d)=>{d.disconnect(),c.disconnect();for(const l of s)(l.type=="characterData"||l.type=="childList"&&l.addedNodes.length)&&(o.innerHTML=a.innerHTML,k(t,r,o));d.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},n=new MutationObserver(i),c=new MutationObserver(e);return n.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0}),!0};function C(t,r){r>1&&(t=t-.25);const a=Math.cos(2*Math.PI*t),o=Math.sin(2*Math.PI*t);return[a*100,o*100]}const g=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),a=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,o=t.hasAttribute("data-max")?t.getAttribute("data-max"):j(t,r),e=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],i=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],n=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:a,max:o,yaxis:e,xaxis:n,guidelines:i}};function j(t,r){const a=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",o=Array.from(r.querySelectorAll(a)).map(i=>i.getAttribute("data-numeric")),e=Math.max(...o);return Math.ceil(e)}const x=function(t,r,a,o){let e=String(t);e=e.replace("\xA3",""),e=e.replace("%",""),e=e.replace(",",""),e=Number.parseFloat(e);let i=(e-r)/(a-r)*100,n=i,c=0;return o&&o!=0&&(c=(o-r)/(a-r)*100),r<0&&(c=Math.abs(r/(a-r)*100),e<0?(i=c-i,c=c-i,n=c):(i=i-c,n=i+c)),{percent:i,axis:n,bottom:c}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(e=>{let i=0;Array.from(e.querySelectorAll("td:not(:first-child)")).forEach(n=>{const c=n.cloneNode(!0);Array.from(c.querySelectorAll("*")).forEach(l=>{l.remove()});const s=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));n.setAttribute("data-numeric",s),n.setAttribute("data-value",c.textContent),getComputedStyle(n).display!="none"&&(i+=s),Array.from(n.querySelectorAll("a, button")).forEach((l,m)=>{m==0&&l.insertAdjacentHTML("beforeBegin","<hr/>"),l.classList.add("btn"),l.classList.add("btn-tertiary")})}),e.setAttribute("data-numeric",i)});const{min:a,max:o}=g(t);Array.from(r.querySelectorAll("tbody tr")).forEach((e,i)=>{const n=e.querySelector("td:first-child, th:first-child")?e.querySelector("td:first-child, th:first-child").textContent:"";e.setAttribute("part","group");const c=(e.getAttribute("data-numeric")-a)/(o-a)*100;e.style.setProperty("--percent",`${c}%`),Array.from(e.querySelectorAll("td:not([data-label])")).forEach((l,m)=>{m==0?l.setAttribute("part","xaxis-label"):l.setAttribute("part","value"),e.querySelectorAll("td").length>2&&l.setAttribute("data-label",r.querySelectorAll("thead th")[m].textContent)});const s=e.hasAttribute("data-min")?e.getAttribute("data-min"):a,d=e.hasAttribute("data-max")?e.getAttribute("data-max"):o;if(s<0){const l=Math.abs(s/(d-s)*100);t.setAttribute("style",`--min-bottom: ${l}%;`)}e.style.setProperty("--row-index",i+1),Array.from(e.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(l=>{if(getComputedStyle(l).display=="none")return;const f=l.innerHTML,v=Number.parseFloat(l.getAttribute("data-numeric")),h=Number.parseFloat(l.getAttribute("data-start"));if(l.querySelector("span[data-group]")||(l.innerHTML=`<span data-group="${n}" ${l.hasAttribute("data-label")?`data-label="${l.getAttribute("data-label")}"`:""} part="popover">${f}</span>`),!l.hasAttribute("style")){const{percent:u,bottom:y,axis:p}=x(v,s,d,h);l.setAttribute("data-percent",u),l.setAttribute("style",`--bottom:${y}%;--percent:${u}%;--axis:${p}%;`)}})})},I=function(t){const r=t.querySelector(".chart__wrapper"),a=t.querySelector(".chart__spacer span"),o=t.querySelector(".chart table");let e="";Array.from(o.querySelectorAll("tbody tr td:first-child")).forEach(i=>{typeof i.textContent<"u"&&i.textContent.length>e.length&&(e=i.textContent)}),r.setAttribute("data-longest-label",e),a.innerHTML=e},B=function(t){const r=t.querySelector(".chart__wrapper"),a=t.querySelector(".chart table");let o="";Array.from(a.querySelectorAll("tbody tr td:not(:first-child)")).forEach(e=>{typeof e.getAttribute("data-value")<"u"&&e.getAttribute("data-value").length>o.length&&(o=e.getAttribute("data-value"))}),r.setAttribute("data-longest-value",o)},T=function(t,r,a){const o=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let e;const i=Array.from(r.querySelectorAll("thead th"));return i.forEach((n,c)=>{c!=0&&(e=K(o,c,n.textContent,a,t,e)),c==50&&(i.length=c+1)}),!0};function K(t,r,a,o,e,i){var n;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?e.prepend(c):e.insertBefore(c,i.nextSibling),i=c;const s=document.createElement("label");s.setAttribute("class","key btn btn-action"),s.setAttribute("for",`${t}-dataset-${r}`),s.setAttribute("data-label",`${a}`),s.setAttribute("part","key");const d=(n=e.querySelector(`tbody tr td:nth-child(${r+1})`))===null||n===void 0?void 0:n.getAttribute("data-numeric");return s.setAttribute("data-numeric",d),s.innerHTML=`${a}`,o.append(s),i}const X=function(t,r){const{min:a,max:o,yaxis:e}=g(t);let{guidelines:i}=g(t);i.length||(i=e),r.innerHTML="";for(let n=0;n<i.length;n++){const c=parseFloat(i[n].replace("\xA3","").replace("%","").replace(",","")),{axis:s}=x(c,a,o);r.innerHTML+=`<div class="guideline" style="--percent:${s}%;">${e.indexOf(i[n])!=-1?`<span>${i[n]}</span>`:""}</div>`}},E=function(t,r){const{min:a,max:o,yaxis:e}=g(t);r.innerHTML="";for(let i=0;i<e.length;i++){const n=parseFloat(e[i].replace("\xA3","").replace("%","")),{axis:c}=x(n,a,o);r.innerHTML+=`<div class="axis__point" style="--percent:${c}%;"><span>${e[i]}</span></div>`}},Y=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)},G=function(t){const r=t.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(r).forEach(a=>{const o=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;a.innerHTML=`<button class="tooltip" popovertarget="${o}" part="tooltip" style="anchor-name: --${o};">${a.textContent}</button><span id="${o}" style="position-anchor: --${o};" popover part="tooltip__content" class="tooltip__content">${a.getAttribute("title")}</span>`})},H=function(t){let r="";const a=t.querySelector(".chart");let o=t.querySelector(".doughnuts");o||(o=document.createElement("div"),o.setAttribute("class","doughnuts"),a.append(o)),Array.from(a.querySelectorAll("tbody tr")).forEach((e,i)=>{let n="",c="",s=0,d=0;const m=e.querySelectorAll("td")[0].innerHTML;let f=0;const v=e.getAttribute("data-numeric");Array.from(e.querySelectorAll("td")).forEach((h,u)=>{const y=getComputedStyle(h).display;if(u!=0&&y!="none"){let p=h.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),d+=p,f++}}),Array.from(e.querySelectorAll("td")).forEach((h,u)=>{var y,p;const _=getComputedStyle(h).display;if(u!=0&&f==1&&_!="none")n+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${h.getAttribute("style")} --path-index: ${u};"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(q(h.getAttribute("data-label"))).trim()}<br/>${h.hasAttribute("data-second")?`${h.getAttribute("data-second-label")}: ${h.getAttribute("data-second")}<br/>`:""}${(y=h.querySelector('[part="popover"]'))===null||y===void 0?void 0:y.innerHTML}</span>`;else if(u!=0){let b=h.getAttribute("data-numeric");const F=_=="none"?"display: none;":"";b=b.replace("\xA3",""),b=b.replace("%",""),b=b.replace(",",""),b=Number.parseInt(b);const w=b/d,[z,$]=C(s,f),[S,L]=C(s+w,f),D=w>.5?1:0,P=["M 0 0",`L ${z?z.toFixed(0):0} ${$?$.toFixed(0):0}`,`A 100 100 0 ${D} 1 ${S?S.toFixed(0):0} ${L?L.toFixed(0):0}`,"L 0 0"].join(" ");n+=`<path d="${P}" style="${h.getAttribute("style")} --path-index: ${u};${F}"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(q(h.getAttribute("data-label"))).trim()}<br/>${h.hasAttribute("data-second")?`${h.getAttribute("data-second-label")}: ${h.getAttribute("data-second")}<br/>`:""}${(p=h.querySelector('[part="popover"]'))===null||p===void 0?void 0:p.innerHTML}</span>`,_!="none"&&(s+=w)}}),r+=`<div class="doughnut">
|
|
5
5
|
<svg viewBox="-105 -105 210 210" preserveAspectRatio="none" style="--row-index: ${i+1};">${n}</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"bento-grid"});class n extends HTMLElement{constructor(){var o;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const P=M=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:M})},Y=(M,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(a=>{M.addEventListener(a,function(e){const r={event:a,element:t,target:e.target};Object.keys(e.detail).forEach(l=>{const d=e.detail[l];r[l]=d}),window.dataLayer.push(r)})}),!0),F=(M=1)=>Math.floor(Math.random()*Date.now()*(M+1));P("iam-calendar");class O extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=`<table class="table--day" role="presentation"><tbody>
|
|
5
5
|
<tr class="allday"><th>All day</th></tr>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const b=d=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:d})},h=(d,r,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:r}),a.forEach(t=>{d.addEventListener(t,function(c){const s={event:t,element:r,target:c.target};Object.keys(c.detail).forEach(p=>{const o=c.detail[p];s[p]=o}),window.dataLayer.push(s)})}),!0),u=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const M=function(o){const t=[];return Array.from(o.querySelectorAll(":scope > div")).forEach((n,e)=>{n.hasAttribute("data-thumbnail")&&(t[e]=n.getAttribute("data-thumbnail"))}),t},W=function(o,t){const n=o.querySelectorAll(":scope > div").length;let e="";for(let a=1;a<=n;a++){let r=null,i="";t.length&&t[a-1]?(i="has-thumbnail",r=`<img src="${t[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,e+=`<button class="control-${a} ${i}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return e},x=function(o,t){return t==1?o:Math.ceil(o/t)*t-t+1},z=function(o,t){return(o-1)/(t-1)*100},P=function(o){let t;const n=o.shadowRoot.querySelector(".carousel"),e=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),i=o.querySelectorAll(":scope > div").length;let p=e.clientWidth,y=o.querySelector(":scope > div").scrollWidth,g=Math.round(p/y);r.setAttribute("min",1),r.setAttribute("step",g);let h=x(i,g);r.setAttribute("max",h),r.value=1;let m=z(1,h);r.style.setProperty("--percent",m+"%");let f,A="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(A="touchend",L="touchstart"),e.addEventListener("scroll",function(){clearTimeout(t),t=setTimeout(function(){const c=e.clientWidth,s=e.scrollWidth,b=e.scrollLeft;let l=Math.round(b/s*i)+1;const v=o.querySelector(":scope > div").scrollWidth,w=o.querySelector(":scope > div:last-child").offsetLeft,_=e.scrollLeft+c+e.getBoundingClientRect().left>=w+60,u=Math.round(c/v),k=Math.ceil(i/u)*u-i;r.setAttribute("step",u),k>0&&_&&(l=Math.floor(i/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>i-u?n.querySelector(".btn-next").setAttribute("disabled","disabled"):n.querySelector(".btn-next").removeAttribute("disabled"),r.value=l,h=x(i,u),r.setAttribute("max",h),m=l/h*100,m=z(l,h),r.style.setProperty("--percent",m+"%")},100)},!1),a.addEventListener("click",function(c){for(let s=c.target;s&&s!=this;s=s.parentNode)if(typeof s.matches=="function"&&s.matches("button")){c.preventDefault(),Array.from(a.querySelectorAll("button")).forEach(v=>{v.removeAttribute("aria-current")}),s.setAttribute("aria-current",!0);const b=new CustomEvent("pip-clicked",{detail:{slide:s.getAttribute("data-slide")}});o.dispatchEvent(b);const l=o.querySelector(`:scope > *:nth-child(${s.getAttribute("data-slide")})`);e.scroll({top:0,left:l.offsetLeft-e.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(c){const s=e.clientWidth,b=o.querySelector(":scope > div").scrollWidth,l=Math.round(s/b),v=o.querySelector(":scope > div:last-child").offsetLeft,w=e.scrollLeft+s+e.getBoundingClientRect().left>=v+60,_=Math.ceil(i/l)*l-i,u=l-_,k=w&&_>0?u*b:e.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")}});o.dispatchEvent(E),c.preventDefault();const q=d.classList.contains("btn-prev")?e.scrollLeft-k:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(){clearInterval(f),f=setInterval(function(){p=e.clientWidth,y=o.querySelector(":scope > div").scrollWidth,g=Math.round(p/y),r.setAttribute("step",g),h=x(i,g),r.setAttribute("max",h),m=z(r.value,h),r.style.setProperty("--percent",m+"%")},10)}),r.addEventListener(A,function(){clearInterval(f)}),r.addEventListener("change",function(){clearInterval(f);const c=o.querySelector(`:scope > *:nth-child(${r.value})`);e.scroll({top:0,left:c?c.offsetLeft-e.getBoundingClientRect().left:0,behavior:"smooth"});const s=new CustomEvent("slider-changed",{detail:{slide:r.value}});o.dispatchEvent(s)},!1)},$=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},C=(o,t,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),n.forEach(e=>{o.addEventListener(e,function(a){const r={event:e,element:t,target:a.target};Object.keys(a.detail).forEach(i=>{const p=a.detail[i];r[i]=p}),window.dataLayer.push(r)})}),!0);$("iam-carousel");class I 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class m extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function k(m){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var l in c)m[l]=c[l]}return m}var B={read:function(m){return m[0]==='"'&&(m=m.slice(1,-1)),m.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(m){return encodeURIComponent(m).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function C(m,s){function c(t,a,o){if(!(typeof document>"u")){o=k({},s,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var e in o)o[e]&&(r+="; "+e,o[e]!==!0&&(r+="="+o[e].split(";")[0]));return document.cookie=t+"="+m.write(a,t)+r}}function l(t){if(!(typeof document>"u"||arguments.length&&!t)){for(var a=document.cookie?document.cookie.split("; "):[],o={},r=0;r<a.length;r++){var e=a[r].split("="),i=e.slice(1).join("=");try{var n=decodeURIComponent(e[0]);if(o[n]=m.read(i,n),t===n)break}catch{}}return t?o[t]:o}}return Object.create({set:c,get:l,remove:function(t,a){c(t,"",k({},a,{expires:-1}))},withAttributes:function(t){return C(this.converter,k({},this.attributes,t))},withConverter:function(t){return C(k({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(m)}})}var D=C(B,{path:"/"});const j=m=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:m})};var x=function(m,s,c,l){function t(a){return a instanceof c?a:new c(function(o){o(a)})}return new(c||(c=Promise))(function(a,o){function r(n){try{i(l.next(n))}catch(b){o(b)}}function e(n){try{i(l.throw(n))}catch(b){o(b)}}function i(n){n.done?a(n.value):t(n.value).then(r,e)}i((l=l.apply(m,s||[])).next())})};j("iam-config");class L extends HTMLElement{constructor(){var s,c;super(),this.getBucketsData=t=>{if(!t)return[];const a=[];return t.forEach(o=>{var r,e;typeof((r=o.attributes)===null||r===void 0?void 0:r.criteria)=="object"&&Array.isArray((e=o.attributes)===null||e===void 0?void 0:e.criteria)&&a.push(o)}),a},this.createBuckets=t=>(console.log(t),this.shadowRoot.querySelector("#buckets"),t?(t.forEach(a=>{this.createBucket(a)}),!0):!1),this.createBucket=t=>{const a=this.shadowRoot.querySelector("#buckets"),o=document.createElement("div");o.innerHTML=this.addBucketHTML(t),o.classList.add("bucket__wrapper"),a?.insertAdjacentElement("beforeend",o),this.createEditBucketsEvents(o);const r=o.querySelector(".criteria--container");return t.attributes&&(t.attributes.criteria.forEach(e=>{var i,n,b;const g=document.createElement("form");g.classList.add("criteria"),g.innerHTML=this.addCriteriaHTML(e.attributes),(i=g.querySelector('[name="attribute"]'))===null||i===void 0||(i.value=e.attributes.attribute),(n=g.querySelector('[name="rule"]'))===null||n===void 0||(n.value=e.attributes.rule),(b=g.querySelector('[name="match"]'))===null||b===void 0||(b.value=e.attributes.match),r?.appendChild(g)}),this.createForms(t.attributes.items,t.id)),o},this.addCriteriaHTML=t=>`<label>
|
|
5
5
|
<span class="visually-hidden">Attribute</span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Dark mode button"});class i extends HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>::slotted(.toggle):after{--icon: var(--icon-light);background:red;mask-image:var(--icon);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%;z-index:2}::slotted(.toggle.dark-theme):after{--icon: var(--icon-dark)}/*# sourceMappingURL=assets/css/components/darkmode.component.css.map */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const L=t=>t.charAt(0).toUpperCase()+t.slice(1),q=t=>t.replace(/_/g," "),R=(t,r)=>{for(let a=1;a<=10;a++){if(t.hasAttribute(`data-colour-${a}`)){const c=t.getAttribute(`data-colour-${a}`);t.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${c})`),t.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${c}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${a}]`)).forEach(c=>{const e=c.getAttribute(`data-colour-${a}`);c.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${e})`),c.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${e}-hover)`)})}return!0},w=(t,r,a)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return N(t,r,a),!0;const c=r.querySelector(".chart__key");c.innerHTML="";const e=r.querySelector(".chart__guidelines");e.innerHTML="";const i=r.querySelector(".chart__yaxis");i.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(n=>{n.remove()});const{xaxis:o}=v(t);return A(t,a),T(r,a,c),I(t,e),X(t,i),o&&K(r),!0},N=(t,r,a)=>{const c=r.querySelector(".chart__key");return c.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(e=>{e.remove()}),A(t,a),T(r,a,c),H(r),!0},j=function(t,r){const a=r.querySelector(".chart");a.addEventListener("mousemove",o=>{if(o&&o.target instanceof HTMLElement&&o.target.closest("td:not(:first-child")){const l=o.target.closest("td:not(:first-child").getBoundingClientRect(),d=o.clientX-l.left,h=o.clientY-l.top;a.setAttribute("style",`--cursor-x: ${d}px; --cursor-y: ${h}px;`)}});const c=r.querySelectorAll("label");Array.from(c).forEach(o=>{r.querySelector(`input#${o.getAttribute("for")}`).checked?o.setAttribute("part","key-checked"):o.setAttribute("part","key-unchecked")});const e=t.querySelector("table"),i=r.querySelector("table");r.addEventListener("change",function(o){const n=o.target,l=new CustomEvent("view-change",{detail:{"data-dataset":n.getAttribute("data-dataset"),label:n.getAttribute("data-label"),checked:n.checked}});t.dispatchEvent(l),Array.from(c).forEach(d=>{var h;!((h=r.querySelector(`input#${d.getAttribute("for")}`))===null||h===void 0)&&h.checked?d.setAttribute("part","key-checked"):d.setAttribute("part","key-unchecked")}),i.innerHTML=e.innerHTML,A(t,i),t.tagName=="IAM-DOUGHNUTCHART"&&H(r)})},B=function(t,r){const a=t.querySelector("table"),c=r.querySelector("table"),e=(l,d)=>{d.disconnect(),n.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(c.innerHTML=a.innerHTML,w(t,r,c));d.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0})},i=(l,d)=>{d.disconnect(),n.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(c.innerHTML=a.innerHTML,w(t,r,c));d.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0})},o=new MutationObserver(i),n=new MutationObserver(e);return o.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0}),!0};function C(t,r){r>1&&(t=t-.25);const a=Math.cos(2*Math.PI*t),c=Math.sin(2*Math.PI*t);return[a*100,c*100]}const v=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),a=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,c=t.hasAttribute("data-max")?t.getAttribute("data-max"):U(t,r),e=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],i=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],o=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:a,max:c,yaxis:e,xaxis:o,guidelines:i}};function U(t,r){const a=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",c=Array.from(r.querySelectorAll(a)).map(i=>i.getAttribute("data-numeric")),e=Math.max(...c);return Math.ceil(e)}const x=function(t,r,a,c){let e=String(t);e=e.replace("\xA3",""),e=e.replace("%",""),e=e.replace(",",""),e=Number.parseFloat(e);let i=(e-r)/(a-r)*100,o=i,n=0;return c&&c!=0&&(n=(c-r)/(a-r)*100),r<0&&(n=Math.abs(r/(a-r)*100),e<0?(i=n-i,n=n-i,o=n):(i=i-n,o=i+n)),{percent:i,axis:o,bottom:n}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(e=>{let i=0;Array.from(e.querySelectorAll("td:not(:first-child)")).forEach(o=>{const n=o.cloneNode(!0);Array.from(n.querySelectorAll("*")).forEach(h=>{h.remove()});const l=parseFloat(n.textContent.replace("\xA3","").replace("%","").replace(",",""));o.setAttribute("data-numeric",l),o.setAttribute("data-value",n.textContent),getComputedStyle(o).display!="none"&&(i+=l),Array.from(o.querySelectorAll("a, button")).forEach((h,b)=>{b==0&&h.insertAdjacentHTML("beforeBegin","<hr/>"),h.classList.add("btn"),h.classList.add("btn-tertiary")})}),e.setAttribute("data-numeric",i)});const{min:a,max:c}=v(t);Array.from(r.querySelectorAll("tbody tr")).forEach((e,i)=>{const o=e.querySelector("td:first-child, th:first-child")?e.querySelector("td:first-child, th:first-child").textContent:"";e.setAttribute("part","group");const n=(e.getAttribute("data-numeric")-a)/(c-a)*100;e.style.setProperty("--percent",`${n}%`),Array.from(e.querySelectorAll("td:not([data-label])")).forEach((h,b)=>{b==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),e.querySelectorAll("td").length>2&&h.setAttribute("data-label",r.querySelectorAll("thead th")[b].textContent)});const l=e.hasAttribute("data-min")?e.getAttribute("data-min"):a,d=e.hasAttribute("data-max")?e.getAttribute("data-max"):c;if(l<0){const h=Math.abs(l/(d-l)*100);t.setAttribute("style",`--min-bottom: ${h}%;`)}e.style.setProperty("--row-index",i+1),Array.from(e.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")),s=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${o}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${g}</span>`),!h.hasAttribute("style")){const{percent:m,bottom:y,axis:p}=x(_,l,d,s);h.setAttribute("data-percent",m),h.setAttribute("style",`--bottom:${y}%;--percent:${m}%;--axis:${p}%;`)}})})},T=function(t,r,a){const c=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let e;const i=Array.from(r.querySelectorAll("thead th"));return i.forEach((o,n)=>{n!=0&&(e=V(c,n,o.textContent,a,t,e)),n==50&&(i.length=n+1)}),!0};function V(t,r,a,c,e,i){var o;const n=document.createElement("input");n.setAttribute("name",`${t}-dataset-${r}`),n.setAttribute("id",`${t}-dataset-${r}`),n.setAttribute("data-dataset",`${r}`),n.setAttribute("data-label",`${a}`),n.checked=!0,n.setAttribute("type","checkbox"),r==1?e.prepend(n):e.insertBefore(n,i.nextSibling),i=n;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 d=(o=e.querySelector(`tbody tr td:nth-child(${r+1})`))===null||o===void 0?void 0:o.getAttribute("data-numeric");return l.setAttribute("data-numeric",d),l.innerHTML=`${a}`,c.append(l),i}const I=function(t,r){const{min:a,max:c,yaxis:e}=v(t);let{guidelines:i}=v(t);i.length||(i=e),r.innerHTML="";for(let o=0;o<i.length;o++){const n=parseFloat(i[o].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=x(n,a,c);r.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${e.indexOf(i[o])!=-1?`<span>${i[o]}</span>`:""}</div>`}},X=function(t,r){const{min:a,max:c,yaxis:e}=v(t);r.innerHTML="";for(let i=0;i<e.length;i++){const o=parseFloat(e[i].replace("\xA3","").replace("%","")),{axis:n}=x(o,a,c);r.innerHTML+=`<div class="axis__point" style="--percent:${n}%;"><span>${e[i]}</span></div>`}},K=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)},H=function(t){let r="";const a=t.querySelector(".chart");let c=t.querySelector(".doughnuts");c||(c=document.createElement("div"),c.setAttribute("class","doughnuts"),a.append(c)),Array.from(a.querySelectorAll("tbody tr")).forEach((e,i)=>{let o="",n="",l=0,d=0;const b=e.querySelectorAll("td")[0].innerHTML;let g=0;const _=e.getAttribute("data-numeric");Array.from(e.querySelectorAll("td")).forEach((s,m)=>{const y=getComputedStyle(s).display;if(m!=0&&y!="none"){let p=s.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),d+=p,g++}}),Array.from(e.querySelectorAll("td")).forEach((s,m)=>{var y,p;const f=getComputedStyle(s).display;if(m!=0&&g==1&&f!="none")o+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${s.getAttribute("style")} --path-index: ${m};"></path>`,n+=`<span class="h5 mb-0" part="popover">${L(q(s.getAttribute("data-label"))).trim()}<br/>${s.hasAttribute("data-second")?`${s.getAttribute("data-second-label")}: ${s.getAttribute("data-second")}<br/>`:""}${(y=s.querySelector('[part="popover"]'))===null||y===void 0?void 0:y.innerHTML}</span>`;else if(m!=0){let u=s.getAttribute("data-numeric");const F=f=="none"?"display: none;":"";u=u.replace("\xA3",""),u=u.replace("%",""),u=u.replace(",",""),u=Number.parseInt(u);const k=u/d,[$,z]=C(l,g),[S,M]=C(l+k,g),P=k>.5?1:0,D=["M 0 0",`L ${$?$.toFixed(0):0} ${z?z.toFixed(0):0}`,`A 100 100 0 ${P} 1 ${S?S.toFixed(0):0} ${M?M.toFixed(0):0}`,"L 0 0"].join(" ");o+=`<path d="${D}" style="${s.getAttribute("style")} --path-index: ${m};${F}"></path>`,n+=`<span class="h5 mb-0" part="popover">${L(q(s.getAttribute("data-label"))).trim()}<br/>${s.hasAttribute("data-second")?`${s.getAttribute("data-second-label")}: ${s.getAttribute("data-second")}<br/>`:""}${(p=s.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: ${i+1};">${o}</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function f(l,a){const d=a.querySelector(".files"),n=a.querySelector(".drop-area"),e=l.querySelector("input"),b=l.hasAttribute("data-maxsize")?l.getAttribute("data-maxsize"):0,h=a.querySelector(".invalid-feedback.size"),u=a.querySelector(".invalid-feedback.ext"),o=e.cloneNode();n.append(o);const g=function(t){if(!e.hasAttribute("accept"))return!0;const i=t.split(".").pop();return!!e.getAttribute("accept").includes(i)};if(a.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(u.classList.remove("d-block"),h.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const i=new DataTransfer,{files:s}=e,r=t.target.closest(".files button");for(let p=0;p<s.length;p++){const v=s[p];v.name!=r.getAttribute("data-file")&&i.items.add(v)}e.files=i.files;const m=new Event("change");e.dispatchEvent(m);const c=new CustomEvent("fileRemoved",{detail:{removedFile:r?.dataset.file}});l.dispatchEvent(c)}}),o.addEventListener("change",()=>{if(e.hasAttribute("multiple")){const i=[...e.files,...o.files],s=[],r=new DataTransfer;for(let m=0;m<i.length;m++){const c=i[m],p=c.size/1e3;!s.includes(c.name)&&(b==0||p<b)&&g(c.name)&&r.items.add(c),g(c.name)||u.classList.add("d-block"),p>b&&h.classList.add("d-block"),s.push(c.name)}e.files=r.files}else e.files=o.files;const t=new Event("change");e.dispatchEvent(t)}),o.addEventListener("dragenter",()=>{o.classList.add("focus")}),o.addEventListener("dragleave",()=>{o.classList.remove("focus")}),o.addEventListener("drop",()=>{o.classList.remove("focus")}),e.addEventListener("change",()=>{if(e.files.length==1){const i=e.files[0],s=i.size/1e3;if(!g(i.name)){u.classList.add("d-block");const r=new DataTransfer;e.files=r.files}if(s>b){h.classList.add("d-block");const r=new DataTransfer;e.files=r.files}}d.innerHTML="";for(const i of e.files)d.innerHTML+=`<span class="file" part="file">${i.name} <button data-file="${i.name}" part="file__remove">Remove</button></span>`;const t=new CustomEvent("elementchange",{detail:{files:e.files}});if(l.dispatchEvent(t),e.files.length==0){const i=new CustomEvent("empty");l.dispatchEvent(i)}}),l.hasAttribute("data-filename")){const t=l.getAttribute("data-filename");t&&(d.innerHTML=`<span class="file" part="file">${t} <button data-file="${t}" part="file__remove">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},p=(a,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(e=>{a.addEventListener(e,function(i){const r={event:e,element:t,target:i.target};Object.keys(i.detail).forEach(d=>{const s=i.detail[d];r[d]=s}),window.dataLayer.push(r)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};o("iam-tag");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<div class="wrapper">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class v extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const q=k=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:k})};q("iam-iamPrefix");class _ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=s=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:s})};o("iam-iamPrefix");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class e extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const l=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},m=(t,n,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),a.forEach(e=>{t.addEventListener(e,function(s){const d={event:e,element:n,target:s.target};Object.keys(s.detail).forEach(o=>{const i=s.detail[o];d[o]=i}),window.dataLayer.push(d)})}),!0),p=function(t){const n=t.dataset.status;if(!n)return;const a=t.shadowRoot.querySelector(".milestone-wrap"),e=document.createElement("span");e.setAttribute("part","status"),e.classList.add("milestone-status"),e.innerHTML=`${n} Step`,n==="Current"&&t.classList.add("current"),a.insertAdjacentElement("afterbegin",e)},u=function(t){const n=t.shadowRoot.querySelector(".task-wrap"),a=t.dataset.items?JSON.parse(t.dataset.items):[];a.length&&(a.forEach(e=>{const s=document.createElement("details"),d=document.createElement("summary"),o=document.createElement("div"),i=document.createElement("p");o.classList.add("task-details"),d.innerHTML=e.name,e.date_completed&&d.classList.add("complete"),s.appendChild(d),e.description&&(i.innerHTML=e.description,o.appendChild(i)),e.actions.length&&o.appendChild(h(e.actions,d)),s.appendChild(o),n.insertAdjacentElement("beforeend",s),s.addEventListener("click",()=>{s?.hasAttribute("open")?r("milestone-item-closed",e.name,t):r("milestone-item-opened",e.name,t)})}),t.appendChild(n))},r=function(t,n,a){const e=new CustomEvent(t,{detail:{title:n}});a.dispatchEvent(e)},h=function(t,n){const a=document.createElement("ul"),e=t.length,d=t.filter(o=>o.date_completed).length||0;if(!(e<1))return n.innerHTML+=` (${d}/${e})`,t.forEach(o=>{const i=document.createElement("li"),c=document.createElement("span");o.date_completed&&(i.classList.add("complete"),c.classList.add("action-date"),c.innerHTML=o.date_completed),i.innerHTML=o.action,i.appendChild(c),a.appendChild(i)}),a},w=function(t){p(t),u(t)};l("iam-milestone");class L extends HTMLElement{constructor(){var n;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const r=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},l=(t,s,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:s}),e.forEach(n=>{t.addEventListener(n,function(o){const a={event:n,element:s,target:o.target};Object.keys(o.detail).forEach(i=>{const d=o.detail[i];a[i]=d}),window.dataLayer.push(a)})}),!0),u=function(t){if(!t.dataset.showAllToggle)return;const e=document.createElement("button");e.innerHTML="Show next steps",e.classList.add("btn","btn-tertiary","show-all-toggle"),t.appendChild(e),e.addEventListener("click",()=>{t.classList.contains("show-all")?(e.innerHTML="Show next steps",t.classList.remove("show-all"),c("hide-future-items",t)):(e.innerHTML="Hide next steps",t.classList.add("show-all"),c("show-future-items",t))})},c=function(t,s){const e=new CustomEvent(t,{});s.dispatchEvent(e)},h=function(t){u(t)};r("iam-milestone-group");class m extends HTMLElement{constructor(){var s;super();const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const w=d=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:d})},y=(d,n)=>{var i;const o=(i=n.shadowRoot)===null||i===void 0?void 0:i.querySelector("dialog");o?.showModal(),o?.focus();const l=new CustomEvent("modal-opened",{bubbles:!0,cancelable:!0,detail:{modalId:d}});n.dispatchEvent(l),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:d})},r=(d,n)=>{var i;const o=(i=n.shadowRoot)===null||i===void 0?void 0:i.querySelector("dialog");o?.close();const l=new CustomEvent("modal-closed",{bubbles:!0,cancelable:!0,detail:{modalId:d}});n.dispatchEvent(l),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d})},k='<button class="btn btn-compact btn-secondary fa-xmark-large" data-close>Close</button>';w("iam-card");class x extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const A=p=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:p})},E=(p,n,c)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),c.forEach(d=>{p.addEventListener(d,function(e){const i={event:d,element:n,target:e.target};Object.keys(e.detail).forEach(r=>{const b=e.detail[r];i[r]=b}),window.dataLayer.push(i)})}),!0);A("iam-multi-step-modal");class _ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function g(n){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)n[d]=i[d]}return n}var y={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function f(n,e){function i(a,s,o){if(!(typeof document>"u")){o=g({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var r in o)o[r]&&(m+="; "+r,o[r]!==!0&&(m+="="+o[r].split(";")[0]));return document.cookie=a+"="+n.write(s,a)+m}}function d(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],o={},m=0;m<s.length;m++){var r=s[m].split("="),h=r.slice(1).join("=");try{var c=decodeURIComponent(r[0]);if(o[c]=n.read(h,c),a===c)break}catch{}}return a?o[a]:o}}return Object.create({set:i,get:d,remove:function(a,s){i(a,"",g({},s,{expires:-1}))},withAttributes:function(a){return f(this.converter,g({},this.attributes,a))},withConverter:function(a){return f(g({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var k=f(y,{path:"/"}),w=function(n,e,i,d){function a(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function m(c){try{h(d.next(c))}catch(t){o(t)}}function r(c){try{h(d.throw(c))}catch(t){o(t)}}function h(c){c.done?s(c.value):a(c.value).then(m,r)}h((d=d.apply(n,e||[])).next())})};const v=(n,e)=>{Array.from(n.querySelectorAll('label:not([slot="checked"])')).forEach(i=>{const a=i.querySelector("input").value,s=i.textContent;a.toLowerCase().includes(e.value.toLowerCase())||s.toLowerCase().includes(e.value.toLowerCase())?i.removeAttribute("slot"):i.setAttribute("slot","notmatched")})},x=(n,e,i)=>w(void 0,void 0,void 0,function*(){const d=e.value,a=n.getAttribute("data-url"),s=n.querySelector("input");console.log(s);const o=s&&s.hasAttribute("type")?s.getAttribute("type"):"checkbox";let m=s&&s.hasAttribute("name")?s.getAttribute("name"):"tags";n.hasAttribute("data-name")&&(m=n.hasAttribute("data-name"));const r=`${a}?search_query=${encodeURI(d)}`;window.controller||(window.controller=[]),window.controller[r]&&window.controller[r].abort(),window.controller[r]=new AbortController;const{signal:h}=controller[r];try{yield fetch(r,{signal:h,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":k.get("XSRF-TOKEN")})}).then(c=>c.json()).then(c=>{let t="";for(let l=0;l<c.data.length;l++)n.querySelector(`[value="${c.data[l].value}"]`)||(t+=`<label class="tag dropdown__option"><input type="${o}" name="${n.hasAttribute("data-name")?n.getAttribute("data-name"):m}" value="${c.data[l].value}"/>${c.data[l].title}</label>`);return n.insertAdjacentHTML("beforeend",`${t}`),i(n,e),c})}catch(c){console.log(c)}}),A=(n,e)=>{e.addEventListener("keydown",i=>{var d;switch(i.keyCode){case 40:i.stopPropagation(),i.preventDefault(),(d=n.querySelector('label:not([slot="checked"]) input'))===null||d===void 0||d.focus();break}}),n.addEventListener("keydown",i=>{var d,a,s;const o=n.querySelectorAll(':scope > a, :scope > button, :scope > details > summary, :scope > label:not([slot="checked"]) > input'),m=n.querySelectorAll('a, button, input, label:not([slot="checked"]) > input');if(i&&i.target instanceof HTMLElement&&i.target.closest('a, button, summary, label:not([slot="checked"]) > input')){const r=document.activeElement,h=Array.from(o).indexOf(r)-1,c=Array.from(o).indexOf(r)+1;switch(i.keyCode){case 27:r.closest("details")?(i.stopPropagation(),i.preventDefault(),r.closest("details").removeAttribute("open"),r.closest("details").querySelector(":scope summary").focus()):i.stopPropagation();break;case 32:case 13:break;case 35:i.stopPropagation(),i.preventDefault(),(d=n.querySelector("details[open]"))===null||d===void 0||d.removeAttribute("open"),Array.from(m)[m.length-1].focus();break;case 36:i.stopPropagation(),i.preventDefault(),(a=n.querySelector("details[open]"))===null||a===void 0||a.removeAttribute("open"),Array.from(m)[0].focus();break;case 38:if(i.stopPropagation(),i.preventDefault(),Array.from(o).indexOf(r)>-1)Array.from(o)[h]!=null?Array.from(o)[h].focus():Array.from(o)[o.length-1].focus();else if(r.closest("details")){const t=r.closest("details").querySelectorAll("a, button, :scope details > summary");subPrevIndex=Array.from(t).indexOf(r)-1,Array.from(t)[subPrevIndex]!=null?Array.from(t)[subPrevIndex].focus():Array.from(t)[t.length-1].focus()}break;case 40:if(i.stopPropagation(),i.preventDefault(),Array.from(o).indexOf(r)>-1)Array.from(o)[c]!=null?Array.from(o)[c].focus():Array.from(o)[0].focus();else if(r.closest("details")){const t=(s=r.closest("details"))===null||s===void 0?void 0:s.querySelectorAll("a, button, :scope details > summary");subNextIndex=Array.from(t).indexOf(r)+1,Array.from(t)[subNextIndex]!=null?Array.from(t)[subNextIndex].focus():Array.from(t)[0].focus()}break}}})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class z 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class g extends HTMLElement{constructor(){super();const d=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function l(e){if(e.hasAttribute("data-type")&&e.getAttribute("data-type")=="toast"){let i=document.querySelector(".notification__holder");i||(i=document.createElement("div"),i.classList.add("notification__holder"),i.classList.add("container"),document.querySelector("body").appendChild(i)),e.closest(".notification__holder")||i.appendChild(e)}if(e.setAttribute("role","alert"),e.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&(event.target.closest("[data-dismiss-button]")||event.target.matches("[data-dismiss-button]"))&&(i.preventDefault(),d(e))},!1),e.hasAttribute("data-timeout")){const i=e.getAttribute("data-timeout"),t=new f(function(){d(e)},i);e.addEventListener("mouseenter",()=>{t.pause()}),e.addEventListener("mouseleave",()=>{t.resume()})}}function f(e,i){let t,o,a=i;this.pause=function(){window.clearTimeout(t),a-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(e,a)},this.resume()}const d=function(e){e.classList.add("d-none")},m=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},u=(e,i,t)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:i}),t.forEach(o=>{e.addEventListener(o,function(a){const n={event:o,element:i,target:a.target};Object.keys(a.detail).forEach(s=>{const r=a.detail[s];n[s]=r}),window.dataLayer.push(n)})}),!0);m("iam-notification");class h extends HTMLElement{constructor(){super(),this.addColour=(t,o)=>{t.hasAttribute("data-type")?t.classList.add(`bg-${o}`):t.classList.add(`colour-${o}`)},this.addIcon=(t,o)=>{switch(o){case"danger":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"warning":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"success":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>');break;default:t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>')}},this.addDismissBtn=t=>{var o;(o=t.shadowRoot.querySelector(".notification__dismiss"))===null||o===void 0||(o.innerHTML='<button data-dismiss-button part="dismiss-btn">Dismiss</button>'),t.shadowRoot.querySelector(".notification__dismiss [data-dismiss-button]").addEventListener("click",function(){d(t);const a=new CustomEvent("dismiss",{detail:{class:t.classList}});t.dispatchEvent(a)},!1)},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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const u=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})};function m(c){var r=new TextEncoder("utf-8").encode(c);return crypto.subtle.digest("SHA-1",r).then(function(e){for(var i=[],n=new DataView(e),o=0;o<n.byteLength;o+=4){var s=n.getUint32(o),a=s.toString(16),t="00000000",p=(t+a).slice(-t.length);i.push(p)}return i.join("")})}const b=(c,r)=>{m(c).then(function(e){const i=new XMLHttpRequest;i.addEventListener("load",function(){const n=this.responseText.split(`
|
|
5
5
|
`),o=e.slice(5).toUpperCase();var s=!1;for(let t in n)if(n[t].substring(0,35)==o){s=!0;break}const a=new CustomEvent("hibpCheck",{detail:s});r.dispatchEvent(a)}),i.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),i.send()})};u("iam-password");class x extends HTMLElement{constructor(){var r;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const a=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};a("iam-popover");class s extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const i=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};i("iam-rank");class a extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const C=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const m=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};m("iam-rank");class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const p=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:n})};p("iam-rating");class l extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},p=(o,a,r)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:a}),r.forEach(t=>{o.addEventListener(t,function(e){const d={event:t,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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function L(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var u in a)t[u]=a[u]}return t}var S={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function E(t,e){function a(r,f,o){if(!(typeof document>"u")){o=L({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var i in o)o[i]&&(d+="; "+i,o[i]!==!0&&(d+="="+o[i].split(";")[0]));return document.cookie=r+"="+t.write(f,r)+d}}function u(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var f=document.cookie?document.cookie.split("; "):[],o={},d=0;d<f.length;d++){var i=f[d].split("="),n=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(o[s]=t.read(n,s),r===s)break}catch{}}return r?o[r]:o}}return Object.create({set:a,get:u,remove:function(r,f){a(r,"",L({},f,{expires:-1}))},withAttributes:function(r){return E(this.converter,L({},this.attributes,r))},withConverter:function(r){return E(L({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var M=E(S,{path:"/"});const j=t=>t.replace(/ /g,"_"),U=function(t){return t=t.toLowerCase(),t=j(t),t=t.replace(/\W/g,""),t},g=(t,e,a)=>e.split(/[\.\[\]\'\"]/).filter(u=>u).reduce((u,r)=>u?u[r]:a,t),k=t=>Array.isArray(t)||t!==null&&["function","object"].includes(typeof t);function $(t,e,a,u=!1){let r=-1;a.closest(".datalist__wrapper")&&a.closest(".datalist__wrapper"),e.setAttribute("data-list",e.getAttribute("list")),e.setAttribute("list",""),e.hasAttribute("placeholder")&&e.setAttribute("data-placeholder",e.getAttribute("placeholder")),e.hasAttribute("placeholder")&&e.setAttribute("data-original-placeholder",e.getAttribute("placeholder")),e.addEventListener("focus",function(){e.value!=""&&(e.setAttribute("placeholder",e.value),e.setAttribute("data-value",e.value)),e.value=""}),e.addEventListener("keyup",function(){e.value!=""&&e.setAttribute("data-value",e.value)}),e.addEventListener("blur",function(){e.hasAttribute("data-value")&&(e.value=e.getAttribute("data-value")),e.hasAttribute("data-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-placeholder"))});for(const n of a.options)n.innerHTML==""&&(n.innerHTML=n.value);a.addEventListener("click",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest("option")){const s=n.target.closest("option");e.value=s.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(e);for(const c of a.options)c.classList.remove("active");s.classList.add("active"),setTimeout(()=>{t.dispatchEvent(new CustomEvent("update-value",{detail:{value:s.value}}))},0)}}),e.addEventListener("input",function(){if(e.removeAttribute("data-value"),r=-1,t.tagName!="IAM-ADDRESS-LOOKUP"){const n=e.value.toUpperCase();for(const s of a.options)s.value.toUpperCase().indexOf(n)>-1?(s.style.display="block",s.classList.remove("hide")):(s.style.display="none",s.classList.add("hide"))}}),t.addEventListener("keydown",function(n){n.keyCode==40?(r++,f(a.options)):n.keyCode==38?(r--,f(a.options)):n.keyCode==13&&(n.preventDefault(),r>-1&&a.options&&a.options[r].click())});function f(n){if(!n)return!1;o(n),r>=n.length&&(r=0),r<0&&(r=n.length-1),n[r].classList.add("active")}function o(n){if(!n)return!1;for(let s=0;s<n.length;s++)n[s].classList.remove("active")}e.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const d=()=>{e.removeAttribute("placeholder"),e.hasAttribute("data-original-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-original-placeholder")),e.removeAttribute("data-value"),e.value="";for(const s of a.options)s.classList.remove("active"),s.removeAttribute("style");const n=new CustomEvent("close-button-pressed");t.dispatchEvent(n)};(t.querySelector(".empty")?t.querySelector(".empty"):t.shadowRoot.querySelector(".empty")).addEventListener("click",function(n){d()}),t.addEventListener("empty",function(n){d()})}var T=function(t,e,a,u){function r(f){return f instanceof a?f:new a(function(o){o(f)})}return new(a||(a=Promise))(function(f,o){function d(s){try{n(u.next(s))}catch(c){o(c)}}function i(s){try{n(u.throw(s))}catch(c){o(c)}}function n(s){s.done?f(s.value):r(s.value).then(d,i)}n((u=u.apply(t,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class f 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function H(l){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var b in r)l[b]=r[b]}return l}var lt={read:function(l){return l[0]==='"'&&(l=l.slice(1,-1)),l.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(l){return encodeURIComponent(l).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function F(l,a){function r(e,m,s){if(!(typeof document>"u")){s=H({},a,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var v="";for(var t in s)s[t]&&(v+="; "+t,s[t]!==!0&&(v+="="+s[t].split(";")[0]));return document.cookie=e+"="+l.write(m,e)+v}}function b(e){if(!(typeof document>"u"||arguments.length&&!e)){for(var m=document.cookie?document.cookie.split("; "):[],s={},v=0;v<m.length;v++){var t=m[v].split("="),o=t.slice(1).join("=");try{var n=decodeURIComponent(t[0]);if(s[n]=l.read(o,n),e===n)break}catch{}}return e?s[e]:s}}return Object.create({set:r,get:b,remove:function(e,m){r(e,"",H({},m,{expires:-1}))},withAttributes:function(e){return F(this.converter,H({},this.attributes,e))},withConverter:function(e){return F(H({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(l)}})}var dt=F(lt,{path:"/"});function ct(l,a,r,b=!1){let e=-1;r.closest(".datalist__wrapper")&&r.closest(".datalist__wrapper"),a.setAttribute("data-list",a.getAttribute("list")),a.setAttribute("list",""),a.hasAttribute("placeholder")&&a.setAttribute("data-placeholder",a.getAttribute("placeholder")),a.hasAttribute("placeholder")&&a.setAttribute("data-original-placeholder",a.getAttribute("placeholder")),a.addEventListener("focus",function(){a.value!=""&&(a.setAttribute("placeholder",a.value),a.setAttribute("data-value",a.value)),a.value=""}),a.addEventListener("keyup",function(){a.value!=""&&a.setAttribute("data-value",a.value)}),a.addEventListener("blur",function(){a.hasAttribute("data-value")&&(a.value=a.getAttribute("data-value")),a.hasAttribute("data-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-placeholder"))});for(const o of r.options)o.innerHTML==""&&(o.innerHTML=o.value);r.addEventListener("click",function(o){if(o&&o.target instanceof HTMLElement&&o.target.closest("option")){const n=o.target.closest("option");a.value=n.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(a);for(const d of r.options)d.classList.remove("active");n.classList.add("active"),setTimeout(()=>{l.dispatchEvent(new CustomEvent("update-value",{detail:{value:n.value}}))},0)}}),a.addEventListener("input",function(){if(a.removeAttribute("data-value"),e=-1,l.tagName!="IAM-ADDRESS-LOOKUP"){const o=a.value.toUpperCase();for(const n of r.options)n.value.toUpperCase().indexOf(o)>-1?(n.style.display="block",n.classList.remove("hide")):(n.style.display="none",n.classList.add("hide"))}}),l.addEventListener("keydown",function(o){o.keyCode==40?(e++,m(r.options)):o.keyCode==38?(e--,m(r.options)):o.keyCode==13&&(o.preventDefault(),e>-1&&r.options&&r.options[e].click())});function m(o){if(!o)return!1;s(o),e>=o.length&&(e=0),e<0&&(e=o.length-1),o[e].classList.add("active")}function s(o){if(!o)return!1;for(let n=0;n<o.length;n++)o[n].classList.remove("active")}a.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const v=()=>{a.removeAttribute("placeholder"),a.hasAttribute("data-original-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-original-placeholder")),a.removeAttribute("data-value"),a.value="";for(const n of r.options)n.classList.remove("active"),n.removeAttribute("style");const o=new CustomEvent("close-button-pressed");l.dispatchEvent(o)};(l.querySelector(".empty")?l.querySelector(".empty"):l.shadowRoot.querySelector(".empty")).addEventListener("click",function(o){v()}),l.addEventListener("empty",function(o){v()})}const ut=l=>/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(l.trim());var Q=function(l,a,r,b){function e(m){return m instanceof r?m:new r(function(s){s(m)})}return new(r||(r=Promise))(function(m,s){function v(n){try{o(b.next(n))}catch(d){s(d)}}function t(n){try{o(b.throw(n))}catch(d){s(d)}}function o(n){n.done?m(n.value):e(n.value).then(v,t)}o((b=b.apply(l,a||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class mt extends HTMLElement{constructor(){var a;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const O=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},B=(t,e)=>String(t).padStart(e,"0"),F=t=>t.charAt(0).toUpperCase()+t.slice(1),p=(t,e,a)=>e.split(/[\.\[\]\'\"]/).filter(i=>i).reduce((i,o)=>i?i[o]:a,t),T=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1));var W=function(t,e,a,i){function o(r){return r instanceof a?r:new a(function(b){b(r)})}return new(a||(a=Promise))(function(r,b){function s(m){try{n(i.next(m))}catch(d){b(d)}}function l(m){try{n(i.throw(m))}catch(d){b(d)}}function n(m){m.done?r(m.value):o(m.value).then(s,l)}n((i=i.apply(t,e||[])).next())})};const U=(t,e)=>{switch(t){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=F(e)}},V=function(t){const e=new Object;return Array.from(t.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 r=i.value;i.hasAttribute("data-date-from")&&(r+="-date-from"),i.hasAttribute("data-date-to")&&(r+="-date-to"),e[o]||(e[o]=[]),e[o].push(r)}}),e},J=t=>{let e=document.createElement("form");const a=t.querySelector("table");t.hasAttribute("data-filterby")?e=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?e=t.closest("form"):a.parentNode.insertBefore(e,a.nextSibling),e.hasAttribute("data-ajax")&&t.setAttribute("data-ajax",e.getAttribute("data-ajax")),e.hasAttribute("data-schema")&&t.setAttribute("data-schema",e.getAttribute("data-schema"))},w=(t,e,a,i,o)=>{a.querySelector("[name=show]")||a.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),a.querySelector("[name=page]")||a.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),i.addEventListener("update-show",r=>{if(a.querySelector("[name=show]").value!=r.detail.show){a.querySelector("[name=show]").value=r.detail.show;const b=new CustomEvent("update-show",{detail:{show:r.detail.show}});t.dispatchEvent(b),H(t,i),o()}}),i.addEventListener("update-page",r=>{if(a.querySelector("[name=page]").value!=r.detail.page){a.querySelector("[name=page]").value=r.detail.page;const b=new CustomEvent("update-page",{detail:{page:r.detail.page}});if(t.dispatchEvent(b),H(t,i),o(),!t.hasAttribute("data-no-scroll")){const l=e.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},X=(t,e)=>{let a=document.createElement("form");return t.hasAttribute("data-filterby")?a=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?a=t.closest("form"):t.querySelector("form")?a=t.querySelector("form"):e.parentNode.insertBefore(a,e.nextSibling),t.hasAttribute("data-ajax")&&a.setAttribute("data-ajax",t.getAttribute("data-ajax")),a},M=(t,e,a,i)=>{const o=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),G(t,i),$(e),K(t,e),t.classList.contains("mh-sm")&&o.classList.add("mh-sm"),t.classList.contains("mh-md")&&o.classList.add("mh-md"),t.classList.contains("mh-lg")&&o.classList.add("mh-lg"),t.classList.contains("table--cta")&&(Q(t,e),Z(t,e)),Y(t)},Y=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(e=>{e.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
|
|
5
5
|
<td colspan="100%"><i class="fa-solid fa-star"></i> ${e.getAttribute("data-highlight")}</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const R=t=>t.charAt(0).toUpperCase()+t.slice(1),p=(t,i,a)=>i.split(/[\.\[\]\'\"]/).filter(e=>e).reduce((e,b)=>e?e[b]:a,t),q=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1));var P=function(t,i,a,e){function b(o){return o instanceof a?o:new a(function(s){s(o)})}return new(a||(a=Promise))(function(o,s){function r(m){try{n(e.next(m))}catch(d){s(d)}}function l(m){try{n(e.throw(m))}catch(d){s(d)}}function n(m){m.done?o(m.value):b(m.value).then(r,l)}n((e=e.apply(t,i||[])).next())})};const I=(t,i)=>{switch(t){case"datetime":return new Date(i).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(i).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(i).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return i=R(i)}},O=function(t){const i=new Object;return Array.from(t.querySelectorAll("[data-filter]")).forEach(e=>{if(!(e.type=="radio"&&!e.checked)&&!(e.type=="checkbox"&&!e.checked)&&e&&e.value){const b=e.getAttribute("data-filter");let o=e.value;e.hasAttribute("data-date-from")&&(o+="-date-from"),e.hasAttribute("data-date-to")&&(o+="-date-to"),i[b]||(i[b]=[]),i[b].push(o)}}),i},N=(t,i,a,e,b)=>{a.querySelector("[name=show]")||a.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),a.querySelector("[name=page]")||a.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),e.addEventListener("update-show",o=>{if(a.querySelector("[name=show]").value!=o.detail.show){a.querySelector("[name=show]").value=o.detail.show;const s=new CustomEvent("update-show",{detail:{show:o.detail.show}});t.dispatchEvent(s),T(t,e),b()}}),e.addEventListener("update-page",o=>{if(a.querySelector("[name=page]").value!=o.detail.page){a.querySelector("[name=page]").value=o.detail.page;const s=new CustomEvent("update-page",{detail:{page:o.detail.page}});if(t.dispatchEvent(s),T(t,e),b(),!t.hasAttribute("data-no-scroll")){const l=i.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},F=(t,i)=>{let a=document.createElement("form");return t.hasAttribute("data-filterby")?a=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?a=t.closest("form"):t.querySelector("form")?a=t.querySelector("form"):i.parentNode.insertBefore(a,i.nextSibling),t.hasAttribute("data-ajax")&&a.setAttribute("data-ajax",t.getAttribute("data-ajax")),a},E=(t,i,a,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),U(t,e),W(i),V(t,i),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(J(t,i),X(t,i)),B(t)},B=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(i=>{i.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
|
|
5
5
|
<td colspan="100%"><i class="fa-solid fa-star"></i> ${i.getAttribute("data-highlight")}</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=h(a)}},p=(t,a,e,i,o)=>{e.querySelector("[name=show]")||e.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),e.querySelector("[name=page]")||e.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),i.addEventListener("update-show",b=>{if(e.querySelector("[name=show]").value!=b.detail.show){e.querySelector("[name=show]").value=b.detail.show;const l=new CustomEvent("update-show",{detail:{show:b.detail.show}});t.dispatchEvent(l),c(t,i),o()}}),i.addEventListener("update-page",b=>{if(e.querySelector("[name=page]").value!=b.detail.page){e.querySelector("[name=page]").value=b.detail.page;const l=new CustomEvent("update-page",{detail:{page:b.detail.page}});if(t.dispatchEvent(l),c(t,i),o(),!t.hasAttribute("data-no-scroll")){const r=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:r,behavior:"smooth"})}}})},g=(t,a)=>{let e=document.createElement("form");return t.hasAttribute("data-filterby")?e=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?e=t.closest("form"):t.querySelector("form")?e=t.querySelector("form"):a.parentNode.insertBefore(e,a.nextSibling),t.hasAttribute("data-ajax")&&e.setAttribute("data-ajax",t.getAttribute("data-ajax")),e},f=(t,a,e,i)=>{const o=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),x(t,i),v(a),k(t,a),t.classList.contains("mh-sm")&&o.classList.add("mh-sm"),t.classList.contains("mh-md")&&o.classList.add("mh-md"),t.classList.contains("mh-lg")&&o.classList.add("mh-lg"),t.classList.contains("table--cta")&&(A(t,a),j(t,a)),w(t)},w=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
|
|
5
5
|
<td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const v=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},k=(t,a)=>String(t).padStart(a,"0"),A=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1)),j=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=A(a)}},_=(t,a)=>{let i=document.createElement("form");return t.hasAttribute("data-filterby")?i=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?i=t.closest("form"):t.querySelector("form")?i=t.querySelector("form"):a.parentNode.insertBefore(i,a.nextSibling),t.hasAttribute("data-ajax")&&i.setAttribute("data-ajax",t.getAttribute("data-ajax")),i},h=(t,a,i,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),q(t,e),f(a),L(t,a),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(E(t,a),T(t,a)),S(t)},S=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
|
|
5
5
|
<td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const g=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1)),f=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=g(a)}},x=(t,a,i,e,b)=>{i.querySelector("[name=show]")||i.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),i.querySelector("[name=page]")||i.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),e.addEventListener("update-show",m=>{if(i.querySelector("[name=show]").value!=m.detail.show){i.querySelector("[name=show]").value=m.detail.show;const s=new CustomEvent("update-show",{detail:{show:m.detail.show}});t.dispatchEvent(s),h(t,e),b()}}),e.addEventListener("update-page",m=>{if(i.querySelector("[name=page]").value!=m.detail.page){i.querySelector("[name=page]").value=m.detail.page;const s=new CustomEvent("update-page",{detail:{page:m.detail.page}});if(t.dispatchEvent(s),h(t,e),b(),!t.hasAttribute("data-no-scroll")){const l=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},y=(t,a)=>{let i=document.createElement("form");return t.hasAttribute("data-filterby")?i=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?i=t.closest("form"):t.querySelector("form")?i=t.querySelector("form"):a.parentNode.insertBefore(i,a.nextSibling),t.hasAttribute("data-ajax")&&i.setAttribute("data-ajax",t.getAttribute("data-ajax")),i},w=(t,a,i,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),k(t,e),A(a),j(t,a),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(_(t,a),S(t,a)),v(t)},v=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
|
|
5
5
|
<td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const k=(t,a,i,o)=>{const r=Math.tan(.375*Math.PI),s=window.innerWidth||document.body.clientWidth,n=Math.max(1,Math.floor(.01*s)),d=i-t,e=o-a,c=Math.abs(d/e),l=Math.abs(e/d);if(Math.abs(d)>n||Math.abs(e)>n){if(l<=r)return d<0?"left":"right";if(c<=r)return e<0?"top":"bottom"}else return"tap"},w=function(t){const a=t.querySelectorAll(":scope > details, :scope > a");let i=t.querySelector(":scope > .tabs__links"),o=t.querySelector(":scope .tabs__dropdown");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(i=t.shadowRoot.querySelector(".tabs__links")),!i){i=document.createElement("div"),i.classList.add("tabs__links");const s=document.createElement("div");s.classList.add("tabs__links__wrapper"),s.prepend(i),t.prepend(s)}o||(o=document.createElement("select"),o.classList.add("tabs__dropdown"),t.prepend(o));let r=0;a.forEach(s=>{let n=document.createElement("button");const d=document.createElement("option");if(s.matches("details")){const e=s.querySelector(":scope > summary"),c=e.classList.contains("disabled");e.classList.add("visually-hidden"),s.hasAttribute("id")&&n.setAttribute("data-id",`${s.getAttribute("id")}`),s.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML=`${e.innerText}`,n.classList.add("link"),n.setAttribute("data-index",r),n.setAttribute("part","tab-link"),d.innerHTML=`${e.innerText}`,d.value=e.innerText.replace(/\s+/g,"-").toLowerCase(),d.setAttribute("data-index",r),s.setAttribute("tabindex","-1"),c&&n.classList.add("disabled"),r++}else s.matches("a")&&(n=s);n.classList.add("link"),i.appendChild(n),o.appendChild(d)})},y=function(t){const a=t.querySelectorAll(":scope > details"),i=t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope .tabs__links"),r=t.querySelectorAll(":scope .tabs__links > button");const s=t.querySelector(":scope .tabs__dropdown");let n=t.querySelector(":scope .tabs__next"),d;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(r=t.shadowRoot.querySelectorAll(".tabs__links > button"),o=t.shadowRoot.querySelector(".tabs__links"),n=t.shadowRoot.querySelector(".tabs__next")),r.forEach(e=>{e.addEventListener("click",c=>{if(c.preventDefault(),window.isClicked=!0,e.classList.contains("disabled"))return!1;r.forEach(l=>{const m=l==e;l.setAttribute("aria-pressed",m)}),o.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),f(a,e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent}),e.matches(":last-child")?n?.setAttribute("disabled","disabled"):n?.removeAttribute("disabled")}),_(a,s)}),o.addEventListener("scrollend",()=>{clearTimeout(d),d=setTimeout(function(){let e=r[0],c=Math.abs(e.getBoundingClientRect().left);if(r.forEach(l=>{Math.abs(l.getBoundingClientRect().left)<c&&(c=Math.abs(l.getBoundingClientRect().left),e=l)}),window.isClicked)return window.isClicked=!1,!1;e.click(),e.focus()},500)}),i.forEach((e,c)=>{e.addEventListener("click",l=>{l.preventDefault(),r[c].click()})}),n?.addEventListener("click",e=>{e.preventDefault();const l=o.querySelector('[aria-pressed="true"]').nextSibling;l&&l.click()}),t.classList.contains("tabs--guided")){let e=0,c=0,l=0,m=0;a.forEach(p=>{p.addEventListener("touchstart",b=>{b.stopPropagation(),e=b.changedTouches[0].screenX,c=b.changedTouches[0].screenY}),p.addEventListener("touchend",b=>{b.stopPropagation(),l=b.changedTouches[0].screenX,m=b.changedTouches[0].screenY;const v=k(e,c,l,m),h=o.querySelector('[aria-pressed="true"]'),u=h.nextSibling,g=h.previousSibling;switch(v){case"left":u&&u.click();break;case"right":g&&g.click();break}})})}},f=function(t,a){t.forEach((i,o)=>{const r=a.getAttribute("data-index")==o;r?i.setAttribute("open",r):i.removeAttribute("open")})},_=function(t,a){a.addEventListener("change",i=>{i.preventDefault();const o=a.options[a.selectedIndex];f(t,o),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:o.innerText})})},x=function(t){if(!t.querySelector(":scope > details"))return!1;const a=t.querySelectorAll(":scope > details"),i=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(a[0].setAttribute("open",!0),i[0].setAttribute("aria-pressed",!0))},z=function(t){w(t),y(t),x(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class L extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const v=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})};/*! js-cookie v3.0.5 | MIT */function h(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var a in t)e[a]=t[a]}return e}var f={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function u(e,i){function t(o,l,r){if(!(typeof document>"u")){r=h({},i,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var n in r)r[n]&&(c+="; "+n,r[n]!==!0&&(c+="="+r[n].split(";")[0]));return document.cookie=o+"="+e.write(l,o)+c}}function a(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var l=document.cookie?document.cookie.split("; "):[],r={},c=0;c<l.length;c++){var n=l[c].split("="),p=n.slice(1).join("=");try{var d=decodeURIComponent(n[0]);if(r[d]=e.read(p,d),o===d)break}catch{}}return o?r[o]:r}}return Object.create({set:t,get:a,remove:function(o,l){t(o,"",h({},l,{expires:-1}))},withAttributes:function(o){return u(this.converter,h({},this.attributes,o))},withConverter:function(o){return u(h({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(e)}})}var y=u(f,{path:"/"}),k=function(e,i,t,a){function o(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function c(d){try{p(a.next(d))}catch(s){r(s)}}function n(d){try{p(a.throw(d))}catch(s){r(s)}}function p(d){d.done?l(d.value):o(d.value).then(c,n)}p((a=a.apply(e,i||[])).next())})};const b=(e,i)=>{Array.from(e.querySelectorAll('label:not([slot="checked"])')).forEach(t=>{const o=t.querySelector("input").value,l=t.textContent;o.toLowerCase().includes(i.value.toLowerCase())||l.toLowerCase().includes(i.value.toLowerCase())?t.removeAttribute("slot"):t.setAttribute("slot","notmatched")})},x=(e,i,t)=>k(void 0,void 0,void 0,function*(){const a=i.value,o=e.getAttribute("data-url"),l=e.querySelector("input");console.log(l);const r=l&&l.hasAttribute("type")?l.getAttribute("type"):"checkbox";let c=l&&l.hasAttribute("name")?l.getAttribute("name"):"tags";e.hasAttribute("data-name")&&(c=e.hasAttribute("data-name"));const n=`${o}?search_query=${encodeURI(a)}`;window.controller||(window.controller=[]),window.controller[n]&&window.controller[n].abort(),window.controller[n]=new AbortController;const{signal:p}=controller[n];try{yield fetch(n,{signal:p,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":y.get("XSRF-TOKEN")})}).then(d=>d.json()).then(d=>{let s="";for(let m=0;m<d.data.length;m++)e.querySelector(`[value="${d.data[m].value}"]`)||(s+=`<label class="tag dropdown__option"><input type="${r}" name="${e.hasAttribute("data-name")?e.getAttribute("data-name"):c}" value="${d.data[m].value}"/>${d.data[m].title}</label>`);return e.insertAdjacentHTML("beforeend",`${s}`),t(e,i),d})}catch(d){console.log(d)}}),g=e=>{const i=e.querySelector(":checked"),t=i?.getAttribute("name");e.setAttribute("slot","checked"),e.setAttribute("data-content",e.textContent);let a=[];localStorage.getItem("tags-"+t)!=null&&(a=JSON.parse(localStorage.getItem("tags-"+t))),a.includes(e.textContent)||(a.push(e.textContent),localStorage.setItem("tags-"+t,JSON.stringify(a)));let o=a.indexOf(e.textContent)+1;o>23&&(o=1),e?.classList.add(`wider-colour-${o+1}`)},w=(e,i)=>{i.addEventListener("keydown",t=>{var a;switch(t.keyCode){case 40:t.stopPropagation(),t.preventDefault(),(a=e.querySelector('label:not([slot="checked"]) input'))===null||a===void 0||a.focus();break}}),e.addEventListener("keydown",t=>{var a,o,l;const r=e.querySelectorAll(':scope > a, :scope > button, :scope > details > summary, :scope > label:not([slot="checked"]) > input'),c=e.querySelectorAll('a, button, input, label:not([slot="checked"]) > input');if(t&&t.target instanceof HTMLElement&&t.target.closest('a, button, summary, label:not([slot="checked"]) > input')){const n=document.activeElement,p=Array.from(r).indexOf(n)-1,d=Array.from(r).indexOf(n)+1;switch(t.keyCode){case 27:n.closest("details")?(t.stopPropagation(),t.preventDefault(),n.closest("details").removeAttribute("open"),n.closest("details").querySelector(":scope summary").focus()):t.stopPropagation();break;case 32:case 13:break;case 35:t.stopPropagation(),t.preventDefault(),(a=e.querySelector("details[open]"))===null||a===void 0||a.removeAttribute("open"),Array.from(c)[c.length-1].focus();break;case 36:t.stopPropagation(),t.preventDefault(),(o=e.querySelector("details[open]"))===null||o===void 0||o.removeAttribute("open"),Array.from(c)[0].focus();break;case 38:if(t.stopPropagation(),t.preventDefault(),Array.from(r).indexOf(n)>-1)Array.from(r)[p]!=null?Array.from(r)[p].focus():Array.from(r)[r.length-1].focus();else if(n.closest("details")){const s=n.closest("details").querySelectorAll("a, button, :scope details > summary");subPrevIndex=Array.from(s).indexOf(n)-1,Array.from(s)[subPrevIndex]!=null?Array.from(s)[subPrevIndex].focus():Array.from(s)[s.length-1].focus()}break;case 40:if(t.stopPropagation(),t.preventDefault(),Array.from(r).indexOf(n)>-1)Array.from(r)[d]!=null?Array.from(r)[d].focus():Array.from(r)[0].focus();else if(n.closest("details")){const s=(l=n.closest("details"))===null||l===void 0?void 0:l.querySelectorAll("a, button, :scope details > summary");subNextIndex=Array.from(s).indexOf(n)+1,Array.from(s)[subNextIndex]!=null?Array.from(s)[subNextIndex].focus():Array.from(s)[0].focus()}break}}})};v("iam-tag");class z 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const a=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:n})};a("iam-tooltip");class l 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const p=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},h=(o,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(e=>{o.addEventListener(e,function(r){const i={event:e,element:t,target:r.target};Object.keys(r.detail).forEach(d=>{const s=r.detail[d];i[d]=s}),window.dataLayer.push(i)})}),!0),b=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const g=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})};var b=function(r,n,e,t){function a(o){return o instanceof e?o:new e(function(i){i(o)})}return new(e||(e=Promise))(function(o,i){function s(d){try{l(t.next(d))}catch(c){i(c)}}function p(d){try{l(t.throw(d))}catch(c){i(c)}}function l(d){d.done?o(d.value):a(d.value).then(s,p)}l((t=t.apply(r,n||[])).next())})};const u=()=>b(void 0,void 0,void 0,function*(){return new Promise((r,n)=>{const e=new Image;e.onload=function(){const t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";const a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a),document.body.classList.add("youtubeLoaded"),r(!0)},e.onerror=function(){n(!1)},e.src="https://youtube.com/favicon.ico"})}),v=(r,n)=>b(void 0,void 0,void 0,function*(){if(typeof window.player>"u"&&(window.player=[]),typeof window.player[n]<"u"&&typeof window.player[n].pauseVideo=="function")return window.player[n].playVideo(),!1;window.player[n]=new YT.Player(n,{height:"100%",width:"100%",videoId:n,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:e,onStateChange:a}});function e(o){o.target.playVideo()}let t=!1;function a(o){o.data==YT.PlayerState.PLAYING&&!t&&(document.getElementById(n).classList.add("player-ready"),t=!0)}}),h=(r,n)=>{var e;const t=(e=n.shadowRoot)===null||e===void 0?void 0:e.querySelector("dialog");t?.showModal(),t?.focus();const a=new CustomEvent("modal-opened",{bubbles:!0,cancelable:!0,detail:{modalId:r}});n.dispatchEvent(a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})},f=(r,n)=>{var e;const t=(e=n.shadowRoot)===null||e===void 0?void 0:e.querySelector("dialog");t?.close();const a=new CustomEvent("modal-closed",{bubbles:!0,cancelable:!0,detail:{modalId:r}});n.dispatchEvent(a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r})},w='<button class="btn btn-compact btn-secondary fa-xmark-large" data-close>Close</button>';var m=function(r,n,e,t){function a(o){return o instanceof e?o:new e(function(i){i(o)})}return new(e||(e=Promise))(function(o,i){function s(d){try{l(t.next(d))}catch(c){i(c)}}function p(d){try{l(t.throw(d))}catch(c){i(c)}}function l(d){d.done?o(d.value):a(d.value).then(s,p)}l((t=t.apply(r,n||[])).next())})};g("iam-video-modal");class y extends HTMLElement{constructor(){super(),this.openYoutubeVideo=(e,t)=>m(this,void 0,void 0,function*(){const a=t.querySelector(".embed");h(e,t);const o=t.getAttribute("data-youtube");document.body.classList.contains("youtubeLoaded")||(yield u());const i=new CustomEvent("play-video",{detail:{"Video Type":"YoutTube",ID:o}});t.dispatchEvent(i);const s=setInterval(()=>{typeof YT<"u"&&(clearInterval(s),v(a,o))},200);setTimeout(function(){clearInterval(s)},2e3)}),this.openVimeoVideo=(e,t)=>m(this,void 0,void 0,function*(){const a=t.querySelector(".embed");h(e,t);const o=t.getAttribute("data-vimeo"),i=new CustomEvent("play-video",{detail:{"Video Type":"Vimeo",ID:o}});t.dispatchEvent(i),window.dataLayer.push(i.detail),a.querySelector("iframe")||(a.innerHTML=`<iframe src="https://player.vimeo.com/video/${o}?autoplay=1" width="100%" height="100%" frameborder="0" allow="autoplay; encrypted-media" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>`)}),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})};o("iam-word-count");class n 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/(function(w){typeof define=="function"&&define.amd?define(w):w()})((function(){"use strict";var w=a=>{a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie")},H=a=>{var e=function(n){var r=document.querySelector('label[for="'.concat(n.replace("#",""),'"]')),s=document.querySelector(n+" summary"),u=document.querySelector("dialog".concat(n)),i=document.querySelector("detail".concat(n));r instanceof HTMLElement?r.click():s instanceof HTMLElement?s.click():u instanceof HTMLElement?u.showModal():i instanceof HTMLElement&&i.addAttribute("open")};location.hash&&e(location.hash),window.addEventListener("hashchange",function(){e(location.hash)},!1),addEventListener("popstate",o=>{if(o&&o.state&&o.state.type&&o.state.type=="pagination"){var n=document.querySelector("#".concat(o.state.form)),r=document.querySelector("#".concat(o.state.form," [data-pagination]"));r?r.value=o.state.page:n.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(o.state.page,'" />'),n.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(o=>{o?.closest("iam-form")||o.addEventListener("submit",n=>{var r;o.querySelector(":invalid")&&(o.classList.add("was-validated"),(r=o?.querySelector("input:invalid"))===null||r===void 0||r.scrollIntoView(),n.preventDefault())})}),document.addEventListener("click",o=>{var n;if(o&&o.target instanceof HTMLElement&&o.target.matches("form button:not([type=button])")){var r=o.target.closest("form");r?.closest("iam-form")||(Array.from(r.querySelectorAll("[data-password-type]")).forEach(s=>{s.setAttribute("type","password")}),(r.querySelector(":invalid")||r.querySelector('.pwd-checker[data-strength="1"]')||r.querySelector('.pwd-checker[data-strength="2"]'))&&(r.classList.add("was-validated"),(n=r?.querySelector("input:invalid"))===null||n===void 0||n.scrollIntoView(),o.preventDefault()),r.querySelector("iam-multiselect[data-is-required][data-error]")&&(r.classList.add("was-validated"),o.preventDefault()))}}),document.addEventListener("keydown",o=>{o.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(o.preventDefault(),o.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(o=>{var n=o.closest("label");n.setAttribute("data-percent",o.getAttribute("value"))})};function N(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var e=a.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var o=a.target.closest("summary"),n=a.target.closest("a"),r=a.target.closest("button");o&&window.dataLayer.push({event:"openDetails",detailsTitle:o.textContent||""}),n&&window.dataLayer.push({event:"linkClicked",linkText:n.hasAttribute("title")?n.getAttribute("title")||"":n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||"",href:n.getAttribute("href")||""}),r&&window.dataLayer.push({event:"buttonClicked",buttonText:r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||""})}})}window.triggerDynamicEvent=function(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"change";console.log("event"),a.hasAttribute("data-change-events")&&e=="change"&&v(a,a.getAttribute("data-change-events")),a.hasAttribute("data-click-events")&&e=="click"&&v(a,a.getAttribute("data-click-events"))};var M=()=>{document.addEventListener("change",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-click-events]")&&v(a.target,a.target.closest("[data-click-events]").getAttribute("data-click-events"))})},v=(a,e)=>{if(e||(e=a.parentNode.getAttribute("data-change-events")),!e)return!1;Array.from(JSON.parse(e)).forEach(o=>{C(a,o)})},C=(a,e)=>{if("matches"in e)return e.matches=="any"||a.value==e.matches?f(a,e,"if"):f(a,e,"else"),!1;if("in-list"in e){var o=document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'));return document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'))?f(o,e,"if"):f(o,e,"else"),!1}else"event"in e&&f(a,e,"event")},f=(a,e,o)=>{if(!(o in e))return!1;switch(e[o]){case"hide":if(document.querySelector(e.target)){var n=document.querySelector(e.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(i=>{i.removeAttribute("required")})}break;case"show":if(document.querySelector(e.target)){var r=document.querySelector(e.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(i=>{i.closest(".js-hide")||i.setAttribute("required","true")})}break;case"populate-form":D(a,e);break;case"dispatchEvent":var s=new Event(e.value);document.querySelector("".concat(e.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.setAttribute(e.attribute,e.value)});break;case"focus":document.querySelector("".concat(e.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.removeAttribute(e.attribute)});break;case"updateValue":document.querySelector("".concat(e.target)).value=e.value?e.value:"";var u=new Event("change");document.querySelector("".concat(e.target)).dispatchEvent(u);break;case"submitForm":document.querySelector("".concat(e.target)).submit();break;case"openLink":document.querySelector("".concat(e.target)).value&&(window.location.href=document.querySelector("".concat(e.target)).value);break}},D=function(e,o){var n=JSON.parse(e.getAttribute("data-values")),r=document.querySelector(o.target);if(!n)return!1;Object.keys(n).forEach(s=>{document.getElementById(s)&&document.getElementById(s).tagName=="SPAN"&&(document.getElementById(s).innerHTML=n[s]),r.querySelector('select[name="'.concat(s,'"] [value="').concat(n[s],'"]'))?(r.querySelector('select[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&(r.querySelector('select[name="'.concat(s,'"]')).disabled=!0)):r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]'))?(Array.from(r.querySelectorAll('input[name="'.concat(s,'"][type="radio"]'))).forEach(function(u){u.disabled=!0}),r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).checked=!0,r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).disabled=!1):r.querySelector('input[name="'.concat(s,'"]'))&&(r.querySelector('input[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&r.querySelector('input[name="'.concat(s,'"]')).setAttribute("readonly","true"))})},F=()=>{var a=[],e={},o="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=o,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+o,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),e={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((t,c)=>{if(t.closest(".navbar")==null){var l=t.querySelector(".btn-link");l!=null&&l.textContent.length?e.Passes++:e.Fails++}}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((t,c)=>{var l=t.closest(".container");l!=null&&l.matches('[class*="bg-"]')?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((t,c)=>{var l=t.querySelector("h2.display-4:first-child"),d=t.querySelector("h2.display-4:first-child + .strapline");l!=null&&d!=null?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((t,c)=>{t.querySelectorAll(':scope > .row > [class*="col"]').length%2===0?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((t,c)=>{t.querySelectorAll(":scope > *").length==1&&t.querySelectorAll(":scope > .h6:first-child").length==1?e.Passes++:t.querySelectorAll(":scope > *").length==1&&e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((t,c)=>{t.querySelectorAll("h2.h1:first-child").length==1?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),a.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:t.Passes},Failed:{value:t.Fails},Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),window.integrationTests=a;var n=[];e={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),n.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var r="green",s=1,u={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((t,c)=>{var l=1,d=t.textContent;t.matches("h2")?l=2:t.matches("h3")?l=3:t.matches("h4")?l=4:t.matches("h5")?l=5:t.matches("h6")&&(l=6);var h=l-s<=1;c==0&&l!=1&&(h=!1);var p={"Heading Level":l,"In order":h};h?s=l:r="red",u[d]=p}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+r+"; margin-right: 10px","background-color: transparent"),console.table(u),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(u),console.groupEnd();var i={};Array.from(document.querySelectorAll("a")).forEach((t,c)=>{var l=t.getAttribute("href"),d=t.textContent,h=t.getAttribute("title"),p={Text:d,Title:h};i[l]=p}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(i),console.groupEnd();var A={},m={};Array.from(document.querySelectorAll("img[alt]")).forEach((t,c)=>{var l=t.getAttribute("src"),d=t.getAttribute("alt");if(d!=""){var h={Alt:d};A[l]=h}else{var l=t.getAttribute("src"),p={};m[l]=p}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(A),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(m),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((t,c)=>{if(!t.matches("[src*='http']")&&!t.matches("[src$='.svg']")){var l=t.getAttribute("src"),d=new XMLHttpRequest;d.open("HEAD",l,!0),d.onreadystatechange=function(){if(d.readyState==4)if(d.status==200){var h=d.getResponseHeader("Content-Length");if(h>1024){var p=t.naturalWidth,P=t.naturalHeight,S=t.clientWidth,O=t.clientHeight,k=(S/p).toFixed(2)=="0.00"?"Hidden":(S/p).toFixed(2),B=Math.floor(h/1024),E=(h/(p*P)).toFixed(2),b="green",L="green",q="green",x="",T="";E>.5?(b="red",L="red",x="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):E>.2&&(b="orange",L="orange",x="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),k>1.2?(b="red",q="red",T="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):k<.5?(b="red",q="red",T="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):k<.8&&(b="orange",q="orange",T="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+t.src,"background: url("+t.src+"); border: 3px solid "+b+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),x!=""&&console.log("%c %c"+x,"background-color: "+L+"; margin-right: 10px","background-color: transparent"),T!=""&&console.log("%c %c"+T,"background-color: "+q+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:p+"x"+P,"Scaled to":S+"x"+O,Scale:k,Filesize:B+"Kb","Bytes per pixel":E}}),console.groupEnd()}}else console.log("%c %c"+t.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},d.send(null)}});var g=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(t){t.Total!=0&&t.Type!="warning"&&g.push(t.Test)}),g.length!=0){var y=document.querySelector("#vmtests-display");if(y!=null){y.innerHTML=`<div class="container">
|
|
5
5
|
<h2>Integration notes</h2>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta3
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/
|
|
5
5
|
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";window.triggerDynamicEvent=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change";console.log("event"),t.hasAttribute("data-change-events")&&"change"==a&&e(t,t.getAttribute("data-change-events")),t.hasAttribute("data-click-events")&&"click"==a&&e(t,t.getAttribute("data-click-events"))};var e=(e,a)=>{if(a||(a=e.parentNode.getAttribute("data-change-events")),!a)return!1;Array.from(JSON.parse(a)).forEach(a=>{t(e,a)})},t=(e,t)=>{if("matches"in t)return"any"==t.matches||e.value==t.matches?a(e,t,"if"):a(e,t,"else"),!1;if("in-list"in t){var o=document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'));return document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'))?a(o,t,"if"):a(o,t,"else"),!1}"event"in t&&a(e,t,"event")},a=(e,t,a)=>{if(!(a in t))return!1;switch(t[a]){case"hide":if(document.querySelector(t.target)){var n=document.querySelector(t.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(e=>{e.removeAttribute("required")})}break;case"show":if(document.querySelector(t.target)){var r=document.querySelector(t.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(e=>{e.closest(".js-hide")||e.setAttribute("required","true")})}break;case"populate-form":o(e,t);break;case"dispatchEvent":var s=new Event(t.value);document.querySelector("".concat(t.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.setAttribute(t.attribute,t.value)});break;case"focus":document.querySelector("".concat(t.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.removeAttribute(t.attribute)});break;case"updateValue":document.querySelector("".concat(t.target)).value=t.value?t.value:"";var l=new Event("change");document.querySelector("".concat(t.target)).dispatchEvent(l);break;case"submitForm":document.querySelector("".concat(t.target)).submit();break;case"openLink":document.querySelector("".concat(t.target)).value&&(window.location.href=document.querySelector("".concat(t.target)).value)}},o=function(e,t){var a=JSON.parse(e.getAttribute("data-values")),o=document.querySelector(t.target);if(!a)return!1;Object.keys(a).forEach(t=>{document.getElementById(t)&&"SPAN"==document.getElementById(t).tagName&&(document.getElementById(t).innerHTML=a[t]),o.querySelector('select[name="'.concat(t,'"] [value="').concat(a[t],'"]'))?(o.querySelector('select[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&(o.querySelector('select[name="'.concat(t,'"]')).disabled=!0)):o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]'))?(Array.from(o.querySelectorAll('input[name="'.concat(t,'"][type="radio"]'))).forEach(function(e){e.disabled=!0}),o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).checked=!0,o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).disabled=!1):o.querySelector('input[name="'.concat(t,'"]'))&&(o.querySelector('input[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&o.querySelector('input[name="'.concat(t,'"]')).setAttribute("readonly","true"))})},n=()=>{var e=[],t={},a="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=a,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+a,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),t={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((e,a)=>{if(null==e.closest(".navbar")){var o=e.querySelector(".btn-link");null!=o&&o.textContent.length?t.Passes++:t.Fails++}}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((e,a)=>{var o=e.closest(".container");null!=o&&o.matches('[class*="bg-"]')?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((e,a)=>{var o=e.querySelector("h2.display-4:first-child"),n=e.querySelector("h2.display-4:first-child + .strapline");null!=o&&null!=n?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((e,a)=>{e.querySelectorAll(':scope > .row > [class*="col"]').length%2==0?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((e,a)=>{1==e.querySelectorAll(":scope > *").length&&1==e.querySelectorAll(":scope > .h6:first-child").length?t.Passes++:1==e.querySelectorAll(":scope > *").length&&t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((e,a)=>{1==e.querySelectorAll("h2.h1:first-child").length?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),e.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:e.Passes},Failed:{value:e.Fails},Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),window.integrationTests=e;var o=[];t={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),o.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var n="green",r=1,s={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((e,t)=>{var a=1,o=e.textContent;e.matches("h2")?a=2:e.matches("h3")?a=3:e.matches("h4")?a=4:e.matches("h5")?a=5:e.matches("h6")&&(a=6);var l=a-r<=1;0==t&&1!=a&&(l=!1);var c={"Heading Level":a,"In order":l};l?r=a:n="red",s[o]=c}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+n+"; margin-right: 10px","background-color: transparent"),console.table(s),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(s),console.groupEnd();var l={};Array.from(document.querySelectorAll("a")).forEach((e,t)=>{var a=e.getAttribute("href"),o={Text:e.textContent,Title:e.getAttribute("title")};l[a]=o}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(l),console.groupEnd();var c={},i={};Array.from(document.querySelectorAll("img[alt]")).forEach((e,t)=>{var a=e.getAttribute("src"),o=e.getAttribute("alt");if(""!=o){var n={Alt:o};c[a]=n}else a=e.getAttribute("src"),i[a]={}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(c),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(i),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((e,t)=>{if(!e.matches("[src*='http']")&&!e.matches("[src$='.svg']")){var a=e.getAttribute("src"),o=new XMLHttpRequest;o.open("HEAD",a,!0),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status){var t=o.getResponseHeader("Content-Length");if(t>1024){var a=e.naturalWidth,n=e.naturalHeight,r=e.clientWidth,s=e.clientHeight,l="0.00"==(r/a).toFixed(2)?"Hidden":(r/a).toFixed(2),c=Math.floor(t/1024),i=(t/(a*n)).toFixed(2),u="green",d="green",g="green",h="",p="";i>.5?(u="red",d="red",h="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):i>.2&&(u="orange",d="orange",h="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),l>1.2?(u="red",g="red",p="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):l<.5?(u="red",g="red",p="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):l<.8&&(u="orange",g="orange",p="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+e.src,"background: url("+e.src+"); border: 3px solid "+u+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),""!=h&&console.log("%c %c"+h,"background-color: "+d+"; margin-right: 10px","background-color: transparent"),""!=p&&console.log("%c %c"+p,"background-color: "+g+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:a+"x"+n,"Scaled to":r+"x"+s,Scale:l,Filesize:c+"Kb","Bytes per pixel":i}}),console.groupEnd()}}else console.log("%c %c"+e.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},o.send(null)}});var u=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(e){0!=e.Total&&"warning"!=e.Type&&u.push(e.Test)}),0!=u.length){var d=document.querySelector("#vmtests-display");if(null!=d){d.innerHTML='<div class="container">\n <h2>Integration notes</h2>\n <ul id="integrationTests"></ul>\n </div>';var g=document.getElementById("integrationTests");null!=g&&u.forEach(function(e){g.innerHTML+="<li>"+e+"</li>"})}}return null},r=Object.freeze({__proto__:null,default:n});["localhost"].includes(window.location.hostname)&&Promise.resolve().then(function(){return r}).then(e=>{window.iamTest=()=>{n()}}).catch(e=>{console.log(e.message)}),document.addEventListener("DOMContentLoaded",()=>{return t=void 0,a=void 0,n=function*(){var t,a;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",e=>{var t=e.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=e.target.closest("summary"),o=e.target.closest("a"),n=e.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),o&&window.dataLayer.push({event:"linkClicked",linkText:o.hasAttribute("title")?o.getAttribute("title")||"":o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||"",href:o.getAttribute("href")||""}),n&&window.dataLayer.push({event:"buttonClicked",buttonText:n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||""})}}),document.addEventListener("change",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-click-events]")&&e(t.target,t.target.closest("[data-click-events]").getAttribute("data-click-events"))}),(a=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie"),t=function(e){var t=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),a=document.querySelector(e+" summary"),o=document.querySelector("dialog".concat(e)),n=document.querySelector("detail".concat(e));t instanceof HTMLElement?t.click():a instanceof HTMLElement?a.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")},location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&"pagination"==e.state.type){var t=document.querySelector("#".concat(e.state.form)),a=document.querySelector("#".concat(e.state.form," [data-pagination]"));a?a.value=e.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),t.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(e=>{e?.closest("iam-form")||e.addEventListener("submit",t=>{var a;e.querySelector(":invalid")&&(e.classList.add("was-validated"),null===(a=e?.querySelector("input:invalid"))||void 0===a||a.scrollIntoView(),t.preventDefault())})}),document.addEventListener("click",e=>{var t;if(e&&e.target instanceof HTMLElement&&e.target.matches("form button:not([type=button])")){var a=e.target.closest("form");a?.closest("iam-form")||(Array.from(a.querySelectorAll("[data-password-type]")).forEach(e=>{e.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),null===(t=a?.querySelector("input:invalid"))||void 0===t||t.scrollIntoView(),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault()))}}),document.addEventListener("keydown",e=>{"Escape"===e.key&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(e=>{e.closest("label").setAttribute("data-percent",e.getAttribute("value"))})},new((o=void 0)||(o=Promise))(function(e,r){function s(e){try{c(n.next(e))}catch(e){r(e)}}function l(e){try{c(n.throw(e))}catch(e){r(e)}}function c(t){t.done?e(t.value):function(e){return e instanceof o?e:new o(function(t){t(e)})}(t.value).then(s,l)}c((n=n.apply(t,a||[])).next())});var t,a,o,n})});
|