Kremta-Website/_astro/Swiper.DvRBGtDP.js

2 lines
79 KiB
JavaScript
Raw Normal View History

import{j as L}from"./jsx-runtime.CyXy1Ci3.js";import{r as O,R as I}from"./index.CaZlGE7t.js";/* empty css */function he(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function ue(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(i=>{typeof e[i]>"u"?e[i]=t[i]:he(t[i])&&he(e[i])&&Object.keys(t[i]).length>0&&ue(e[i],t[i])})}const ye={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function H(){const e=typeof document<"u"?document:{};return ue(e,ye),e}const Fe={document:ye,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function G(){const e=typeof window<"u"?window:{};return ue(e,Fe),e}function He(e){const t=e;Object.keys(t).forEach(i=>{try{t[i]=null}catch{}try{delete t[i]}catch{}})}function de(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function U(){return Date.now()}function ke(e){const t=G();let i;return t.getComputedStyle&&(i=t.getComputedStyle(e,null)),!i&&e.currentStyle&&(i=e.currentStyle),i||(i=e.style),i}function We(e,t){t===void 0&&(t="x");const i=G();let r,n,s;const o=ke(e);return i.WebKitCSSMatrix?(n=o.transform||o.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(l=>l.replace(",",".")).join(", ")),s=new i.WebKitCSSMatrix(n==="none"?"":n)):(s=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=s.toString().split(",")),t==="x"&&(i.WebKitCSSMatrix?n=s.m41:r.length===16?n=parseFloat(r[12]):n=parseFloat(r[4])),t==="y"&&(i.WebKitCSSMatrix?n=s.m42:r.length===16?n=parseFloat(r[13]):n=parseFloat(r[5])),n||0}function X(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Ye(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function N(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i<arguments.length;i+=1){const r=i<0||arguments.length<=i?void 0:arguments[i];if(r!=null&&!Ye(r)){const n=Object.keys(Object(r)).filter(s=>t.indexOf(s)<0);for(let s=0,o=n.length;s<o;s+=1){const l=n[s],a=Object.getOwnPropertyDescriptor(r,l);a!==void 0&&a.enumerable&&(X(e[l])&&X(r[l])?r[l].__swiper__?e[l]=r[l]:N(e[l],r[l]):!X(e[l])&&X(r[l])?(e[l]={},r[l].__swiper__?e[l]=r[l]:N(e[l],r[l])):e[l]=r[l])}}}return e}function q(e,t,i){e.style.setProperty(t,i)}function Pe(e){let{swiper:t,targetPosition:i,side:r}=e;const n=G(),s=-t.translate;let o=null,l;const a=t.params.speed;t.wrapperEl.style.scrollSnapType="none",n.cancelAnimationFrame(t.cssModeFrameID);const d=i>s?"next":"prev",c=(m,u)=>d==="next"&&m>=u||d==="prev"&&m<=u,f=()=>{l=new Date().getTime(),o===null&&(o=l);const m=Math.max(Math.min((l-o)/a,1),0),u=.5-Math.cos(m*Math.PI)/2;let v=s+u*(i-s);if(c(v,i)&&(v=i),t.wrapperEl.scrollTo({[r]:v}),c(v,i)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:v})}),n.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=n.requestAnimationFrame(f)};f()}function j(e,t){return t=