Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/coblocks/dist/409.js
Назад
(globalThis.webpackChunkcoblocks=globalThis.webpackChunkcoblocks||[]).push([[409],{3803:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(998).A},998:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(1609),r=n(5573);const a=(0,o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(r.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}))},6409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>$});var o=n(1609),r=n(2485),a=n.n(r);const s={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const l=new Uint8Array(16);function c(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(l)}const u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));const d=function(e,t,n){if(s.randomUUID&&!t&&!e)return s.randomUUID();const o=(e=e||{}).random||(e.rng||c)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]}(o)};var p=n(9668),m=n(8468),f=n(7723),g=n(4715),v=n(6427);const h=e=>{const{attributes:t,categoriesList:n,hasPosts:r,postCount:a,setAttributes:s,useUpdatedQueryControls:i}=e,{displayPostContent:l,displayPostDate:c,excerptLength:u,order:d,orderBy:p,postFeedType:m,postsToShow:h,columns:b,categories:y,categoryRelation:x}=t,E=(0,o.createElement)(v.PanelBody,{title:(0,f.__)("Post Carousel settings","coblocks")},(0,o.createElement)(o.Fragment,null,(0,o.createElement)(v.ToggleControl,{label:(0,f.__)("Post date","coblocks"),checked:c,help:c?(0,f.__)("Showing the publish date.","coblocks"):(0,f.__)("Toggle to show the publish date.","coblocks"),onChange:()=>s({displayPostDate:!c})}),(0,o.createElement)(v.ToggleControl,{label:(0,f.__)("Post content","coblocks"),checked:l,help:l?(0,f.__)("Showing the post content.","coblocks"):(0,f.__)("Toggle to show the post content.","coblocks"),onChange:()=>s({displayPostContent:!l})}),l&&(0,o.createElement)(v.RangeControl,{label:(0,f.__)("Max words in content","coblocks"),value:u,onChange:e=>s({excerptLength:e}),min:5,max:75}),(0,o.createElement)(v.RangeControl,{label:(0,f.__)("Columns","coblocks"),value:b,onChange:e=>{var t;s({columns:(t=e)>h?h:t})},min:1,max:Math.min(4,a),required:!0}))),w=(0,o.createElement)(v.QueryControls,{order:d,orderBy:p,categoriesList:n,selectedCategoryId:t.categories,onOrderChange:e=>s({order:e}),onOrderByChange:e=>s({orderBy:e}),onCategoryChange:e=>s({categories:""!==e?e:void 0})});return(0,o.createElement)(g.InspectorControls,null,r?E:null,(0,o.createElement)(v.PanelBody,{title:(0,f.__)("Feed settings","coblocks"),initialOpen:!r},(0,o.createElement)(v.RadioControl,{selected:m,options:[{label:(0,f.__)("My blog","coblocks"),value:"internal"},{label:(0,f.__)("External feed","coblocks"),value:"external"}],onChange:e=>s({postFeedType:e})}),r||y&&y?.length>0?(0,o.createElement)(o.Fragment,null,"internal"===m&&i?(()=>{const e=n.reduce(((e,t)=>({...e,[t.name]:t})),{}),r=n.reduce(((e,t)=>({...e,[t.name]:t})),{});return(0,o.createElement)(v.QueryControls,{order:d,orderBy:p,categorySuggestions:e,selectedCategories:t.categories,onOrderChange:e=>s({order:e}),onOrderByChange:e=>s({orderBy:e}),onCategoryChange:e=>{const t=e.reduce(((e,t)=>{if("string"==typeof t){const n=r[t];n&&e.push(n)}else e.push(t);return e}),[]);s({categories:t}),e.length<2&&s({categoryRelation:"or"})}})})():w,y&&y.length>1&&(0,o.createElement)(v.RadioControl,{label:(0,f.__)("Category relation","coblocks"),help:(0,f.__)("The logical relationship between each category when there is more than one.","coblocks"),selected:x,options:[{label:(0,f.__)("Or","coblocks"),value:"or"},{label:(0,f.__)("And","coblocks"),value:"and"}],onChange:e=>s({categoryRelation:e})}),(0,o.createElement)(v.RangeControl,{label:(0,f.__)("Number of posts","coblocks"),value:h,onChange:e=>(e=>{const t={postsToShow:e};(b>e||1===e&&1!==b)&&Object.assign(t,{columns:e}),s(t)})(e),min:1,max:20})):null))};var b=n(9491),y=n(6087),x=n(9877),E=n(7143),w=n(8443);const S=(0,b.compose)([(0,E.withSelect)(((e,{clientId:t})=>({attributes:e("core/block-editor").getBlockAttributes(t)})))])((({post:e,setAttributes:t,attributes:n})=>{const{excerptLength:r,displayPostLink:s,displayPostDate:i,displayPostContent:l,postLink:c}=n,u=e.featured_media_object?e.featured_media_object.source_url:null,d="url("+u+")",p=e.title.rendered.trim();let m=e.excerpt.rendered;""===e.excerpt.raw&&(m=e.content.raw);const h=document.createElement("div");h.innerHTML=m,m=h.textContent||h.innerText||"";const b=(0,w.__experimentalGetSettings)().formats.date;return(0,o.createElement)("div",{className:"wp-block-coblocks-post-carousel__item"},u&&(0,o.createElement)("div",{className:"wp-block-coblocks-post-carousel__image"},(0,o.createElement)("div",{className:"bg-cover bg-center-center",style:{backgroundImage:d}})),(0,o.createElement)("div",{className:a()("wp-block-coblocks-post-carousel__content",{"full-height":!u})},i&&e.date_gmt&&(0,o.createElement)("time",{className:"wp-block-coblocks-post-carousel__date",dateTime:(0,w.format)("c",e.date_gmt)},(0,w.dateI18n)(b,e.date_gmt)),(0,o.createElement)(v.Disabled,null,(0,o.createElement)("a",{alt:p,href:e.link,rel:"noreferrer noopener",target:"_blank"},p?(0,o.createElement)(y.RawHTML,null,p) /* translators: placeholder when a post has no title */:(0,f.__)("(no title)","coblocks"))),l&&(0,o.createElement)("div",{className:"wp-block-coblocks-post-carousel__excerpt"},(0,o.createElement)(y.RawHTML,{key:"html"},(0,x.escapeHTML)(m.trim().split(" ",r).join(" ")))),s&&(0,o.createElement)(g.PlainText,{className:"wp-block-coblocks-post-carousel__more-link",onChange:e=>t({postLink:e}),placeholder:(0,f.__)("Read more","coblocks"),value:c})))}));var _=n(5556),k=n.n(_),C=n(7152),P=n.n(C),T=n(3266),L=n.n(T);const R=e=>{const{list:t,children:n,navigation:r=!1,isDraggable:s=!0,autoPlaySpeed:i=null,pauseHover:l=null,loop:c=!0,onSwipe:u=null,Pagination:d=null,uuid:p=null,slidesPerView:m=1,spaceBetween:f=0,navigationClass:g=null}=e,[v,h]=(0,y.useState)(null),[x,E]=(0,y.useState)(null),[w,S]=(0,y.useState)(!1),_=(0,b.usePrevious)(w),k=(0,b.usePrevious)(i),C=(0,y.useRef)(null);(0,y.useEffect)((()=>{if(!s)return C.current.addEventListener("mousedown",(e=>e.stopPropagation())),()=>{C?.current?.removeEventListener("mousedown",(e=>e.stopPropagation()))}}),[s]),(0,y.useEffect)((()=>{const e=document.getElementById(p);e&&new ResizeObserver((()=>{v?.update()})).observe(e)}),[v]),(0,y.useEffect)((()=>{try{const e=(()=>{const e=document.querySelector(".edit-site-visual-editor__editor-canvas");return e?e.contentDocument:document})(),t=e.getElementById(p),n=e.getElementById(`${p}-prev`),o=e.getElementById(`${p}-next`),r=new(P())(t,{centeredSlides:!1,freeMode:!1,longSwipesRatio:.8,loop:c,navigation:{nextEl:o,prevEl:n},passiveListeners:!0,plugins:[L()],slidesPerView:m,spaceBetween:f,touchable:!1});u&&r.on("after-slide",u),h(r)}catch(e){console.log("swiper init error",e)}}),[]),(0,y.useEffect)((()=>{!0===w&&!0===l&&null!==i&&clearInterval(x),!1===w&&!0===_&&!0===l&&E(setInterval(T,i)),null===k&&null!==i&&E(setInterval(T,i)),null!==k&&null===i&&clearInterval(x),null!==k&&null!==i&&i!==k&&(clearInterval(x),E(setInterval(T,i)))}),[v,i,k,x,w,l]);const T=(0,y.useCallback)((()=>{v?.slideTo(v.state.index+1)}),[v,w]),R=(0,y.useMemo)((()=>t.map(((e,t)=>(0,o.createElement)("div",{className:"swiper-slide",id:t,key:t},n({index:t,item:e}))))),[s]),I=(0,y.useMemo)((()=>{const e=a()({[`${g}__prev`]:g,"nav-button__prev":!g,"no-navigation":!1===r}),t=a()({[`${g}__next`]:g,"nav-button__next":!g,"no-navigation":!1===r});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("button",{className:e,id:`${p}-prev`},(0,o.createElement)("svg",{className:"icon",style:{transform:"rotate(180deg)"}})),(0,o.createElement)("button",{className:t,id:`${p}-next`},(0,o.createElement)("svg",{className:"icon"})))}),[r]),A=e=>{v?.slideTo(e)},M=(0,y.useMemo)((()=>{if(d)return d({changeStep:A})}),[d,v]);return(0,o.createElement)("div",{className:"coblocks-swiper-container",onMouseEnter:()=>{!0===l&&null!==x&&S(!0)},onMouseLeave:()=>{!0===l&&null!==x&&S(!1)}},(0,o.createElement)("div",{className:"swiper-container",id:p},(0,o.createElement)("div",{className:"swiper-wrapper",id:"swiper-wrapper",ref:C},R),I),M)};R.propTypes={autoPlaySpeed:k().number.isRequired,children:k().func,isDraggable:k().bool.isRequired,list:k().array,loop:k().bool.isRequired,navigation:k().bool.isRequired,onSwipe:k().func,pauseHover:k().any,slidesPerView:k().number.isRequired,uuid:k().string},R.defaultProps={autoPlaySpeed:null,isDraggable:!0,loop:!0,navigation:!1,slidesPerView:1};const I=e=>{const{list:t,slidesPerView:n,loop:r}=e,a=(0,y.useMemo)((()=>d()),[t.length,n,r]);return(0,o.createElement)("span",{key:a},(0,o.createElement)(R,{uuid:a,...e}))};var A=n(3832),M=n(1455),O=n.n(M),z=n(3803),B=n(4871),N=n.n(B);const D={per_page:-1},$=(0,b.compose)([(0,E.withSelect)(((e,t)=>{const{postsToShow:n,order:o,orderBy:r,categories:a,categoryRelation:s}=t.attributes,{getEntityRecords:i,getMedia:l}=e("core"),{getEditorSettings:c,getCurrentPost:u}=e("core/editor"),{isRTL:d}=c(),p=u(),f=v.QueryControls.toString().includes("selectedCategories");return{isRTL:d,latestPosts:f?(()=>{const e=a&&a.length>0?a.map((e=>e?.id)):[],t=(0,m.pickBy)({categories:e,exclude:p.id,order:o,orderby:r,per_page:"and"===s?"-1":n},(e=>!(0,m.isUndefined)(e)));let c=i("postType","post",t);return"and"===s&&c&&(c=c.filter((t=>(0,m.isEqual)(t.categories.concat().sort(),e.concat().sort()))).slice(0,n)),Array.isArray(c)?c.map((e=>{if(e.featured_media){const t=l(e.featured_media);let n=(0,m.get)(t,["media_details","sizes","source_url"],null);return n||(n=(0,m.get)(t,"source_url",null)),{...e,featuredImageSourceUrl:n}}return e})):c})():(()=>{const t=(0,m.pickBy)({categories:a,exclude:p.id,order:o,orderby:r,per_page:n},(e=>!(0,m.isUndefined)(e)));let s=i("postType","post",t);return s&&(s=s.map((t=>({...t,featured_media_object:t.featured_media&&e("core").getMedia(t.featured_media)})))),s})(),useUpdatedQueryControls:f}}))])((e=>{const{attributes:t,setAttributes:n,latestPosts:r,className:s,clientId:i}=e,{displayPostContent:l,displayPostLink:c,externalRssUrl:u,postFeedType:m,postsToShow:b,columns:x,align:w}=t,[_,k]=(0,y.useState)([]),[C,P]=(0,y.useState)(u),T=(0,y.useMemo)((()=>d()),[]),{selectBlock:L}=(0,E.useDispatch)("core/block-editor");let R=(0,y.useRef)(!0);(0,y.useEffect)((()=>(O()({path:(0,A.addQueryArgs)("/wp/v2/categories",D)}).then((e=>{R&&k(e)})).catch((()=>{R&&k([])})),()=>{R=!1})),[]),(0,y.useEffect)((()=>{c&&!l&&n({displayPostLink:!1})}),[c,l]),(0,y.useEffect)((()=>{"external"===m&&setTimeout((()=>{const e=document.querySelector(`.wp-block-coblocks-post-carousel-external-container-${T}`),t=e.querySelector(".swiper-wrapper");if(t){t.classList.remove("swiper-wrapper"),t.classList.add("swiper-wrapper-editor");const n=e.querySelector("#wp-coblocks-post-carousel-swiper-prev"),o=e.querySelector("#wp-coblocks-post-carousel-swiper-next");n.style.display="none",o.style.display="none"}}),1e3)}),[t,C,m]);const M=()=>{L(i)},B=[{icon:z.A,onClick:()=>P(!0),title:(0,f.__)("Edit RSS URL","coblocks")}],$=Array.isArray(r)&&r.length,U=Array.isArray(r)&&r.length>b?r.slice(0,b):r,F=(0,y.useMemo)((()=>1===U?.length?(0,o.createElement)(S,{clientId:i,post:U[0],setAttributes:n}):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:a()(s,{[`align${w}`]:w}),onClick:M,onKeyDown:M,role:"button",tabIndex:"0"},(0,o.createElement)(I,{list:U||[],loop:!1,navigation:!0,navigationClass:"wp-coblocks-post-carousel-nav-button",slidesPerView:x,spaceBetween:35},(({index:e,item:t})=>(0,o.createElement)(S,{clientId:i,key:e,post:t,setAttributes:n})))))),[x,U]);return $||"internal"!==m?C&&"external"===m?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h,{...e,attributes:t,categoriesList:_,editing:C,hasPosts:$,postCount:r&&r.length}),(0,o.createElement)(v.Placeholder,{icon:(0,o.createElement)(v.Icon,{icon:p.OGL}),instructions:(0,f.__)("RSS URLs are generally located at the /feed/ directory of a site.","coblocks"),label:(0,f.__)("RSS Feed","coblocks")},(0,o.createElement)("form",{onSubmit:e=>{e.preventDefault(),u&&P(!1)}},(0,o.createElement)(v.TextControl,{className:"components-placeholder__input",onChange:e=>n({externalRssUrl:e}),placeholder:(0,f.__)("https://example.com/feed…","coblocks"),value:u}),(0,o.createElement)(v.Button,{disabled:!u,type:"submit"},(0,f.__)("Use URL","coblocks"))))):(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h,{...e,attributes:t,categoriesList:_,editing:C,hasPosts:$,postCount:r&&r.length}),(0,o.createElement)(g.BlockControls,null,"external"===m&&(0,o.createElement)(v.Toolbar,{controls:B})),"external"===m&&(0,o.createElement)("span",{className:`wp-block-coblocks-post-carousel-external-container-${T}`},(0,o.createElement)(N(),{attributes:t,block:"coblocks/post-carousel",className:"coblocks-slick pb-8"})),"internal"===m&&F):(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h,{...e,attributes:t,categoriesList:_,editing:C,hasPosts:$,postCount:r&&r.length}),(0,o.createElement)(v.Placeholder,{icon:(0,o.createElement)(v.Icon,{icon:p.OGL}),label:(0,f.__)("Post Carousel","coblocks")},Array.isArray(r)?(0,o.createElement)(o.Fragment,null,(0,f.__)("No posts found. Start publishing or add posts from an RSS feed.","coblocks"),(0,o.createElement)(v.Button,{className:"components-placeholder__cancel-button",isSecondary:!0,onClick:()=>{n({postFeedType:"external"})},title:(0,f.__)("Retrieve an external feed","coblocks")},(0,f.__)("Use External Feed","coblocks"))):(0,o.createElement)(v.Spinner,null)))}))},2485:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var s=r.apply(null,n);s&&e.push(s)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)o.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,s){if(s!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7152:function(e){e.exports=function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,o=arguments[t];for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function t(e,t){void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),t.forEach((function(t){return!e.classList.contains(t)&&e.classList.add(t)}))}function n(e,t,n,o){e.addEventListener(t,n,o)}function o(e,t,n){e.removeEventListener(t,n)}function r(e,t,n){return void 0===n&&(n=""),e.setAttribute(t,n),e}function a(e,t,n){return Object.keys(t).forEach((function(n){e.style[n]=t[n]})),n&&getComputedStyle(e),e}var s={direction:"horizontal",touchRatio:1,touchAngle:45,longSwipesRatio:.5,initialSlide:0,loop:!1,freeMode:!1,passiveListeners:!0,resistance:!0,resistanceRatio:.85,speed:300,longSwipesMs:300,spaceBetween:0,slidesPerView:1,centeredSlides:!1,slidePrevClass:"swiper-slide-prev",slideNextClass:"swiper-slide-next",slideActiveClass:"swiper-slide-active",slideClass:"swiper-slide",wrapperClass:"swiper-wrapper",touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchMoveStopPropagation:!1,excludeElements:[],injections:{translate:function(e,t,n,o){a(t.element.$wrapper,{transition:e.isStart?"none":"transform ease "+o+"ms",transform:n.isHorizontal?"translate3d("+e.transforms+"px, 0, 0)":"translate3d(0, "+e.transforms+"px, 0)"})}}},i="before-slide",l="scroll",c="after-slide";var u=180/Math.PI;function d(){var t=[];return{getDuration:function(){var e=t[0],n=t[t.length-1];return e?n.time-e.time:0},getOffset:function(){var e=t[0],n=t[t.length-1];return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}},getLogs:function(){return t},vector:function(){return o=(n=t).length-1,r=n[o],n=n[o-1]||r,o={x:r.x-n.x,y:r.y-n.y},r=r.time-n.time,n=o.x/r||0,r=o.y/r||0,e({},o,{angle:Math.atan2(Math.abs(o.y),Math.abs(o.x))*u,velocityX:n,velocityY:r});var n,o,r},clear:function(){t=[]},push:function(n){t.push(e({time:Date.now()},n))}}}function p(){return(performance||Date).now()}var m=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,f=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function g(){var e=function(){var e,t;return{run:function(n){e=void 0===e?p():e,t=m((function(){var t=p(),o=t-e;e=t,n(o)}))},stop:function(){e=void 0,f(t)}}}();return{run:function t(n){e.run((function(e){t(n),n(e)}))},stop:function(){e.stop()}}}function v(e,t){e=e.tracker,t=t.initStatus,e.clear(),t()}function h(e,t,n,o){var r=o.initLayout,a=o.initStatus,s=o.render,i=o.scrollPixel,l=o.slideTo,c=o.getOffsetSteps,u=g();return{preheat:function(e,t){var o=n.tracker;u.stop(),o.clear(),o.push(e),r(t),a(t),n.isStart=!0,s()},move:function(t){var o,r=n.tracker,a=e.touchRatio,l=e.touchAngle,c=e.isHorizontal;n.isStart&&!n.isScrolling&&(r.push(t),o=r.vector(),((t=r.getOffset()).x||t.y)&&(c&&o.angle<l||!c&&90-o.angle<l||n.isTouching?(a=o[c?"x":"y"]*a,n.isTouching=!0,i(a),s()):(n.isScrolling=!0,r.clear())))},stop:function(){var r,a,d,p=n.index,m=n.tracker,f=t.measure;n.isStart&&(n.isStart=!1,e.freeMode?(r=m.vector()[e.isHorizontal?"velocityX":"velocityY"],u.run((function(e){e*=r,r*=.98,Math.abs(e)<.01?(u.stop(),v(n,o)):(i(e),s(0))}))):(a=m.getDuration(),d=m.getOffset()[e.isHorizontal?"x":"y"],m=Math.ceil(Math.abs(d)/f.boxSize),f=c(d),a>e.longSwipesMs?l(p+f*(0<d?-1:1)):l(0<d?p-m:p+m),v(n,o)))}}}function b(e,t){var n={};return(n.update=function(e){var o,r=function(e,t,n){var o=e.$list,r=t.viewSize,a=t.slideSize,s=t.boxSize,i=-(t=(e=(i=n).loop?Math.ceil(i.slidesPerView):0)*s)+(n.centeredSlides?(r-a)/2:0);return{max:i,min:n.spaceBetween+(n.loop?a:r)+i-s*o.length,base:i,expand:e,buffer:t,minIndex:0,maxIndex:o.length-(n.centeredSlides||n.loop?1:Math.ceil(n.slidesPerView))}}(e,(o=t,a=(r=e).$el,o={boxSize:(a=((r=o.isHorizontal?a.offsetWidth:a.offsetHeight)-Math.ceil(o.slidesPerView-1)*o.spaceBetween)/o.slidesPerView)+o.spaceBetween,viewSize:r,slideSize:a}),t),a=Boolean("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(n,{touchable:a,element:e,measure:o,limitation:r})})(e),n}var y="data-shallow-slider",x="data-slider";function E(e,n){function o(){e.element.$wrapper.querySelectorAll("["+y+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function s(){var t=e.element,o=e.measure,r=t.$wrapper,s={display:"flex",willChange:"transform",flexDirection:n.isHorizontal?"row":"column"},i=((t={})[n.isHorizontal?"width":"height"]=o.slideSize+"px",t[n.isHorizontal?"margin-right":"margin-bottom"]=n.spaceBetween+"px",t);a(r,s),r.querySelectorAll("["+x+"]").forEach((function(e){return a(e,i)}))}return{init:function(){(function(){var t,a,s,i,l,c;e.element.$list.forEach((function(e,t){return r(e,x,t)})),o(),n.loop&&(t=e.element,i=e.limitation,a=t.$list,s=t.$wrapper,i=i.expand,l=a.slice(-i).map((function(e){return e.cloneNode(!0)})),c=a.slice(0,i).map((function(e){return e.cloneNode(!0)})),l.forEach((function(e,t){s.appendChild(r(c[t],y)),s.insertBefore(r(l[t],y),a[0])})))})(),s()},render:function(o,r,a,s){var i=e.element.$wrapper;r=void 0===r?n.speed:r,n.injections.translate(o,e,n,r),o.isStart||function(o){var r=e.element.$wrapper,a=o.index;r.querySelectorAll("["+x+"]").forEach((function(e){var o,r,s=~~e.getAttribute(x);o=e,void 0===(r=[n.slidePrevClass,n.slideNextClass,n.slideActiveClass])&&(r=[]),Array.isArray(r)||(r=[r]),r.forEach((function(e){return o.classList.contains(e)&&o.classList.remove(e)})),s===a&&t(e,n.slideActiveClass),s==a-1&&t(e,n.slidePrevClass),s===a+1&&t(e,n.slideNextClass)}))}(o),s&&getComputedStyle(i).transform,a&&setTimeout(a,r)},destroy:function(){var t=e.element,r=t.$list,a=t.$wrapper,s=n.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){a.style.removeProperty(e)})),r.forEach((function(e){return e.style.removeProperty(s)})),o()},updateSize:s}}function w(e,t){var n=e-t.max;return t=e-t.min,0<n?n:t<0?t:0}function S(t,n,o,r,a){function s(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-o.longSwipesRatio)}function u(e,t,o){r.render(n,e,t,o)}function d(r){var s,i,c=(i=t.limitation).min,u=i.max;c=(i=u-c+(o.loop?t.measure.boxSize:0))+1,n.transforms=r,o.loop?(s=(u-r)%c/i,n.progress=s<0?1+s:1<s?s-1:s):(s=(u-r)/i,n.progress=s<0?0:1<s?1:s),a.emit(l,e({},n))}function p(e,r){var l,p,m,f,g,v=t.measure,h=t.limitation,b=h.maxIndex-h.minIndex+1,y=o.loop?(e%b+b)%b:e>h.maxIndex?h.maxIndex:e<h.minIndex?h.minIndex:e,x=-y*v.boxSize+h.base;0!==s(x-n.transforms)&&o.loop&&(l=w(n.transforms,h),p=y-n.index,m=n.index,f=y,g=p,e=(b=h).maxIndex,m=(0<g?1:-1)*(b.minIndex-e-1)+f-m,(g=Math.abs(g)>Math.abs(m)?m:g)===p||l?n.index===y&&d(0<l?h.min-v.boxSize+l:h.max+v.boxSize+l):d(g<0?h.min-v.boxSize:h.max+v.boxSize),u(0,void 0,!0)),a.emit(i,n.index,n,y),n.index=y,d(x),u(r,(function(){a.emit(c,y,n)}))}return{update:function(){p(n.index,0),r.updateSize()},render:u,transform:d,slideTo:p,scrollPixel:function(e){var r,a=n.transforms,s=t.measure,i=t.limitation,l=(r=Number(e.toExponential().split("e")[1]))<=0?Math.pow(10,-(r-1)):1,c=a;o.resistance&&!o.loop&&(0<e&&a>=i.max?e-=Math.pow(e*l,o.resistanceRatio)/l:e<0&&a<=i.min&&(e+=Math.pow(-e*l,o.resistanceRatio)/l)),c+=e,o.loop&&(r=n.tracker.vector(),l=o.isHorizontal?r.velocityX:r.velocityY,(e=w(a,i))&&(r=a,a=i,0<l&&r>a.max||l<0&&r<a.min)&&(c=0<e?i.min-s.boxSize+e:i.max+s.boxSize+e)),d(c)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){d(e)},getOffsetSteps:s}}function _(e,t){var n="string"==typeof e?document.body.querySelector(e):e;return e=n.querySelector("."+t.wrapperClass),t=[].slice.call(n.getElementsByClassName(t.slideClass)),{$el:n,$wrapper:e,$list:t=t.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}function k(t,r){var a=(u=e({},s,u=r),e({},u,{isHorizontal:"horizontal"===u.direction})),i=function(){var e={};return{on:function(t,n){e[t]?e[t].push(n):e[t]=[n]},off:function(t,n){!e[t]||-1<(n=e[t].indexOf(n))&&e[t].splice(n,1)},emit:function(t){for(var n=arguments.length,o=new Array(1<n?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e[t]&&e[t].forEach((function(e){return e.apply(void 0,o)}))},clear:function(){e={}}}}(),l=b(_(t,a),a),c={tracker:d(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},u=(r=i.on,i.off),p=i.emit,m={on:r,off:u,env:l,state:c,options:a};(a.plugins||k.plugins||[]).forEach((function(e){return e(m,a)})),p("before-init",m);var f=E(l,a),g=S(l,c,a,f,i),v=function(e,t,r,a){var s=e.touchable,i=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],l=(a=h(r,e,t,a)).preheat,c=a.move,u=a.stop;function d(e){return{x:(e=s?e.changedTouches[0]:e).pageX,y:e.pageY}}function p(t){for(var n=0;n<r.excludeElements.length;n++)if(r.excludeElements[n].contains(t.target))return;var o,a=e.element.$wrapper,c=r.touchStartPreventDefault&&-1===i.indexOf(t.target.nodeName)||r.touchStartForcePreventDefault;!s&&c&&t.preventDefault(),l(d(t),(o=a,c=r.isHorizontal,a=getComputedStyle(o).transform.replace(/[a-z]|\(|\)|\s/g,"").split(",").map(parseFloat),o=[],16===a.length?o=a.slice(12,14):6===a.length&&(o=a.slice(4,6)),o[c?0:1]||0))}function m(e){r.touchMoveStopPropagation&&e.stopPropagation(),c(d(e)),t.isTouching&&!1!==e.cancelable&&e.preventDefault()}function f(){u()}return{attach:function(){var t=e.element.$el;s?(n(t,"touchstart",p,{passive:r.passiveListeners,capture:!1}),n(t,"touchmove",m),n(t,"touchend",f),n(t,"touchcancel",f)):(n(t,"mousedown",p),n(document,"mousemove",m),n(document,"mouseup",f))},detach:function(){var t=e.element.$el;o(t,"touchstart",p),o(t,"touchmove",m),o(t,"touchend",f),o(t,"touchcancel",f),o(t,"mousedown",p),o(document,"mousemove",m),o(document,"mouseup",f)}}}(l,c,a,g);return c=g.slideTo,Object.assign(m,{update:function(){f.destroy(),l.update(_(t,a)),f.init(),g.update()},destroy:function(){p("before-destroy",m),v.detach(),f.destroy(),p("after-destroy",m),i.clear()},slideTo:c,updateSize:function(){l.update(_(t,a)),g.update()}}),f.init(),v.attach(),c(a.initialSlide,0),p("after-init",m),m}return k.use=function(e){k.plugins=e},k}()},3266:function(e){e.exports=function(){"use strict";function e(e,t,n,o){e.addEventListener(t,n,o)}function t(e,t,n){e.removeEventListener(t,n)}return function(n,o){function r(e){c(e.target,"next")}function a(e){c(e.target,"prev")}var s=Boolean(o.navigation),i={nextEl:null,prevEl:null},l=Object.assign({disabledClass:"swiper-button-disabled"},o.navigation),c=function(e,t){u(e)&&!n.options.loop||(e=n.state.index,"next"===t&&n.slideTo(e+1),"prev"===t&&n.slideTo(e-1))},u=function(e){return e.classList.contains(l.disabledClass)};n.on("before-slide",(function(e,t,o){var r,a;n.options.loop||(r=o,o=(a=n.env.limitation).minIndex,a=a.maxIndex,i&&i.prevEl&&i.nextEl&&(i.nextEl.classList.contains(l.disabledClass)&&o<=r&&i.nextEl.classList.remove(l.disabledClass),i.prevEl.classList.contains(l.disabledClass)&&r<=a&&i.prevEl.classList.remove(l.disabledClass),r===o&&i.prevEl.classList.add(l.disabledClass),r===a&&i.nextEl.classList.add(l.disabledClass)))})),n.on("after-init",(function(){var t,o,c;s&&(i.nextEl="string"==typeof l.nextEl?document.body.querySelector(l.nextEl):l.nextEl,i.prevEl="string"==typeof l.prevEl?document.body.querySelector(l.prevEl):l.prevEl,n.options.loop||(t=n.state.index,o=n.env.element.$list,t===(c=n.env.limitation.minIndex)&&i.prevEl&&i.prevEl.classList.add(l.disabledClass),o.length===c&&i.nextEl&&i.nextEl.classList.add(l.disabledClass)),e(i.nextEl,"click",r),e(i.prevEl,"click",a))})),n.on("after-destroy",(function(){i&&i.prevEl&&i.nextEl&&(t(i.nextEl,"click",r),t(i.prevEl,"click",a),delete i.nextEl,delete i.prevEl)}))}}()}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка