(("undefined"!=typeof self?self:this).webpackJsonp__wix_ricos_viewer_ooi=("undefined"!=typeof self?self:this).webpackJsonp__wix_ricos_viewer_ooi||[]).push([[8344],{2060:function(e,i,t){var a;!function(i){"use strict";var n=function(){},o=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var e=this;e.reads=[],e.writes=[],e.raf=o.bind(i),n("initialized",e)}function s(e){e.scheduled||(e.scheduled=!0,e.raf(d.bind(null,e)),n("flush scheduled"))}function d(e){n("flush");var i,t=e.writes,a=e.reads;try{n("flushing reads",a.length),e.runTasks(a),n("flushing writes",t.length),e.runTasks(t)}catch(e){i=e}if(e.scheduled=!1,(a.length||t.length)&&s(e),i){if(n("task errored",i.message),!e.catch)throw i;e.catch(i)}}function l(e,i){var t=e.indexOf(i);return!!~t&&!!e.splice(t,1)}r.prototype={constructor:r,runTasks:function(e){var i;for(n("run tasks");i=e.shift();)i()},measure:function(e,i){n("measure");var t=i?e.bind(i):e;return this.reads.push(t),s(this),t},mutate:function(e,i){n("mutate");var t=i?e.bind(i):e;return this.writes.push(t),s(this),t},clear:function(e){return n("clear",e),l(this.reads,e)||l(this.writes,e)},extend:function(e){if(n("extend",e),"object"!=typeof e)throw new Error("expected object");var i=Object.create(this);return function(e,i){for(var t in i)i.hasOwnProperty(t)&&(e[t]=i[t])}(i,e),i.fastdom=this,i.initialize&&i.initialize(),i},catch:null};var c=i.fastdom=i.fastdom||new r;void 0===(a=function(){return c}.call(c,t,c,e))||(e.exports=a)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},2024:(e,i,t)=>{"use strict";t.r(i),t.d(i,{default:()=>E});var a=t(1112),n=t.n(a),o=t(452),r=t(4968),s=t(7936),d=t(6056),l=t(3048),c={alignLeft:"g-9gD",textWrapNowrap:"npapB",alignRight:"yMdMS",alignCenter:"peFtv",sizeFullWidth:"_0Y9Ow",renderedInTable:"vz29K",sizeOriginal:"BzRgm",sizeContent:"hxhTK",sizeSmall:"sMYeI",sizeSmallCenter:"nNyWl",flex:"_1dtii"};const m=e=>{const{alignment:i,width:t}=e.imageData?.containerData||{};if(!i)return"";let a=i;if(t?.size===l.sL.ORIGINAL&&i!==l.m_.CENTER){const{width:i}=e.imageData?.image||{};(0,d.isNumber)(i)&&i>350&&(a=l.m_.CENTER)}return c[`align${(0,d.upperFirst)(a.toLowerCase())}`]},u=(e,i)=>{const{width:t}=e.imageData?.containerData||{};return!t?.size||i&&t?.size===l.sL.ORIGINAL?"":t?.size===l.sL.FULL_WIDTH?c.sizeFullWidth:c[`size${(0,d.upperFirst)((0,d.camelCase)(t.size.toLowerCase()))}`]},h=e=>{const{textWrap:i}=e.imageData?.containerData||{};return i?"":c.textWrapNowrap};var g=t(5200);var p=t(3264),f=t.n(p),w=t(1124),v=t(472);var D=e=>n().createElement("svg",{viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",...e},n().createElement("path",{d:"M15.071 8.371V4.585l-4.355 4.356a.2.2 0 0 1-.283 0l-.374-.374a.2.2 0 0 1 0-.283l4.356-4.355h-3.786a.2.2 0 0 1-.2-.2V3.2c0-.11.09-.2.2-.2H16v5.371a.2.2 0 0 1-.2.2h-.529a.2.2 0 0 1-.2-.2zm-6.5 6.9v.529a.2.2 0 0 1-.2.2H3v-5.371c0-.11.09-.2.2-.2h.529c.11 0 .2.09.2.2v3.786l4.355-4.356a.2.2 0 0 1 .283 0l.374.374a.2.2 0 0 1 0 .283L4.585 15.07h3.786c.11 0 .2.09.2.2z",fill:"#000",fillRule:"nonzero"})),b={fontElementMap:"THq9L",imageContainer:"yrpQK",expandContainer:"AJDpy",expandIcon:"D3Xvo",pointer:"MYYaD",imageWrapper:"YgO18",imageRatio:"_7cQp8",image:"NgSGq",imageOverlay:"tG5Rn",imageCaption:"JF9rE",imagePreload:"MZHAP",imageHighres:"E4yie",onlyHighRes:"iPdbO",image_loading:"_3t1ch"};const x=e=>{const{type:i,disableDownload:t,children:a}=e,o="onClick"in e,r=o?e.onClick:void 0,s=r?e=>{"Enter"!==e.key&&" "!==e.key||r(e)}:void 0,d={onClick:r,onKeyDown:s,onContextMenu:t},l=o||"regular"===i&&t?"button":void 0,c="button"===l?0:void 0;return n().createElement("figure",{..."button"===l?d:{},role:l,"data-hook":"imageViewer",tabIndex:c,className:b.imageContainer,"aria-haspopup":"button"===l||void 0},a)},y=({dataUrl:e,node:i,className:t,config:o,helpers:r,isMobile:s,seoMode:l,imageClickActionConfig:c,expand:m,captionComponent:u,shouldLazyLoadImages:h})=>{const g=i.imageData?.containerData||v.uA.containerData,{image:p,altText:y}=i.imageData||{},{src:C}=p||{},I=!0===i.imageData?.disableDownload?e=>e.preventDefault():void 0,E=(0,a.useMemo)((()=>{if(e)return e;const{url:i,id:t}=C||{};if(i)return i;const{getImageUrl:a}=r??{};return a&&t?a({file_name:t}):t}),[e,i.imageData?.image?.src?.url,i.imageData?.image?.src?.id,r?.getImageUrl]),{width:k,height:z}=(({src:e,containerData:i,image:t})=>{const[n,o]=(0,a.useState)({width:void 0,height:void 0}),r=t?.width||Number(i?.width?.custom)||n.width,s=t?.height||Number(i?.height?.custom)||n.height;return(0,a.useLayoutEffect)((()=>{if("number"==typeof r&&"number"==typeof s)return;if(o({width:void 0,height:void 0}),!e)return;const i=new Image;return i.onload=()=>o({width:i.width,height:i.height}),i.src=e,()=>{i.onload=null}}),[e]),{width:r,height:s}})({src:E,containerData:g,image:p}),L=(({containerData:e,isMobile:i})=>"LEFT"!==e?.alignment&&"RIGHT"!==e?.alignment||e.width?.custom||"SMALL"===e.width?.size||"ORIGINAL"===e.width?.size||i?{}:{width:"300px"})({containerData:g,isMobile:s}),N=(({containerData:e,isMobile:i,width:t})=>"ORIGINAL"===e?.width?.size||i&&(Number(e?.width?.custom)||0)>150?{width:t??"0px",maxWidth:"100%"}:{})({containerData:g,isMobile:s,width:k}),_=(({src:e,config:i,width:t,height:a})=>{if(void 0===e||void 0===i?.imageProps)return{};const n=(0,d.isFunction)(i.imageProps)?i.imageProps({url:e.url,file_name:e.id,width:t,height:a}):i.imageProps;return["data-pin-nopin","data-pin-url","data-pin-media"].reduce(((e,i)=>n[i]?{...e,[i]:n[i]}:e),{})})({config:o,src:C,width:p?.width,height:p?.height}),M=void 0!==k&&void 0!==z;return n().createElement(x,{...c,disableDownload:I},M&&E&&n().createElement(w.c,{id:i.imageData?.image?.src?.id??E,containerId:i.id,displayMode:"fill",width:k,height:z,uri:i.imageData?.image?.src?.id??E,alt:y||"",containerProps:{className:f()(b.imageWrapper,b.imageRatio,t,{[b.pointer]:!!m}),containerId:i.id,style:{"--dim-height":z,"--dim-width":k,...L,...N}},imageStyles:{maxWidth:"100%"},socialAttrs:_,isSEOBot:!!l,...h?{placeholderTransition:l?void 0:"blur",shouldUseLQIP:!1!==o?.disableTransition}:{}}),!!m&&n().createElement("div",{className:b.expandContainer,onClick:m,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||m(e)},role:"button",tabIndex:0},n().createElement(D,{className:b.expandIcon})),u)},C=({imageType:e,caption:i,defaultCaption:t})=>{const a="link"===e||"anchor"===e,o=f()(b.imageCaption,{[b.link]:a});return i&&i!==t?n().createElement("figcaption",{dir:"auto",className:o},i):null},I=({node:e,nodeIndex:i,NodeViewContainer:t})=>{const{config:d,seoMode:l,helpers:c}=(0,a.useContext)(o.e),{isMobile:p,t:f}=(0,a.useContext)(r.OW),w=d[s.o]??{},v=(({helpers:e,config:i,nodeId:t,imageData:a})=>{const{onExpand:n,disableExpand:o}=i;if(!0!==a?.disableExpand&&!0!==o&&n)return i=>{i.preventDefault(),e.onViewerAction?.(g.oj,"Click","expand_image"),n(t)}})({helpers:c,config:w,nodeId:e.id,imageData:e.imageData}),D=(({imageData:e,config:i,expand:t})=>e?.link?.url&&i?{type:"link"}:e?.link?.anchor?{type:"anchor"}:t?{type:"expand",onClick:t}:{type:"regular"})({imageData:e.imageData,config:w,expand:v});return n().createElement(t,{node:e,nodeIndex:i,customClassNames:{alignment:m(e),size:u(e,p),textWrap:h(e)}},n().createElement(y,{node:e,imageClickActionConfig:D,expand:v,config:w,seoMode:l,helpers:c,isMobile:p,shouldLazyLoadImages:!0,captionComponent:n().createElement(C,{imageType:D.type,caption:e?.imageData?.caption,defaultCaption:f("ImageViewer_Caption")})}))};var E=({node:e,...i})=>n().createElement(I,{key:e.id,node:e,...i})}}]); //# sourceMappingURL=ricos_plugin_image.chunk.min.js.map