Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wix/image

Package Overview
Dependencies
Maintainers
0
Versions
335
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/image - npm Package Compare versions

Comparing version 1.302.0 to 1.303.0

dist/statics/janet/main.fd9c3240.iframe.bundle.js

3

dist/cjs/__tests__/Image.e2e.js

@@ -16,5 +16,6 @@ async function getAllImageSrcs() {

(imgIndex, scrollY) => {
var _getBoundingClientRec;
const imgs = document.querySelectorAll('img');
const element = imgs[imgIndex];
const elementTop = element.getBoundingClientRect().top + window.scrollY;
const elementTop = ((_getBoundingClientRec = element.getBoundingClientRect()) == null ? void 0 : _getBoundingClientRec.top) + window.scrollY;
const marginOffset = window.innerHeight * scrollY;

@@ -21,0 +22,0 @@ window.scrollTo({

@@ -139,3 +139,3 @@ "use strict";

test('should render HQ image when true', () => {
var _image$getAttribute, _srcset$1$match;
var _image$getAttribute, _srcset2$match;
const target = {

@@ -155,8 +155,8 @@ width: 600,

const src = image.getAttribute('src');
const srcset = (_image$getAttribute = image.getAttribute('srcset')) == null ? void 0 : _image$getAttribute.split(', ');
const src2x = `${src == null ? void 0 : src.replace(/w_600/, 'w_1200').replace(/h_400/, 'h_800').replace(/q_\d+/, (srcset == null || (_srcset$1$match = srcset[1].match(/q_\d+/)) == null ? void 0 : _srcset$1$match[0]) || '')}`;
const [srcset1, srcset2] = ((_image$getAttribute = image.getAttribute('srcset')) == null ? void 0 : _image$getAttribute.split(', ')) || [];
const src2x = `${src == null ? void 0 : src.replace(/w_600/, 'w_1200').replace(/h_400/, 'h_800').replace(/q_\d+/, (srcset2 == null || (_srcset2$match = srcset2.match(/q_\d+/)) == null ? void 0 : _srcset2$match[0]) || '')}`;
expect(src).toContain(defaultProps.uri);
expect(src).not.toContain('blur');
expect(srcset == null ? void 0 : srcset[0].trim()).toEqual(`${src} 1x`);
expect(srcset == null ? void 0 : srcset[1].trim()).toEqual(`${src2x} 2x`);
expect(srcset1 == null ? void 0 : srcset1.trim()).toEqual(`${src} 1x`);
expect(srcset2 == null ? void 0 : srcset2.trim()).toEqual(`${src2x} 2x`);
});

@@ -163,0 +163,0 @@ });

@@ -206,4 +206,6 @@ "use strict";

const mediaQuery = sourceNode.media || '';
const uri = mediaToUri ? mediaToUri[mediaQuery] : '';
sourceNode.srcset !== uri && sourceNode.setAttribute('srcset', uri);
const uri = mediaToUri == null ? void 0 : mediaToUri[mediaQuery];
if (sourceNode.srcset !== uri) {
sourceNode.setAttribute('srcset', uri || '');
}
});

@@ -210,0 +212,0 @@ }

@@ -90,4 +90,7 @@ "use strict";

const queryParams = window.location.search.split('&').map(query => query.split('='));
const devicePixelRatioQueryParam = queryParams.find(query => query[0].toLowerCase().includes('devicepixelratio'));
const devicePixelRatioValueForceFromUrl = devicePixelRatioQueryParam ? Number(devicePixelRatioQueryParam[1]) : null;
const devicePixelRatioQueryParam = queryParams.find(query => {
var _query$;
return (_query$ = query[0]) == null ? void 0 : _query$.toLowerCase().includes('devicepixelratio');
});
const devicePixelRatioValueForceFromUrl = devicePixelRatioQueryParam != null && devicePixelRatioQueryParam[1] ? Number(devicePixelRatioQueryParam[1]) : null;
return devicePixelRatioValueForceFromUrl || devicePixelRatio || 1;

@@ -94,0 +97,0 @@ };

@@ -58,3 +58,3 @@ "use strict";

height
} = imagePresets[name];
} = imagePresets[name] || {};
return /*#__PURE__*/_react.default.createElement(_Container.Container, {

@@ -164,3 +164,3 @@ id: containerId,

id: "lazyImage",
uri: uris[0],
uri: uris[0] || '',
height: 600,

@@ -204,3 +204,3 @@ containerId: "firstFold",

id: "lazyImage2",
uri: uris[1],
uri: uris[1] || '',
__self: void 0,

@@ -224,3 +224,3 @@ __source: {

id: "lazyImage3",
uri: uris[2],
uri: uris[2] || '',
__self: void 0,

@@ -227,0 +227,0 @@ __source: {

@@ -19,3 +19,3 @@ "use strict";

const element = imgs[imgIndex];
const elementTop = element.getBoundingClientRect().top + window.scrollY;
const elementTop = element.getBoundingClientRect()?.top + window.scrollY;
const marginOffset = window.innerHeight * scrollY;

@@ -22,0 +22,0 @@ window.scrollTo({

@@ -106,11 +106,11 @@ import React from 'react';

const src = image.getAttribute('src');
const srcset = image.getAttribute('srcset')?.split(', ');
const [srcset1, srcset2] = image.getAttribute('srcset')?.split(', ') || [];
const src2x = `${src
?.replace(/w_600/, 'w_1200')
.replace(/h_400/, 'h_800')
.replace(/q_\d+/, srcset?.[1].match(/q_\d+/)?.[0] || '')}`;
.replace(/q_\d+/, srcset2?.match(/q_\d+/)?.[0] || '')}`;
expect(src).toContain(defaultProps.uri);
expect(src).not.toContain('blur');
expect(srcset?.[0].trim()).toEqual(`${src} 1x`);
expect(srcset?.[1].trim()).toEqual(`${src2x} 2x`);
expect(srcset1?.trim()).toEqual(`${src} 1x`);
expect(srcset2?.trim()).toEqual(`${src2x} 2x`);
});

@@ -117,0 +117,0 @@ });

@@ -195,4 +195,6 @@ import { getScreenHeight, setStyle, getImageComputedProperties, getImageSrc, imageIsAnimated, } from './utils';

const mediaQuery = sourceNode.media || '';
const uri = mediaToUri ? mediaToUri[mediaQuery] : '';
sourceNode.srcset !== uri && sourceNode.setAttribute('srcset', uri);
const uri = mediaToUri?.[mediaQuery];
if (sourceNode.srcset !== uri) {
sourceNode.setAttribute('srcset', uri || '');
}
});

@@ -199,0 +201,0 @@ }

@@ -86,4 +86,4 @@ import { alignTypes, fittingTypes, getData, isWEBP, getFileExtension, fileType, } from '@wix/image-kit';

.map((query) => query.split('='));
const devicePixelRatioQueryParam = queryParams.find((query) => query[0].toLowerCase().includes('devicepixelratio'));
const devicePixelRatioValueForceFromUrl = devicePixelRatioQueryParam
const devicePixelRatioQueryParam = queryParams.find((query) => query[0]?.toLowerCase().includes('devicepixelratio'));
const devicePixelRatioValueForceFromUrl = devicePixelRatioQueryParam?.[1]
? Number(devicePixelRatioQueryParam[1])

@@ -90,0 +90,0 @@ : null;

@@ -39,3 +39,3 @@ import React from 'react';

};
const { uri, width, height } = imagePresets[name];
const { uri, width, height } = imagePresets[name] || {};
return (React.createElement(Container, { id: containerId, width: containerWidth, height: containerHeight },

@@ -72,3 +72,3 @@ React.createElement(Component, { key: key, id: "image0", containerId: containerId, alt: alt, name: name, displayMode: displayMode, uri: uri, width: width, height: height, ...args })));

React.createElement(Container, { width: 900, height: 600, id: "firstFold" },
React.createElement(Component, { ...sharedProps, id: "lazyImage", uri: uris[0], height: 600, containerId: "firstFold", isInFirstFold: true })),
React.createElement(Component, { ...sharedProps, id: "lazyImage", uri: uris[0] || '', height: 600, containerId: "firstFold", isInFirstFold: true })),
React.createElement("div", { style: { height: '1500px' } },

@@ -78,6 +78,6 @@ React.createElement("p", null, "Scroll down to load the image...")),

React.createElement(React.Fragment, null,
React.createElement(Component, { ...sharedProps, id: "lazyImage2", uri: uris[1] }),
React.createElement(Component, { ...sharedProps, id: "lazyImage2", uri: uris[1] || '' }),
React.createElement("div", { style: { height: '500px' } }),
React.createElement(Component, { ...sharedProps, id: "lazyImage3", uri: uris[2] })))));
React.createElement(Component, { ...sharedProps, id: "lazyImage3", uri: uris[2] || '' })))));
};
//# sourceMappingURL=Image.stories.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define("image",["React"],e):"object"==typeof exports?exports.image=e(require("React")):t.image=e(t.React)}("undefined"!=typeof self?self:this,(t=>(()=>{var e={709:function(t,e,i){var n;!function(e){"use strict";var r=function(){},o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function a(){var t=this;t.reads=[],t.writes=[],t.raf=o.bind(e),r("initialized",t)}function s(t){t.scheduled||(t.scheduled=!0,t.raf(c.bind(null,t)),r("flush scheduled"))}function c(t){r("flush");var e,i=t.writes,n=t.reads;try{r("flushing reads",n.length),t.runTasks(n),r("flushing writes",i.length),t.runTasks(i)}catch(t){e=t}if(t.scheduled=!1,(n.length||i.length)&&s(t),e){if(r("task errored",e.message),!t.catch)throw e;t.catch(e)}}function h(t,e){var i=t.indexOf(e);return!!~i&&!!t.splice(i,1)}a.prototype={constructor:a,runTasks:function(t){var e;for(r("run tasks");e=t.shift();)e()},measure:function(t,e){r("measure");var i=e?t.bind(e):t;return this.reads.push(i),s(this),i},mutate:function(t,e){r("mutate");var i=e?t.bind(e):t;return this.writes.push(i),s(this),i},clear:function(t){return r("clear",t),h(this.reads,t)||h(this.writes,t)},extend:function(t){if(r("extend",t),"object"!=typeof t)throw new Error("expected object");var e=Object.create(this);return function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}(e,t),e.fastdom=this,e.initialize&&e.initialize(),e},catch:null};var u=e.fastdom=e.fastdom||new a;void 0===(n=function(){return u}.call(u,i,u,t))||(t.exports=n)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},883:e=>{"use strict";e.exports=t},99:(t,e,i)=>{var n=i(602);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},448:t=>{function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},751:(t,e,i)=>{var n=i(284).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},602:(t,e,i)=>{var n=i(284).default,r=i(751);t.exports=function(t){var e=r(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},284:t=>{function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Image:()=>Zt,imageKit:()=>t,initCustomElement:()=>de});var t={};n.r(t),n.d(t,{STATIC_MEDIA_URL:()=>zt,alignTypes:()=>m,fileType:()=>v,fittingTypes:()=>g,getData:()=>Nt,getFileExtension:()=>U,getPlaceholder:()=>Ft,htmlTag:()=>_,isWEBP:()=>N,populateGlobalFeatureSupport:()=>K,sdk:()=>$t,upscaleMethods:()=>I});var e=n(448),i=n.n(e),o=n(883);const a="DpEFnE",s="v1",c=2,h=1920,u=1920,l=1e3,d=1e3,g={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},f={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},m={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},p={[m.CENTER]:{x:.5,y:.5},[m.TOP_LEFT]:{x:0,y:0},[m.TOP_RIGHT]:{x:1,y:0},[m.TOP]:{x:.5,y:0},[m.BOTTOM_LEFT]:{x:0,y:1},[m.BOTTOM_RIGHT]:{x:1,y:1},[m.BOTTOM]:{x:.5,y:1},[m.RIGHT]:{x:1,y:.5},[m.LEFT]:{x:0,y:.5}},T={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},_={BG:"bg",IMG:"img",SVG:"svg"},I={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},E={classic:1,super:2},L={radius:"0.66",amount:"1.00",threshold:"0.01"},b={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},A=25e6,w=[1.5,2,4],O={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},R={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},y={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},v={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",UNRECOGNIZED:"unrecognized"};v.JPG,v.JPEG,v.JPE,v.PNG,v.GIF,v.WEBP;function M(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[n.length-1]||{},a=[t[0]];return i.forEach((function(e,i){const r=Number.isInteger(e)?n[e]:o[e];a.push(r,t[i+1])})),a.join("")}}function S(t){return t[t.length-1]}const G=[v.PNG,v.JPEG,v.JPG,v.JPE,v.WIX_ICO_MP,v.WIX_MP,v.WEBP],x=[v.JPEG,v.JPG,v.JPE];function C(t,e,i){return i&&e&&!(!(n=e.id)||!n.trim()||"none"===n.toLowerCase())&&Object.values(g).includes(t);var n}function P(t,e,i){return function(t,e,i){return void 0===i&&(i=!1),!(N(t)&&e&&!i)}(t,e,i)&&function(t){return G.includes(U(t))}(t)&&!/(^https?)|(^data)|(^\/\/)/.test(t)}function F(t){return U(t)===v.PNG}function N(t){return U(t)===v.WEBP}const k=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),H=["\\.","\\*"],B="_";function Y(t){return function(t){return x.includes(U(t))}(t)?v.JPG:F(t)?v.PNG:N(t)?v.WEBP:v.UNRECOGNIZED}function U(t){return(/[.]([^.]+)$/.exec(t)&&/[.]([^.]+)$/.exec(t)[1]||"").toLowerCase()}function $(t,e,i,n,r){let o;return o=r===f.FILL?function(t,e,i,n){return Math.max(i/t,n/e)}(t,e,i,n):r===f.FIT?function(t,e,i,n){return Math.min(i/t,n/e)}(t,e,i,n):1,o}function z(t,e,i,n,r,o){t=t||n.width,e=e||n.height;const{scaleFactor:a,width:s,height:c}=function(t,e,i,n,r){let o,a=i,s=n;if(o=$(t,e,i,n,r),r===f.FIT&&(a=t*o,s=e*o),a&&s&&a*s>A){const i=Math.sqrt(A/(a*s));a*=i,s*=i,o=$(t,e,a,s,r)}return{scaleFactor:o,width:a,height:s}}(t,e,n.width*r,n.height*r,i);return function(t,e,i,n,r,o,a){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:h}=function(t,e,i,n){if("auto"===n)return function(t,e){const i=Z(t,e);return{optimizedScaleFactor:O[i].maxUpscale,upscaleMethodValue:E.classic,forceUSM:!1}}(t,e);if("super"===n)return function(t){return{optimizedScaleFactor:S(w),upscaleMethodValue:E.super,forceUSM:!(w.includes(t)||t>S(w))}}(i);return function(t,e){const i=Z(t,e);return{optimizedScaleFactor:O[i].maxUpscale,upscaleMethodValue:E.classic,forceUSM:!1}}(t,e)}(t,e,o,r);let u=i,l=n;if(o<=s)return{width:u,height:l,scaleFactor:o,upscaleMethodValue:c,forceUSM:h,cssUpscaleNeeded:!1};switch(a){case f.FILL:u=i*(s/o),l=n*(s/o);break;case f.FIT:u=t*s,l=e*s}return{width:u,height:l,scaleFactor:s,upscaleMethodValue:c,forceUSM:h,cssUpscaleNeeded:!0}}(t,e,s,c,o,a,i)}function j(t,e,i,n){const r=W(i)||function(t){return void 0===t&&(t=m.CENTER),p[t]}(n);return{x:Math.max(0,Math.min(t.width-e.width,r.x*t.width-e.width/2)),y:Math.max(0,Math.min(t.height-e.height,r.y*t.height-e.height/2)),width:Math.min(t.width,e.width),height:Math.min(t.height,e.height)}}function D(t){return t.alignment&&T[t.alignment]||T[m.CENTER]}function W(t){let e;return!t||"number"!=typeof t.x||isNaN(t.x)||"number"!=typeof t.y||isNaN(t.y)||(e={x:q(Math.max(0,Math.min(100,t.x))/100,2),y:q(Math.max(0,Math.min(100,t.y))/100,2)}),e}function Z(t,e){const i=t*e;return i>O[R.HIGH].size?R.HIGH:i>O[R.MEDIUM].size?R.MEDIUM:i>O[R.LOW].size?R.LOW:R.TINY}function q(t,e){const i=Math.pow(10,e||0);return(t*i/i).toFixed(e)}function V(t){return t&&t.upscaleMethod&&I[t.upscaleMethod.toUpperCase()]||I.AUTO}const J={isMobile:!1},Q=function(t){return J[t]},X=function(t,e){J[t]=e};function K(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);X("isMobile",t&&e)}}function tt(t,e){const i={css:{container:{}}},{css:n}=i,{fittingType:r}=t;switch(r){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:case g.LEGACY_STRIP_ORIGINAL_SIZE:n.container.backgroundSize="auto",n.container.backgroundRepeat="no-repeat";break;case g.SCALE_TO_FIT:case g.LEGACY_STRIP_SCALE_TO_FIT:n.container.backgroundSize="contain",n.container.backgroundRepeat="no-repeat";break;case g.STRETCH:n.container.backgroundSize="100% 100%",n.container.backgroundRepeat="no-repeat";break;case g.SCALE_TO_FILL:case g.LEGACY_STRIP_SCALE_TO_FILL:n.container.backgroundSize="cover",n.container.backgroundRepeat="no-repeat";break;case g.TILE_HORIZONTAL:case g.LEGACY_STRIP_TILE_HORIZONTAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-x";break;case g.TILE_VERTICAL:case g.LEGACY_STRIP_TILE_VERTICAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-y";break;case g.TILE:case g.LEGACY_STRIP_TILE:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat";break;case g.LEGACY_STRIP_FIT_AND_TILE:n.container.backgroundSize="contain",n.container.backgroundRepeat="repeat";break;case g.FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat";break;case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-x";break;case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-y";break;case g.LEGACY_BG_NORMAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="no-repeat"}switch(e.alignment){case m.CENTER:n.container.backgroundPosition="center center";break;case m.LEFT:n.container.backgroundPosition="left center";break;case m.RIGHT:n.container.backgroundPosition="right center";break;case m.TOP:n.container.backgroundPosition="center top";break;case m.BOTTOM:n.container.backgroundPosition="center bottom";break;case m.TOP_RIGHT:n.container.backgroundPosition="right top";break;case m.TOP_LEFT:n.container.backgroundPosition="left top";break;case m.BOTTOM_RIGHT:n.container.backgroundPosition="right bottom";break;case m.BOTTOM_LEFT:n.container.backgroundPosition="left bottom"}return i}const et={[m.CENTER]:"center",[m.TOP]:"top",[m.TOP_LEFT]:"top left",[m.TOP_RIGHT]:"top right",[m.BOTTOM]:"bottom",[m.BOTTOM_LEFT]:"bottom left",[m.BOTTOM_RIGHT]:"bottom right",[m.LEFT]:"left",[m.RIGHT]:"right"},it={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function nt(t,e){const i={css:{container:{},img:{}}},{css:n}=i,{fittingType:r}=t,o=e.alignment;switch(n.container.position="relative",r){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:t.parts&&t.parts.length?(n.img.width=t.parts[0].width,n.img.height=t.parts[0].height):(n.img.width=t.src.width,n.img.height=t.src.height);break;case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="contain",n.img.objectPosition=et[o]||"unset";break;case g.LEGACY_BG_NORMAL:n.img.width="100%",n.img.height="100%",n.img.objectFit="none",n.img.objectPosition=et[o]||"unset";break;case g.STRETCH:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="fill";break;case g.SCALE_TO_FILL:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="cover"}if("number"==typeof n.img.width&&"number"==typeof n.img.height&&(n.img.width!==e.width||n.img.height!==e.height)){const t=Math.round((e.height-n.img.height)/2),i=Math.round((e.width-n.img.width)/2);Object.assign(n.img,it,function(t,e,i){return{[m.TOP_LEFT]:{top:0,left:0},[m.TOP_RIGHT]:{top:0,right:0},[m.TOP]:{top:0,left:e},[m.BOTTOM_LEFT]:{bottom:0,left:0},[m.BOTTOM_RIGHT]:{bottom:0,right:0},[m.BOTTOM]:{bottom:0,left:e},[m.RIGHT]:{top:t,right:0},[m.LEFT]:{top:t,left:0},[m.CENTER]:{width:i.width,height:i.height,objectFit:"none"}}}(t,i,e)[o])}return i}function rt(t,e){const i={css:{container:{}},attr:{container:{},img:{}}},{css:n,attr:r}=i,{fittingType:o}=t,a=e.alignment,{width:s,height:c}=t.src;let h;switch(n.container.position="relative",o){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:case g.TILE:t.parts&&t.parts.length?(r.img.width=t.parts[0].width,r.img.height=t.parts[0].height):(r.img.width=s,r.img.height=c),r.img.preserveAspectRatio="xMidYMid slice";break;case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:r.img.width="100%",r.img.height="100%",r.img.transform="",r.img.preserveAspectRatio="";break;case g.STRETCH:r.img.width=e.width,r.img.height=e.height,r.img.x=0,r.img.y=0,r.img.transform="",r.img.preserveAspectRatio="none";break;case g.SCALE_TO_FILL:P(t.src.id)?(r.img.width=e.width,r.img.height=e.height):(h=function(t,e,i,n,r){const o=$(t,e,i,n,r);return{width:Math.round(t*o),height:Math.round(e*o)}}(s,c,e.width,e.height,f.FILL),r.img.width=h.width,r.img.height=h.height),r.img.x=0,r.img.y=0,r.img.transform="",r.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof r.img.width&&"number"==typeof r.img.height&&(r.img.width!==e.width||r.img.height!==e.height)){let t,i,n=0,s=0;o===g.TILE?(t=e.width%r.img.width,i=e.height%r.img.height):(t=e.width-r.img.width,i=e.height-r.img.height);const c=Math.round(t/2),h=Math.round(i/2);switch(a){case m.TOP_LEFT:n=0,s=0;break;case m.TOP:n=c,s=0;break;case m.TOP_RIGHT:n=t,s=0;break;case m.LEFT:n=0,s=h;break;case m.CENTER:n=c,s=h;break;case m.RIGHT:n=t,s=h;break;case m.BOTTOM_LEFT:n=0,s=i;break;case m.BOTTOM:n=c,s=i;break;case m.BOTTOM_RIGHT:n=t,s=i}r.img.x=n,r.img.y=s}return r.container.width=e.width,r.container.height=e.height,r.container.viewBox=[0,0,e.width,e.height].join(" "),i}function ot(t,e,i){let n;switch(e.crop&&(n=function(t,e){const i=Math.max(0,Math.min(t.width,e.x+e.width)-Math.max(0,e.x)),n=Math.max(0,Math.min(t.height,e.y+e.height)-Math.max(0,e.y));return i&&n&&(t.width!==i||t.height!==n)?{x:Math.max(0,e.x),y:Math.max(0,e.y),width:i,height:n}:null}(e,e.crop),n&&(t.src.width=n.width,t.src.height=n.height,t.src.isCropped=!0,t.parts.push(st(n)))),t.fittingType){case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:case g.FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:case g.LEGACY_BG_NORMAL:t.parts.push(at(t,i));break;case g.SCALE_TO_FILL:t.parts.push(function(t,e){const i=z(t.src.width,t.src.height,f.FILL,e,t.devicePixelRatio,t.upscaleMethod),n=W(t.focalPoint);return{transformType:n?f.FILL_FOCAL:f.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:D(e),focalPointX:n&&n.x,focalPointY:n&&n.y,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}(t,i));break;case g.STRETCH:t.parts.push(function(t,e){const i=$(t.src.width,t.src.height,e.width,e.height,f.FILL),n={...e};return n.width=t.src.width*i,n.height=t.src.height*i,at(t,n)}(t,i));break;case g.TILE_HORIZONTAL:case g.TILE_VERTICAL:case g.TILE:case g.LEGACY_ORIGINAL_SIZE:case g.ORIGINAL_SIZE:n=j(t.src,i,t.focalPoint,i.alignment),t.src.isCropped?(Object.assign(t.parts[0],n),t.src.width=n.width,t.src.height=n.height):t.parts.push(st(n));break;case g.LEGACY_STRIP_TILE_HORIZONTAL:case g.LEGACY_STRIP_TILE_VERTICAL:case g.LEGACY_STRIP_TILE:case g.LEGACY_STRIP_ORIGINAL_SIZE:t.parts.push(function(t){return{transformType:f.LEGACY_CROP,width:Math.round(t.width),height:Math.round(t.height),alignment:D(t),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case g.LEGACY_STRIP_SCALE_TO_FIT:case g.LEGACY_STRIP_FIT_AND_TILE:t.parts.push(function(t){return{transformType:f.FIT,width:Math.round(t.width),height:Math.round(t.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case g.LEGACY_STRIP_SCALE_TO_FILL:t.parts.push(function(t){return{transformType:f.LEGACY_FILL,width:Math.round(t.width),height:Math.round(t.height),alignment:D(t),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i))}}function at(t,e){const i=z(t.src.width,t.src.height,f.FIT,e,t.devicePixelRatio,t.upscaleMethod);return{transformType:!t.src.width||!t.src.height?f.FIT:f.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:T.center,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}function st(t){return{transformType:f.CROP,x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function ct(t,e){e=e||{},t.quality=function(t,e){const i=t.fileType===v.PNG,n=t.fileType===v.JPG,r=t.fileType===v.WEBP,o=n||i||r;if(o){const n=S(t.parts),r=(a=n.width,s=n.height,O[Z(a,s)].quality);let o=e.quality&&e.quality>=5&&e.quality<=90?e.quality:r;return o=i?o+5:o,o}var a,s;return 0}(t,e),t.progressive=function(t){return!1!==t.progressive}(e),t.watermark=function(t){return t.watermark}(e),t.autoEncode=e.autoEncode??!0,t.unsharpMask=function(t,e){var i,n,r;if(function(t){const e="number"==typeof(t=t||{}).radius&&!isNaN(t.radius)&&t.radius>=.1&&t.radius<=500,i="number"==typeof t.amount&&!isNaN(t.amount)&&t.amount>=0&&t.amount<=10,n="number"==typeof t.threshold&&!isNaN(t.threshold)&&t.threshold>=0&&t.threshold<=255;return e&&i&&n}(e.unsharpMask))return{radius:q(null==(i=e.unsharpMask)?void 0:i.radius,2),amount:q(null==(n=e.unsharpMask)?void 0:n.amount,2),threshold:q(null==(r=e.unsharpMask)?void 0:r.threshold,2)};if(("number"!=typeof(o=(o=e.unsharpMask)||{}).radius||isNaN(o.radius)||0!==o.radius||"number"!=typeof o.amount||isNaN(o.amount)||0!==o.amount||"number"!=typeof o.threshold||isNaN(o.threshold)||0!==o.threshold)&&function(t){const e=S(t.parts);return!(e.scaleFactor>=1)||e.forceUSM||e.transformType===f.FIT}(t))return L;var o;return}(t,e),t.filters=function(t){const e=t.filters||{},i={};ht(e[y.CONTRAST],-100,100)&&(i[y.CONTRAST]=e[y.CONTRAST]);ht(e[y.BRIGHTNESS],-100,100)&&(i[y.BRIGHTNESS]=e[y.BRIGHTNESS]);ht(e[y.SATURATION],-100,100)&&(i[y.SATURATION]=e[y.SATURATION]);ht(e[y.HUE],-180,180)&&(i[y.HUE]=e[y.HUE]);ht(e[y.BLUR],0,100)&&(i[y.BLUR]=e[y.BLUR]);return i}(e)}function ht(t,e,i){return"number"==typeof t&&!isNaN(t)&&0!==t&&t>=e&&t<=i}function ut(t,e,i,n){const r=function(t){return(null==t?void 0:t.isSEOBot)??!1}(n),o=Y(e.id),a=function(t,e){const i=/\.([^.]*)$/,n=new RegExp(`(${k.concat(H).join("|")})`,"g");if(e&&e.length){let t=e;const r=e.match(i);return r&&G.includes(r[1])&&(t=e.replace(i,"")),encodeURIComponent(t).replace(n,B)}const r=t.match(/\/(.*?)$/);return(r?r[1]:t).replace(i,"")}(e.id,e.name),s=r?1:function(t){return Math.min(t.pixelAspectRatio||1,c)}(i),h=U(e.id),u=h,l=P(e.id,null==n?void 0:n.hasAnimation,null==n?void 0:n.allowAnimatedTransform),d={fileName:a,fileExtension:h,fileType:o,fittingType:t,preferredExtension:u,src:{id:e.id,width:e.width,height:e.height,isCropped:!1},focalPoint:{x:e.focalPoint&&e.focalPoint.x,y:e.focalPoint&&e.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:V(n),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:l};return l&&(ot(d,e,i),ct(d,n)),d}function lt(t,e,i){const n={...i},r=Q("isMobile");switch(t){case g.LEGACY_BG_FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:case g.LEGACY_BG_NORMAL:const t=r?l:h,i=r?d:u;n.width=Math.min(t,e.width),n.height=Math.min(i,Math.round(n.width/(e.width/e.height))),n.pixelAspectRatio=1}return n}const dt=M`fit/w_${"width"},h_${"height"}`,gt=M`fill/w_${"width"},h_${"height"},al_${"alignment"}`,ft=M`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,mt=M`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,pt=M`crop/w_${"width"},h_${"height"},al_${"alignment"}`,Tt=M`fill/w_${"width"},h_${"height"},al_${"alignment"}`,_t=M`,lg_${"upscaleMethodValue"}`,It=M`,q_${"quality"}`,Et=M`,usm_${"radius"}_${"amount"}_${"threshold"}`,Lt=M`,bl`,bt=M`,wm_${"watermark"}`,At={[y.CONTRAST]:M`,con_${"contrast"}`,[y.BRIGHTNESS]:M`,br_${"brightness"}`,[y.SATURATION]:M`,sat_${"saturation"}`,[y.HUE]:M`,hue_${"hue"}`,[y.BLUR]:M`,blur_${"blur"}`},wt=M`,enc_auto`;function Ot(t,e,i,n,r){var o,a;if(void 0===n&&(n={}),P(e.id,null==(o=n)?void 0:o.hasAnimation,null==(a=n)?void 0:a.allowAnimatedTransform)){if(N(e.id)){const{alignment:o,...a}=i;e.focalPoint={x:void 0,y:void 0},null==e||delete e.crop,r=ut(t,e,a,n)}else r=r||ut(t,e,i,n);return function(t){const e=[];t.parts.forEach((t=>{switch(t.transformType){case f.CROP:e.push(mt(t));break;case f.LEGACY_CROP:e.push(pt(t));break;case f.LEGACY_FILL:let i=Tt(t);t.upscale&&(i+=_t(t)),e.push(i);break;case f.FIT:let n=dt(t);t.upscale&&(n+=_t(t)),e.push(n);break;case f.FILL:let r=gt(t);t.upscale&&(r+=_t(t)),e.push(r);break;case f.FILL_FOCAL:let o=ft(t);t.upscale&&(o+=_t(t)),e.push(o)}}));let i=e.join("/");return t.quality&&(i+=It(t)),t.unsharpMask&&(i+=Et(t.unsharpMask)),t.progressive||(i+=Lt(t)),t.watermark&&(i+=bt(t)),t.filters&&(i+=Object.keys(t.filters).map((e=>At[e](t.filters))).join("")),t.autoEncode&&t.fileType!==v.GIF&&(i+=wt(t)),`${t.src.id}/${s}/${i}/${t.fileName}.${t.preferredExtension}`}(r)}return e.id}const Rt={[m.CENTER]:"50% 50%",[m.TOP_LEFT]:"0% 0%",[m.TOP_RIGHT]:"100% 0%",[m.TOP]:"50% 0%",[m.BOTTOM_LEFT]:"0% 100%",[m.BOTTOM_RIGHT]:"100% 100%",[m.BOTTOM]:"50% 100%",[m.RIGHT]:"100% 50%",[m.LEFT]:"0% 50%"},yt=Object.entries(Rt).reduce(((t,e)=>{let[i,n]=e;return t[n]=i,t}),{}),vt=[g.TILE,g.TILE_HORIZONTAL,g.TILE_VERTICAL,g.LEGACY_BG_FIT_AND_TILE,g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,g.LEGACY_BG_FIT_AND_TILE_VERTICAL],Mt=[g.LEGACY_ORIGINAL_SIZE,g.ORIGINAL_SIZE,g.LEGACY_BG_NORMAL];function St(t,e,i){let{width:n,height:r}=i;return t===g.TILE&&e.width>n&&e.height>r}function Gt(t,e){let{width:i,height:n}=e;if(!i||!n){const e=i||Math.min(980,t.width),r=e/t.width;return{width:e,height:n||t.height*r}}return{width:i,height:n}}function xt(t,e,i,n){void 0===n&&(n="center");const r={img:{},container:{}};if(t===g.SCALE_TO_FILL){const t=e.focalPoint&&function(t){const e=`${t.x}% ${t.y}%`;return yt[e]||""}(e.focalPoint),o=t||n;e.focalPoint&&!t?r.img={objectPosition:Ct(e,i,e.focalPoint)}:r.img={objectPosition:Rt[o]}}else[g.LEGACY_ORIGINAL_SIZE,g.ORIGINAL_SIZE].includes(t)?r.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:vt.includes(t)&&(r.container={backgroundSize:`${e.width}px ${e.height}px`});return r}function Ct(t,e,i){const{width:n,height:r}=t,{width:o,height:a}=e,{x:s,y:c}=i;if(!o||!a)return`${s}% ${c}%`;const h=Math.max(o/n,a/r),u=n*h,l=r*h,d=Math.max(0,Math.min(u-o,u*(s/100)-o/2)),g=Math.max(0,Math.min(l-a,l*(c/100)-a/2));return`${d&&Math.floor(d/(u-o)*100)}% ${g&&Math.floor(g/(l-a)*100)}%`}const Pt={width:"100%",height:"100%"};function Ft(t,e,i,n){void 0===n&&(n={});const{autoEncode:r=!0,isSEOBot:o,shouldLoadHQImage:a,hasAnimation:s,allowAnimatedTransform:c}=n;if(!C(t,e,i)||function(t){return U(t)===v.GIF}(e.id)&&c)return b;const h=P(e.id,s,c);if(!h||a)return Nt(t,e,i,{...n,autoEncode:r,useSrcset:h});const u={...i,...Gt(e,i)},{alignment:l,htmlTag:d}=u,f=St(t,e,u),m=function(t,e,i,n){let{width:r,height:o}=i;if(void 0===n&&(n=!1),n)return{width:r,height:o};const a=!Mt.includes(t),s=St(t,e,{width:r,height:o}),c=!s&&vt.includes(t),h=c?e.width:r,u=c?e.height:o,l=a?function(t,e){return t>900?e?.05:.15:t>500?e?.1:.18:t>200?.25:1}(h,F(e.id)):1;return{width:s?1920:h*l,height:u*l}}(t,e,u,o),p=function(t,e,i){return i?0:vt.includes(e)?1:t>200?2:3}(u.width,t,o),T=function(t,e){const i=vt.includes(t)&&!e;return t===g.SCALE_TO_FILL||i?g.SCALE_TO_FIT:t}(t,f),_=xt(t,e,i,l),{uri:I}=Nt(T,e,{...m,alignment:l,htmlTag:d},{autoEncode:r,filters:p?{blur:p}:{},hasAnimation:s,allowAnimatedTransform:c}),{attr:E={},css:L}=Nt(t,e,{...u,alignment:l,htmlTag:d},{});return L.img=L.img||{},L.container=L.container||{},Object.assign(L.img,_.img,Pt),Object.assign(L.container,_.container),{uri:I,css:L,attr:E,transformed:!0}}function Nt(t,e,i,n){let r={};if(C(t,e,i)){const o=lt(t,e,i),a=ut(t,e,o,n);r.uri=Ot(t,e,o,n,a),null!=n&&n.useSrcset&&(r.srcset=function(t,e,i,n,r){const o=i.pixelAspectRatio||1;return{dpr:[`${1===o?r.uri:Ot(t,e,{...i,pixelAspectRatio:1},n)} 1x`,`${2===o?r.uri:Ot(t,e,{...i,pixelAspectRatio:2},n)} 2x`]}}(t,e,o,n,r)),Object.assign(r,function(t,e){let i;return i=e.htmlTag===_.BG?tt:e.htmlTag===_.SVG?rt:nt,i(t,e)}(a,o),{transformed:a.transformed})}else r=b;return r}function kt(t,e,i,n){if(C(t,e,i)){const r=lt(t,e,i);return{uri:Ot(t,e,r,n||{},ut(t,e,r,n))}}return{uri:""}}const Ht="https://static.wixstatic.com/media/",Bt=/^media\//i,Yt="undefined"!=typeof window?window.devicePixelRatio:1,Ut=(t,e)=>{const i=e&&e.baseHostURL;return i?`${i}${t}`:(t=>Bt.test(t)?`https://static.wixstatic.com/${t}`:`${Ht}${t}`)(t)};K(),K();const $t={getScaleToFitImageURL:function(t,e,i,n,r,o){const a=kt(g.SCALE_TO_FIT,{id:t,width:e,height:i,name:o&&o.name},{width:n,height:r,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==o?void 0:o.devicePixelRatio)??Yt},o);return Ut(a.uri,o)},getScaleToFillImageURL:function(t,e,i,n,r,o){const a=kt(g.SCALE_TO_FILL,{id:t,width:e,height:i,name:o&&o.name,focalPoint:{x:o&&o.focalPoint&&o.focalPoint.x,y:o&&o.focalPoint&&o.focalPoint.y}},{width:n,height:r,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==o?void 0:o.devicePixelRatio)??Yt},o);return Ut(a.uri,o)},getCropImageURL:function(t,e,i,n,r,o,a,s,c,h){const u=kt(g.SCALE_TO_FILL,{id:t,width:e,height:i,name:h&&h.name,crop:{x:n,y:r,width:o,height:a}},{width:s,height:c,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==h?void 0:h.devicePixelRatio)??Yt},h);return Ut(u.uri,h)}},zt=Ht,{STATIC_MEDIA_URL:jt}=t,Dt=t=>{let{fittingType:e,src:i,target:n,options:r}=t;const o=Ft(e,i,n,{...r,autoEncode:!0});return null!=o&&o.uri&&!/^[a-z]+:/.test(o.uri)&&(o.uri=`${jt}${o.uri}`),o},Wt=/^[a-z]+:/,Zt=t=>{var e,n;const{id:r,containerId:s,uri:c,alt:h,name:u="",role:l,width:d,height:g,displayMode:f,devicePixelRatio:m,quality:p,alignType:T,bgEffectName:_="",focalPoint:I,upscaleMethod:E,className:L="",crop:b,imageStyles:A={},targetWidth:w,targetHeight:O,targetScale:R,onLoad:y=()=>{},onError:v=()=>{},shouldUseLQIP:M,containerWidth:S,containerHeight:G,getPlaceholder:x,isInFirstFold:C,placeholderTransition:P,socialAttrs:F,isSEOBot:N,skipMeasure:k,hasAnimation:H,allowAnimatedTransform:B}=t,Y=o.useRef(null);let U="";const $="blur"===P,z=o.useRef(null);if(!z.current)if(x||M||C||N){const t={upscaleMethod:E,...p||{},shouldLoadHQImage:C,isSEOBot:N,hasAnimation:H,allowAnimatedTransform:B};z.current=(x||Dt)({fittingType:f,src:{id:c,width:d,height:g,crop:b,name:u,focalPoint:I},target:{width:S,height:G,alignment:T,htmlTag:"img"},options:t}),U=!z.current.transformed||C||N?"":"true"}else z.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const j=!N&&(x||M)&&!C&&z.current.transformed,D=o.useMemo((()=>JSON.stringify({containerId:s,...s&&{containerId:s},...T&&{alignType:T},...k&&{skipMeasure:!0},displayMode:f,...S&&{targetWidth:S},...G&&{targetHeight:G},...w&&{targetWidth:w},...O&&{targetHeight:O},...R&&{targetScale:R},isLQIP:j,isSEOBot:N,lqipTransition:P,imageData:{width:d,height:g,uri:c,name:u,displayMode:f,hasAnimation:H,...p&&{quality:p},...m&&{devicePixelRatio:m},...I&&{focalPoint:I},...b&&{crop:b},...E&&{upscaleMethod:E}}})),[s,T,k,f,G,S,w,O,R,j,N,P,d,g,c,u,p,m,I,b,E,H]),W=z.current,Z=null==W?void 0:W.uri,q=null==W?void 0:W.srcset,V=null==(e=W.css)?void 0:e.img,J=`${a} ${L}`;o.useEffect((()=>{const t=Y.current;y&&null!=t&&t.currentSrc&&null!=t&&t.complete&&y({target:t})}),[]);const Q=!W||null!=W&&W.transformed?w?`${w}px`:null:`max(${d}px, 100%)`;return o.createElement("wow-image",{id:r,class:J,"data-image-info":D,"data-motion-part":"BG_IMG","data-bg-effect-name":_,"data-has-ssr-src":U,"data-animate-blur":!N&&j&&$?"":void 0,style:Q?{"--wix-img-max-width":Q}:{}},o.createElement("img",i()({src:Z,ref:Y,alt:h||"",role:l,style:{...V,...A},onLoad:y,onError:v,width:S||void 0,height:G||void 0},F,{srcSet:C?null==q||null==(n=q.dpr)?void 0:n.map((t=>Wt.test(t)?t:`${jt}${t}`)).join(", "):void 0,fetchpriority:C?"high":void 0,loading:!1===C?"lazy":void 0,suppressHydrationWarning:!0})))};var qt=n(99),Vt=n.n(qt);const Jt={columnCount:1,columns:1,fontWeight:1,lineHeight:1,opacity:1,zIndex:1,zoom:1},Qt=(t,e)=>(Array.isArray(e)?e:[e]).reduce(((e,i)=>{const n=t[i];return void 0!==n?Object.assign(e,{[i]:n}):e}),{}),Xt=(t,e)=>t&&e&&Object.keys(e).forEach((i=>{const n=i,r=e[n];void 0!==r?t.style[n]=((t,e)=>"number"!=typeof e||Jt[t]?e.toString():`${e}px`)(n,r):t.style.removeProperty(n)})),Kt=(t,e,i)=>{if(!t.targetWidth||!t.targetHeight||!t.imageData.uri)return{uri:"",css:{},transformed:!1};const{imageData:n}=t,r=t.displayMode||g.SCALE_TO_FILL,o=Object.assign(Qt(n,["upscaleMethod"]),Qt(t,"filters"),t.quality||n.quality,{hasAnimation:(null==t?void 0:t.hasAnimation)||(null==n?void 0:n.hasAnimation)}),a=t.imageData.devicePixelRatio||e.devicePixelRatio,s=ee(a),c=Nt(r,Object.assign(Qt(n,["width","height","crop","name","focalPoint"]),{id:n.uri}),{width:t.targetWidth,height:t.targetHeight,htmlTag:i||"img",pixelAspectRatio:s,alignment:t.alignType||m.CENTER},o);return c.uri=te(c.uri,e.staticMediaUrl,e.mediaRootUrl),c},te=(t,e,i)=>{if(/(^https?)|(^data)|(^blob)|(^\/\/)/.test(t))return t;let n=`${e}/`;var r;t&&(/^micons\//.test(t)?n=i:"ico"===(null==(r=/[^.]+$/.exec(t))?void 0:r[0])&&(n=n.replace("media","ficons")));return n+t},ee=t=>{const e=window.location.search.split("&").map((t=>t.split("="))).find((t=>t[0].toLowerCase().includes("devicepixelratio")));return(e?Number(e[1]):null)||t||1},ie=t=>t.getAttribute("src"),ne=80;const re={measure:function(t,e,i,n,r){let{containerElm:o,bgEffect:a="none",sourceSets:s}=n;const c=i.image,h=i[t],u=(null==r.getScreenHeightOverride?void 0:r.getScreenHeightOverride())||document.documentElement.clientHeight||window.innerHeight||0,l=null==o?void 0:o.dataset.mediaHeightOverrideType,d=a&&"none"!==a||s&&s.some((t=>t.scrollEffect)),g=o&&d?o:h,f=window.getComputedStyle(h).getPropertyValue("--bg-scrub-effect"),{width:m,height:p}=(null==r.getMediaDimensionsByEffect?void 0:r.getMediaDimensionsByEffect(f||a,g.offsetWidth,g.offsetHeight,u))||{width:h.offsetWidth,height:h.offsetHeight};if(s&&(e.sourceSetsTargetHeights=function(t,e,i,n,r){const o={};return t.forEach((t=>{let{mediaQuery:a,scrollEffect:s}=t;o[a]=r.getMediaDimensionsByEffect(s,e,i,n).height})),o}(s,g.offsetWidth,g.offsetHeight,u,r)),!c)return;const T=ie(c);f&&(e.top=.5*(h.offsetHeight-p),e.left=.5*(h.offsetWidth-m)),e.width=m,e.height=function(t,e){return"fixed"===e||"viewport"===e?document.documentElement.clientHeight+ne:t}(p,l),e.screenHeight=u,e.imgSrc=T,e.boundingRect=h.getBoundingClientRect(),e.mediaHeightOverrideType=l,e.srcset=c.srcset},patch:function(t,e,i,n,r,o,a,s,c){var h;if(!Object.keys(e).length)return;const{imageData:u}=n,l=i[t],d=i.image;c&&(u.devicePixelRatio=1);const g=n.targetScale||1,f={...n,...!n.skipMeasure&&{targetWidth:(e.width||0)*g,targetHeight:(e.height||0)*g},displayMode:u.displayMode},m=null==r.isExperimentOpen?void 0:r.isExperimentOpen("specs.thunderbolt.allowAnimatedImageTransform"),p=Kt(f,o,"img"),T=(null==p||null==(h=p.css)?void 0:h.img)||{},_=function(t,e,i,n,r){const o=function(t,e){return void 0===e&&(e=1),1!==e?{...t,width:"100%",height:"100%"}:t}(e,n);if(r&&(delete o.height,o.width="100%"),!t)return o;const a={...o};return"fill"===i?(a.position="absolute",a.top="0"):"fit"===i&&(a.height="100%"),"fixed"===t&&(a["will-change"]="transform"),a.objectPosition&&(a.objectPosition=e.objectPosition.replace(/(center|bottom)$/,"top")),a}(e.mediaHeightOverrideType,T,u.displayMode,g,s);Xt(d,_),(e.top||e.left)&&Xt(l,{top:`${e.top}px`,left:`${e.left}px`});const I=(null==p?void 0:p.uri)||"",E=(null==u?void 0:u.hasAnimation)||(null==n?void 0:n.hasAnimation),L=function(t,e,i){const{sourceSets:n}=e;if(!n||!n.length)return;const r={};return n.forEach((n=>{let{mediaQuery:o,crop:a,focalPoint:s}=n;const c={...e,targetHeight:(t.sourceSetsTargetHeights||{})[o]||0,imageData:{...e.imageData,crop:a,focalPoint:s}},h=Kt(c,i,"img");r[o]=h.uri||""})),r}(e,f,o);if(l.setAttribute("data-has-ssr-src",""),n.isLQIP&&n.lqipTransition&&!("transitioned"in l.dataset)&&(l.dataset.transitioned="",d.complete?d.onload=function(){d.dataset.loadDone=""}:d.onload=function(){d.complete?d.dataset.loadDone="":d.onload=function(){d.dataset.loadDone=""}}),a){((t,e)=>U(t)===v.GIF||U(t)===v.WEBP&&e)(u.uri,E)&&m?(d.setAttribute("fetchpriority","low"),d.setAttribute("loading","lazy"),d.setAttribute("decoding","async")):d.setAttribute("fetchpriority","high"),d.currentSrc!==I&&d.setAttribute("src",I);e.srcset&&!e.srcset.split(", ").some((t=>t.split(" ")[0]===I))&&d.setAttribute("srcset",I),i.picture&&f.sourceSets&&Array.from(i.picture.querySelectorAll("source")).forEach((t=>{const e=t.media||"",i=L?L[e]:"";t.srcset!==i&&t.setAttribute("srcset",i)}))}}},oe={parallax:"ImageParallax",fixed:"ImageReveal"};const ae=function(t,e,i){return class extends i.HTMLElement{constructor(){super(),Vt()(this,"childListObserver",void 0),Vt()(this,"timeoutId",void 0),this.childListObserver=null,this.timeoutId=null}attributeChangedCallback(t,e){e&&this.reLayout()}connectedCallback(){e.disableImagesLazyLoading?this.reLayout():this.observeIntersect()}disconnectedCallback(){this.unobserveResize(),this.unobserveIntersect(),this.unobserveChildren()}static get observedAttributes(){return["data-image-info"]}reLayout(){const n={},r={},o=this.getAttribute("id"),a=JSON.parse(this.dataset.imageInfo||""),s="true"===this.dataset.isResponsive,{bgEffectName:c}=this.dataset,{scrollEffect:h}=a.imageData,{sourceSets:u}=a,l=c||h&&oe[h];u&&u.length&&u.forEach((t=>{t.scrollEffect&&(t.scrollEffect=oe[t.scrollEffect])})),n[o]=this,a.containerId&&(n[a.containerId]=i.document.getElementById(`${a.containerId}`));const d=a.containerId?n[a.containerId]:void 0;if(n.image=this.querySelector("img"),n.picture=this.querySelector("picture"),!n.image){const t=this;return void this.observeChildren(t)}this.unobserveChildren(),this.observeChildren(this),t.mutationService.measure((()=>{re.measure(o,r,n,{containerElm:d,bgEffect:l,sourceSets:u},t)}));const g=i=>{t.mutationService.mutate((()=>{re.patch(o,r,n,a,t,e,i,s,l)}))};!ie(n.image)||this.dataset.hasSsrSrc?g(!0):this.debounceImageLoad(g)}debounceImageLoad(t){clearTimeout(this.timeoutId),this.timeoutId=i.setTimeout((()=>{t(!0)}),250),t(!1)}observeResize(){var e;null==(e=t.resizeService)||e.observe(this)}unobserveResize(){var e;null==(e=t.resizeService)||e.unobserve(this)}observeIntersect(){var e;null==(e=t.intersectionService)||e.observe(this)}unobserveIntersect(){var e;null==(e=t.intersectionService)||e.unobserve(this)}observeChildren(t){this.childListObserver||(this.childListObserver=new i.MutationObserver((()=>{this.reLayout()}))),this.childListObserver.observe(t,{childList:!0})}unobserveChildren(){this.childListObserver&&(this.childListObserver.disconnect(),this.childListObserver=null)}}};var se=n(709),ce=n.n(se);const he=()=>/iemobile/i.test(navigator.userAgent)?Math.round(window.screen.availWidth/(window.screen.width||window.document.documentElement.clientWidth)):window.devicePixelRatio,ue="https://static.wixstatic.com/media",le="https://static.wixstatic.com";function de(t,e,i){if(void 0===t&&(t={}),void 0===e&&(e=null),void 0===i&&(i={}),"undefined"==typeof window)return;const n={staticMediaUrl:ue,mediaRootUrl:le,experiments:{},devicePixelRatio:he(),...i},r=function(t,e){const i="wow-image";if(void 0===(t=t||window).customElements.get(i)){let n,r;return t.ResizeObserver&&(n=new t.ResizeObserver((t=>t.map((t=>t.target.reLayout()))))),t.IntersectionObserver&&(r=new IntersectionObserver((t=>t.map((t=>{if(t.isIntersecting){const e=t.target;e.unobserveIntersect(),e.observeResize()}return t}))),{rootMargin:"150% 100%"})),function(o){const a=ae({resizeService:n,intersectionService:r,mutationService:ce(),...e},o,t);t.customElements.define(i,a)}}}(e,t);r&&r(n)}})(),r})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define("image",["React"],e):"object"==typeof exports?exports.image=e(require("React")):t.image=e(t.React)}("undefined"!=typeof self?self:this,(t=>(()=>{var e={709:function(t,e,i){var n;!function(e){"use strict";var r=function(){},o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function a(){var t=this;t.reads=[],t.writes=[],t.raf=o.bind(e),r("initialized",t)}function s(t){t.scheduled||(t.scheduled=!0,t.raf(c.bind(null,t)),r("flush scheduled"))}function c(t){r("flush");var e,i=t.writes,n=t.reads;try{r("flushing reads",n.length),t.runTasks(n),r("flushing writes",i.length),t.runTasks(i)}catch(t){e=t}if(t.scheduled=!1,(n.length||i.length)&&s(t),e){if(r("task errored",e.message),!t.catch)throw e;t.catch(e)}}function u(t,e){var i=t.indexOf(e);return!!~i&&!!t.splice(i,1)}a.prototype={constructor:a,runTasks:function(t){var e;for(r("run tasks");e=t.shift();)e()},measure:function(t,e){r("measure");var i=e?t.bind(e):t;return this.reads.push(i),s(this),i},mutate:function(t,e){r("mutate");var i=e?t.bind(e):t;return this.writes.push(i),s(this),i},clear:function(t){return r("clear",t),u(this.reads,t)||u(this.writes,t)},extend:function(t){if(r("extend",t),"object"!=typeof t)throw new Error("expected object");var e=Object.create(this);return function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}(e,t),e.fastdom=this,e.initialize&&e.initialize(),e},catch:null};var h=e.fastdom=e.fastdom||new a;void 0===(n=function(){return h}.call(h,i,h,t))||(t.exports=n)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},883:e=>{"use strict";e.exports=t},99:(t,e,i)=>{var n=i(602);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},448:t=>{function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},751:(t,e,i)=>{var n=i(284).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},602:(t,e,i)=>{var n=i(284).default,r=i(751);t.exports=function(t){var e=r(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},284:t=>{function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Image:()=>Zt,imageKit:()=>t,initCustomElement:()=>de});var t={};n.r(t),n.d(t,{STATIC_MEDIA_URL:()=>zt,alignTypes:()=>m,fileType:()=>y,fittingTypes:()=>g,getData:()=>Nt,getFileExtension:()=>U,getPlaceholder:()=>Ft,htmlTag:()=>_,isWEBP:()=>N,populateGlobalFeatureSupport:()=>K,sdk:()=>$t,upscaleMethods:()=>I});var e=n(448),i=n.n(e),o=n(883);const a="DpEFnE",s="v1",c=2,u=1920,h=1920,l=1e3,d=1e3,g={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},f={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},m={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},p={[m.CENTER]:{x:.5,y:.5},[m.TOP_LEFT]:{x:0,y:0},[m.TOP_RIGHT]:{x:1,y:0},[m.TOP]:{x:.5,y:0},[m.BOTTOM_LEFT]:{x:0,y:1},[m.BOTTOM_RIGHT]:{x:1,y:1},[m.BOTTOM]:{x:.5,y:1},[m.RIGHT]:{x:1,y:.5},[m.LEFT]:{x:0,y:.5}},T={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},_={BG:"bg",IMG:"img",SVG:"svg"},I={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},E={classic:1,super:2},L={radius:"0.66",amount:"1.00",threshold:"0.01"},b={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},A=25e6,w=[1.5,2,4],O={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},R={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},v={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},y={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",UNRECOGNIZED:"unrecognized"};y.JPG,y.JPEG,y.JPE,y.PNG,y.GIF,y.WEBP;function M(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[n.length-1]||{},a=[t[0]];return i.forEach((function(e,i){const r=Number.isInteger(e)?n[e]:o[e];a.push(r,t[i+1])})),a.join("")}}function S(t){return t[t.length-1]}const G=[y.PNG,y.JPEG,y.JPG,y.JPE,y.WIX_ICO_MP,y.WIX_MP,y.WEBP],x=[y.JPEG,y.JPG,y.JPE];function C(t,e,i){return i&&e&&!(!(n=e.id)||!n.trim()||"none"===n.toLowerCase())&&Object.values(g).includes(t);var n}function P(t,e,i){return function(t,e,i){return void 0===i&&(i=!1),!(N(t)&&e&&!i)}(t,e,i)&&function(t){return G.includes(U(t))}(t)&&!/(^https?)|(^data)|(^\/\/)/.test(t)}function F(t){return U(t)===y.PNG}function N(t){return U(t)===y.WEBP}const k=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),H=["\\.","\\*"],B="_";function Y(t){return function(t){return x.includes(U(t))}(t)?y.JPG:F(t)?y.PNG:N(t)?y.WEBP:y.UNRECOGNIZED}function U(t){return(/[.]([^.]+)$/.exec(t)&&/[.]([^.]+)$/.exec(t)[1]||"").toLowerCase()}function $(t,e,i,n,r){let o;return o=r===f.FILL?function(t,e,i,n){return Math.max(i/t,n/e)}(t,e,i,n):r===f.FIT?function(t,e,i,n){return Math.min(i/t,n/e)}(t,e,i,n):1,o}function z(t,e,i,n,r,o){t=t||n.width,e=e||n.height;const{scaleFactor:a,width:s,height:c}=function(t,e,i,n,r){let o,a=i,s=n;if(o=$(t,e,i,n,r),r===f.FIT&&(a=t*o,s=e*o),a&&s&&a*s>A){const i=Math.sqrt(A/(a*s));a*=i,s*=i,o=$(t,e,a,s,r)}return{scaleFactor:o,width:a,height:s}}(t,e,n.width*r,n.height*r,i);return function(t,e,i,n,r,o,a){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:u}=function(t,e,i,n){if("auto"===n)return function(t,e){const i=Z(t,e);return{optimizedScaleFactor:O[i].maxUpscale,upscaleMethodValue:E.classic,forceUSM:!1}}(t,e);if("super"===n)return function(t){return{optimizedScaleFactor:S(w),upscaleMethodValue:E.super,forceUSM:!(w.includes(t)||t>S(w))}}(i);return function(t,e){const i=Z(t,e);return{optimizedScaleFactor:O[i].maxUpscale,upscaleMethodValue:E.classic,forceUSM:!1}}(t,e)}(t,e,o,r);let h=i,l=n;if(o<=s)return{width:h,height:l,scaleFactor:o,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!1};switch(a){case f.FILL:h=i*(s/o),l=n*(s/o);break;case f.FIT:h=t*s,l=e*s}return{width:h,height:l,scaleFactor:s,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!0}}(t,e,s,c,o,a,i)}function j(t,e,i,n){const r=W(i)||function(t){return void 0===t&&(t=m.CENTER),p[t]}(n);return{x:Math.max(0,Math.min(t.width-e.width,r.x*t.width-e.width/2)),y:Math.max(0,Math.min(t.height-e.height,r.y*t.height-e.height/2)),width:Math.min(t.width,e.width),height:Math.min(t.height,e.height)}}function D(t){return t.alignment&&T[t.alignment]||T[m.CENTER]}function W(t){let e;return!t||"number"!=typeof t.x||isNaN(t.x)||"number"!=typeof t.y||isNaN(t.y)||(e={x:q(Math.max(0,Math.min(100,t.x))/100,2),y:q(Math.max(0,Math.min(100,t.y))/100,2)}),e}function Z(t,e){const i=t*e;return i>O[R.HIGH].size?R.HIGH:i>O[R.MEDIUM].size?R.MEDIUM:i>O[R.LOW].size?R.LOW:R.TINY}function q(t,e){const i=Math.pow(10,e||0);return(t*i/i).toFixed(e)}function V(t){return t&&t.upscaleMethod&&I[t.upscaleMethod.toUpperCase()]||I.AUTO}const J={isMobile:!1},Q=function(t){return J[t]},X=function(t,e){J[t]=e};function K(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);X("isMobile",t&&e)}}function tt(t,e){const i={css:{container:{}}},{css:n}=i,{fittingType:r}=t;switch(r){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:case g.LEGACY_STRIP_ORIGINAL_SIZE:n.container.backgroundSize="auto",n.container.backgroundRepeat="no-repeat";break;case g.SCALE_TO_FIT:case g.LEGACY_STRIP_SCALE_TO_FIT:n.container.backgroundSize="contain",n.container.backgroundRepeat="no-repeat";break;case g.STRETCH:n.container.backgroundSize="100% 100%",n.container.backgroundRepeat="no-repeat";break;case g.SCALE_TO_FILL:case g.LEGACY_STRIP_SCALE_TO_FILL:n.container.backgroundSize="cover",n.container.backgroundRepeat="no-repeat";break;case g.TILE_HORIZONTAL:case g.LEGACY_STRIP_TILE_HORIZONTAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-x";break;case g.TILE_VERTICAL:case g.LEGACY_STRIP_TILE_VERTICAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-y";break;case g.TILE:case g.LEGACY_STRIP_TILE:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat";break;case g.LEGACY_STRIP_FIT_AND_TILE:n.container.backgroundSize="contain",n.container.backgroundRepeat="repeat";break;case g.FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat";break;case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-x";break;case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="repeat-y";break;case g.LEGACY_BG_NORMAL:n.container.backgroundSize="auto",n.container.backgroundRepeat="no-repeat"}switch(e.alignment){case m.CENTER:n.container.backgroundPosition="center center";break;case m.LEFT:n.container.backgroundPosition="left center";break;case m.RIGHT:n.container.backgroundPosition="right center";break;case m.TOP:n.container.backgroundPosition="center top";break;case m.BOTTOM:n.container.backgroundPosition="center bottom";break;case m.TOP_RIGHT:n.container.backgroundPosition="right top";break;case m.TOP_LEFT:n.container.backgroundPosition="left top";break;case m.BOTTOM_RIGHT:n.container.backgroundPosition="right bottom";break;case m.BOTTOM_LEFT:n.container.backgroundPosition="left bottom"}return i}const et={[m.CENTER]:"center",[m.TOP]:"top",[m.TOP_LEFT]:"top left",[m.TOP_RIGHT]:"top right",[m.BOTTOM]:"bottom",[m.BOTTOM_LEFT]:"bottom left",[m.BOTTOM_RIGHT]:"bottom right",[m.LEFT]:"left",[m.RIGHT]:"right"},it={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function nt(t,e){const i={css:{container:{},img:{}}},{css:n}=i,{fittingType:r}=t,o=e.alignment;switch(n.container.position="relative",r){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:t.parts&&t.parts.length?(n.img.width=t.parts[0].width,n.img.height=t.parts[0].height):(n.img.width=t.src.width,n.img.height=t.src.height);break;case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="contain",n.img.objectPosition=et[o]||"unset";break;case g.LEGACY_BG_NORMAL:n.img.width="100%",n.img.height="100%",n.img.objectFit="none",n.img.objectPosition=et[o]||"unset";break;case g.STRETCH:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="fill";break;case g.SCALE_TO_FILL:n.img.width=e.width,n.img.height=e.height,n.img.objectFit="cover"}if("number"==typeof n.img.width&&"number"==typeof n.img.height&&(n.img.width!==e.width||n.img.height!==e.height)){const t=Math.round((e.height-n.img.height)/2),i=Math.round((e.width-n.img.width)/2);Object.assign(n.img,it,function(t,e,i){return{[m.TOP_LEFT]:{top:0,left:0},[m.TOP_RIGHT]:{top:0,right:0},[m.TOP]:{top:0,left:e},[m.BOTTOM_LEFT]:{bottom:0,left:0},[m.BOTTOM_RIGHT]:{bottom:0,right:0},[m.BOTTOM]:{bottom:0,left:e},[m.RIGHT]:{top:t,right:0},[m.LEFT]:{top:t,left:0},[m.CENTER]:{width:i.width,height:i.height,objectFit:"none"}}}(t,i,e)[o])}return i}function rt(t,e){const i={css:{container:{}},attr:{container:{},img:{}}},{css:n,attr:r}=i,{fittingType:o}=t,a=e.alignment,{width:s,height:c}=t.src;let u;switch(n.container.position="relative",o){case g.ORIGINAL_SIZE:case g.LEGACY_ORIGINAL_SIZE:case g.TILE:t.parts&&t.parts.length?(r.img.width=t.parts[0].width,r.img.height=t.parts[0].height):(r.img.width=s,r.img.height=c),r.img.preserveAspectRatio="xMidYMid slice";break;case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:r.img.width="100%",r.img.height="100%",r.img.transform="",r.img.preserveAspectRatio="";break;case g.STRETCH:r.img.width=e.width,r.img.height=e.height,r.img.x=0,r.img.y=0,r.img.transform="",r.img.preserveAspectRatio="none";break;case g.SCALE_TO_FILL:P(t.src.id)?(r.img.width=e.width,r.img.height=e.height):(u=function(t,e,i,n,r){const o=$(t,e,i,n,r);return{width:Math.round(t*o),height:Math.round(e*o)}}(s,c,e.width,e.height,f.FILL),r.img.width=u.width,r.img.height=u.height),r.img.x=0,r.img.y=0,r.img.transform="",r.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof r.img.width&&"number"==typeof r.img.height&&(r.img.width!==e.width||r.img.height!==e.height)){let t,i,n=0,s=0;o===g.TILE?(t=e.width%r.img.width,i=e.height%r.img.height):(t=e.width-r.img.width,i=e.height-r.img.height);const c=Math.round(t/2),u=Math.round(i/2);switch(a){case m.TOP_LEFT:n=0,s=0;break;case m.TOP:n=c,s=0;break;case m.TOP_RIGHT:n=t,s=0;break;case m.LEFT:n=0,s=u;break;case m.CENTER:n=c,s=u;break;case m.RIGHT:n=t,s=u;break;case m.BOTTOM_LEFT:n=0,s=i;break;case m.BOTTOM:n=c,s=i;break;case m.BOTTOM_RIGHT:n=t,s=i}r.img.x=n,r.img.y=s}return r.container.width=e.width,r.container.height=e.height,r.container.viewBox=[0,0,e.width,e.height].join(" "),i}function ot(t,e,i){let n;switch(e.crop&&(n=function(t,e){const i=Math.max(0,Math.min(t.width,e.x+e.width)-Math.max(0,e.x)),n=Math.max(0,Math.min(t.height,e.y+e.height)-Math.max(0,e.y));return i&&n&&(t.width!==i||t.height!==n)?{x:Math.max(0,e.x),y:Math.max(0,e.y),width:i,height:n}:null}(e,e.crop),n&&(t.src.width=n.width,t.src.height=n.height,t.src.isCropped=!0,t.parts.push(st(n)))),t.fittingType){case g.SCALE_TO_FIT:case g.LEGACY_FIT_WIDTH:case g.LEGACY_FIT_HEIGHT:case g.LEGACY_FULL:case g.FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:case g.LEGACY_BG_NORMAL:t.parts.push(at(t,i));break;case g.SCALE_TO_FILL:t.parts.push(function(t,e){const i=z(t.src.width,t.src.height,f.FILL,e,t.devicePixelRatio,t.upscaleMethod),n=W(t.focalPoint);return{transformType:n?f.FILL_FOCAL:f.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:D(e),focalPointX:n&&n.x,focalPointY:n&&n.y,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}(t,i));break;case g.STRETCH:t.parts.push(function(t,e){const i=$(t.src.width,t.src.height,e.width,e.height,f.FILL),n={...e};return n.width=t.src.width*i,n.height=t.src.height*i,at(t,n)}(t,i));break;case g.TILE_HORIZONTAL:case g.TILE_VERTICAL:case g.TILE:case g.LEGACY_ORIGINAL_SIZE:case g.ORIGINAL_SIZE:n=j(t.src,i,t.focalPoint,i.alignment),t.src.isCropped?(Object.assign(t.parts[0],n),t.src.width=n.width,t.src.height=n.height):t.parts.push(st(n));break;case g.LEGACY_STRIP_TILE_HORIZONTAL:case g.LEGACY_STRIP_TILE_VERTICAL:case g.LEGACY_STRIP_TILE:case g.LEGACY_STRIP_ORIGINAL_SIZE:t.parts.push(function(t){return{transformType:f.LEGACY_CROP,width:Math.round(t.width),height:Math.round(t.height),alignment:D(t),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case g.LEGACY_STRIP_SCALE_TO_FIT:case g.LEGACY_STRIP_FIT_AND_TILE:t.parts.push(function(t){return{transformType:f.FIT,width:Math.round(t.width),height:Math.round(t.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case g.LEGACY_STRIP_SCALE_TO_FILL:t.parts.push(function(t){return{transformType:f.LEGACY_FILL,width:Math.round(t.width),height:Math.round(t.height),alignment:D(t),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i))}}function at(t,e){const i=z(t.src.width,t.src.height,f.FIT,e,t.devicePixelRatio,t.upscaleMethod);return{transformType:!t.src.width||!t.src.height?f.FIT:f.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:T.center,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}function st(t){return{transformType:f.CROP,x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function ct(t,e){e=e||{},t.quality=function(t,e){const i=t.fileType===y.PNG,n=t.fileType===y.JPG,r=t.fileType===y.WEBP,o=n||i||r;if(o){const n=S(t.parts),r=(a=n.width,s=n.height,O[Z(a,s)].quality);let o=e.quality&&e.quality>=5&&e.quality<=90?e.quality:r;return o=i?o+5:o,o}var a,s;return 0}(t,e),t.progressive=function(t){return!1!==t.progressive}(e),t.watermark=function(t){return t.watermark}(e),t.autoEncode=e.autoEncode??!0,t.unsharpMask=function(t,e){var i,n,r;if(function(t){const e="number"==typeof(t=t||{}).radius&&!isNaN(t.radius)&&t.radius>=.1&&t.radius<=500,i="number"==typeof t.amount&&!isNaN(t.amount)&&t.amount>=0&&t.amount<=10,n="number"==typeof t.threshold&&!isNaN(t.threshold)&&t.threshold>=0&&t.threshold<=255;return e&&i&&n}(e.unsharpMask))return{radius:q(null==(i=e.unsharpMask)?void 0:i.radius,2),amount:q(null==(n=e.unsharpMask)?void 0:n.amount,2),threshold:q(null==(r=e.unsharpMask)?void 0:r.threshold,2)};if(("number"!=typeof(o=(o=e.unsharpMask)||{}).radius||isNaN(o.radius)||0!==o.radius||"number"!=typeof o.amount||isNaN(o.amount)||0!==o.amount||"number"!=typeof o.threshold||isNaN(o.threshold)||0!==o.threshold)&&function(t){const e=S(t.parts);return!(e.scaleFactor>=1)||e.forceUSM||e.transformType===f.FIT}(t))return L;var o;return}(t,e),t.filters=function(t){const e=t.filters||{},i={};ut(e[v.CONTRAST],-100,100)&&(i[v.CONTRAST]=e[v.CONTRAST]);ut(e[v.BRIGHTNESS],-100,100)&&(i[v.BRIGHTNESS]=e[v.BRIGHTNESS]);ut(e[v.SATURATION],-100,100)&&(i[v.SATURATION]=e[v.SATURATION]);ut(e[v.HUE],-180,180)&&(i[v.HUE]=e[v.HUE]);ut(e[v.BLUR],0,100)&&(i[v.BLUR]=e[v.BLUR]);return i}(e)}function ut(t,e,i){return"number"==typeof t&&!isNaN(t)&&0!==t&&t>=e&&t<=i}function ht(t,e,i,n){const r=function(t){return(null==t?void 0:t.isSEOBot)??!1}(n),o=Y(e.id),a=function(t,e){const i=/\.([^.]*)$/,n=new RegExp(`(${k.concat(H).join("|")})`,"g");if(e&&e.length){let t=e;const r=e.match(i);return r&&G.includes(r[1])&&(t=e.replace(i,"")),encodeURIComponent(t).replace(n,B)}const r=t.match(/\/(.*?)$/);return(r?r[1]:t).replace(i,"")}(e.id,e.name),s=r?1:function(t){return Math.min(t.pixelAspectRatio||1,c)}(i),u=U(e.id),h=u,l=P(e.id,null==n?void 0:n.hasAnimation,null==n?void 0:n.allowAnimatedTransform),d={fileName:a,fileExtension:u,fileType:o,fittingType:t,preferredExtension:h,src:{id:e.id,width:e.width,height:e.height,isCropped:!1},focalPoint:{x:e.focalPoint&&e.focalPoint.x,y:e.focalPoint&&e.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:V(n),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:l};return l&&(ot(d,e,i),ct(d,n)),d}function lt(t,e,i){const n={...i},r=Q("isMobile");switch(t){case g.LEGACY_BG_FIT_AND_TILE:case g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case g.LEGACY_BG_FIT_AND_TILE_VERTICAL:case g.LEGACY_BG_NORMAL:const t=r?l:u,i=r?d:h;n.width=Math.min(t,e.width),n.height=Math.min(i,Math.round(n.width/(e.width/e.height))),n.pixelAspectRatio=1}return n}const dt=M`fit/w_${"width"},h_${"height"}`,gt=M`fill/w_${"width"},h_${"height"},al_${"alignment"}`,ft=M`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,mt=M`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,pt=M`crop/w_${"width"},h_${"height"},al_${"alignment"}`,Tt=M`fill/w_${"width"},h_${"height"},al_${"alignment"}`,_t=M`,lg_${"upscaleMethodValue"}`,It=M`,q_${"quality"}`,Et=M`,usm_${"radius"}_${"amount"}_${"threshold"}`,Lt=M`,bl`,bt=M`,wm_${"watermark"}`,At={[v.CONTRAST]:M`,con_${"contrast"}`,[v.BRIGHTNESS]:M`,br_${"brightness"}`,[v.SATURATION]:M`,sat_${"saturation"}`,[v.HUE]:M`,hue_${"hue"}`,[v.BLUR]:M`,blur_${"blur"}`},wt=M`,enc_auto`;function Ot(t,e,i,n,r){var o,a;if(void 0===n&&(n={}),P(e.id,null==(o=n)?void 0:o.hasAnimation,null==(a=n)?void 0:a.allowAnimatedTransform)){if(N(e.id)){const{alignment:o,...a}=i;e.focalPoint={x:void 0,y:void 0},null==e||delete e.crop,r=ht(t,e,a,n)}else r=r||ht(t,e,i,n);return function(t){const e=[];t.parts.forEach((t=>{switch(t.transformType){case f.CROP:e.push(mt(t));break;case f.LEGACY_CROP:e.push(pt(t));break;case f.LEGACY_FILL:let i=Tt(t);t.upscale&&(i+=_t(t)),e.push(i);break;case f.FIT:let n=dt(t);t.upscale&&(n+=_t(t)),e.push(n);break;case f.FILL:let r=gt(t);t.upscale&&(r+=_t(t)),e.push(r);break;case f.FILL_FOCAL:let o=ft(t);t.upscale&&(o+=_t(t)),e.push(o)}}));let i=e.join("/");return t.quality&&(i+=It(t)),t.unsharpMask&&(i+=Et(t.unsharpMask)),t.progressive||(i+=Lt(t)),t.watermark&&(i+=bt(t)),t.filters&&(i+=Object.keys(t.filters).map((e=>At[e](t.filters))).join("")),t.autoEncode&&t.fileType!==y.GIF&&(i+=wt(t)),`${t.src.id}/${s}/${i}/${t.fileName}.${t.preferredExtension}`}(r)}return e.id}const Rt={[m.CENTER]:"50% 50%",[m.TOP_LEFT]:"0% 0%",[m.TOP_RIGHT]:"100% 0%",[m.TOP]:"50% 0%",[m.BOTTOM_LEFT]:"0% 100%",[m.BOTTOM_RIGHT]:"100% 100%",[m.BOTTOM]:"50% 100%",[m.RIGHT]:"100% 50%",[m.LEFT]:"0% 50%"},vt=Object.entries(Rt).reduce(((t,e)=>{let[i,n]=e;return t[n]=i,t}),{}),yt=[g.TILE,g.TILE_HORIZONTAL,g.TILE_VERTICAL,g.LEGACY_BG_FIT_AND_TILE,g.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,g.LEGACY_BG_FIT_AND_TILE_VERTICAL],Mt=[g.LEGACY_ORIGINAL_SIZE,g.ORIGINAL_SIZE,g.LEGACY_BG_NORMAL];function St(t,e,i){let{width:n,height:r}=i;return t===g.TILE&&e.width>n&&e.height>r}function Gt(t,e){let{width:i,height:n}=e;if(!i||!n){const e=i||Math.min(980,t.width),r=e/t.width;return{width:e,height:n||t.height*r}}return{width:i,height:n}}function xt(t,e,i,n){void 0===n&&(n="center");const r={img:{},container:{}};if(t===g.SCALE_TO_FILL){const t=e.focalPoint&&function(t){const e=`${t.x}% ${t.y}%`;return vt[e]||""}(e.focalPoint),o=t||n;e.focalPoint&&!t?r.img={objectPosition:Ct(e,i,e.focalPoint)}:r.img={objectPosition:Rt[o]}}else[g.LEGACY_ORIGINAL_SIZE,g.ORIGINAL_SIZE].includes(t)?r.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:yt.includes(t)&&(r.container={backgroundSize:`${e.width}px ${e.height}px`});return r}function Ct(t,e,i){const{width:n,height:r}=t,{width:o,height:a}=e,{x:s,y:c}=i;if(!o||!a)return`${s}% ${c}%`;const u=Math.max(o/n,a/r),h=n*u,l=r*u,d=Math.max(0,Math.min(h-o,h*(s/100)-o/2)),g=Math.max(0,Math.min(l-a,l*(c/100)-a/2));return`${d&&Math.floor(d/(h-o)*100)}% ${g&&Math.floor(g/(l-a)*100)}%`}const Pt={width:"100%",height:"100%"};function Ft(t,e,i,n){void 0===n&&(n={});const{autoEncode:r=!0,isSEOBot:o,shouldLoadHQImage:a,hasAnimation:s,allowAnimatedTransform:c}=n;if(!C(t,e,i)||function(t){return U(t)===y.GIF}(e.id)&&c)return b;const u=P(e.id,s,c);if(!u||a)return Nt(t,e,i,{...n,autoEncode:r,useSrcset:u});const h={...i,...Gt(e,i)},{alignment:l,htmlTag:d}=h,f=St(t,e,h),m=function(t,e,i,n){let{width:r,height:o}=i;if(void 0===n&&(n=!1),n)return{width:r,height:o};const a=!Mt.includes(t),s=St(t,e,{width:r,height:o}),c=!s&&yt.includes(t),u=c?e.width:r,h=c?e.height:o,l=a?function(t,e){return t>900?e?.05:.15:t>500?e?.1:.18:t>200?.25:1}(u,F(e.id)):1;return{width:s?1920:u*l,height:h*l}}(t,e,h,o),p=function(t,e,i){return i?0:yt.includes(e)?1:t>200?2:3}(h.width,t,o),T=function(t,e){const i=yt.includes(t)&&!e;return t===g.SCALE_TO_FILL||i?g.SCALE_TO_FIT:t}(t,f),_=xt(t,e,i,l),{uri:I}=Nt(T,e,{...m,alignment:l,htmlTag:d},{autoEncode:r,filters:p?{blur:p}:{},hasAnimation:s,allowAnimatedTransform:c}),{attr:E={},css:L}=Nt(t,e,{...h,alignment:l,htmlTag:d},{});return L.img=L.img||{},L.container=L.container||{},Object.assign(L.img,_.img,Pt),Object.assign(L.container,_.container),{uri:I,css:L,attr:E,transformed:!0}}function Nt(t,e,i,n){let r={};if(C(t,e,i)){const o=lt(t,e,i),a=ht(t,e,o,n);r.uri=Ot(t,e,o,n,a),null!=n&&n.useSrcset&&(r.srcset=function(t,e,i,n,r){const o=i.pixelAspectRatio||1;return{dpr:[`${1===o?r.uri:Ot(t,e,{...i,pixelAspectRatio:1},n)} 1x`,`${2===o?r.uri:Ot(t,e,{...i,pixelAspectRatio:2},n)} 2x`]}}(t,e,o,n,r)),Object.assign(r,function(t,e){let i;return i=e.htmlTag===_.BG?tt:e.htmlTag===_.SVG?rt:nt,i(t,e)}(a,o),{transformed:a.transformed})}else r=b;return r}function kt(t,e,i,n){if(C(t,e,i)){const r=lt(t,e,i);return{uri:Ot(t,e,r,n||{},ht(t,e,r,n))}}return{uri:""}}const Ht="https://static.wixstatic.com/media/",Bt=/^media\//i,Yt="undefined"!=typeof window?window.devicePixelRatio:1,Ut=(t,e)=>{const i=e&&e.baseHostURL;return i?`${i}${t}`:(t=>Bt.test(t)?`https://static.wixstatic.com/${t}`:`${Ht}${t}`)(t)};K(),K();const $t={getScaleToFitImageURL:function(t,e,i,n,r,o){const a=kt(g.SCALE_TO_FIT,{id:t,width:e,height:i,name:o&&o.name},{width:n,height:r,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==o?void 0:o.devicePixelRatio)??Yt},o);return Ut(a.uri,o)},getScaleToFillImageURL:function(t,e,i,n,r,o){const a=kt(g.SCALE_TO_FILL,{id:t,width:e,height:i,name:o&&o.name,focalPoint:{x:o&&o.focalPoint&&o.focalPoint.x,y:o&&o.focalPoint&&o.focalPoint.y}},{width:n,height:r,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==o?void 0:o.devicePixelRatio)??Yt},o);return Ut(a.uri,o)},getCropImageURL:function(t,e,i,n,r,o,a,s,c,u){const h=kt(g.SCALE_TO_FILL,{id:t,width:e,height:i,name:u&&u.name,crop:{x:n,y:r,width:o,height:a}},{width:s,height:c,htmlTag:_.IMG,alignment:m.CENTER,pixelAspectRatio:(null==u?void 0:u.devicePixelRatio)??Yt},u);return Ut(h.uri,u)}},zt=Ht,{STATIC_MEDIA_URL:jt}=t,Dt=t=>{let{fittingType:e,src:i,target:n,options:r}=t;const o=Ft(e,i,n,{...r,autoEncode:!0});return null!=o&&o.uri&&!/^[a-z]+:/.test(o.uri)&&(o.uri=`${jt}${o.uri}`),o},Wt=/^[a-z]+:/,Zt=t=>{var e,n;const{id:r,containerId:s,uri:c,alt:u,name:h="",role:l,width:d,height:g,displayMode:f,devicePixelRatio:m,quality:p,alignType:T,bgEffectName:_="",focalPoint:I,upscaleMethod:E,className:L="",crop:b,imageStyles:A={},targetWidth:w,targetHeight:O,targetScale:R,onLoad:v=()=>{},onError:y=()=>{},shouldUseLQIP:M,containerWidth:S,containerHeight:G,getPlaceholder:x,isInFirstFold:C,placeholderTransition:P,socialAttrs:F,isSEOBot:N,skipMeasure:k,hasAnimation:H,allowAnimatedTransform:B}=t,Y=o.useRef(null);let U="";const $="blur"===P,z=o.useRef(null);if(!z.current)if(x||M||C||N){const t={upscaleMethod:E,...p||{},shouldLoadHQImage:C,isSEOBot:N,hasAnimation:H,allowAnimatedTransform:B};z.current=(x||Dt)({fittingType:f,src:{id:c,width:d,height:g,crop:b,name:h,focalPoint:I},target:{width:S,height:G,alignment:T,htmlTag:"img"},options:t}),U=!z.current.transformed||C||N?"":"true"}else z.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const j=!N&&(x||M)&&!C&&z.current.transformed,D=o.useMemo((()=>JSON.stringify({containerId:s,...s&&{containerId:s},...T&&{alignType:T},...k&&{skipMeasure:!0},displayMode:f,...S&&{targetWidth:S},...G&&{targetHeight:G},...w&&{targetWidth:w},...O&&{targetHeight:O},...R&&{targetScale:R},isLQIP:j,isSEOBot:N,lqipTransition:P,imageData:{width:d,height:g,uri:c,name:h,displayMode:f,hasAnimation:H,...p&&{quality:p},...m&&{devicePixelRatio:m},...I&&{focalPoint:I},...b&&{crop:b},...E&&{upscaleMethod:E}}})),[s,T,k,f,G,S,w,O,R,j,N,P,d,g,c,h,p,m,I,b,E,H]),W=z.current,Z=null==W?void 0:W.uri,q=null==W?void 0:W.srcset,V=null==(e=W.css)?void 0:e.img,J=`${a} ${L}`;o.useEffect((()=>{const t=Y.current;v&&null!=t&&t.currentSrc&&null!=t&&t.complete&&v({target:t})}),[]);const Q=!W||null!=W&&W.transformed?w?`${w}px`:null:`max(${d}px, 100%)`;return o.createElement("wow-image",{id:r,class:J,"data-image-info":D,"data-motion-part":"BG_IMG","data-bg-effect-name":_,"data-has-ssr-src":U,"data-animate-blur":!N&&j&&$?"":void 0,style:Q?{"--wix-img-max-width":Q}:{}},o.createElement("img",i()({src:Z,ref:Y,alt:u||"",role:l,style:{...V,...A},onLoad:v,onError:y,width:S||void 0,height:G||void 0},F,{srcSet:C?null==q||null==(n=q.dpr)?void 0:n.map((t=>Wt.test(t)?t:`${jt}${t}`)).join(", "):void 0,fetchpriority:C?"high":void 0,loading:!1===C?"lazy":void 0,suppressHydrationWarning:!0})))};var qt=n(99),Vt=n.n(qt);const Jt={columnCount:1,columns:1,fontWeight:1,lineHeight:1,opacity:1,zIndex:1,zoom:1},Qt=(t,e)=>(Array.isArray(e)?e:[e]).reduce(((e,i)=>{const n=t[i];return void 0!==n?Object.assign(e,{[i]:n}):e}),{}),Xt=(t,e)=>t&&e&&Object.keys(e).forEach((i=>{const n=i,r=e[n];void 0!==r?t.style[n]=((t,e)=>"number"!=typeof e||Jt[t]?e.toString():`${e}px`)(n,r):t.style.removeProperty(n)})),Kt=(t,e,i)=>{if(!t.targetWidth||!t.targetHeight||!t.imageData.uri)return{uri:"",css:{},transformed:!1};const{imageData:n}=t,r=t.displayMode||g.SCALE_TO_FILL,o=Object.assign(Qt(n,["upscaleMethod"]),Qt(t,"filters"),t.quality||n.quality,{hasAnimation:(null==t?void 0:t.hasAnimation)||(null==n?void 0:n.hasAnimation)}),a=t.imageData.devicePixelRatio||e.devicePixelRatio,s=ee(a),c=Nt(r,Object.assign(Qt(n,["width","height","crop","name","focalPoint"]),{id:n.uri}),{width:t.targetWidth,height:t.targetHeight,htmlTag:i||"img",pixelAspectRatio:s,alignment:t.alignType||m.CENTER},o);return c.uri=te(c.uri,e.staticMediaUrl,e.mediaRootUrl),c},te=(t,e,i)=>{if(/(^https?)|(^data)|(^blob)|(^\/\/)/.test(t))return t;let n=`${e}/`;var r;t&&(/^micons\//.test(t)?n=i:"ico"===(null==(r=/[^.]+$/.exec(t))?void 0:r[0])&&(n=n.replace("media","ficons")));return n+t},ee=t=>{const e=window.location.search.split("&").map((t=>t.split("="))).find((t=>{var e;return null==(e=t[0])?void 0:e.toLowerCase().includes("devicepixelratio")}));return(null!=e&&e[1]?Number(e[1]):null)||t||1},ie=t=>t.getAttribute("src"),ne=80;const re={measure:function(t,e,i,n,r){let{containerElm:o,bgEffect:a="none",sourceSets:s}=n;const c=i.image,u=i[t],h=(null==r.getScreenHeightOverride?void 0:r.getScreenHeightOverride())||document.documentElement.clientHeight||window.innerHeight||0,l=null==o?void 0:o.dataset.mediaHeightOverrideType,d=a&&"none"!==a||s&&s.some((t=>t.scrollEffect)),g=o&&d?o:u,f=window.getComputedStyle(u).getPropertyValue("--bg-scrub-effect"),{width:m,height:p}=(null==r.getMediaDimensionsByEffect?void 0:r.getMediaDimensionsByEffect(f||a,g.offsetWidth,g.offsetHeight,h))||{width:u.offsetWidth,height:u.offsetHeight};if(s&&(e.sourceSetsTargetHeights=function(t,e,i,n,r){const o={};return t.forEach((t=>{let{mediaQuery:a,scrollEffect:s}=t;o[a]=r.getMediaDimensionsByEffect(s,e,i,n).height})),o}(s,g.offsetWidth,g.offsetHeight,h,r)),!c)return;const T=ie(c);f&&(e.top=.5*(u.offsetHeight-p),e.left=.5*(u.offsetWidth-m)),e.width=m,e.height=function(t,e){return"fixed"===e||"viewport"===e?document.documentElement.clientHeight+ne:t}(p,l),e.screenHeight=h,e.imgSrc=T,e.boundingRect=u.getBoundingClientRect(),e.mediaHeightOverrideType=l,e.srcset=c.srcset},patch:function(t,e,i,n,r,o,a,s,c){var u;if(!Object.keys(e).length)return;const{imageData:h}=n,l=i[t],d=i.image;c&&(h.devicePixelRatio=1);const g=n.targetScale||1,f={...n,...!n.skipMeasure&&{targetWidth:(e.width||0)*g,targetHeight:(e.height||0)*g},displayMode:h.displayMode},m=null==r.isExperimentOpen?void 0:r.isExperimentOpen("specs.thunderbolt.allowAnimatedImageTransform"),p=Kt(f,o,"img"),T=(null==p||null==(u=p.css)?void 0:u.img)||{},_=function(t,e,i,n,r){const o=function(t,e){return void 0===e&&(e=1),1!==e?{...t,width:"100%",height:"100%"}:t}(e,n);if(r&&(delete o.height,o.width="100%"),!t)return o;const a={...o};return"fill"===i?(a.position="absolute",a.top="0"):"fit"===i&&(a.height="100%"),"fixed"===t&&(a["will-change"]="transform"),a.objectPosition&&(a.objectPosition=e.objectPosition.replace(/(center|bottom)$/,"top")),a}(e.mediaHeightOverrideType,T,h.displayMode,g,s);Xt(d,_),(e.top||e.left)&&Xt(l,{top:`${e.top}px`,left:`${e.left}px`});const I=(null==p?void 0:p.uri)||"",E=(null==h?void 0:h.hasAnimation)||(null==n?void 0:n.hasAnimation),L=function(t,e,i){const{sourceSets:n}=e;if(!n||!n.length)return;const r={};return n.forEach((n=>{let{mediaQuery:o,crop:a,focalPoint:s}=n;const c={...e,targetHeight:(t.sourceSetsTargetHeights||{})[o]||0,imageData:{...e.imageData,crop:a,focalPoint:s}},u=Kt(c,i,"img");r[o]=u.uri||""})),r}(e,f,o);if(l.setAttribute("data-has-ssr-src",""),n.isLQIP&&n.lqipTransition&&!("transitioned"in l.dataset)&&(l.dataset.transitioned="",d.complete?d.onload=function(){d.dataset.loadDone=""}:d.onload=function(){d.complete?d.dataset.loadDone="":d.onload=function(){d.dataset.loadDone=""}}),a){((t,e)=>U(t)===y.GIF||U(t)===y.WEBP&&e)(h.uri,E)&&m?(d.setAttribute("fetchpriority","low"),d.setAttribute("loading","lazy"),d.setAttribute("decoding","async")):d.setAttribute("fetchpriority","high"),d.currentSrc!==I&&d.setAttribute("src",I);e.srcset&&!e.srcset.split(", ").some((t=>t.split(" ")[0]===I))&&d.setAttribute("srcset",I),i.picture&&f.sourceSets&&Array.from(i.picture.querySelectorAll("source")).forEach((t=>{const e=t.media||"",i=null==L?void 0:L[e];t.srcset!==i&&t.setAttribute("srcset",i||"")}))}}},oe={parallax:"ImageParallax",fixed:"ImageReveal"};const ae=function(t,e,i){return class extends i.HTMLElement{constructor(){super(),Vt()(this,"childListObserver",void 0),Vt()(this,"timeoutId",void 0),this.childListObserver=null,this.timeoutId=null}attributeChangedCallback(t,e){e&&this.reLayout()}connectedCallback(){e.disableImagesLazyLoading?this.reLayout():this.observeIntersect()}disconnectedCallback(){this.unobserveResize(),this.unobserveIntersect(),this.unobserveChildren()}static get observedAttributes(){return["data-image-info"]}reLayout(){const n={},r={},o=this.getAttribute("id"),a=JSON.parse(this.dataset.imageInfo||""),s="true"===this.dataset.isResponsive,{bgEffectName:c}=this.dataset,{scrollEffect:u}=a.imageData,{sourceSets:h}=a,l=c||u&&oe[u];h&&h.length&&h.forEach((t=>{t.scrollEffect&&(t.scrollEffect=oe[t.scrollEffect])})),n[o]=this,a.containerId&&(n[a.containerId]=i.document.getElementById(`${a.containerId}`));const d=a.containerId?n[a.containerId]:void 0;if(n.image=this.querySelector("img"),n.picture=this.querySelector("picture"),!n.image){const t=this;return void this.observeChildren(t)}this.unobserveChildren(),this.observeChildren(this),t.mutationService.measure((()=>{re.measure(o,r,n,{containerElm:d,bgEffect:l,sourceSets:h},t)}));const g=i=>{t.mutationService.mutate((()=>{re.patch(o,r,n,a,t,e,i,s,l)}))};!ie(n.image)||this.dataset.hasSsrSrc?g(!0):this.debounceImageLoad(g)}debounceImageLoad(t){clearTimeout(this.timeoutId),this.timeoutId=i.setTimeout((()=>{t(!0)}),250),t(!1)}observeResize(){var e;null==(e=t.resizeService)||e.observe(this)}unobserveResize(){var e;null==(e=t.resizeService)||e.unobserve(this)}observeIntersect(){var e;null==(e=t.intersectionService)||e.observe(this)}unobserveIntersect(){var e;null==(e=t.intersectionService)||e.unobserve(this)}observeChildren(t){this.childListObserver||(this.childListObserver=new i.MutationObserver((()=>{this.reLayout()}))),this.childListObserver.observe(t,{childList:!0})}unobserveChildren(){this.childListObserver&&(this.childListObserver.disconnect(),this.childListObserver=null)}}};var se=n(709),ce=n.n(se);const ue=()=>/iemobile/i.test(navigator.userAgent)?Math.round(window.screen.availWidth/(window.screen.width||window.document.documentElement.clientWidth)):window.devicePixelRatio,he="https://static.wixstatic.com/media",le="https://static.wixstatic.com";function de(t,e,i){if(void 0===t&&(t={}),void 0===e&&(e=null),void 0===i&&(i={}),"undefined"==typeof window)return;const n={staticMediaUrl:he,mediaRootUrl:le,experiments:{},devicePixelRatio:ue(),...i},r=function(t,e){const i="wow-image";if(void 0===(t=t||window).customElements.get(i)){let n,r;return t.ResizeObserver&&(n=new t.ResizeObserver((t=>t.map((t=>t.target.reLayout()))))),t.IntersectionObserver&&(r=new IntersectionObserver((t=>t.map((t=>{if(t.isIntersecting){const e=t.target;e.unobserveIntersect(),e.observeResize()}return t}))),{rootMargin:"150% 100%"})),function(o){const a=ae({resizeService:n,intersectionService:r,mutationService:ce(),...e},o,t);t.customElements.define(i,a)}}}(e,t);r&&r(n)}})(),r})()));
//# sourceMappingURL=image.umd.min.js.map

@@ -1,1 +0,1 @@

{"generatedAt":1724585581465,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"3.2.0"},"typescriptOptions":{"check":false,"reactDocgen":false},"language":"typescript","storybookPackages":{"@wix/yoshi-storybook-dependencies":{"version":"6.101.0"}},"framework":{},"addons":{"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.16"}}}
{"generatedAt":1724596134975,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"3.2.0"},"typescriptOptions":{"check":false,"reactDocgen":false},"language":"typescript","storybookPackages":{"@wix/yoshi-storybook-dependencies":{"version":"6.101.0"}},"framework":{},"addons":{"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.16"}}}
{
"image.css": "https://static.parastorage.com/services/image/6617653ecfef44086267b2a8cc1d076057bb558a0dba598042c8b41e/image.css",
"image.js": "https://static.parastorage.com/services/image/6617653ecfef44086267b2a8cc1d076057bb558a0dba598042c8b41e/image.umd.js"
"image.css": "https://static.parastorage.com/services/image/c35f310e185c146daa67c3d84aadcd0bb7108486a472b08b20992333/image.css",
"image.js": "https://static.parastorage.com/services/image/c35f310e185c146daa67c3d84aadcd0bb7108486a472b08b20992333/image.umd.js"
}
{
"image.css": "https://static.parastorage.com/services/image/6617653ecfef44086267b2a8cc1d076057bb558a0dba598042c8b41e/image.min.css",
"image.js": "https://static.parastorage.com/services/image/6617653ecfef44086267b2a8cc1d076057bb558a0dba598042c8b41e/image.umd.min.js"
"image.css": "https://static.parastorage.com/services/image/c35f310e185c146daa67c3d84aadcd0bb7108486a472b08b20992333/image.min.css",
"image.js": "https://static.parastorage.com/services/image/c35f310e185c146daa67c3d84aadcd0bb7108486a472b08b20992333/image.umd.min.js"
}
{
"name": "@wix/image",
"description": "Wix base image component",
"version": "1.302.0",
"version": "1.303.0",
"license": "MIT",

@@ -98,3 +98,3 @@ "author": {

},
"falconPackageHash": "2908ae953c259b1b7182af0972967ffc1429d045aa8a229322e35ef0"
"falconPackageHash": "c81ea41a78d43daf7381cd4595b4fa2879990c67d42dc79ff7ad61da"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc