403Webshell
Server IP : 104.21.14.103  /  Your IP : 3.15.1.22
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/home/giankuin/dietcontrungnhanh.com/wp-content/plugins/woocommerce/assets/client/blocks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/giankuin/dietcontrungnhanh.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks.js
(()=>{var e,t,o,r={2562:(e,t,o)=>{"use strict";o.r(t);var r=o(1609);const l=window.wp.blocks;var i=o(5573),n=o(851);const a=(0,r.createElement)((({className:e,height:t,width:o,...l})=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:(0,n.A)("woo-icon",e),width:o,height:t,...l},(0,r.createElement)("path",{fill:"#7f54b3",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),(0,r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))),null);var s=o(7104),c=(o(4686),o(1792),o(2294)),m=o(6087),u=o(9491);const d=window.wp.hooks,p=(0,u.createHigherOrderComponent)((e=>{class t extends m.Component{constructor(...e){super(...e),(0,c.A)(this,"mounted",!1)}componentDidMount(){const{block:e,setAttributes:t}=this.props;e.name.startsWith("woocommerce/")&&t(this.getAttributesWithDefaults())}componentDidUpdate(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}getAttributesWithDefaults(){const e=(0,l.getBlockType)(this.props.block.name);let t=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==e.attributes&&void 0!==e.defaults&&(t=Object.assign({},this.props.attributes||{}),Object.keys(e.attributes).map((o=>(void 0===t[o]&&void 0!==e.defaults[o]&&(t[o]=e.defaults[o]),o)))),t}render(){return(0,r.createElement)(e,{...this.props,attributes:this.getAttributesWithDefaults()})}}return t}),"withDefaultAttributes");(0,d.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",p),(0,d.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",((e,t)=>(t.name.startsWith("woocommerce/")&&Object.keys(t.attributes).map((o=>(void 0===e[o]&&void 0!==t.defaults&&void 0!==t.defaults[o]&&(e[o]=t.defaults[o]),o))),e))),o(9345);const h=window.wp.domReady;var g=o.n(h);class w{register(e,t){return Boolean((0,l.registerBlockType)(e,t))}unregister(e){return Boolean((0,l.unregisterBlockType)(e))}}class f{register(e,t){return Boolean((0,l.registerBlockVariation)(e,t))}unregister(e,t){return Boolean((0,l.unregisterBlockVariation)(e,t))}}const b=window.wp.blockEditor,k=window.wp.data,C=({blocks:e,findCondition:t})=>{for(const o of e){if(t(o))return o;if(o.innerBlocks){const e=C({blocks:o.innerBlocks,findCondition:t});if(e)return e}}},v=()=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",className:"wc-block-product-gallery-large-image-next-previous-right--inside-image"},(0,r.createElement)("g",{filter:"url(#filter0_b_397_11354)"},(0,r.createElement)("rect",{x:"0.5",width:"48",height:"48",rx:"5",fill:"black",fillOpacity:"0.5"}),(0,r.createElement)("path",{d:"M21.7001 12L19.3 14L28.5 24L19.3 34L21.7001 36L32.5 24L21.7001 12Z",fill:"white"})),(0,r.createElement)("defs",null,(0,r.createElement)("filter",{id:"filter0_b_397_11354",x:"-9.5",y:"-10",width:"68",height:"68",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.createElement)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"5"}),(0,r.createElement)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_397_11354"}),(0,r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_397_11354",result:"shape"})))),y=()=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",className:"wc-block-product-gallery-large-image-next-previous-left--inside-image"},(0,r.createElement)("g",{filter:"url(#filter0_b_397_11356)"},(0,r.createElement)("rect",{x:"0.5",width:"48",height:"48",rx:"5",fill:"black",fillOpacity:"0.5"}),(0,r.createElement)("path",{d:"M28.1 12L30.5 14L21.3 24L30.5 34L28.1 36L17.3 24L28.1 12Z",fill:"white"})),(0,r.createElement)("defs",null,(0,r.createElement)("filter",{id:"filter0_b_397_11356",x:"-9.5",y:"-10",width:"68",height:"68",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.createElement)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"5"}),(0,r.createElement)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_397_11356"}),(0,r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_397_11356",result:"shape"})))),x=()=>(0,r.createElement)(i.SVG,{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"wc-block-product-gallery-large-image-next-previous-right--outside-image"},(0,r.createElement)("path",{d:"M1 1.28516L8 8.28516L1 15.2852",stroke:"black",strokeWidth:"1.5"})),_=()=>(0,r.createElement)(i.SVG,{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"wc-block-product-gallery-large-image-next-previous-left--outside-image"},(0,r.createElement)("path",{d:"M9 1.28516L2 8.28516L9 15.2852",stroke:"black",strokeWidth:"1.5"})),E=e=>{switch(e){case"bottom":case"off":return{type:"flex",orientation:"vertical"};default:return{type:"flex",flexWrap:"nowrap"}}},B=e=>"lock"===e?{lock:{move:!0,remove:!0}}:{lock:{}},I=(e,t)=>{if(void 0!==t){const o={...t,attributes:{...t.attributes,...e}};(0,k.dispatch)("core/block-editor").updateBlock(t.clientId,o)}},T=({blocks:e,lockBlocks:t})=>{for(const o of e)I(B(t?"lock":"unlock"),o)},L=(e,t)=>{const o=(0,k.select)("core/block-editor").getBlock(t);null==o||o.innerBlocks.forEach((t=>{"core/group"===t.name&&I({layout:E(e)},t)}))},O=e=>{var t;return`wc-block-product-gallery--has-next-previous-buttons-${null===(t=(e=>{switch(e){case"insideTheImage":return{PrevButtonImage:y,NextButtonImage:v,classname:"inside-image"};case"outsideTheImage":return{PrevButtonImage:_,NextButtonImage:x,classname:"outside-image"};default:return null}})(e))||void 0===t?void 0:t.classname}`},P=window.wp.components;var V=o(7723);const G=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none"},(0,r.createElement)("g",{clipPath:"url(#clip0_420_11645)"},(0,r.createElement)("path",{d:"M22.5 3H10.5C9.4 3 8.5 3.9 8.5 5V19C8.5 20.1 9.4 21 10.5 21H22.5C23.6 21 24.5 20.1 24.5 19V5C24.5 3.9 23.6 3 22.5 3ZM10.5 4.5H22.5C22.8 4.5 23 4.7 23 5V13.4L21 10.5C20.7 10.2 20.2 10.2 20 10.5L16.4 14L13.5 12C13.2 11.8 12.9 11.8 12.7 12L10.1 14.6V5C10 4.7 10.2 4.5 10.5 4.5ZM22.5 19.5H10.5C10.2 19.5 10 19.3 10 19V16.6L13.1 13.6L16.1 15.5C16.4 15.7 16.8 15.7 17 15.4L20.5 12L23 15.4V19C23 19.3 22.8 19.5 22.5 19.5Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"1.25",y:"3.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)("rect",{x:"1.25",y:"10.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"})),(0,r.createElement)("defs",null,(0,r.createElement)("clipPath",{id:"clip0_420_11645"},(0,r.createElement)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.5)"})))),S=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V12C3 13.1 3.9 14 5 14H19C20.1 14 21 13.1 21 12V5C21 3.9 20.1 3 19 3ZM5 4.5H19C19.3 4.5 19.5 4.7 19.5 5V8.4L16.5 5.5C16.2 5.2 15.7 5.2 15.5 5.5L11.9 9L9 7C8.7 6.8 8.4 6.8 8.2 7L4.6 9.6V5C4.5 4.7 4.7 4.5 5 4.5ZM19 12.5H5C4.7 12.5 4.5 12.3 4.5 12V11.6L8.6 8.6L11.6 10.5C11.9 10.7 12.3 10.7 12.5 10.4L16 7L19.5 10.4V12C19.5 12.3 19.3 12.5 19 12.5Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"6.25",y:"15.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)("rect",{x:"13.25",y:"15.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"})),M=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none"},(0,r.createElement)("g",{clipPath:"url(#clip0_420_11656)"},(0,r.createElement)("path",{d:"M14.5 3H2.5C1.4 3 0.5 3.9 0.5 5V19C0.5 20.1 1.4 21 2.5 21H14.5C15.6 21 16.5 20.1 16.5 19V5C16.5 3.9 15.6 3 14.5 3ZM2.5 4.5H14.5C14.8 4.5 15 4.7 15 5V13.4L13 10.5C12.7 10.2 12.2 10.2 12 10.5L8.4 14L5.5 12C5.2 11.8 4.9 11.8 4.7 12L2.1 14.6V5C2 4.7 2.2 4.5 2.5 4.5ZM14.5 19.5H2.5C2.2 19.5 2 19.3 2 19V16.6L5.1 13.6L8.1 15.5C8.4 15.7 8.8 15.7 9 15.4L12.5 12L15 15.4V19C15 19.3 14.8 19.5 14.5 19.5Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"19.25",y:"3.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)("rect",{x:"19.25",y:"10.75",width:"4.5",height:"4.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"})),(0,r.createElement)("defs",null,(0,r.createElement)("clipPath",{id:"clip0_420_11656"},(0,r.createElement)("rect",{width:"24",height:"24",fill:"currentColor",transform:"translate(0.5)"}))));let A=function(e){return e.OFF="off",e.LEFT="left",e.BOTTOM="bottom",e.RIGHT="right",e}({});const N={[A.OFF]:(0,V.__)("No thumbnails will be displayed.","woocommerce"),[A.LEFT]:(0,V.__)("A strip of small images will appear to the left of the main gallery image.","woocommerce"),[A.BOTTOM]:(0,V.__)("A strip of small images will appear below the main gallery image.","woocommerce"),[A.RIGHT]:(0,V.__)("A strip of small images will appear to the right of the main gallery image.","woocommerce")},H=({context:e})=>{const{productGalleryClientId:t}=e,{updateBlockAttributes:o}=(0,k.useDispatch)(b.store);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(P.__experimentalToggleGroupControl,{className:"wc-block-editor-product-gallery-thumbnails__position-toggle",isBlock:!0,label:(0,V.__)("Thumbnails","woocommerce"),value:e.thumbnailsPosition,help:N[e.thumbnailsPosition],onChange:e=>o(t,{thumbnailsPosition:e})},(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:A.OFF,label:(0,V.__)("Off","woocommerce")}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:A.LEFT,label:(0,r.createElement)(s.A,{size:32,icon:G})}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:A.BOTTOM,label:(0,r.createElement)(s.A,{size:32,icon:S})}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:A.RIGHT,label:(0,r.createElement)(s.A,{size:32,icon:M})})),e.thumbnailsPosition!==A.OFF&&(0,r.createElement)(P.RangeControl,{label:(0,V.__)("Number of Thumbnails","woocommerce"),value:e.thumbnailsNumberOfThumbnails,onChange:e=>o(t,{thumbnailsNumberOfThumbnails:Math.round(e)}),help:(0,V.__)("Choose how many thumbnails (3-8) will display. If more images exist, a “View all” button will display.","woocommerce"),max:8,min:3,step:1}))};let F=function(e){return e.DIGITS="digits",e.DOTS="dots",e.OFF="off",e}({});(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12"},(0,r.createElement)("circle",{cx:"6",cy:"6",r:"6",fill:"black",fillOpacity:"0.2"})),(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12"},(0,r.createElement)("circle",{cx:"6",cy:"6",r:"6",fill:"black"}));const W=()=>(0,r.createElement)(i.SVG,{width:"80",height:"36",viewBox:"0 0 80 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("circle",{cx:"32.6665",cy:"18",r:"3",fill:"currentColor"}),(0,r.createElement)("circle",{cx:"40.6665",cy:"18",r:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)("circle",{cx:"48.6665",cy:"18",r:"2.25",stroke:"currentColor",strokeWidth:"1.5"})),Z=()=>(0,r.createElement)(i.SVG,{width:"80",height:"36",viewBox:"0 0 80 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M30.1417 22H31.9288V14.9541H30.1417L28.3497 16.1748V17.7178L30.0489 16.5703H30.1417V22ZM36.9771 22H41.7231V21.0674H38.4663V20.9697L39.9604 19.4805C41.2397 18.2109 41.6108 17.5957 41.6108 16.7949V16.7803C41.6108 15.6182 40.644 14.7832 39.3306 14.7832C37.9146 14.7832 36.9185 15.6914 36.9136 16.9805L36.9233 16.9902H37.9487L37.9536 16.9756C37.9536 16.2041 38.481 15.6865 39.272 15.6865C40.0435 15.6865 40.5171 16.1943 40.5171 16.8828V16.8975C40.5171 17.4688 40.2485 17.8301 39.3159 18.8018L36.9771 21.2578V22ZM48.7392 22.1318C50.2333 22.1318 51.2929 21.2627 51.2929 20.0518V20.042C51.2929 19.0557 50.5995 18.4307 49.5644 18.3379V18.3135C50.4237 18.1328 51.0487 17.5469 51.0487 16.6729V16.6631C51.0487 15.5742 50.1308 14.8223 48.7294 14.8223C47.3524 14.8223 46.4149 15.6084 46.3075 16.7949L46.3026 16.8486H47.328L47.3329 16.7998C47.4013 16.1357 47.9481 15.7207 48.7294 15.7207C49.5253 15.7207 49.9843 16.1211 49.9843 16.8047V16.8145C49.9843 17.4688 49.4374 17.9424 48.6317 17.9424H47.8065V18.792H48.6659C49.6034 18.792 50.1796 19.2363 50.1796 20.0322V20.042C50.1796 20.7354 49.5985 21.2188 48.7392 21.2188C47.8651 21.2188 47.2743 20.7695 47.206 20.1299L47.2011 20.0811H46.1562L46.161 20.1396C46.2538 21.3066 47.2353 22.1318 48.7392 22.1318Z",fill:"currentColor"})),D=e=>{switch(e){case F.DIGITS:return(0,V.__)("A list of numbers will show to indicate the number of items.","woocommerce");case F.DOTS:return(0,V.__)("A series of dots will show to indicate the number of items.","woocommerce");default:return(0,V.__)("No pager will be displayed.","woocommerce")}},R=({context:e})=>{const{productGalleryClientId:t,pagerDisplayMode:o}=e,{updateBlockAttributes:l}=(0,k.useDispatch)(b.store);return(0,r.createElement)(P.__experimentalToggleGroupControl,{label:(0,V.__)("Pager","woocommerce"),style:{width:"100%"},onChange:e=>{l(t,{pagerDisplayMode:e})},help:D(o),value:o},(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:F.OFF,label:(0,V.__)("Off","woocommerce")}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:F.DOTS,label:(0,r.createElement)(W,null)}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:F.DIGITS,label:(0,r.createElement)(Z,null)}))};let j=function(e){return e.off="off",e.insideTheImage="insideTheImage",e.outsideTheImage="outsideTheImage",e}({});const z={[j.insideTheImage]:(0,r.createElement)((()=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"18",viewBox:"0 0 30 18",fill:"none"},(0,r.createElement)("path",{d:"M4.525 8.8L6.825 6.5L5.825 5.5L3.525 7.8C2.825 8.5 2.825 9.6 3.525 10.3L5.825 12.6L6.925 11.5L4.625 9.2C4.425 9.1 4.425 8.9 4.525 8.8Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M25.4 8.8L23.1 6.5L24.1 5.5L26.4 7.8C27.1 8.5 27.1 9.6 26.4 10.3L24.1 12.6L23 11.5L25.3 9.2C25.5 9.1 25.5 8.9 25.4 8.8Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"0.75",y:"0.75",width:"28.5",height:"16.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"}))),null),[j.outsideTheImage]:(0,r.createElement)((()=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"38",height:"18",viewBox:"0 0 38 18",fill:"none"},(0,r.createElement)("path",{d:"M1.525 8.3L5.825 4L4.825 3L0.525 7.3C-0.175 8 -0.175 9.1 0.525 9.8L4.825 14.1L5.925 13L1.625 8.7C1.425 8.6 1.425 8.4 1.525 8.3Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M37.325 7.3L33.025 3L31.925 4.1L36.2251 8.4C36.3251 8.5 36.3251 8.7 36.2251 8.8L31.925 13.1L33.025 14.2L37.325 9.9C38.025 9.1 38.025 8 37.325 7.3Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M25.925 0H11.925C10.825 0 9.92505 0.9 9.92505 2V16C9.92505 17.1 10.825 18 11.925 18H25.925C27.025 18 27.925 17.1 27.925 16V2C27.925 0.9 27.025 0 25.925 0ZM11.925 1.5H25.925C26.225 1.5 26.425 1.7 26.425 2V10.4L23.425 7.5C23.125 7.2 22.625 7.2 22.425 7.5L18.825 11L15.925 9C15.625 8.8 15.325 8.8 15.125 9L11.525 11.6V2C11.425 1.7 11.625 1.5 11.925 1.5ZM25.925 16.5H11.925C11.625 16.5 11.425 16.3 11.425 16V13.6L15.525 10.6L18.525 12.5C18.825 12.7 19.225 12.7 19.425 12.4L22.925 9L26.425 12.4V16C26.425 16.3 26.225 16.5 25.925 16.5Z",fill:"currentColor"}))),null)},U=e=>{switch(e){case j.insideTheImage:return(0,V.__)("Next and previous buttons will appear inside the large image.","woocommerce");case j.outsideTheImage:return(0,V.__)("Next and previous buttons will appear on outside the large image.","woocommerce");default:return(0,V.__)("No next or previous button will be displayed.","woocommerce")}},J=({context:e})=>{const{productGalleryClientId:t,nextPreviousButtonsPosition:o}=e,{updateBlockAttributes:l}=(0,k.useDispatch)(b.store);return(0,r.createElement)(P.__experimentalToggleGroupControl,{label:(0,V.__)("Next/Prev Buttons","woocommerce"),className:"wc-block-editor-product-gallery-large-image-next-previous-settings",style:{width:"100%"},onChange:e=>l(t,{nextPreviousButtonsPosition:e}),help:U(o),value:o},(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:j.off,label:(0,V.__)("Off","woocommerce")}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:j.insideTheImage,label:z.insideTheImage}),(0,r.createElement)(P.__experimentalToggleGroupControlOption,{value:j.outsideTheImage,label:z.outsideTheImage}))},$=({attributes:e,setAttributes:t,context:o})=>{const{cropImages:l,hoverZoom:i,fullScreenOnClick:n}=e,{productGalleryClientId:a,pagerDisplayMode:s,nextPreviousButtonsPosition:c,thumbnailsNumberOfThumbnails:m,thumbnailsPosition:u}=o;return(0,r.createElement)(b.InspectorControls,null,(0,r.createElement)(P.PanelBody,{title:(0,V.__)("Gallery Navigation","woocommerce")},(0,r.createElement)(R,{context:{productGalleryClientId:a,pagerDisplayMode:s}}),(0,r.createElement)(J,{context:{productGalleryClientId:a,nextPreviousButtonsPosition:c}}),(0,r.createElement)(H,{context:{productGalleryClientId:a,thumbnailsNumberOfThumbnails:m,thumbnailsPosition:u}})),(0,r.createElement)(P.PanelBody,{title:(0,V.__)("Media Settings","woocommerce")},(0,r.createElement)(P.ToggleControl,{label:(0,V.__)("Crop images to fit","woocommerce"),help:(0,V.__)("Images will be cropped to fit within a square space.","woocommerce"),checked:l,onChange:()=>t({cropImages:!l}),className:"wc-block-product-gallery__crop-images"}),(0,r.createElement)(P.ToggleControl,{label:(0,V.__)("Zoom while hovering","woocommerce"),help:(0,V.__)("While hovering the large image will zoom in by 30%.","woocommerce"),checked:i,onChange:()=>t({hoverZoom:!i})}),(0,r.createElement)(P.ToggleControl,{label:(0,V.__)("Open pop-up when clicked","woocommerce"),help:(0,V.__)("Clicking on the large image will open a full-screen gallery experience.","woocommerce"),checked:n,onChange:()=>t({fullScreenOnClick:!n})})))},q=[["core/group",{layout:{type:"flex",flexWrap:"nowrap",verticalAlignment:"top"},metadata:{name:"Gallery Area"}},[["woocommerce/product-gallery-thumbnails",B("lock")],["core/group",{layout:{type:"flex",orientation:"vertical",justifyContent:"center",verticalAlignment:"top"},style:{layout:{selfStretch:"fixed",flexSize:"100%"}},metadata:{name:"Large Image and Navigation"},...B("lock")},[["woocommerce/product-gallery-large-image",B("lock"),[["woocommerce/product-sale-badge",{align:"right",style:{spacing:{margin:{top:"4px",right:"4px",bottom:"4px",left:"4px"}}},lock:{move:!0}}],["woocommerce/product-gallery-large-image-next-previous",{layout:{type:"flex",verticalAlignment:"bottom"},lock:{move:!0,remove:!0}}]]],["woocommerce/product-gallery-pager",{lock:{move:!0,remove:!0}}]]]]]],Q={icon:()=>(0,r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M19 3H5C4.4 3 4 3.4 4 4V11C4 11.5 4.4 12 5 12H19C19.5 12 20 11.6 20 11V4C20 3.4 19.6 3 19 3ZM5.5 10.5V10.1L7.3 8.8L8.6 9.6C8.9 9.8 9.3 9.8 9.5 9.5L11 8.1L13.4 10.5H5.5ZM18.5 10.5H15.6L11.6 6.5C11.3 6.2 10.8 6.2 10.5 6.5L8.9 8L7.7 7.2C7.4 7 7.1 7 6.8 7.2L5.5 8.2V4.5H18.5V10.5Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"4.75",y:"15.5",width:"5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)("rect",{x:"12.25",y:"15.5",width:"5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})),edit:({clientId:e,attributes:t,setAttributes:o})=>{const l=(0,b.useBlockProps)({className:O(t.nextPreviousButtonsPosition)}),{currentTemplateId:i,templateType:n}=(0,k.useSelect)((e=>({currentTemplateId:e("core/edit-site").getEditedPostId(),templateType:e("core/edit-site").getEditedPostType()})),[]);return(0,m.useEffect)((()=>{const r=((e,t)=>"wp_template_part"===t&&e.includes("product-gallery")?"full":"standard")(i,n);o({...t,mode:r,productGalleryClientId:e}),((e,t)=>{const{getBlock:o,getBlockRootClientId:r,getBlockIndex:l}=(0,k.select)("core/block-editor"),{moveBlockToPosition:i}=(0,k.dispatch)("core/block-editor"),n=o(t);if(n){const o=n.innerBlocks.length?n.innerBlocks[0].attributes.layout:null,a=C({blocks:[n],findCondition:e=>"woocommerce/product-gallery-thumbnails"===e.name}),s=C({blocks:[n],findCondition(e){var t;return Boolean(null===(t=e.innerBlocks)||void 0===t?void 0:t.find((e=>"woocommerce/product-gallery-large-image"===e.name)))}}),c=l((null==s?void 0:s.clientId)||""),m=l((null==a?void 0:a.clientId)||"");if(s&&a&&-1!==c&&-1!==m){T({blocks:[a,s],lockBlocks:!1});const{thumbnailsPosition:l}=e;if(L(l,t),L(l,n.innerBlocks[0].clientId),o){const e=E(l).orientation;I({layout:{...o,orientation:e}},n.innerBlocks[0])}(("bottom"===l||"right"===l)&&m<c||"left"===l&&m>c)&&i(a.clientId,r(a.clientId)||void 0,r(s.clientId)||void 0,c),T({blocks:[a,s],lockBlocks:!0})}}})(t,e)}),[o,t,e,i,n]),(0,r.createElement)("div",{...l},(0,r.createElement)(b.InspectorControls,null,(0,r.createElement)($,{attributes:t,setAttributes:o,context:{productGalleryClientId:e,pagerDisplayMode:t.pagerDisplayMode,thumbnailsPosition:t.thumbnailsPosition,thumbnailsNumberOfThumbnails:t.thumbnailsNumberOfThumbnails,nextPreviousButtonsPosition:t.nextPreviousButtonsPosition}})),(0,r.createElement)(b.InnerBlocks,{allowedBlocks:["woocommerce/product-gallery-large-image","woocommerce/product-gallery-thumbnails"],templateLock:!1,template:q}))},save:({attributes:e})=>{const t=b.useBlockProps.save({className:(0,n.A)("wc-block-product-gallery",O(e.nextPreviousButtonsPosition))}),o=b.useInnerBlocksProps.save(t);return(0,r.createElement)("div",{...o})}},K=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"woocommerce/product-gallery","version":"1.0.0","title":"Product Gallery (Beta)","description":"Showcase your products relevant images and media.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":true,"multiple":false,"interactivity":true},"textdomain":"woocommerce","usesContext":["postId"],"providesContext":{"thumbnailsPosition":"thumbnailsPosition","thumbnailsNumberOfThumbnails":"thumbnailsNumberOfThumbnails","productGalleryClientId":"productGalleryClientId","nextPreviousButtonsPosition":"nextPreviousButtonsPosition","pagerDisplayMode":"pagerDisplayMode","hoverZoom":"hoverZoom","fullScreenOnClick":"fullScreenOnClick","mode":"mode","cropImages":"cropImages"},"attributes":{"thumbnailsPosition":{"type":"string","default":"left"},"thumbnailsNumberOfThumbnails":{"type":"number","default":3},"pagerDisplayMode":{"type":"string","default":"dots"},"productGalleryClientId":{"type":"string","default":""},"cropImages":{"type":"boolean","default":false},"hoverZoom":{"type":"boolean","default":true},"fullScreenOnClick":{"type":"boolean","default":true},"nextPreviousButtonsPosition":{"type":"string","default":"insideTheImage"},"mode":{"type":"string","default":"standard"}},"viewScript":"wc-product-gallery-frontend","example":{}}'),X={[K.name]:{blockMetadata:K,blockSettings:Q,allowedTemplates:{"single-product":!0},allowedTemplateParts:{"product-gallery":!0},availableInPostOrPageEditor:!1,isVariationBlock:!1}};class Y{constructor(){(0,c.A)(this,"unregisteredBlocks",[]),(0,c.A)(this,"blockRegistrationStrategy",void 0),this.blockRegistrationStrategy=new w}shouldBlockBeRegistered({blockWithRestrictionName:e,currentTemplateId:t,isPostOrPage:o}){const{allowedTemplates:r,allowedTemplateParts:l,availableInPostOrPageEditor:i}=X[e],n=Object.keys(r).some((e=>t.startsWith(e))),a=Object.keys(l).some((e=>t.startsWith(e)));return n||a||o&&i}unregisterBlocksBeforeEnteringRestrictedArea({currentTemplateId:e,isPostOrPage:t}){for(const o of Object.keys(X))this.shouldBlockBeRegistered({blockWithRestrictionName:o,currentTemplateId:e,isPostOrPage:t})||(0,l.getBlockType)(o)&&(this.blockRegistrationStrategy=X[o].isVariationBlock?new f:new w,this.blockRegistrationStrategy.unregister(o),this.unregisteredBlocks.push(o))}registerBlocksAfterLeavingRestrictedArea(){for(const e of this.unregisteredBlocks){const t=X[e];this.blockRegistrationStrategy=X[e].isVariationBlock?new f:new w;const o=this.blockRegistrationStrategy.register(t.blockMetadata,t.blockSettings);this.unregisteredBlocks=o?this.unregisteredBlocks.filter((t=>t!==e)):this.unregisteredBlocks}}run(e){this.registerBlocksAfterLeavingRestrictedArea(),this.unregisterBlocksBeforeEnteringRestrictedArea({currentTemplateId:e.getCurrentTemplateId()||"",isPostOrPage:e.getIsPostOrPage()})}}const ee=window.wp.url,te=window.wc.wcTypes;class oe{constructor(){(0,c.A)(this,"previousTemplateId",void 0),(0,c.A)(this,"currentTemplateId",void 0),(0,c.A)(this,"isPostOrPage",void 0),(0,c.A)(this,"observers",[]),this.isPostOrPage=!1,(0,k.subscribe)((()=>{this.checkIfTemplateHasChangedAndNotifySubscribers()}),"core/edit-site")}add(e){this.observers.push(e)}notify(){for(const e of this.observers)e.run(this)}getPreviousTemplateId(){return this.previousTemplateId}getCurrentTemplateId(){return this.currentTemplateId}getIsPostOrPage(){return this.isPostOrPage}parseTemplateId(e){return(0,te.isNumber)(e)?String(e):null==e?void 0:e.split("//")[1]}getCurrentTemplateIdFromUrl(e){const t=(0,ee.getPath)(e);let o;return!!t&&t.includes("site-editor.php")&&(o=(0,ee.getQueryArg)(e,"postId")),o}checkIfTemplateHasChangedAndNotifySubscribers(){this.previousTemplateId=this.currentTemplateId;const e=this.getCurrentTemplateIdFromUrl(window.location.href);this.currentTemplateId=this.parseTemplateId(e);const t=this.previousTemplateId!==this.currentTemplateId,o=Boolean(this.currentTemplateId);t&&o&&this.notify()}}g()((()=>{const e=new oe,t=new Y;e.add(t)})),(0,l.updateCategory)("woocommerce",{icon:(0,r.createElement)(s.A,{icon:a})}),(0,l.updateCategory)("woocommerce-product-elements",{icon:(0,r.createElement)(s.A,{icon:a,className:"wc-block-editor-components-block-icon"})})},4686:()=>{},1792:()=>{},9345:()=>{},1609:e=>{"use strict";e.exports=window.React},9491:e=>{"use strict";e.exports=window.wp.compose},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return r[e].call(o.exports,o,o.exports,i),o.exports}i.m=r,e=[],i.O=(t,o,r,l)=>{if(!o){var n=1/0;for(m=0;m<e.length;m++){for(var[o,r,l]=e[m],a=!0,s=0;s<o.length;s++)(!1&l||n>=l)&&Object.keys(i.O).every((e=>i.O[e](o[s])))?o.splice(s--,1):(a=!1,l<n&&(n=l));if(a){e.splice(m--,1);var c=r();void 0!==c&&(t=c)}}return t}l=l||0;for(var m=e.length;m>0&&e[m-1][2]>l;m--)e[m]=e[m-1];e[m]=[o,r,l]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var l=Object.create(null);i.r(l);var n={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,i.d(l,n),l},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=5936,(()=>{var e={5936:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[n,a,s]=o,c=0;if(n.some((t=>0!==e[t]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(s)var m=s(i)}for(t&&t(o);c<n.length;c++)l=n[c],i.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return i.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=i.O(void 0,[94],(()=>i(2562)));n=i.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["wc-blocks"]=n})();

Youez - 2016 - github.com/yon3zu
LinuXploit