PageSourceSearch

https://shop.merch.google/canada/_next/static/chunks/3271-84e869bf32056e79.js

js merch.google collected 2026-09-24 09:40:31 UTC 44,811 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3271],{86664:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function u(e,t){if(null==e)return{};var n,r,o=a(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function s(e,t){return c(e)||l(e,t)||p(e,t)||d()}function c(e){if(Array.isArray(e))return e}function l(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){u=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}function p(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){return e(t={exports:{}},t.exports),t.exports}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function y(){}function v(){}v.resetWarningCache=y;var g=function(){function e(e,t,n,r,o,i){if(i!==h){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:v,resetWarningCache:y};return n.PropTypes=n,n},b=m((function(e){e.exports=g()})),E=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},O=function(e){return null!==e&&"object"===o(e)},S=function(e){return O(e)&&"function"===typeof e.then},C=function(e){return O(e)&&"function"===typeof e.elements&&"function"===typeof e.createToken&&"function"===typeof e.createPaymentMethod&&"function"===typeof e.confirmCardPayment},P="[object Object]",w=function e(t,n){if(!O(t)||!O(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===P;if(o!==(Object.prototype.toString.call(n)===P))return!1;if(!o&&!r)return t===n;var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var u={},s=0;s<i.length;s+=1)u[i[s]]=!0;for(var c=0;c<a.length;c+=1)u[a[c]]=!0;var l=Object.keys(u);if(l.length!==i.length)return!1;var p=t,f=n,d=function(t){return e(p[t],f[t])};return l.every(d)},k=function(e,t,n){return O(e)?Object.keys(e).reduce((function(o,a){var u=!O(t)||!w(e[a],t[a]);return n.includes(a)?(u&&console.warn("Unsupported prop change: options.".concat(a," is not a mutable property.")),o):u?r(r({},o||{}),{},i({},a,e[a])):o}),null):null},I="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;if(null===e||C(e))return e;throw new Error(t)},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;if(S(e))return{tag:"async",stripePromise:Promise.resolve(e).then((function(e){return x(e,t)}))};var n=x(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},j=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.4.0"}),e.registerAppInfo({name:"react-stripe-js",version:"2.4.0",url:"https://stripe.com/docs/stripe-js/react"}))},A=["on","session"],N=t.createContext(null);N.displayName="CustomCheckoutSdkContext";var R=function(e,t){if(!e)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CustomCheckoutProvider> provider."));return e},_=t.createContext(null);_.displayName="CustomCheckoutContext";var U=function(e,t){if(!e)return null;e.on,e.session;var n=u(e,A);return r(r({},n),t||e.session())},M="Invalid prop `stripe` supplied to `CustomCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",D=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo((function(){return T(n,M)}),[n]),a=s(t.useState(null),2),u=a[0],c=a[1],l=s(t.useState((function(){return{stripe:"sync"===i.tag?i.stripe:null,customCheckoutSdk:null}})),2),p=l[0],f=l[1],d=function(e,t){f((function(n){return n.stripe&&n.customCheckoutSdk?n:{stripe:e,customCheckoutSdk:t}}))},m=t.useRef(!1);t.useEffect((function(){var e=!0;return"async"!==i.tag||p.stripe?"sync"===i.tag&&i.stripe&&!m.current&&(m.current=!0,i.stripe.initCustomCheckout(r).then((function(e){e&&(d(i.stripe,e),e.on("change",c))}))):i.stripePromise.then((function(t){t&&e&&!m.current&&(m.current=!0,t.initCustomCheckout(r).then((function(e){e&&(d(t,e),e.on("change",c))})))})),function(){e=!1}}),[i,p,r,c]);var h=E(n);t.useEffect((function(){null!==h&&h!==n&&console.warn("Unsupported prop change on CustomCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[h,n]);var y=E(r);t.useEffect((function(){var e,t;if(p.customCheckoutSdk){!r.clientSecret||O(y)||w(r.clientSecret,y.clientSecret)||console.warn("Unsupported prop change: options.client_secret is not a mutable property.");var n=null===y||void 0===y||null===(e=y.elementsOptions)||void 0===e?void 0:e.appearance,o=null===r||void 0===r||null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance;o&&!w(o,n)&&p.customCheckoutSdk.changeAppearance(o)}}
1),[r,y,p.customCheckoutSdk]),t.useEffect((function(){j(p.stripe)}),[p.stripe]);var v=t.useMemo((function(){return U(p.customCheckoutSdk,u)}),[p.customCheckoutSdk,u]);return p.customCheckoutSdk?t.createElement(N.Provider,{value:p},t.createElement(_.Provider,{value:v},o)):null};D.propTypes={stripe:b.any,options:b.shape({clientSecret:b.string.isRequired,elementsOptions:b.object}).isRequired};var q=function(e){var n=t.useContext(N);return R(n,e)},L=function(e){var n=t.useContext(N),r=t.useContext(K);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CustomCheckoutProvider> and <Elements> providers."));return n?R(n,e):B(r,e)},F=function(){q("calls useCustomCheckout()");var e=t.useContext(_);if(!e)throw new Error("Could not find CustomCheckout Context; You need to wrap the part of your app that calls useCustomCheckout() in an <CustomCheckoutProvider> provider.");return e},K=t.createContext(null);K.displayName="ElementsContext";var B=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},W=t.createContext(null);W.displayName="CartElementContext";var Y=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},H=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo((function(){return T(n)}),[n]),a=s(t.useState(null),2),u=a[0],c=a[1],l=s(t.useState(null),2),p=l[0],f=l[1],d=s(t.useState((function(){return{stripe:"sync"===i.tag?i.stripe:null,elements:"sync"===i.tag?i.stripe.elements(r):null}})),2),m=d[0],h=d[1];t.useEffect((function(){var e=!0,t=function(e){h((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==i.tag||m.stripe?"sync"!==i.tag||m.stripe||t(i.stripe):i.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[i,m,r]);var y=E(n);t.useEffect((function(){null!==y&&y!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[y,n]);var v=E(r);return t.useEffect((function(){if(m.elements){var e=k(r,v,["clientSecret","fonts"]);e&&m.elements.update(e)}}),[r,v,m.elements]),t.useEffect((function(){j(m.stripe)}),[m.stripe]),t.createElement(K.Provider,{value:m},t.createElement(W.Provider,{value:{cart:u,setCart:c,cartState:p,setCartState:f}},o))};H.propTypes={stripe:b.any,options:b.object};var V=function(e){var n=t.useContext(K);return B(n,e)},G={cart:null,cartState:null,setCart:function(){},setCartState:function(){}},z=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.useContext(W);return n?G:Y(r,e)},J=function(){return V("calls useElements()").elements},$=function(){return L("calls useStripe()").stripe},X=function(){return z("calls useCartElement()").cart},Q=function(){return z("calls useCartElementState()").cartState},Z=function(e){return(0,e.children)(V("mounts <ElementsConsumer>"))};Z.propTypes={children:b.func.isRequired};var ee=function(e,n,r){var o=!!r,i=t.useRef(r);t.useEffect((function(){i.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){i.current&&i.current.apply(i,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,i])},te=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ne=function(e,n){var r="".concat(te(e),"Element"),o=n?function(e){var n=L("mounts <".concat(r,">"));z("mounts <".concat(r,">"),"customCheckoutSdk"in n);var o=e.id,i=e.className;return t.createElement("div",{id:o,className:i})}:function(n){var o,i=n.id,a=n.className,u=n.options,c=void 0===u?{}:u,l=n.onBlur,p=n.onFocus,f=n.onReady,d=n.onChange,m=n.onEscape,h=n.onClick,y=n.onLoadError,v=n.onLoaderStart,g=n.onNetworksChange,b=n.onCheckout,O=n.onLineItemClick,S=n.onConfirm,C=n.onCancel,P=n.onShippingAddressChange,w=n.onShippingRateChange,I=L("mounts <".concat(r,">")),x="elements"in I?I.elements:null,T="customCheckoutSdk"in I?I.customCheckoutSdk:null,j=s(t.useState(null),2),A=j[0],N=j[1],R=t.useRef(null),_=t.useRef(null),U=z("mounts <".concat(r,">"),"customCheckoutSdk"in I),M=U.setCart,D=U.setCartState;ee(A,"blur",l),ee(A,"focus",p),ee(A,"escape",m),ee(A,"click",h),ee(A,"loaderror",y),ee(A,"loaderstart",v),ee(A,"networksch
1ange",g),ee(A,"lineitemclick",O),ee(A,"confirm",S),ee(A,"cancel",C),ee(A,"shippingaddresschange",P),ee(A,"shippingratechange",w),"cart"===e?o=function(e){D(e),f&&f(e)}:f&&(o="expressCheckout"===e?f:function(){f(A)}),ee(A,"ready",o),ee(A,"change","cart"===e?function(e){D(e),d&&d(e)}:d),ee(A,"checkout","cart"===e?function(e){D(e),b&&b(e)}:b),t.useLayoutEffect((function(){if(null===R.current&&null!==_.current&&(x||T)){var t=null;T?t=T.createElement(e,c):x&&(t=x.create(e,c)),"cart"===e&&M&&M(t),R.current=t,N(t),t&&t.mount(_.current)}}),[x,T,c,M]);var q=E(c);return t.useEffect((function(){if(R.current){var e=k(c,q,["paymentRequest"]);e&&R.current.update(e)}}),[c,q]),t.useLayoutEffect((function(){return function(){if(R.current&&"function"===typeof R.current.destroy)try{R.current.destroy(),R.current=null}catch(e){}}}),[]),t.createElement("div",{id:i,className:a,ref:_})};return o.propTypes={id:b.string,className:b.string,onChange:b.func,onBlur:b.func,onFocus:b.func,onReady:b.func,onEscape:b.func,onClick:b.func,onLoadError:b.func,onLoaderStart:b.func,onNetworksChange:b.func,onCheckout:b.func,onLineItemClick:b.func,onConfirm:b.func,onCancel:b.func,onShippingAddressChange:b.func,onShippingRateChange:b.func,options:b.object},o.displayName=r,o.__elementType=e,o},re="undefined"===typeof window,oe=t.createContext(null);oe.displayName="EmbeddedCheckoutProviderContext";var ie=function(){var e=t.useContext(oe);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},ae="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ue=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo((function(){return T(n,ae)}),[n]),a=t.useRef(null),u=t.useRef(null),c=s(t.useState({embeddedCheckout:null}),2),l=c[0],p=c[1];t.useEffect((function(){if(!u.current&&!a.current){var e=function(e){u.current||a.current||(u.current=e,a.current=u.current.initEmbeddedCheckout(r).then((function(e){p({embeddedCheckout:e})})))};"async"===i.tag&&!u.current&&r.clientSecret?i.stripePromise.then((function(t){t&&e(t)})):"sync"===i.tag&&!u.current&&r.clientSecret&&e(i.stripe)}}),[i,r,l,u]),t.useEffect((function(){return function(){l.embeddedCheckout?(a.current=null,l.embeddedCheckout.destroy()):a.current&&a.current.then((function(){a.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()}))}}),[l.embeddedCheckout]),t.useEffect((function(){j(u)}),[u]);var f=E(n);t.useEffect((function(){null!==f&&f!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[f,n]);var d=E(r);return t.useEffect((function(){null!=d&&(null!=r?(null!=d.clientSecret&&r.clientSecret!==d.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.onComplete&&r.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))}),[d,r]),t.createElement(oe.Provider,{value:l},o)},se=function(e){var n=e.id,r=e.className,o=ie().embeddedCheckout,i=t.useRef(!1),a=t.useRef(null);return t.useLayoutEffect((function(){return!i.current&&o&&null!==a.current&&(o.mount(a.current),i.current=!0),function(){if(i.current&&o)try{o.unmount(),i.current=!1}catch(e){}}}),[o]),t.createElement("div",{ref:a,id:n,className:r})},ce=function(e){var n=e.id,r=e.className;return ie(),t.createElement("div",{id:n,className:r})},le=re?ce:se,pe=ne("auBankAccount",re),fe=ne("card",re),de=ne("cardNumber",re),me=ne("cardExpiry",re),he=ne("cardCvc",re),ye=ne("fpxBank",re),ve=ne("iban",re),ge=ne("idealBank",re),be=ne("p24Bank",re),Ee=ne("epsBank",re),Oe=ne("payment",re),Se=ne("expressCheckout",re),Ce=ne("paymentRequestButton",re),Pe=ne("linkAuthentication",re),we=ne("address",re),ke=ne("shippingAddress",re),Ie=ne("cart",re),xe=ne("paymentMethodMessaging",re),Te=ne("affirmMessage",re),je=ne("afterpayClearpayMessage",re);e.AddressElement=we,e.AffirmMessageElement=Te,e.AfterpayClearpayMessageElement=je,e.AuBankAccountElement=pe,e.CardCvcElement=he,e.CardElement=fe,e.CardExpiryElement=me,e.CardNumberElement=de,e.CartElement=Ie,e.CustomCheckoutProvider=D,e.Elements=H,e.ElementsConsumer=Z,e.EmbeddedCheckout=le,e.EmbeddedCheckoutProvider=ue,e.EpsBankElement=Ee,e.ExpressCheckoutElement=Se,e.FpxBankElement=ye,e.IbanElement=ve,e.IdealBankElement=ge,e.LinkAuthenticationElement=Pe,e.P24BankElement=be,e.PaymentElement=Oe,e.PaymentMethodMessagingElement=xe,e.PaymentRequestButtonElement=Ce,e.ShippingAddressElement=ke,e.useCartElement=X,e.useCartElementState=Q,e.useCustomCheckout=F,e.useElements=J,e.useStripe=$,Object.defineProperty(e,"__esMo
1dule",{value:!0})}(t,n(67294))},54465:function(e,t,n){"use strict";n.d(t,{J:function(){return h}});var r,o="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",u=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(o).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},s=null,c=null,l=null,p=function(e){return null!==s?s:(s=new Promise((function(t,n){if("undefined"!==typeof window&&"undefined"!==typeof document)if(window.Stripe&&e&&console.warn(a),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(o,'"]')),t=0;t<e.length;t++){var n=e[t];if(i.test(n.src))return n}return null}();if(r&&e)console.warn(a);else if(r){if(r&&null!==l&&null!==c){var s;r.removeEventListener("load",l),r.removeEventListener("error",c),null===(s=r.parentNode)||void 0===s||s.removeChild(r),r=u(e)}}else r=u(e);l=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}}(t,n),c=function(e){return function(){e(new Error("Failed to load Stripe.js"))}}(n),r.addEventListener("load",l),r.addEventListener("error",c)}catch(p){return void n(p)}else t(null)}))).catch((function(e){return s=null,Promise.reject(e)}))},f=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"2.3.0",startTime:t})}(r,n),r},d=!1,m=function(){return r||(r=p(null).catch((function(e){return r=null,Promise.reject(e)})))};Promise.resolve().then((function(){return m()})).catch((function(e){d||console.warn(e)}));var h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];d=!0;var r=Date.now();return m().then((function(e){return f(e,t,r)}))}},1742:function(e,t,n){!function(e,t){"use strict";function n(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p="1.5.4",f={MANDATORY_INITIALIZATION_MISSING:{message:"Missing urlEndpoint during SDK initialization",help:""},INVALID_TRANSFORMATION_POSITION:{message:"Invalid transformationPosition parameter",help:""},PRIVATE_KEY_CLIENT_SIDE:{message:"privateKey should not be passed on the client side",help:""},MISSING_UPLOAD_DATA:{message:"Missing data for upload",help:""},MISSING_UPLOAD_FILE_PARAMETER:{message:"Missing file parameter for upload",help:""},MISSING_UPLOAD_FILENAME_PARAMETER:{message:"Missing fileName parameter for upload",help:""},MISSING_AUTHENTICATION_ENDPOINT:{message:"Missing authentication endpoint for upload",help:""},MISSING_PUBLIC_KEY:{message:"Missing public key for upload",help:""},AUTH_ENDPOINT_TIMEOUT:{message:"The authenticationEndpoint you provided timed out in 60 seconds",help:""}
1,AUTH_ENDPOINT_NETWORK_ERROR:{message:"Request to authenticationEndpoint failed due to network error",help:""},AUTH_INVALID_RESPONSE:{message:"Invalid response from authenticationEndpoint. The SDK expects a JSON response with three fields i.e. signature, token and expire.",help:""},UPLOAD_ENDPOINT_NETWORK_ERROR:{message:"Request to ImageKit upload endpoint failed due to network error",help:""},INVALID_UPLOAD_OPTIONS:{message:"Invalid uploadOptions parameter",help:""}};function d(e,t,n){"function"==typeof n&&(e?n(t,null):n(null,t))}function m(e){var t={},n=e.getAllResponseHeaders();return Object.keys(n).length&&n.trim().split(/[\r\n]+/).map((function(e){return e.split(/: /)})).forEach((function(e){t[e[0].trim()]=e[1].trim()})),t}var h=function(e,t){var n=l({},e),r={statusCode:t.status,headers:m(t)};return Object.defineProperty(n,"$ResponseMetadata",{value:r,enumerable:!1,writable:!1}),n},y=function(e,t,n,r){v(n.authenticationEndpoint).then((function(n){t.append("signature",n.signature),t.append("expire",String(n.expire)),t.append("token",n.token),g(e,t).then((function(e){return d(!1,e,r)}),(function(e){return d(!0,e,r)}))}),(function(e){return d(!0,e,r)}))},v=function(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.timeout=6e4;var o=new URL(e);o.searchParams.set("t",Math.random().toString()),r.open("GET",o.toString()),r.ontimeout=function(e){return n(f.AUTH_ENDPOINT_TIMEOUT)},r.onerror=function(){return n(f.AUTH_ENDPOINT_NETWORK_ERROR)},r.onload=function(){if(200!==r.status)return n(f.AUTH_INVALID_RESPONSE);try{var e=JSON.parse(r.responseText),o={signature:e.signature,expire:e.expire,token:e.token};return o.signature&&o.expire&&o.token?t(o):n(f.AUTH_INVALID_RESPONSE)}catch(i){return n(f.AUTH_INVALID_RESPONSE)}},r.send()}))},g=function(e,t){return new Promise((function(n,r){e.open("POST","https://upload.imagekit.io/api/v1/files/upload"),e.onerror=function(e){return r(f.UPLOAD_ENDPOINT_NETWORK_ERROR)},e.onload=function(){if(200===e.status)try{var t=JSON.parse(e.responseText),o=h(t,e);return n(o)}catch(a){return r(a)}else try{t=JSON.parse(e.responseText);var i=h(t,e);return r(i)}catch(a){return r(a)}},e.send(t)}))},b=function(e,t,n,r){if(t.file)if(t.fileName)if(n.authenticationEndpoint)if(n.publicKey){var i,a=new FormData;for(i in t)i&&("file"===i&&"string"!=typeof t.file?a.append("file",t.file,String(t.fileName)):"tags"===i&&Array.isArray(t.tags)?a.append("tags",t.tags.join(",")):"responseFields"===i&&Array.isArray(t.responseFields)?a.append("responseFields",t.responseFields.join(",")):"extensions"===i&&Array.isArray(t.extensions)?a.append("extensions",JSON.stringify(t.extensions)):"customMetadata"!==i||"object"!==o(t.customMetadata)||Array.isArray(t.customMetadata)||null===t.customMetadata?void 0!==t[i]&&a.append(i,String(t[i])):a.append("customMetadata",JSON.stringify(t.customMetadata)));a.append("publicKey",n.publicKey),y(e,a,l(l({},n),{},{authenticationEndpoint:n.authenticationEndpoint}),r)}else d(!0,f.MISSING_PUBLIC_KEY,r);else d(!0,f.MISSING_AUTHENTICATION_ENDPOINT,r);else d(!0,f.MISSING_UPLOAD_FILENAME_PARAMETER,r);else d(!0,f.MISSING_UPLOAD_FILE_PARAMETER,r)},E={width:"w",height:"h",aspectRatio:"ar",quality:"q",crop:"c",cropMode:"cm",focus:"fo",x:"x",y:"y",format:"f",radiu
1s:"r",background:"bg",border:"b",rotation:"rt",rotate:"rt",blur:"bl",named:"n",overlayImage:"oi",overlayImageAspectRatio:"oiar",overlayImageBackground:"oibg",overlayImageBorder:"oib",overlayImageDPR:"oidpr",overlayImageQuality:"oiq",overlayImageCropping:"oic",overlayImageTrim:"oit",overlayX:"ox",overlayY:"oy",overlayFocus:"ofo",overlayHeight:"oh",overlayWidth:"ow",overlayText:"ot",overlayTextFontSize:"ots",overlayTextFontFamily:"otf",overlayTextColor:"otc",overlayTextTransparency:"oa",overlayAlpha:"oa",overlayTextTypography:"ott",overlayBackground:"obg",overlayTextEncoded:"ote",overlayTextWidth:"otw",overlayTextBackground:"otbg",overlayTextPadding:"otp",overlayTextInnerAlignment:"otia",overlayRadius:"or",progressive:"pr",lossless:"lo",trim:"t",metadata:"md",colorProfile:"cp",defaultImage:"di",dpr:"dpr",effectSharpen:"e-sharpen",effectUSM:"e-usm",effectContrast:"e-contrast",effectGray:"e-grayscale",original:"orig",raw:"raw"},O="path",S="query",C=[O,S],P=":",w=",",k="-",I={getDefault:function(){return O},addAsQueryParameter:function(e){return e.transformationPosition===S},validParameters:function(e){return"undefined"!=typeof e.transformationPosition&&-1!=C.indexOf(e.transformationPosition)},getTransformKey:function(e){return e&&(E[e]||E[e.toLowerCase()])||""},getChainTransformDelimiter:function(){return P},getTransformDelimiter:function(){return w},getTransformKeyValueDelimiter:function(){return k}},x="tr";function T(e){return"string"==typeof e&&"/"==e[e.length-1]&&(e=e.substring(0,e.length-1)),e}function j(e){return"string"==typeof e&&"/"==e[0]&&(e=e.slice(1)),e}function A(e,t){var n=t||"/",r=new RegExp(n+"{1,}","g");return e.join(n).replace(r,n)}var N=function(e){if(!e.path&&!e.src)return"";var t,n,r;try{e.path?(r=new URL(e.urlEndpoint).pathname,t=new URL(A([e.urlEndpoint.replace(r,""),e.path]))):(t=new URL(e.src),n=!0)}catch(a){return console.error(a),""}for(var o in e.queryParameters)t.searchParams.append(o,String(e.queryParameters[o]));var i=R(e.transformation);return i&&i.length&&(I.addAsQueryParameter(e)||n?t.searchParams.append(x,i):t.pathname=A([x+I.getChainTransformDelimiter()+i,t.pathname])),t.pathname=A(r?[r,t.pathname]:[t.pathname]),t.href};function R(e){if(!Array.isArray(e))return"";for(var t=[],n=0,r=e.length;n<r;n++){var o=[];for(var i in e[n]){var a=I.getTransformKey(i);if(a||(a=i),"-"===e[n][i])o.push(a);else if("raw"===i)o.push(e[n][i]);else{var u=e[n][i];"oi"!==a&&"di"!==a||(u=(u=T(j(u||""))).replace(/\//g,"@@")),o.push([a,u].join(I.getTransformKeyValueDelimiter()))}}t.push(o.join(I.getTransformDelimiter()))}return t.join(I.getChainTransformDelimiter())}var _=function(e,t){return N(l(l({},t),e))};function U(e){return e.urlEndpoint}var M=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r.length!==t.length||"undefined"===typeof r[r.length-1])return new Promise((function(n,o){var i=function(e){if(e)return o(e);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n(r.length>1?r:r[0])};r.pop(),r.push(i),t.call.apply(t,[e].concat(r))}));if("function"!==typeof r[r.length-1])throw new Error("Callback must be a function.");t.call.apply(t,[e].concat(r))}},D=function(){function e(t){if(i(this,e),s(this,"options",{sdkVersion:"javascript-".concat(p),publicKey:"",urlEndpoint:"",transformationPosition:I.getDefault()}),this.options=l(l({},this.options),t||{}),!U(this.options))throw f.MANDATORY_INITIALIZATION_MISSING;if(!I.validParameters(this.options))throw f.INVALID_TRANSFORMATION_POSITION}return u(e,[{key:"url",value:function(e){return _(e,this.options)}},{key:"upload",value:function(e,t,n){var r;if("function"===typeof t?r=t:n=t||{},!e||"object"!==o(e))return d(!0,f.INVALID_UPLOAD_OPTIONS,r);var i=l(l({},this.options),n),a=(e||{}).xhr;delete e.xhr;var u=a||new XMLHttpRequest;return M(this,b)(u,e,i,r)}}]),e}();function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?W(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function G(e,t){return G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},G(e,t)}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function J(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function $(e,t){if(null==e)return{};var n,r,o=J(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?X(e):t}function Z(e){var t=z();return function(){var n,r=V(e);if(t){var o=V(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Q(this,n)}}function ee(e){return te(e)||ne(e)||re(e)||ie()}function te(e){if(Array.isArray(e))return oe(e)}function ne(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function re(e,t){if(e){if("string"===typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ie(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ae=t.createContext(null),ue=function(e){H(n,e);var t=Z(n);function n(e,r){var o;return q(this,n),(o=t.call(this,e,r)).getContext=o.getContext.bind(X(o)),o}return F(n,[{key:"getContext",value:function(){return this.context||{}}},{key:"getIKClient",value:function(){var e=this.getContext();if(e.ikClient)return e.ikClient;var t=this.props.urlEndpoint;if(!(t=t||e.urlEndpoint)||""===t.trim())throw new Error("Missing urlEndpoint during initialization");return new D({urlEndpoint:t,sdkVersion:""})}},{key:"render",value:function(){return null}}]),n}(t.PureComponent);function se(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return ce(e,void 0===t||null===t?n.path:t)}},n.exports),n.exports}function ce(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}ue.contextType=ae;var le="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function pe(){}function fe(){}fe.resetWarningCache=pe;var de=function(){function e(e,t,n,r,o,i){if(i!==le){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:fe,resetWarningCache:pe};return n.PropTypes=n,n},me=se((function(e){e.exports=de()})),he={loading:me.oneOf(["lazy"]),lqip:me.shape({active:me.bool,quality:me.number,threshold:me.number,blur:me.number,raw:me.string}),path:me.string,src:me.string,queryParameters:me.objectOf(me.oneOfType([me.string,me.number]).isRequired),transformation:me.arrayOf(me.object.isRequired),transformationPosition:me.oneOf(["path","query"])},ye={fileName:me.string,tags:me.arrayOf(me.string.isRequired),useUniqueFileName:me.bool,responseFields:me.array,isPrivateFile:me.bool,folder:me.string,customCoordinates:me.string,extensions:me.arrayOf(me.object.isRequired),webhookUrl:me.string,overwriteFile:me.bool,overwriteAITags:me.bool,overwriteTags:me.bool,overwriteCustomMetadata:me.bool,customMetadata:me.any,onError:me.func,onSuccess:me.func,onUploadStart:me.func,onUploadProgress:me.func,inputRef:me.object,validateFile:me.func},ve={publicKey:me.string,urlEndpoint:me.string,authenticationEndpoint:me.string},ge=Y(Y(Y(Y(Y({},ve),he),ye),ye),{},{ikClient:me.instanceOf(D)}),be=function(e){H(n,e);var t=Z(n);function n(){return q(this,n),t.apply(this,arguments)}return F(n,[{key:"extractContextOptions",value:function(e){for(var t={},n=Object.keys(ge),r=0;r<n.length;r++){var o=n[r],i=e[o];i&&(t[o]=i)}return t}},{key:"render",value:function(){var e=this.props.children,t=Y(Y({},this.getContext()),this.props),n=this.extractContextOptions(t);return n.urlEndpoint&&""!==n.urlEndpoint.trim()&&(n.ikClient=new D({urlEndpoint:n.urlEndpoint,sdkVersion:""})),r.default.createElement(ae.Provider,{value:n},e)}}]),n}(ue);be.propTypes=ge;var Ee=Y(Y({},ve),he),Oe=function(){try{return navigator.connection.effectiveType}catch(e){return"4g"}},Se=function(e,t,n){for(var r=0;r<n.length;r++)if(e[n[r]]!==t[n[r]])return!0;return!1},Ce=function(e,t,n){var r=e.urlEndpoint,o=e.lqip,i=e.src,a=e.path,u=e.transformation,s=e.transformationPosition,c=e.queryParameters,l={urlEndpoint:r||n.urlEndpoint,src:i||n.src||void 0,path:a||n.path||void 0,transformation:u||n.transformation,transformationPosition:s||n.transformationPosition||void 0,queryParameters:c||n.queryParameters||{}},p={originalSrc:t.url(l)};if(o&&o.active){var f=Math.round(o.quality||o.threshold||20),d=Math.round(o.blur||6),m=l.transformation?ee(l.transformation):[];o.raw&&"string"===typeof o.raw&&""!=o.raw.trim()?m.push({raw:o.raw.trim()}):m.push({quality:String(f),blur:String(d)}),p.lqipSrc=t.url(Y(Y({},l),{},{transformation:m}))}return p},Pe=function(e,t){var n=e.lqip,r=void 0===n?null:n,o=e.loading,i=t.intersected,a=t.originalSrcLoaded,u=t.originalSrc,s=t.lqipSrc,c=function(e){return e&&e.active};return"lazy"===o||c(r)?"lazy"!==o&&c(r)?a?u:s:"lazy"!==o||c(r)?i&&a?u:s:i?u:"":u},we=["urlEndpoint","path","src","transformation","transformationPosition","queryParameters"],ke=function(e){H(n,e);var t=Z(n);function n(e,o){var i;q(this,n),(i=t.call(this,e,o)).imageRef=r.default.createRef();var a=Ce(i.props,i.getIKClient(),i.getContext()),u=a.originalSrc,s=a.lqipSrc;return i.state={currentUrl:void 0,originalSrc:u,lqipSrc:s,originalSrcLoaded:!1,intersected:!1,contextOptions:{}},i}return F(n,[{key:"updateImageUrl",value:function(){var e=Pe(this.props,this.state);this.setState({currentUrl:e})}},{key:"triggerOriginalImageLoad",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({originalSrcLoaded:!0},(function(){e.updateImageUrl()}))},t.src=this.state.originalSrc}},{key:"componentDidMount",value:function(){var e=this;this.updateImageUrl(),this.setState({contextOptions:this.getContext()});var t=this.imageRef.current,n=this.props,r=n.lqip,o=n.loading;if(window&&"IntersectionObserver"in window&&"lazy"===o){var i="1250px";"4g"!==Oe()&&(i="2500px");var a=new IntersectionObserver((function(t){var n=t[0];n&&n.isIntersecting&&e.setState({intersected:!0},(function(){r&&r.active&&e.triggerOriginalImageLoad(),a.disconnect(),e.updateImageUrl()}))}),{rootMargin:"".concat(i," 0px ").concat(i," 0px")});a.observe(t),this.setState({observe:a})}else this.setState({intersected:!0},(function(){r&&r.active&&e.triggerOriginalImageLoad(),e.updateImageUrl()}))}},{key:"componentWillUnmount",value:function(){var e=this.state.observe;e&&e.disconnect()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.getContext();if(Se(e,this.props,we)||Se(t.contextOptions,r,we)){var o=Ce(this.props,this.getIKClient(),this.getContext()),i=o.originalSrc,a=o.lqipSrc;this.setState({originalSrc:i,lqipSrc:a},(function(){n.updateImageUrl(),n.setState({contextOptions:n.getContext()})}))}}},{key:"render",value:function(){var e=this.state.currentUrl,t=this.props,n=(t.urlEndpoint,t.loading,t.lqip,t.path,t.src,t.transformation,t.transformationPosition,t.queryParameters,$(t,["urlEndpoint","loading","lqip","path","src","transformation","transformationPosition","queryParameters"]));return r.default.createElement("img",B({alt:this.props.alt||"",src:e,ref:this.imageRef},n))}}]),n}(ue);
1ke.propTypes=Ee;var Ie={path:me.string,src:me.string,queryParameters:me.objectOf(me.oneOfType([me.string,me.number]).isRequired),transformation:me.arrayOf(me.object.isRequired),transformationPosition:me.oneOf(["path","query"])},xe=Y(Y({},ve),Ie),Te=["urlEndpoint","path","src","transformation","transformationPosition","queryParameters"],je=function(e){H(n,e);var t=Z(n);function n(e,o){var i;q(this,n),(i=t.call(this,e,o)).videoRef=r.default.createRef();var a=Ce(i.props,i.getIKClient(),i.getContext()).originalSrc;return i.state={currentUrl:a,contextOptions:{}},i}return F(n,[{key:"componentDidMount",value:function(){this.setState({contextOptions:this.getContext()})}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.getContext();if(Se(e,this.props,Te)||Se(t.contextOptions,r,Te)){var o=Ce(this.props,this.getIKClient(),this.getContext()).originalSrc;this.setState({currentUrl:o},(function(){n.setState({contextOptions:n.getContext()})}))}}},{key:"render",value:function(){var e=this.state.currentUrl,t=this.props,n=(t.urlEndpoint,t.path,t.src,t.transformation,t.transformationPosition,t.queryParameters,$(t,["urlEndpoint","path","src","transformation","transformationPosition","queryParameters"]));return r.default.createElement("video",B({},n,{ref:this.videoRef}),r.default.createElement("source",{src:e,type:"video/mp4"}))}}]),n}(ue);je.propTypes=xe;var Ae=Y(Y({},ve),ye),Ne=function(e){H(n,e);var t=Z(n);function n(){var e,r;q(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Q(r,(e=r=t.call.apply(t,[this].concat(i)),r.state={},e))}return F(n,[{key:"abort",value:function(){this.state.xhr&&this.state.xhr.abort()}},{key:"uploadFile",value:function(e){var t,n=this,r=this.getContext(),o=this.props,i=o.fileName,a=o.useUniqueFileName,u=o.tags,s=o.folder,c=o.isPrivateFile,l=o.customCoordinates,p=o.responseFields,f=o.extensions,d=o.webhookUrl,m=o.overwriteFile,h=o.overwriteAITags,y=o.overwriteTags,v=o.overwriteCustomMetadata,g=o.customMetadata,b=o.onError,E=o.onSuccess,O=this.props.publicKey||r.publicKey,S=this.props.authenticationEndpoint||r.authenticationEndpoint,C=this.props.urlEndpoint||r.urlEndpoint;if(O&&""!==O.trim())if(S&&""!==S.trim())if(C&&""!==C.trim()){var P=this.getIKClient(),w=null===(t=e.target.files)||void 0===t?void 0:t[0];if(w&&(!this.props.validateFile||this.props.validateFile(w))){this.props.onUploadStart&&"function"===typeof this.props.onUploadStart&&this.props.onUploadStart(e);var k=new XMLHttpRequest,I=function(e){n.props.onUploadProgress&&"function"===typeof n.props.onUploadProgress&&n.props.onUploadProgress(e)};k.upload.addEventListener("progress",I);var x={file:w,fileName:i||w.name,useUniqueFileName:a,tags:u,folder:s,isPrivateFile:c,customCoordinates:l,responseFields:p,extensions:f,webhookUrl:d,overwriteFile:m,overwriteAITags:h,overwriteTags:y,overwriteCustomMetadata:v,customMetadata:g,xhr:k};P.upload(x,(function(e,t){e?b&&"function"===typeof b&&b(e):E&&"function"===typeof E&&E(t),k.upload.removeEventListener("progress",I)}),{publicKey:O,authenticationEndpoint:S}),this.setState({xhr:k})}}else b&&"function"===typeof b&&b({message:"Missing urlEndpoint"});else b&&"function"===typeof b&&b({message:"Missing authenticationEndpoint"});else b&&"function"===typeof b&&b({message:"Missing publicKey"})}},{key:"render",value:function(){var e=this,t=this.props,n=(t.publicKey,t.urlEndpoint,t.authenticationEndpoint,t.fileName,t.useUniqueFileName,t.tags,t.folder,t.isPrivateFile,t.customCoordinates,t.responseFields,t.onError,t.onSuccess,t.onUploadStart,t.onUploadProgress,t.inputRef),o=(t.validateFile,$(t,["publicKey","urlEndpoint","authenticationEndpoint","fileName","useUniqueFileName","tags","folder","isPrivateFile","customCoordinates","responseFields","onError","onSuccess","onUploadStart","onUploadProgress","inputRef","validateFile"]));return r.default.createElement("input",B({},o,{ref:n,type:"file",onChange:function(t){e.props.onChange&&"function"===typeof e.props.onChange&&e.props.onChange(t),e.uploadFile(t)}}))}}]),n}(ue);Ne.propTypes=Ae,Ne.defaultProps={useUniqueFileName:!0,isPrivateFile:!1,customCoordinates:"",tags:[],folder:"/",responseFields:[]},e.IKContext=be,e.IKCore=D,e.IKImage=ke,e.IKUpload=Ne,e.IKVideo=je,Object.defineProperty(e,"__esMo
1dule",{value:!0})}(t,n(67294))},62705:function(e,t,n){var r=n(55639).Symbol;e.exports=r},44239:function(e,t,n){var r=n(62705),o=n(89607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},31957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},89607:function(e,t,n){var r=n(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(s){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,n){var r=n(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),i=n(14841),a=Math.max,u=Math.min;e.exports=function(e,t,n){var s,c,l,p,f,d,m=0,h=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=s,r=c;return s=c=void 0,m=t,p=e.apply(r,n)}function b(e){return m=e,f=setTimeout(O,t),h?g(e):p}function E(e){var n=e-d;return void 0===d||n>=t||n<0||y&&e-m>=l}function O(){var e=o();if(E(e))return S(e);f=setTimeout(O,function(e){var n=t-(e-d);return y?u(n,l-(e-m)):n}(e))}function S(e){return f=void 0,v&&s?g(e):(s=c=void 0,p)}function C(){var e=o(),n=E(e);if(s=arguments,c=this,d=e,n){if(void 0===f)return b(d);if(y)return clearTimeout(f),f=setTimeout(O,t),g(d)}return void 0===f&&(f=setTimeout(O,t)),p}return t=i(t)||0,r(n)&&(h=!!n.leading,l=(y="maxWait"in n)?a(i(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==f&&clearTimeout(f),m=0,s=d=c=f=void 0},C.flush=function(){return void 0===f?p:S(o())},C}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),i=n(33448),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=u.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.