UNPKG

@ekolabs/eko-gallery-react

Version:

eko gallery for react framework

14 lines • 85 kB
import e,{useRef as n,useState as o,createRef as t,useEffect as a,memo as r}from"react";function i(e){return`if (!window.EkoAnalytics) {\n !function () {\n var t, a, e, s, n;\n 'undefined' == typeof window || window.EkoAnalytics || (t = window, a = 'EkoAnalytics', e = document, s = 'script', t[a] || (t[a] = function () {\n t[a].f ? (t[a].q.push(arguments), t[a].ts.push(Date.now())) : t[a].apply(t, arguments);\n }, t[a].f = !0, t[a].q = t[a].q || [], t[a].ts = t[a].ts || [], t[a].t = Number(new Date), t[a].sa = [], t[a].cb = [], t[a].init = function (ids) {\n t[a].id = ids;\n }, t[a].childRequestIdsCallback = function (e) {\n e.data && 'ea-ids-request' === e.data.type && t[a].sa.push(e.source);\n }, t.addEventListener('message', t[a].childRequestIdsCallback)));\n }();\n\n window.EkoAnalytics.cb.push(() => {\n let setCookie = (key, value, additionalProperties = '') => {\n let hostname = window.location.hostname;\n let domain = hostname;\n \n let parts = hostname.split('.');\n if (parts.length > 2) {\n domain = parts.slice(-2).join('.');\n }\n\n // "samesite=lax" is needed for cross-site situations (like NZXT getting checkout url attributes from lambda).\n window.document.cookie = \`\${key}=\${value}; domain=.\${domain}; path=/; secure; samesite=lax; \${additionalProperties}\`;\n };\n\n setCookie('easid', encodeURIComponent(window.EkoAnalytics('getSid')));\n setCookie('eauid', encodeURIComponent(window.EkoAnalytics('getUid')), 'max-age=2147483647');\n });\n\n window.EkoAnalytics('configure', {\n snowplow: {\n options: {\n appId: 'ekoGalleryReact',\n },\n },\n ekoEnv: '${e?"production":"development"}',\n env: 'website',\n });\n window.EkoAnalytics('track', 'PageView');\n }`}function l(e,n="*",o=""){let t=`https://${o}play.eko.com/api/v1/channels/${e}/configs`;return t+="*"!==n?`/${n}`:"",t}function s(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var c={pack:function(e){const n={};if(!s(e))return n;if(e.itemId&&(n.item_id=e.itemId),e.itemName&&(n.item_name=e.itemName),s(e.itemPrice)){const o=e.itemPrice;n.item_price=function(e){const n={};return s(e)&&(e.amount&&(n.amount=Number(e.amount)),e.currency&&(n.currency=e.currency)),n}(o)}return e.quantity&&(n.quantity=Number(e.quantity)),n}};const d="mobile",u="notmobile";function k(){return((window.navigator.userAgentData?window.navigator.userAgentData.mobile:navigator.maxTouchPoints>0&&/Mobile|Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&!/Tablet|iPad/i.test(navigator.userAgent))?d:u)===d}const v={};class p{constructor(e){this.key=`eko.${e}`}setDataStorage(e,n){try{var o,t;let a=null===(o=window.localStorage)||void 0===o?void 0:o.getItem(this.key);a=JSON.parse(a)||{},a[e]=n,null===(t=window.localStorage)||void 0===t||t.setItem(this.key,JSON.stringify(a))}catch(e){console.error(`[setDataStorage]: ${e}`)}}getDataStorage(e){try{var n;let o=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);return o=JSON.parse(o)||{},o[e]}catch(e){console.error(`[getDataStorage]: ${e}`)}}removeDataStorage(e){try{var n;let t=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);var o;if(t)if(t=JSON.parse(t),delete t[e],Object.keys(t).length>0)null===(o=window.localStorage)||void 0===o||o.setItem(this.key,JSON.stringify(t));else this.removeAll()}catch(e){console.error(`[removeDataStorage]: ${e}`)}}removeAll(){try{var e;null===(e=window.localStorage)||void 0===e||e.removeItem(this.key)}catch(e){console.error(`[removeAll]: ${e}`)}}}function m(e){return v[e]||(v[e]=new p(e)),v[e]}const g=m("gallery-react").getDataStorage("gallery-react");function y(e){window.EkoAnalytics("registerContextPacker",{tag:e,match:/.*/,schema:"iglu:com.helloeko/products/jsonschema/1-0-1",getData(e={}){var n,o;if(e.items)return{items:e.items.map((e=>function(e){const n=c.pack(e);return e.id&&(n.id=e.id),e.sku&&(n.sku=e.sku),e.upc&&(n.upc=e.upc),e.name&&(n.name=e.name),n}(e)))};const t=(null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.product)||(null==g||null===(o=g.config)||void 0===o?void 0:o.product);if(t){return{items:[{id:t.id,item_id:t.sku,sku:t.sku,upc:t.upc,typeid:t.type,name:t.name}]}}return null}})}function f(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function b(e){const n={};return f(e)&&(e.amount&&(n.amount=Number(e.amount)),e.currency&&(n.currency=e.currency)),n}var h={isObject:f,pricePack:b,itemPack:function(e){const n={};if(!f(e))return n;if(e.itemId&&(n.item_id=e.itemId),e.itemName&&(n.item_name=e.itemName),f(e.itemPrice)){const o=e.itemPrice;n.item_price=b(o)}return e.quantity&&(n.quantity=Number(e.quantity)),e.sellingPlan&&(n.selling_plan=function(e){const n={};return f(e)&&(e.id&&(n.id=e.id),e.name&&(n.name=e.name)),n}(e.sellingPlan)),n}};const w=m("gallery-react").getDataStorage("gallery-react");const x=m("gallery-react").getDataStorage("gallery-react");const E=m("gallery-react").getDataStorage("gallery-react");const I="eko-gallery-react";var M={register:function(){var e;e=I,window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/page/jsonschema/1-0-0",match:/^pixel\..*/,getData:function(){return{url:document.location.href||"",referrer:document.referrer||"",title:document.title||""}}}),y(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/cart/jsonschema/1-0-1",match:/pixel\.cart\.(add|remove)$/,getData(e){const n={};if((e=e||{}).cartId&&(n.cart_id=e.cartId),Array.isArray(e.items)&&(n.items=e.items.map((e=>h.itemPack(e)))),h.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=h.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/organization/jsonschema/1-0-0",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==w||null===(n=w.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.organizationId}}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/space/jsonschema/1-0-2",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==x||null===(n=x.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.spaceId}}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/asset/jsonschema/1-0-1",match:/.*/,getData:function(e){var n,o;if(null!=e&&e.type&&null!=e&&e.publishitemid&&null!=e&&e.name)return{deliverableid:"",publishitemid:null==e?void 0:e.publishitemid,type:null==e?void 0:e.type,name:null==e?void 0:e.name,artifactid:""};const t=null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.__autoGenerated.publishItem,a=null==E||null===(o=E.config)||void 0===o?void 0:o.__autoGenerated.publishItem,r=t||a;return r?{deliverableid:"",publishitemid:null==r?void 0:r.id,type:"interactive",name:"",artifactid:""}:void 0}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/traffic_allocation/jsonschema/1-0-0",match:"trafficallocation.decision",getData:function(e){if(!e)return;const n={decision:e.decision};return e.config&&(n.config=e.config),isNaN(e.traffic_split)||(n.traffic_split=e.traffic_split),e.provider&&(n.provider=e.provider),n}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/checkout/jsonschema/1-0-4",match:/pixel\.(checkout|order)$/,getData(e){const n={};if((e=e||{}).checkoutId&&(n.checkout_id=e.checkoutId),Array.isArray(e.items)&&(n.items=e.items.map((e=>h.itemPack(e)))),h.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=h.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(I),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/order/jsonschema/1-0-2",match:"pixel.order",getData(e){const n={};if((e=e||{}).orderId&&(n.order_id=e.orderId),Array.isArray(e.items)&&(n.items=e.items.map((e=>h.itemPack(e)))),h.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=h.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(I)}};function S(e){return{cartId:e.cartId,items:[{itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId}],totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}function D(e,n){let o="";try{o=window[e].getItem(n),o||(o=function(e){const n=document.cookie.split(";");for(let o=0;o<n.length;o++){const t=n[o].trim();if(0===t.indexOf(e+"="))return t.substring(e.length+1)}return""}(n))}catch(e){console.warn("[eko-gallery-react] Error while getting the id from storage:",n,e)}return o}var P={addEkoProductMetadata:function(e){let n=D("localStorage","eko.metadata");if(n&&n[e.itemId]){let o=n[e.itemId].product;e.id=null==o?void 0:o.id,e.sku=null==o?void 0:o.sku,e.upc=null==o?void 0:o.upc,e.name=null==o?void 0:o.name}return e}};var j={"pixel.cart.add":S,"pixel.cart.remove":S,"pixel.product_viewed":function(e){let n={itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId};return n=P.addEkoProductMetadata(n),{items:[n]}},"pixel.checkout":function(e){return{checkoutId:e.checkoutId,items:[{itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId,sellingPlan:e.sellingPlan}],totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}},"pixel.order":function(e){return{checkoutId:e.checkoutId,orderId:e.orderId,items:[{itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId,sellingPlan:e.sellingPlan}],totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}};const q="https://storage.eko.com/efu/ekoanalytics/master/latest/EkoAnalyticsPlatform.min.gz.js";let T=!1;var C={init:function(e){M.register(),function(e){if(T)return;let n=e?window.location.host:"development";const o=document.createElement("script");o.setAttribute("pxid",n),o.type="text/javascript",o.async=!0,o.src=q,document.body.appendChild(o),T=!0}(e)},onRouteChanged:function(){window.EkoAnalytics("reset")},track:function(e,n){j[e]&&(n=j[e](n)),window.EkoAnalytics("track",e,n)}};function A(){return A=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)({}).hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},A.apply(null,arguments)}function $(e,n){return e(n={exports:{}},n.exports),n.exports /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */}var O="function"==typeof Symbol&&Symbol.for,R=O?Symbol.for("react.element"):60103,N=O?Symbol.for("react.portal"):60106,B=O?Symbol.for("react.fragment"):60107,_=O?Symbol.for("react.strict_mode"):60108,z=O?Symbol.for("react.profiler"):60114,F=O?Symbol.for("react.provider"):60109,L=O?Symbol.for("react.context"):60110,W=O?Symbol.for("react.async_mode"):60111,V=O?Symbol.for("react.concurrent_mode"):60111,G=O?Symbol.for("react.forward_ref"):60112,H=O?Symbol.for("react.suspense"):60113,U=O?Symbol.for("react.suspense_list"):60120,Y=O?Symbol.for("react.memo"):60115,Q=O?Symbol.for("react.lazy"):60116,J=O?Symbol.for("react.block"):60121,X=O?Symbol.for("react.fundamental"):60117,Z=O?Symbol.for("react.responder"):60118,K=O?Symbol.for("react.scope"):60119;function ee(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case R:switch(e=e.type){case W:case V:case B:case z:case _:case H:return e;default:switch(e=e&&e.$$typeof){case L:case G:case Q:case Y:case F:return e;default:return n}}case N:return n}}}function ne(e){return ee(e)===V}var oe={AsyncMode:W,ConcurrentMode:V,ContextConsumer:L,ContextProvider:F,Element:R,ForwardRef:G,Fragment:B,Lazy:Q,Memo:Y,Portal:N,Profiler:z,StrictMode:_,Suspense:H,isAsyncMode:function(e){return ne(e)||ee(e)===W},isConcurrentMode:ne,isContextConsumer:function(e){return ee(e)===L},isContextProvider:function(e){return ee(e)===F},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===R},isForwardRef:function(e){return ee(e)===G},isFragment:function(e){return ee(e)===B},isLazy:function(e){return ee(e)===Q},isMemo:function(e){return ee(e)===Y},isPortal:function(e){return ee(e)===N},isProfiler:function(e){return ee(e)===z},isStrictMode:function(e){return ee(e)===_},isSuspense:function(e){return ee(e)===H},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===B||e===V||e===z||e===_||e===H||e===U||"object"==typeof e&&null!==e&&(e.$$typeof===Q||e.$$typeof===Y||e.$$typeof===F||e.$$typeof===L||e.$$typeof===G||e.$$typeof===X||e.$$typeof===Z||e.$$typeof===K||e.$$typeof===J)},typeOf:ee},te=$((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,o=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,k=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function h(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case o:var v=e.type;switch(v){case c:case d:case a:case i:case r:case k:return v;default:var g=v&&v.$$typeof;switch(g){case s:case u:case m:case p:case l:return g;default:return n}}case t:return n}}}var w=c,x=d,E=s,I=l,M=o,S=u,D=a,P=m,j=p,q=t,T=i,C=r,A=k,$=!1;function O(e){return h(e)===d}n.AsyncMode=w,n.ConcurrentMode=x,n.ContextConsumer=E,n.ContextProvider=I,n.Element=M,n.ForwardRef=S,n.Fragment=D,n.Lazy=P,n.Memo=j,n.Portal=q,n.Profiler=T,n.StrictMode=C,n.Suspense=A,n.isAsyncMode=function(e){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||h(e)===c},n.isConcurrentMode=O,n.isContextConsumer=function(e){return h(e)===s},n.isContextProvider=function(e){return h(e)===l},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},n.isForwardRef=function(e){return h(e)===u},n.isFragment=function(e){return h(e)===a},n.isLazy=function(e){return h(e)===m},n.isMemo=function(e){return h(e)===p},n.isPortal=function(e){return h(e)===t},n.isProfiler=function(e){return h(e)===i},n.isStrictMode=function(e){return h(e)===r},n.isSuspense=function(e){return h(e)===k},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===r||e===k||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===y||e.$$typeof===f||e.$$typeof===b||e.$$typeof===g)},n.typeOf=h}()}));te.AsyncMode,te.ConcurrentMode,te.ContextConsumer,te.ContextProvider,te.Element,te.ForwardRef,te.Fragment,te.Lazy,te.Memo,te.Portal,te.Profiler,te.StrictMode,te.Suspense,te.isAsyncMode,te.isConcurrentMode,te.isContextConsumer,te.isContextProvider,te.isElement,te.isForwardRef,te.isFragment,te.isLazy,te.isMemo,te.isPortal,te.isProfiler,te.isStrictMode,te.isSuspense,te.isValidElementType,te.typeOf;var ae=$((function(e){"production"===process.env.NODE_ENV?e.exports=oe:e.exports=te})),re=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable; /* object-assign (c) Sindre Sorhus @license MIT */var se=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},o=0;o<10;o++)n["_"+String.fromCharCode(o)]=o;var t=Object.getOwnPropertyNames(n).map((function(e){return n[e]}));if("0123456789"!==t.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var o,t,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),r=1;r<arguments.length;r++){for(var i in o=Object(arguments[r]))ie.call(o,i)&&(a[i]=o[i]);if(re){t=re(o);for(var l=0;l<t.length;l++)le.call(o,t[l])&&(a[t[l]]=o[t[l]])}}return a},ce="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",de=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};if("production"!==process.env.NODE_ENV){var ke=ce,ve={},pe=de;ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function me(e,n,o,t,a){if("production"!==process.env.NODE_ENV)for(var r in e)if(pe(e,r)){var i;try{if("function"!=typeof e[r]){var l=Error((t||"React class")+": "+o+" type `"+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[r]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}i=e[r](n,r,t,o,null,ke)}catch(e){i=e}if(!i||i instanceof Error||ue((t||"React class")+": type specification of "+o+" `"+r+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in ve)){ve[i.message]=!0;var s=a?a():"";ue("Failed "+o+" type: "+i.message+(null!=s?s:""))}}}me.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(ve={})};var ge=me,ye=function(){};function fe(){return null}"production"!==process.env.NODE_ENV&&(ye=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var be=function(e,n){var o="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var a="<<anonymous>>",r={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:s(fe),arrayOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=n[o];if(!Array.isArray(i))return new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected an array.");for(var s=0;s<i.length;s++){var c=e(i,s,t,a,r+"["+s+"]",ce);if(c instanceof Error)return c}return null}))},element:s((function(n,o,t,a,r){var i=n[o];return e(i)?null:new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected a single ReactElement.")})),elementType:s((function(e,n,o,t,a){var r=e[n];return ae.isValidElementType(r)?null:new l("Invalid "+t+" `"+a+"` of type `"+k(r)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(n,o,t,r,i){if(!(n[o]instanceof e)){var s=e.name||a;return new l("Invalid "+r+" `"+i+"` of type `"+(((c=n[o]).constructor&&c.constructor.name?c.constructor.name:a)+"` supplied to `")+t+"`, expected instance of `"+s+"`.")}var c;return null}))},node:s((function(e,n,o,t,a){return u(e[n])?null:new l("Invalid "+t+" `"+a+"` supplied to `"+o+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected an object.");for(var c in i)if(de(i,c)){var d=e(i,c,t,a,r+"."+c,ce);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ye(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),fe;return s((function(n,o,t,a,r){for(var s=n[o],c=0;c<e.length;c++)if(i(s,e[c]))return null;var d=JSON.stringify(e,(function(e,n){return"symbol"===v(n)?String(n):n}));return new l("Invalid "+a+" `"+r+"` of value `"+String(s)+"` supplied to `"+t+"`, expected one of "+d+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ye("Invalid argument supplied to oneOfType, expected an instance of array."),fe;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return ye("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+p(o)+" at index "+n+"."),fe}return s((function(n,o,t,a,r){for(var i=[],s=0;s<e.length;s++){var c=(0,e[s])(n,o,t,a,r,ce);if(null==c)return null;c.data&&de(c.data,"expectedType")&&i.push(c.data.expectedType)}return new l("Invalid "+a+" `"+r+"` supplied to `"+t+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return d(t,a,r,c,v(u));var p=u(i,c,t,a,r+"."+c,ce);if(p)return p}return null}))},exact:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");var c=se({},n[o],e);for(var u in c){var p=e[u];if(de(e,u)&&"function"!=typeof p)return d(t,a,r,u,v(p));if(!p)return new l("Invalid "+a+" `"+r+"` key `"+u+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(n[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(i,u,t,a,r+"."+u,ce);if(m)return m}return null}))}};function i(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function l(e,n){this.message=e,this.data=n&&"object"==typeof n?n:{},this.stack=""}function s(e){if("production"!==process.env.NODE_ENV)var o={},t=0;function r(r,i,s,c,d,u,k){if(c=c||a,u=u||s,k!==ce){if(n){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+s;!o[p]&&t<3&&(ye("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[p]=!0,t++)}}return null==i[s]?r?null===i[s]?new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `null`."):new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,d,u)}var i=r.bind(null,!1);return i.isRequired=r.bind(null,!0),i}function c(e){return s((function(n,o,t,a,r,i){var s=n[o];return k(s)!==e?new l("Invalid "+a+" `"+r+"` of type `"+v(s)+"` supplied to `"+t+"`, expected `"+e+"`.",{expectedType:e}):null}))}function d(e,n,o,t,a){return new l((e||"React class")+": "+n+" type `"+o+"."+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function u(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(u);if(null===n||e(n))return!0;var a=function(e){var n=e&&(o&&e[o]||e[t]);if("function"==typeof n)return n}(n);if(!a)return!1;var r,i=a.call(n);if(a!==n.entries){for(;!(r=i.next()).done;)if(!u(r.value))return!1}else for(;!(r=i.next()).done;){var l=r.value;if(l&&!u(l[1]))return!1}return!0;default:return!1}}function k(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function v(e){if(null==e)return""+e;var n=k(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function p(e){var n=v(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return l.prototype=Error.prototype,r.checkPropTypes=ge,r.resetWarningCache=ge.resetWarningCache,r.PropTypes=r,r};function he(){}function we(){}we.resetWarningCache=he;var xe=$((function(e){if("production"!==process.env.NODE_ENV){var n=ae;e.exports=be(n.isElement,!0)}else e.exports=function(){function e(e,n,o,t,a,r){if(r!==ce){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:we,resetWarningCache:he};return o.PropTypes=o,o}()}));const Ee=/https?:\/\/(.*?\.)?eko.com/,Ie={"eko.project.interaction":"interaction"};let Me=null,Se=null;var De={subscribe:function(e){"function"==typeof e?Se?console.warn("[eko-gallery-react] Ignoring events subscribe since already subscribed"):(Me=e,Se=function(e){return n=>{var o;if(!Ee.test(n.origin)||"eko.embedapi"!==(null===(o=n.data)||void 0===o?void 0:o.source))return;const t=n.data;let a=Ie[t.type];a&&e(a,t.data)}}(e),window.addEventListener("message",Se)):console.warn("[eko-gallery-react] Ignoring events subscribe since a callback function was not provided as argument")},unsubscribe:function(){Se?(window.removeEventListener("message",Se),Se=null,Me=null):console.warn("[eko-gallery-react] Ignoring events unsubscribe since not subscribed")},send:function(e,n){Me&&Me(e,n)}};const Pe=({index:n,activeIndex:o,setActiveIndex:t,item:a,src:r,navItemRefs:i,itemIcon:l})=>{var s,c;const d=null==a||null===(s=a.media)||void 0===s?void 0:s.srcset,u=null==a||null===(c=a.media)||void 0===c?void 0:c.sizes,k=!r&&(null==a?void 0:a.label);let v=["addons-container",k?"full-thumb-label":""].join(" ").trim();return e.createElement("li",{className:"eko-nav-item","aria-current":o===n,onClick:function(){t({index:n,source:"nav"}),function(e){C.track("gallery.interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"}),De.send("interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"})}(n)},ref:i.current[n]},e.createElement("button",{type:"button"},!k&&e.createElement("img",{src:r,srcSet:d,sizes:u,alt:null==a?void 0:a.name,loading:"eager",fetchPriority:"high"}),e.createElement("div",{className:v},(null==a?void 0:a.stepsIndication)&&e.createElement("div",{className:"step-indicator"},e.createElement("span",null),e.createElement("span",null),e.createElement("span",null)),(null==a?void 0:a.label)&&e.createElement("div",{className:"thumb-label"},null==a?void 0:a.label)),l&&e.createElement("div",{className:"item-icon"},e.createElement("span",{style:{backgroundImage:`url(${l})`}}))))};Pe.propTypes={index:xe.number,activeIndex:xe.number,setActiveIndex:xe.func.isRequired,item:xe.object.isRequired,src:xe.string,navItemRefs:xe.object.isRequired,itemIcon:xe.string};const je=({layout:o,nav:t,isVerticalNav:a,showPrevArrow:r,showNextArrow:i})=>{var l,s,c,d,u;const k=n(null),v=n(null),p="arrows"===(null==o||null===(l=o.mobile)||void 0===l||null===(l=l.config)||void 0===l||null===(l=l.navPagination)||void 0===l?void 0:l.type)?"eko-mobile-arrows":"",m="arrows"===(null!==(s=null==o||null===(c=o.desktop)||void 0===c||null===(c=c.config)||void 0===c||null===(c=c.navPagination)||void 0===c?void 0:c.type)&&void 0!==s?s:"arrows")?"eko-desktop-arrows":"",g=p||m,y=a?null==t||null===(d=t.current)||void 0===d?void 0:d.scrollHeight:null==t||null===(u=t.current)||void 0===u?void 0:u.scrollWidth;function f(e){const n=a?t.current.clientHeight:t.current.clientWidth,o=function(e,n){const o=a?n.scrollTop:n.scrollLeft;return Math.max(-o,Math.min(y-e-o,e))}("next"===e?n:-n,t.current);return{top:a?o:0,left:a?0:o,behavior:"smooth"}}function b(e){var n,o,a;const r=f(e),i="next"===e?null==v||null===(n=v.current)||void 0===n?void 0:n.id:null==k||null===(o=k.current)||void 0===o?void 0:o.id;var l,s;window.EkoAnalytics("track","gallery.interaction",{elementid:i,interactiontype:"click"}),null==t||null===(a=t.current)||void 0===a||a.scrollBy(r),l=i,s="click",C.track("gallery.interaction",{elementId:l,interactiontype:s}),De.send("interaction",{elementId:l,interactiontype:s})}return e.createElement(e.Fragment,null,g&&e.createElement(e.Fragment,null,e.createElement("button",{type:"button","aria-label":"Go to previous item","aria-hidden":r?"false":"true",onClick:()=>b("prev"),ref:k,id:"eko-nav-prev-arrow",className:`eko-nav-arrow eko-prev-nav-button ${p} ${m} ${r?"":"eko-hidden-nav-button"}`},e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.56127 9.52817C5.28966 9.22635 5.28966 8.77361 5.56127 8.502L10.39 3.67331C10.6918 3.37157 11.1445 3.37157 11.4161 3.67331C11.7179 3.94492 11.7179 4.39766 11.4161 4.66927L7.10044 8.98487L11.4161 13.3307C11.7179 13.6023 11.7179 14.055 11.4161 14.3266C11.1445 14.6285 10.6918 14.6285 10.4202 14.3266L5.56127 9.52817Z",fill:"black"}))),e.createElement("button",{type:"button","aria-label":"Go to next item","aria-hidden":i?"false":"true",onClick:()=>b("next"),ref:v,className:`eko-nav-arrow eko-next-nav-button ${p} ${m} ${i?"":"eko-hidden-nav-button"}`,id:"eko-nav-next-arrow"},e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.4387 8.47185C12.7103 8.77367 12.7103 9.22641 12.4387 9.49802L7.61003 14.3267C7.30821 14.6284 6.85547 14.6284 6.58386 14.3267C6.28212 14.0551 6.28212 13.6024 6.58386 13.3308L10.8996 9.01515L6.58386 4.66933C6.28212 4.39772 6.28212 3.94499 6.58386 3.67338C6.85547 3.37155 7.30821 3.37155 7.57982 3.67338L12.4387 8.47185Z",fill:"black"})))))};function qe(e,n,o){let t;return function(){const o=this,a=arguments;clearTimeout(t),t=setTimeout((function(){t=null,e.apply(o,a)}),n)}}je.propTypes={layout:xe.object.isRequired,nav:xe.object.isRequired,isVerticalNav:xe.bool.isRequired,showPrevArrow:xe.bool.isRequired,showNextArrow:xe.bool.isRequired};const Te=({items:r,setActiveIndex:i,activeIndex:l,layout:s,carouselMounted:c,forceMobile:d})=>{const u=n(null),v=n(null),p=n([]),m=3,[g,y]=o(null),[f,b]=o(!1),[h,w]=o(0),[x,E]=o(!1),[I,M]=o(!1);function S(){var e;const n=d||window.innerWidth<768?"mobile":"desktop",o=(null==s||null===(e=s[n])||void 0===e||null===(e=e.config)||void 0===e?void 0:e.orientation)||("desktop"===n?"left":"bottom");b("left"===o||"right"===o);const t=v.current.parentNode,a=c?".eko-smart-gallery-container iframe":".eko-carousel",r=t.querySelector(a);w(r.clientHeight)}p.current=null==r?void 0:r.map(((e,n)=>{var o,a;return null!==(o=null==p||null===(a=p.current)||void 0===a?void 0:a[n])&&void 0!==o?o:t()})),a((()=>{var e;y(null===(e=p.current)||void 0===e?void 0:e[null==l?void 0:l.index])}),[l]),a((()=>{if(null!=g&&g.current&&null!=u&&u.current){const e=g.current,n=u.current.clientWidth/2,o=e.clientWidth/2,t=u.current.clientHeight/2,a=e.clientHeight/2;u.current.scrollTo({left:e.offsetLeft-n+o,top:e.offsetTop-t+a,behavior:"smooth"})}}),[g]);const D=qe((e=>{var n;n=e,C.track("gallery.interaction",{elementid:"nav",interactiontype:n}),De.send("interaction",{elementid:"nav",interactiontype:n})}),200);function P(){var e,n;const o=d||k()?"mobile":"desktop",t=null!==(e=null==s||null===(n=s[o])||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.scrollThreshold)&&void 0!==e?e:m;!function(e=m){var n,o;const t=u.current;if(!t)return;const a="none"!==(null==s||null===(n=s.desktop)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.type),r=(i=null==s||null===(o=s.mobile)||void 0===o||null===(o=o.config)||void 0===o||null===(o=o.navPagination)||void 0===o?void 0:o.type,"mask"===i||"arrows"===i);var i;if((d||k())&&!r)return void t.style.setProperty("-webkit-mask","none");if(!k()&&!a)return void t.style.setProperty("-webkit-mask","none");const l=t.scrollHeight-t.clientHeight,c=t.scrollTop>e?"85%":"100%",v=t.scrollTop<=l-e?"15%":"0%",p=t.scrollWidth-t.clientWidth,g=t.scrollLeft>e?"15%":"0%",y=t.scrollLeft<=p-e?"85%":"100%";f?t.style.setProperty("-webkit-mask",`linear-gradient(0deg,#0000,#000 ${v} ${c},#0000)`):t.style.setProperty("-webkit-mask",`linear-gradient(90deg,#0000,#000 ${g} ${y},#0000)`)}(t),function(e=m){var n,o,t,a,r,i;const l=f?null==u||null===(n=u.current)||void 0===n?void 0:n.scrollTop:null==u||null===(o=u.current)||void 0===o?void 0:o.scrollLeft,s=f?null==u||null===(t=u.current)||void 0===t?void 0:t.clientHeight:null==u||null===(a=u.current)||void 0===a?void 0:a.clientWidth,c=f?null==u||null===(r=u.current)||void 0===r?void 0:r.scrollHeight:null==u||null===(i=u.current)||void 0===i?void 0:i.scrollWidth;c-e<s?(E(!1),M(!1)):l<=e?(E(!1),M(!0)):l+s>c-e?(E(!0),M(!1)):l+e>0&&l<c-e&&(E(!0),M(!0))}(t)}return a((()=>{S()}),[]),a((()=>(window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[v,c,d]),a((()=>{w(0),S()}),[r,v,c]),a((()=>{P();const e=new ResizeObserver(P);return e.observe(u.current),()=>{e.disconnect()}}),[r,d]),e.createElement("div",{className:"eko-nav-container",ref:v,style:{opacity:h>0?1:0,height:""+(h&&f?h+"px":"auto")}},e.createElement(je,{layout:s,nav:u,isVerticalNav:f,showPrevArrow:x,showNextArrow:I}),e.createElement("ul",{className:`eko-nav eko-mobile-nav-selected-${null!==(j=null==s||null===(q=s.mobile)||void 0===q||null===(q=q.config)||void 0===q?void 0:q.navItemsSelectedType)&&void 0!==j?j:"underline"} eko-desktop-nav-selected-${null!==(T=null==s||null===(A=s.desktop)||void 0===A||null===(A=A.config)||void 0===A?void 0:A.navItemsSelectedType)&&void 0!==T?T:"underline"}`,ref:u,onScroll:function(){P()},onWheel:function(){D("wheel")},onTouchMove:function(){D("swipe")}},null==r?void 0:r.map(((n,o)=>{var t;const a=(null==n||null===(t=n.media)||void 0===t?void 0:t.url)||(null==n?void 0:n.media)||"";return e.createElement(Pe,{key:a+o,index:o,activeIndex:null==l?void 0:l.index,setActiveIndex:i,item:n,src:a,navItemRefs:p,itemIcon:null==n?void 0:n.icon})}))));var j,q,T,A};function Ce(){C.track("gallery.cover.displayed")}Te.propTypes={items:xe.array.isRequired,activeIndex:xe.object,setActiveIndex:xe.func.isRequired,layout:xe.object,carouselMounted:xe.bool,forceMobile:xe.bool};const Ae=({item:o,src:t,srcset:r,sizes:i,isCoverElement:l})=>{const s=n(null);return a((()=>{var e;if(l){if(null===(e=s.current)||void 0===e||!e.complete)return s.current.addEventListener("load",Ce,{once:!0}),()=>{var e;null===(e=s.current)||void 0===e||e.removeEventListener("load",Ce,{once:!0})};Ce()}}),[]),e.createElement("img",{ref:s,src:t,srcSet:r,sizes:i,alt:o.name,style:{width:"100%",height:"100%"}})};Ae.propTypes={item:xe.object.isRequired,src:xe.string,srcset:xe.string,sizes:xe.string,isCoverElement:xe.bool};const $e=qe((e=>{var n;n=e,C.track("gallery.interaction",{elementid:"carousel",interactiontype:n}),De.send("interaction",{elementid:"carousel",interactiontype:n})}),200);function Oe(){$e("wheel")}const Re=({items:r,setActiveIndex:i,activeIndex:l,showSmartLoaders:s})=>{const c=n(null),d=n([]);d.current=null==r?void 0:r.map(((e,n)=>{var o,a;return null!==(o=null==d||null===(a=d.current)||void 0===a?void 0:a[n])&&void 0!==o?o:t()}));const[u,k]=o(),[v,p]=o();function m(){const e=function(e){const n=e.scrollLeft,o=e.scrollWidth-e.clientWidth;return 0===n?0:n>o?100:n/o*100}(c.current)*(null==r?void 0:r.length)/100,n=Math.trunc(e);n===l.index&&i({index:n,source:""}),"nav"!==l.source&&(n>(null==r?void 0:r.length)-1?i({index:(null==r?void 0:r.length)-1,source:"carousel"}):i({index:n,source:"carousel"}))}return a((()=>{var e;let n=null===(e=d.current)||void 0===e?void 0:e[l.index];if(n&&"nav"===l.source){const e=n.current,o=c.current.clientWidth/2,t=(null==e?void 0:e.clientWidth)/2;c.current.scrollTo({left:(null==e?void 0:e.offsetLeft)-o+t,behavior:"smooth"})}return null==c||c.current.addEventListener("scroll",m),()=>{var e;null==c||null===(e=c.current)||void 0===e||e.removeEventListener("scroll",m)}}),[l]),e.createElement("ul",{className:"eko-carousel",ref:c,onScroll:m,onWheel:Oe,onTouchMove:function(e){p(e.targetTouches[0].clientX)},onTouchStart:function(e){k(e.targetTouches[0].clientX),p(null)},onTouchEnd:function(){v&&u&&(u-v>75||u-v<-75)&&$e("swipe")}},null==r?void 0:r.map(((n,o)=>{const t=(null==n?void 0:n.cover)||(null==n?void 0:n.media),a=(null==t?void 0:t.url)||t;return e.createElement("li",{className:"eko-carousel-item",key:a+o,ref:d.current[o]},e.createElement(Ae,{item:n,src:a,srcset:null==t?void 0:t.srcset,sizes:null==t?void 0:t.sizes,isCoverElement:0===o}),s&&"image"!==n.type&&e.createElement("div",{className:"eko-smart-loading"},e.createElement("div",null),e.createElement("p",null,"Loading video experience")))})))};function Ne(e){var n;return function(e){var n;return"eko.block.event"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)&&"GalleryBlock"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.blockType)}Re.propTypes={items:xe.array.isRequired,setActiveIndex:xe.func.isRequired,activeIndex:xe.object,showSmartLoaders:xe.bool};const Be="eko.project.invoke",_e="eko.block.invoke";function ze(e,n,o){var t;null!=e&&e.contentWindow&&(null==e||null===(t=e.contentWindow)||void 0===t||t.postMessage({target:"eko.embedapi",type:n,data:o},"*"))}function Fe(e){return`#variantId=${e}`}const Le=({config:t,instanceId:r,setActiveIndex:i,activeIndex:l,variantId:s,smartGalleryLoaded:c,onLoad:d,forceMobile:u})=>{var v,p,m;const g=null!==(v=null===(p=t.options)||void 0===p?void 0:p.galleryEnv)&&void 0!==v?v:"",y=null===(m=t.__autoGenerated)||void 0===m||null===(m=m.publishItem)||void 0===m?void 0:m.id,f=function(e={}){let n="";return Object.entries(e).forEach((([e,o])=>{n+=`&${e}=${o}`})),n}(null==t?void 0:t.qp),b=function(e,n,o){return`https://${e}play.eko.com/embed?${o?`id=${o}`:`piid=${n}`}&nocover=true&galleryBlockMode=gallery&eko_pixel=true`}(g,y,r),h=n(null),w=n(null),x=n(!1),[E,I]=o(Fe(s||"ekonovar")),[M,S]=o(b+f+E);let D;return a((()=>{x.current?ze(null==w?void 0:w.current,Be,{action:"updateVariant",args:{id:s}}):I(Fe(s))}),[s]),a((()=>{ze(null==w?void 0:w.current,_e,{action:"updateActiveItem",args:{activeItemIndex:null==l?void 0:l.index}})}),[l]),a((()=>{function e(e){if((function(e){var n;return"eko.project.blockstart"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)||function(e){var n,o;return"eko.project.started"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)&&(null==e||null===(o=e.data)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.started)}(e))&&!x.current)return ze(null==w?void 0:w.current,_e,{action:"updateActiveItem",args:{activeItemIndex:null==l?void 0:l.index}}),void(x.current=!0);if(x.current){if(function(e){var n;return Ne(e)&&"activeItemChanged"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)}(e))return void function(e){const n=e.data.data.data.activeItemIndex;n!==(null==l?void 0:l.index)&&i({index:n,source:"carousel"})}(e);(function(e){var n;return Ne(e)&&"activeItemChangeDone"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)})(e)&&!c&&(C.track("gallery.project.display"),d())}}return D=u||k()?"mobile":"desktop",function(e,n={}){window.addEventListener("message",e,n)}(e),()=>{!function(e,n={}){window.removeEventListener("message",e,n)}(e)}}),[l]),a((()=>{x.current||ze(null==w?void 0:w.current,Be,{action:"queryProjectStarted"})}),[l,c]),a((()=>{x.current=!1}),[t]),a((()=>{S(b+f+E)}),[E]),e.createElement("div",{className:"eko-smart-gallery-container "+(c?"":"eko-project-not-ready"),ref:h,"data-type":"smart-gallery","data-qp":f,"aria-label":"smart gallery","data-variant":s,"data-device":D},e.createElement("iframe",{allow:"autoplay; fullscreen",src:M,style:{border:0},ref:w}))};Le.propTypes={config:xe.object.isRequired,instanceId:xe.string,setActiveIndex:xe.func.isRequired,activeIndex:xe.object.isRequired,variantId:xe.string,smartGalleryLoaded:xe.bool,onLoad:xe.func,forceMobile:xe.bool};const We=()=>e.createElement("style",{suppressHydrationWarning:!0},'.eko-gallery {\n --accentColorEko: #000;\n --primaryColorEko: #000;\n --backgroundColorEko: #25D7A2;\n --navItemsBackgroundColorEko: transparent;\n --navItemsBannerBackgroundColorEko: #EEEEEE;\n --carouselItemsBackgroundColorEko: transparent;\n --carouselInteractiveCoverBackgroundColorEko: transparent;\n --galleryGapEkoMobile: 12px;\n --galleryGapEkoDesktop: 12px;\n --galleryPaddingEkoMobile: 0;\n --galleryPaddingEkoDesktop: 0;\n --galleryMaxWidthEkoMobile: 100%;\n --galleryMaxWidthEkoDesktop: 900px;\n --galleryTransition: .8s cubic-bezier(.35, 0, 0, 1) 1.5s;\n --navBarPaddingEkoMobile: 0 0 0 20px;\n --navBarPaddingEkoDesktop: 0;\n --navItemsWidthEkoMobile: 80px;\n --navItemsWidthEkoDesktop: 80px;\n --navItemsHeightEkoMobile: 80px;\n --navItemsHeightEkoDesktop: 80px;\n --navItemsGapEkoMobile: 14px;\n --navItemsGapEkoDesktop: 14px;\n --navItemsRadiusEkoMobile: 8px;\n --navItemsRadiusEkoDesktop: 8px;\n --navItemsSelectedMarginEkoMobile: 3px;\n --navItemsSelectedMarginEkoDesktop: 3px;\n --navItemsSelectedThicknessEkoMobile: 3px;\n --navItemsSelectedThicknessEkoDesktop: 3px;\n --navItemsSelectedUnderlineRadiusEkoMobile: 100px;\n --navItemsSelectedUnderlineRadiusEkoDesktop: 100px;\n --navItemsObjectFitEkoMobile: cover;\n --navItemsObjectFitEkoDesktop: cover;\n --navMediaBadgeSizeEkoMobile: 22px;\n --navMediaBadgeSizeEkoDesktop: 22px;\n --navMediaBadgeMarginTopEkoMobile: 4px;\n --navMediaBadgeMarginTopEkoDesktop: 4px;\n --navMediaBadgeMarginRightEkoMobile: 4px;\n --navMediaBadgeMarginRightEkoDesktop: 4px;\n --carouselItemsAspectRatioEkoMobile: 1 / 1;\n --carouselItemsAspectRatioEkoDesktop: 1 / 1;\n --carouselItemsRadiusEkoMobile: 0px;\n --carouselItemsRadiusEkoDesktop: 12px;\n --carouselItemsObjectFitEkoMobile: cover;\n --carouselItemsObjectFitEkoDesktop: cover;\n --navBannerFontSizeEkoMobile: 12px;\n --navBannerFontSizeEkoDesktop: 12px;\n --navBannerFontLineHeightEkoMobile: 120%;\n --navBannerFontLineHeightEkoDesktop: 120%;\n --navBannerFontFamilyEkoMobile: inherit;\n --navBannerFontFamilyEkoDesktop: inherit;\n --navBannerFontWeightEkoMobile: 400;\n --navBannerFontWeightEkoDesktop: 400;\n --outerWidth: 0\n}\n\n.eko-gallery * {\n box-sizing: border-box\n}\n\n.eko-gallery ul,\n.eko-gallery li {\n padding: 0;\n text-indent: 0;\n list-style-type: none;\n font-size: 0;\n margin: 0\n}\n\n.eko-gallery button {\n border: none;\n padding: 0\n}\n\n.eko-gallery .eko-hidden {\n display: none !important\n}\n\n.eko-gallery .eko-not-visible {\n visibility: hidden !important\n}\n\n.eko-hidden-variant {\n display: none !important\n}\n\n.eko-sr-only {\n width: 1px;\n height: 1px;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden\n}\n\n.eko-sticky-top {\n position: sticky;\n top: 0\n}\n\n.eko-gallery .eko-nav {\n height: 100%;\n display: flex;\n align-items: start;\n align-self: start;\n flex-shrink: 0;\n scrollbar-width: none;\n -ms-overflow-style: none\n}\n\n.eko-gallery .eko-nav li {\n font-size: 0;\n position: relative;\n display: flex;\n flex-shrink: 0;\n justify-content: center;\n -webkit-box-pack: center;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button {\n position: relative;\n background-color: transparent;\n border-radius: 0;\n line-height: 0;\n overflow: hidden;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button img {\n background-color: var(--navItemsBackgroundColorEko);\n pointer-events: none\n}\n\n.eko-gallery .eko-nav li button .item-icon {\n position: absolute;\n top: 0;\n right: 0;\n width: 32px;\n height: 32px;\n transform: scale(.25);\n transform-origin: top right\n}\n\n.eko-gallery .eko-nav li button .item-icon span {\n display: block;\n width: 400%;\n height: 400%;\n position: absolute;\n top: 0;\n right: 0;\n background-position: top right;\n background-repeat: no-repeat;\n background-size: contain\n}\n\n.eko-gallery .eko-nav li .addons-container {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n font-size: 10px;\n line-height: 100%\n}\n\n.eko-gallery .eko-nav li .addons-container .thumb-label {\n width: 100%;\n background: var(--navItemsBannerBackgroundColorEko);\n padding: 4px;\n text-align: center;\n text-wrap: balance;\n color: var(--primaryColorEko)\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 5px;\n padding: 6px\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator span {\n width: 5px;\n height: 5px;\n border-radius: 100px;\n background: #fff;\n box-shadow: 0 0 3px #00000094\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label {\n position: relative\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .step-indicator {\n position: absolute;\n bottom: 0\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .thumb-label {\n align-content: center\n}\n\n.eko-gallery .eko-nav::-webkit-scrollbar {\n display: none\n}\n\n.eko-nav-container {\n display: flex\n}\n\n.eko-nav-container:has(.eko-nav.eko-not-visible) .eko-nav-arrow {\n display: none\n}\n\n.eko-nav-container {\n position: relative;\n opacity: 0;\n transition: opacity .15s ease-in\n}\n\n.eko-nav-container .eko-nav-arrow {\n width: 28px;\n height: 28px;\n position: absolute;\n display: none;\n justify-content: center;\n align-items: center;\n border-radius: 28px;\n background-color: #fff;\n box-shadow: 0 0 6px #0000001f;\n z-index: 1;\n bottom: 50%;\n opacity: 1;\n transition: opacity .15s ease-in;\n transform: translateY(50%);\n cursor: pointer\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button svg,\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button svg {\n padding: 1px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button {\n left: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button {\n right: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-hidden-nav-button {\n opacity: 0;\n pointer-events: none\n}\n\n.eko-gallery .eko-nav {\n gap: var(--navItemsGapEkoMobile);\n padding: var(--navBarPaddingEkoMobile)\n}\n\n.eko-gallery .eko-nav li button img {\n width: var(--navItemsWidthEkoMobile);\n height: var(--navItemsHeightEkoMobile);\n object-fit: var(--navItemsObjectFitEkoMobile)\n}\n\n.eko-gallery .eko-nav li .addons-container .thumb-label {\n font-family: var(--navBannerFontFamilyEkoMobile);\n font-size: var(--navBannerFontSizeEkoMobile);\n line-height: var(--navBannerFontLineHeightEkoMobile);\n font-weight: var(--navBannerFontWeightEkoMobile)\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .thumb-label {\n width: var(--navItemsWidthEkoMobile);\n height: var(--navItemsHeightEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li {\n padding-bottom: calc(var(--navItemsSelectedThicknessEkoMobile) + var(--navItemsSelectedMarginEkoMobile))\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li button {\n border-radius: var(--navItemsRadiusEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li[aria-current=true]:after {\n content: "";\n width: 100%;\n height: var(--navItemsSelectedThicknessEkoMobile);\n border-radius: var(--navItemsSelectedUnderlineRadiusEkoMobile);\n background-color: var(--accentColorEko);\n display: block;\n position: absolute;\n bottom: 0;\n left: 0\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li {\n padding: var(--navItemsSelectedMarginEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li button {\n border-radius: var(--navItemsRadiusEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li[aria-current=true] {\n border-radius: calc(var(--navItemsRadiusEkoMobile) + var(--navItemsSelectedMarginEkoMobile));\n box-shadow: 0 0 0 var(--navItemsSelectedThicknessEkoMobile) var(--accentColorEko)\n}\n\n@media screen and (min-width: 768px) {\n .eko-gallery.eko-liquid-gallery .eko-nav {\n gap: var(--navItemsGapEko