PageSourceSearch

https://www.thepelhamhotel.com/integration/tc-theme/public/js/chun…-tc-reviews-snippet-db9f58e9e4cda9f1e632.js

js thepelhamhotel.com collected 2026-09-28 09:24:19 UTC 2,332 bytes, 1 lines download raw bytes

1"use strict";(self.tcthemejsonpFunction=self.tcthemejsonpFunction||[]).push([[72],{2190(e,t,n){n.d(t,{default:()=>h});var s=n(8972),i=n(6131),o=n(9650);const{QJ:r}=s.iW,{keys:a,checkClick:c}=r;class d{constructor(){this.container=document.querySelector(".tc-reviews-snippet--container"),this.collapseContainer=this.container.lastElementChild,this.header=document.querySelector(".tc-reviews-snippet--header"),this.body=document.querySelector(".tc-reviews-snippet--body"),this.footer=document.querySelector(".tc-reviews-snippet--footer"),this.expanded=!1,this.initialize()}async initialize(){this.setStarsRate(),this.initSlider(),this.moveContainer(),this.setFocusableElementsState(),this.showContainer(),this.trimText(),this.bindEvents()}setFocusableElementsState(){const e=this.expanded?0:-1;this.body.querySelectorAll(".slick-arrow").forEach(t=>t.tabIndex=e),this.footer&&(this.footer.firstElementChild.tabIndex=e)}moveContainer(){const e=document.querySelector(".breadcrumb-container");e?e.insertAdjacentElement("beforebegin",this.container):document.getElementById("site-content").insertAdjacentElement("afterbegin",this.container)}setStarsRate(){this.header.querySelector(".tc-reviews-snippet--stars").dataset.stars=Math.floor(this.header.querySelector(".tc-reviews-snippet--avg-star-rating").textContent)}initSlider(){new i.A(this.body,{})}showContainer(){setTimeout(()=>{this.container.classList.remove("tc-reviews-snippet--not-ready")},1e3)}bindEvents(){const e=this.header.querySelector(".tc-reviews-snippet--expand-btn");e.addEventListener("keydown",this.onButtonClick.bind(this,e)),e.addEventListener("click",this.onButtonClick.bind(this,e)),this.container.addEventListener("keydown",this.collapseOnEscapePress.bind(this,e)),document.addEventListener("changeDevice",this.trimText.bind(this))}trimText(){(0,o.A)(this.body)}collapseOnEscapePress(e,t){t.keyCode===a.escape&&this.expanded&&(e.dispatchEvent(new Event("click")),e.focus())}onButtonClick(e,t){"keydown"===t.type&&t.keyCode!==a.tab&&t.preventDefault(),c(t)&&(this.expanded=!this.expanded,this.setContainerExpandedState(),this.wcagRules(e),this.setFocusableElementsState())}wcagRules(e){e.setAttribute("aria-expanded",this.expanded)}setContainerExpandedState(){this.container.classList.toggle("tc-reviews-snippet--container-expanded")}}const h={init(){new d}}}}]);

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.