kollapsminoriteten/wp-content/themes/blocksy/static/bundle/315.a636f90ecbe035bf9c2f.js

1 line
23 KiB
JavaScript
Raw Normal View History

2025-08-27 08:44:30 +02:00
"use strict";(self.blocksyJsonP=self.blocksyJsonP||[]).push([[315],{8315:function(t,e,n){n.d(e,{D:function(){return w}});const i=["style"];function o(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const u=function(){return"rtl"===document.querySelector("html").dir},d=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;if(t.getBoundingClientRect&&!t.firstElementChild)return t.getBoundingClientRect();e||(e=t);let{top:n,left:i,right:o,width:r,height:s}=t.getBoundingClientRect(),a=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map((function(t){return parseFloat(t)}));if(6!=a.length)return t.getBoundingClientRect();var l=a;let u=l[0]*l[3]-l[1]*l[2];return{width:r/l[0],height:s/l[3],left:(i*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/u,right:(o*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/u,top:(-i*l[1]+n*l[0]+l[4]*l[1]-l[0]*l[5])/u}},c=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},h=function(t){return t?t&&"[object Function]"==={}.toString.call(t)?t():t:null},p=function(t){if(!t.options.pillsContainerSelector)return;const e=t.options.pillsContainerSelector.querySelector(".active");e&&e.classList.remove("active"),t.options.pillsContainerSelector.children[t.state.previousCurrentIndex].classList.add("active"),t.options.pillsFlexyInstance&&function(t){const e=t.options.pillsFlexyInstance.flexy,n=[...t.options.pillsContainerSelector.children],i=h(e.sliderContainer),o=[...i.children].map((function(t){return d(t,h(e.options.nullifyTransformEl))})),r=d(i,h(e.options.nullifyTransformEl));let a=0;const l=o.map((function(t,e){return{left:Math.abs(t.left-r.left),top:Math.abs(t.top-r.top),right:Math.abs(t.right-r.right)}}));if("horizontal"===e.options.orientation){const t=Math.min(...l.map((function(t){return t.left}))),e=Math.min(...l.map((function(t){return t.right})));a=u()?l.findIndex((function(t){return t.right===e})):l.findIndex((function(e){return e.left===t}))}if("vertical"===e.options.orientation){const t=Math.min(...l.map((function(t){return t.top})));a=l.findIndex((function(e){return e.top===t}))}let c=0;if("horizontal"===e.options.orientation){let e=Math.round(d(i).width/d(i.firstElementChild).width);c=Math.max(t.state.previousCurrentIndex+1-e,0),i.closest('[data-type="circle"]')&&(c=Math.max(t.state.previousCurrentIndex-2,0),n.length-1-t.state.previousCurrentIndex<3&&(c=n.length-5))}else c=t.state.previousCurrentIndex;let p=Math.abs(c-a),f=Math.min(a,c)+(n.length-Math.max(a,c)),m=Math.min(p,f)*(f>=p?a>c?1:-1:a>c?-1:1);u()&&(m*=-1);let g=100*Math.round(100*e.state.positionX/e.state.slideWidth/100)