PageSourceSearch

https://sydneysothebysrealty.com/js/cowtools/collapse-panel.js

js sydneysothebysrealty.com collected 2026-10-04 18:53:19 UTC 6,227 bytes, 1 lines download raw bytes

1!function(t){"use strict";function i(t){return t instanceof NodeList||t instanceof Array||t instanceof HTMLCollection}function e(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(i(t))for(const i of t)for(const t in e)i.style.setProperty(t,e[t],n?"important":void 0);else if(t instanceof Element)for(const i in e)t.style.setProperty(i,e[i],n?"important":void 0);return t}function n(t){return t.offsetHeight+t.offsetWidth}function o(t){let{transitionDuration:i,transitionDelay:e}=function(t){let i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return null===i?window.getComputedStyle(t):window.getComputedStyle(t).getPropertyValue(i)}(t);return i||e?(i=i.toString()==i?Math.max(...i.split(",").map(parseFloat)):parseFloat(i),e=i.toString()==i?Math.max(...e.split(",").map(parseFloat)):parseFloat(e),1e3*(i+e)):0}function s(t){let i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if(!t.shadowRoot)return[];const e=""==i?t.shadowRoot.querySelector("slot:not([name])"):t.shadowRoot.querySelector(`slot[name="${i}"]`);return e instanceof HTMLSlotElement?e.assignedElements():[]}const r="collapse-panel";class l extends HTMLElement{static get observedAttributes(){return["open","group","duration"]}attributeChangedCallback(t,i,e){"open"===t?!!i!=!!e&&(this.open=void 0!==e):"group"===t?i!=e&&(this.group=e):"duration"===t&&i!=e&&(this.duration=parseFloat(e))}get group(){return this._state.group}set duration(t){10>(t=parseInt(t))&&(t*=1e3),t=parseInt(t),this._state.duration=t,this.shadowRoot.styleSheets.item(0).cssRules.item(1).style.setProperty("transition-duration",this._state.duration+"ms")}get duration(){return this._state.duration}set group(t){this._state.group=t||""}set open(t){const i=!!t;i!=this._state.open&&this.setVisibility(i,!1),""!=this._state.group&&this.open&&Array.from(document.querySelectorAll(`${r}[group="${this._state.group}"]`)).filter((t=>t!==this)).forEach((t=>{t.setVisibility(!1,!1)}))}get open(){return this._state.open}setVisibility(t){let i=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];t=!!t,this._state.open=t,this.slottedElements.trigger&&this.slottedElements.trigger.setAttribute("aria-expanded",t.toString()),this.content.setAttribute("aria-hidden",(!t).toString()),t?(i?function(t){t.classList.remove("transitioning-y"),t._transitioning=!1,n(t);const i=t.scrollHeight;t.classList.add("transitioning-y"),e(t,{height:`${i}px`,visibility:"visible",opacity:null,"padding-top":null,"padding-bottom":null,"margin-top":null,"margin-bottom":null,"border-top-width":null,"border-bottom-width":null})}(this.content):function(t){if(t){t._fx_transitionTimer&&clearTimeout(t._fx_transitionTimer),t._transitioning=!0,n(t);const i=t.scrollHeight;t.classList.add("transitioning-y"),e(t,{height:`${i}px`,visibility:"visible",opacity:null,"padding-top":null,"padding-bottom":null,"margin-top":null,"margin-bottom":null,"border-top-width":null,"border-bottom-width":null}),t._fx_transitionTimer=setTimeout((function(){t.classList.remove("transitioning-y"),t._transitioning=!1,t.style.height=null,t._fx_transitionTimer=null}),o(t)+50)}}(this.content),this.setAttribute("open","")):(i?function(t){t.classList.remove("transitioning-y"),e(t,{height:"0",opacity:"0",overflow:"hidden",visibility:"hidden","padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0"},!0),t._transitioning=!1}(this.content):function(t){let i=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(t){t._fx_transitionTimer&&clearTimeout(t._fx_transitionTimer),n(t);const s=t.scrollHeight;t.style.height=`${s}px`,t._transitioning=!0,t.classList.add("transitioning-y"),n(t),e(t,{height:"0",opacity:"0",overflow:"hidden","padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0"},!0),t._fx_transitionTimer=setTimeout((function(){t.classList.remove("transitioning-y"),t._transitioning=!1,t._fx_transitionTimer=null,i&&(t.remove(),t=null)}),o(t)+10)}}(this.content),this.removeAttribute("open"))}show(){this.setVisibility(!0,!0)}hide(){this.setVisibility(!1,!0)}expand(){this.setVisibility(!0)}collapse(){this.setVisibility(!1)}toggle(){this.setVisibility(!this.open)}getUniqueId(){return"collapse-panel_"+(++l.serial).toString(35)}constructor(){super(),this.slottedElements={},this._state={open:null,duration:300,group:""},this.attachShadow({mode:"open"}).appendChild(this.loadTemplate().cloneNode(!0)),this.slottedElements={trigger:s(this,"trigger")[0]},this.content=this.shadowRoot.querySelector(".__collapsible-content"),this.eventHandlers={expand:()=>this.open=!0,collapse:()=>this.open=!1,toggle:()=>this.open=!this.open},this.slottedElements.trigger&&(this.content.id||(this.content.id=this.getUniqueId()),this.slottedElements.trigger.setAttribute("aria-controls",this.content.id)),this.setVisibility(this.hasAttribute("open"),!0)}connectedCallback(){this.slottedElements.trigger.addEventListener("click",this.eventHandlers.toggle),this.duration=this._state.duration}disconnectedCallback(){this.slottedElements.trigger.removeEventListener("click",this.eventHandlers.toggle)}adoptedCallback(){this.open=!1}static async attach(){l.serial=0,void 0===customElements.get(r)&&customElements.define(r,l)}loadTemplate(){let t=document.createElement("template");return t.innerHTML='<slot name="trigger"></slot>\n         <div class="__collapsible-content">\n            <slot/>\n        </div>\n        <style>\n\n        :host{display: block;}\n\n        .__collapsible-content {\n            overflow: hidden;\n        }\n        .__collapsible-content.transitioning-y {\n                height: 0;\n                overflow: hidden;\n                visibility: visible;\n                transition-property: height, padding, margin, border-width, opacity;\n            }\n            ::slotted([slot="trigger"])\n            {\n                cursor: pointer;\n                user-select: none;\n            }\n        </style>\n        ',t.content}}window.addEventListener("DOMContentLoaded",l.attach),t.CollapsePanel=l
vendor: 56 bytes, line 1
1,Object.defineProperty(t,"__esModule",{value:!0})}({});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.