(self.webpackChunkcoblocks=self.webpackChunkcoblocks||[]).push([[404],{6404:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>ue});var n=o(7462),l=o(9307),a=o(4184),i=o.n(a),s=o(7635),r=o(9818),c=o(2819),u=o.n(c),m=o(5697),d=o.n(m),p=o(5736),g=o(2175),b=o(5609);const h=e=>{let{hoveredFilter:t}=e;if(!t)return null;const o=u().cloneDeep((0,r.select)("core/block-editor").getSelectedBlock());return o.attributes.filter=t,(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,l.createElement)(b.Popover,{className:"block-editor-block-switcher__preview__popover coblocks-image-filter-popover",focusOnMount:!1,position:"bottom right"},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview coblocks__preview"},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,p.__)("Preview filter","coblocks")),(0,l.createElement)(g.BlockPreview,{autoHeight:!0,blocks:{...o}})))))},v=e=>{const[t,o]=(0,l.useState)(null),n=e=>{o(e)},{attributes:a,setAttributes:r}=e,{filter:c}=a,u=[{icon:(0,l.createElement)(b.Icon,{icon:s.mJk}),isActive:"none"===c,onClick:()=>{r({filter:"none"})},slug:"none",
/* translators: image style */
title:(0,p.__)("Original","coblocks")},{icon:(0,l.createElement)(b.Icon,{icon:s.NC1}),isActive:"grayscale"===c,onClick:()=>{r({filter:"grayscale"})},slug:"grayscale",
/* translators: image style */
title:(0,p.__)("Grayscale filter","coblocks")},{icon:(0,l.createElement)(b.Icon,{icon:s.amg}),isActive:"sepia"===c,onClick:()=>{r({filter:"sepia"})},slug:"sepia",
/* translators: image style */
title:(0,p.__)("Sepia filter","coblocks")},{icon:(0,l.createElement)(b.Icon,{icon:s.swD}),isActive:"saturation"===c,onClick:()=>{r({filter:"saturation"})},slug:"saturation",
/* translators: image style */
title:(0,p.__)("Saturation filter","coblocks")},{icon:(0,l.createElement)(b.Icon,{icon:s.tu4}),isActive:"dim"===c,onClick:()=>{r({filter:"dim"})},slug:"dim",
/* translators: image style */
title:(0,p.__)("Dim filter","coblocks")},{icon:(0,l.createElement)(b.Icon,{icon:s.jZD}),isActive:"vintage"===c,onClick:()=>{r({filter:"vintage"})},slug:"vintage",
/* translators: image style */
title:(0,p.__)("Vintage filter","coblocks")}];return(0,l.createElement)(b.ToolbarGroup,null,(0,l.createElement)(b.DropdownMenu,{className:i()("components-coblocks-media-filter","none"!==c?"has-filter":""),icon:(0,l.createElement)(b.Icon,{icon:s.AF8}),label:(0,p.__)("Apply filter","coblocks"),noIcons:!0,popoverProps:{className:"components-coblocks-dropdown"}},(()=>(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(h,{hoveredFilter:t}),u.map((e=>(0,l.createElement)(b.MenuItem,{icon:e.icon,isSelected:c===e.slug,key:`coblocks-image-filter-${e.slug}`,label:e.title,onClick:e.onClick,onMouseEnter:()=>n(e.slug),onMouseLeave:()=>n(null),role:"menuitemradio"},e.title)))))))},f=v;v.propTypes={attributes:d().object,setAttributes:d().func};const k=e=>{const{attributes:t}=e,{images:o}=t,n=!!o.length;return(0,l.createElement)(g.BlockControls,null,n&&(0,l.createElement)(f,e))};var _=o(2547),E=o(4333),S=o(1313),w=o(9630),y=o(444);const x=(0,l.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(y.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),C=(0,l.createElement)(y.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(y.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),I=(0,l.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(y.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),M=(0,l.createElement)(y.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(y.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),T=(0,l.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(y.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));class L extends l.Component{constructor(){super(...arguments),this.onImageClick=this.onImageClick.bind(this),this.onSelectCaption=this.onSelectCaption.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.saveCustomLink=this.saveCustomLink.bind(this),this.state={captionFocused:!1,captionSelected:!1,isSaved:!1},this.container=(0,l.createRef)()}onSelectCaption(){const{captionSelected:e}=this.state;e||this.setState({captionSelected:!0});const{isSelected:t,onSelect:o}=this.props;t||o()}onImageClick(){const{isSelected:e,onSelect:t}=this.props;e||t();const{captionSelected:o}=this.state;o&&this.setState({captionFocused:!1,captionSelected:!1})}onKeyDown(e){const t=this.container.current.ownerDocument,{isSelected:o,onRemove:n}=this.props;this.container===t.activeElement&&o&&-1!==[w.BACKSPACE,w.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),n())}saveCustomLink(){this.setState({isSaved:!0})}componentDidUpdate(e){const{isSelected:t,image:o,url:n,imgLink:l,setAttributes:a}=this.props;o&&!n&&a({alt:o.alt_text,url:o.source_url});const{captionSelected:i}=this.state;i&&!t&&e.isSelected&&this.setState({captionFocused:!1,captionSelected:!1}),l&&!t&&e.isSelected&&this.setState({isSaved:!1})}render(){const{alt:e,caption:t,captions:o,fontSize:n,gutter:a,gutterMobile:s,id:r,isFirstItem:c,isLastItem:u,isSelected:m,linkTo:d,newClass:h,marginBottom:v,marginLeft:f,marginRight:k,onMoveBackward:E,onMoveForward:w,onRemove:y,setAttributes:L,shadow:P,supportsCaption:N,supportsMoving:A=!0,verticalMoving:$=!1,url:R,"aria-label":z,imgLink:B,imageIndex:D,replaceImage:O}=this.props,{captionSelected:F,isSaved:V}=this.state,H=i()({[`has-shadow-${P}`]:"none"!==P||void 0!==P}),j=(0,l.createElement)(l.Fragment,null,(0,l.createElement)("img",{alt:e,"aria-label":z,className:H,"data-id":r,"data-imglink":B,onClick:this.onImageClick,onKeyDown:this.onImageClick,src:R,tabIndex:"0"}),(0,S.isBlobURL)(R)&&(0,l.createElement)(b.Spinner,null)),q=h||"coblocks-gallery--figure",G=i()(q,{"is-selected":m,"is-transient":R&&0===R.indexOf("blob:"),[`has-margin-right-${a}`]:k&&a>0,[`has-margin-right-mobile-${s}`]:k&&s>0,[`has-margin-bottom-${a}`]:v&&a>0,[`has-margin-bottom-mobile-${s}`]:v&&s>0,[`has-margin-left-${a}`]:f&&a>0,[`has-margin-left-mobile-${s}`]:f&&s>0}),U={fontSize:_.Vl(n)};return(0,l.createElement)("figure",{className:G,onKeyDown:this.onKeyDown,ref:this.container,tabIndex:"-1"},m&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right is-visible"},(0,l.createElement)(g.MediaUploadCheck,null,(0,l.createElement)(g.MediaUpload,{allowedTypes:["image"],onSelect:e=>{const t=_.oj(e);O(D,t)},render:e=>{let{open:t}=e;return(0,l.createElement)(b.Button,{className:"coblocks-gallery-item__button-replace",label:(0,p.__)("Replace Image","coblocks"),onClick:t},(0,p.__)("Replace","coblocks"))},value:R})),(0,l.createElement)(b.Button,{className:"coblocks-gallery-item__button",disabled:!m,icon:x,label:(0,p.__)("Remove image","coblocks"),onClick:y}))),m&&(0,l.createElement)(l.Fragment,null,A&&(0,l.createElement)(b.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,l.createElement)(b.Button,{"aria-disabled":c,className:"coblocks-gallery-item__button",disabled:!m,icon:$?C:I,label:(0,p.__)("Move image backward","coblocks"),onClick:!c&&E}),(0,l.createElement)(b.Button,{"aria-disabled":u,className:"coblocks-gallery-item__button",disabled:!m,icon:$?M:T,label:(0,p.__)("Move image forward","coblocks"),onClick:!u&&w})),"custom"===d&&(0,l.createElement)("form",{className:"components-coblocks-gallery-item__image-link",onSubmit:e=>e.preventDefault()},(0,l.createElement)(b.Dashicon,{icon:"admin-links"}),(0,l.createElement)(g.URLInput,{onChange:e=>L({imgLink:e}),value:B}),(0,l.createElement)(b.Button,{icon:V?"saved":"editor-break",label:V?(0,p.__)("Saving","coblocks"):(0,p.__)("Apply","coblocks"),onClick:this.saveCustomLink,type:"submit"}))),j,!0!==N||g.RichText.isEmpty(t)&&!m||!o?null:(0,l.createElement)(g.RichText,{className:"coblocks-gallery--caption",inlineToolbar:!0,isSelected:F,onChange:e=>L({caption:e}),placeholder:(0,p.__)("Write caption…","coblocks"),style:U,tagName:"figcaption",unstableOnFocus:this.onSelectCaption,value:t}))}}L.propTypes={alt:d().string,caption:d().oneOfType([d().string,d().array]),captions:d().bool,fontSize:d().number,gutter:d().number,gutterMobile:d().number,gutterUtility:d().bool,id:d().oneOfType([d().string,d().number]),imageIndex:d().number,imgLink:d().string,isFirstItem:d().bool,isLastItem:d().bool,isSelected:d().bool,linkTo:d().string,marginBottom:d().bool,marginLeft:d().number,marginRight:d().number,newClass:d().string,onMoveBackward:d().func,onMoveForward:d().func,onRemove:d().func,onSelect:d().func,replaceImage:d().func,setAttributes:d().func,shadow:d().string,supportsCaption:d().bool,supportsMoving:d().bool.isRequired,url:d().string,verticalMoving:d().bool.isRequired},L.defaultProps={supportsMoving:!0,verticalMoving:!1};const P=(0,E.compose)([(0,r.withSelect)(((e,t)=>{const{getMedia:o}=e("core"),{id:n}=t;return{image:n?o(n):null}}))])(L),N=(0,l.createContext)({captionFocused:!1,gutter:0,gutterMobile:0,images:[],isSelected:!1,selectedImage:null,setCaptionFocused:()=>{},setSelectedImage:()=>{},showThumbnails:!1}),A=e=>{let{gutter:t,gutterMobile:o,showThumbnails:n,children:a,images:i,isSelected:s}=e;const[r,c]=(0,l.useState)(null),[u,m]=(0,l.useState)(!1),d={captionFocused:u,gutter:t,gutterMobile:o,images:i,isSelected:s,selectedImage:r,setCaptionFocused:m,setSelectedImage:c,showThumbnails:n};return(0,l.createElement)(N.Provider,{value:d},a)},$=e=>{let{ariaLabel:t,index:o,handleRemoveImage:n,handleReplaceImage:a,setAttributes:s}=e;const{setSelectedImage:r,selectedImage:c,images:u,gutter:m,gutterMobile:d}=(0,l.useContext)(N),[b,h]=(0,l.useState)(!1),v=u[o],f=c===o,k=(0,l.useMemo)((()=>{var e;return(0,l.createElement)(g.RichText,{className:"coblocks-gallery--caption coblocks-gallery--primary-caption",inlineToolbar:!0,isSelected:b,onChange:e=>(e=>{s({images:u.map(((t,o)=>o===c?{...t,caption:e}:t))})})(e),placeholder:(0,p.__)("Write gallery caption…","coblocks"),tagName:"figcaption",unstableOnFocus:()=>{h(!b)},value:null===(e=u[c])||void 0===e?void 0:e.caption})}),[c,b]),_=()=>{!0===b&&h(!1)},E=(0,l.useMemo)((()=>(0,l.createElement)("span",{onClick:_,onKeyDown:_,role:"button",tabIndex:0},(0,l.createElement)(P,{alt:v.alt,"aria-label":t,gutter:m,gutterMobile:d,id:v.id,imageIndex:o,isSelected:f,marginLeft:!0,marginRight:!0,onRemove:()=>{n(o)},onSelect:()=>{r(o)},replaceImage:a,supportsCaption:!1,supportsMoving:!1,url:v.url}))),[f,m,d,b,v]);if(!v)return null;const S=i()("coblocks-gallery--item",{[`has-margin-top-${m}`]:m>0,[`has-margin-top-mobile-${d}`]:d>0});return(0,l.createElement)("div",{className:S,role:"button",style:{position:"relative"},tabIndex:o,ariaLabel:(0,p.__)("Gallery Image","coblocks")},E,f?k:null)};var R=o(3304);const z=e=>{const t=(e,t)=>{var o;const n=(0,c.find)(t,(t=>parseInt(null==t?void 0:t.id)===(null==e?void 0:e.id)));return Array.isArray(null==n?void 0:n.caption)?null==n||null===(o=n.caption)||void 0===o?void 0:o[0]:(null==n?void 0:n.caption)||(null==e?void 0:e.caption)||""},o=(e,t)=>{const o=(0,c.find)(t,(t=>parseInt(null==t?void 0:t.id)===(null==e?void 0:e.id)));return(null==o?void 0:o.imgLink)||(null==e?void 0:e.imgLink)||""},{attributes:n,isSelected:a,variationLabel:i,label:s,icon:r}=e,{images:u}=n,m=!!u.length,d=!m&&(i||(0,p.sprintf)(
/* translators: %s: Type of gallery */
(0,p.__)("%s Gallery","coblocks"),s));return(0,l.createElement)("div",null,(0,l.createElement)(g.MediaPlaceholder,{accept:"image/*",addToGallery:m,allowedTypes:_.o2,className:"coblocks-gallery--figure",disableMediaButtons:m&&!a,icon:!m&&(0,l.createElement)(b.Icon,{icon:r}),isAppender:m,labels:{instructions:!m&&(0,p.__)("Drag images, upload new ones or select files from your library.","coblocks"),title:d},multiple:!0,onError:t=>{const{noticeOperations:o}=e;o.removeAllNotices(),o.createErrorNotice(t)},onSelect:n=>{const{attributes:l,setAttributes:a}=e,{images:i}=l;a({images:n.map((e=>({..._.oj(e),caption:t(e,i),imgLink:o(e,i)})))})},value:m?u:void 0}))};z.propTypes={attributes:d().object,icon:d().object,isSelected:d().bool,label:d().string,setAttributes:d().func,variationLabel:d().string};const B=z,D=[{
/* translators: abbreviation for small size */
label:(0,p.__)("S","coblocks"),tooltip:(0,p.__)("Small","coblocks"),value:1},{
/* translators: abbreviation for medium size */
label:(0,p.__)("M","coblocks"),tooltip:(0,p.__)("Medium","coblocks"),value:2},{
/* translators: abbreviation for large size */
label:(0,p.__)("L","coblocks"),tooltip:(0,p.__)("Large","coblocks"),value:3},{
/* translators: abbreviation for extra large size */
label:(0,p.__)("XL","coblocks"),tooltip:(0,p.__)("Extra Large","coblocks"),value:4}],O={label:(0,p.__)("None","coblocks"),tooltip:(0,p.__)("None","coblocks"),value:0},F={label:(0,l.createElement)(b.Icon,{icon:s.ewm}),tooltip:(0,p.__)("Custom","coblocks"),value:"custom"};class V extends l.Component{render(){const{advancedMaxValue:e,advancedMinValue:t,currentOption:o,label:n,onChange:a,options:s,showAdvancedControls:r,showIcons:u,showNoneOption:m,showCustomOption:d}=this.props;let p=s||D;return m&&(p=[O,...p]),d&&(p=[...p,F]),r&&!1!==t&&!1!==e?(0,l.createElement)(b.RangeControl,{label:n,max:e,min:t,onChange:e=>a(e),value:o}):(0,l.createElement)(b.BaseControl,{className:i()("coblocks-option-selector-control",{"is-custom":"custom"===o}),id:`coblocks-option-selector-${(0,c.kebabCase)(n)}`,label:n},(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ButtonGroup,{"aria-label":n},p.map((e=>(0,l.createElement)(b.Tooltip,{key:`option-${e.value}`,text:e.tooltip},(0,l.createElement)(b.Button,{"aria-label":e.tooltip,"aria-pressed":o===e.value,isPrimary:o===e.value,isSecondary:o!==e.value,onClick:()=>a(e.value)},u?e.icon:e.label)))))))}}V.propTypes={advancedMaxValue:d().number,advancedMinValue:d().number,currentOption:d().oneOfType([d().string,d().number]),label:d().string,onChange:d().func,options:d().array,showAdvancedControls:d().bool,showCustomOption:d().bool,showIcons:d().bool,showNoneOption:d().bool};var H=o(5655);const j=[{value:1e3,label:(0,p.__)("One Second","coblocks")},{value:2e3,label:(0,p.__)("Two Seconds","coblocks")},{value:3e3,label:(0,p.__)("Three Seconds","coblocks")},{value:4e3,label:(0,p.__)("Four Seconds","coblocks")},{value:5e3,label:(0,p.__)("Five Seconds","coblocks")},{value:6e3,label:(0,p.__)("Six Seconds","coblocks")},{value:7e3,label:(0,p.__)("Seven Seconds","coblocks")},{value:8e3,label:(0,p.__)("Eight Seconds","coblocks")},{value:9e3,label:(0,p.__)("Nine Seconds","coblocks")},{value:1e4,label:(0,p.__)("Ten Seconds","coblocks")}],q=e=>{const{attributes:t,setAttributes:o}=e,{autoPlay:n,autoPlaySpeed:a,draggable:i,loop:s,pageDots:r,prevNextButtons:c,alignCells:u,pauseHover:m,thumbnails:d}=t;return(0,l.createElement)(b.PanelBody,{initialOpen:!1,title:(0,p.__)("Slider settings","coblocks")},(0,l.createElement)(b.ToggleControl,{checked:!!s,help:e=>e?(0,p.__)("Prevent the carousel from looping","coblocks"):(0,p.__)("Set the carousel to an infinite loop","coblocks"),label:(0,p.__)("Loop","coblocks"),onChange:()=>o({loop:!s})}),(0,l.createElement)(b.ToggleControl,{checked:!!n,help:t=>{const{attributes:o}=e,{autoPlaySpeed:n}=o,l=n/1e3,a=l>1?(0,p.__)("seconds","coblocks"):(0,p.__)("second","coblocks");return t?(0,p.sprintf)(
/* translators: %1$d: Speed of the slider, %2$d: Time until the slide advances */
(0,p.__)("Advancing after %1$d %2$s.","coblocks"),l,a):(0,p.__)("Automatically advance to the next slide.","coblocks")},label:(0,p.__)("Autoplay","coblocks"),onChange:()=>o({autoPlay:!n})}),n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.SelectControl,{className:"components-coblocks-gallery-inspector__autoplayspeed-select",label:(0,p.__)("Transition speed","coblocks"),onChange:e=>o({autoPlaySpeed:e}),options:j,value:a}),(0,l.createElement)(b.ToggleControl,{checked:m,help:e=>e?(0,p.__)("Pausing autoplay when hovering.","coblocks"):(0,p.__)("Toggle to pause autoplay when hovered.","coblocks"),label:(0,p.__)("Pause on hover","coblocks"),onChange:()=>o({pauseHover:!m})})),(0,l.createElement)(b.ToggleControl,{checked:!!i,help:e=>e?(0,p.__)("Dragging and flicking enabled.","coblocks"):(0,p.__)("Toggle to enable drag functionality.","coblocks"),label:(0,p.__)("Draggable","coblocks"),onChange:()=>o({draggable:!i})}),(0,l.createElement)(b.ToggleControl,{checked:!!c,help:e=>e?(0,p.__)("Showing slide navigation arrows.","coblocks"):(0,p.__)("Toggle to show slide navigation arrows.","coblocks"),label:(0,p.__)("Arrow navigation","coblocks"),onChange:()=>o({prevNextButtons:!c})}),d?null:(0,l.createElement)(b.ToggleControl,{checked:!!r,help:e=>e?(0,p.__)("Showing dot navigation.","coblocks"):(0,p.__)("Toggle to show dot navigation.","coblocks"),label:(0,p.__)("Dot navigation","coblocks"),onChange:()=>o({pageDots:!r})}),(0,l.createElement)(b.ToggleControl,{checked:!!u,help:e=>e?(0,p.__)("Aligning slides to the left.","coblocks"):(0,p.__)("Aligning slides to the center.","coblocks"),label:(0,p.__)("Align cells","coblocks"),onChange:()=>o({alignCells:!u})}))},G=q;q.propTypes={attributes:d().object,setAttributes:d().func};const U=e=>{const{setAttributes:t}=e,[o,a]=(0,l.useState)(null),i=e=>t({height:e}),s=e=>a(e),{attributes:r,isSelected:c}=e,{align:u,gridSize:m,gutter:d,height:h,radius:v,thumbnails:f,responsiveHeight:k,lightbox:_}=r;return c&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(g.InspectorControls,null,(0,l.createElement)(b.PanelBody,{title:(0,p.__)("Carousel settings","coblocks")},(0,l.createElement)(V,{currentOption:m,label:(0,p.__)("Size","coblocks"),onChange:e=>t({gridSize:e}),options:(()=>{const e=[{
/* translators: abbreviation for large size */
label:(0,p.__)("L","coblocks"),tooltip:(0,p.__)("Large","coblocks"),value:"lrg"},{
/* translators: abbreviation for large size */
label:(0,p.__)("XL","coblocks"),tooltip:(0,p.__)("Extra Large","coblocks"),value:"xlrg"}];return u&&"none"!==u&&e.unshift({
/* translators: abbreviation for medium size */
label:(0,p.__)("M","coblocks"),tooltip:(0,p.__)("Medium","coblocks"),value:"med"}),"full"===u&&e.unshift({
/* translators: abbreviation for small size */
label:(0,p.__)("S","coblocks"),tooltip:(0,p.__)("Small","coblocks"),value:"sml"}),e})()}),"xlrg"!==m&&("wide"===u||"full"===u)&&(0,l.createElement)(H.Z,(0,n.Z)({},e,{max:20})),"xlrg"!==m&&!u&&(0,l.createElement)(H.Z,(0,n.Z)({},e,{max:20})),d>0&&(0,l.createElement)(b.RangeControl,{label:(0,p.__)("Rounded corners","coblocks"),max:20,min:0,onChange:e=>t({radius:e}),step:1,value:v}),!k&&(0,l.createElement)(b.BaseControl,{className:"block-height-control",id:"gallery-carousel-height-control",label:(0,p.__)("Height in pixels","coblocks")},(0,l.createElement)("input",{className:"block-height-control__input",min:0,onChange:e=>{const t=""!==e.target.value?parseInt(e.target.value,10):void 0;if(t<0&&void 0!==t)return s(t),void i(0);s(null),i(t)},step:"10",type:"number",value:o||h})),(0,l.createElement)(b.ToggleControl,{checked:!!_,help:e=>e?(0,p.__)("Image lightbox is enabled.","coblocks"):(0,p.__)("Toggle to enable the image lightbox.","coblocks"),label:(0,p.__)("Lightbox","coblocks"),onChange:()=>t({lightbox:!_})}),(0,l.createElement)(b.ToggleControl,{checked:!!f,help:e=>e?(0,p.__)("Showing thumbnail navigation.","coblocks"):(0,p.__)("Toggle to show thumbnails.","coblocks"),label:(0,p.__)("Thumbnails","coblocks"),onChange:()=>t({thumbnails:!f})})),(0,l.createElement)(G,e)),(0,l.createElement)(g.InspectorAdvancedControls,null,(0,l.createElement)(b.ToggleControl,{checked:!!k,help:e=>e?(0,p.__)("Percentage based height is activated.","coblocks"):(0,p.__)("Toggle for percentage based height.","coblocks"),label:(0,p.__)("Responsive height","coblocks"),onChange:()=>t({responsiveHeight:!k})})))};var K,X=new Uint8Array(16);function Z(){if(!K&&!(K="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return K(X)}const Y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,W=function(e){return"string"==typeof e&&Y.test(e)};for(var J=[],Q=0;Q<256;++Q)J.push((Q+256).toString(16).substr(1));const ee=function(e,t,o){var n=(e=e||{}).random||(e.rng||Z)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){o=o||0;for(var l=0;l<16;++l)t[o+l]=n[l];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+"-"+J[e[t+4]]+J[e[t+5]]+"-"+J[e[t+6]]+J[e[t+7]]+"-"+J[e[t+8]]+J[e[t+9]]+"-"+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase();if(!W(o))throw TypeError("Stringified UUID is invalid");return o}(n)};var te=o(9334),oe=o.n(te),ne=o(8608),le=o.n(ne);const ae=e=>{const{list:t,children:o,navigation:n=!1,isDraggable:a=!0,autoPlaySpeed:s=null,pauseHover:r=null,loop:c=!0,onSwipe:u=null,Pagination:m=null,uuid:d=null,slidesPerView:p=1,spaceBetween:g=0,navigationClass:b=null}=e,[h,v]=(0,l.useState)(null),[f,k]=(0,l.useState)(null),[_,S]=(0,l.useState)(!1),w=(0,E.usePrevious)(_),y=(0,E.usePrevious)(s),x=(0,l.useRef)(null);(0,l.useEffect)((()=>{if(!a)return x.current.addEventListener("mousedown",(e=>e.stopPropagation())),()=>{x.current.removeEventListener("mousedown",(e=>e.stopPropagation()))}}),[a]),(0,l.useEffect)((()=>{const e=document.getElementById(d);e&&new ResizeObserver((()=>{null==h||h.update()})).observe(e)}),[h]),(0,l.useEffect)((()=>{try{const e=document.getElementById(d),t=document.getElementById(`${d}-prev`),o=document.getElementById(`${d}-next`),n=new(oe())(e,{centeredSlides:!1,freeMode:!1,longSwipesRatio:.8,loop:c,navigation:{nextEl:o,prevEl:t},passiveListeners:!0,plugins:[le()],slidesPerView:p,spaceBetween:g,touchable:!1});u&&n.on("after-slide",u),v(n)}catch(e){console.log("swiper init error",e)}}),[]),(0,l.useEffect)((()=>{!0===_&&!0===r&&null!==s&&clearInterval(f),!1===_&&!0===w&&!0===r&&k(setInterval(C,s)),null===y&&null!==s&&k(setInterval(C,s)),null!==y&&null===s&&clearInterval(f),null!==y&&null!==s&&s!==y&&(clearInterval(f),k(setInterval(C,s)))}),[h,s,y,f,_,r]);const C=(0,l.useCallback)((()=>{null==h||h.slideTo(h.state.index+1)}),[h,_]),I=(0,l.useMemo)((()=>t.map(((e,t)=>(0,l.createElement)("div",{className:"swiper-slide",id:t,key:t},o({index:t,item:e}))))),[a]),M=(0,l.useMemo)((()=>{const e=i()({[`${b}__prev`]:b,"nav-button__prev":!b,"no-navigation":!1===n}),t=i()({[`${b}__next`]:b,"nav-button__next":!b,"no-navigation":!1===n});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("button",{className:e,id:`${d}-prev`},(0,l.createElement)("svg",{className:"icon",style:{transform:"rotate(180deg)"}})),(0,l.createElement)("button",{className:t,id:`${d}-next`},(0,l.createElement)("svg",{className:"icon"})))}),[n]),T=e=>{null==h||h.slideTo(e)},L=(0,l.useMemo)((()=>{if(m)return m({changeStep:T})}),[m,h]);return(0,l.createElement)("div",{className:"coblocks-swiper-container",onMouseEnter:()=>{!0===r&&null!==f&&S(!0)},onMouseLeave:()=>{!0===r&&null!==f&&S(!1)}},(0,l.createElement)("div",{className:"swiper-container",id:d},(0,l.createElement)("div",{className:"swiper-wrapper",id:"swiper-wrapper",ref:x},I),M),L)};ae.propTypes={autoPlaySpeed:d().number.isRequired,children:d().node,isDraggable:d().bool.isRequired,list:d().array,loop:d().bool.isRequired,navigation:d().bool.isRequired,onSwipe:d().func,pauseHover:d().any,slidesPerView:d().number.isRequired,uuid:d().string},ae.defaultProps={autoPlaySpeed:null,isDraggable:!0,loop:!0,navigation:!1,slidesPerView:1};const ie=e=>{const{list:t,slidesPerView:o,loop:a}=e,i=(0,l.useMemo)((()=>ee()),[t.length,o,a]);return(0,l.createElement)("span",{key:i},(0,l.createElement)(ae,(0,n.Z)({uuid:i},e)))};var se=o(779),re=o(1984);const ce=e=>{let{gutter:t,gutterMobile:o,changeStep:n,item:a,index:s}=e;const{selectedImage:r}=(0,l.useContext)(N),c=i()({"is-active":s===r,"wp-block-coblocks-gallery-carousel-thumbnail":!0,[`has-margin-top-${t}`]:t>0,[`has-margin-top-mobile-${o}`]:o>0,[`has-margin-right-${t}`]:t>0,[`has-margin-right-mobile-${o}`]:o>0,[`has-margin-bottom-${t}`]:t>0,[`has-margin-bottom-mobile-${o}`]:o>0,[`has-margin-left-${t}`]:t>0,[`has-margin-left-mobile-${o}`]:o>0});return(0,l.createElement)("button",{className:c,onClick:()=>n(s),style:{height:"80px",width:"100px"}},(0,l.createElement)("img",{alt:a.alt,"data-id":a.id,"data-link":a.link,src:a.url,style:{height:"100%",width:"100%"}}))},ue=(0,E.compose)([b.withNotices,e=>t=>{const{attributes:o,isSelected:n}=t,a={gutter:o.gutter,gutterMobile:o.gutterMobile,images:o.images,isSelected:n,showThumbnails:o.thumbnails};return(0,l.createElement)(A,a,(0,l.createElement)(e,t))}])((e=>{const{selectBlock:t}=(0,r.useDispatch)("core/block-editor"),{attributes:o,className:a,isSelected:c,noticeUI:u,setAttributes:m}=e,{align:d,gutter:g,gutterMobile:h,height:v,images:f,pageDots:_,prevNextButtons:E,thumbnails:S,responsiveHeight:w,lightbox:y,loop:x,draggable:C,autoPlaySpeed:I,autoPlay:M,pauseHover:T,gridSize:L,alignCells:P}=o,{selectedImage:A,setSelectedImage:z}=(0,l.useContext)(N),D={marginTop:g>0&&!w?g/2+"px":void 0};(0,l.useEffect)((()=>{!1===c&&null!==A&&z(null)}),[c]);const O=i()("is-cropped","has-carousel",`has-carousel-${L}`,...(0,R.jJ)(o),{[`align${d}`]:d,"has-aligned-cells":P,"has-horizontal-gutter":g>0,"has-lightbox":y,"has-no-arrows":!E,"has-no-thumbnails":!S,"is-selected":c}),F=e=>{z(" xlrg"===L?e:null)},V=e=>{m({images:f.filter(((t,o)=>o!==e))})},H=(e,t)=>{m({images:f.map(((o,n)=>n===e?t:o))})},j=(0,se.HK)(o),q=(0,l.useCallback)((e=>{let{changeStep:t}=e;const o=i()("wp-block-coblocks-gallery-carousel-thumbnail-pagination",{[`has-margin-top-${g}`]:g>0,[`has-margin-top-mobile-${h}`]:h>0});return(0,l.createElement)("div",{className:o},f.map(((e,o)=>(0,l.createElement)(ce,{changeStep:t,gutter:g,gutterMobile:h,index:o,item:e,key:o}))))}),[g,h,f]),G=(0,l.useCallback)((e=>{let{changeStep:t}=e;return(0,l.createElement)("div",{className:"wp-block-coblocks-gallery-carousel-page-dot-pagination-container"},(0,l.createElement)("div",{className:"wp-block-coblocks-gallery-carousel-page-dot-wrapper"},f.map(((e,o)=>(0,l.createElement)("button",{className:"wp-block-coblocks-gallery-carousel-page-dot-pagination",key:o,onClick:()=>t(o)})))))}),[A,f]),K=(0,l.useCallback)((e=>{let{changeStep:t}=e;return S?q({changeStep:t}):_?G({changeStep:t}):null}),[g,h,f,S,_]),X=(0,l.useMemo)((()=>(0,l.createElement)(ie,{autoPlaySpeed:M?I:null,freeMode:!1,isDraggable:C,list:f,loop:x,navigation:E,onSwipe:F,Pagination:K,pauseHover:M?T:null,slidesPerView:{lrg:2,med:4,sml:5,xlrg:1}[L]},(e=>{let{index:t}=e;const o=(0,p.sprintf)(
/* translators: %1$d is the order number of the image, %2$d is the total number of images */
(0,p.__)("image %1$d of %2$d in gallery","coblocks"),t+1,f.length);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)($,{ariaLabel:o,handleRemoveImage:V,handleReplaceImage:H,index:t,setAttributes:m}))}))),[M,I,C,L,g,h,f,x,_,T,E,S]),Z=()=>{const t=!(!j||"skip"===j)&&(0,p.sprintf)(
/* translators: %s: Type of gallery variation */
(0,p.__)("%s Carousel","coblocks"),j);return(0,l.createElement)(l.Fragment,null,u,(0,l.createElement)(B,(0,n.Z)({},e,{gutter:o.gutter,icon:(0,l.createElement)(re.Z,{icon:s.cX3}),label:(0,p.__)("Carousel","coblocks"),variationLabel:t})))};return f.length||j?!f.length&&j?Z():(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(k,e),(0,l.createElement)(U,e)),u,(0,l.createElement)(b.ResizableBox,{className:i()({"has-responsive-height":w,"is-selected":c}),enable:{bottom:!0,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1},minHeight:"0",onClick:()=>{c||t(e.clientId)},onResizeStop:(e,t,o,n)=>{m({height:parseInt(v+n.height,10)})},showHandle:c,size:{height:v,width:"100%"},style:{marginBottom:S?"80px":null}},(0,l.createElement)("div",{className:a},(0,l.createElement)("div",{className:O,style:D},X))),Z()):(0,l.createElement)(se.VF,e)}))},9334:function(e){e.exports=function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o,n=arguments[t];for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}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 o(e,t,o,n){e.addEventListener(t,o,n)}function n(e,t,o){e.removeEventListener(t,o)}function l(e,t,o){return void 0===o&&(o=""),e.setAttribute(t,o),e}function a(e,t,o){return Object.keys(t).forEach((function(o){e.style[o]=t[o]})),o&&getComputedStyle(e),e}var i={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,o,n){a(t.element.$wrapper,{transition:e.isStart?"none":"transform ease "+n+"ms",transform:o.isHorizontal?"translate3d("+e.transforms+"px, 0, 0)":"translate3d(0, "+e.transforms+"px, 0)"})}}};var s=180/Math.PI;function r(){var t=[];return{getDuration:function(){var e=t[0],o=t[t.length-1];return e?o.time-e.time:0},getOffset:function(){var e=t[0],o=t[t.length-1];return e?{x:o.x-e.x,y:o.y-e.y}:{x:0,y:0}},getLogs:function(){return t},vector:function(){return n=(o=t).length-1,l=o[n],o=o[n-1]||l,n={x:l.x-o.x,y:l.y-o.y},l=l.time-o.time,o=n.x/l||0,l=n.y/l||0,e({},n,{angle:Math.atan2(Math.abs(n.y),Math.abs(n.x))*s,velocityX:o,velocityY:l});var o,n,l},clear:function(){t=[]},push:function(o){t.push(e({time:Date.now()},o))}}}function c(){return(performance||Date).now()}var u=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,m=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function d(){var e=function(){var e,t;return{run:function(o){e=void 0===e?c():e,t=u((function(){var t=c(),n=t-e;e=t,o(n)}))},stop:function(){e=void 0,m(t)}}}();return{run:function t(o){e.run((function(e){t(o),o(e)}))},stop:function(){e.stop()}}}function p(e,t){e=e.tracker,t=t.initStatus,e.clear(),t()}function g(e,t,o,n){var l=n.initLayout,a=n.initStatus,i=n.render,s=n.scrollPixel,r=n.slideTo,c=n.getOffsetSteps,u=d();return{preheat:function(e,t){var n=o.tracker;u.stop(),n.clear(),n.push(e),l(t),a(t),o.isStart=!0,i()},move:function(t){var n,l=o.tracker,a=e.touchRatio,r=e.touchAngle,c=e.isHorizontal;o.isStart&&!o.isScrolling&&(l.push(t),n=l.vector(),((t=l.getOffset()).x||t.y)&&(c&&n.angle<r||!c&&90-n.angle<r||o.isTouching?(a=n[c?"x":"y"]*a,o.isTouching=!0,s(a),i()):(o.isScrolling=!0,l.clear())))},stop:function(){var l,a,m,d=o.index,g=o.tracker,b=t.measure;o.isStart&&(o.isStart=!1,e.freeMode?(l=g.vector()[e.isHorizontal?"velocityX":"velocityY"],u.run((function(e){e*=l,l*=.98,Math.abs(e)<.01?(u.stop(),p(o,n)):(s(e),i(0))}))):(a=g.getDuration(),m=g.getOffset()[e.isHorizontal?"x":"y"],g=Math.ceil(Math.abs(m)/b.boxSize),b=c(m),a>e.longSwipesMs?r(d+b*(0<m?-1:1)):r(0<m?d-g:d+g),p(o,n)))}}}function b(e,t){var o={};return(o.update=function(e){var n,l=function(e,t,o){var n=e.$list,l=t.viewSize,a=t.slideSize,i=t.boxSize,s=-(t=(e=(s=o).loop?Math.ceil(s.slidesPerView):0)*i)+(o.centeredSlides?(l-a)/2:0);return{max:s,min:o.spaceBetween+(o.loop?a:l)+s-i*n.length,base:s,expand:e,buffer:t,minIndex:0,maxIndex:n.length-(o.centeredSlides||o.loop?1:Math.ceil(o.slidesPerView))}}(e,(n=t,a=(l=e).$el,n={boxSize:(a=((l=n.isHorizontal?a.offsetWidth:a.offsetHeight)-Math.ceil(n.slidesPerView-1)*n.spaceBetween)/n.slidesPerView)+n.spaceBetween,viewSize:l,slideSize:a}),t),a=Boolean("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(o,{touchable:a,element:e,measure:n,limitation:l})})(e),o}var h="data-shallow-slider",v="data-slider";function f(e,o){function n(){e.element.$wrapper.querySelectorAll("["+h+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function i(){var t=e.element,n=e.measure,l=t.$wrapper,i={display:"flex",willChange:"transform",flexDirection:o.isHorizontal?"row":"column"},s=((t={})[o.isHorizontal?"width":"height"]=n.slideSize+"px",t[o.isHorizontal?"margin-right":"margin-bottom"]=o.spaceBetween+"px",t);a(l,i),l.querySelectorAll("["+v+"]").forEach((function(e){return a(e,s)}))}return{init:function(){(function(){var t,a,i,s,r,c;e.element.$list.forEach((function(e,t){return l(e,v,t)})),n(),o.loop&&(t=e.element,s=e.limitation,a=t.$list,i=t.$wrapper,s=s.expand,r=a.slice(-s).map((function(e){return e.cloneNode(!0)})),c=a.slice(0,s).map((function(e){return e.cloneNode(!0)})),r.forEach((function(e,t){i.appendChild(l(c[t],h)),i.insertBefore(l(r[t],h),a[0])})))})(),i()},render:function(n,l,a,i){var s=e.element.$wrapper;l=void 0===l?o.speed:l,o.injections.translate(n,e,o,l),n.isStart||function(n){var l=e.element.$wrapper,a=n.index;l.querySelectorAll("["+v+"]").forEach((function(e){var n,l,i=~~e.getAttribute(v);n=e,void 0===(l=[o.slidePrevClass,o.slideNextClass,o.slideActiveClass])&&(l=[]),Array.isArray(l)||(l=[l]),l.forEach((function(e){return n.classList.contains(e)&&n.classList.remove(e)})),i===a&&t(e,o.slideActiveClass),i==a-1&&t(e,o.slidePrevClass),i===a+1&&t(e,o.slideNextClass)}))}(n),i&&getComputedStyle(s).transform,a&&setTimeout(a,l)},destroy:function(){var t=e.element,l=t.$list,a=t.$wrapper,i=o.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){a.style.removeProperty(e)})),l.forEach((function(e){return e.style.removeProperty(i)})),n()},updateSize:i}}function k(e,t){var o=e-t.max;return t=e-t.min,0<o?o:t<0?t:0}function _(t,o,n,l,a){function i(e){var o=t.measure;return Math.ceil(Math.abs(e)/o.boxSize-n.longSwipesRatio)}function s(e,t,n){l.render(o,e,t,n)}function r(l){var i,s,r=(s=t.limitation).min,c=s.max;r=(s=c-r+(n.loop?t.measure.boxSize:0))+1,o.transforms=l,n.loop?(i=(c-l)%r/s,o.progress=i<0?1+i:1<i?i-1:i):(i=(c-l)/s,o.progress=i<0?0:1<i?1:i),a.emit("scroll",e({},o))}function c(e,l){var c,u,m,d,p,g=t.measure,b=t.limitation,h=b.maxIndex-b.minIndex+1,v=n.loop?(e%h+h)%h:e>b.maxIndex?b.maxIndex:e<b.minIndex?b.minIndex:e,f=-v*g.boxSize+b.base;0!==i(f-o.transforms)&&n.loop&&(c=k(o.transforms,b),u=v-o.index,m=o.index,d=v,p=u,e=(h=b).maxIndex,m=(0<p?1:-1)*(h.minIndex-e-1)+d-m,(p=Math.abs(p)>Math.abs(m)?m:p)===u||c?o.index===v&&r(0<c?b.min-g.boxSize+c:b.max+g.boxSize+c):r(p<0?b.min-g.boxSize:b.max+g.boxSize),s(0,void 0,!0)),a.emit("before-slide",o.index,o,v),o.index=v,r(f),s(l,(function(){a.emit("after-slide",v,o)}))}return{update:function(){c(o.index,0),l.updateSize()},render:s,transform:r,slideTo:c,scrollPixel:function(e){var l,a=o.transforms,i=t.measure,s=t.limitation,c=(l=Number(e.toExponential().split("e")[1]))<=0?Math.pow(10,-(l-1)):1,u=a;n.resistance&&!n.loop&&(0<e&&a>=s.max?e-=Math.pow(e*c,n.resistanceRatio)/c:e<0&&a<=s.min&&(e+=Math.pow(-e*c,n.resistanceRatio)/c)),u+=e,n.loop&&(l=o.tracker.vector(),c=n.isHorizontal?l.velocityX:l.velocityY,(e=k(a,s))&&(l=a,a=s,0<c&&l>a.max||c<0&&l<a.min)&&(u=0<e?s.min-i.boxSize+e:s.max+i.boxSize+e)),r(u)},initStatus:function(e){void 0===e&&(e=0),o.startTransform=e,o.isStart=!1,o.isScrolling=!1,o.isTouching=!1},initLayout:function(e){r(e)},getOffsetSteps:i}}function E(e,t){var o="string"==typeof e?document.body.querySelector(e):e;return e=o.querySelector("."+t.wrapperClass),t=[].slice.call(o.getElementsByClassName(t.slideClass)),{$el:o,$wrapper:e,$list:t=t.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}function S(t,l){var a=(m=e({},i,m=l),e({},m,{isHorizontal:"horizontal"===m.direction})),s=function(){var e={};return{on:function(t,o){e[t]?e[t].push(o):e[t]=[o]},off:function(t,o){!e[t]||-1<(o=e[t].indexOf(o))&&e[t].splice(o,1)},emit:function(t){for(var o=arguments.length,n=new Array(1<o?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];e[t]&&e[t].forEach((function(e){return e.apply(void 0,n)}))},clear:function(){e={}}}}(),c=b(E(t,a),a),u={tracker:r(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},m=(l=s.on,s.off),d=s.emit,p={on:l,off:m,env:c,state:u,options:a};(a.plugins||S.plugins||[]).forEach((function(e){return e(p,a)})),d("before-init",p);var h=f(c,a),v=_(c,u,a,h,s),k=function(e,t,l,a){var i=e.touchable,s=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],r=(a=g(l,e,t,a)).preheat,c=a.move,u=a.stop;function m(e){return{x:(e=i?e.changedTouches[0]:e).pageX,y:e.pageY}}function d(t){for(var o=0;o<l.excludeElements.length;o++)if(l.excludeElements[o].contains(t.target))return;var n,a=e.element.$wrapper,c=l.touchStartPreventDefault&&-1===s.indexOf(t.target.nodeName)||l.touchStartForcePreventDefault;!i&&c&&t.preventDefault(),r(m(t),(n=a,c=l.isHorizontal,a=getComputedStyle(n).transform.replace(/[a-z]|\(|\)|\s/g,"").split(",").map(parseFloat),n=[],16===a.length?n=a.slice(12,14):6===a.length&&(n=a.slice(4,6)),n[c?0:1]||0))}function p(e){l.touchMoveStopPropagation&&e.stopPropagation(),c(m(e)),t.isTouching&&!1!==e.cancelable&&e.preventDefault()}function b(){u()}return{attach:function(){var t=e.element.$el;i?(o(t,"touchstart",d,{passive:l.passiveListeners,capture:!1}),o(t,"touchmove",p),o(t,"touchend",b),o(t,"touchcancel",b)):(o(t,"mousedown",d),o(document,"mousemove",p),o(document,"mouseup",b))},detach:function(){var t=e.element.$el;n(t,"touchstart",d),n(t,"touchmove",p),n(t,"touchend",b),n(t,"touchcancel",b),n(t,"mousedown",d),n(document,"mousemove",p),n(document,"mouseup",b)}}}(c,u,a,v);return u=v.slideTo,Object.assign(p,{update:function(){h.destroy(),c.update(E(t,a)),h.init(),v.update()},destroy:function(){d("before-destroy",p),k.detach(),h.destroy(),d("after-destroy",p),s.clear()},slideTo:u,updateSize:function(){c.update(E(t,a)),v.update()}}),h.init(),k.attach(),u(a.initialSlide,0),d("after-init",p),p}return S.use=function(e){S.plugins=e},S}()},8608:function(e){e.exports=function(){"use strict";function e(e,t,o,n){e.addEventListener(t,o,n)}function t(e,t,o){e.removeEventListener(t,o)}return function(o,n){function l(e){c(e.target,"next")}function a(e){c(e.target,"prev")}var i=Boolean(n.navigation),s={nextEl:null,prevEl:null},r=Object.assign({disabledClass:"swiper-button-disabled"},n.navigation),c=function(e,t){u(e)&&!o.options.loop||(e=o.state.index,"next"===t&&o.slideTo(e+1),"prev"===t&&o.slideTo(e-1))},u=function(e){return e.classList.contains(r.disabledClass)};o.on("before-slide",(function(e,t,n){var l,a;o.options.loop||(l=n,n=(a=o.env.limitation).minIndex,a=a.maxIndex,s&&s.prevEl&&s.nextEl&&(s.nextEl.classList.contains(r.disabledClass)&&n<=l&&s.nextEl.classList.remove(r.disabledClass),s.prevEl.classList.contains(r.disabledClass)&&l<=a&&s.prevEl.classList.remove(r.disabledClass),l===n&&s.prevEl.classList.add(r.disabledClass),l===a&&s.nextEl.classList.add(r.disabledClass)))})),o.on("after-init",(function(){var t,n,c;i&&(s.nextEl="string"==typeof r.nextEl?document.body.querySelector(r.nextEl):r.nextEl,s.prevEl="string"==typeof r.prevEl?document.body.querySelector(r.prevEl):r.prevEl,o.options.loop||(t=o.state.index,n=o.env.element.$list,t===(c=o.env.limitation.minIndex)&&s.prevEl&&s.prevEl.classList.add(r.disabledClass),n.length===c&&s.nextEl&&s.nextEl.classList.add(r.disabledClass)),e(s.nextEl,"click",l),e(s.prevEl,"click",a))})),o.on("after-destroy",(function(){s&&s.prevEl&&s.nextEl&&(t(s.nextEl,"click",l),t(s.prevEl,"click",a),delete s.nextEl,delete s.prevEl)}))}}()}}]);