PageSourceSearch

https://www.tet.lv/dist/modules/mod_services_interactive_v2/scripts/index.245545d8176a4e3e79ff.js?fe389c

js tet.lv collected 2026-10-01 10:31:47 UTC 8,311 bytes, 1 lines download raw bytes

1(()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,n(a.key),a)}}function i(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(e){var i=function(e,i){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,i||"default");if("object"!=t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(e)}(e,"string");return"symbol"==t(i)?i:i+""}var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"rootElement",null),i(this,"gridElement",null),i(this,"cardElements",[]),i(this,"animationsEnabled",!1),i(this,"interactionsDisabled",!1),Object.assign(this,e)}return n=t,(a=[{key:"init",value:function(){this.rootElement&&(this.gridElement=this.rootElement.querySelector(".services-interactive-v2__grid"),this.gridElement&&(this.cardElements=Array.from(this.rootElement.querySelectorAll("[data-services-interactive-card]")),this.animationsEnabled="1"===this.gridElement.dataset.enableAnimations,this.initState(),this.initCards(),this.syncAccessibilityState(),this.syncArrowIcons(),this.initVideoPlayback(),this.bindEvents()))}},{key:"initVideoPlayback",value:function(){var t,e,i=this;this.syncVideoPlayback(),null===(t=globalThis.TetThemeAnimation)||void 0===t||null===(e=t.onChange)||void 0===e||e.call(t,function(){i.syncVideoPlayback()}),new MutationObserver(function(){i.syncVideoPlayback()}).observe(this.rootElement,{subtree:!0,attributes:!0,attributeFilter:["class"]})}},{key:"syncVideoPlayback",value:function(){var t,e,i=null===(t=globalThis.TetThemeAnimation)||void 0===t||null===(e=t.isEnabled)||void 0===e?void 0:e.call(t);this.rootElement.querySelectorAll(".services-interactive-v2__video").forEach(function(t){var e;if(t instanceof HTMLVideoElement)if(null===(e=t.closest(".services-interactive-v2__card"))||void 0===e?void 0:e.classList.contains("is-expanded"))if(!1===i){t.pause();try{t.currentTime=0}catch(t){}}else{var n;null===(n=t.play())||void 0===n||n.catch(function(){})}else t.pause()})}},{key:"initState",value:function(){this.gridElement&&(this.interactionsDisabled=this.shouldDisableInteractions(),this.gridElement.classList.toggle("services-interactive-v2__grid--no-shift",this.cardElements.length<=2),this.gridElement.classList.toggle("services-interactive-v2__grid--animations-disabled",!this.animationsEnabled),this.gridElement.classList.toggle("services-interactive-v2__grid--interactions-disabled",this.interactionsDisabled),this.initializeDefaultExpandedState(),this.syncAccessibilityState(),this.syncArrowIcons())}},{key:"isMobileLayout",value:function(){return window.innerWidth<t.tabletBreakpoint}},{key:"isTabletLayout",value:function(){return window.innerWidth>=t.tabletBreakpoint&&window.innerWidth<t.desktopBreakpoint}},{key:"isDesktopLayout",value:function(){return window.innerWidth>=t.desktopBreakpoint}},{key:"shouldDisableInteractions",value:function(){return this.cardElements.length<=2}},{key:"initializeDefaultExpandedState",value:function(){this.interactionsDisabled?this.cardElements.forEach(function(t){t.classList.add("is-expanded")}):this.isMobileLayout()?this.cardElements.forEach(function(t,e){t.classList.toggle("is-expanded",0===e)}
1):this.getCardsGroupedByColumn().forEach(function(t){t.forEach(function(t,e){t.classList.toggle("is-expanded",0===e)}),!t.some(function(t){return t.classList.contains("is-expanded")})&&t[0]&&t[0].classList.add("is-expanded")})}},{key:"initCards",value:function(){var t=this;this.cardElements.forEach(function(e,i){t.initializeCard(e,i)})}},{key:"initializeCard",value:function(t,e){var i=this;if(t.dataset.cardIndex=String(e),this.interactionsDisabled)return t.removeAttribute("tabindex"),t.removeAttribute("role"),void t.removeAttribute("aria-expanded");t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("click",function(e){i.handleCardClick(e,t)}),t.addEventListener("keydown",function(e){i.handleCardKeydown(e,t)})}},{key:"handleCardClick",value:function(t,e){if(!this.interactionsDisabled&&(this.isMobileLayout()||!e.classList.contains("is-expanded"))){var i=t.target instanceof HTMLElement?t.target:null;i&&(this.isInteractiveControl(i)||this.toggleCard(e))}}},{key:"handleCardKeydown",value:function(t,e){if(!this.interactionsDisabled&&(this.isMobileLayout()||!e.classList.contains("is-expanded"))&&("Enter"===t.key||" "===t.key)){var i=t.target instanceof HTMLElement?t.target:null;i&&this.isInteractiveControl(i)||(t.preventDefault(),this.toggleCard(e))}}},{key:"isInteractiveControl",value:function(t){return!!t.closest("tet-button, a, button, input, select, textarea, label, [data-modal-screen-key]")}},{key:"toggleCard",value:function(t){if(this.isMobileLayout())return t.classList.contains("is-expanded")?t.classList.remove("is-expanded"):this.cardElements.forEach(function(e){e.classList.toggle("is-expanded",e===t)}),this.syncAccessibilityState(),void this.syncArrowIcons();this.getCardsInSameColumn(t).forEach(function(e){e.classList.toggle("is-expanded",e===t)}),this.syncAccessibilityState(),this.syncArrowIcons()}},{key:"getCardsGroupedByColumn",value:function(){var t=new Map;return this.cardElements.forEach(function(e){var i=e.closest("[data-services-interactive-column]"),n=(null==i?void 0:i.getAttribute("data-services-interactive-column"))||"default";t.has(n)||t.set(n,[]),t.get(n).push(e)}),Array.from(t.values()).map(function(t){return t.sort(function(t,e){return Number(t.dataset.cardIndex||0)-Number(e.dataset.cardIndex||0)})})}},{key:"getCardsInSameColumn",value:function(t){var e=t.closest("[data-services-interactive-column]"),i=(null==e?void 0:e.getAttribute("data-services-interactive-column"))||"default";return this.cardElements.filter(function(t){var e=t.closest("[data-services-interactive-column]");return((null==e?void 0:e.getAttribute("data-services-interactive-column"))||"default")===i})}},{key:"bindEvents",value:function(){var t=this;window.addEventListener("resize",function(){t.handleResize()})}},{key:"handleResize",value:function(){var t=this;if(this.gridElement){var e=this.interactionsDisabled,i=this.getCurrentLayoutKey();this.interactionsDisabled=this.shouldDisableInteractions(),this.gridElement.classList.toggle("services-interactive-v2__grid--no-shift",this.cardElements.length<=2),this.gridElement.classList.toggle("services-interactive-v2__grid--interactions-disabled",this.interactionsDisabled);var n=this.getCurrentLayoutKey();e===this.interactionsDisabled&&i===n||this.initializeDefaultExpandedState(),this.cardElements.forEach(function(e){t.interactionsDisabled?(e.removeAttribute("tabindex"),e.removeAttribute("role")):(e.setAttribute("tabindex","0"),e.setAttribute("role","button"))}),this.syncAccessibilityState(),this.syncArrowIcons()}}},{key:"getCurrentLayoutKey",value:function(){return this.isMobileLayout()?"mobile":this.isTabletLayout()?"tablet":"desktop"}},{key:"syncAccessibilityState",value:function(){var t=this;this.cardElements.forEach(function(e){var i=e.querySelector("[data-services-interactive-collapsible]"),n=e.classList.contains("is-expanded");if(t.interactionsDisabled)return e.removeAttribute("aria-expanded"),void(i&&i.setAttribute("aria-hidden","false"));n?(e.removeAttribute("tabindex"),e.removeAttribute("role")):(e.setAttribute("tabindex","0"),e.setAttribute("role","button")),e.setAttribute("aria-expanded",n?"true":"false"),i&&i.setAttribute("aria-hidden",n?"false":"true")})}},{key:"syncArrowIcons",value:function(){this.cardElements.forEac
1h(function(t){var e=t.querySelector("[data-services-interactive-arrow]");if(e){var i=t.classList.contains("is-expanded");e.setAttribute("name",i?"tc-chevron-up":"tc-chevron-down")}})}}])&&e(n.prototype,a),s&&e(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,s}();i(a,"tabletBreakpoint",768),i(a,"desktopBreakpoint",1440),window.ServicesInteractiveV2=a})();

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.