prismic-slicemachine-to-hydrogen-jrhcn 0.1.608 → 0.1.609

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -16,5 +16,5 @@
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */function pd(){if(td)return ed;td=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;return ed=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 t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,n){for(var i,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),s=1;s<arguments.length;s++){for(var c in i=Object(arguments[s]))t.call(i,c)&&(l[c]=i[c]);if(e){o=e(i);for(var d=0;d<o.length;d++)a.call(i,o[d])&&(l[o[d]]=i[o[d]])}}return l},ed}function fd(){if(rd)return ad;rd=1;return ad="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function hd(){return id?nd:(id=1,nd=Function.call.bind(Object.prototype.hasOwnProperty))}qc.exports;if("production"!==process.env.NODE_ENV){var vd=ud();qc.exports=function(){if(cd)return sd;cd=1;var e=ud(),t=pd(),a=fd(),r=hd(),n=function(){if(ld)return od;ld=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=fd(),a={},r=hd();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function n(n,i,o,l,s){if("production"!==process.env.NODE_ENV)for(var c in n)if(r(n,c)){var d;try{if("function"!=typeof n[c]){var m=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=n[c](i,c,l,o,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var u=s?s():"";e("Failed "+o+" type: "+d.message+(null!=u?u:""))}}}return n.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},od=n}(),i=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),sd=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator,d="@@iterator",m="<<anonymous>>",u={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(o),arrayOf:function(e){return h((function(t,r,n,i,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new f("Invalid "+i+" `"+o+"` of type `"+y(l)+"` supplied to `"+n+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,n,i,o+"["+s+"]",a);if(c instanceof Error)return c}return null}))},element:h((function(e,t,a,r,n){var i=e[t];return l(i)?null:new f("Invalid "+r+" `"+n+"` of type `"+y(i)+"` supplied to `"+a+"`, expected a single ReactElement.")})),elementType:h((function(t,a,r,n,i){var o=t[a];return e.isValidElementType(o)?null:new f("Invalid "+n+" `"+i+"` of type `"+y(o)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,a,r,n,i){if(!(t[a]instanceof e)){var o=e.name||m;return new f("Invalid "+n+" `"+i+"` of type `"+((l=t[a]).constructor&&l.constructor.name?l.constructor.name:m)+"` supplied to `"+r+"`, expected instance of `"+o+"`.")}var l;return null}))},node:h((function(e,t,a,r,n){return b(e[t])?null:new f("Invalid "+r+" `"+n+"` supplied to `"+a+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,n,i,o,l){if("function"!=typeof e)return new f("Property `"+l+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[n],c=y(s);if("object"!==c)return new f("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in s)if(r(s,d)){var m=e(s,d,i,o,l+"."+d,a);if(m instanceof Error)return m}return null}))},oneOf:function(e){return Array.isArray(e)?h((function(t,a,r,n,i){for(var o=t[a],l=0;l<e.length;l++)if(p(o,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===E(t)?String(t):t}));return new f("Invalid "+n+" `"+i+"` of value `"+String(o)+"` supplied to `"+r+"`, expected one of "+s+".")})):("production"!==process.env.NODE_ENV&&i(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."),o)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(n)+" at index "+t+"."),o}return h((function(t,n,i,o,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,n,i,o,l,a);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new f("Invalid "+o+" `"+l+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,n,i,o){var l=t[r],s=y(l);if("object"!==s)return new f("Invalid "+i+" `"+o+"` of type `"+s+"` supplied to `"+n+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(n,i,o,c,E(d));var m=d(l,c,n,i,o+"."+c,a);if(m)return m}return null}))},exact:function(e){return h((function(n,i,o,l,s){var c=n[i],d=y(c);if("object"!==d)return new f("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+o+"`, expected `object`.");var m=t({},n[i],e);for(var u in m){var p=e[u];if(r(e,u)&&"function"!=typeof p)return g(o,l,s,u,E(p));if(!p)return new f("Invalid "+l+" `"+s+"` key `"+u+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(n[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(c,u,o,l,s+"."+u,a);if(h)return h}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function n(n,o,l,c,d,u,p){if(c=c||m,u=u||l,p!==a){if(s){var h=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 h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+l;!t[v]&&r<3&&(i("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."),t[v]=!0,r++)}}return null==o[l]?n?null===o[l]?new f("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,l,c,d,u)}var o=n.bind(null,!1);return o.isRequired=n.bind(null,!0),o}function v(e){return h((function(t,a,r,n,i,o){var l=t[a];return y(l)!==e?new f("Invalid "+n+" `"+i+"` of type `"+E(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,a,r,n){return new f((e||"React class")+": "+t+" type `"+a+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+n+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||l(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[d]);if("function"==typeof t)return t}(e);if(!t)return!1;var a,r=t.call(e);if(t!==e.entries){for(;!(a=r.next()).done;)if(!b(a.value))return!1}else for(;!(a=r.next()).done;){var n=a.value;if(n&&!b(n[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function C(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,u.checkPropTypes=n,u.resetWarningCache=n.resetWarningCache,u.PropTypes=u,u},sd}()(vd.isElement,!0)}else qc.exports=function(){if(md)return dd;md=1;var e=fd();function t(){}function a(){}return a.resetWarningCache=t,dd=function(){function r(t,a,r,n,i,o){if(o!==e){var l=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 l.name="Invariant Violation",l}}function n(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:n,element:r,elementType:r,instanceOf:n,node:r,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:t};return i.PropTypes=i,i}}()();var gd=ja(qc.exports);function bd(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;const yd=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ed(e,t,a){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const a=t.split(".").pop().toLowerCase(),r=yd.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:n}=e,i="string"==typeof t?t:"string"==typeof n&&n.length>0?n:`./${e.name}`;return"string"!=typeof r.path&&Cd(r,"path",i),void 0!==a&&Object.defineProperty(r,"handle",{value:a,writable:!1,configurable:!1,enumerable:!0}),Cd(r,"relativePath",i),r}function Cd(e,t,a){Object.defineProperty(e,t,{value:a,writable:!1,configurable:!1,enumerable:!0})}const wd=[".DS_Store","Thumbs.db"];function xd(e){return"object"==typeof e&&null!==e}function kd(e){return e.filter((e=>-1===wd.indexOf(e.name)))}function Sd(e){if(null===e)return[];const t=[];for(let a=0;a<e.length;a++){const r=e[a];t.push(r)}return t}function Nd(e){if("function"!=typeof e.webkitGetAsEntry)return Td(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Md(t):Td(e,t)}function Ld(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Ld(t):[t]]),[])}function Td(e,t){var a;if("function"==typeof e.getAsFileSystemHandle)return e.getAsFileSystemHandle().then((e=>bd(this,void 0,void 0,(function*(){const t=yield e.getFile();return t.handle=e,Ed(t)}))));const r=e.getAsFile();if(!r)return Promise.reject(`${e} is not a File`);const n=Ed(r,null!==(a=null==t?void 0:t.fullPath)&&void 0!==a?a:void 0);return Promise.resolve(n)}function Pd(e){return bd(this,void 0,void 0,(function*(){return e.isDirectory?Md(e):function(e){return bd(this,void 0,void 0,(function*(){return new Promise(((t,a)=>{e.file((a=>{const r=Ed(a,e.fullPath);t(r)}),(e=>{a(e)}))}))}))}(e)}))}function Md(e){const t=e.createReader();return new Promise(((e,a)=>{const r=[];!function n(){t.readEntries((t=>bd(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Pd));r.push(e),n()}else try{const t=yield Promise.all(r);e(t)}catch(e){a(e)}}))),(e=>{a(e)}))}()}))}var Ad={__esModule:!0},_d=Ad.default=function(e,t){if(e&&t){var a=Array.isArray(t)?t:t.split(",");if(0===a.length)return!0;var r=e.name||"",n=(e.type||"").toLowerCase(),i=n.replace(/\/.*$/,"");return a.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):n===t}))}return!0};function Bd(e){return function(e){if(Array.isArray(e))return zd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Rd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fd(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function Od(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(a),!0).forEach((function(t){Id(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fd(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Id(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var r,n,i=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw n}}return i}(e,t)||Rd(e,t)||function(){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 Rd(e,t){if(e){if("string"==typeof e)return zd(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?zd(e,t):void 0}}function zd(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var Hd="function"==typeof _d?_d:_d.default,Gd="file-invalid-type",Vd="file-too-large",jd="file-too-small",$d="too-many-files",Wd=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:Gd,message:"File type must be ".concat(t)}},Ud=function(e){return{code:Vd,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},Kd=function(e){return{code:jd,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},qd={code:$d,message:"Too many files"};function Zd(e,t){var a="application/x-moz-file"===e.type||Hd(e,t);return[a,a?null:Wd(t)]}function Yd(e,t,a){if(Jd(e.size))if(Jd(t)&&Jd(a)){if(e.size>a)return[!1,Ud(a)];if(e.size<t)return[!1,Kd(t)]}else{if(Jd(t)&&e.size<t)return[!1,Kd(t)];if(Jd(a)&&e.size>a)return[!1,Ud(a)]}return[!0,null]}function Jd(e){return null!=e}function Xd(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Qd(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function em(e){e.preventDefault()}function tm(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return t.some((function(t){return!Xd(e)&&t&&t.apply(void 0,[e].concat(r)),Xd(e)}))}}function am(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function rm(e){return/^.*\.[\w]+$/.test(e)}var nm=["children"],im=["open"],om=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],lm=["refKey","onChange","onClick"];function sm(e){return function(e){if(Array.isArray(e))return mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var r,n,i=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw n}}return i}(e,t)||dm(e,t)||function(){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 dm(e,t){if(e){if("string"==typeof e)return mm(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?mm(e,t):void 0}}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function um(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function pm(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?um(Object(a),!0).forEach((function(t){fm(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):um(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function fm(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function hm(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var vm=e.forwardRef((function(t,a){var r=t.children,n=ym(hm(t,nm)),i=n.open,o=hm(n,im);return e.useImperativeHandle(a,(function(){return{open:i}}),[i]),e.createElement(e.Fragment,null,r(pm(pm({},o),{},{open:i})))}));vm.displayName="Dropzone";var gm={disabled:!1,getFilesFromEvent:function(e){return bd(this,void 0,void 0,(function*(){return xd(e)&&xd(e.dataTransfer)?function(e,t){return bd(this,void 0,void 0,(function*(){if(e.items){const a=Sd(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return a;return kd(Ld(yield Promise.all(a.map(Nd))))}return kd(Sd(e.files).map((e=>Ed(e))))}))}(e.dataTransfer,e.type):function(e){return xd(e)&&xd(e.target)}(e)?function(e){return Sd(e.target.files).map((e=>Ed(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return bd(this,void 0,void 0,(function*(){return(yield Promise.all(e.map((e=>e.getFile())))).map((e=>Ed(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};vm.defaultProps=gm,vm.propTypes={children:gd.func,accept:gd.objectOf(gd.arrayOf(gd.string)),multiple:gd.bool,preventDropOnDocument:gd.bool,noClick:gd.bool,noKeyboard:gd.bool,noDrag:gd.bool,noDragEventsBubbling:gd.bool,minSize:gd.number,maxSize:gd.number,maxFiles:gd.number,disabled:gd.bool,getFilesFromEvent:gd.func,onFileDialogCancel:gd.func,onFileDialogOpen:gd.func,useFsAccessApi:gd.bool,autoFocus:gd.bool,onDragEnter:gd.func,onDragLeave:gd.func,onDragOver:gd.func,onDrop:gd.func,onDropAccepted:gd.func,onDropRejected:gd.func,onError:gd.func,validator:gd.func};var bm={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ym(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=pm(pm({},gm),t),r=a.accept,n=a.disabled,i=a.getFilesFromEvent,o=a.maxSize,l=a.minSize,s=a.multiple,c=a.maxFiles,d=a.onDragEnter,m=a.onDragLeave,u=a.onDragOver,p=a.onDrop,f=a.onDropAccepted,h=a.onDropRejected,v=a.onFileDialogCancel,g=a.onFileDialogOpen,b=a.useFsAccessApi,y=a.autoFocus,E=a.preventDropOnDocument,C=a.noClick,w=a.noKeyboard,x=a.noDrag,k=a.noDragEventsBubbling,S=a.onError,N=a.validator,L=e.useMemo((function(){return function(e){if(Jd(e))return Object.entries(e).reduce((function(e,t){var a=Dd(t,2),r=a[0],n=a[1];return[].concat(Bd(e),[r],Bd(n))}),[]).filter((function(e){return am(e)||rm(e)})).join(",")}(r)}),[r]),T=e.useMemo((function(){return function(e){return Jd(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Dd(e,2),a=t[0],r=t[1],n=!0;return am(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),Array.isArray(r)&&r.every(rm)||(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),n=!1),n})).reduce((function(e,t){var a=Dd(t,2),r=a[0],n=a[1];return Od(Od({},e),{},Id({},r,n))}),{})}]:e}(r)}),[r]),P=e.useMemo((function(){return"function"==typeof g?g:Cm}),[g]),M=e.useMemo((function(){return"function"==typeof v?v:Cm}),[v]),A=e.useRef(null),_=e.useRef(null),B=cm(e.useReducer(Em,bm),2),F=B[0],O=B[1],I=F.isFocused,D=F.isFileDialogActive,R=e.useRef("undefined"!=typeof window&&window.isSecureContext&&b&&"showOpenFilePicker"in window),z=function(){!R.current&&D&&setTimeout((function(){_.current&&(_.current.files.length||(O({type:"closeDialog"}),M()))}),300)};e.useEffect((function(){return window.addEventListener("focus",z,!1),function(){window.removeEventListener("focus",z,!1)}}),[_,D,M,R]);var H=e.useRef([]),G=function(e){A.current&&A.current.contains(e.target)||(e.preventDefault(),H.current=[])};e.useEffect((function(){return E&&(document.addEventListener("dragover",em,!1),document.addEventListener("drop",G,!1)),function(){E&&(document.removeEventListener("dragover",em),document.removeEventListener("drop",G))}}),[A,E]),e.useEffect((function(){return!n&&y&&A.current&&A.current.focus(),function(){}}),[A,y,n]);var V=e.useCallback((function(e){S?S(e):console.error(e)}),[S]),j=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e),H.current=[].concat(sm(H.current),[e.target]),Qd(e)&&Promise.resolve(i(e)).then((function(t){if(!Xd(e)||k){var a=t.length,r=a>0&&function(e){var t=e.files,a=e.accept,r=e.minSize,n=e.maxSize,i=e.multiple,o=e.maxFiles,l=e.validator;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=Dd(Zd(e,a),1)[0],i=Dd(Yd(e,r,n),1)[0],o=l?l(e):null;return t&&i&&!o}))}({files:t,accept:L,minSize:l,maxSize:o,multiple:s,maxFiles:c,validator:N});O({isDragAccept:r,isDragReject:a>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e)}})).catch((function(e){return V(e)}))}),[i,d,V,k,L,l,o,s,c,N]),$=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e);var t=Qd(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&u&&u(e),!1}),[u,k]),W=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e);var t=H.current.filter((function(e){return A.current&&A.current.contains(e)})),a=t.indexOf(e.target);-1!==a&&t.splice(a,1),H.current=t,t.length>0||(O({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qd(e)&&m&&m(e))}),[A,m,k]),U=e.useCallback((function(e,t){var a=[],r=[];e.forEach((function(e){var t=cm(Zd(e,L),2),n=t[0],i=t[1],s=cm(Yd(e,l,o),2),c=s[0],d=s[1],m=N?N(e):null;if(n&&c&&!m)a.push(e);else{var u=[i,d];m&&(u=u.concat(m)),r.push({file:e,errors:u.filter((function(e){return e}))})}})),(!s&&a.length>1||s&&c>=1&&a.length>c)&&(a.forEach((function(e){r.push({file:e,errors:[qd]})})),a.splice(0)),O({acceptedFiles:a,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),p&&p(a,r,t),r.length>0&&h&&h(r,t),a.length>0&&f&&f(a,t)}),[O,s,L,l,o,c,p,f,h,N]),K=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e),H.current=[],Qd(e)&&Promise.resolve(i(e)).then((function(t){Xd(e)&&!k||U(t,e)})).catch((function(e){return V(e)})),O({type:"reset"})}),[i,U,V,k]),q=e.useCallback((function(){if(R.current){O({type:"openDialog"}),P();var e={multiple:s,types:T};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){U(e,null),O({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(M(e),O({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?V(e):(R.current=!1,_.current?(_.current.value=null,_.current.click()):V(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))}))}else _.current&&(O({type:"openDialog"}),P(),_.current.value=null,_.current.click())}),[O,P,M,b,U,V,T,s]),Z=e.useCallback((function(e){A.current&&A.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),q()))}),[A,q]),Y=e.useCallback((function(){O({type:"focus"})}),[]),J=e.useCallback((function(){O({type:"blur"})}),[]),X=e.useCallback((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?q():setTimeout(q,0))}),[C,q]),Q=function(e){return n?null:e},ee=function(e){return w?null:Q(e)},te=function(e){return x?null:Q(e)},ae=function(e){k&&e.stopPropagation()},re=e.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,a=void 0===t?"ref":t,r=e.role,i=e.onKeyDown,o=e.onFocus,l=e.onBlur,s=e.onClick,c=e.onDragEnter,d=e.onDragOver,m=e.onDragLeave,u=e.onDrop,p=hm(e,om);return pm(pm(fm({onKeyDown:ee(tm(i,Z)),onFocus:ee(tm(o,Y)),onBlur:ee(tm(l,J)),onClick:Q(tm(s,X)),onDragEnter:te(tm(c,j)),onDragOver:te(tm(d,$)),onDragLeave:te(tm(m,W)),onDrop:te(tm(u,K)),role:"string"==typeof r&&""!==r?r:"presentation"},a,A),n||w?{}:{tabIndex:0}),p)}}),[A,Z,Y,J,X,j,$,W,K,w,x,n]),ne=e.useCallback((function(e){e.stopPropagation()}),[]),ie=e.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,a=void 0===t?"ref":t,r=e.onChange,n=e.onClick,i=hm(e,lm);return pm(pm({},fm({accept:L,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Q(tm(r,K)),onClick:Q(tm(n,ne)),tabIndex:-1},a,_)),i)}}),[_,r,s,K,n]);return pm(pm({},F),{},{isFocused:I&&!n,getRootProps:re,getInputProps:ie,rootRef:A,inputRef:_,open:Q(q)})}function Em(e,t){switch(t.type){case"focus":return pm(pm({},e),{},{isFocused:!0});case"blur":return pm(pm({},e),{},{isFocused:!1});case"openDialog":return pm(pm({},bm),{},{isFileDialogActive:!0});case"closeDialog":return pm(pm({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pm(pm({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pm(pm({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pm({},bm);default:return e}}function Cm(){}const wm=()=>e.createElement("svg",{viewBox:"0 0 164 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M31.5115 45.9394C32.2605 46.5367 33.3592 46.3874 33.9585 45.6408L50.9378 24.1394C51.2873 23.6914 51.7867 23.4426 52.3361 23.4426C52.8854 23.4426 53.3848 23.6914 53.7344 24.1394L68.3665 42.7043L98.7295 4.23061C99.079 3.73289 99.6783 3.48403 100.278 3.48403C100.877 3.48403 101.426 3.78266 101.826 4.23061C107.369 11.4475 117.756 24.7366 125.347 34.4919C129.542 39.8673 133.038 44.3467 134.736 46.4869C135.085 46.9349 135.585 47.1837 136.134 47.1837C136.483 47.1837 136.883 47.0842 137.183 46.8353C137.932 46.2381 138.081 45.1431 137.482 44.3965C135.834 42.2066 132.338 37.7271 128.094 32.3517C120.503 22.6462 110.116 9.35711 104.572 2.14019C103.524 0.79635 101.976 0.0497719 100.278 0C98.5797 0 97.0315 0.746578 95.9828 2.09042L68.3665 37.08L56.481 21.9992C55.4822 20.7051 53.984 20.0083 52.3361 20.0083C50.6881 20.0083 49.1899 20.7549 48.1911 21.9992L31.2118 43.5006C30.6125 44.2472 30.7624 45.3422 31.5115 45.9394Z",fill:"currentColor"}),e.createElement("path",{d:"M125.996 86.1551V78.1916L132.938 85.1099C133.288 85.4583 133.737 85.6076 134.186 85.6076C134.636 85.6076 135.085 85.4583 135.435 85.1099C136.134 84.4131 136.134 83.3181 135.435 82.6711L125.647 72.9158C125.297 72.5674 124.798 72.3683 124.299 72.4181C124.199 72.4181 124.049 72.4181 123.949 72.4679C123.899 72.4679 123.849 72.5176 123.799 72.5176C123.749 72.5176 123.699 72.5674 123.599 72.5674C123.549 72.5674 123.499 72.6172 123.45 72.667C123.4 72.667 123.35 72.7167 123.3 72.7167C123.2 72.7665 123.1 72.866 123.05 72.9158L113.262 82.6711C112.563 83.3679 112.563 84.4629 113.262 85.1099C113.612 85.4583 114.061 85.6076 114.51 85.6076C114.96 85.6076 115.409 85.4583 115.759 85.1099L122.551 78.3409V86.2049L112.063 96.657C111.364 97.3538 111.364 98.4488 112.063 99.0958C112.413 99.4442 112.862 99.5935 113.312 99.5935C113.761 99.5935 114.211 99.4442 114.56 99.0958L122.601 91.0825V114.027C122.601 114.973 123.4 115.769 124.348 115.769C125.297 115.769 126.096 114.973 126.096 114.027V91.0825L134.137 99.0958C134.486 99.4442 134.936 99.5935 135.385 99.5935C135.834 99.5935 136.284 99.4442 136.633 99.0958C137.333 98.399 137.333 97.304 136.633 96.657L125.996 86.1551Z",fill:"currentColor"}),e.createElement("path",{d:"M163.501 72.0697L151.665 60.2738V50.8171L159.755 58.8802C160.105 59.2286 160.554 59.3779 161.004 59.3779C161.453 59.3779 161.902 59.2286 162.252 58.8802C162.951 58.1834 162.951 57.0884 162.252 56.4413L151.315 45.5413C150.966 45.1929 150.466 44.9938 149.967 45.0436C149.867 45.0436 149.717 45.0436 149.617 45.0934C149.568 45.0934 149.518 45.1431 149.468 45.1431C149.418 45.1431 149.368 45.1929 149.268 45.1929C149.218 45.1929 149.168 45.2427 149.118 45.2924C149.068 45.2924 149.018 45.3422 148.968 45.3422C148.868 45.392 148.768 45.4915 148.719 45.5413L137.782 56.4413C137.083 57.1381 137.083 58.2331 137.782 58.8802C138.131 59.2286 138.581 59.3779 139.03 59.3779C139.48 59.3779 139.929 59.2286 140.279 58.8802L148.269 50.9167V60.2738L136.434 72.0697C135.734 72.7665 135.734 73.8615 136.434 74.5085C136.783 74.8569 137.233 75.0062 137.682 75.0062C138.131 75.0062 138.581 74.8569 138.93 74.5085L148.269 65.2012V98.399C148.269 99.3447 149.068 100.141 150.017 100.141C150.966 100.141 151.765 99.3447 151.765 98.399V65.2012L161.103 74.5085C161.453 74.8569 161.902 75.0062 162.352 75.0062C162.801 75.0062 163.251 74.8569 163.6 74.5085C164.2 73.8615 164.2 72.7665 163.501 72.0697Z",fill:"currentColor"}),e.createElement("path",{d:"M99.0292 62.3144H95.8831V54.4504C95.8831 51.5637 93.5359 49.2742 90.6894 49.2742H90.5396L50.3386 56.4413L10.1376 49.2742H9.98782C7.09135 49.2742 4.79415 51.6134 4.79415 54.4504V62.3144H3.4458C1.54811 62.3144 0 63.8573 0 65.7487V116.516C0 118.407 1.54811 119.95 3.4458 119.95H51.2375H99.0292C100.927 119.95 102.475 118.407 102.475 116.516V65.7487C102.475 63.8573 100.927 62.3144 99.0292 62.3144ZM90.7893 52.7582C91.6882 52.808 92.3873 53.5546 92.3873 54.4504V105.218C92.3873 106.163 91.6383 106.91 90.6894 106.91H90.5396L52.0865 113.779V59.6765L90.7893 52.7582ZM8.23995 54.4504C8.23995 53.5546 8.9391 52.808 9.838 52.7582L48.5408 59.6765V113.828L10.0877 106.96H9.98782C9.03898 106.96 8.28989 106.213 8.28989 105.268V54.4504H8.23995Z",fill:"currentColor"}),e.createElement("path",{d:"M17.0027 64.4188L16.3867 67.8481L40.6202 72.1717L41.2361 68.7423L17.0027 64.4188Z",fill:"currentColor"}),e.createElement("path",{d:"M18.1931 78.3845L17.5771 81.8138L41.8106 86.1374L42.4265 82.708L18.1931 78.3845Z",fill:"currentColor"}),e.createElement("path",{d:"M18.1972 92.3659L17.5813 95.7952L41.8147 100.119L42.4307 96.6894L18.1972 92.3659Z",fill:"currentColor"}),e.createElement("path",{d:"M84.6014 64.4156L60.3655 68.7391L60.9814 72.1688L85.2173 67.8453L84.6014 64.4156Z",fill:"currentColor"}),e.createElement("path",{d:"M83.4534 78.396L59.2175 82.7195L59.8335 86.1492L84.0694 81.8257L83.4534 78.396Z",fill:"currentColor"}),e.createElement("path",{d:"M83.4542 92.3824L59.2183 96.7059L59.8342 100.136L84.0701 95.8121L83.4542 92.3824Z",fill:"currentColor"})),xm=()=>e.createElement("svg",{viewBox:"0 0 168 138",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M139.096 131.454C100.807 127.459 74.0547 123.913 57.2475 120.666C38.3021 117.02 34.3738 114.124 33.7273 112.675C33.6279 112.476 33.4787 112.176 34.0257 111.377C35.6666 109.079 50.9324 106.283 62.0709 104.285C86.3369 99.8899 96.9782 97.4427 96.9782 92.2986C96.9782 88.8525 91.8565 86.3553 79.2759 83.6584C70.7728 81.8604 58.8387 80.0625 43.7222 78.2645C42.7774 78.1646 41.8823 78.8139 41.7829 79.8127C41.6834 80.8116 42.3298 81.6606 43.3243 81.7605C57.695 83.4586 69.2314 85.2066 77.5355 86.9047C91.4587 89.7515 93.2488 91.899 93.4974 92.3485C93.3482 92.6981 92.1548 94.2463 83.5026 96.4438C77.3366 98.042 69.2811 99.4904 61.4742 100.889C44.2194 104.035 33.5284 106.083 31.1913 109.429C29.799 111.427 30.0974 113.125 30.5449 114.174C31.7383 116.871 35.8158 120.117 56.5513 124.112C73.458 127.359 100.31 130.905 138.698 134.95C138.748 134.95 138.797 134.95 138.897 134.95C139.792 134.95 140.538 134.301 140.637 133.402C140.737 132.403 140.041 131.554 139.096 131.454Z",fill:"currentColor"}),e.createElement("path",{d:"M29.0531 49.0477C29.799 49.647 30.893 49.4972 31.4897 48.748L48.3963 27.1725C48.7444 26.723 49.2417 26.4733 49.7887 26.4733C50.3356 26.4733 50.8329 26.723 51.181 27.1725L65.7506 45.8014L95.9837 7.19523C96.3815 6.6958 96.9285 6.44608 97.5252 6.44608C98.1219 6.44608 98.6689 6.74574 99.0667 7.19523C104.586 14.3871 114.482 27.1226 122.438 37.4109C126.664 42.8547 130.195 47.3995 131.886 49.5971C132.234 50.0465 132.731 50.2963 133.278 50.2963C133.626 50.2963 134.024 50.1964 134.322 49.9467C135.068 49.3473 135.217 48.2486 134.62 47.4994C132.93 45.3019 129.399 40.7571 125.173 35.3133C117.664 25.6243 107.321 12.3394 101.851 5.14756C100.807 3.79909 99.2656 3.04994 97.5749 3C97.5749 3 97.5749 3 97.5252 3C95.8345 3 94.293 3.74915 93.2488 5.09762L65.7506 40.2077L53.8662 25.025C52.8716 23.7264 51.3799 23.0272 49.7389 23.0272C48.098 23.0272 46.6062 23.7764 45.6117 25.025L28.705 46.6005C28.1581 47.3496 28.2575 48.4484 29.0531 49.0477Z",fill:"currentColor"}),e.createElement("path",{d:"M129.996 88.353C130.344 88.7026 130.792 88.8524 131.239 88.8524C131.687 88.8524 132.134 88.7026 132.482 88.353C133.178 87.6538 133.178 86.555 132.482 85.9058L122.736 76.1169C122.388 75.7673 121.891 75.5675 121.393 75.6175C121.294 75.6175 121.145 75.6175 121.045 75.6674C120.996 75.6674 120.946 75.7173 120.896 75.7173C120.846 75.7173 120.797 75.7673 120.697 75.7673C120.648 75.7673 120.598 75.8172 120.548 75.8672C120.498 75.8672 120.449 75.9171 120.399 75.9171C120.299 75.9671 120.2 76.0669 120.15 76.1169L110.404 85.9058C109.708 86.605 109.708 87.7037 110.404 88.353C110.752 88.7026 111.2 88.8524 111.647 88.8524C112.095 88.8524 112.542 88.7026 112.89 88.353L119.653 81.5607V89.4517L109.211 99.9398C108.515 100.639 108.515 101.738 109.211 102.387C109.559 102.737 110.006 102.886 110.454 102.886C110.901 102.886 111.349 102.737 111.697 102.387L119.703 94.3462V117.37C119.703 118.319 120.498 119.118 121.443 119.118C122.388 119.118 123.184 118.319 123.184 117.37V94.3462L131.189 102.387C131.537 102.737 131.985 102.886 132.433 102.886C132.88 102.886 133.328 102.737 133.676 102.387C134.372 101.688 134.372 100.589 133.676 99.9398L123.233 89.4517V81.4608L129.996 88.353Z",fill:"currentColor"}),e.createElement("path",{d:"M30.6445 75.8672C31.092 75.8672 31.5396 75.7174 31.8876 75.3678C32.5838 74.6686 32.5838 73.5698 31.8876 72.9205L21.4453 62.4325V54.4415L28.3571 61.3837C28.7052 61.7333 29.1527 61.8831 29.6003 61.8831C30.0478 61.8831 30.4953 61.7333 30.8434 61.3837C31.5396 60.6845 31.5396 59.5857 30.8434 58.9364L21.0475 49.0477C20.6994 48.6981 20.2021 48.4983 19.7049 48.5482C19.6054 48.5482 19.4562 48.5482 19.3568 48.5982C19.3071 48.5982 19.2573 48.6481 19.2076 48.6481C19.1579 48.6481 19.1082 48.6981 19.0087 48.6981C18.959 48.6981 18.9093 48.748 18.8595 48.798C18.8098 48.798 18.7601 48.8479 18.7104 48.8479C18.6109 48.8978 18.5115 48.9977 18.4617 49.0477L8.71553 58.8865C8.01937 59.5857 8.01937 60.6845 8.71553 61.3337C9.06361 61.6833 9.51114 61.8331 9.95867 61.8331C10.4062 61.8331 10.8537 61.6833 11.2018 61.3337L17.9645 54.5414V62.3825L7.52212 72.8706C6.82596 73.5698 6.82596 74.6686 7.52212 75.3178C7.8702 75.6674 8.31773 75.8173 8.76526 75.8173C9.21279 75.8173 9.66032 75.6674 10.0084 75.3178L18.0142 67.277V90.3507C18.0142 91.2997 18.8098 92.0988 19.7546 92.0988C20.6994 92.0988 21.495 91.2997 21.495 90.3507V67.3269L29.4511 75.3678C29.7992 75.7174 30.2467 75.8672 30.6445 75.8672Z",fill:"currentColor"}),e.createElement("path",{d:"M160.478 75.2679L148.693 63.4313V53.9421L156.748 62.0329C157.096 62.3825 157.544 62.5324 157.991 62.5324C158.439 62.5324 158.886 62.3825 159.235 62.0329C159.931 61.3337 159.931 60.235 159.235 59.5857L148.345 48.6481C147.997 48.2985 147.499 48.0988 147.002 48.1487C146.903 48.1487 146.753 48.1487 146.654 48.1987C146.604 48.1987 146.555 48.2486 146.505 48.2486C146.455 48.2486 146.356 48.2985 146.306 48.2985C146.256 48.2985 146.206 48.3485 146.157 48.3984C146.107 48.4484 146.057 48.4484 146.008 48.4983C145.908 48.5483 145.809 48.6481 145.759 48.6981L134.869 59.6357C134.173 60.3349 134.173 61.4336 134.869 62.0829C135.217 62.4325 135.665 62.5823 136.112 62.5823C136.56 62.5823 137.007 62.4325 137.355 62.0829L145.311 54.092V63.4813L133.526 75.3178C132.83 76.017 132.83 77.1158 133.526 77.7651C133.875 78.1147 134.322 78.2645 134.77 78.2645C135.217 78.2645 135.665 78.1147 136.013 77.7651L145.212 68.3757V101.688C145.212 102.637 146.008 103.436 146.952 103.436C147.897 103.436 148.693 102.637 148.693 101.688V68.3757L157.991 77.7151C158.34 78.0647 158.787 78.2145 159.235 78.2145C159.682 78.2145 160.13 78.0647 160.478 77.7151C161.124 77.0658 161.124 75.9671 160.478 75.2679Z",fill:"currentColor"})),km="PD values must match.",Sm="If your PD is not between 50 and 80, please contact support.",Nm=e=>!isNaN(e)&&e>=50&&e<=80,Lm=(e,t)=>!isNaN(e)&&!isNaN(t)&&Nm(Number(e)+Number(t)),Tm=({compareAtPrice:t,onEdit:a,title:r,price:n,value:i})=>e.createElement("div",{className:"modalRxConfigSelect"},e.createElement("div",{className:"modalRxConfigSelect-title"},e.createElement("h3",null,r),a&&e.createElement("button",{type:"button",onClick:a,className:"modalRxEdit","aria-label":`Edit ${r}`},"Edit")),e.createElement("div",{className:"modalRxConfigSelect-info"},e.createElement("p",null,i),e.createElement("p",{className:"modalRxConfigSelect-price"},t&&e.createElement(e.Fragment,null,e.createElement("strike",null,"$",t)," "),null===n?"Included":n))),Pm=({variant:t})=>t?e.createElement("img",{src:t?.image?.thumbUrl,alt:t?.image?.thumbUrl?.altText}):null,Mm={[Rs]:["Select Your Prescription Type",()=>{const{data:t,next:a,prescriptionTypes:r,product:n,setData:i}=Vc(),{singleVision:o,progressive:l}=Bc(r),{standard:s}=Fc(r);return e.createElement(e.Fragment,null,e.createElement(Hc,{icon:e.createElement(xm,null),onClick:()=>{const e={...t};e[Rs]=o.variant,delete e[zs],i(e),a()},selected:t[Rs]?.sku===ec,subtitle:"Near, Intermediate, or Far (Choose one)",title:"Single Vision",xl:!0}),Ec(n,"progressive-rx")&&e.createElement(Hc,{highlight:"If your prescription has an ADD power, progressive lenses are an option for you.",icon:e.createElement(wm,null),onClick:()=>{i({...t,[Rs]:l.variant,[zs]:s.variant}),a()},price:s.price,selected:t[Rs]?.sku===tc,subtitle:"Distance & Reading (both in one lense)",title:"Progressive",xl:!0}))}],[zs]:["Progressive Lenses",()=>{const{data:t,next:a,prescriptionTypes:r,product:n,setData:i}=Vc(),{standard:o,ultimate:l,computer:s}=Fc(r),c=e=>{i({...t,[zs]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>c(o.variant),price:"Included",selected:t[zs]?.sku===tc,supportingText:"Multi-focal lens provides near, intermediate and distance vision without swapping frames.",title:"Standard All-Purpose"}),e.createElement(Hc,{onClick:()=>c(l.variant),price:l.price,selected:t[zs]?.sku===ac,supportingText:"All of the benefits of our Standard progressive lens, plus an expanded field of view so you can see more and do more.",title:"Ultimate"}),Ec(n,pc)&&e.createElement(Hc,{onClick:()=>c(s.variant),price:s.price,selected:t[zs]?.sku===rc,supportingText:e.createElement(e.Fragment,null,"Offers maximum clarity and expanded field of view in the intermediate distance (2-7 feet away) specifically designed for computer use and seamless transition in an office environment."," ",e.createElement("em",null,"Not recommended for driving or activities that require far-distance correction.")),title:"Computer"}))}],[Hs]:[jc,$c,Wc],[Vs]:["Polarization",()=>{const{data:t,next:a,polarizations:r,setData:n}=Vc(),{no:i,yes:o}=Ac(r),l=e=>{n({...t,[Vs]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>l(i.variant),price:"Included",selected:t[Vs]?.sku===mc,title:"Non-polarized"}),e.createElement(Hc,{onClick:()=>l(o.variant),price:o.price,selected:t[Vs]?.sku===uc,supportingText:"Filter out glare for clearer vision.",title:"Polarized"}))}],[Gs]:["Color",()=>{const{colors:t,data:a,next:r,product:n,setData:i}=Vc(),{clear:o,blueLightProtection:l,photochromic:s,windDown:c}=Pc(t),d=e=>{i({...a,[Gs]:e}),r()};return e.createElement(e.Fragment,null,e.createElement(Hc,{icon:e.createElement(zc,{sku:lc}),price:"Included",onClick:()=>d(o.variant),selected:a[Gs]?.sku===lc,supportingText:"Includes our premium anti-reflective & hydro-oleophobic front side and backside standard coatings which help reduce unwanted reflections & allow you to see better day or night and help keep your lenses clean. Best coatings for most cases including nighttime driving.",title:"Clear"}),e.createElement(Hc,{icon:e.createElement(zc,{sku:sc}),price:l.price,onClick:()=>d(l.variant),selected:a[Gs]?.sku===sc,supportingText:"Lens coating designed to block a portion of the harmful artificial blue light from heavy screen-time use that extends late in the day and into the night.",title:"Blue Light Protection"}),false,!Ec(n,fc)&&e.createElement(Hc,{icon:e.createElement(zc,{sku:cc}),price:s.price,onClick:()=>d(s.variant),selected:a[Gs]?.sku===cc,supportingText:"Lenses that start out clear and darken when outdoors while exposed to unfiltered sunlight. These also include our premium front and backside coatings.",title:"Photochromic"}))}],[js]:["Prescription",()=>{const{data:t,next:a,onUpload:r,setData:n,uuid:i}=Vc(),o=e=>{n({...t,[js]:e}),a()},{getRootProps:l,getInputProps:s,open:c}=ym({onDrop:async e=>{const t={image:e[0],uuid:i};await r(t),o(t)}}),d=l(),m=s();return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>o(null),selected:null===t[js],supportingText:"Send it at your convenience. We'll follow up by email",title:"Send Us Your Prescription Later"}),e.createElement(Hc,{selected:!0===t[js],supportingText:"Upload a photo of your prescription. When uploading your prescription photo, please include issue and expiration date.",title:"Have a Current Prescription?",tooltip:"Our opticians will review your prescription to ensure we're able to fill it. Some prescriptions may not be fillable in certain frames. If this is the case for your prescription, our support team will reach out to help you find a solution.",onClick:c},e.createElement("div",h({className:"upload-container"},d,{onClick:void 0}),e.createElement("input",h({},m,{onClick:void 0})))),e.createElement("a",{href:"https://visit.govisibly.com/roka/",target:"_blank",rel:"noopener noreferrer"},e.createElement(Hc,{selected:!1===t[js],supportingText:"Take an online vision test, right here",title:"Need Your Prescription Renewed?",tooltip:e.createElement(e.Fragment,null,e.createElement("ul",{style:{marginLeft:0,paddingLeft:15}},e.createElement("li",null,"Sign up to take the 5 minute test with Visibly ($35)."),e.createElement("li",null,"Test results will be reviewed by a licensed eye care professional."),e.createElement("li",null,"Receive your prescription in 24 hours."),e.createElement("li",null,"Send it our way to complete your order.")))})))}],[Ws]:["Pupils",()=>{const{data:t,next:a,setData:r}=Vc(),[n,i]=e.useState(!1),o=t[Ws]||"",[l,s]=e.useState(o),[c,d]=e.useState(o),u=o?.split?.("/")[0]||"",[p,f]=e.useState(u),[h,v]=e.useState(u),g=o?.split?.("/")[1]||"",[b,y]=e.useState(g),[E,C]=e.useState(g),[w,x]=e.useState(null),k=e.useMemo((()=>n?p&&h&&p===h&&b&&E&&b===E&&Lm(p,b):l===c&&Nm(l)),[n,p,h,b,E,l,c]);e.useEffect((()=>{if(k)x(null);else{if(n){if(b&&E&&b!==E)return void x(km);if(p&&h&&p!==h)return void x(km);if(p&&b&&!Lm(p,b))return void x(Sm)}else{if(l&&c&&l!==c)return void x(km);if(l&&!Nm(l))return void x(Sm)}x(null)}}),[k,l,c,p,h,b,E,n]);const S=e.useCallback((()=>{k?(x(null),r({...t,[$s]:"manual",[Ws]:n?`${p}/${b}`:Number(l)}),a()):x(Sm)}),[k,r,t,n,p,b,l,a]),N=e.useCallback((()=>{r({...t,[$s]:null,[Ws]:null}),a()}),[t,a,r]),L={valid:k};return e.createElement("div",{className:"modalRxConfig modalRxConfig modalRxConfig--nestedConfigs"},e.createElement("div",{className:"pupillaryDistanceForm"},e.createElement("h3",null,"Provide Your Pupillary Distance"),e.createElement("p",null,"PD is the distance between your pupils. If not listed on your prescription, you can use our measure tool or send it later."),n?e.createElement("div",{className:"pupillaryDistanceFormBinocular"},e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"os1",id:"os1",placeholder:"Enter Left",value:p,onChange:e=>f(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"os2",id:"os2",placeholder:"Confirm Left",value:h,onChange:e=>v(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance"))),e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"od1",id:"od1",placeholder:"Enter Right",value:b,onChange:e=>y(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"od2",id:"od2",placeholder:"Confirm Right",value:E,onChange:e=>C(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance")))):e.createElement("div",{className:"pupillaryDistanceFormMonocular"},e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"pd1",id:"pd1",placeholder:"Enter your PD in mm",value:l,onChange:e=>s(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"pd2",id:"pd2",placeholder:"Confirm your PD in mm",value:c,onChange:e=>d(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance")))),e.createElement("label",null,e.createElement("input",{type:"checkbox",checked:n,onChange:e=>i(e.target.checked)}),e.createElement("span",null,"I have 2 PD numbers"))),w&&e.createElement("div",{className:"modalRxConfigSupport"},e.createElement("p",null,w)),e.createElement("button",{type:"button",className:"pupillaryDistanceSubmit",onClick:S,disabled:!k},"Next"),e.createElement("div",{className:"pupillaryDistanceOptions"},e.createElement("div",{className:"pupillaryDistanceMeasure"},e.createElement("div",null,"Need to Measure Your PD?",e.createElement("div",{className:"pupillaryDistanceAppLinks"},e.createElement("a",{href:"https://apps.apple.com/us/app/pdcheck-ar/id1563806777",target:"_blank",rel:"noopener noreferrer"},"PDCheck AR app (iOS)",e.createElement(cr,null)),e.createElement("a",{href:"https://play.google.com/store/apps/details?id=com.vistechprojects.pupildistancemetercustom&hl=en_US",target:"_blank",rel:"noopener noreferrer"},"Pupil Distance Meter app (Android)",e.createElement(cr,null))))),e.createElement("button",{className:"pupillaryDistanceSend",onClick:N},"Send Your PD Later")))}],[Ks]:["Nose Pad Add-On",()=>{const{data:t,next:a,setData:r,nosepadOptions:n}=Vc(),{no:i,yes:o}=n,l=t[Ks],s=e=>{r({...t,[Ks]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>s(o?.variant),iconType:"nosepad",largeImage:e.createElement(Pm,{variant:o?.variant}),price:o.price,selected:o&&l?.id===o?.variant?.id,supportingText:"These glasses come standard with one removable nose pad that is designed to fit the majority of faces. Have a wider or narrower nose bridge? Add the interchangeable nose pad kit below to find your perfect fit.",title:"Add Nose Pad Kit"}),e.createElement(Hc,{onClick:()=>s(i.variant),selected:!l,supportingText:"Don't worry, you can always buy a replacement kit in the future if needed.",title:"Continue Without Kit"}))}],[Us]:["Review Your Selections",()=>{const{colors:t,data:a,magnification:r,materials:n,polarizations:i,prescriptionTypes:o,product:l,setStep:s,steps:c,nosepadOptions:d,variant:m,allowPrescriptionTypeEdit:u}=Vc(),p=Pc(t),f=Mc(n),h=Ac(i),v=a[zs]||a[Rs],g=Number(v?.price)>0?`+$${Number(v.price).toFixed(0)}`:"Included",b=Object.values(f).find((({variant:e})=>e?.sku===a[Hs]?.sku)),y=Object.values(p).find((({variant:e})=>e?.sku===a[Gs]?.sku)),E=Object.values(h).find((({variant:e})=>e?.sku===a[Vs]?.sku)),C=d&&Object.values(d).find((({variant:e})=>e?.sku===a[Ks]?.sku));if(!m)return null;const w=Ic(l,{colors:t,materials:n,polarizations:i,prescriptionTypes:o});return e.createElement(e.Fragment,null,e.createElement(Tm,{compareAtPrice:isNaN(m.compare_at_price)||Number(m.compare_at_price)===Number(m.price)?void 0:`${Number(m.compare_at_price).toFixed(0)}`,title:"Frame Style",price:`$${Number(m.price).toFixed(0)}`,value:m.title}),v&&e.createElement(Tm,{onEdit:u?()=>s(c.indexOf(Rs)):void 0,price:g,title:"Prescription Type",value:`${v.title}${Ec(l,fc)&&r?` +${r}`:""}`}),b&&e.createElement(Tm,{onEdit:Hs in w?void 0:()=>s(c.indexOf(Hs)),price:b.price,title:"Material",value:b?.variant?.title}),y&&e.createElement(Tm,{onEdit:Gs in w?void 0:()=>s(c.indexOf(Gs)),price:y.price,title:"Lens Color",value:y?.variant?.title}),E&&Nc(l)&&e.createElement(Tm,{onEdit:Vs in w?void 0:()=>s(c.indexOf(Vs)),price:E.price,title:"Polarization Type",value:E.variant.title}),C&&e.createElement(Tm,{onEdit:()=>s(c.indexOf(Ks)),price:C.price,title:"Nosepad Kit",value:C.variant.title}))},()=>{const{estimatedShipDate:t,onComplete:a}=Vc();return e.createElement(e.Fragment,null,e.createElement("button",{type:"button",className:"button",onClick:()=>a()},t?"Pre-order":"Add To Cart"),e.createElement("p",null,"Note: It takes up to 12 business days to build and assemble your eyewear before shipping."),e.createElement("p",null,"If a return happens because an RX is wrong, we will facilitate your return and refill the prescription. Otherwise, prescription eyewear can be returned within 30 days of purchase with a $30 restocking fee."))}]},Am=e.createContext(void 0);function _m(){const t=e.useContext(Am);if(void 0===t)throw new Error("useSearch must be used within a SearchProvider");return t}const Bm={default:({slice:t})=>{const{content:a,icons:r,title:n}=t.primary;return e.createElement("div",{className:"boldStatement","data-slice-type":t.slice_type,"data-slice-variation":t.variation},e.createElement("div",{className:"boldStatementContent"},e.createElement("div",{className:"boldStatementContent-title"},e.createElement("h2",null,n)),e.createElement("div",{className:"boldStatementContent-body"},e.createElement(Mn,{field:a})),e.createElement("div",{className:"boldStatementContent-features"},e.createElement("ul",null,r.map((({icon:t},a)=>e.createElement("li",{key:`${t.url}-${a}`},e.createElement(Un,{src:t.url,alt:t.alt}))))))))},statementSocial:({slice:t})=>{const{content:a,icons:r,title:n}=t.primary;return e.createElement("div",{className:"boldStatement boldStatement--social","data-slice-type":t.slice_type,"data-slice-variation":t.variation},e.createElement("div",{className:"boldStatementContent"},e.createElement("div",{className:"boldStatementContent-title"},n&&e.createElement("h2",null,n)),e.createElement("div",{className:"boldStatementContent-body"},e.createElement(Mn,{field:a})),e.createElement("div",{className:"boldStatementContent-features"},e.createElement("ul",null,r.map((({icon:t,link:a,title:r},n)=>e.createElement("li",{key:`${t.url}-${n}`},e.createElement("a",{href:a.url,title:r},e.createElement(Un,{loading:"lazy",src:t.url,alt:t.alt}),r))))))))}},Fm=({slice:t})=>{const a=Bm[t.variation];if(!a)throw new Error(`No Statement component found for variation ${t.variation}`);return e.createElement(a,{slice:t})},Om=()=>null,Im=({url:t})=>e.createElement("link",{rel:"stylesheet",href:t}),Dm=({url:t})=>(e.useEffect((()=>{if("undefined"==typeof window)return;const e=document.createElement("script");return e.src=t,e.async=!0,e.defer=!0,document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[t]),null),Rm=({asset_url:t})=>{let a=Om;const{url:r}=t;return/\.css(\?){0,1}(\w|\=|\&)*$/.test(r)&&(a=Im),(e=>/\.js(\?){0,1}(\w|\=|\&)*$/.test(e))(r)&&(a=Dm),e.createElement(a,{url:r})},zm=({handlePreviewClick:t,preview_image:a})=>e.createElement("div",{className:"videoSliceEmbed-object",onClick:t},e.createElement(Un,{className:"preview",field:a}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"playButton"})),Hm=({hide_playback_button:t,hide_audio_button:a,video_url:r,preview_image:n})=>{const i=e.useRef(null),[o,l]=e.useState(zr(n)),[{muted:s,paused:c},d]=e.useState({muted:!1,paused:!1});return e.createElement("div",{className:"videoSliceEmbed"},o&&zr(n)?e.createElement(zm,{handlePreviewClick:()=>{l(!1),i.current&&i.current.play()},preview_image:n}):e.createElement("div",{className:"videoSliceEmbed-object"},e.createElement("video",{ref:i,autoPlay:!0,playsInline:!0,preload:"metadata"},e.createElement("source",{src:r,type:"video/mp4"})),!(t&&a)&&e.createElement("div",{className:"heroVideoControls"},!t&&e.createElement("button",{className:"playbackControl",type:"button",onClick:()=>{i.current&&(i.current.paused?(d({muted:s,paused:!1}),i.current.play()):(d({muted:s,paused:!0}),i.current.pause()))},"data-state":c?"play":"pause"},c?e.createElement(gs,{"aria-label":"Play video",title:"Play video"}):e.createElement(vs,{"aria-label":"Pause video",title:"Pause video"})),!a&&e.createElement("button",{className:"soundControl",type:"button",onClick:()=>{i.current&&(d({muted:!i.current.muted,paused:c}),i.current.muted=!i.current.muted)},"data-state":s?"soundoff":"soundon"},s?e.createElement(bs,{"aria-label":"Sound off",title:"Sound off"}):e.createElement(ys,{"aria-label":"Sound on",title:"Sound on"})))))},Gm=({embed_url:t})=>e.createElement("div",{className:"videoSliceEmbed"},e.createElement("div",{className:"videoSliceEmbed-object"},e.createElement("iframe",{src:t,title:"Video player",allow:"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin"}))),Vm={videoFullWidth:({slice:t})=>{const{content:a,embed_url:r,hide_audio_button:n,hide_playback_button:i,preview_image:o,video_url:l}=t.primary,s=Hr(r);return e.createElement("div",{className:"videoSlice videoSlice--column","data-slice-type":t.slice_type,"data-slice-variation":t.variation},Dr(a)&&e.createElement("div",{className:"videoSliceContent"},e.createElement(Mn,{field:a})),s?e.createElement(Gm,{embed_url:r.url,preview_image:o}):e.createElement(Hm,{hide_audio_button:n,hide_playback_button:i,video_url:l.url,preview_image:o}))},videoWithContent:({slice:t,isColumn:a})=>{const{content:r,hide_audio_button:n,hide_playback_button:i,embed_url:o,preview_image:l,video_url:s}=t.primary,c=Hr(o);return e.createElement("div",{className:m("videoSlice",{"videoSlice--column":a}),"data-slice-type":t.slice_type,"data-slice-variation":t.variation},c?e.createElement(Gm,{embed_url:o.url,preview_image:l}):e.createElement(Hm,{hide_audio_button:n,hide_playback_button:i,video_url:s.url,preview_image:l}),e.createElement("div",{className:"videoSliceContent"},e.createElement(Mn,{field:r})))}},jm=({slice:t})=>{const[a,r]=e.useState(!1);e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{r(window.visualViewport.width<930)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const n=Vm[t.variation];if(!n)throw new Error(`Unknown video variation: ${t.variation}`);return e.createElement(n,{slice:t,isColumn:a})},$m=({slice:t})=>{const a=e.useRef(),[r,n]=e.useState(!1),{items:i,link:o,title:l}=t.primary,s=e=>{"undefined"!=typeof window&&a&&(window.visualViewport.width>760||(e.stopPropagation(),e.preventDefault(),r?(a.current.style.maxHeight=null,a.current.style.opacity=0,n(!1)):(a.current.style.maxHeight=`${a.current.scrollHeight}px`,a.current.style.opacity=1,n(!0))))};return e.createElement("div",{className:"footerNav-group footerNav-groupAccordion"},e.createElement("div",{className:m("footerNav-groupTitle",r&&"active"),role:"button",onClick:s},e.createElement("a",{href:o?.url,onClick:s},l)),e.createElement("div",{className:"footerNav-groupItems",ref:a},e.createElement("ul",null,i.map(((t,a)=>{const{link:r,title:n}=t;return e.createElement("li",{key:`${r.url}-${a}`},e.createElement("a",{href:r?.url},n))})))))},Wm=({apiKey:t,errorMessage:a,listId:r,revision:n="2023-10-15"})=>{const{submit:i,...o}=ol({apiKey:t,listId:r,revision:n}),[l,s]=e.useState();return e.useEffect((()=>{if("success"===o.state)return window.gtag?.("event","conversion",{allow_custom_scripts:!0,send_to:"DC-10628785/email0/email0+standard"}),void window.fbq?.("trackCustom","EmailConversion",{});"error"===o.state&&s(a||"Error subscribing. Please check that you've entered valid contact information.")}),[a,o.state]),e.createElement("div",{className:"footerNav-group footerNav-groupNewsletter"},e.createElement("div",{className:"footerNav-groupTitle"},e.createElement("span",null,"Sign Up")),e.createElement("div",{className:"footerNav-groupItems"},"success"===o.state&&e.createElement("p",null,"Thanks for signing up!"),"success"!==o.state&&e.createElement(e.Fragment,null,e.createElement("p",null,"Stay up to date on new product launches"),e.createElement("form",{className:"gtm-email-conversion gtm-pixel-artsai-quiz",onSubmit:"submitting"===o.state?void 0:async e=>{e.preventDefault();const{email:t,phone:a}=e.target.elements,r={email:t.value};a.value.length>0&&(r.phone_number=a.value),r.email?await i({attributes:r,source:"Footer"}):s("Please enter an email address.")}},e.createElement("input",{type:"email",name:"email","aria-label":"Enter your email to signup for product updates",placeholder:"Email (Required)",required:""}),e.createElement("input",{type:"text",name:"phone","aria-label":"Enter your phone number to sign up for product update texts",placeholder:"Phone (optional, to sign up for texts)"}),e.createElement("p",null,"By submitting this form, you agree to receive recurring automated promotional and personalized marketing text messages (e.g. cart reminders) from ROKA at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help and STOP to cancel. Msg frequency varies. Msg & data rates may apply. View"," ",e.createElement("a",{href:"/pages/terms-of-use"},"Terms")," &"," ",e.createElement("a",{href:"/pages/privacy-policy"},"Privacy"),"."),e.createElement("input",{type:"submit",value:"Submit",className:"button"}),l&&e.createElement("span",{"data-msg":l,className:"signup-form-msg"},l)))))},Um=({results:t,query:a,trackSearchAttribution:r})=>{const[n]=t?.products||[],[i]=t?.collections||[],[o]=t?.pages||[];return e.createElement("div",{className:"searchResults",role:"dialog","aria-label":"Site-wide search Results"},e.createElement("div",{className:"searchResultsLinks"},e.createElement("div",{className:"searchResultsLinks-group"},e.createElement("p",{className:"searchResultsLinks-header"},"Collections"),e.createElement("ul",null,!i?.nbHits&&e.createElement("li",null,e.createElement("span",null,"No collections found")),i?.hits?.map(((t,a)=>e.createElement("li",{key:`${t.id}-${a}`},e.createElement("a",{href:`/collections/${t.handle}`},t.title)))))),e.createElement("div",{className:"searchResultsLinks-group"},e.createElement("p",{className:"searchResultsLinks-header"},"Pages"),e.createElement("ul",null,!o?.nbHits&&e.createElement("li",null,e.createElement("span",null,"No pages found")),o?.hits?.map(((t,a)=>e.createElement("li",{key:`${t.id}-${a}`},e.createElement("a",{href:`/pages/${t.handle}`},t.title))))))),e.createElement("div",{className:"searchResultsItems"},e.createElement("div",{className:"searchResultsProducts"},!n?.nbHits&&"No products found",n?.hits?.slice(0,5).map(((t,a)=>{const{id:i,objectID:o,variants_min_price:l,variants_max_price:s,price:c,handle:d,image:m,title:u}=t,p=l!==s?`$${l}-$${s}`:`$${c}`;return e.createElement("div",{className:"searchResultProduct",key:`${i}-${a}`},e.createElement("a",{href:`/products/${d}${o?`?variantId=${o}`:""}`,onClick:()=>r?.(n.queryID,o,i,a+1)},e.createElement("div",{className:"searchResultProduct-image"},e.createElement("img",{src:m,alt:u})),e.createElement("div",{className:"searchResultProduct-content"},e.createElement("p",{className:"searchResultProduct-title"},u),e.createElement("p",{className:"searchResultProduct-price"},p))))}))),e.createElement("div",{className:"searchResultsViewAll"},e.createElement("p",null,"See all results ",e.createElement("a",{href:`/search?q=${a}`},"matching ",a)," ","(",n?.nbHits,")"))))},Km=t=>a=>{const{children:r,key:n,...i}=a,o=i?.node?.data?.url;return e.createElement("a",h({},i,{key:n,style:{color:t},href:o}),r)},qm=({children:t,key:a})=>e.createElement(e.Fragment,{key:a},t),Zm=["color","frame and lens color","lens color","frame color","lens"],Ym=(e,t)=>e.map((e=>t.selectedOptions?.[e]?.value)).filter(Boolean).join(""),Jm=(e,t,a)=>e?.filter?.((({primary:e})=>{const r=a?e.position_mobile:e.position_desktop;return!e.after_products&&t===Math.max(r-1,0)})),Xm=(e,t)=>e?.filter?.((({primary:e})=>e.after_products))?.sort(((e,a)=>t?e.primary.position_mobile-a.primary.position_mobile:e.primary.position_desktop-a.primary.position_desktop)),Qm={new:()=>e.createElement("div",{className:"collectionProduct-badgeNew"},"New"),sale:()=>e.createElement("div",{className:"collectionProduct-badgeSale"},"Sale"),ltd:()=>e.createElement("div",{className:"collectionProduct-badgeImage"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/fpo-content/LTD_ALTERNATE_BLACK_2.svg",alt:"LTD Product Badge"})),outOfStock:()=>e.createElement("div",{className:"collectionProduct-badgeOut"},"Out of Stock"),missed:()=>e.createElement("div",{className:"collectionProduct-badgeMissed"},"Missed ’Em"),available:()=>e.createElement("div",{className:"collectionProduct-badgeAvailable"},"Available")},eu=({badges:t})=>e.createElement("div",{className:"collectionProduct-badges"},t.map((t=>{const a=Qm[t];return a?e.createElement(a,{key:t}):null}))),tu=({title:t,activeVariant:a,isCuratedVariant:r})=>{const n=(e=>e.compareAtPrice.amount&&parseFloat(e.price.amount)<parseFloat(e.compareAtPrice.amount))(a);return e.createElement(e.Fragment,null,e.createElement("div",{className:"collectionProduct-info"},e.createElement("p",null,t),n?e.createElement("p",{className:"collectionProduct-price collectionProduct-priceSale"},e.createElement("span",null,yr(a.compareAtPrice.amount))," ",yr(a.price.amount)):e.createElement("p",{className:"collectionProduct-price"},yr(a.price.amount))),r&&e.createElement("div",{className:"collectionProduct-description"},e.createElement("p",null,a.title)))},au="America/Chicago",ru=({title:t,activeVariant:a})=>{const r=a.metafields?.custom?.ltd_product_name?.value||t,n=a.metafields?.custom?.ltd_variant_title?.value||a.selectedOptions?.find((e=>"Color"===e.name))?.value||a.selectedOptions?.find((e=>"Frame Color"===e.name))?.value,i=a.metafields?.custom?.ltd_drop_date?.value?new Date(a.metafields?.custom?.ltd_drop_date?.value):null;return e.createElement("div",{className:"collectionProduct-info"},n&&e.createElement("p",{className:"collectionProduct-LTDStyle"},n),e.createElement("p",{className:"collectionProduct-LTDName"},r),i&&e.createElement("p",{className:"collectionProduct-LTDDate"},i.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:au})," ","/"," ",i.toLocaleTimeString("en-US",{hour:"numeric",timeZone:au})," ",Intl.DateTimeFormat(void 0,{timeZone:au}).resolvedOptions().timeZone))},nu=({href:t})=>e.createElement("div",{className:"collectionProduct-thumb collectionProduct-thumbCustom"},e.createElement("a",{href:t},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom.svg",alt:"CUSTOM Icon"}))),iu=({variant:t,isActive:a,href:r,isCustomCta:n=!1,setActiveVariant:i})=>{if(n)return e.createElement(nu,{href:r});const o=t.image,l=t.isAvailableForSale;return e.createElement("div",{className:m("collectionProduct-thumb",{active:a,disabled:l}),onMouseOver:()=>i(t),onMouseLeave:()=>i()},e.createElement("a",{href:r},e.createElement("img",{loading:"lazy",src:o.thumbUrl,alt:o.altText})))},ou=({variants:t,activeVariant:a,showCustomEmblem:r,productPageHref:n,setActiveVariant:i})=>{if(t.length<=1)return null;let o=4;r&&o--;const l=t.length-o;return e.createElement("div",{className:"collectionProduct-thumbs"},t.slice(0,o).map(((t,r)=>{const o=t.selectedOptions.reduce(((e,t)=>e+`${t.name}=${t.value.replace(/\s/g,"+")}`),"?");return e.createElement(iu,{key:t.id,variant:t,href:`${n}${o}`,isActive:a.id===t.id,setActiveVariant:i})})),r&&e.createElement(iu,{isCustomCta:!0,href:`${n}?autoInitCustomizer=1`}),l>0&&e.createElement("div",{className:"collectionProduct-thumb collectionProduct-thumbQuantity"},e.createElement("a",{href:n},"+",l)))},lu=({hideSwatches:t=!1,isCuratedVariant:a=!1,isLtdProduct:r,position:n,product:i})=>{const{id:o,title:l,featuredImage:s,tags:c,variants:{nodes:d}}=i;let[u,p]=e.useState(d[0]);e.useEffect((()=>{p(d[0])}),[d]),u||=d[0];const f=(e=>e.includes("available-as-custom"))(c),h=(({isLtdProduct:e,tags:t,variants:a})=>{const r=[];a.some((e=>e.price&&e.compareAtPrice&&e.price.amount<e.compareAtPrice.amount))&&r.push("sale"),t.includes("ltd")&&r.push("ltd"),t.includes("new")&&r.push("new");const n=!e&&a.every((e=>!e.availableForSale));if(!e&&n&&r.push("outOfStock"),e){const e=a.every((e=>"true"===e.metafields?.custom?.is_in_past_collection?.value)),t=a.every((e=>"true"===e.metafields?.custom?.ltd_is_available_for_sale?.value));e||r.push(n||!t?"missed":"available")}return r})({isLtdProduct:r,tags:c,variants:d}),v=(({product:e,activeVariant:t,linkToVariant:a=!1})=>{const{handle:r}=e,n=e.relatedInlineProduct?.value;return n||`/products/${r}${a?`?variantId=${t.id.split("/").pop()}`:""}`})({product:i,activeVariant:u,linkToVariant:r||a}),g=u?.image?.url?u?.image:s,b=(e=>{const t=Zm.reduce(((t,a)=>{if(-1!==t)return t;const r=e?.options?.findIndex((e=>e.name.toLowerCase()===a));return-1!==r?r:-1}),-1);return-1!==t?[t]:[]})(i),y=((e,t)=>t.reduce((()=>{const t=[];return(a,r)=>{const n=Ym(e,r);if(""===n)return a;if(null!=(i=r.hideFromProductPage)&&"true"==i.value.toLowerCase())return a;var i;if(t.find((e=>e===n))){const t=a.findIndex((t=>Ym(e,t)===n));return!a[t].available&&r.available&&(a[t]=r),a}return t.push(n),a.push(r),a}})(),[]))(b,d),E=r?ru:tu,{results:C,trackSearchAttribution:w}=_m(),[x]=C||[],k=e.useCallback((()=>{x?.queryID&&"number"==typeof n&&w?.(x.queryID,u.id,o,n)}),[u.id,o,x?.queryID,n,w]);return e.createElement("div",{className:m("collectionProduct",{collectionProductLTD:r}),"data-product-id":o},e.createElement("div",{className:m("collectionProduct-image",{"collectionProduct-image--hasSecondary":!!u.secondaryImage})},e.createElement("a",{href:v,onClick:k},e.createElement(eu,{badges:h}),e.createElement("div",{className:"collectionProduct-imageMain"},e.createElement(Un,{src:g?.url,alt:g?.altText})),u.secondaryImage&&e.createElement("div",{className:"collectionProduct-imageSecondary"},e.createElement(Un,{src:u.secondaryImage?.url,alt:u.secondaryImage?.altText})))),!(a&&t)&&e.createElement(ou,{showCustomEmblem:f,productPageHref:v,activeVariant:u,variants:y,setActiveVariant:p}),e.createElement(E,{title:l,activeVariant:u,isCuratedVariant:a}))},su=()=>{const{query:t,setQuery:a,submit:r}=_m();return e.createElement("div",{className:"collectionSearch"},e.createElement("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),r?.(e)}},e.createElement("input",{type:"search",id:"site-search",name:"q",placeholder:"Search","aria-label":"Search",value:t||"",onChange:e=>a?.(e.target.value)}),e.createElement("div",{className:"collectionSearchActions"},e.createElement("button",{type:"submit",className:"buttonSearch"},"Search"),e.createElement("button",{type:"reset",onClick:()=>a?.(""),className:"buttonClear"},"Clear"))))},cu=(t=!1)=>{const[a,r]=e.useState(t),[n,i]=e.useState(0),o=e.useRef(null);e.useEffect((()=>{const e=o?.current?.scrollHeight;return i(e),()=>{}}),[a]);return{isOpen:a,setIsOpen:r,filterGroupRef:o,filterGroupStyles:a?{maxHeight:`${n}px`,opacity:1}:{},setScrollHeight:i}},du={round:"round",square:"square",cateye:"cateye",rectangle:"rectangle",shield:"shield",aviator:"aviator"},mu={round:"round",oval:"oval",square:"square",heart:"heart",diamond:"diamond"},uu={small:"sizesmall",regular:"sizeregular",xl:"sizexl"},pu={rangeOne:"rangeOne",rangeTwo:"rangeTwo",rangeThree:"rangeThree",rangeFour:"rangeFour",rangeFive:"rangeFive",rangeSix:"rangeSix",rangeSeven:"rangeSeven",rangeEight:"rangeEight",rangeNine:"rangeNine",rangeTen:"rangeTen",rangeEleven:"rangeEleven"},fu={polarized:"polarized",prescription:"prescription",prescriptionProgressive:"prescriptionProgressive",blueBlocking:"blueBlocking",photochromic:"photochromic",ansiEightSevenPlus:"ansiEightSevenPlus"},hu={hcplasma20:"hcplasma20",hcplasma40:"hcplasma40",hcplasma40Photochomic:"hcplasma40Photochomic",photochromicCarbon:"photochromicCarbon",yellow:"yellow",clear:"clear",darkArcticMirror:"darkArcticMirror",darkArcticMirrorPolarized:"darkArcticMirrorPolarized",silverMirror:"silverMirror",fireMirror:"fireMirror",blackMirror:"blackMirror",glacierMirror:"glacierMirror",darkGlacierMirror:"darkGlacierMirror",glacierMirrorPolar:"glacierMirrorPolar",tealMirror:"tealMirror",darkBronzeMirror:"darkBronzeMirror",goldMirror:"goldMirror",roseGoldMirror:"roseGoldMirror",hcFusionMirror:"hcFusionMirror",greenMirror:"greenMirror",hCOctaneMirror:"hCOctaneMirror",hCIonMirror:"hCIonMirror",darkCarbon:"darkCarbon",graphite:"graphite",darkBronze:"darkBronze",bronzeEmber:"bronzeEmber",darkCarbonPolar:"darkCarbonPolar",bronzePolar:"bronzePolar",rangerPolar:"rangerPolar",windDownRed:"windDownRed"},vu={polycarbonate:"polycarbonate",trivex:"trivex",highIndex:"highIndex"},gu={black:"Black",white:"White",grey:"Grey",tortoise:"Tortoise",copper:"Copper",gold:"Gold",silver:"Silver",red:"Red",orange:"Orange",yellow:"Yellow",blue:"Blue",green:"Green",purple:"Purple",pink:"Pink",clear:"Clear",brown:"Brown"},bu={titanium:"titanium",alloy:"alloy",acetate:"acetate",combination:"combination"},yu={outdoorAdventure:"outdoorAdventure",cycling:"cycling",beachvolleyball:"beachvolleyball",running:"running",triathlon:"triathlon",golf:"golf",tactical:"tactical"},Eu={lowLight:"lowLight",mediumLight:"mediumLight",brightLight:"brightLight",variableLight:"variableLight"},Cu="filter_face_shape",wu="filter_frame_shape",xu="filter_rx_range",ku="filter_size",Su="filter_lens_material",Nu="filter_frame_technology",Lu="filter_frame_material",Tu="filter_sport",Pu="filter_lens_technology",Mu="filter_lens_color",Au="filter_frame_color",_u="filter_light_condition",Bu={key:wu,niceName:"Frame Shape",pluralName:"Frame Shapes",filterOptions:[{value:du.round,niceName:"Round"},{value:du.square,niceName:"Square"},{value:du.cateye,niceName:"Cateye"},{value:du.rectangle,niceName:"Rectangle"},{value:du.aviator,niceName:"Aviator"},{value:du.shield,niceName:"Shield"}]},Fu={key:Cu,niceName:"Face Shape",pluralName:"Face Shapes",filterOptions:[{value:mu.round,niceName:"Round"},{value:mu.oval,niceName:"Oval"},{value:mu.square,niceName:"Square"},{value:mu.heart,niceName:"Heart"},{value:mu.diamond,niceName:"Diamond"}]},Ou={key:ku,niceName:"Size",filterOptions:[{value:uu.small,niceName:"Small"},{value:uu.regular,niceName:"Regular"},{value:uu.xl,niceName:"XL"}]},Iu={key:xu,niceName:"Prescription Type",pluralName:"Prescription Types",filterOptions:[{value:pu.rangeOne,niceName:"SPH pl to +4.00/-2.00"},{value:pu.rangeThree,niceName:"SPH pl to +4.00/-4.00"},{value:pu.rangeFour,niceName:"SPH pl to +4.00/-6.00"},{value:pu.rangeFive,niceName:"SPH pl to +4.00/-8.00"},{value:pu.rangeSix,niceName:"SPH pl to +4.00/-10.00"},{value:pu.rangeSeven,niceName:"SPH pl to +6.00/-2.00"},{value:pu.rangeEight,niceName:"Mild (SPH between +3.00 and -2.00)"},{value:pu.rangeNine,niceName:"Moderate (SPH between +4.00 and +3.00 or -2.00 and -4.00)"},{value:pu.rangeTen,niceName:"Strong (SPH higher than -4.00)"},{value:pu.rangeEleven,niceName:"Reading Glasses"}]},Du={key:Pu,niceName:"Lens Technology",pluralName:"Lens Technologies",filterOptions:[{value:fu.polarized,niceName:"Polarized"},{value:fu.prescription,niceName:"Prescription"},{value:fu.prescriptionProgressive,niceName:"Progressives"},{value:fu.blueBlocking,niceName:"Blue Blocking"},{value:fu.photochromic,niceName:"Light Adjusting"},{value:fu.ansiEightSevenPlus,niceName:"ANSI 87+"}]},Ru={key:Mu,niceName:"Lens Color",pluralName:"Lens Colors",filterOptions:[{value:hu.hcplasma20,niceName:"HC Plasma 20"},{value:hu.hcplasma40,niceName:"HC Plasma 40"},{value:hu.hcplasma40Photochomic,niceName:"HC Plasma 40 Photochromic"},{value:hu.photochromicCarbon,niceName:"Photochromic Carbon"},{value:hu.yellow,niceName:"Yellow"},{value:hu.clear,niceName:"Clear"},{value:hu.darkArcticMirror,niceName:"Dark Arctic Mirror"},{value:hu.darkArcticMirrorPolarized,niceName:"Dark Arctic Mirror Polarized"},{value:hu.silverMirror,niceName:"Silver Mirror"},{value:hu.fireMirror,niceName:"Fire Mirror"},{value:hu.blackMirror,niceName:"Black Mirror"},{value:hu.glacierMirror,niceName:"Glacier Mirror"},{value:hu.glacierMirrorPolar,niceName:"Glacier Mirror Polarized"},{value:hu.tealMirror,niceName:"Teal Mirror"},{value:hu.darkBronzeMirror,niceName:"Dark Bronze Mirror"},{value:hu.goldMirror,niceName:"Gold Mirror"},{value:hu.roseGoldMirror,niceName:"Rose Gold Mirror"},{value:hu.hcFusionMirror,niceName:"HC Fusion Mirror"},{value:hu.greenMirror,niceName:"Green Mirror"},{value:hu.hCOctaneMirror,niceName:"HC Octane Mirror"},{value:hu.hCIonMirror,niceName:"HC Ion Mirror"},{value:hu.graphite,niceName:"Graphite"},{value:hu.darkCarbon,niceName:"Dark Carbon"},{value:hu.darkBronze,niceName:"Dark Bronze"},{value:hu.darkCarbonPolar,niceName:"Dark Carbon Polarized"},{value:hu.bronzePolar,niceName:"Bronze Polarized"},{value:hu.rangerPolar,niceName:"Ranger Polarized"}]},zu={key:Su,niceName:"Lens Material",pluralName:"Lens Materials",filterOptions:[{value:vu.polycarbonate,niceName:"Polycarbonate"},{value:vu.trivex,niceName:"Trivex"},{value:vu.highIndex,niceName:"HighIndex"}]},Hu={key:Au,niceName:"Frame Color",pluralName:"Frame Colors",filterOptions:[{value:gu.black,niceName:"Black"},{value:gu.white,niceName:"White"},{value:gu.grey,niceName:"Grey"},{value:gu.tortoise,niceName:"Tortoise"},{value:gu.copper,niceName:"Copper"},{value:gu.gold,niceName:"Gold"},{value:gu.silver,niceName:"Silver"},{value:gu.red,niceName:"Red"},{value:gu.orange,niceName:"Orange"},{value:gu.yellow,niceName:"Yellow"},{value:gu.blue,niceName:"Blue"},{value:gu.green,niceName:"Green"},{value:gu.purple,niceName:"Purple"},{value:gu.pink,niceName:"Pink"},{value:gu.clear,niceName:"Clear"},{value:gu.brown,niceName:"Brown"}]},Gu={key:Lu,niceName:"Frame Material",pluralName:"Frame Materials",filterOptions:[{value:bu.titanium,niceName:"Titanium"},{value:bu.alloy,niceName:"Alloy"},{value:bu.acetate,niceName:"Nylon"},{value:bu.combination,niceName:"Combination"}]},Vu={key:Tu,niceName:"Activity",pluralName:"Activities",filterOptions:[{value:yu.outdoorAdventure,niceName:"Outdoor Adventure"},{value:yu.cycling,niceName:"Cycling"},{value:yu.running,niceName:"Running"},{value:yu.triathlon,niceName:"Triathlon"},{value:yu.golf,niceName:"Golf"},{value:yu.tactical,niceName:"Tactical"}]},ju=(Eu.lowLight,Eu.mediumLight,Eu.brightLight,Eu.variableLight,{frameShapeFilter:Bu,faceShapeFilter:Fu,sizeFilter:Ou,rxRangeFilter:Iu,lensTechnologyFilter:Du,lensColorFilter:Ru,lensMaterialFilter:zu,frameColorFilter:Hu,frameMaterialFilter:Gu,sportFilter:Vu}),{frameShapeFilter:$u,faceShapeFilter:Wu,sizeFilter:Uu,rxRangeFilter:Ku,lensTechnologyFilter:qu,lensColorFilter:Zu,lensMaterialFilter:Yu,frameColorFilter:Ju,frameMaterialFilter:Xu,sportFilter:Qu}=ju,ep={level_1:[{name:"Fit",filterCategories:[$u,Wu,Uu]},{name:"Lens",filterCategories:[qu,Zu,Yu,Ku]},{name:"Frame",filterCategories:[Ju,Xu]},{name:"Activity",filterCategories:[Qu]}]},tp=(ep.level_1.reduce(((e,t)=>(t.filterCategories.forEach((t=>{let a=t.key,r=t.filterOptions.map((e=>({...e,key:a})));e.push(...r)})),e)),[]),[Cu,wu,xu,Su,Nu,Lu,Tu]),ap=[Pu,Mu,ku,Au,_u],rp=/^filter_\d*/,np=e=>{const t=e.rokaFilters?.value;if(t)return JSON.parse(t)},ip=e=>{const t=e.rokaFilters?.value;if(t)return JSON.parse(t)},op=e=>{const t=e.reduce(((e,t)=>{const a=np(t);if(!a)return t.handle,e;return Object.keys(a).filter((e=>rp.test(e))).forEach((t=>{const r=a[t];e[t]||(e[t]=[]);const n=new Set(e[t]),i=new Set([...n,...new Set(r)]);e[t]=Array.from(i)})),t.variants.nodes.forEach((a=>{const r=ip(a);if(!r)return t.handle,a.id,void a.image;Object.keys(r).filter((e=>rp.test(e))).forEach((t=>{const a=r[t];e[t]||(e[t]=[]);const n=new Set(e[t]),i=new Set([...n,...new Set(a)]);e[t]=Array.from(i)}))})),e}),{});return sp(t,e)},lp={[Pu]:[fu.prescription]},sp=(e,t)=>{const a=t.reduce(((e,t)=>[...e,...t.variants.nodes]),[]),r=Object.keys(e).filter((e=>tp.includes(e))),n=Object.keys(e).filter((e=>ap.includes(e)));return Object.keys(e).reduce(((i,o)=>{const l=r.includes(o),s=n.includes(o),c=e[o].filter((e=>{if(!(lp[o]&&lp[o].includes(e)))return!0;if(l&&t.every((t=>{const a=np(t);return!a||(!a[o]||a[o].includes(e))})))return!1;return!(s&&a.every((t=>{const a=ip(t);return!a||(!a[o]||a[o].includes(e))})))}));return 0==c.length||(i[o]=c),i}),{})},cp=(e,t)=>{if(0==t.length)return e;const a=t.reduce(((e,t)=>{const{key:a,value:r}=t;return e[a]||(e[a]=[]),e[a].push(r),e}),{}),r=Object.keys(a).filter((e=>tp.includes(e))),n=Object.keys(a).filter((e=>ap.includes(e))),i=e.filter((e=>{const t=np(e);return!!t&&r.every((e=>t[e]&&t[e].some((t=>a[e].includes(t)))))}));if(0==n.length)return i;return i.map((e=>{e.variants.nodes=e.variants.nodes.filter((e=>{const t=ip(e);return!!t&&n.every((e=>t[e]&&t[e].some((t=>a[e].includes(t)))))}));const t=n[0];return e.variants.nodes.sort(((e,r)=>{const n=ip(e),i=ip(r);return a[t].findIndex((e=>n[t].some((t=>t==e))))-a[t].findIndex((e=>i[t].some((t=>t==e))))})),0==e.variants.nodes.length?null:e})).filter((e=>null!==e))},dp={PRICE_ASC:{code:"PRICE_ASC",title:"Price: Low to High"},PRICE_DESC:{code:"PRICE_DESC",title:"Price: High to Low"}},mp=Object.values(dp),up=e=>JSON.parse(JSON.stringify(e)),pp=e=>{const t=(e=>e?.reduce(((e,t)=>[...e,...t.products.nodes]),[])||[])(e),a=((e,t=[])=>{const a=op(e),r=["Eyeglasses","Eyeglasses - Readers"];e.some((e=>r.includes(e.type)))&&delete a[Qu.key];const n=ep.level_1.reduce(((e,r)=>{const n=r.filterCategories.map((e=>{const r=a[e.key];if(t.find((t=>t.key===e.key)))return;if(!r||0===r.length)return;const n=e.filterOptions.filter((e=>r.includes(e.value)));return{...e,filterOptions:n}})).filter((e=>void 0!==e)),i={name:r.name,filterCategories:n};return n&&e.push(i),e}),[]);return{level_1:n}})(t);return{selectedFilters:[],sortMethod:{},activeFilterGroupName:void 0,filterConfig:a,products:t,initialProducts:t,sortCode:void 0,defaultFilters:[],isMobileOpen:!1,sortingOptions:mp}},fp=e.createContext(),hp=e=>Math.min(...e.variants.nodes.map((e=>parseFloat(e.price.amount)))),vp=(e,t)=>hp(e)-hp(t),gp=(e,t)=>{switch(console.log("sortProducts",t.code),t.code){case dp.PRICE_ASC.code:return e.sort(vp);case dp.PRICE_DESC.code:return e.sort(vp).reverse();default:return e}},bp="clearFiltersSelected",yp="setSortingMethod",Ep="toggleFilterSelected",Cp="toggleIsMobileOpen",wp=e=>`${e.key}-${e.value}`,xp=(e,t)=>wp(e)===wp(t),kp=(e,t)=>{switch(t.type){case Cp:return{...e,isMobileOpen:!e.isMobileOpen};case bp:{const t=cp(up(e.initialProducts),[]);return{...e,selectedFilters:[],products:t}}case yp:{const a=gp(e.products,t.payload);return{...e,products:a,sortMethod:t.payload}}case Ep:{let a=[...e.selectedFilters];const r=a.findIndex((e=>xp(e,t.payload)));-1===r?a.push(t.payload):a.splice(r,1);const n=cp(up(e.initialProducts),a),i=gp(n,e.sortMethod);return{...e,products:i,selectedFilters:a}}default:return{...e}}},Sp=({children:t,collections:a})=>{const[r,n]=e.useReducer(kp,a,pp),i=e.useCallback((e=>r.filterConfig.level_1.reduce(((t,a)=>{if(t)return t;return a.filterCategories.find((t=>t.key===e))}),void 0)),[r]),o={toggleFilterSelected:e=>n({type:Ep,payload:e}),clearFiltersSelected:()=>n({type:bp}),toggleIsMobileOpen:()=>n({type:Cp}),setSortingMethod:e=>n({type:yp,payload:e})};return e.createElement(fp.Provider,{value:{...r,...o,getFilterCategoryFromConfig:i}},t)},Np=()=>e.useContext(fp);var Lp=Object.freeze({__proto__:null,CollectionsWithFiltersProvider:Sp,getKeyForSelectedFilter:wp,isSelectedFilterEqual:xp,useCollectionsWithFilters:Np});const Tp={aviator:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-aviator.svg",cateye:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-cateye.svg",rectangle:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-rectangle.svg",round:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-round.svg",shield:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-shield.svg",square:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-square.svg"},Pp=()=>{const{isOpen:t,setIsOpen:a,filterGroupRef:r,filterGroupStyles:n}=cu(),{selectedFilters:i,getFilterCategoryFromConfig:o,toggleFilterSelected:l}=Np(),s=o(wu);return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:t}),onClick:()=>a(!t)},"Frame Shape"),e.createElement("div",{ref:r,className:"filtrationGroup-options filtrationGroup-optionsFrames",style:n},s?.filterOptions.map((t=>{const a={...t,key:s.key};return e.createElement("div",{key:t.value,className:m("filtrationOption",{selected:i.find((e=>xp(e,a)))}),onClick:()=>{l(a)}},e.createElement("img",{src:Tp[t.value],alt:`Frame Shape Icon ${t.niceName}`}),e.createElement("div",{className:"filtrationOption-title"},t.niceName))}))))},Mp={round:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-round.svg",oval:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-oval.svg",square:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-square.svg",heart:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-heart.svg",diamond:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-diamond.svg"},Ap=()=>{const{isOpen:t,setIsOpen:a,filterGroupRef:r,filterGroupStyles:n}=cu(),{selectedFilters:i,getFilterCategoryFromConfig:o,toggleFilterSelected:l}=Np(),s=o(Cu);return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:t}),onClick:()=>a(!t)},"Face Shape"),e.createElement("div",{ref:r,className:"filtrationGroup-options filtrationGroup-optionsFaces",style:n},s?.filterOptions.map((t=>{const a={...t,key:s.key};return e.createElement("div",{key:t.value,className:m("filtrationOption",{selected:i.find((e=>xp(e,a)))}),onClick:()=>{l(a)}},e.createElement("img",{src:Mp[t.value],alt:`Face Shape ${t.niceName}`}),e.createElement("div",{className:"filtrationOption-title"},t.niceName))}))))},_p=()=>{const{selectedFilters:t,toggleFilterSelected:a,clearFiltersSelected:r}=Np();return e.createElement("div",{className:"filtration-selections"},e.createElement("div",{onClick:r,className:"filtration-clearSelection"},"Clear All"),t.map((t=>e.createElement("div",{key:`${t.key}${t.value}`,className:"filtration-selection",onClick:()=>{a(t)}},t.niceName))))},Bp=({filterCategory:t,selectedFilters:a,toggleFilterSelected:r,title:n,note:i})=>{const{isOpen:o,setIsOpen:l,filterGroupRef:s,filterGroupStyles:c}=cu();if(!t)return null;const{filterOptions:d}=t;return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:o}),onClick:()=>l(!o)},n),e.createElement("div",{ref:s,className:"filtrationGroup-options",style:c},d.map(((n,i)=>{const o={...n,key:t.key};return e.createElement("div",{className:m("filtrationOption",{selected:a.find((e=>xp(e,o)))}),onClick:()=>{r(o)},key:`${n.title}-${i}`},e.createElement("div",{className:"filtrationOption-title"},n.niceName))})),i&&e.createElement("div",{className:"filtrationOption-info"},e.createElement("div",{className:"filtrationGroup-info"},i))))},Fp=({filterCategory:t,selectedFilters:a,toggleFilterSelected:r,title:n})=>{const{isOpen:i,setIsOpen:o,filterGroupRef:l,filterGroupStyles:s}=cu();return e.createElement("div",{className:"filtrationGroup filtrationGroup-swatches"},e.createElement("div",{className:m("filtrationGroup-title",{active:i}),onClick:()=>o(!i)},n),e.createElement("div",{ref:l,className:"filtrationGroup-options active",style:s},t?.filterOptions.map(((n,i)=>{const o={...n,key:t.key},l=Jo(n.niceName);return e.createElement("div",{key:`${n.title}-${i}`,className:m("filtrationOption","filtrationOption-swatch",l,{selected:a.find((e=>xp(e,o)))}),onClick:()=>{r(o)}},e.createElement("div",{className:"filtrationOption-title"},n.niceName))}))))},Op=()=>{const{selectedFilters:t,getFilterCategoryFromConfig:a,toggleFilterSelected:r,clearFiltersSelected:n,isMobileOpen:i,toggleIsMobileOpen:o}=Np(),l=a(ku),s=a(Pu),c=a(Mu),d=a(Au),u=a(Lu),p=a(Tu),f=a(xu),h=i?"Close":"Open";return e.createElement("div",{className:m("collectionFiltration filtration",{display:i})},e.createElement("div",{className:"filtration-header"},"Filter By",e.createElement("div",{className:"filtration-close",onClick:o},h)),e.createElement("div",{className:"filters"},e.createElement(_p,null),e.createElement(Pp,null),e.createElement(Ap,null),e.createElement(Bp,{filterCategory:l,selectedFilters:t,toggleFilterSelected:r,title:"Size"}),e.createElement(Bp,{filterCategory:s,selectedFilters:t,toggleFilterSelected:r,title:"Lens Technology"}),e.createElement(Bp,{filterCategory:f,selectedFilters:t,toggleFilterSelected:r,title:"Prescription Type",note:"Note: In general, we cannot accommodate prescriptions with a SPH stronger than +4.00 or -10.00."}),e.createElement(Fp,{filterCategory:d,selectedFilters:t,toggleFilterSelected:r,title:"Frame Color"}),e.createElement(Fp,{filterCategory:c,selectedFilters:t,toggleFilterSelected:r,title:"Lens Color"}),e.createElement(Bp,{filterCategory:p,selectedFilters:t,toggleFilterSelected:r,title:"Activity"}),e.createElement(Bp,{filterCategory:u,selectedFilters:t,toggleFilterSelected:r,title:"Frame Material"})),e.createElement("div",{className:"filtrationMobileActions"},e.createElement("div",{onClick:n,className:"filtrationMobileActions-clear"},"Clear All"),e.createElement("div",{className:"filtrationMobileActions-apply button",onClick:o},"Close")))},Ip=()=>{const{products:t,toggleIsMobileOpen:a,sortingOptions:r,sortMethod:n,setSortingMethod:i}=Np(),o=t.length;return e.createElement("div",{className:"collectionSort"},e.createElement("div",{className:"collectionSort-filters",role:"button",onClick:a},"Filters"),e.createElement("div",{className:"collectionSort-results"},o||0," Results"),e.createElement("div",{className:"collectionSort-options"},e.createElement("div",{className:"collectionSort-optionSelect"},"Sort By",e.createElement("ul",null,r.map((t=>{const a=n?.code===t.code;return e.createElement("li",{key:t.code,onClick:()=>i(t),className:m({selected:a})},t.title)}))))))},Dp=e.createContext(null),Rp=e.createContext(null);function zp(){return e.useContext(Dp)}const Hp=(e,t)=>{switch(t.type){case"delete":{const a=e.findIndex((e=>e.handle===t.handle));return-1!==a&&e.splice(a,1),e}case"patch":return[...e,...t.data];default:throw Error("Unknown action: "+t.type)}};var Gp=Object.freeze({__proto__:null,CollectionsContext:Dp,CollectionsDispatchContext:Rp,CollectionsProvider:({children:t,value:a={collections:[],marketingTiles:[],products:{}}})=>{const[r,n]=e.useReducer(Hp,a.collections);return e.createElement(Dp.Provider,{value:{collections:r,marketingTiles:a.marketingTiles||[],products:a.products||{}}},e.createElement(Rp.Provider,{value:n},t))},useCollections:zp,useTasksDispatch:function(){return e.useContext(Rp)}});const Vp=({collection:t,slice:a})=>{const{products:r}=zp(),n=Vr(a?.primary?.variants)&&Array.isArray(a?.primary?.variants)&&a.primary.variants.length>0?a.primary.variants:null,i=e.useMemo((()=>n?n.map((e=>{const{productHandle:t,variantId:a}=e.variant||{};if(!t||!a)return null;const n=r[t];if(!n)return null;const i=n.variants.nodes.find((e=>e.id===a));if(!i)return null;let o=i.title;return"string"==typeof e.title&&""!==e.title.trim()&&(o=e.title),{...n,variants:{nodes:[{...i,title:o},...n.variants.nodes.filter((e=>e.id!==a))]}}})).filter(Boolean):t?.products?.nodes||[]),[r,t,n]);return{isCurated:Array.isArray(n)&&n.length>0,products:i}},jp=({slice:t})=>{const{collections:a,marketingTiles:r}=zp(),n=Np(),i=Es(),o=a?.find((e=>e.handle===t.primary.collection_handle)),l=n?.products||n?.initialProducts||o?.products.nodes,s=Xm(r,i);return e.createElement(e.Fragment,null,e.createElement("div",{className:"collection collection--hasFiltration"},e.createElement(Op,null),e.createElement("div",{className:"collectionItems"},e.createElement(Ip,null),l.map(((t,a)=>{const n=Jm(r,a,i);return e.createElement(e.Fragment,{key:t.id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{product:t}))})),s.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))))))},$p=({title:t,image:a,handle:r})=>{const n=a?.url;return e.createElement("div",{className:m("collectionDivider",{"collectionDivider--hasImage":n})},n&&e.createElement("div",{className:"collectionDivider-image"},e.createElement(Un,{src:a.url,alt:a.alt})),e.createElement("div",{className:"collectionDivider-content"},e.createElement("h2",{id:r},t)))},Wp=({navItems:t})=>{const[a,r]=e.useState(null);return t&&0!==t.length?e.createElement("div",{className:"anchorNav"},e.createElement("ul",null,t.map((t=>e.createElement("li",{key:t.id},e.createElement("a",{href:`#${t.id}`,className:a===t.id?"active":"",onClick:e=>((e,t)=>{const a=document.getElementById(t);a&&(e.preventDefault(),e.stopPropagation(),r(t),a.scrollIntoView({behavior:"smooth"}))})(e,t.id)},t.name)))))):null},Up=({collections:t,isMobile:a,section:r})=>{const{collection_handle:n,header:i,header_image:o}=r,l=t?.find((e=>e.handle===n)),s=l?.document?.data?.slices?.find((e=>"collection_products"===e.slice_type)),{isCurated:c,products:d}=Vp({collection:l,slice:s}),m=l?.document?.data?.slices?.filter?.((e=>"collection_marketing_tile"===e.slice_type))??[],u=Xm(m,a);return e.createElement(e.Fragment,{key:n},e.createElement($p,{title:i,image:o,handle:n}),d.map(((t,r)=>{const n=Jm(m,r,a);return e.createElement(e.Fragment,{key:t.id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{hideSwatches:!1===s?.primary?.show_swatches,isCuratedVariant:c,product:t}))})),u.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))))},Kp=e=>"true"===e.metafields?.custom?.is_in_past_collection?.value,qp={default:({slice:t})=>{const{collections:a,marketingTiles:r}=zp(),n=a?.find((e=>e.handle===t?.primary?.collection_handle)),{isCurated:i,products:o}=Vp({collection:n,slice:t}),l=Es(),s=Xm(r,l);return e.createElement("div",{className:"collection"},e.createElement("div",{className:"collectionItems"},o.map(((a,n)=>{const o=Jm(r,n,l);return e.createElement(e.Fragment,{key:a.id},o.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{hideSwatches:!1===t?.primary?.show_swatches,isCuratedVariant:i,product:a}))})),s.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t})))))},collectionProductsWithFilters:({slice:t})=>{const{collections:a}=zp();return e.createElement(Sp,{collections:a},e.createElement(jp,{slice:t}))},collectionProductsWithSections:({slice:t})=>{const{collections:a}=zp(),r=Es(),n=t?.primary?.sections.map((e=>({id:e.collection_handle,name:e.header})));return e.createElement("div",{className:"collection"},e.createElement(Wp,{navItems:n}),e.createElement("div",{className:"collectionItems"},t?.primary?.sections.map((t=>e.createElement(Up,{key:t.collection_handle,collections:a,isMobile:r,section:t})))))},ltd:({slice:t})=>{const[a,r]=e.useState(),{klaviyo_public_api_key:n,klaviyo_signup_error_message:i}=sl(),{submit:o,...l}=ol({apiKey:n,errorMessage:i,listId:t.primary.signup_list_id});e.useEffect((()=>{"error"===l.state&&r(i||"Error subscribing. Please check that you've entered valid contact information."),"success"===l.state&&r("Thanks for signing up, you'll be hearing from us soon!")}),[i,l.state]);const[s,c]=e.useState(!1),[d,u]=e.useState(!1),[p,f]=e.useState(!1),h=Sr({getElement:()=>document.querySelector(".collectionToggleLTD"),offset:100});e.useEffect((()=>{h&&u(!0)}),[h]);const{collections:v,marketingTiles:g}=zp(),b=(Es(),v?.find((e=>e.handle===t.primary.collection_handle))),y=e.useMemo((()=>b?.products.nodes.flatMap((e=>e.variants.nodes.filter((t=>(({product:e,variant:t})=>e.rokaConfig?.badges?.[t.id]?.badgeCodes?.includes?.("ltd")||"true"===t.metafields?.custom?.is_ltd_product?.value)({product:e,variant:t}))).map((t=>({...e,variants:{nodes:[t]}})))))),[b]),E=e.useMemo((()=>y.filter((e=>Kp(e.variants.nodes[0])))),[y]),C=e.useMemo((()=>y.filter((e=>!Kp(e.variants.nodes[0])))),[y]);return e.createElement("div",{className:"collection collection--LTD"},e.createElement("div",{className:"collectionToggleLTD"},e.createElement("div",{className:m("collectionToggleLTD-item",{active:!s}),onClick:()=>c(!1),role:"button"},"Current"),e.createElement("div",{className:m("collectionToggleLTD-item",{active:s}),onClick:()=>c(!0),role:"button"},"Past")),e.createElement("div",{className:"collectionItems"},(s?E:C).map(((t,a)=>{const r=(s?E:C).length-1,n=Jm(g,a,r);return e.createElement(e.Fragment,{key:t.variants.nodes[0].id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{key:t.variants.nodes[0].id,isLtdProduct:!0,product:t}))}))),e.createElement("div",{className:m("stickyCTA stickyCTA--email",{display:d&&!p})},e.createElement("button",{className:"stickyCTAClose",onClick:()=>f(!0)},"Close Email Signup Prompt"),e.createElement("div",{className:"stickyCTAContent"},e.createElement("div",{className:"stickyCTATitle"},"NEVER MISS AN LTD DROP"),e.createElement("form",{className:"formInsetLabels",onSubmit:e=>{e.preventDefault(),e.stopPropagation(),o({attributes:{email:e.target.email.value},source:"ltd-collection"})}},e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"email"},"Email (Required)"),e.createElement("input",{type:"email",name:"email",id:"email",required:!0})),e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:"Submit",className:"button"})))),a&&e.createElement("div",{className:"stickyCTAMessage"},a)))}},Zp=e=>e.primary.items.map((e=>({handle:e.product_handle,variantId:e.variant_id}))).filter((e=>e.handle&&e.variantId)),Yp=e.createContext(),Jp=({children:t})=>{const[a,r]=e.useState(null);return e.createElement(Yp.Provider,{value:{current:a,setCurrent:r}},t)},Xp=({title:t,children:a,isOpenDefault:r=!1})=>{const{isOpen:n,setIsOpen:i,filterGroupRef:o,filterGroupStyles:l}=cu(r),{current:s,setCurrent:c}=(t=>{const a=e.useContext(Yp),[r]=e.useState(t);if(e.useEffect((()=>{t&&r!==t&&a.setCurrent(t)}),[a,t,r]),!a)throw new Error("Invalid buy box accordion group context");return a})(r?t:null);e.useEffect((()=>{s&&s!==t&&i(!1)}),[s,i,t]);const d=n&&s===t;return e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{onClick:()=>{d?(c(null),i(!1)):(c(t),i(!0))},className:m("pdpBuyBoxAccordion-title",{active:d})},t),e.createElement("div",{ref:o,className:"pdpBuyBoxAccordion-content",style:{maxHeight:0,opacity:0,...l}},a))},Qp=()=>{const{accordionsData:t}=xl();if(!t)return null;const{show_hsa_fsa:a}=t;return a?e.createElement(Xp,{title:"How to Use Your Insurance or HSA/FSA"},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement("ol",null,e.createElement("li",null,"Purchase prescription glasses using your debit or credit card.",e.createElement("br",null),"-or-",e.createElement("br",null),"Purchase prescription glasses using your FSA/HSA card."),e.createElement("li",null,"Sign in to your ROKA account. Select your order and download an itemized receipt."),e.createElement("li",null,"Submit the receipt to your insurance provider/FSA/HSA for reimbursement or (if you purchased with your FSA/HSA card directly) save your receipt for your FSA/HSA records.")))):null},ef=()=>{const{accordionsData:t,product:a}=xl();if(!t)return null;const{show_hto:r,hto_content:n}=t;if(!r)return null;const i="Eyeglasses"===a?.productType,o="How to Tryout at Home";return Dr(n)?e.createElement(Xp,{title:o,isOpenDefault:!0},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement(Mn,{field:n}))):e.createElement(Xp,{title:o,isOpenDefault:!0},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement("ol",null,e.createElement("li",null,i?e.createElement(e.Fragment,null,e.createElement("b",null,"Select your kit(s)."),"Shop our curated"," ",e.createElement("a",{href:"/collections/home-tryout-collection"},"collection")," ","of kits based on shape, size, or vibe."):e.createElement(e.Fragment,null,e.createElement("b",null,"Select your kit(s).")," ",e.createElement("a",{href:"https://www.roka.com/collections/home-tryout-collection"},"Add a kit to your cart."))),e.createElement("li",null,e.createElement("b",null,"Try out the frames.")," Hit your daily routine, hard. Put some miles on 'em."),e.createElement("li",null,e.createElement("b",null,"Order on ",e.createElement("a",{href:"https://roka.com"},"ROKA.com"),".")," ","Use your $30 gift card towards your purchase."),e.createElement("li",null,e.createElement("b",null,"Get after it.")," Put on your ROKAs. Feel the difference."))))},tf=()=>{const[t,a]=e.useState(!1),{accordionsData:r}=xl();if(!r)return null;const{show_measurements:n,measurements_image:i}=r;if(!n||!i?.url)return null;return e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{onClick:()=>a(!t),className:m("pdpBuyBoxAccordion-title",{active:t})},"Measurements"),e.createElement("div",{className:m("modalGeneric","measurements",{isOpen:t})},e.createElement("div",{className:m("modalGenericContent",{isOpen:t})},e.createElement("div",{className:"modelGenericClose",onClick:()=>a(!t)}),e.createElement("div",{className:"modalGenericContentImage",style:{}},e.createElement(Un,{src:i.url,alt:i.alt})))))},af=()=>{const{accordionsData:t,mwwData:a}=xl();if(!t)return null;const{show_more_ways_to_wear:r}=t;return!r||!a?.products?.length?null:e.createElement(Xp,{title:"More Ways To Wear"},e.createElement(Ko,{modules:[Wi,$i],slidesPerView:1.25,spaceBetween:20,pagination:{el:".pdpBuyBoxProducts-pagination",clickable:!0}},a.products.map(((t,a)=>e.createElement(qo,{key:`${t.id}-${a}`},(()=>e.createElement("a",{key:t.id,href:`/products/${t.handle}`,className:"pdpBuyBoxProduct"},e.createElement("div",{className:"pdpBuyBoxProduct-image"},e.createElement(Un,{src:t.featuredImage.url,alt:t.featuredImage.altText})),e.createElement("div",{className:"pdpBuyBoxProduct-content"},e.createElement("p",{className:"pdpBuyBoxProduct-title"},t.title),e.createElement("p",{className:"pdpBuyBoxProduct-price"},"from"," ",yr(t.priceRange.minVariantPrice.amount)))))))),e.createElement("div",{className:"pdpBuyBoxProducts-pagination"})))},rf=({productGid:t})=>{const a=e.useRef();if(e.useEffect((()=>{"undefined"!=typeof window&&setTimeout((()=>{window.yotpoWidgetsContainer?.initWidgets?.()}),1e3)}),[]),!t)return null;const r={"data-yotpo-instance-id":"558188","data-yotpo-product-id":Number(t.split("/").pop()),"data-yotpo-cart-product-id":"","data-yotpo-section-id":"product"};return e.createElement("div",h({ref:a,className:"yotpo bottomLine"},r))},nf=()=>{const{accordionsData:t,product:a}=xl();if(!t)return null;const{show_review_rating:r}=t;return r?e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{className:"pdpBuyBoxAccordion-title",onClick:e=>{window.scrollTo(),e.preventDefault();const t=document.querySelector("#yotpo-app");t&&t.scrollIntoView({behavior:"smooth"})}},e.createElement(rf,{productGid:a.id}))):null};let of;const lf=new Uint8Array(16);function sf(){if(!of&&(of="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!of))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return of(lf)}var cf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function df(e){return"string"==typeof e&&cf.test(e)}const mf=[];for(let e=0;e<256;++e)mf.push((e+256).toString(16).slice(1));function uf(e,t=0){return mf[e[t+0]]+mf[e[t+1]]+mf[e[t+2]]+mf[e[t+3]]+"-"+mf[e[t+4]]+mf[e[t+5]]+"-"+mf[e[t+6]]+mf[e[t+7]]+"-"+mf[e[t+8]]+mf[e[t+9]]+"-"+mf[e[t+10]]+mf[e[t+11]]+mf[e[t+12]]+mf[e[t+13]]+mf[e[t+14]]+mf[e[t+15]]}function pf(e,t,a){function r(e,r,n,i){var o;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a<e.length;++a)t.push(e.charCodeAt(a));return t}(e)),"string"==typeof r&&(r=function(e){if(!df(e))throw TypeError("Invalid UUID");let t;const a=new Uint8Array(16);return a[0]=(t=parseInt(e.slice(0,8),16))>>>24,a[1]=t>>>16&255,a[2]=t>>>8&255,a[3]=255&t,a[4]=(t=parseInt(e.slice(9,13),16))>>>8,a[5]=255&t,a[6]=(t=parseInt(e.slice(14,18),16))>>>8,a[7]=255&t,a[8]=(t=parseInt(e.slice(19,23),16))>>>8,a[9]=255&t,a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,a[11]=t/4294967296&255,a[12]=t>>>24&255,a[13]=t>>>16&255,a[14]=t>>>8&255,a[15]=255&t,a}(r)),16!==(null===(o=r)||void 0===o?void 0:o.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+e.length);if(l.set(r),l.set(e,r.length),l=a(l),l[6]=15&l[6]|t,l[8]=63&l[8]|128,n){i=i||0;for(let e=0;e<16;++e)n[i+e]=l[e];return n}return uf(l)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function ff(e){return 14+(e+64>>>9<<4)+1}function hf(e,t){const a=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(a>>16)<<16|65535&a}function vf(e,t,a,r,n,i){return hf((o=hf(hf(t,e),hf(r,i)))<<(l=n)|o>>>32-l,a);var o,l}function gf(e,t,a,r,n,i,o){return vf(t&a|~t&r,e,t,n,i,o)}function bf(e,t,a,r,n,i,o){return vf(t&r|a&~r,e,t,n,i,o)}function yf(e,t,a,r,n,i,o){return vf(t^a^r,e,t,n,i,o)}function Ef(e,t,a,r,n,i,o){return vf(a^(t|~r),e,t,n,i,o)}pf("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let a=0;a<t.length;++a)e[a]=t.charCodeAt(a)}return function(e){const t=[],a=32*e.length,r="0123456789abcdef";for(let n=0;n<a;n+=8){const a=e[n>>5]>>>n%32&255,i=parseInt(r.charAt(a>>>4&15)+r.charAt(15&a),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[ff(t)-1]=t;let a=1732584193,r=-271733879,n=-1732584194,i=271733878;for(let t=0;t<e.length;t+=16){const o=a,l=r,s=n,c=i;a=gf(a,r,n,i,e[t],7,-680876936),i=gf(i,a,r,n,e[t+1],12,-389564586),n=gf(n,i,a,r,e[t+2],17,606105819),r=gf(r,n,i,a,e[t+3],22,-1044525330),a=gf(a,r,n,i,e[t+4],7,-176418897),i=gf(i,a,r,n,e[t+5],12,1200080426),n=gf(n,i,a,r,e[t+6],17,-1473231341),r=gf(r,n,i,a,e[t+7],22,-45705983),a=gf(a,r,n,i,e[t+8],7,1770035416),i=gf(i,a,r,n,e[t+9],12,-1958414417),n=gf(n,i,a,r,e[t+10],17,-42063),r=gf(r,n,i,a,e[t+11],22,-1990404162),a=gf(a,r,n,i,e[t+12],7,1804603682),i=gf(i,a,r,n,e[t+13],12,-40341101),n=gf(n,i,a,r,e[t+14],17,-1502002290),r=gf(r,n,i,a,e[t+15],22,1236535329),a=bf(a,r,n,i,e[t+1],5,-165796510),i=bf(i,a,r,n,e[t+6],9,-1069501632),n=bf(n,i,a,r,e[t+11],14,643717713),r=bf(r,n,i,a,e[t],20,-373897302),a=bf(a,r,n,i,e[t+5],5,-701558691),i=bf(i,a,r,n,e[t+10],9,38016083),n=bf(n,i,a,r,e[t+15],14,-660478335),r=bf(r,n,i,a,e[t+4],20,-405537848),a=bf(a,r,n,i,e[t+9],5,568446438),i=bf(i,a,r,n,e[t+14],9,-1019803690),n=bf(n,i,a,r,e[t+3],14,-187363961),r=bf(r,n,i,a,e[t+8],20,1163531501),a=bf(a,r,n,i,e[t+13],5,-1444681467),i=bf(i,a,r,n,e[t+2],9,-51403784),n=bf(n,i,a,r,e[t+7],14,1735328473),r=bf(r,n,i,a,e[t+12],20,-1926607734),a=yf(a,r,n,i,e[t+5],4,-378558),i=yf(i,a,r,n,e[t+8],11,-2022574463),n=yf(n,i,a,r,e[t+11],16,1839030562),r=yf(r,n,i,a,e[t+14],23,-35309556),a=yf(a,r,n,i,e[t+1],4,-1530992060),i=yf(i,a,r,n,e[t+4],11,1272893353),n=yf(n,i,a,r,e[t+7],16,-155497632),r=yf(r,n,i,a,e[t+10],23,-1094730640),a=yf(a,r,n,i,e[t+13],4,681279174),i=yf(i,a,r,n,e[t],11,-358537222),n=yf(n,i,a,r,e[t+3],16,-722521979),r=yf(r,n,i,a,e[t+6],23,76029189),a=yf(a,r,n,i,e[t+9],4,-640364487),i=yf(i,a,r,n,e[t+12],11,-421815835),n=yf(n,i,a,r,e[t+15],16,530742520),r=yf(r,n,i,a,e[t+2],23,-995338651),a=Ef(a,r,n,i,e[t],6,-198630844),i=Ef(i,a,r,n,e[t+7],10,1126891415),n=Ef(n,i,a,r,e[t+14],15,-1416354905),r=Ef(r,n,i,a,e[t+5],21,-57434055),a=Ef(a,r,n,i,e[t+12],6,1700485571),i=Ef(i,a,r,n,e[t+3],10,-1894986606),n=Ef(n,i,a,r,e[t+10],15,-1051523),r=Ef(r,n,i,a,e[t+1],21,-2054922799),a=Ef(a,r,n,i,e[t+8],6,1873313359),i=Ef(i,a,r,n,e[t+15],10,-30611744),n=Ef(n,i,a,r,e[t+6],15,-1560198380),r=Ef(r,n,i,a,e[t+13],21,1309151649),a=Ef(a,r,n,i,e[t+4],6,-145523070),i=Ef(i,a,r,n,e[t+11],10,-1120210379),n=Ef(n,i,a,r,e[t+2],15,718787259),r=Ef(r,n,i,a,e[t+9],21,-343485551),a=hf(a,o),r=hf(r,l),n=hf(n,s),i=hf(i,c)}return[a,r,n,i]}(function(e){if(0===e.length)return[];const t=8*e.length,a=new Uint32Array(ff(t));for(let r=0;r<t;r+=8)a[r>>5]|=(255&e[r/8])<<r%32;return a}(e),8*e.length))}));var Cf={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function wf(e,t,a,r){switch(e){case 0:return t&a^~t&r;case 1:case 3:return t^a^r;case 2:return t&a^t&r^a&r}}function xf(e,t){return e<<t|e>>>32-t}pf("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,n=Math.ceil(r/16),i=new Array(n);for(let t=0;t<n;++t){const a=new Uint32Array(16);for(let r=0;r<16;++r)a[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];i[t]=a}i[n-1][14]=8*(e.length-1)/Math.pow(2,32),i[n-1][14]=Math.floor(i[n-1][14]),i[n-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<n;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=i[e][t];for(let e=16;e<80;++e)r[e]=xf(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let n=a[0],o=a[1],l=a[2],s=a[3],c=a[4];for(let e=0;e<80;++e){const a=Math.floor(e/20),i=xf(n,5)+wf(a,o,l,s)+c+t[a]+r[e]>>>0;c=s,s=l,l=xf(o,30)>>>0,o=n,n=i}a[0]=a[0]+n>>>0,a[1]=a[1]+o>>>0,a[2]=a[2]+l>>>0,a[3]=a[3]+s>>>0,a[4]=a[4]+c>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}));const kf=["frame-temple","frame","lens","rocker","temple","nose"],Sf=e=>{const t=kf.find((t=>new RegExp(t).test(e)));return"temple-pad"===t?"templepad":"frame-temple"===t?"frametemple":t},Nf=["s","tq","p","b"],Lf={kona:["s","p"]},Tf=e=>Lf[e]||Nf,Pf=["san-remo-air","san-remo","cp-1x","matador-air","tl-1","sr-1","sr-1x"],Mf=(e,t)=>{const a=(r=e.baseProductHandle).includes("matador-air")?"matador-air":r.includes("matador")?"matador":r.includes("san-remo-air")?"sanremoair":r.includes("san-remo")?"sanremo":r.slice(0,5).replace(/-/g,"");var r;const n={base:a,handle:e.baseProductHandle,size:"xl"},i=Object.entries(e.componentProductVariants).reduce(((e,[t,a])=>{const r=Sf(t),n=a.barcode;return e[r]=n,e}),n);return Tf(a).map((a=>{const r=new URLSearchParams({...i,perspective:a}).toString();let n="https://custom.roka.com/img";var o;o=e.baseProductHandle,Pf.some((e=>o.includes(e)))&&(n="https://custom-images.roka.com/img");const l=`${n}?${r}`;return{id:l,url:l,altText:t,title:t}}))},Af=/(?<productCode>[a-z]*)[0-9]*-/,_f=(e,t)=>{const a="at-1x-custom-sunglasses"===(r=e.baseProductHandle)?"at1x":"at-1-custom-sunglasses"===r?"at1":r.match(Af).groups.productCode;var r;const n=Object.entries(e.componentProductVariants).reduce(((e,[t,a])=>{const r=Sf(t),n=a.barcode;return e[r]=n,e}),{});return Tf(a).map((e=>({url:`https://img.roka.com/customizer/eyewear/${a}/${e}/${n.frame}_${n.lens}.jpg`,altText:t,title:t})))},Bf={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/frame.png",alt:"outline of an eyeglasses frame"},Ff={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/lens.png",alt:"outline of an eyeglasses lenses"},Of={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/rocker.png",alt:'outline of an eyeglasses under-eye "rocker"'},If={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/custom-icon-temple.svg",alt:"outline of an eyeglasses temple pad"},Df={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/nose-pad-icon-custom.svg",alt:"outline of an eyeglasses nosepad"},Rf=({baseProduct:e,parts:t})=>{const a=t.map((e=>{const t=(e=>{const t=e.toLowerCase().replace(/[^a-zA-Z0-9]/g,"");switch(t){case"framecolor":case"frame":return Bf;case"lens":case"lenscolor":case"lenses":return Ff;case"gekonosepad":case"nosepiece":case"nosepad":return Df;case"gekotemplegrips":case"templecolor":return If;case"rocker":return Of;default:console.log(`No configured icon for ${t}`)}})(e.title);return{id:e.id,handle:e.handle,icon:t,title:e.title,options:e.variants.nodes.map((e=>{const t=Jo(e.title);return{id:e.id,barcode:e.barcode,title:e.title,sku:e.sku,price:e.price,compareAtPrice:e.compareAtPrice,availableForSale:e.availableForSale,swatchClass:t}}))}}));return{partsProducts:a}},zf=e=>/(sl|sr|tl|cp|gp|matador|san-remo)-/.test(e),Hf=(e,t="")=>zf(e.baseProductHandle)?Mf(e,t):_f(e,t),Gf=(e,t)=>`https://www.roka.com/products/${t.handle}`,Vf={frame:"Frame Color - ",lens:"Lenses - ",rocker:"Rocker - ",temple:"GEKO™ Temple Grips - ",nosepiece:"Nosepiece - "},jf=e.createContext({}),$f="INIT",Wf="SELECT_PART",Uf="CHANGE_SIZE",Kf=(e,t)=>{let a;switch(t.type){case $f:return a=Zf(t.payload),{...a};case Wf:const{variant:r,product:n}=t.payload,i={...e.customizedProduct};i.componentProductVariants[n.handle]=r;const o=qf(i,e.pageProduct);return{...e,customizedProduct:i,...o};case Uf:const l=e.sizeOptions.find((e=>e.baseProduct.handle===t.payload.handle));return a=Zf({...e,...l}),{...e,...a};default:throw Error("Unknown action.")}},qf=(e,t)=>{const a=[e.baseProductVariant,...Object.values(e.componentProductVariants)],r=(e=>Object.entries(e.componentProductVariants).map((([e,t])=>{const a=Object.keys(Vf).find((t=>new RegExp(t).test(e)));return`${Vf[a]}${t.title}`})).join(" / "))(e),n=a.map((e=>e.id)),i=a.every((e=>e.availableForSale)),o=(e=>{const t=e.find((e=>e.price.currencyCode)),{currencyCode:a}=t.price;return{amount:e.map((e=>parseFloat(e.price.amount))).reduce(((e,t)=>e+t),0),currencyCode:a}})(a),l=(e=>{const t=e.find((e=>e.price.currencyCode)),{currencyCode:a}=t.price;return{amount:e.map((e=>e.compareAtPrice?parseFloat(e.compareAtPrice.amount):parseFloat(e.price.amount))).reduce(((e,t)=>e+t),0),currencyCode:a}})(a),s=Hf(e,r),c=(e=>Hf(e)[1])(e),d=100*o.amount,m=function(e,t,a){if(Cf.randomUUID&&!t&&!e)return Cf.randomUUID();const r=(e=e||{}).random||(e.rng||sf)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=r[e];return t}return uf(r)}(),u=(e=>e.baseProductVariant.title)(e),p=(e=>zf(e.baseProductHandle))(e);return{selectedVariants:a,selectedVariantIds:n,price:o,compareAtPrice:l,lineItemProperties:{_uuid:m,_rdscustom_uuid:m,_rdscustom_imageurl:c.url,_rdscustom_url:Gf(0,t),_rdscustom_title:u,_rdscustom_description:r,_rdscustom_price:d.toString(),_roka_product_type:"Custom_Sun",_rdscustom_lineitemcount:`${a.length}`},galleryImages:s,image:c.url,title:u,description:r,availableForSale:i,isApex:p}},Zf=e=>{const{baseProduct:t,parts:a,pageProduct:r,sizeOptions:n}=e,{partsProducts:i}=Rf({...e}),o=r.id!==t.id,l={baseProductHandle:t.handle,baseProductVariant:t.variants.nodes[0],componentProductVariants:{...a.reduce(((e,t)=>(e[t.handle]=t.variants.nodes[0],e)),{})},extraProductVariants:{}};return{baseProduct:t,parts:a,partsProducts:i,customizedProduct:l,pageProduct:r,showBackButton:o,sizeOptions:n,...qf(l,r)}},Yf=()=>{const t=e.useContext(jf);if(!t)throw new Error("useRokaProductCustomizer must be used within an RokaProductCustomizer");return t},Jf=({isActive:t,toggle:a,partProduct:r,selectPart:n,selectedVariantIds:i,isApex:o})=>{const l=r.options.find((e=>i.includes(e.id)));return e.createElement(e.Fragment,null,e.createElement("button",{onClick:a,className:"pdpBuyBoxConfigTitle","aria-label":`Expand ${r.title}`,"aria-pressed":t},o&&e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:r.icon.src,alt:r.icon.alt}),e.createElement("span",null,r.title,":")," ",l.title),e.createElement("div",{role:"radiogroup",className:m("pdpBuyBoxConfigOptions","pdpBuyBoxConfigSwatches",{active:t}),style:{maxHeight:t?"200px":0,opacity:t?1:0}},r.options.map((t=>{const a=i.find((e=>e===t.id));return e.createElement("button",{key:t.id,"data-vid":t.id,"data-barcode":t.barcode,"data-sku":t.sku,role:"radio","aria-checked":a,className:m("pdpSwatch",t.swatchClass,{active:i.find((e=>e===t.id)),disabled:!t.availableForSale}),"aria-label":`${t.availableForSale?"":"Unavailable: "}${r.title}: ${t.title}`,onClick:()=>n(r,t)})}))))},Xf=({style:t,text:a,title:r})=>e.createElement("div",{className:m("pdpBuyBoxDisclaimer",t&&`pdpBuyBoxDisclaimer--${t.toLowerCase()}`)},r&&e.createElement("h4",null,r),a&&e.createElement(Mn,{field:a})),Qf={"excluded-from-returns":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--warning"},e.createElement("h4",null,"All Sales Final"),e.createElement("p",null,"Outlet sale pricing applies to in-stock items only (while supplies last) and may not be applied to past purchases. No other discounts apply. No returns or exchanges on this item; however, our manufacturer's warranty does still apply.")),EXCHANGE_ONLY:()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer"},e.createElement("p",null,"Outlet sale pricing applies to in-stock items only (while supplies last) and may not be applied to past purchases. No other discounts apply. No returns are allowed on this item; however, exchanges are allowed, and our manufacturer's warranty does still apply.")),"open-box":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer"},e.createElement("p",null,"Open box sale pricing applies to in-stock items only (while supplies last) may not be applied to past purchases. No other discounts apply. No returns are allowed on the item however exchanges are allowed, and our manufacture's warranty does still apply.")),"price-varies-by-size":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--default"},e.createElement("h4",null,"Note"),e.createElement("p",null,"Prices vary by size."))},eh="https://img.roka.com/icons/pdp",th={"icon-cloudy":`${eh}/roka-icon-cat-1-cloudy.svg`,"icon-partly-cloudy":`${eh}/roka-icon-cat-2-partly-cloudy.svg`,"icon-full-sun":`${eh}/roka-icon-cat-3-full-sun.svg`,"icon-fullsun":`${eh}/roka-icon-cat-3-full-sun.svg`,"icon-indoor":`${eh}/roka-icon-cat-0-indoor.svg`},ah=({sku:t,optionValue:a,optionName:r,showValueName:n})=>{const i=Vl(t),o=i?.length>1;return e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},n&&e.createElement(e.Fragment,null,r&&e.createElement("span",null,r,":")," ",a)),i.length>0&&i.map(((t,a)=>{let r=0===a?"Primary Lens: ":"Accessory Lens: ";return e.createElement("div",{key:a,className:m({"pdpBuyBoxSelectedInfo-section":o})},o&&e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title-small"},r,t.title),e.createElement("div",{className:"pdpBuyBoxSelectedInfo-specs"},e.createElement("img",{className:"pdpBuyBoxLightIcon",src:th[t.iconClass],alt:"Icon Name"}),`${t.conditionName} - ${t.transmission} Light Transmission`))})))},rh=({optionName:t,optionValue:a,showValueName:r=!0,sku:n})=>{const{vltData:i}=xl();return Gl[n]?e.createElement(ah,{optionValue:a,sku:n,optionName:t,showValueName:r}):e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},r&&e.createElement(e.Fragment,null,t&&e.createElement("span",null,t,":")," ",a)),i?.condition&&e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpBuyBoxSelectedInfo-specs"},e.createElement("img",{className:"pdpBuyBoxLightIcon",src:th[i?.condition?.iconClass],alt:"Icon Name"}),`${i.condition.description} - ${i.transmission} Light Transmission`),e.createElement("div",{className:"pdpBuyBoxSelectedInfo-description"},e.createElement("p",null,i.description))))},nh=[.5,1,1.5,2,2.5,3],ih=e=>{const t=new Intl.NumberFormat("en-US",{minimumFractionDigits:1,maximumFractionDigits:1}).format(e);return isNaN(t)?"":t},oh=({onChange:t,value:a})=>{const r=nh.includes(Number(a))?`${ih(a)} Magnification`:"Select Magnification";return e.createElement("div",{className:"pdpBuyBoxMagnification"},e.createElement("div",{className:"pdpBuyBoxMagnificationOptions"},nh.map((r=>e.createElement("div",{className:m("pdpBuyBoxMagnificationOption",{active:r===Number(a)}),key:r,role:"button",onClick:()=>t(r)},ih(r))))),e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},r)))},lh=({availableForSale:t,inStockDesc:a,backInStockDate:r,backInStockDesc:n})=>t&&a?e.createElement("div",{className:"pdpBuyBoxPrice-shipping"},a):n&&r?e.createElement("div",{className:"pdpBuyBoxPrice-shipping outOfStock"},n.replace(/\{[a-zA-Z]+\}/gu,r)):null,sh={product_carousel:Zp,product_carousel_group:e=>e.primary.group_document.data?.slices?.flatMap(Zp)},ch=(e,t)=>{if(!t)return!1;const a=parseFloat(e.amount),r=parseFloat(t.amount);return a!==r&&a<r},dh=({children:t,isOpen:a,setIsOpen:r,className:n})=>e.createElement("div",{className:m("modalGeneric",n,{isOpen:a})},e.createElement("div",{className:m("modalGenericContent",{isOpen:a})},e.createElement("div",{className:"modelGenericClose",onClick:()=>r(!a)}),t)),mh="Small",uh="Regular",ph="XL",fh="Extra Small",hh="Small",vh="Medium",gh="Large",bh="Extra Large",yh="Extra Extra Large",Eh={[fh]:"xs",[hh]:"s",[vh]:"m",[gh]:"l",[bh]:"xl",[yh]:"xxl"},Ch=[mh,uh,ph],wh=[fh,hh,vh,gh,bh],xh=({optionName:t,optionValues:a,setSelectedVariant:r,isEyewear:n})=>("Size"===t&&a.sort(((e,t)=>((e,t,a)=>{const r=a?Ch:wh;return r.findIndex((t=>e.value.includes(t)))-r.findIndex((e=>t.value.includes(e)))})(e,t,n))),e.createElement("div",{role:"radiogroup",className:m("pdpBuyBoxToggle",{"pdpBuyBoxToggle--accessories":!n})},a.map((({variant:t,option:a,isActive:i})=>{const[o,l]=(s=a.value).includes(mh)?[mh,"Best fit for narrow faces."]:s.includes(uh)?[uh,"Best fit for most faces."]:s.includes(ph)?[ph,"Best fit for wider faces."]:["",""];var s;const{availableForSale:c}=t,d=!c;return e.createElement("span",{key:a.value,className:"pdpBuyBoxToggleLink",onClick:()=>r(t)},e.createElement("button",{role:"radio","aria-checked":i,type:"button",className:m({active:i,disabled:d})},n?e.createElement(e.Fragment,null,o,l&&" ",e.createElement("span",null,l)):e.createElement(Un,{src:`https://img.roka.com/customizer/eyewear/img/swatches/size-${Eh[a.value]}.png`,alt:a.value,width:32,height:32})),d&&e.createElement("div",{className:"pdpBuyBoxSwatchOos"}))})))),kh=({optionValues:t,setSelectedVariant:a})=>e.createElement("div",{className:"pdpBuyBoxThumbnails"},t.map((({variant:t,option:r,isActive:n})=>{if(!t)return null;const{availableForSale:i}=t;return e.createElement("div",{key:r.name+r.value,"data-option-name":r.name,className:m("pdpBuyBoxThumbnail",{active:n,disabled:!i})},e.createElement("span",{onClick:()=>a(t)},r.value))}))),Sh=({optionName:t,optionValues:a,setSelectedVariant:r})=>{const n=`variant-${t.toLowerCase().replace(/\s+/g,"-")}`,i=Object.fromEntries(a.map((({option:e,variant:t})=>[e.value,t])));return e.createElement("div",{className:"pdpBuyBoxConfigs"},e.createElement("div",{className:"pdpBuyBoxConfig"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("span",null,e.createElement("label",{htmlFor:n},t))),e.createElement("div",{className:"pdpBuyBoxConfigSelect"},e.createElement("select",{name:t,id:n,"aria-label":`Select ${t}`,onChange:e=>r(i[e.target.value])},a.map((({variant:t,option:a,isActive:r})=>{if(!t)return null;const{availableForSale:n}=t;return e.createElement("option",{key:a.name+a.value,value:a.value,"data-option-name":a.name,className:m("pdpBuyBoxThumbnail",{active:r,disabled:!n})},a.value)}))))))},Nh=({optionValues:t,setSelectedVariant:a})=>e.createElement("div",{className:"pdpBuyBoxAmount"},e.createElement("div",{className:"pdpBuyBoxAmountOptions"},t.map((t=>e.createElement("div",{className:m("pdpBuyBoxAmountOption",{active:t.isActive}),key:t.value,role:"button",onClick:()=>a(t.variant)},t.value))))),Lh=({optionValues:t,setSelectedVariant:a})=>{const r=Object.fromEntries(nh.map((e=>[e,t.find((t=>Number(t.value)===e))?.variant]))),n=t?.find((({isActive:e})=>e))?.value;return e.createElement(oh,{onChange:e=>{const t=r[Number(e)];t&&a(t)},value:n})},Th=t=>{const{optionName:a,optionValues:r,setSelectedVariant:n,selectedVariant:i}=t,o=r.find((e=>e.isActive)),l="Lens Color"===a;return e.createElement("div",{className:"pdpBuyBoxConfig"},e.createElement("div",{className:m("pdpBuyBoxConfigTitle","active")},e.createElement("span",null,a,":")," ",o.value," "),e.createElement("div",{role:"radiogroup",className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},r.map((t=>{const r=Jo(t.value);return e.createElement("button",{role:"radio","aria-checked":t.isActive,key:t.value,className:m("pdpSwatch",r,{active:t.isActive}),onClick:()=>n(t.variant),"data-sku":t.variant.sku,"data-vid":t.variant.id,"aria-label":`${a}: ${t.value}`})}))),l&&e.createElement(rh,{showValueName:!1,optionValue:o.value,sku:i.sku}))},Ph=["size","color","frame color","lens color"],Mh=e=>{const t=Ph.findIndex((t=>t===e.toLowerCase()));return-1===t?999:t},Ah=({optionGroups:t,selectedVariant:a,setSelectedVariant:r,showCustomToggle:n,setIsCustomModeEnabled:i,relatedRxSunProductPageUrl:o,isEyewear:l})=>{const s=t.sort(((e,t)=>Mh(e.title)-Mh(t.title))),c={setSelectedVariant:r,selectedVariant:a,showCustomToggle:n,setIsCustomModeEnabled:i,relatedRxSunProductPageUrl:o,isEyewear:l},d=s.find((e=>"Size"===e.title)),m=s.filter((e=>"Size"!==e.title));return e.createElement(e.Fragment,null,d&&e.createElement(xh,h({key:d.title},c,{optionName:d.title,optionValues:d.values})),e.createElement("div",{className:"pdpBuyBoxConfigs"},m.map((t=>e.createElement(Th,h({key:t.title},c,{optionName:t.title,optionValues:t.values}))))))},_h=({showCustomToggle:t,setIsCustomModeEnabled:a})=>t?e.createElement("button",{className:"pdpBuyBoxThumbnail pdpBuyBoxThumbnail-icon",onClick:()=>{a(!0)},"aria-label":"Enable full customization mode"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom.svg",alt:"CUSTOM Icon"})):null,Bh=({variant:t})=>t?.metafields?.custom?.ltd_description?.value?e.createElement("div",{className:"pdpBuyBoxSelectedInfo pdpBuyBoxSelectedInfo--ltd"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-description"},e.createElement("p",null,t?.metafields?.custom?.ltd_description?.value))):null,Fh=({relatedRxSunProductPageUrl:t})=>t?e.createElement("a",{href:t,className:"pdpBuyBoxThumbnail pdpBuyBoxThumbnail-icon","aria-label":"Shop this style in prescription sunglasses"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-rx-sun-black.svg",alt:"RX Sun Icon"})):null,Oh=({optionName:t,optionValues:a,setSelectedVariant:r,selectedVariant:n,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l})=>{const{rokaProductConfig:s}=xl();return e.createElement("div",{role:"radiogroup",className:"pdpBuyBoxThumbnails"},a.map((({variant:a,option:c,isActive:d,image:u},p,f)=>{if(!a)return null;const{availableForSale:h}=a,v=!h,g=p===f.length-1;if(g&&!a)return e.createElement(rh,{key:c.name+c.value,optionName:c.name,optionValue:n.selectedOptions.find((e=>e.name)).value,sku:n.sku});const b=u?.thumbUrl,y=s?.badges?.[a.id]?.badgeCodes?.includes?.("ltd")||"true"===a?.metafields?.custom?.is_ltd_product?.value,E=v?`${c.value} is unavailable`:c.value;return e.createElement(e.Fragment,{key:c.name+c.value},e.createElement("button",{role:"radio","aria-checked":d,tabIndex:"0",className:m("pdpBuyBoxThumbnail",{active:d,disabled:v}),"data-sku":a.sku,"data-id":a.id,onClick:()=>r(a)},e.createElement("span",null,y&&e.createElement("div",{className:"pdpBuyBoxThumbnail-badgeLTD"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-ltd-black.svg",alt:"LTD Limited Edition Logo"})),b?e.createElement("img",{src:u?.thumbUrl,alt:c.value,"aria-label":E}):c.value),v&&e.createElement("div",{className:"pdpBuyBoxSwatchOos"})),g&&e.createElement(e.Fragment,null,e.createElement(_h,{showCustomToggle:i,setIsCustomModeEnabled:o}),e.createElement(Fh,{relatedRxSunProductPageUrl:l}),e.createElement(rh,{optionName:c.name,optionValue:n?.selectedOptions.find((e=>e.name===t))?.value,sku:n.sku}),e.createElement(Bh,{variant:n})))})))},Ih=["color","design","frame color"],Dh=["size"],Rh=["magnification"],zh=["series","frame name"],Hh=["amount"],Gh=["size","color","frame color","lens color","magnification"],Vh=["color","size"],jh=(e,t)=>{const a=(t?Gh:Vh).findIndex((t=>t===e.toLowerCase()));return-1===a?999:a},$h=({galleryRef:t})=>{const{isVtoActive:a,startVto:r}=xl(),n=e.useRef(null),[i,o]=e.useState(),l=e.useRef(!1),[s,c]=e.useState(!1),[d,u]=e.useState(),[p,f]=e.useState(),[h,v]=e.useState();return e.useEffect((()=>{l.current=s}),[s]),e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{if(n.current&&!l.current){const e=n.current.getBoundingClientRect();o(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{if(!t.current||!n.current)return;const e=t.current.getBoundingClientRect(),a=(()=>{for(const e of document.querySelectorAll("header"))if(e.querySelector(".headerPrimary"))return e;return null})()?.getBoundingClientRect?.(),r=window.innerWidth>1150&&a?a.height:0,o=Math.max(e.top,r),l=window.innerWidth>760?20:12,s=Math.floor(o+l),d=s+80;let m=0;const p=window.innerWidth;p>760&&p<=1150?m=3:p>1150&&p<=1200?m=4:p>1200&&(m=3);const h=i?Math.floor(i.left+i.width/2)-m:0;c(e.top<o&&e.bottom>d),u(s),f(h)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[t,i]),e.useEffect((()=>{v(s?{left:p,top:d}:void 0)}),[p,d,s]),a?null:e.createElement("div",{ref:n,className:m("pdpGalleryVtoLogo",s&&"pdpGalleryVtoLogo--fixed"),role:"button",onClick:e=>{e?.stopPropagation?.(),r()},style:h},e.createElement("svg",{"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 205 36"},e.createElement("defs",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n .cls-1 {\n fill: #231f20;\n }\n\n .cls-2 {\n fill: #fff;\n }\n "}})),e.createElement("path",{className:"cls-1",d:"M187,36H18C8.06,36,0,27.94,0,18S8.06,0,18,0h169c9.94,0,18,8.06,18,18s-8.06,18-18,18Z"}),e.createElement("g",null,e.createElement("g",null,e.createElement("path",{className:"cls-2",d:"M161.37,10.79s-2.51.07-2.88.07-1.79-.78-2.96-1.03c-2.66-.59-6.06-.74-9.16-.59-3.84.18-8.28.89-9.16,1.03s-1.33.15-1.33.89v1.61c0,.46,0,.9.3,1.05s.74.59.89,1.63.96,5.51,1.77,7.54c.59,1.48,1.48,2.66,3.1,3.1s4.29.74,6.95.74,4.43-.59,5.62-1.33,2.36-2.51,3.25-4.73c.3-.74,1.33-4.43,1.48-4.88s.44-1.48,1.03-1.63,1.11-.15,1.11-.15v-3.33Z"}),e.createElement("g",null,e.createElement("path",{className:"cls-1",d:"M147.89,25.64c-.5,0-.99-.02-1.48-.06-2.19-.18-3.82-.55-4.99-1.13-1.02-.51-1.57-1.93-1.96-3.24-.4-1.35-.72-4.37-.72-6.06,0-1.5.55-2.5,1.09-2.82.63-.38,2.21-.74,3.85-.89,1.23-.11,2.57-.17,3.78-.17.46,0,.9,0,1.33.03,1.61.07,5.15.36,7.04.94,1.35.41,1.76,1.54,1.43,3.88-.27,1.9-.82,3.79-1.58,5.48-.72,1.57-1.19,2.61-2.71,3.3-.99.44-3.07.75-5.07.75h0Z"}),e.createElement("path",{className:"cls-2",d:"M147.46,11.76c.45,0,.89,0,1.31.03,1.84.08,5.2.39,6.92.92.92.28,1.42.94,1.08,3.34-.26,1.85-.8,3.7-1.55,5.34-.75,1.65-1.17,2.47-2.46,3.05-.76.34-2.61.71-4.87.71-.5,0-.98-.02-1.44-.06-2.12-.17-3.7-.52-4.81-1.08-.85-.43-1.34-1.73-1.71-2.94-.39-1.31-.7-4.26-.7-5.92,0-1.3.44-2.15.84-2.39.48-.29,1.88-.66,3.64-.82,1.21-.11,2.54-.17,3.73-.17M147.46,10.76c-1.28,0-2.63.07-3.82.18-1.63.15-3.33.52-4.06.96s-1.33,1.63-1.33,3.25.3,4.73.74,6.21c.44,1.48,1.03,2.96,2.22,3.55s2.81.99,5.17,1.18c.5.04,1.01.06,1.52.06,2.14,0,4.25-.33,5.28-.8,1.67-.75,2.22-1.92,2.96-3.55.74-1.63,1.33-3.55,1.63-5.62.3-2.07.15-3.84-1.77-4.43s-5.47-.89-7.17-.96c-.43-.02-.89-.03-1.35-.03h0Z"})),e.createElement("path",{className:"cls-2",d:"M161.17,10.79s2.51.07,2.88.07,1.79-.78,2.96-1.03c2.66-.59,6.06-.74,9.16-.59,3.84.18,8.28.89,9.16,1.03s1.33.15,1.33.89v1.61c0,.46,0,.9-.3,1.05s-.74.59-.89,1.63-.96,5.51-1.77,7.54c-.59,1.48-1.48,2.66-3.1,3.1s-4.29.74-6.95.74-4.43-.59-5.62-1.33-2.36-2.51-3.25-4.73c-.3-.74-1.33-4.43-1.48-4.88s-.44-1.48-1.03-1.63-1.11-.15-1.11-.15v-3.33Z"}),e.createElement("g",null,e.createElement("path",{className:"cls-1",d:"M174.65,25.64c-2,0-4.09-.31-5.07-.75-1.52-.68-1.99-1.72-2.71-3.3-.77-1.69-1.31-3.58-1.58-5.48-.34-2.35.08-3.47,1.42-3.88,1.89-.58,5.43-.87,7.04-.94.43-.02.87-.03,1.33-.03,1.21,0,2.55.06,3.78.17,1.64.15,3.23.52,3.85.89.54.32,1.09,1.32,1.09,2.82,0,1.7-.31,4.71-.72,6.06-.4,1.32-.94,2.73-1.96,3.24-1.17.58-2.8.95-4.99,1.13-.49.04-.99.06-1.48.06Z"}),e.createElement("path",{className:"cls-2",d:"M175.08,11.76c1.19,0,2.52.06,3.73.17,1.76.16,3.16.53,3.64.82.41.24.84,1.1.84,2.39,0,1.66-.3,4.61-.7,5.92-.36,1.21-.85,2.51-1.71,2.94-1.11.55-2.68.91-4.81,1.08-.46.04-.94.06-1.44.06-2.26,0-4.11-.37-4.87-.71-1.29-.58-1.71-1.4-2.46-3.05-.75-1.64-1.28-3.49-1.55-5.34-.34-2.4.16-3.05,1.08-3.34,1.71-.53,5.07-.84,6.92-.92.42-.02.86-.03,1.31-.03M175.08,10.76c-.46,0-.92,0-1.35.03-1.7.07-5.25.37-7.17.96s-2.07,2.36-1.77,4.43c.3,2.07.89,3.99,1.63,5.62.74,1.63,1.29,2.8,2.96,3.55,1.03.46,3.13.8,5.28.8.51,0,1.02-.02,1.52-.06,2.36-.19,3.99-.59,5.17-1.18s1.77-2.07,2.22-3.55c.44-1.48.74-4.58.74-6.21s-.59-2.81-1.33-3.25-2.44-.81-4.06-.96c-1.19-.11-2.55-.18-3.82-.18h0Z"}))),e.createElement("g",null,e.createElement("path",{className:"cls-2",d:"M23.44,23.34h-1.95l-3.15-9.81h1.83l2.31,7.96,2.33-7.96h1.78l-3.15,9.81Z"}),e.createElement("path",{className:"cls-2",d:"M28.09,13.53h1.68v9.81h-1.68v-9.81Z"}),e.createElement("path",{className:"cls-2",d:"M37.62,23.34l-1.82-3.66h-1.99v3.66h-1.68v-9.81h5.04c1.33,0,1.96.63,1.96,1.96v2.18c0,1.18-.49,1.81-1.53,1.93l1.83,3.73h-1.82ZM36.92,18.18c.39,0,.53-.14.53-.53v-2.07c0-.38-.14-.52-.53-.52h-3.11v3.12h3.11Z"}),e.createElement("path",{className:"cls-2",d:"M44.76,15.06v8.28h-1.68v-8.28h-2.77v-1.53h7.24v1.53h-2.79Z"}),e.createElement("path",{className:"cls-2",d:"M56.17,21.38c0,1.33-.63,1.96-1.96,1.96h-3.26c-1.33,0-1.96-.63-1.96-1.96v-7.84h1.68v7.75c0,.38.14.52.52.52h2.77c.39,0,.53-.14.53-.52v-7.75h1.68v7.84Z"}),e.createElement("path",{className:"cls-2",d:"M59.87,20.94l-.74,2.4h-1.77l3.19-9.81h2.34l3.19,9.81h-1.85l-.74-2.4h-3.63ZM61.69,15.04l-1.34,4.36h2.69l-1.34-4.36Z"}),e.createElement("path",{className:"cls-2",d:"M69.23,13.53v8.26h4.44v1.54h-6.12v-9.81h1.68Z"}),e.createElement("path",{className:"cls-2",d:"M81.68,15.06v8.28h-1.68v-8.28h-2.77v-1.53h7.24v1.53h-2.79Z"}),e.createElement("path",{className:"cls-2",d:"M91.52,23.34l-1.82-3.66h-1.99v3.66h-1.68v-9.81h5.04c1.33,0,1.96.63,1.96,1.96v2.18c0,1.18-.49,1.81-1.53,1.93l1.83,3.73h-1.82ZM90.82,18.18c.39,0,.53-.14.53-.53v-2.07c0-.38-.14-.52-.53-.52h-3.11v3.12h3.11Z"}),e.createElement("path",{className:"cls-2",d:"M97.25,23.34v-3.39l-3.29-6.42h1.82l2.33,4.68,2.33-4.68h1.79l-3.29,6.42v3.39h-1.68Z"}),e.createElement("path",{className:"cls-2",d:"M108.36,23.34c-1.33,0-1.96-.63-1.96-1.96v-5.88c0-1.33.63-1.96,1.96-1.96h3.43c1.33,0,1.96.63,1.96,1.96v5.88c0,1.33-.63,1.96-1.96,1.96h-3.43ZM108.08,21.28c0,.38.14.52.52.52h2.96c.38,0,.52-.14.52-.52v-5.69c0-.38-.14-.52-.52-.52h-2.96c-.38,0-.52.14-.52.52v5.69Z"}),e.createElement("path",{className:"cls-2",d:"M123.49,13.53v9.81h-1.65l-4.31-7.17v7.17h-1.62v-9.81h1.78l4.19,6.98v-6.98h1.62Z"})))))},Wh={oos:{classSuffix:"out",text:"Out of Stock"},sale:{classSuffix:"sale",text:"Sale"},new:{classSuffix:"new",text:"New"},ltd:{classSuffix:"ltd",text:"LTD"}},Uh=({url:t,altText:a,title:r})=>e.createElement("img",{src:t,alt:a,title:r}),Kh=({altText:t,isPreview:a,previewImage:r,sources:n})=>e.createElement(e.Fragment,null,a&&e.createElement("div",{className:"pdpGalleryImageVideoPreview"},e.createElement("img",{src:r.url,alt:t}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"pdpGalleryImageVideoPreviewPlayButton"})),!a&&e.createElement("video",{controls:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",poster:r?.url},n.map((({url:t,mimeType:a})=>e.createElement("source",{key:t,src:t,type:a}))))),qh=({altText:t,embedUrl:a,isPreview:r,previewImage:n})=>e.createElement(e.Fragment,null,r&&e.createElement("div",{className:"pdpGalleryImageVideoPreview"},e.createElement("img",{src:n.url,alt:t}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"pdpGalleryImageVideoPreviewPlayButton"})),!r&&e.createElement("iframe",{src:a,title:"Video player",allow:"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin"})),Zh=t=>{switch(t.mediaContentType){case"EXTERNAL_VIDEO":return e.createElement(qh,t);case"VIDEO":return e.createElement(Kh,t);default:return e.createElement(Uh,t)}};var Yh=Object.freeze({__proto__:null,AcknowledgeFeature:({children:t,onChange:a,warn:r=!1})=>e.createElement("div",{className:m("pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--acknowledge",{warn:r})},e.createElement("input",{type:"checkbox",id:"acknowledge",name:"acknowledge",onChange:a}),e.createElement("label",{htmlFor:"acknowledge"},t)),BuyBoxAccordions:()=>e.createElement("div",{className:"pdpBuyBoxAccordions"},e.createElement(Jp,null,e.createElement(nf,null),e.createElement(Qp,null),e.createElement(af,null),e.createElement(tf,null),e.createElement(ef,null))),BuyBoxCustomizerBackButton:({onClick:t})=>e.createElement("div",{className:"pdpBuyBoxConfigsTitle"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom-horizontal.svg",alt:"CUSTOM Horizontal Icon",width:"96",height:"23"}),e.createElement("button",{className:"pdpBuyBoxConfigsBack",onClick:t}," ","Back to All Colors")),BuyBoxCustomizerSwatchesAccordion:()=>{const{partsProducts:t,selectPart:a,selectedVariantIds:r,isApex:n}=Yf(),[i,o]=e.useState(t?t.reduce(((e,t,a)=>(e[a]=0===a,e)),{}):[]);return t?e.createElement(e.Fragment,null,t.map(((t,l)=>{const s=i[l];return e.createElement("div",{key:t.id,className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement(Jf,{isActive:s,isApex:n,toggle:()=>{const e={...i};e[l]=!e[l],o(e)},partProduct:t,selectPart:a,selectedVariantIds:r}))}))):null},BuyBoxDisclaimer:({productTags:t,additionalData:a,globalSettings:r})=>{if(!t)return null;if(a?.disclaimer?.text)return e.createElement(Xf,{style:a.disclaimer.style?.toLowerCase()||void 0,text:a.disclaimer.text,title:a.disclaimer.title});const n=r?.disclaimers?.find((e=>t.includes(e.tag)));if(n)return e.createElement(Xf,{style:n.style?.toLowerCase()||void 0,text:n.text,title:n.title});const i=t.find((e=>Qf[e]));if(i){const t=Qf[i];return e.createElement(t,null)}return null},BuyBoxGiftCardForm:({onChange:t})=>{const a=e=>{const{name:a,value:r}=e.target;t?.(a,r)};return e.createElement("div",{className:"pdpBuyBoxGiftCardForm"},e.createElement("form",{className:"formInsetLabels"},e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"recipient-email"},"Recipient Email *"),e.createElement("input",{type:"email",id:"recipient-email",name:"Recipient email",onChange:a,required:!0})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"recipient-name"},"Recipient Name"),e.createElement("input",{type:"text",id:"recipient-name",name:"Recipient name",onChange:a,maxLength:255})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"message"},"Message"),e.createElement("textarea",{id:"message",name:"Message",onChange:a,maxLength:200,rows:4})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"send-date"},"Send on"),e.createElement("input",{type:"date",id:"send-date",name:"Send on",onChange:a,min:(new Date).toISOString().split("T")[0],max:new Date(Date.now()+7776e6).toISOString().split("T")[0]})),e.createElement("input",{type:"hidden",name:"__shopify_send_gift_card_to_recipient",value:"true",onChange:a})))},BuyBoxLensSpecs:rh,BuyBoxMagnifications:oh,BuyBoxPrice:({displayAsFromBaseLensPrice:t,displayAsFromPrice:a,availableForSale:r,price:n,compareAtPrice:i,stock:o,saleTimer:l})=>{const s=ch(n,i),c=(e=>{if(!e)return;const t=e.time_zone.substring(3),a=e.end_time.substring(0,19),r=new Date(`${a}${t}`),n=new Date;let i,o=Math.max((r-n)/1e3,0);if(o<=0)return;if(e.convert_days){const e=Math.floor(o/86400);o-=86400*e;const t=Math.floor(o/3600);o-=3600*t;const a=Math.floor(o/60);o-=60*a,i=`${e} days, ${t} hrs, ${a} minutes`}else{const e=Math.floor(o/3600);o-=3600*e;const t=Math.floor(o/60);o-=60*t,i=`${e} hrs, ${t} minutes`}return e.timer_text.replace("[timer]",i)})(l);return e.createElement("div",{className:m("pdpBuyBoxPrice",{"pdpBuyBoxPrice--sale":s})},e.createElement("div",{className:"pdpBuyBoxPrice-amount"},a&&e.createElement(e.Fragment,null,e.createElement("span",null,"From")," ",s&&e.createElement("span",{className:"strikethru"},i.withoutTrailingZeros)," ",n.withoutTrailingZeros,t&&e.createElement(e.Fragment,null," ",e.createElement("span",null,"with base lens"))),!a&&e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"strikethru"},i.withoutTrailingZeros)," ",n.withoutTrailingZeros)),c&&e.createElement("div",{className:"pdpBuyBoxPrice-countdown"},c),o&&e.createElement(lh,h({availableForSale:r},o)))},BuyBoxReassurances:({reassurances:t})=>{const[a,r]=e.useState(!1);if(!t||!t.length>0)return null;const n=t[0].items.map((t=>{const{popup_title:a,popup_text:r}=t;return e.createElement("div",{key:a,className:"pdpReassuranceItem"},e.createElement("h4",null,a),e.createElement("p",null,r.map((e=>e.text)).join("")))}));return e.createElement(e.Fragment,null,e.createElement(dh,{isOpen:a,setIsOpen:r,className:"reassurances"},n),e.createElement("div",{className:"pdpBuyBoxReassure",onClick:()=>r(!a)},e.createElement("ul",null,t[0].items.map(((t,a)=>{const{icon:r,icon_width:n,buybox_text:i}=t;return e.createElement("li",{key:a},e.createElement(Un,{style:{width:n},src:r.url,alt:r.alt}),i.map((({text:t})=>e.createElement(e.Fragment,null,t))).reduce(((t,a)=>null===t?a:e.createElement(e.Fragment,null,t," ",e.createElement("br",null)," ",a)),null))})))))},BuyBoxShopPayButton:({estimatedShipDate:t})=>e.createElement(e.Fragment,null,e.createElement("button",{className:"buttonShopPay"},"Buy With"," ",e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-shoppay-white.svg",alt:"ShopPay Logo",width:"85",height:"23"})),t&&e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--preOrder"},e.createElement("p",null,"Expected to ship ",t))),BuyBoxSizeSelector:()=>e.createElement("div",{className:"pdpBuyBoxToggle"},e.createElement("button",{className:"active"},"Small ",e.createElement("span",null,"Best fit for narrow faces.")),e.createElement("button",null,"Regular ",e.createElement("span",null,"Best fit for most faces.")),e.createElement("button",null,"XL ",e.createElement("span",null,"Best fit for wider faces."))),BuyBoxSwatchesAccordion:()=>e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:"https://www.roka.com/cdn/shop/files/frame.png",alt:""}),e.createElement("span",null,"Color:")," Crystal Grey"),e.createElement("div",{className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},e.createElement("div",{className:"pdpSwatch black active"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch tortoise"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch matte-white"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch urban-grey"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch gold-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch silver-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch orange"},"Name of Swatch"))),e.createElement("div",{className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:"https://www.roka.com/cdn/shop/files/frame.png",alt:""}),e.createElement("span",null,"Color:")," Crystal Grey"),e.createElement("div",{className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},e.createElement("div",{className:"pdpSwatch black active"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch tortoise"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch matte-white"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch urban-grey"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch gold-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch silver-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch orange"},"Name of Swatch")))),BuyBoxTitle:({header:t="",subHeaders:a=[]})=>e.createElement("div",{className:"pdpBuyBoxTitle"},e.createElement("h1",null,t),a.map(((t,a)=>e.createElement("p",{key:t},t)))),BuyBoxVariantSelector:t=>{const{optionGroups:a,selectedVariant:r,setSelectedVariant:n,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l,isRxSunProduct:s=!1,isEyewear:c=!0}=t,d=a.sort(((e,t)=>jh(e.title,c)-jh(t.title,c))),m={setSelectedVariant:n,selectedVariant:r,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l,isEyewear:c};return s?e.createElement(Ah,t):e.createElement(e.Fragment,null,d.filter((({title:e,values:t})=>t.length>1||e.match(/color/i)||"color"===e?.toLowerCase?.())).map((t=>{const{title:a,values:r}=t,n={...m,optionName:a,optionValues:r};return i=a,Dh.includes(i.toLowerCase())?e.createElement(xh,h({key:a},n)):(e=>Ih.includes(e.toLowerCase()))(a)?e.createElement(Oh,h({key:a},n)):(e=>Rh.includes(e.toLowerCase()))(a)?e.createElement(Lh,h({key:a},n)):(e=>zh.includes(e.toLowerCase()))(a)?e.createElement(Sh,h({key:a},n)):(e=>Hh.includes(e.toLowerCase()))(a)?e.createElement(Nh,h({key:a},n)):e.createElement(kh,h({key:a},n));var i})))},BuyBoxVariantSelectorButtons:xh,BuyBoxVariantSelectorSwatches:Th,BuyBoxVariantSelectorThumbnails:Oh,BuyBoxVtoButton:()=>{const{isVtoActive:t,startVto:a,stopVto:r,isVtoEnabled:n}=xl();return n?e.createElement("div",{role:"button",className:"pdpBuyBoxVTO",onClick:()=>{t?r():a()}},e.createElement("img",{className:"pdpBuyBoxVTO-script",src:"https://img.roka.com/customizer/eyewear/img/vto/try-on-handwritten-text.png",alt:"virutal try on"}),e.createElement("p",null,"Try on virtually and have the confidence to get them IRL."),e.createElement("img",{className:"pdpBuyBoxVTO-animation",src:"https://img.roka.com/customizer/eyewear/img/vto/vto_rx_video.gif",alt:"gif of people wearing various eyeglasses"})):null},Gallery:({images:t=[],badges:a=[]})=>{const[r,n]=e.useState(-1),[i,o]=e.useState(!1),{isVtoActive:l,isVtoEnabled:s}=xl(),c=e.useRef(null),d=e.useRef(null);return e.useEffect((()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(max-width: 767px)");o(e.matches)}),[]),e.useEffect((()=>{-1!==r?document.body.classList.add("hasPdpGalleryLightbox"):document.body.classList.remove("hasPdpGalleryLightbox")}),[r]),e.useEffect((()=>()=>{document.body.classList.remove("hasPdpGalleryLightbox")}),[]),e.useEffect((()=>{i&&l&&d.current&&d.current.slideTo(0)}),[l,i]),e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpGallery"},s&&e.createElement($h,{galleryRef:c}),a.length>0&&!l&&e.createElement("div",{className:"pdpGalleryBadges"},a.map((t=>{const a=Wh[t];if(!a)return;const{classSuffix:r,text:n}=a;return e.createElement("div",{key:n,className:`pdpGalleryBadge-${r}`},n)}))),i?e.createElement(Ko,{modules:[Wi],spaceBetween:20,scrollbar:{draggable:!0,el:".carouselControlsArrowDrag"},slidesPerView:1,wrapperClass:"pdpGalleryImages",ref:d,onSwiper:e=>d.current=e},s&&e.createElement(qo,{className:m("pdpGalleryImage",{hidden:!l})},e.createElement(kl,null)),t.map((t=>e.createElement(qo,{key:t.id,className:"pdpGalleryImage"},e.createElement(Zh,t)))),e.createElement("div",{slot:"container-end"},e.createElement("div",{className:"carouselControls"},e.createElement("div",{className:"carouselControlsArrowDrag"})))):e.createElement(e.Fragment,null,e.createElement(kl,null),e.createElement("div",{className:"pdpGalleryImages",ref:c},t.map(((t,a)=>e.createElement("div",{key:t.id,className:m("pdpGalleryImage",{"pdpGalleryImage--half":0!==a,"pdpGalleryImage--lifestyle":!1}),role:"button",onClick:()=>n(a)},e.createElement(Zh,h({},t,{isPreview:!0})))))))),-1!==r&&e.createElement("div",{className:"pdpGalleryLightbox"},e.createElement("div",{className:"pdpGalleryLightboxClose",onClick:()=>n(-1)},e.createElement("button",{type:"button",className:"buttonClear"},"Close")),e.createElement(Ko,{direction:"vertical",modules:[zi,Hi,Wi],spaceBetween:20,scrollbar:{draggable:!0,el:".lightboxCarouselControlsArrowDrag"},keyboard:{enabled:!0},mousewheel:{enabled:!0},slidesPerView:1,wrapperClass:"pdpGalleryLightboxSwiper",initialSlide:r},t.map((t=>e.createElement(qo,{key:t.id,className:"pdpGalleryLightboxSwiperSlide"},e.createElement(Zh,t)))),e.createElement("div",{slot:"container-end"},e.createElement("div",{className:"lightboxCarouselControls"},e.createElement("div",{className:"lightboxCarouselControlsArrowDrag"}))))))}});const Jh={ambassadors_grid:()=>e.createElement("div",{"data-slice-name":"AmbassadorsGrid"},"AmbassadorsGrid"),banner_grid:Kn,banner_image:t=>{const a=Zn[t.slice.variation];if(!a)throw new Error(`No BannerImage component found for variation ${t.slice.variation}`);return e.createElement(a,t)},collection_marketing_tile:il,collection_products:t=>{const{slice:a}=t,r=qp[a.variation];if(!r)throw new Error(`No CollectionProducts component found for variation ${a.variation}`);return e.createElement("section",{"data-slice-type":a.slice_type,"data-slice-variation":a.variation},e.createElement(r,{slice:a}))},contact_us:()=>e.createElement("div",{"data-slice-name":"ContactUs"},"ContactUs"),email_signup:pl,foursixty_slider:El,hashtag_banner:({slice:t})=>{const{image:a,title:r}=t.primary;return e.createElement("div",{className:"hashtagBanner hashtagBanner--zombie"},e.createElement("div",{className:"hashtagBannerContent"},r),e.createElement("div",{className:"hashtagBannerCoverImage"},e.createElement("img",{src:a.url,alt:a.alt})))},image_grid:Sl,image_link_carousel:Ll,ironman_calendar:()=>e.createElement("div",{"data-slice-name":"IronmanCalendar"},"IronmanCalendar"),lens_tints:ns,navigation_item:ds,pagehero:Ss,product_cards:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productCards productCards--upsell","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductCards"},e.createElement("h2",null,r),e.createElement("div",{className:"productCardsItems"},a.map(((t,a)=>{const{description:r,image:n,image_hover:i,link:o,price:l,status:s,title:c,variant_info:d}=t;return e.createElement("div",{className:"productCard",key:`${o.url}-${a}`},e.createElement("a",{href:o.url},s&&e.createElement("div",{className:"productCard-status"},s),e.createElement("div",{className:"productCard-images"},e.createElement(Un,{src:n.url,alt:n.alt}),e.createElement(Un,{src:i.url,alt:i.alt})),e.createElement("div",{className:"productCard-content"},c&&e.createElement("h3",null,c),e.createElement("p",{className:"productCard-description"}," ",r," "),e.createElement("p",{className:"productCard-colors"},d),e.createElement("p",{className:"productCard-price"},l))))}))))},product_carousel_group:_s,product_comparison:({slice:t})=>{const{products:a,subtitle:r,title:n}=t.primary;return e.createElement("div",{className:"productComparison","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductComparison"},e.createElement("div",{className:"productComparisonIntro"},e.createElement("h2",null,n),e.createElement("p",null,r)),e.createElement("div",{className:"productComparisonItems"},a.map(((t,a)=>{const{description:r,image:n,subtitle:i,title:o}=t;return e.createElement("div",{className:"productComparisonItem",key:a},e.createElement(Un,{src:n.url,alt:n.alt}),e.createElement("h3",null,o),e.createElement("h4",null,i),e.createElement("p",null,r))}))))},product_core_tech:t=>{const a=Fs[t.slice.variation];if(!a)throw new Error(`No ProductCoreTech component found for variation ${t.slice.variation}`);return e.createElement("div",{className:"productCoreTech-hotfix"},e.createElement("div",{className:m("productCoreTech","productCoreTechCarousel"===t.slice.variation&&"productCoreTech--carousel"),"data-slice-type":t.slice.slice_type,"data-slice-variation":t.slice.variation,"data-slice-name":"ProductCoreTech"},e.createElement("div",{className:"productCoreTechTitle"},e.createElement("h2",null,t.slice.primary.title)),e.createElement(a,t)))},product_info:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productLensInfo","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductInfo"},e.createElement("div",{className:"productLensInfoTitle"},e.createElement("h2",null,r)),e.createElement("div",{className:"productLensInfoItems"},a.map(((t,a)=>{const{content:r,icon:n,subtitle:i,title:o}=t;return e.createElement("div",{className:"productLensInfoItem",key:a},e.createElement(Un,{loading:"lazy",src:n.url,alt:n.alt}),e.createElement("h3",null,o),e.createElement("h4",null,i),e.createElement(Mn,{field:r}))}))))},product_infographic:({slice:t})=>{const{content:a,image:r,overlay_subtitle:n,overlay_title:i,subtitle:o,title:l}=t.primary;return e.createElement("div",{className:"productInfographic productInfographic--rise"},e.createElement("div",{className:"productInfographicContent"},e.createElement("h2",null,l),e.createElement("h3",null,o),e.createElement(Mn,{field:a})),e.createElement("div",{className:"productInfographicImage"},e.createElement("div",{className:"productInfographicImage-overlay"},e.createElement("span",null,i),e.createElement("br",null),n),e.createElement("img",{loading:"lazy",src:r.url,alt:r.alt})))},product_intro:({slice:t})=>{const{content:a,image:r,title:n}=t.primary;return e.createElement("div",{className:"productIntro","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductIntro"},e.createElement("div",{className:"productIntroImage"},e.createElement("img",{loading:"lazy",src:r.url,alt:r.alt})),e.createElement("div",{className:"productIntroContent"},e.createElement("div",{className:"productIntroContent-item"},e.createElement("h2",null,n),e.createElement(Mn,{field:a}))))},product_lifestyle:t=>{const a=Is[t.slice.variation];if(!a)throw new Error(`No ProductLifestyle component found for variation ${t.slice.variation}`);return e.createElement("div",{className:"productLifestyle","data-slice-type":t.slice.slice_type,"data-slice-variation":t.slice.variation,"data-slice-name":"ProductLifestyle"},zr(t.slice.primary.feature_image)&&e.createElement("div",{className:"productLifestyleFeature"},e.createElement("div",{className:"productLifestyleImage"},e.createElement(Un,{field:t.slice.primary.feature_image}))),e.createElement(a,t))},product_specs:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productSpecs","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductSpecs"},e.createElement("div",{className:"productSpecsTitle"},e.createElement("h2",null,r)),e.createElement("div",{className:"productSpecsItems"},a.map(((t,a)=>{const{content:r,image:n,title:i}=t;return e.createElement("div",{className:"productSpecsItem",key:a},e.createElement("div",{className:"productSpecsItem-image"},e.createElement("h3",null,i),e.createElement(Un,{src:n.url,alt:n.alt})),e.createElement(Mn,{field:r}))}))))},product_tech:({slice:t})=>{if("productTechRise"===t.variation)return e.createElement(Ds,{slice:t});const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productTech","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductTech"},e.createElement("div",{className:"productTechTitle"},r&&e.createElement("h2",null,r)),e.createElement("div",{className:"productTechItems"},a.map(((t,a)=>{const{image:r,title:n}=t;return e.createElement("div",{className:"productTechItem",key:a},e.createElement("div",{className:"productTechItem-image"},e.createElement(Un,{loading:"lazy",src:r.url,alt:r.alt})),n&&e.createElement("div",{className:"productTechItem-title"},n))}))))},rich_text:({slice:t,...a})=>e.createElement("div",{"data-slice-name":"RichText",className:"standardContent"},e.createElement("div",{className:"standardContent-item"},e.createElement(Mn,{field:t.primary.content}))),sections_collection:()=>e.createElement("div",{"data-slice-name":"SectionsCollection"},"SectionsCollection"),statement:Fm,static_html:({slice:t})=>{const{html:a,visible:r}=t.primary;return r?e.createElement("div",{"data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"StaticHtml",dangerouslySetInnerHTML:{__html:a}}):null},webflow_assets:({slice:t})=>(e.useEffect((()=>{if(t.primary.page_id?.trim()&&t.primary.site_id?.trim()){const e=document.documentElement;e.setAttribute("data-wf-page",t.primary.page_id),e.setAttribute("data-wf-site",t.primary.site_id)}}),[t.primary.page_id,t.primary.site_id]),e.createElement(e.Fragment,null,t.primary.assets.map(((t,a)=>e.createElement(Rm,h({key:`${t.asset_url?.url}-${a}`},t)))))),video:jm},Xh={PageHeader:({customer:t,globalSettings:a,isLoggedIn:r,location:n,navigation:i,onSubmitQuery:o})=>{const{cart:l,isSidecartOpen:s,setIsSidecartOpen:c}=kr(),{query:d,results:u,setQuery:p,trackSearchAttribution:f}=_m(),[v,g]=e.useState(!1),[b,y]=e.useState(!1),E=e.useRef(null),[C,w]=e.useState(null),[x,k]=e.useState(null),[S,N]=e.useState(null),L=e.useCallback((()=>{if(a?.data?.sitewide_banner||Dr(a?.data?.sitewide_banner_structured)){const{sitewide_banner:r,sitewide_banner_link_color:n,sitewide_banner_structured:i,sitewide_sale_end_time:o}=a.data,l=o?(t=o)?24===t.length?new Date(t.replace(/(\+|-)(\d{2})(\d{2})$/,".000$1$2:$3")):new Date(t):null:null,s=l?(e=>{const t=new Date;let a=Math.max((e-t)/1e3,0);const r=Math.floor(a/3600);a-=3600*r;const n=Math.floor(a/60);return a-=60*n,`${r} hrs. ${n} minutes`})(l):null;let c;if(Dr(i)){const t=i?.map?.((e=>({...e,text:e.text?.replace("[timer]",s)})));c=e.createElement(Mn,{field:t,components:{hyperlink:Km(n),paragraph:qm}})}else c=r.replace("[timer]",s);e.startTransition((()=>{w(c)}))}var t}),[a?.data?.sitewide_banner,a?.data?.sitewide_sale_end_time]);e.useEffect((()=>{L();const e=setInterval(L,1e3);return()=>clearInterval(e)}),[L]),e.useEffect((()=>{const a=gr(t),r=vr(t);a&&r&&k(e.createElement("span",null,"You are now a part of team ",a,", enjoy ",r,"% off select products."))}),[t]),e.useEffect((()=>{t?.tags?.includes?.("PRO-PROGRAM-CUSTOMER")&&Dr(a?.data?.pro_program_banner)&&N(e.createElement(Mn,{field:a?.data?.pro_program_banner,components:{hyperlink:Km("#ffffff"),paragraph:qm}}))}),[t?.tags,a?.data?.pro_program_banner]),e.useEffect((()=>{b&&E.current&&E.current.focus()}),[b,E]);const T=e.useCallback((()=>c(!s)),[s,c]),P=e.useCallback((e=>{e.preventDefault(),e.stopPropagation(),o?.(e.target[0].value)}),[o]),M=si(l?.lines?.nodes),A=C||x||S;return e.createElement(e.Fragment,null,e.createElement("header",{className:m({hasHeaderBanner:A})},C?e.createElement("div",{className:"headerBanner",style:{backgroundColor:a?.data?.sitewide_banner_background_color,color:a?.data?.sitewide_banner_text_color}},C):x||S?e.createElement("div",{className:"headerBanner",style:{backgroundColor:"#000000",color:"#ffffff"}},x||S):null,e.createElement("div",{className:"headerPrimary"},e.createElement("button",{className:"headerToggle headerToggle--open",type:"button",onClick:()=>g(!0)},"Open Navigation Menu"),e.createElement("div",{className:"headerLogo"},e.createElement("a",{href:"/"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/logo-roka.svg",alt:"ROKA logo"}))),e.createElement(us,h({},i,{isOpen:v,location:n,onClose:()=>g(!1)})),e.createElement("div",{className:"headerActions"},e.createElement("ul",null,e.createElement("li",{className:m("headerActions-search",b&&"searching")},b?e.createElement(e.Fragment,null,e.createElement("form",{onSubmit:P},e.createElement("input",{type:"search",id:"site-search",name:"q",placeholder:"Search","aria-label":"Search",onChange:e=>p(e.target.value),ref:E}),e.createElement("button",null,"Search")),e.createElement("button",{type:"button",className:"headerActions-searchClose",onClick:()=>{p(""),y(!1),E.current.value=null}},"Close Search")):e.createElement("button",{type:"button",onClick:()=>y(!0)},"Search")),e.createElement("li",{className:"headerActions-account"},e.createElement("a",{href:"/account"+(r?"":"/login")},"Account")),e.createElement("li",{className:"headerActions-cart"},M>0&&e.createElement("div",{className:"headerActions-cartQuantity"},M),e.createElement("button",{onClick:T},"Cart")))))),b&&d&&e.createElement(Um,{results:u,query:d,trackSearchAttribution:f}))},PageFooter:({globalSettings:t,navigation:a})=>{const{footer_legal_links:r,footer_signup_form_list_id:n,klaviyo_public_api_key:i,klaviyo_signup_error_message:o}=t.data,{slices:l}=a.data;return e.createElement("footer",null,e.createElement("div",{className:"footerBrand"},e.createElement("div",{className:"footerLogo"},e.createElement("a",{href:"/"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/logo-roka.svg",alt:"ROKA logo"}))),e.createElement("p",null,"Austin, Texas")),e.createElement("nav",{className:"footerNav","aria-label":"Supplemental Navigation"},l.map((t=>e.createElement($m,{key:t.id,slice:t}))),e.createElement(Wm,{apiKey:i,listId:n,errorMessage:o})),e.createElement("div",{className:"footerRegionSocial"},e.createElement("div",{className:"footerSocial"},e.createElement("ul",null,e.createElement("li",{className:"instagram"},e.createElement("a",{href:"https://www.instagram.com/roka",target:"_blank"},"ROKA Instagram @roka")),e.createElement("li",{className:"tiktok"},e.createElement("a",{href:"https://www.tiktok.com/@roka",target:"_blank"},"ROKA TikTok @roka")),e.createElement("li",{className:"facebook"},e.createElement("a",{href:"https://www.facebook.com/ROKA",target:"_blank"},"ROKA Facebook")),e.createElement("li",{className:"linkedin"},e.createElement("a",{href:"https://www.linkedin.com/company/roka-sports/",target:"_blank"},"ROKA LinkedIn")),e.createElement("li",{className:"strava"},e.createElement("a",{href:"https://www.strava.com/clubs/150610",target:"_blank"},"ROKA Strava Club"))))),e.createElement("div",{className:"footerLegal"},e.createElement("ul",null,r.map((({link:t,title:a},r)=>e.createElement("li",{key:`${t.url}-${r}`},e.createElement("a",{href:t.url},a))))),e.createElement("p",null,"© ROKA Sports, Inc. All Prices USD. All prices exclude international duties and taxes.")))},CollectionMarketingTile:il,CollectionProducts:({products:t,hasFiltration:a=!1,hasSearch:r=!1,marketingTiles:n=[]})=>{const i=Es(),o=t,l=Xm(n,i);return e.createElement("div",{className:m("collection",{"collection--hasFiltration":a,"collection--search":r})},a&&e.createElement(Op,null),e.createElement("div",{className:"collectionItems"},r&&e.createElement(su,null),a&&e.createElement(Ip,null),o.map(((t,a)=>{const r=Jm(n,a,i);return e.createElement(e.Fragment,{key:t.id},r.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{product:t,position:a+1}))})),l.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),0===o.length&&e.createElement("div",{className:"collectionNoMatches"},e.createElement("div",{className:"collectionNoMatches-content"},"Try clearing filters or changing your input"))))},...Yh};exports.AccountGateway=({onSubmit:t,renderForm:a=n})=>{const r=a;return e.createElement("div",{className:"accountGateway"},e.createElement("div",{className:"accountGatewayBranding"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/fpo-content/account-gateway-brand.jpg",alt:"Athletes wearing ROKA sunglasses"})),e.createElement("div",{className:"accountForm"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"Maximize your gains."),e.createElement("p",null,"Sign in and create a profile to access exclusive rewards and manage your preferences.")),e.createElement(r,{onSubmit:t},e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:"Sign In",className:"button"})))))},exports.AccountNavigation=({activities:t,location:a,onCustomerSupportClick:r,signOut:n})=>{const[i,o]=e.useState(!1),l=t&&t.length>0,s=l&&t.length>8,d={"Customer Support":r};return e.createElement(e.Fragment,null,e.createElement("div",{className:"accountDashNav"},e.createElement("ul",null,u.map((([t,r])=>e.createElement("li",{key:t},e.createElement("a",{className:m({active:a?.pathname.includes(r)}),href:r,onClick:e=>{const a=d[t];a&&a(e)&&(e.stopPropagation(),e.preventDefault())}},t))))),l&&e.createElement("div",{className:"accountDashActivities"},e.createElement("div",{className:"accountDashActivities-header"},e.createElement("h2",null,"Your Activities"),e.createElement("a",{className:"accountEdit",href:"/account/profile?edit=activities"},"Edit")),e.createElement("div",{className:"activities"},(i?t:t.slice(0,8)).map((t=>e.createElement(c,{key:t,activity:t,variant:"black"})))),s&&e.createElement("div",{className:"accountsItemAction"},e.createElement("button",{type:"button",onClick:()=>o(!i)},"Show ",i?"Fewer":"All")))),e.createElement("div",{className:"accountSignOut"},e.createElement("button",{className:"buttonReversedOutlined",onClick:n},"Sign Out")))},exports.AccountSettings=({consentSaved:t,customer:a,editAddressesUrl:r,editProfileUrl:n,editTeamAccountUrl:i,loading:o,onChangeConsent:l,updateConsentError:s})=>e.createElement("div",{className:"accountSettings"},e.createElement(er,null,e.createElement(lr,h({},a,{editUrl:`${n}?edit=profile`,email:a.emailAddress?.emailAddress})),e.createElement(rr,{addresses:a.addresses,editUrl:r})),e.createElement(er,null,e.createElement(Qa,{email:a.emailAddress?.emailAddress}),e.createElement(tr,{activities:a.activities,editUrl:`${n}?edit=activities`}),e.createElement(nr,h({},a,{errorMessage:s,loading:o,onChange:l,saved:t})),e.createElement(br,{customer:a,editUrl:i}))),exports.ActivateCustomer=({activateCustomer:t,customer:a,error:r,loading:n,onCancel:i})=>{const o=a?.id?.split("/").pop(),l=gr(a),{formState:{errors:s},handleSubmit:c,register:d}=Ge({defaultValues:{teamHandle:l||"",pin:"",shopifyCustomerId:o}});return e.createElement("div",{className:"accountForm accountForm--edit"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"ROKA Team Account")),e.createElement("form",{className:"formInsetLabels",onSubmit:n||l?void 0:c(t)},e.createElement("input",{type:"hidden",name:"shopifyCustomerId",value:o}),e.createElement(We,{id:"teamHandle",label:"Team Handle",name:"teamHandle",register:d,disabled:l,required:!0}),s.teamHandle&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},s.teamHandle.message)),e.createElement(We,{id:"pin",label:"Team Passcode",name:"pin",register:d,required:!0,disabled:l}),s.pin&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},s.pin.message)),r&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},r)),!l&&e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:n?"Saving…":"Save Changes",className:"button",disabled:n})),e.createElement("div",{className:"formItem formItem-action"},e.createElement("button",{type:"button",className:"accountBasicButton",onClick:i},"Cancel"))))},exports.Activity=c,exports.AddressForm=Je,exports.AddressList=({instanceError:t,items:a,loading:r,onCreate:n,onDelete:i,onUpdate:o})=>{const[l,s]=e.useState(!1);return e.useEffect((()=>{l&&s(!1)}),[a]),e.createElement("div",{className:"accountForm accountForm--edit"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"Address Book")),a.map((({defaultAddress:n,...l})=>e.createElement("div",{key:l.id,className:"formGroup"},e.createElement(Je,{address:l,defaultAddress:n||1===a.length,error:t&&t.id===l.id?t.error:void 0,loading:r,onDelete:()=>i(l.id),onSubmit:e=>o({id:l.id,...e})})))),(!a||0===a.length)&&!l&&e.createElement("div",{className:"formGroup"},e.createElement("div",{className:"formItem formItem-action"},e.createElement("p",{style:{marginTop:36}},"You have no addresses saved."))),!l&&e.createElement("div",{className:"formGroup"},e.createElement("div",{className:"formItem formItem-action"},e.createElement("button",{type:"button",className:"buttonOutlined",onClick:()=>s(!0)},"Add New Address"))),l&&e.createElement("div",{className:"formGroup"},e.createElement(Je,{defaultAddress:!a||0===a.length,error:t&&!t.id?t.error:void 0,loading:r,onCancel:()=>s(!1),onSubmit:n})))},exports.BackToTop=({isVisible:t})=>{const[a,r]=e.useState(!1),{isSidecartOpen:n}=kr();e.useEffect((()=>{const e=window.matchMedia("(max-width: 767px)");r(e.matches);const t=e=>r(e.matches);return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}),[]);if(a&&!t)return null;if(n)return null;const i=a?"Go back to top":"↑ Return to top of page ↑";return e.createElement("div",{className:m("backToTop",{sticky:a,isVisible:t})},e.createElement("button",{className:"button",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},"aria-label":i},i))},exports.BannerGrid=Kn,exports.Cart=({afterPay:t,freeShippingThreshold:a,isSidecart:r})=>{const{cart:n,removeLines:i,setIsSidecartOpen:o,state:l,updateLines:s,cartAttributes:c}=kr();if(!n)return null;const{allowCheckout:d,hasNotifications:u}=c;let p=Number(n.cost.subtotalAmount.amount);p=isNaN(p)?0:p.toFixed(2);const f=(h=n.lines.nodes,ii(h).map((e=>ci(e,h))));var h;const v=n.lines.nodes.filter((e=>e.attributes.some((({key:e})=>e===ei))));return e.createElement(e.Fragment,null,!r&&n&&e.createElement(ui,null),e.createElement("div",{className:m("cart",r?"cart--side":"cart--page",{loading:"idle"!==l})},e.createElement(rl,{isSidecart:r},e.createElement(mi,{cart:n,isSidecart:r,setIsSidecartOpen:o}),e.createElement("div",{className:"cartContent"},n.totalQuantity>0&&e.createElement(al,{cart:n,threshold:a}),n.totalQuantity>0&&e.createElement("div",{className:"cartItems"},n.lines.nodes.filter((e=>!e.merchandise?.product?.handle?.startsWith("rx"))).filter((e=>!oi(e))).filter((e=>!e.merchandise)).map((t=>e.createElement(fi,{key:t.id,item:t,removeLines:i,updateLines:s}))),f.map((t=>e.createElement(hi,{key:t.id,item:t,removeLines:i,updateLines:s})))),v.length>0&&e.createElement("div",{className:"cartNotice"},e.createElement("p",null,"Products in your order are on pre-order and will not ship immediately.")),!r&&n.totalQuantity>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:"cartSubTotal"},e.createElement("div",{className:"cartSubTotalContent"},e.createElement("span",null,"Subtotal $",p))),e.createElement(Qn,{afterPay:t,checkoutUrl:n.checkoutUrl})),e.createElement(tl,null),r&&e.createElement("div",{className:"cartHelp"},e.createElement("p",null,"Need help? Visit our ",e.createElement("a",{href:"/pages/help"},"Help Center"),","," ",e.createElement("a",{href:"mailto:support@roka.com"},"email us"),","," ",e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),window.Kustomer?.open()}},"chat live")," ","or call ",e.createElement("a",{href:"tel:8779857652"},"(877) 985-7652"),"."))),r&&n.totalQuantity>0&&e.createElement("div",{className:m("cartCheckout",{cartCheckoutHTO:u})},e.createElement(Xn,{isSideCart:!0}),d?e.createElement("a",{href:n.checkoutUrl,className:"button"},"Checkout"," ",e.createElement("span",{className:"cartCheckout-price"},"$",p)):e.createElement("a",{className:"button buttonDisabled"},"Checkout Unavailable")))))},exports.CartProvider=function({children:t,...a}){const[r,n]=e.useState(!1),[i,o]=e.useState(xr),{cart:l}=a;return e.useEffect((()=>{if(!l?.lines)return;const e=wr(l);o(e)}),[l]),e.createElement(Er.Provider,{value:{isSidecartOpen:r,setIsSidecartOpen:n,cartAttributes:i,...a}},t)},exports.CollectionMarketingTile=il,exports.CollectionsContext=Gp,exports.CollectionsWithFiltersContext=Lp,exports.EmailSignup=pl,exports.FoursixtySlider=El,exports.Fulfillment=vt,exports.FulfillmentStatus=lt,exports.Fulfillments=gt,exports.GlobalSettingsProvider=function({children:t,globalSettings:a}){return e.createElement(ll.Provider,{value:a},t)},exports.Goggles=es,exports.GroupedStatusSection=dt,exports.HeroProvider=({children:t})=>{const a=e.useRef(!1);return e.createElement(ps.Provider,{value:{getHeadingComponent:()=>a.current?"h2":(a.current=!0,"h1")}},t)},exports.ImageGrid=Sl,exports.ImageLinkCarousel=Ll,exports.ItemizedReceipt=({lineItems:t=[],order:a={}})=>{const{customer:r={},shippingAddress:n={}}=a,i=t.reduce(((e,t)=>e+Number(t.price.amount)),0),o=t.reduce(((e,t)=>e+Number(t.totalDiscount.amount)),0),l=Math.round(Number(a.totalTax.amount)/Number(a.totalPrice.amount)*1e4)/100;return e.createElement("div",{className:"itemized-receipt"},e.createElement("div",{className:"receipt"},e.createElement("div",{className:"header"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement(Tl,null)),e.createElement("div",{className:"col"},e.createElement("p",null,"2214-A West Braker Lane",e.createElement("br",null),"Austin, TX 78758")),e.createElement("div",{className:"col"},e.createElement("p",null,"1 (877) 985-7652",e.createElement("br",null),"support@rokasports.com")))),e.createElement("div",{className:"info"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement("h2",null,"Receipt"),e.createElement("p",null,a?.name,e.createElement("br",null),a?.createdAt?new Date(a.createdAt).toLocaleDateString():"")),e.createElement("div",{className:"col"},e.createElement("h2",null,"Purchaser"),n&&e.createElement(e.Fragment,null,e.createElement("p",null,[n.firstName,n.lastName].filter(Boolean).join(" ")),e.createElement("p",null,n.address1,n.address2&&e.createElement(e.Fragment,null,e.createElement("br",null),n.address2),e.createElement("br",null),n.city,", ",n.zoneCode," ",n.zip,e.createElement("br",null),n.country)),r.phoneNumber?.phoneNumber&&e.createElement("p",null,(s=r.phoneNumber?.phoneNumber,"string"!=typeof s?"":s.startsWith("+1")?s.replace(/\+1(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):s)),r.emailAddress?.emailAddress&&e.createElement("p",null,r.emailAddress?.emailAddress)))),e.createElement("div",{className:"summary"},e.createElement("h2",null,"Order Summary"),e.createElement("div",{className:"table"},e.createElement("div",{className:"row labels"},e.createElement("div",{className:"cell"},"Description"),e.createElement("div",{className:"cell"},"Units"),e.createElement("div",{className:"cell"},"Cost Per Unit"),e.createElement("div",{className:"cell"},"Amount")),t.map(((t,a)=>{const r=Number(t.totalPrice.amount)-Number(t.totalDiscount.amount),n=r/Number(t.quantity);return e.createElement("div",{className:"row",key:`${t.id}-${a}`},e.createElement("div",{className:"cell"},(({title:e,variantTitle:t})=>e in Al?`${Al[e]} - ${t}`:[e,t].filter(Boolean).join(" - "))(t)),e.createElement("div",{className:"cell"},t.quantity),e.createElement("div",{className:"cell"},Ml(n)),e.createElement("div",{className:"cell"},Ml(r)))})))),e.createElement("div",{className:"total"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement("h2",null,"Order Total"),e.createElement("p",{className:"xl"},Ml(a.totalPrice.amount))),e.createElement("div",{className:"col"},e.createElement("div",{className:"table"},e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Original Total"),e.createElement("div",{className:"cell"},Ml(i))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Other (discount)"),e.createElement("div",{className:"cell"},"-",Ml(o))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Tax Rate"),e.createElement("div",{className:"cell"},l?l.toFixed(2):0,"%")),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Taxes"),e.createElement("div",{className:"cell"},Ml(a.totalTax.amount))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Shipping"),e.createElement("div",{className:"cell"},Ml(a.totalShipping.amount))))))),e.createElement("div",{className:"footer"},e.createElement("div",{className:"content"},e.createElement("p",{className:"sm"},"(1) This invoice reflects the actual value paid for this item by the customer."),e.createElement("p",{className:"sm"},"(2) These commodities, technology, or software were exported from the United States in accordance with the Export Administration Regulations. Diversion contrary to the United States law is prohibited.")))));var s},exports.LensTints=ns,exports.LineItem=st,exports.LineItems=ct,exports.Material=$c,exports.MaterialNote=Wc,exports.Order=Ct,exports.OrderDetails=ht,exports.OrderStatus=yt,exports.Orders=({orders:t=[]})=>{const a=t.filter((e=>e.fulfillments.some(xt))),r=t.filter((e=>e.fulfillments.every(kt)));return e.createElement("div",{className:"accountOrders"},0===t.length&&e.createElement("p",null,"You haven’t placed any orders."," ",e.createElement("a",{href:"/collections"},"Start shopping →")),a.length>0&&e.createElement("div",{className:"accountOrdersGroup accountOrdersGroup--inProgress"},e.createElement("h2",null,"In Progress Orders"),a.map((t=>e.createElement(Ct,h({key:t.id},t))))),r.length>0&&e.createElement("div",{className:"accountOrdersGroup accountOrdersGroup--completed"},e.createElement("h2",null,"Orders"),r.map((t=>e.createElement(Ct,h({key:t.id},t,{completed:!0}))))))},exports.PageHero=Ss,exports.PdpProvider=function({children:t,...a}){return e.createElement(wl.Provider,{value:a},t)},exports.ProductCarouselGroup=_s,exports.ProductsContext=Ts,exports.ProductsProvider=function({children:t,products:a={}}){return e.createElement(Ts.Provider,{value:a},t)},exports.ProfileForm=({customer:t,disableSkip:a,errorMessage:r,loading:n,onSkip:o,onSubmit:l,submitText:s="Submit",success:c})=>{const[d,m]=e.useState();e.useEffect((()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search).get("edit")||void 0;e&&qa.includes(e)?m(e):m(null)}),[]);const{control:u,formState:{errors:p},handleSubmit:f,register:v}=Ge({defaultValues:{activities:t?.activities,birthDate:t?.birthDate,firstName:t?.firstName,gender:t?.gender,lastName:t?.lastName,marketingConsent:t?.marketingConsent,phoneNumber:t?.phoneNumber}}),g=X({control:u,name:"phoneNumber",defaultValue:t?.phoneNumber,rules:{required:(!d||d===Ua)&&"Please enter your phone number."}}),b=t?.emailAddress?.emailAddress,y=[t?.firstName,t?.lastName].filter(Boolean).join(" ");return void 0===d?null:e.createElement("div",{className:"accountGateway accountGateway-profile"},e.createElement("div",{className:"accountForm accountForm--profile"},!d&&e.createElement("div",{className:"accountFormWelcome"},e.createElement("h1",null,"Welcome to the team",y&&","),y&&e.createElement("p",null,y)),e.createElement("form",{className:"formInsetLabels",onSubmit:n?void 0:f(l)},(!d||d===Ua)&&e.createElement(e.Fragment,null,e.createElement("h2",null,"Customize your profile."),b&&e.createElement("div",{className:"formItem formItem-info"},e.createElement("p",null,b),e.createElement("p",{className:"formItem-description"},"Email")),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"firstName"},"First Name*"),e.createElement("input",h({type:"text",name:"name",id:"firstName"},v("firstName",{required:"Please enter your first name."})))),p.firstName&&e.createElement(Ja,{message:p.firstName.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"firstName"},"Last Name*"),e.createElement("input",h({type:"text",name:"name",id:"lastName"},v("lastName",{required:"Please enter your last name."})))),p.lastName&&e.createElement(Ja,{message:p.lastName.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"phoneNumber"},"Phone Number*"),e.createElement(Wa,h({},g.field,{country:!t.phoneNumber||t.phoneNumber?.startsWith?.("+1")?"us":void 0,inputProps:{ref:g.field.ref},placeholder:""}))),p.phoneNumber&&e.createElement(Ja,{message:p.phoneNumber.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"birthDate"},"Birth Date*"),e.createElement("input",h({type:"date",name:"birthDate",id:"birthDate"},v("birthDate",{required:"Please enter your birth date.",validate:e=>{const t="Please enter a valid birth date.",a=new Date(e);if(!Vt(a))return t;const r=$t(new Date,a);return!(r<13||r>120)||t}})))),p.birthDate&&e.createElement(Ja,{message:p.birthDate.message}),e.createElement("div",{className:"formItem formItem-radio accountForm-radio"},e.createElement("fieldset",null,e.createElement("legend",null,"Gender*"),Ya.map((([t,a])=>e.createElement("div",{key:t},e.createElement("input",h({type:"radio",id:t,value:t},v("gender",{required:"Please select a gender."}))),e.createElement("label",{htmlFor:t},a))))))),(!d||d===Ka)&&e.createElement("div",{className:"formItem formItem-checkbox accountForm-activity"},e.createElement("fieldset",null,e.createElement("legend",null,"What activities interest you?"),Za.map((t=>e.createElement("div",{className:"activity",key:t},e.createElement("input",h({type:"checkbox",id:t,name:t,value:t},v("activities"))),e.createElement("label",{htmlFor:t},i[t])))))),!d&&e.createElement("div",{className:"formItem formItem-checkbox accountFormPrompt"},e.createElement("input",h({id:"marketing",type:"checkbox",name:"marketing"},v("marketingConsent"))),e.createElement("label",{htmlFor:"marketing"},"By checking this box, I agree to receive marketing communications from ROKA. This preference can be updated anytime in account settings.")),r&&e.createElement("div",{className:"formItem formItem-info formItem-error"},e.createElement("p",null,r)),c&&e.createElement("div",{className:"formItem formItem-info formItem-success"},e.createElement("p",null,"Your profile has been updated.")),e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:n?"Saving…":s,className:"button",disabled:n}),!a&&e.createElement("button",{type:"button",className:"buttonOutlined",onClick:n?void 0:o,disabled:n},"Skip For Now")))))},exports.RokaProductCustomizerProvider=({children:t,data:a})=>{const[r,n]=e.useReducer(Kf,a,(e=>{if(!e)return{};return Zf(e)}));e.useEffect((()=>{a&&n({type:$f,payload:a})}),[a]);const i=e.useMemo((()=>(e=>({initialize:t=>{e({type:$f,payload:t})},selectPart:(t,a)=>{e({type:Wf,payload:{product:t,variant:a}})},selectSize:t=>{e({type:Uf,payload:t})}}))(n)),[]);return e.createElement(jf.Provider,{value:{...r,...i}},t)},exports.RxModal=()=>{const t=Vc(),a=t.steps[t.step],[r,n,i]=Mm[a]||[];return e.createElement(Uc,h({},t,{component:n,note:i,title:r}))},exports.RxProvider=({children:t,colors:a,estimatedShipDate:r,magnification:n,materials:i,onChat:o,onClose:l,onComplete:s,onUpload:c,polarizations:d,product:m,prescriptionTypes:u,rokaProductConfig:p,nosepads:f,uuid:h,variantId:v,useRokaProductCustomizerData:g})=>{const b=e.useMemo((()=>({...m,selectedVariants:g?.selectedVariants,nosepadAddonKitVariantId:p?.nosepadAddOns&&p.nosepadAddOns[v]})),[m,g]),y=b.variants.find((e=>e.id===v)),E=e.useMemo((()=>Ic(b,{variant:y,colors:a,materials:i,polarizations:d,prescriptionTypes:u,nosepads:f,rokaProductConfig:p})),[b,a,i,d,u,f,y,p]),[C,w]=e.useState(E);e.useEffect((()=>{w(E)}),[E]);const[x,k]=e.useState();e.useEffect((()=>{if(g?.selectedVariants)return;const e=p?.nosepadAddOns;if(!e)return;const t=e[v];if(!t)return;const a=((e,t)=>{const a=e.variants.find((e=>e.id===parseInt(t,10)));if(!a)return{no:{variant:void 0,price:null}};const r=Tc({price:0},a);return{no:{variant:_c,price:null},yes:{variant:a,price:r}}})(f,t);k(a)}),[f,p,v,g?.selectedVariants]);const[S,N]=e.useState(0),[L,T]=e.useState(null),P=e.useMemo((()=>Lc(b,C)),[C,b]),M=e.useMemo((()=>wc(b)),[b]),A=e.useMemo((()=>xc(b)),[b]),_=e.useMemo((()=>P.length),[P]),B=e.useCallback((()=>N(S>0?S-1:S)),[S,N]),F=e.useCallback((()=>{T(null),N(S<_-1?S+1:S)}),[S,_,N,T]),O=e.useCallback((()=>{N(0),T(null),w({}),l()}),[w,N,T,l]),I=e.useCallback((async()=>{let e={...C};zs in e&&delete e[Rs];let t=Object.values(e).filter((e=>e?.sku)),a=js in e?e[js]:void 0,r=$s in e?e[$s]:void 0,n=Ws in e?e[Ws]:void 0;await s({variants:t,prescriptionData:a,pupillaryDistance:n,pupillaryDistanceSource:r}),w({}),N(0),T(null)}),[C,s]),[D,R]=e.useState();e.useEffect((()=>{const e=((e,t,a)=>{const r=t[e]===js;if(a.tags.includes("huberman-red-lens")&&a.title.includes("Eyeglasses")&&r)return'Our Wind Down™ prescription lens has a range limit. <a href="https://support.roka.com/en-US/what-prescription-range-works-for-your-lenses-and-frames-937234">View our help center article on prescription range limits.</a>'})(S,P,m);R(e)}),[S,P,m]);const z=(({data:e,variant:t,product:a})=>{const r=Oc({variant:t,product:a});let n=Object.values(e).reduce(((e,t)=>t?.price?e+Number(t.price):e),r);return isNaN(e[Rs]?.price)||(n-=e[Rs].price),n})({data:C,variant:y,product:b});let H=b.images.find((e=>e.variant_ids.includes(y?.id))),G=b.title,V=y?.option1&&` / ${y.option1}`;g&&(H={src:g.image,alt:g.title},G=g.title,V=g.description);const j={colors:a,data:C,error:L,estimatedShipDate:r,magnification:n,materials:i,next:F,onChat:o,onClose:O,onComplete:I,onUpload:c,polarizations:d,prescriptionTypes:u,previous:B,product:b,setData:w,setError:T,setStep:N,step:S,steps:P,totalSteps:_,uuid:h,variant:y,subtotal:z,useRokaProductCustomizerData:g,image:H,productTitle:G,description:V,headerWarning:D,nosepadOptions:x,allowPrescriptionTypeEdit:!(M||A)};return e.createElement(Gc.Provider,{value:j},t)},exports.SearchProvider=function({children:t,...a}){return e.createElement(Am.Provider,{value:a},t)},exports.Statement=Fm,exports.TrackerStatus=bt,exports.UserOverview=({activities:t,address1:a,address2:r,city:n,email:i,name:o,points:l,territoryCode:s,tier:d,zip:m,zoneCode:u})=>{const[p,f]=e.useState(!1),h=t&&t.length>0,v=h&&t.length>4,g=[[a,r].filter(Boolean).join(" "),[n,n&&u?`, ${u}`:"",m].filter(Boolean).join(" "),"US"!==s?s:""].filter(Boolean).map(((t,a)=>e.createElement(e.Fragment,{key:a},a>0&&e.createElement("br",null),t)));return e.createElement("div",{className:"accountDashOwner"},e.createElement("h1",null,o),d||l?e.createElement("p",{className:"accountDashOwner-status"},d&&`${d} `,l&&e.createElement("span",null,l," ",1===l?"Point":"Points")):null,e.createElement("p",{className:"accountDashOwner-email"},e.createElement("a",{href:`mailto:${i}`},i)),e.createElement("address",null,g),h&&e.createElement("div",{className:"accountDashActivities"},e.createElement("div",{className:"accountDashActivities-header"},e.createElement("h2",null,"Your Activities"),e.createElement("a",{className:"accountEdit",href:"/account/settings/activities"},"Edit")),e.createElement("div",{className:"activities"},(p?t:t.slice(0,4)).map((t=>e.createElement(c,{key:t,activity:t,variant:"black"})))),v&&e.createElement("div",{className:"accountsItemAction"},e.createElement("button",{type:"button",onClick:()=>f(!p)},"Show ",p?"Fewer":"All"))))},exports.Video=jm,exports.activityIcons=s,exports.activityNames=i,exports.components=Xh,exports.genders=Ya,exports.getPriceIsOnSale=ch,exports.getSlicesProducts=e=>e.flatMap((e=>sh[e.slice_type]?.(e)||[])),exports.iconRoot=o,exports.iconVariants=l,exports.materialTitle=jc,exports.slices=Jh,exports.useCart=kr,exports.useGlobalSettings=sl,exports.useHero=fs,exports.usePdp=xl,exports.useProduct=Ps,exports.useRokaProductCustomizer=Yf,exports.useRx=Vc,exports.useScrolledPast=Sr,exports.useSearch=_m;
19
+ */function pd(){if(td)return ed;td=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;return ed=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 t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,n){for(var i,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),s=1;s<arguments.length;s++){for(var c in i=Object(arguments[s]))t.call(i,c)&&(l[c]=i[c]);if(e){o=e(i);for(var d=0;d<o.length;d++)a.call(i,o[d])&&(l[o[d]]=i[o[d]])}}return l},ed}function fd(){if(rd)return ad;rd=1;return ad="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function hd(){return id?nd:(id=1,nd=Function.call.bind(Object.prototype.hasOwnProperty))}qc.exports;if("production"!==process.env.NODE_ENV){var vd=ud();qc.exports=function(){if(cd)return sd;cd=1;var e=ud(),t=pd(),a=fd(),r=hd(),n=function(){if(ld)return od;ld=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=fd(),a={},r=hd();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function n(n,i,o,l,s){if("production"!==process.env.NODE_ENV)for(var c in n)if(r(n,c)){var d;try{if("function"!=typeof n[c]){var m=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=n[c](i,c,l,o,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var u=s?s():"";e("Failed "+o+" type: "+d.message+(null!=u?u:""))}}}return n.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},od=n}(),i=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),sd=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator,d="@@iterator",m="<<anonymous>>",u={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(o),arrayOf:function(e){return h((function(t,r,n,i,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new f("Invalid "+i+" `"+o+"` of type `"+y(l)+"` supplied to `"+n+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,n,i,o+"["+s+"]",a);if(c instanceof Error)return c}return null}))},element:h((function(e,t,a,r,n){var i=e[t];return l(i)?null:new f("Invalid "+r+" `"+n+"` of type `"+y(i)+"` supplied to `"+a+"`, expected a single ReactElement.")})),elementType:h((function(t,a,r,n,i){var o=t[a];return e.isValidElementType(o)?null:new f("Invalid "+n+" `"+i+"` of type `"+y(o)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,a,r,n,i){if(!(t[a]instanceof e)){var o=e.name||m;return new f("Invalid "+n+" `"+i+"` of type `"+((l=t[a]).constructor&&l.constructor.name?l.constructor.name:m)+"` supplied to `"+r+"`, expected instance of `"+o+"`.")}var l;return null}))},node:h((function(e,t,a,r,n){return b(e[t])?null:new f("Invalid "+r+" `"+n+"` supplied to `"+a+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,n,i,o,l){if("function"!=typeof e)return new f("Property `"+l+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[n],c=y(s);if("object"!==c)return new f("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in s)if(r(s,d)){var m=e(s,d,i,o,l+"."+d,a);if(m instanceof Error)return m}return null}))},oneOf:function(e){return Array.isArray(e)?h((function(t,a,r,n,i){for(var o=t[a],l=0;l<e.length;l++)if(p(o,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===E(t)?String(t):t}));return new f("Invalid "+n+" `"+i+"` of value `"+String(o)+"` supplied to `"+r+"`, expected one of "+s+".")})):("production"!==process.env.NODE_ENV&&i(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."),o)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(n)+" at index "+t+"."),o}return h((function(t,n,i,o,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,n,i,o,l,a);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new f("Invalid "+o+" `"+l+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,n,i,o){var l=t[r],s=y(l);if("object"!==s)return new f("Invalid "+i+" `"+o+"` of type `"+s+"` supplied to `"+n+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(n,i,o,c,E(d));var m=d(l,c,n,i,o+"."+c,a);if(m)return m}return null}))},exact:function(e){return h((function(n,i,o,l,s){var c=n[i],d=y(c);if("object"!==d)return new f("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+o+"`, expected `object`.");var m=t({},n[i],e);for(var u in m){var p=e[u];if(r(e,u)&&"function"!=typeof p)return g(o,l,s,u,E(p));if(!p)return new f("Invalid "+l+" `"+s+"` key `"+u+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(n[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(c,u,o,l,s+"."+u,a);if(h)return h}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function n(n,o,l,c,d,u,p){if(c=c||m,u=u||l,p!==a){if(s){var h=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 h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+l;!t[v]&&r<3&&(i("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."),t[v]=!0,r++)}}return null==o[l]?n?null===o[l]?new f("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,l,c,d,u)}var o=n.bind(null,!1);return o.isRequired=n.bind(null,!0),o}function v(e){return h((function(t,a,r,n,i,o){var l=t[a];return y(l)!==e?new f("Invalid "+n+" `"+i+"` of type `"+E(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,a,r,n){return new f((e||"React class")+": "+t+" type `"+a+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+n+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||l(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[d]);if("function"==typeof t)return t}(e);if(!t)return!1;var a,r=t.call(e);if(t!==e.entries){for(;!(a=r.next()).done;)if(!b(a.value))return!1}else for(;!(a=r.next()).done;){var n=a.value;if(n&&!b(n[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function C(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,u.checkPropTypes=n,u.resetWarningCache=n.resetWarningCache,u.PropTypes=u,u},sd}()(vd.isElement,!0)}else qc.exports=function(){if(md)return dd;md=1;var e=fd();function t(){}function a(){}return a.resetWarningCache=t,dd=function(){function r(t,a,r,n,i,o){if(o!==e){var l=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 l.name="Invariant Violation",l}}function n(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:n,element:r,elementType:r,instanceOf:n,node:r,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:t};return i.PropTypes=i,i}}()();var gd=ja(qc.exports);function bd(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;const yd=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ed(e,t,a){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const a=t.split(".").pop().toLowerCase(),r=yd.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:n}=e,i="string"==typeof t?t:"string"==typeof n&&n.length>0?n:`./${e.name}`;return"string"!=typeof r.path&&Cd(r,"path",i),void 0!==a&&Object.defineProperty(r,"handle",{value:a,writable:!1,configurable:!1,enumerable:!0}),Cd(r,"relativePath",i),r}function Cd(e,t,a){Object.defineProperty(e,t,{value:a,writable:!1,configurable:!1,enumerable:!0})}const wd=[".DS_Store","Thumbs.db"];function xd(e){return"object"==typeof e&&null!==e}function kd(e){return e.filter((e=>-1===wd.indexOf(e.name)))}function Sd(e){if(null===e)return[];const t=[];for(let a=0;a<e.length;a++){const r=e[a];t.push(r)}return t}function Nd(e){if("function"!=typeof e.webkitGetAsEntry)return Td(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Md(t):Td(e,t)}function Ld(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Ld(t):[t]]),[])}function Td(e,t){var a;if("function"==typeof e.getAsFileSystemHandle)return e.getAsFileSystemHandle().then((e=>bd(this,void 0,void 0,(function*(){const t=yield e.getFile();return t.handle=e,Ed(t)}))));const r=e.getAsFile();if(!r)return Promise.reject(`${e} is not a File`);const n=Ed(r,null!==(a=null==t?void 0:t.fullPath)&&void 0!==a?a:void 0);return Promise.resolve(n)}function Pd(e){return bd(this,void 0,void 0,(function*(){return e.isDirectory?Md(e):function(e){return bd(this,void 0,void 0,(function*(){return new Promise(((t,a)=>{e.file((a=>{const r=Ed(a,e.fullPath);t(r)}),(e=>{a(e)}))}))}))}(e)}))}function Md(e){const t=e.createReader();return new Promise(((e,a)=>{const r=[];!function n(){t.readEntries((t=>bd(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Pd));r.push(e),n()}else try{const t=yield Promise.all(r);e(t)}catch(e){a(e)}}))),(e=>{a(e)}))}()}))}var Ad={__esModule:!0},_d=Ad.default=function(e,t){if(e&&t){var a=Array.isArray(t)?t:t.split(",");if(0===a.length)return!0;var r=e.name||"",n=(e.type||"").toLowerCase(),i=n.replace(/\/.*$/,"");return a.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):n===t}))}return!0};function Bd(e){return function(e){if(Array.isArray(e))return zd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Rd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fd(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function Od(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(a),!0).forEach((function(t){Id(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fd(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Id(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var r,n,i=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw n}}return i}(e,t)||Rd(e,t)||function(){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 Rd(e,t){if(e){if("string"==typeof e)return zd(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?zd(e,t):void 0}}function zd(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var Hd="function"==typeof _d?_d:_d.default,Gd="file-invalid-type",Vd="file-too-large",jd="file-too-small",$d="too-many-files",Wd=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:Gd,message:"File type must be ".concat(t)}},Ud=function(e){return{code:Vd,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},Kd=function(e){return{code:jd,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},qd={code:$d,message:"Too many files"};function Zd(e,t){var a="application/x-moz-file"===e.type||Hd(e,t);return[a,a?null:Wd(t)]}function Yd(e,t,a){if(Jd(e.size))if(Jd(t)&&Jd(a)){if(e.size>a)return[!1,Ud(a)];if(e.size<t)return[!1,Kd(t)]}else{if(Jd(t)&&e.size<t)return[!1,Kd(t)];if(Jd(a)&&e.size>a)return[!1,Ud(a)]}return[!0,null]}function Jd(e){return null!=e}function Xd(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Qd(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function em(e){e.preventDefault()}function tm(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return t.some((function(t){return!Xd(e)&&t&&t.apply(void 0,[e].concat(r)),Xd(e)}))}}function am(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function rm(e){return/^.*\.[\w]+$/.test(e)}var nm=["children"],im=["open"],om=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],lm=["refKey","onChange","onClick"];function sm(e){return function(e){if(Array.isArray(e))return mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var r,n,i=[],o=!0,l=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(l)throw n}}return i}(e,t)||dm(e,t)||function(){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 dm(e,t){if(e){if("string"==typeof e)return mm(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?mm(e,t):void 0}}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function um(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function pm(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?um(Object(a),!0).forEach((function(t){fm(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):um(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function fm(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function hm(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var vm=e.forwardRef((function(t,a){var r=t.children,n=ym(hm(t,nm)),i=n.open,o=hm(n,im);return e.useImperativeHandle(a,(function(){return{open:i}}),[i]),e.createElement(e.Fragment,null,r(pm(pm({},o),{},{open:i})))}));vm.displayName="Dropzone";var gm={disabled:!1,getFilesFromEvent:function(e){return bd(this,void 0,void 0,(function*(){return xd(e)&&xd(e.dataTransfer)?function(e,t){return bd(this,void 0,void 0,(function*(){if(e.items){const a=Sd(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return a;return kd(Ld(yield Promise.all(a.map(Nd))))}return kd(Sd(e.files).map((e=>Ed(e))))}))}(e.dataTransfer,e.type):function(e){return xd(e)&&xd(e.target)}(e)?function(e){return Sd(e.target.files).map((e=>Ed(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return bd(this,void 0,void 0,(function*(){return(yield Promise.all(e.map((e=>e.getFile())))).map((e=>Ed(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};vm.defaultProps=gm,vm.propTypes={children:gd.func,accept:gd.objectOf(gd.arrayOf(gd.string)),multiple:gd.bool,preventDropOnDocument:gd.bool,noClick:gd.bool,noKeyboard:gd.bool,noDrag:gd.bool,noDragEventsBubbling:gd.bool,minSize:gd.number,maxSize:gd.number,maxFiles:gd.number,disabled:gd.bool,getFilesFromEvent:gd.func,onFileDialogCancel:gd.func,onFileDialogOpen:gd.func,useFsAccessApi:gd.bool,autoFocus:gd.bool,onDragEnter:gd.func,onDragLeave:gd.func,onDragOver:gd.func,onDrop:gd.func,onDropAccepted:gd.func,onDropRejected:gd.func,onError:gd.func,validator:gd.func};var bm={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ym(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=pm(pm({},gm),t),r=a.accept,n=a.disabled,i=a.getFilesFromEvent,o=a.maxSize,l=a.minSize,s=a.multiple,c=a.maxFiles,d=a.onDragEnter,m=a.onDragLeave,u=a.onDragOver,p=a.onDrop,f=a.onDropAccepted,h=a.onDropRejected,v=a.onFileDialogCancel,g=a.onFileDialogOpen,b=a.useFsAccessApi,y=a.autoFocus,E=a.preventDropOnDocument,C=a.noClick,w=a.noKeyboard,x=a.noDrag,k=a.noDragEventsBubbling,S=a.onError,N=a.validator,L=e.useMemo((function(){return function(e){if(Jd(e))return Object.entries(e).reduce((function(e,t){var a=Dd(t,2),r=a[0],n=a[1];return[].concat(Bd(e),[r],Bd(n))}),[]).filter((function(e){return am(e)||rm(e)})).join(",")}(r)}),[r]),T=e.useMemo((function(){return function(e){return Jd(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Dd(e,2),a=t[0],r=t[1],n=!0;return am(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),Array.isArray(r)&&r.every(rm)||(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),n=!1),n})).reduce((function(e,t){var a=Dd(t,2),r=a[0],n=a[1];return Od(Od({},e),{},Id({},r,n))}),{})}]:e}(r)}),[r]),P=e.useMemo((function(){return"function"==typeof g?g:Cm}),[g]),M=e.useMemo((function(){return"function"==typeof v?v:Cm}),[v]),A=e.useRef(null),_=e.useRef(null),B=cm(e.useReducer(Em,bm),2),F=B[0],O=B[1],I=F.isFocused,D=F.isFileDialogActive,R=e.useRef("undefined"!=typeof window&&window.isSecureContext&&b&&"showOpenFilePicker"in window),z=function(){!R.current&&D&&setTimeout((function(){_.current&&(_.current.files.length||(O({type:"closeDialog"}),M()))}),300)};e.useEffect((function(){return window.addEventListener("focus",z,!1),function(){window.removeEventListener("focus",z,!1)}}),[_,D,M,R]);var H=e.useRef([]),G=function(e){A.current&&A.current.contains(e.target)||(e.preventDefault(),H.current=[])};e.useEffect((function(){return E&&(document.addEventListener("dragover",em,!1),document.addEventListener("drop",G,!1)),function(){E&&(document.removeEventListener("dragover",em),document.removeEventListener("drop",G))}}),[A,E]),e.useEffect((function(){return!n&&y&&A.current&&A.current.focus(),function(){}}),[A,y,n]);var V=e.useCallback((function(e){S?S(e):console.error(e)}),[S]),j=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e),H.current=[].concat(sm(H.current),[e.target]),Qd(e)&&Promise.resolve(i(e)).then((function(t){if(!Xd(e)||k){var a=t.length,r=a>0&&function(e){var t=e.files,a=e.accept,r=e.minSize,n=e.maxSize,i=e.multiple,o=e.maxFiles,l=e.validator;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=Dd(Zd(e,a),1)[0],i=Dd(Yd(e,r,n),1)[0],o=l?l(e):null;return t&&i&&!o}))}({files:t,accept:L,minSize:l,maxSize:o,multiple:s,maxFiles:c,validator:N});O({isDragAccept:r,isDragReject:a>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e)}})).catch((function(e){return V(e)}))}),[i,d,V,k,L,l,o,s,c,N]),$=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e);var t=Qd(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&u&&u(e),!1}),[u,k]),W=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e);var t=H.current.filter((function(e){return A.current&&A.current.contains(e)})),a=t.indexOf(e.target);-1!==a&&t.splice(a,1),H.current=t,t.length>0||(O({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qd(e)&&m&&m(e))}),[A,m,k]),U=e.useCallback((function(e,t){var a=[],r=[];e.forEach((function(e){var t=cm(Zd(e,L),2),n=t[0],i=t[1],s=cm(Yd(e,l,o),2),c=s[0],d=s[1],m=N?N(e):null;if(n&&c&&!m)a.push(e);else{var u=[i,d];m&&(u=u.concat(m)),r.push({file:e,errors:u.filter((function(e){return e}))})}})),(!s&&a.length>1||s&&c>=1&&a.length>c)&&(a.forEach((function(e){r.push({file:e,errors:[qd]})})),a.splice(0)),O({acceptedFiles:a,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),p&&p(a,r,t),r.length>0&&h&&h(r,t),a.length>0&&f&&f(a,t)}),[O,s,L,l,o,c,p,f,h,N]),K=e.useCallback((function(e){e.preventDefault(),e.persist(),ae(e),H.current=[],Qd(e)&&Promise.resolve(i(e)).then((function(t){Xd(e)&&!k||U(t,e)})).catch((function(e){return V(e)})),O({type:"reset"})}),[i,U,V,k]),q=e.useCallback((function(){if(R.current){O({type:"openDialog"}),P();var e={multiple:s,types:T};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){U(e,null),O({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(M(e),O({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?V(e):(R.current=!1,_.current?(_.current.value=null,_.current.click()):V(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))}))}else _.current&&(O({type:"openDialog"}),P(),_.current.value=null,_.current.click())}),[O,P,M,b,U,V,T,s]),Z=e.useCallback((function(e){A.current&&A.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),q()))}),[A,q]),Y=e.useCallback((function(){O({type:"focus"})}),[]),J=e.useCallback((function(){O({type:"blur"})}),[]),X=e.useCallback((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?q():setTimeout(q,0))}),[C,q]),Q=function(e){return n?null:e},ee=function(e){return w?null:Q(e)},te=function(e){return x?null:Q(e)},ae=function(e){k&&e.stopPropagation()},re=e.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,a=void 0===t?"ref":t,r=e.role,i=e.onKeyDown,o=e.onFocus,l=e.onBlur,s=e.onClick,c=e.onDragEnter,d=e.onDragOver,m=e.onDragLeave,u=e.onDrop,p=hm(e,om);return pm(pm(fm({onKeyDown:ee(tm(i,Z)),onFocus:ee(tm(o,Y)),onBlur:ee(tm(l,J)),onClick:Q(tm(s,X)),onDragEnter:te(tm(c,j)),onDragOver:te(tm(d,$)),onDragLeave:te(tm(m,W)),onDrop:te(tm(u,K)),role:"string"==typeof r&&""!==r?r:"presentation"},a,A),n||w?{}:{tabIndex:0}),p)}}),[A,Z,Y,J,X,j,$,W,K,w,x,n]),ne=e.useCallback((function(e){e.stopPropagation()}),[]),ie=e.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,a=void 0===t?"ref":t,r=e.onChange,n=e.onClick,i=hm(e,lm);return pm(pm({},fm({accept:L,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Q(tm(r,K)),onClick:Q(tm(n,ne)),tabIndex:-1},a,_)),i)}}),[_,r,s,K,n]);return pm(pm({},F),{},{isFocused:I&&!n,getRootProps:re,getInputProps:ie,rootRef:A,inputRef:_,open:Q(q)})}function Em(e,t){switch(t.type){case"focus":return pm(pm({},e),{},{isFocused:!0});case"blur":return pm(pm({},e),{},{isFocused:!1});case"openDialog":return pm(pm({},bm),{},{isFileDialogActive:!0});case"closeDialog":return pm(pm({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pm(pm({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pm(pm({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pm({},bm);default:return e}}function Cm(){}const wm=()=>e.createElement("svg",{viewBox:"0 0 164 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M31.5115 45.9394C32.2605 46.5367 33.3592 46.3874 33.9585 45.6408L50.9378 24.1394C51.2873 23.6914 51.7867 23.4426 52.3361 23.4426C52.8854 23.4426 53.3848 23.6914 53.7344 24.1394L68.3665 42.7043L98.7295 4.23061C99.079 3.73289 99.6783 3.48403 100.278 3.48403C100.877 3.48403 101.426 3.78266 101.826 4.23061C107.369 11.4475 117.756 24.7366 125.347 34.4919C129.542 39.8673 133.038 44.3467 134.736 46.4869C135.085 46.9349 135.585 47.1837 136.134 47.1837C136.483 47.1837 136.883 47.0842 137.183 46.8353C137.932 46.2381 138.081 45.1431 137.482 44.3965C135.834 42.2066 132.338 37.7271 128.094 32.3517C120.503 22.6462 110.116 9.35711 104.572 2.14019C103.524 0.79635 101.976 0.0497719 100.278 0C98.5797 0 97.0315 0.746578 95.9828 2.09042L68.3665 37.08L56.481 21.9992C55.4822 20.7051 53.984 20.0083 52.3361 20.0083C50.6881 20.0083 49.1899 20.7549 48.1911 21.9992L31.2118 43.5006C30.6125 44.2472 30.7624 45.3422 31.5115 45.9394Z",fill:"currentColor"}),e.createElement("path",{d:"M125.996 86.1551V78.1916L132.938 85.1099C133.288 85.4583 133.737 85.6076 134.186 85.6076C134.636 85.6076 135.085 85.4583 135.435 85.1099C136.134 84.4131 136.134 83.3181 135.435 82.6711L125.647 72.9158C125.297 72.5674 124.798 72.3683 124.299 72.4181C124.199 72.4181 124.049 72.4181 123.949 72.4679C123.899 72.4679 123.849 72.5176 123.799 72.5176C123.749 72.5176 123.699 72.5674 123.599 72.5674C123.549 72.5674 123.499 72.6172 123.45 72.667C123.4 72.667 123.35 72.7167 123.3 72.7167C123.2 72.7665 123.1 72.866 123.05 72.9158L113.262 82.6711C112.563 83.3679 112.563 84.4629 113.262 85.1099C113.612 85.4583 114.061 85.6076 114.51 85.6076C114.96 85.6076 115.409 85.4583 115.759 85.1099L122.551 78.3409V86.2049L112.063 96.657C111.364 97.3538 111.364 98.4488 112.063 99.0958C112.413 99.4442 112.862 99.5935 113.312 99.5935C113.761 99.5935 114.211 99.4442 114.56 99.0958L122.601 91.0825V114.027C122.601 114.973 123.4 115.769 124.348 115.769C125.297 115.769 126.096 114.973 126.096 114.027V91.0825L134.137 99.0958C134.486 99.4442 134.936 99.5935 135.385 99.5935C135.834 99.5935 136.284 99.4442 136.633 99.0958C137.333 98.399 137.333 97.304 136.633 96.657L125.996 86.1551Z",fill:"currentColor"}),e.createElement("path",{d:"M163.501 72.0697L151.665 60.2738V50.8171L159.755 58.8802C160.105 59.2286 160.554 59.3779 161.004 59.3779C161.453 59.3779 161.902 59.2286 162.252 58.8802C162.951 58.1834 162.951 57.0884 162.252 56.4413L151.315 45.5413C150.966 45.1929 150.466 44.9938 149.967 45.0436C149.867 45.0436 149.717 45.0436 149.617 45.0934C149.568 45.0934 149.518 45.1431 149.468 45.1431C149.418 45.1431 149.368 45.1929 149.268 45.1929C149.218 45.1929 149.168 45.2427 149.118 45.2924C149.068 45.2924 149.018 45.3422 148.968 45.3422C148.868 45.392 148.768 45.4915 148.719 45.5413L137.782 56.4413C137.083 57.1381 137.083 58.2331 137.782 58.8802C138.131 59.2286 138.581 59.3779 139.03 59.3779C139.48 59.3779 139.929 59.2286 140.279 58.8802L148.269 50.9167V60.2738L136.434 72.0697C135.734 72.7665 135.734 73.8615 136.434 74.5085C136.783 74.8569 137.233 75.0062 137.682 75.0062C138.131 75.0062 138.581 74.8569 138.93 74.5085L148.269 65.2012V98.399C148.269 99.3447 149.068 100.141 150.017 100.141C150.966 100.141 151.765 99.3447 151.765 98.399V65.2012L161.103 74.5085C161.453 74.8569 161.902 75.0062 162.352 75.0062C162.801 75.0062 163.251 74.8569 163.6 74.5085C164.2 73.8615 164.2 72.7665 163.501 72.0697Z",fill:"currentColor"}),e.createElement("path",{d:"M99.0292 62.3144H95.8831V54.4504C95.8831 51.5637 93.5359 49.2742 90.6894 49.2742H90.5396L50.3386 56.4413L10.1376 49.2742H9.98782C7.09135 49.2742 4.79415 51.6134 4.79415 54.4504V62.3144H3.4458C1.54811 62.3144 0 63.8573 0 65.7487V116.516C0 118.407 1.54811 119.95 3.4458 119.95H51.2375H99.0292C100.927 119.95 102.475 118.407 102.475 116.516V65.7487C102.475 63.8573 100.927 62.3144 99.0292 62.3144ZM90.7893 52.7582C91.6882 52.808 92.3873 53.5546 92.3873 54.4504V105.218C92.3873 106.163 91.6383 106.91 90.6894 106.91H90.5396L52.0865 113.779V59.6765L90.7893 52.7582ZM8.23995 54.4504C8.23995 53.5546 8.9391 52.808 9.838 52.7582L48.5408 59.6765V113.828L10.0877 106.96H9.98782C9.03898 106.96 8.28989 106.213 8.28989 105.268V54.4504H8.23995Z",fill:"currentColor"}),e.createElement("path",{d:"M17.0027 64.4188L16.3867 67.8481L40.6202 72.1717L41.2361 68.7423L17.0027 64.4188Z",fill:"currentColor"}),e.createElement("path",{d:"M18.1931 78.3845L17.5771 81.8138L41.8106 86.1374L42.4265 82.708L18.1931 78.3845Z",fill:"currentColor"}),e.createElement("path",{d:"M18.1972 92.3659L17.5813 95.7952L41.8147 100.119L42.4307 96.6894L18.1972 92.3659Z",fill:"currentColor"}),e.createElement("path",{d:"M84.6014 64.4156L60.3655 68.7391L60.9814 72.1688L85.2173 67.8453L84.6014 64.4156Z",fill:"currentColor"}),e.createElement("path",{d:"M83.4534 78.396L59.2175 82.7195L59.8335 86.1492L84.0694 81.8257L83.4534 78.396Z",fill:"currentColor"}),e.createElement("path",{d:"M83.4542 92.3824L59.2183 96.7059L59.8342 100.136L84.0701 95.8121L83.4542 92.3824Z",fill:"currentColor"})),xm=()=>e.createElement("svg",{viewBox:"0 0 168 138",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M139.096 131.454C100.807 127.459 74.0547 123.913 57.2475 120.666C38.3021 117.02 34.3738 114.124 33.7273 112.675C33.6279 112.476 33.4787 112.176 34.0257 111.377C35.6666 109.079 50.9324 106.283 62.0709 104.285C86.3369 99.8899 96.9782 97.4427 96.9782 92.2986C96.9782 88.8525 91.8565 86.3553 79.2759 83.6584C70.7728 81.8604 58.8387 80.0625 43.7222 78.2645C42.7774 78.1646 41.8823 78.8139 41.7829 79.8127C41.6834 80.8116 42.3298 81.6606 43.3243 81.7605C57.695 83.4586 69.2314 85.2066 77.5355 86.9047C91.4587 89.7515 93.2488 91.899 93.4974 92.3485C93.3482 92.6981 92.1548 94.2463 83.5026 96.4438C77.3366 98.042 69.2811 99.4904 61.4742 100.889C44.2194 104.035 33.5284 106.083 31.1913 109.429C29.799 111.427 30.0974 113.125 30.5449 114.174C31.7383 116.871 35.8158 120.117 56.5513 124.112C73.458 127.359 100.31 130.905 138.698 134.95C138.748 134.95 138.797 134.95 138.897 134.95C139.792 134.95 140.538 134.301 140.637 133.402C140.737 132.403 140.041 131.554 139.096 131.454Z",fill:"currentColor"}),e.createElement("path",{d:"M29.0531 49.0477C29.799 49.647 30.893 49.4972 31.4897 48.748L48.3963 27.1725C48.7444 26.723 49.2417 26.4733 49.7887 26.4733C50.3356 26.4733 50.8329 26.723 51.181 27.1725L65.7506 45.8014L95.9837 7.19523C96.3815 6.6958 96.9285 6.44608 97.5252 6.44608C98.1219 6.44608 98.6689 6.74574 99.0667 7.19523C104.586 14.3871 114.482 27.1226 122.438 37.4109C126.664 42.8547 130.195 47.3995 131.886 49.5971C132.234 50.0465 132.731 50.2963 133.278 50.2963C133.626 50.2963 134.024 50.1964 134.322 49.9467C135.068 49.3473 135.217 48.2486 134.62 47.4994C132.93 45.3019 129.399 40.7571 125.173 35.3133C117.664 25.6243 107.321 12.3394 101.851 5.14756C100.807 3.79909 99.2656 3.04994 97.5749 3C97.5749 3 97.5749 3 97.5252 3C95.8345 3 94.293 3.74915 93.2488 5.09762L65.7506 40.2077L53.8662 25.025C52.8716 23.7264 51.3799 23.0272 49.7389 23.0272C48.098 23.0272 46.6062 23.7764 45.6117 25.025L28.705 46.6005C28.1581 47.3496 28.2575 48.4484 29.0531 49.0477Z",fill:"currentColor"}),e.createElement("path",{d:"M129.996 88.353C130.344 88.7026 130.792 88.8524 131.239 88.8524C131.687 88.8524 132.134 88.7026 132.482 88.353C133.178 87.6538 133.178 86.555 132.482 85.9058L122.736 76.1169C122.388 75.7673 121.891 75.5675 121.393 75.6175C121.294 75.6175 121.145 75.6175 121.045 75.6674C120.996 75.6674 120.946 75.7173 120.896 75.7173C120.846 75.7173 120.797 75.7673 120.697 75.7673C120.648 75.7673 120.598 75.8172 120.548 75.8672C120.498 75.8672 120.449 75.9171 120.399 75.9171C120.299 75.9671 120.2 76.0669 120.15 76.1169L110.404 85.9058C109.708 86.605 109.708 87.7037 110.404 88.353C110.752 88.7026 111.2 88.8524 111.647 88.8524C112.095 88.8524 112.542 88.7026 112.89 88.353L119.653 81.5607V89.4517L109.211 99.9398C108.515 100.639 108.515 101.738 109.211 102.387C109.559 102.737 110.006 102.886 110.454 102.886C110.901 102.886 111.349 102.737 111.697 102.387L119.703 94.3462V117.37C119.703 118.319 120.498 119.118 121.443 119.118C122.388 119.118 123.184 118.319 123.184 117.37V94.3462L131.189 102.387C131.537 102.737 131.985 102.886 132.433 102.886C132.88 102.886 133.328 102.737 133.676 102.387C134.372 101.688 134.372 100.589 133.676 99.9398L123.233 89.4517V81.4608L129.996 88.353Z",fill:"currentColor"}),e.createElement("path",{d:"M30.6445 75.8672C31.092 75.8672 31.5396 75.7174 31.8876 75.3678C32.5838 74.6686 32.5838 73.5698 31.8876 72.9205L21.4453 62.4325V54.4415L28.3571 61.3837C28.7052 61.7333 29.1527 61.8831 29.6003 61.8831C30.0478 61.8831 30.4953 61.7333 30.8434 61.3837C31.5396 60.6845 31.5396 59.5857 30.8434 58.9364L21.0475 49.0477C20.6994 48.6981 20.2021 48.4983 19.7049 48.5482C19.6054 48.5482 19.4562 48.5482 19.3568 48.5982C19.3071 48.5982 19.2573 48.6481 19.2076 48.6481C19.1579 48.6481 19.1082 48.6981 19.0087 48.6981C18.959 48.6981 18.9093 48.748 18.8595 48.798C18.8098 48.798 18.7601 48.8479 18.7104 48.8479C18.6109 48.8978 18.5115 48.9977 18.4617 49.0477L8.71553 58.8865C8.01937 59.5857 8.01937 60.6845 8.71553 61.3337C9.06361 61.6833 9.51114 61.8331 9.95867 61.8331C10.4062 61.8331 10.8537 61.6833 11.2018 61.3337L17.9645 54.5414V62.3825L7.52212 72.8706C6.82596 73.5698 6.82596 74.6686 7.52212 75.3178C7.8702 75.6674 8.31773 75.8173 8.76526 75.8173C9.21279 75.8173 9.66032 75.6674 10.0084 75.3178L18.0142 67.277V90.3507C18.0142 91.2997 18.8098 92.0988 19.7546 92.0988C20.6994 92.0988 21.495 91.2997 21.495 90.3507V67.3269L29.4511 75.3678C29.7992 75.7174 30.2467 75.8672 30.6445 75.8672Z",fill:"currentColor"}),e.createElement("path",{d:"M160.478 75.2679L148.693 63.4313V53.9421L156.748 62.0329C157.096 62.3825 157.544 62.5324 157.991 62.5324C158.439 62.5324 158.886 62.3825 159.235 62.0329C159.931 61.3337 159.931 60.235 159.235 59.5857L148.345 48.6481C147.997 48.2985 147.499 48.0988 147.002 48.1487C146.903 48.1487 146.753 48.1487 146.654 48.1987C146.604 48.1987 146.555 48.2486 146.505 48.2486C146.455 48.2486 146.356 48.2985 146.306 48.2985C146.256 48.2985 146.206 48.3485 146.157 48.3984C146.107 48.4484 146.057 48.4484 146.008 48.4983C145.908 48.5483 145.809 48.6481 145.759 48.6981L134.869 59.6357C134.173 60.3349 134.173 61.4336 134.869 62.0829C135.217 62.4325 135.665 62.5823 136.112 62.5823C136.56 62.5823 137.007 62.4325 137.355 62.0829L145.311 54.092V63.4813L133.526 75.3178C132.83 76.017 132.83 77.1158 133.526 77.7651C133.875 78.1147 134.322 78.2645 134.77 78.2645C135.217 78.2645 135.665 78.1147 136.013 77.7651L145.212 68.3757V101.688C145.212 102.637 146.008 103.436 146.952 103.436C147.897 103.436 148.693 102.637 148.693 101.688V68.3757L157.991 77.7151C158.34 78.0647 158.787 78.2145 159.235 78.2145C159.682 78.2145 160.13 78.0647 160.478 77.7151C161.124 77.0658 161.124 75.9671 160.478 75.2679Z",fill:"currentColor"})),km="PD values must match.",Sm="If your PD is not between 50 and 80, please contact support.",Nm=e=>!isNaN(e)&&e>=50&&e<=80,Lm=(e,t)=>!isNaN(e)&&!isNaN(t)&&Nm(Number(e)+Number(t)),Tm=({compareAtPrice:t,onEdit:a,title:r,price:n,value:i})=>e.createElement("div",{className:"modalRxConfigSelect"},e.createElement("div",{className:"modalRxConfigSelect-title"},e.createElement("h3",null,r),a&&e.createElement("button",{type:"button",onClick:a,className:"modalRxEdit","aria-label":`Edit ${r}`},"Edit")),e.createElement("div",{className:"modalRxConfigSelect-info"},e.createElement("p",null,i),e.createElement("p",{className:"modalRxConfigSelect-price"},t&&e.createElement(e.Fragment,null,e.createElement("strike",null,"$",t)," "),null===n?"Included":n))),Pm=({variant:t})=>t?e.createElement("img",{src:t?.image?.thumbUrl,alt:t?.image?.thumbUrl?.altText}):null,Mm={[Rs]:["Select Your Prescription Type",()=>{const{data:t,next:a,prescriptionTypes:r,product:n,setData:i}=Vc(),{singleVision:o,progressive:l}=Bc(r),{standard:s}=Fc(r);return e.createElement(e.Fragment,null,e.createElement(Hc,{icon:e.createElement(xm,null),onClick:()=>{const e={...t};e[Rs]=o.variant,delete e[zs],i(e),a()},selected:t[Rs]?.sku===ec,subtitle:"Near, Intermediate, or Far (Choose one)",title:"Single Vision",xl:!0}),Ec(n,"progressive-rx")&&e.createElement(Hc,{highlight:"If your prescription has an ADD power, progressive lenses are an option for you.",icon:e.createElement(wm,null),onClick:()=>{i({...t,[Rs]:l.variant,[zs]:s.variant}),a()},price:s.price,selected:t[Rs]?.sku===tc,subtitle:"Distance & Reading (both in one lense)",title:"Progressive",xl:!0}))}],[zs]:["Progressive Lenses",()=>{const{data:t,next:a,prescriptionTypes:r,product:n,setData:i}=Vc(),{standard:o,ultimate:l,computer:s}=Fc(r),c=e=>{i({...t,[zs]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>c(o.variant),price:"Included",selected:t[zs]?.sku===tc,supportingText:"Multi-focal lens provides near, intermediate and distance vision without swapping frames.",title:"Standard All-Purpose"}),e.createElement(Hc,{onClick:()=>c(l.variant),price:l.price,selected:t[zs]?.sku===ac,supportingText:"All of the benefits of our Standard progressive lens, plus an expanded field of view so you can see more and do more.",title:"Ultimate"}),Ec(n,pc)&&e.createElement(Hc,{onClick:()=>c(s.variant),price:s.price,selected:t[zs]?.sku===rc,supportingText:e.createElement(e.Fragment,null,"Offers maximum clarity and expanded field of view in the intermediate distance (2-7 feet away) specifically designed for computer use and seamless transition in an office environment."," ",e.createElement("em",null,"Not recommended for driving or activities that require far-distance correction.")),title:"Computer"}))}],[Hs]:[jc,$c,Wc],[Vs]:["Polarization",()=>{const{data:t,next:a,polarizations:r,setData:n}=Vc(),{no:i,yes:o}=Ac(r),l=e=>{n({...t,[Vs]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>l(i.variant),price:"Included",selected:t[Vs]?.sku===mc,title:"Non-polarized"}),e.createElement(Hc,{onClick:()=>l(o.variant),price:o.price,selected:t[Vs]?.sku===uc,supportingText:"Filter out glare for clearer vision.",title:"Polarized"}))}],[Gs]:["Color",()=>{const{colors:t,data:a,next:r,product:n,setData:i}=Vc(),{clear:o,blueLightProtection:l,photochromic:s,windDown:c}=Pc(t),d=e=>{i({...a,[Gs]:e}),r()};return e.createElement(e.Fragment,null,e.createElement(Hc,{icon:e.createElement(zc,{sku:lc}),price:"Included",onClick:()=>d(o.variant),selected:a[Gs]?.sku===lc,supportingText:"Includes our premium anti-reflective & hydro-oleophobic front side and backside standard coatings which help reduce unwanted reflections & allow you to see better day or night and help keep your lenses clean. Best coatings for most cases including nighttime driving.",title:"Clear"}),e.createElement(Hc,{icon:e.createElement(zc,{sku:sc}),price:l.price,onClick:()=>d(l.variant),selected:a[Gs]?.sku===sc,supportingText:"Lens coating designed to block a portion of the harmful artificial blue light from heavy screen-time use that extends late in the day and into the night.",title:"Blue Light Protection"}),false,!Ec(n,fc)&&e.createElement(Hc,{icon:e.createElement(zc,{sku:cc}),price:s.price,onClick:()=>d(s.variant),selected:a[Gs]?.sku===cc,supportingText:"Lenses that start out clear and darken when outdoors while exposed to unfiltered sunlight. These also include our premium front and backside coatings.",title:"Photochromic"}))}],[js]:["Prescription",()=>{const{data:t,next:a,onUpload:r,setData:n,uuid:i}=Vc(),o=e=>{n({...t,[js]:e}),a()},{getRootProps:l,getInputProps:s,open:c}=ym({onDrop:async e=>{const t={image:e[0],uuid:i};await r(t),o(t)}}),d=l(),m=s();return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>o(null),selected:null===t[js],supportingText:"Send it at your convenience. We'll follow up by email",title:"Send Us Your Prescription Later"}),e.createElement(Hc,{selected:!0===t[js],supportingText:"Upload a photo of your prescription. When uploading your prescription photo, please include issue and expiration date.",title:"Have a Current Prescription?",tooltip:"Our opticians will review your prescription to ensure we're able to fill it. Some prescriptions may not be fillable in certain frames. If this is the case for your prescription, our support team will reach out to help you find a solution.",onClick:c},e.createElement("div",h({className:"upload-container"},d,{onClick:void 0}),e.createElement("input",h({},m,{onClick:void 0})))),e.createElement("a",{href:"https://visit.govisibly.com/roka/",target:"_blank",rel:"noopener noreferrer"},e.createElement(Hc,{selected:!1===t[js],supportingText:"Take an online vision test, right here",title:"Need Your Prescription Renewed?",tooltip:e.createElement(e.Fragment,null,e.createElement("ul",{style:{marginLeft:0,paddingLeft:15}},e.createElement("li",null,"Sign up to take the 5 minute test with Visibly ($35)."),e.createElement("li",null,"Test results will be reviewed by a licensed eye care professional."),e.createElement("li",null,"Receive your prescription in 24 hours."),e.createElement("li",null,"Send it our way to complete your order.")))})))}],[Ws]:["Pupils",()=>{const{data:t,next:a,setData:r}=Vc(),[n,i]=e.useState(!1),o=t[Ws]||"",[l,s]=e.useState(o),[c,d]=e.useState(o),u=o?.split?.("/")[0]||"",[p,f]=e.useState(u),[h,v]=e.useState(u),g=o?.split?.("/")[1]||"",[b,y]=e.useState(g),[E,C]=e.useState(g),[w,x]=e.useState(null),k=e.useMemo((()=>n?p&&h&&p===h&&b&&E&&b===E&&Lm(p,b):l===c&&Nm(l)),[n,p,h,b,E,l,c]);e.useEffect((()=>{if(k)x(null);else{if(n){if(b&&E&&b!==E)return void x(km);if(p&&h&&p!==h)return void x(km);if(p&&b&&!Lm(p,b))return void x(Sm)}else{if(l&&c&&l!==c)return void x(km);if(l&&!Nm(l))return void x(Sm)}x(null)}}),[k,l,c,p,h,b,E,n]);const S=e.useCallback((()=>{k?(x(null),r({...t,[$s]:"manual",[Ws]:n?`${p}/${b}`:Number(l)}),a()):x(Sm)}),[k,r,t,n,p,b,l,a]),N=e.useCallback((()=>{r({...t,[$s]:null,[Ws]:null}),a()}),[t,a,r]),L={valid:k};return e.createElement("div",{className:"modalRxConfig modalRxConfig modalRxConfig--nestedConfigs"},e.createElement("div",{className:"pupillaryDistanceForm"},e.createElement("h3",null,"Provide Your Pupillary Distance"),e.createElement("p",null,"PD is the distance between your pupils. If not listed on your prescription, you can use our measure tool or send it later."),n?e.createElement("div",{className:"pupillaryDistanceFormBinocular"},e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"os1",id:"os1",placeholder:"Enter Left",value:p,onChange:e=>f(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"os2",id:"os2",placeholder:"Confirm Left",value:h,onChange:e=>v(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance"))),e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"od1",id:"od1",placeholder:"Enter Right",value:b,onChange:e=>y(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"od2",id:"od2",placeholder:"Confirm Right",value:E,onChange:e=>C(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance")))):e.createElement("div",{className:"pupillaryDistanceFormMonocular"},e.createElement("div",{className:"pupillaryDistanceFormMeasurement"},e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"pd1",id:"pd1",placeholder:"Enter your PD in mm",value:l,onChange:e=>s(e.target.value)}),e.createElement("span",null,"Pupillary Distance")),e.createElement("label",{className:m(L)},e.createElement("input",{className:m("pupillaryDistanceInput",L),type:"number",name:"pd2",id:"pd2",placeholder:"Confirm your PD in mm",value:c,onChange:e=>d(e.target.value)}),e.createElement("span",null,"Confirm Your Pupillary Distance")))),e.createElement("label",null,e.createElement("input",{type:"checkbox",checked:n,onChange:e=>i(e.target.checked)}),e.createElement("span",null,"I have 2 PD numbers"))),w&&e.createElement("div",{className:"modalRxConfigSupport"},e.createElement("p",null,w)),e.createElement("button",{type:"button",className:"pupillaryDistanceSubmit",onClick:S,disabled:!k},"Next"),e.createElement("div",{className:"pupillaryDistanceOptions"},e.createElement("div",{className:"pupillaryDistanceMeasure"},e.createElement("div",null,"Need to Measure Your PD?",e.createElement("div",{className:"pupillaryDistanceAppLinks"},e.createElement("a",{href:"https://apps.apple.com/us/app/pdcheck-ar/id1563806777",target:"_blank",rel:"noopener noreferrer"},"PDCheck AR app (iOS)",e.createElement(cr,null)),e.createElement("a",{href:"https://play.google.com/store/apps/details?id=com.vistechprojects.pupildistancemetercustom&hl=en_US",target:"_blank",rel:"noopener noreferrer"},"Pupil Distance Meter app (Android)",e.createElement(cr,null))))),e.createElement("button",{className:"pupillaryDistanceSend",onClick:N},"Send Your PD Later")))}],[Ks]:["Nose Pad Add-On",()=>{const{data:t,next:a,setData:r,nosepadOptions:n}=Vc(),{no:i,yes:o}=n,l=t[Ks],s=e=>{r({...t,[Ks]:e}),a()};return e.createElement(e.Fragment,null,e.createElement(Hc,{onClick:()=>s(o?.variant),iconType:"nosepad",largeImage:e.createElement(Pm,{variant:o?.variant}),price:o.price,selected:o&&l?.id===o?.variant?.id,supportingText:"These glasses come standard with one removable nose pad that is designed to fit the majority of faces. Have a wider or narrower nose bridge? Add the interchangeable nose pad kit below to find your perfect fit.",title:"Add Nose Pad Kit"}),e.createElement(Hc,{onClick:()=>s(i.variant),selected:!l,supportingText:"Don't worry, you can always buy a replacement kit in the future if needed.",title:"Continue Without Kit"}))}],[Us]:["Review Your Selections",()=>{const{colors:t,data:a,magnification:r,materials:n,polarizations:i,prescriptionTypes:o,product:l,setStep:s,steps:c,nosepadOptions:d,variant:m,allowPrescriptionTypeEdit:u}=Vc(),p=Pc(t),f=Mc(n),h=Ac(i),v=a[zs]||a[Rs],g=Number(v?.price)>0?`+$${Number(v.price).toFixed(0)}`:"Included",b=Object.values(f).find((({variant:e})=>e?.sku===a[Hs]?.sku)),y=Object.values(p).find((({variant:e})=>e?.sku===a[Gs]?.sku)),E=Object.values(h).find((({variant:e})=>e?.sku===a[Vs]?.sku)),C=d&&Object.values(d).find((({variant:e})=>e?.sku===a[Ks]?.sku));if(!m)return null;const w=Ic(l,{colors:t,materials:n,polarizations:i,prescriptionTypes:o});return e.createElement(e.Fragment,null,e.createElement(Tm,{compareAtPrice:isNaN(m.compare_at_price)||Number(m.compare_at_price)===Number(m.price)?void 0:`${Number(m.compare_at_price).toFixed(0)}`,title:"Frame Style",price:`$${Number(m.price).toFixed(0)}`,value:m.title}),v&&e.createElement(Tm,{onEdit:u?()=>s(c.indexOf(Rs)):void 0,price:g,title:"Prescription Type",value:`${v.title}${Ec(l,fc)&&r?` +${r}`:""}`}),b&&e.createElement(Tm,{onEdit:Hs in w?void 0:()=>s(c.indexOf(Hs)),price:b.price,title:"Material",value:b?.variant?.title}),y&&e.createElement(Tm,{onEdit:Gs in w?void 0:()=>s(c.indexOf(Gs)),price:y.price,title:"Lens Color",value:y?.variant?.title}),E&&Nc(l)&&e.createElement(Tm,{onEdit:Vs in w?void 0:()=>s(c.indexOf(Vs)),price:E.price,title:"Polarization Type",value:E.variant.title}),C&&e.createElement(Tm,{onEdit:()=>s(c.indexOf(Ks)),price:C.price,title:"Nosepad Kit",value:C.variant.title}))},()=>{const{estimatedShipDate:t,onComplete:a}=Vc();return e.createElement(e.Fragment,null,e.createElement("button",{type:"button",className:"button",onClick:()=>a()},t?"Pre-order":"Add To Cart"),e.createElement("p",null,"Note: It takes up to 12 business days to build and assemble your eyewear before shipping."),e.createElement("p",null,"If a return happens because an RX is wrong, we will facilitate your return and refill the prescription. Otherwise, prescription eyewear can be returned within 30 days of purchase with a $30 restocking fee."))}]},Am=e.createContext(void 0);function _m(){const t=e.useContext(Am);if(void 0===t)throw new Error("useSearch must be used within a SearchProvider");return t}const Bm={default:({slice:t})=>{const{content:a,icons:r,title:n}=t.primary;return e.createElement("div",{className:"boldStatement","data-slice-type":t.slice_type,"data-slice-variation":t.variation},e.createElement("div",{className:"boldStatementContent"},e.createElement("div",{className:"boldStatementContent-title"},e.createElement("h2",null,n)),e.createElement("div",{className:"boldStatementContent-body"},e.createElement(Mn,{field:a})),e.createElement("div",{className:"boldStatementContent-features"},e.createElement("ul",null,r.map((({icon:t},a)=>e.createElement("li",{key:`${t.url}-${a}`},e.createElement(Un,{src:t.url,alt:t.alt}))))))))},statementSocial:({slice:t})=>{const{content:a,icons:r,title:n}=t.primary;return e.createElement("div",{className:"boldStatement boldStatement--social","data-slice-type":t.slice_type,"data-slice-variation":t.variation},e.createElement("div",{className:"boldStatementContent"},e.createElement("div",{className:"boldStatementContent-title"},n&&e.createElement("h2",null,n)),e.createElement("div",{className:"boldStatementContent-body"},e.createElement(Mn,{field:a})),e.createElement("div",{className:"boldStatementContent-features"},e.createElement("ul",null,r.map((({icon:t,link:a,title:r},n)=>e.createElement("li",{key:`${t.url}-${n}`},e.createElement("a",{href:a.url,title:r},e.createElement(Un,{loading:"lazy",src:t.url,alt:t.alt}),r))))))))}},Fm=({slice:t})=>{const a=Bm[t.variation];if(!a)throw new Error(`No Statement component found for variation ${t.variation}`);return e.createElement(a,{slice:t})},Om=()=>null,Im=({url:t})=>e.createElement("link",{rel:"stylesheet",href:t}),Dm=({url:t})=>(e.useEffect((()=>{if("undefined"==typeof window)return;const e=document.createElement("script");return e.src=t,e.async=!0,e.defer=!0,document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[t]),null),Rm=({asset_url:t})=>{let a=Om;const{url:r}=t;return/\.css(\?){0,1}(\w|\=|\&)*$/.test(r)&&(a=Im),(e=>/\.js(\?){0,1}(\w|\=|\&)*$/.test(e))(r)&&(a=Dm),e.createElement(a,{url:r})},zm=({handlePreviewClick:t,preview_image:a})=>e.createElement("div",{className:"videoSliceEmbed-object",onClick:t},e.createElement(Un,{className:"preview",field:a}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"playButton"})),Hm=({hide_playback_button:t,hide_audio_button:a,video_url:r,preview_image:n})=>{const i=e.useRef(null),[o,l]=e.useState(zr(n)),[{muted:s,paused:c},d]=e.useState({muted:!1,paused:!1});return e.createElement("div",{className:"videoSliceEmbed"},o&&zr(n)?e.createElement(zm,{handlePreviewClick:()=>{l(!1),i.current&&i.current.play()},preview_image:n}):e.createElement("div",{className:"videoSliceEmbed-object"},e.createElement("video",{ref:i,autoPlay:!0,playsInline:!0,preload:"metadata"},e.createElement("source",{src:r,type:"video/mp4"})),!(t&&a)&&e.createElement("div",{className:"heroVideoControls"},!t&&e.createElement("button",{className:"playbackControl",type:"button",onClick:()=>{i.current&&(i.current.paused?(d({muted:s,paused:!1}),i.current.play()):(d({muted:s,paused:!0}),i.current.pause()))},"data-state":c?"play":"pause"},c?e.createElement(gs,{"aria-label":"Play video",title:"Play video"}):e.createElement(vs,{"aria-label":"Pause video",title:"Pause video"})),!a&&e.createElement("button",{className:"soundControl",type:"button",onClick:()=>{i.current&&(d({muted:!i.current.muted,paused:c}),i.current.muted=!i.current.muted)},"data-state":s?"soundoff":"soundon"},s?e.createElement(bs,{"aria-label":"Sound off",title:"Sound off"}):e.createElement(ys,{"aria-label":"Sound on",title:"Sound on"})))))},Gm=({embed_url:t})=>e.createElement("div",{className:"videoSliceEmbed"},e.createElement("div",{className:"videoSliceEmbed-object"},e.createElement("iframe",{src:t,title:"Video player",allow:"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin"}))),Vm={videoFullWidth:({slice:t})=>{const{content:a,embed_url:r,hide_audio_button:n,hide_playback_button:i,preview_image:o,video_url:l}=t.primary,s=Hr(r);return e.createElement("div",{className:"videoSlice videoSlice--column","data-slice-type":t.slice_type,"data-slice-variation":t.variation},Dr(a)&&e.createElement("div",{className:"videoSliceContent"},e.createElement(Mn,{field:a})),s?e.createElement(Gm,{embed_url:r.url,preview_image:o}):e.createElement(Hm,{hide_audio_button:n,hide_playback_button:i,video_url:l.url,preview_image:o}))},videoWithContent:({slice:t,isColumn:a})=>{const{content:r,hide_audio_button:n,hide_playback_button:i,embed_url:o,preview_image:l,video_url:s}=t.primary,c=Hr(o);return e.createElement("div",{className:m("videoSlice",{"videoSlice--column":a}),"data-slice-type":t.slice_type,"data-slice-variation":t.variation},c?e.createElement(Gm,{embed_url:o.url,preview_image:l}):e.createElement(Hm,{hide_audio_button:n,hide_playback_button:i,video_url:s.url,preview_image:l}),e.createElement("div",{className:"videoSliceContent"},e.createElement(Mn,{field:r})))}},jm=({slice:t})=>{const[a,r]=e.useState(!1);e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{r(window.visualViewport.width<930)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const n=Vm[t.variation];if(!n)throw new Error(`Unknown video variation: ${t.variation}`);return e.createElement(n,{slice:t,isColumn:a})},$m=({slice:t})=>{const a=e.useRef(),[r,n]=e.useState(!1),{items:i,link:o,title:l}=t.primary,s=e=>{"undefined"!=typeof window&&a&&(window.visualViewport.width>760||(e.stopPropagation(),e.preventDefault(),r?(a.current.style.maxHeight=null,a.current.style.opacity=0,n(!1)):(a.current.style.maxHeight=`${a.current.scrollHeight}px`,a.current.style.opacity=1,n(!0))))};return e.createElement("div",{className:"footerNav-group footerNav-groupAccordion"},e.createElement("div",{className:m("footerNav-groupTitle",r&&"active"),role:"button",onClick:s},e.createElement("a",{href:o?.url,onClick:s},l)),e.createElement("div",{className:"footerNav-groupItems",ref:a},e.createElement("ul",null,i.map(((t,a)=>{const{link:r,title:n}=t;return e.createElement("li",{key:`${r.url}-${a}`},e.createElement("a",{href:r?.url},n))})))))},Wm=({apiKey:t,errorMessage:a,listId:r,revision:n="2023-10-15"})=>{const{submit:i,...o}=ol({apiKey:t,listId:r,revision:n}),[l,s]=e.useState();return e.useEffect((()=>{if("success"===o.state)return window.gtag?.("event","conversion",{allow_custom_scripts:!0,send_to:"DC-10628785/email0/email0+standard"}),void window.fbq?.("trackCustom","EmailConversion",{});"error"===o.state&&s(a||"Error subscribing. Please check that you've entered valid contact information.")}),[a,o.state]),e.createElement("div",{className:"footerNav-group footerNav-groupNewsletter"},e.createElement("div",{className:"footerNav-groupTitle"},e.createElement("span",null,"Sign Up")),e.createElement("div",{className:"footerNav-groupItems"},"success"===o.state&&e.createElement("p",null,"Thanks for signing up!"),"success"!==o.state&&e.createElement(e.Fragment,null,e.createElement("p",null,"Stay up to date on new product launches"),e.createElement("form",{className:"gtm-email-conversion gtm-pixel-artsai-quiz",onSubmit:"submitting"===o.state?void 0:async e=>{e.preventDefault();const{email:t,phone:a}=e.target.elements,r={email:t.value};a.value.length>0&&(r.phone_number=a.value),r.email?await i({attributes:r,source:"Footer"}):s("Please enter an email address.")}},e.createElement("input",{type:"email",name:"email","aria-label":"Enter your email to signup for product updates",placeholder:"Email (Required)",required:""}),e.createElement("input",{type:"text",name:"phone","aria-label":"Enter your phone number to sign up for product update texts",placeholder:"Phone (optional, to sign up for texts)"}),e.createElement("p",null,"By submitting this form, you agree to receive recurring automated promotional and personalized marketing text messages (e.g. cart reminders) from ROKA at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help and STOP to cancel. Msg frequency varies. Msg & data rates may apply. View"," ",e.createElement("a",{href:"/pages/terms-of-use"},"Terms")," &"," ",e.createElement("a",{href:"/pages/privacy-policy"},"Privacy"),"."),e.createElement("input",{type:"submit",value:"Submit",className:"button"}),l&&e.createElement("span",{"data-msg":l,className:"signup-form-msg"},l)))))},Um=({results:t,query:a,trackSearchAttribution:r})=>{const[n]=t?.products||[],[i]=t?.collections||[],[o]=t?.pages||[];return e.createElement("div",{className:"searchResults",role:"dialog","aria-label":"Site-wide search Results"},e.createElement("div",{className:"searchResultsLinks"},e.createElement("div",{className:"searchResultsLinks-group"},e.createElement("p",{className:"searchResultsLinks-header"},"Collections"),e.createElement("ul",null,!i?.nbHits&&e.createElement("li",null,e.createElement("span",null,"No collections found")),i?.hits?.map(((t,a)=>e.createElement("li",{key:`${t.id}-${a}`},e.createElement("a",{href:`/collections/${t.handle}`},t.title)))))),e.createElement("div",{className:"searchResultsLinks-group"},e.createElement("p",{className:"searchResultsLinks-header"},"Pages"),e.createElement("ul",null,!o?.nbHits&&e.createElement("li",null,e.createElement("span",null,"No pages found")),o?.hits?.map(((t,a)=>e.createElement("li",{key:`${t.id}-${a}`},e.createElement("a",{href:`/pages/${t.handle}`},t.title))))))),e.createElement("div",{className:"searchResultsItems"},e.createElement("div",{className:"searchResultsProducts"},!n?.nbHits&&"No products found",n?.hits?.slice(0,5).map(((t,a)=>{const{id:i,objectID:o,variants_min_price:l,variants_max_price:s,price:c,handle:d,image:m,title:u}=t,p=l!==s?`$${l}-$${s}`:`$${c}`;return e.createElement("div",{className:"searchResultProduct",key:`${i}-${a}`},e.createElement("a",{href:`/products/${d}${o?`?variantId=${o}`:""}`,onClick:()=>r?.(n.queryID,o,i,a+1)},e.createElement("div",{className:"searchResultProduct-image"},e.createElement("img",{src:m,alt:u})),e.createElement("div",{className:"searchResultProduct-content"},e.createElement("p",{className:"searchResultProduct-title"},u),e.createElement("p",{className:"searchResultProduct-price"},p))))}))),e.createElement("div",{className:"searchResultsViewAll"},e.createElement("p",null,"See all results ",e.createElement("a",{href:`/search?q=${a}`},"matching ",a)," ","(",n?.nbHits,")"))))},Km=t=>a=>{const{children:r,key:n,...i}=a,o=i?.node?.data?.url;return e.createElement("a",h({},i,{key:n,style:{color:t},href:o}),r)},qm=({children:t,key:a})=>e.createElement(e.Fragment,{key:a},t),Zm=["color","frame and lens color","lens color","frame color","lens"],Ym=(e,t)=>e.map((e=>t.selectedOptions?.[e]?.value)).filter(Boolean).join(""),Jm=(e,t,a)=>e?.filter?.((({primary:e})=>{const r=a?e.position_mobile:e.position_desktop;return!e.after_products&&t===Math.max(r-1,0)})),Xm=(e,t)=>e?.filter?.((({primary:e})=>e.after_products))?.sort(((e,a)=>t?e.primary.position_mobile-a.primary.position_mobile:e.primary.position_desktop-a.primary.position_desktop)),Qm={new:()=>e.createElement("div",{className:"collectionProduct-badgeNew"},"New"),sale:()=>e.createElement("div",{className:"collectionProduct-badgeSale"},"Sale"),ltd:()=>e.createElement("div",{className:"collectionProduct-badgeImage"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/fpo-content/LTD_ALTERNATE_BLACK_2.svg",alt:"LTD Product Badge"})),outOfStock:()=>e.createElement("div",{className:"collectionProduct-badgeOut"},"Out of Stock"),missed:()=>e.createElement("div",{className:"collectionProduct-badgeMissed"},"Missed ’Em"),available:()=>e.createElement("div",{className:"collectionProduct-badgeAvailable"},"Available")},eu=({badges:t})=>e.createElement("div",{className:"collectionProduct-badges"},t.map((t=>{const a=Qm[t];return a?e.createElement(a,{key:t}):null}))),tu=({title:t,activeVariant:a,isCuratedVariant:r})=>{const n=(e=>e.compareAtPrice.amount&&parseFloat(e.price.amount)<parseFloat(e.compareAtPrice.amount))(a);return e.createElement(e.Fragment,null,e.createElement("div",{className:"collectionProduct-info"},e.createElement("p",null,t),n?e.createElement("p",{className:"collectionProduct-price collectionProduct-priceSale"},e.createElement("span",null,yr(a.compareAtPrice.amount))," ",yr(a.price.amount)):e.createElement("p",{className:"collectionProduct-price"},yr(a.price.amount))),r&&e.createElement("div",{className:"collectionProduct-description"},e.createElement("p",null,a.title)))},au="America/Chicago",ru=({title:t,activeVariant:a})=>{const r=a.metafields?.custom?.ltd_product_name?.value||t,n=a.metafields?.custom?.ltd_variant_title?.value||a.selectedOptions?.find((e=>"Color"===e.name))?.value||a.selectedOptions?.find((e=>"Frame Color"===e.name))?.value,i=a.metafields?.custom?.ltd_drop_date?.value?new Date(a.metafields?.custom?.ltd_drop_date?.value):null;return e.createElement("div",{className:"collectionProduct-info"},n&&e.createElement("p",{className:"collectionProduct-LTDStyle"},n),e.createElement("p",{className:"collectionProduct-LTDName"},r),i&&e.createElement("p",{className:"collectionProduct-LTDDate"},i.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:au})," ","/"," ",i.toLocaleTimeString("en-US",{hour:"numeric",timeZone:au})," ",Intl.DateTimeFormat(void 0,{timeZone:au}).resolvedOptions().timeZone))},nu=({href:t})=>e.createElement("div",{className:"collectionProduct-thumb collectionProduct-thumbCustom"},e.createElement("a",{href:t},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom.svg",alt:"CUSTOM Icon"}))),iu=({variant:t,isActive:a,href:r,isCustomCta:n=!1,setActiveVariant:i})=>{if(n)return e.createElement(nu,{href:r});const o=t.image,l=t.isAvailableForSale;return e.createElement("div",{className:m("collectionProduct-thumb",{active:a,disabled:l}),onMouseOver:()=>i(t),onMouseLeave:()=>i()},e.createElement("a",{href:r},e.createElement("img",{loading:"lazy",src:o.thumbUrl,alt:o.altText})))},ou=({variants:t,activeVariant:a,showCustomEmblem:r,productPageHref:n,setActiveVariant:i})=>{if(t.length<=1)return null;let o=4;r&&o--;const l=t.length-o;return e.createElement("div",{className:"collectionProduct-thumbs"},t.slice(0,o).map(((t,r)=>{const o=t.selectedOptions.reduce(((e,t)=>e+`${t.name}=${t.value.replace(/\s/g,"+")}`),"?");return e.createElement(iu,{key:t.id,variant:t,href:`${n}${o}`,isActive:a.id===t.id,setActiveVariant:i})})),r&&e.createElement(iu,{isCustomCta:!0,href:`${n}?autoInitCustomizer=1`}),l>0&&e.createElement("div",{className:"collectionProduct-thumb collectionProduct-thumbQuantity"},e.createElement("a",{href:n},"+",l)))},lu=({hideSwatches:t=!1,isCuratedVariant:a=!1,isLtdProduct:r,position:n,product:i})=>{const{id:o,title:l,featuredImage:s,tags:c,variants:{nodes:d}}=i;let[u,p]=e.useState(d[0]);e.useEffect((()=>{p(d[0])}),[d]),u||=d[0];const f=(e=>e.includes("available-as-custom"))(c),h=(({isLtdProduct:e,tags:t,variants:a})=>{const r=[];a.some((e=>e.price&&e.compareAtPrice&&e.price.amount<e.compareAtPrice.amount))&&r.push("sale"),t.includes("ltd")&&r.push("ltd"),t.includes("new")&&r.push("new");const n=!e&&a.every((e=>!e.availableForSale));if(!e&&n&&r.push("outOfStock"),e){const e=a.every((e=>"true"===e.metafields?.custom?.is_in_past_collection?.value)),t=a.every((e=>"true"===e.metafields?.custom?.ltd_is_available_for_sale?.value));e||r.push(n||!t?"missed":"available")}return r})({isLtdProduct:r,tags:c,variants:d}),v=(({product:e,activeVariant:t,linkToVariant:a=!1})=>{const{handle:r}=e,n=e.relatedInlineProduct?.value;return n||`/products/${r}${a?`?variantId=${t.id.split("/").pop()}`:""}`})({product:i,activeVariant:u,linkToVariant:r||a}),g=u?.image?.url?u?.image:s,b=(e=>{const t=Zm.reduce(((t,a)=>{if(-1!==t)return t;const r=e?.options?.findIndex((e=>e.name.toLowerCase()===a));return-1!==r?r:-1}),-1);return-1!==t?[t]:[]})(i),y=((e,t)=>t.reduce((()=>{const t=[];return(a,r)=>{const n=Ym(e,r);if(""===n)return a;if(null!=(i=r.hideFromProductPage)&&"true"==i.value.toLowerCase())return a;var i;if(t.find((e=>e===n))){const t=a.findIndex((t=>Ym(e,t)===n));return!a[t].available&&r.available&&(a[t]=r),a}return t.push(n),a.push(r),a}})(),[]))(b,d),E=r?ru:tu,{results:C,trackSearchAttribution:w}=_m(),[x]=C||[],k=e.useCallback((()=>{x?.queryID&&"number"==typeof n&&w?.(x.queryID,u.id,o,n)}),[u.id,o,x?.queryID,n,w]);return e.createElement("div",{className:m("collectionProduct",{collectionProductLTD:r}),"data-product-id":o},e.createElement("div",{className:m("collectionProduct-image",{"collectionProduct-image--hasSecondary":!!u.secondaryImage})},e.createElement("a",{href:v,onClick:k},e.createElement(eu,{badges:h}),e.createElement("div",{className:"collectionProduct-imageMain"},e.createElement(Un,{src:g?.url,alt:g?.altText})),u.secondaryImage&&e.createElement("div",{className:"collectionProduct-imageSecondary"},e.createElement(Un,{src:u.secondaryImage?.url,alt:u.secondaryImage?.altText})))),!(a&&t)&&e.createElement(ou,{showCustomEmblem:f,productPageHref:v,activeVariant:u,variants:y,setActiveVariant:p}),e.createElement(E,{title:l,activeVariant:u,isCuratedVariant:a}))},su=()=>{const{query:t,setQuery:a,submit:r}=_m();return e.createElement("div",{className:"collectionSearch"},e.createElement("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),r?.(e)}},e.createElement("input",{type:"search",id:"site-search",name:"q",placeholder:"Search","aria-label":"Search",value:t||"",onChange:e=>a?.(e.target.value)}),e.createElement("div",{className:"collectionSearchActions"},e.createElement("button",{type:"submit",className:"buttonSearch"},"Search"),e.createElement("button",{type:"reset",onClick:()=>a?.(""),className:"buttonClear"},"Clear"))))},cu=(t=!1)=>{const[a,r]=e.useState(t),[n,i]=e.useState(0),o=e.useRef(null);e.useEffect((()=>{const e=o?.current?.scrollHeight;return i(e),()=>{}}),[a]);return{isOpen:a,setIsOpen:r,filterGroupRef:o,filterGroupStyles:a?{maxHeight:`${n}px`,opacity:1}:{},setScrollHeight:i}},du={round:"round",square:"square",cateye:"cateye",rectangle:"rectangle",shield:"shield",aviator:"aviator"},mu={round:"round",oval:"oval",square:"square",heart:"heart",diamond:"diamond"},uu={small:"sizesmall",regular:"sizeregular",xl:"sizexl"},pu={rangeOne:"rangeOne",rangeTwo:"rangeTwo",rangeThree:"rangeThree",rangeFour:"rangeFour",rangeFive:"rangeFive",rangeSix:"rangeSix",rangeSeven:"rangeSeven",rangeEight:"rangeEight",rangeNine:"rangeNine",rangeTen:"rangeTen",rangeEleven:"rangeEleven"},fu={polarized:"polarized",prescription:"prescription",prescriptionProgressive:"prescriptionProgressive",blueBlocking:"blueBlocking",photochromic:"photochromic",ansiEightSevenPlus:"ansiEightSevenPlus"},hu={hcplasma20:"hcplasma20",hcplasma40:"hcplasma40",hcplasma40Photochomic:"hcplasma40Photochomic",photochromicCarbon:"photochromicCarbon",yellow:"yellow",clear:"clear",darkArcticMirror:"darkArcticMirror",darkArcticMirrorPolarized:"darkArcticMirrorPolarized",silverMirror:"silverMirror",fireMirror:"fireMirror",blackMirror:"blackMirror",glacierMirror:"glacierMirror",darkGlacierMirror:"darkGlacierMirror",glacierMirrorPolar:"glacierMirrorPolar",tealMirror:"tealMirror",darkBronzeMirror:"darkBronzeMirror",goldMirror:"goldMirror",roseGoldMirror:"roseGoldMirror",hcFusionMirror:"hcFusionMirror",greenMirror:"greenMirror",hCOctaneMirror:"hCOctaneMirror",hCIonMirror:"hCIonMirror",darkCarbon:"darkCarbon",graphite:"graphite",darkBronze:"darkBronze",bronzeEmber:"bronzeEmber",darkCarbonPolar:"darkCarbonPolar",bronzePolar:"bronzePolar",rangerPolar:"rangerPolar",windDownRed:"windDownRed"},vu={polycarbonate:"polycarbonate",trivex:"trivex",highIndex:"highIndex"},gu={black:"Black",white:"White",grey:"Grey",tortoise:"Tortoise",copper:"Copper",gold:"Gold",silver:"Silver",red:"Red",orange:"Orange",yellow:"Yellow",blue:"Blue",green:"Green",purple:"Purple",pink:"Pink",clear:"Clear",brown:"Brown"},bu={titanium:"titanium",alloy:"alloy",acetate:"acetate",combination:"combination"},yu={outdoorAdventure:"outdoorAdventure",cycling:"cycling",beachvolleyball:"beachvolleyball",running:"running",triathlon:"triathlon",golf:"golf",tactical:"tactical"},Eu={lowLight:"lowLight",mediumLight:"mediumLight",brightLight:"brightLight",variableLight:"variableLight"},Cu="filter_face_shape",wu="filter_frame_shape",xu="filter_rx_range",ku="filter_size",Su="filter_lens_material",Nu="filter_frame_technology",Lu="filter_frame_material",Tu="filter_sport",Pu="filter_lens_technology",Mu="filter_lens_color",Au="filter_frame_color",_u="filter_light_condition",Bu={key:wu,niceName:"Frame Shape",pluralName:"Frame Shapes",filterOptions:[{value:du.round,niceName:"Round"},{value:du.square,niceName:"Square"},{value:du.cateye,niceName:"Cateye"},{value:du.rectangle,niceName:"Rectangle"},{value:du.aviator,niceName:"Aviator"},{value:du.shield,niceName:"Shield"}]},Fu={key:Cu,niceName:"Face Shape",pluralName:"Face Shapes",filterOptions:[{value:mu.round,niceName:"Round"},{value:mu.oval,niceName:"Oval"},{value:mu.square,niceName:"Square"},{value:mu.heart,niceName:"Heart"},{value:mu.diamond,niceName:"Diamond"}]},Ou={key:ku,niceName:"Size",filterOptions:[{value:uu.small,niceName:"Small"},{value:uu.regular,niceName:"Regular"},{value:uu.xl,niceName:"XL"}]},Iu={key:xu,niceName:"Prescription Type",pluralName:"Prescription Types",filterOptions:[{value:pu.rangeOne,niceName:"SPH pl to +4.00/-2.00"},{value:pu.rangeThree,niceName:"SPH pl to +4.00/-4.00"},{value:pu.rangeFour,niceName:"SPH pl to +4.00/-6.00"},{value:pu.rangeFive,niceName:"SPH pl to +4.00/-8.00"},{value:pu.rangeSix,niceName:"SPH pl to +4.00/-10.00"},{value:pu.rangeSeven,niceName:"SPH pl to +6.00/-2.00"},{value:pu.rangeEight,niceName:"Mild (SPH between +3.00 and -2.00)"},{value:pu.rangeNine,niceName:"Moderate (SPH between +4.00 and +3.00 or -2.00 and -4.00)"},{value:pu.rangeTen,niceName:"Strong (SPH higher than -4.00)"},{value:pu.rangeEleven,niceName:"Reading Glasses"}]},Du={key:Pu,niceName:"Lens Technology",pluralName:"Lens Technologies",filterOptions:[{value:fu.polarized,niceName:"Polarized"},{value:fu.prescription,niceName:"Prescription"},{value:fu.prescriptionProgressive,niceName:"Progressives"},{value:fu.blueBlocking,niceName:"Blue Blocking"},{value:fu.photochromic,niceName:"Light Adjusting"},{value:fu.ansiEightSevenPlus,niceName:"ANSI 87+"}]},Ru={key:Mu,niceName:"Lens Color",pluralName:"Lens Colors",filterOptions:[{value:hu.hcplasma20,niceName:"HC Plasma 20"},{value:hu.hcplasma40,niceName:"HC Plasma 40"},{value:hu.hcplasma40Photochomic,niceName:"HC Plasma 40 Photochromic"},{value:hu.photochromicCarbon,niceName:"Photochromic Carbon"},{value:hu.yellow,niceName:"Yellow"},{value:hu.clear,niceName:"Clear"},{value:hu.darkArcticMirror,niceName:"Dark Arctic Mirror"},{value:hu.darkArcticMirrorPolarized,niceName:"Dark Arctic Mirror Polarized"},{value:hu.silverMirror,niceName:"Silver Mirror"},{value:hu.fireMirror,niceName:"Fire Mirror"},{value:hu.blackMirror,niceName:"Black Mirror"},{value:hu.glacierMirror,niceName:"Glacier Mirror"},{value:hu.glacierMirrorPolar,niceName:"Glacier Mirror Polarized"},{value:hu.tealMirror,niceName:"Teal Mirror"},{value:hu.darkBronzeMirror,niceName:"Dark Bronze Mirror"},{value:hu.goldMirror,niceName:"Gold Mirror"},{value:hu.roseGoldMirror,niceName:"Rose Gold Mirror"},{value:hu.hcFusionMirror,niceName:"HC Fusion Mirror"},{value:hu.greenMirror,niceName:"Green Mirror"},{value:hu.hCOctaneMirror,niceName:"HC Octane Mirror"},{value:hu.hCIonMirror,niceName:"HC Ion Mirror"},{value:hu.graphite,niceName:"Graphite"},{value:hu.darkCarbon,niceName:"Dark Carbon"},{value:hu.darkBronze,niceName:"Dark Bronze"},{value:hu.darkCarbonPolar,niceName:"Dark Carbon Polarized"},{value:hu.bronzePolar,niceName:"Bronze Polarized"},{value:hu.rangerPolar,niceName:"Ranger Polarized"}]},zu={key:Su,niceName:"Lens Material",pluralName:"Lens Materials",filterOptions:[{value:vu.polycarbonate,niceName:"Polycarbonate"},{value:vu.trivex,niceName:"Trivex"},{value:vu.highIndex,niceName:"HighIndex"}]},Hu={key:Au,niceName:"Frame Color",pluralName:"Frame Colors",filterOptions:[{value:gu.black,niceName:"Black"},{value:gu.white,niceName:"White"},{value:gu.grey,niceName:"Grey"},{value:gu.tortoise,niceName:"Tortoise"},{value:gu.copper,niceName:"Copper"},{value:gu.gold,niceName:"Gold"},{value:gu.silver,niceName:"Silver"},{value:gu.red,niceName:"Red"},{value:gu.orange,niceName:"Orange"},{value:gu.yellow,niceName:"Yellow"},{value:gu.blue,niceName:"Blue"},{value:gu.green,niceName:"Green"},{value:gu.purple,niceName:"Purple"},{value:gu.pink,niceName:"Pink"},{value:gu.clear,niceName:"Clear"},{value:gu.brown,niceName:"Brown"}]},Gu={key:Lu,niceName:"Frame Material",pluralName:"Frame Materials",filterOptions:[{value:bu.titanium,niceName:"Titanium"},{value:bu.alloy,niceName:"Alloy"},{value:bu.acetate,niceName:"Nylon"},{value:bu.combination,niceName:"Combination"}]},Vu={key:Tu,niceName:"Activity",pluralName:"Activities",filterOptions:[{value:yu.outdoorAdventure,niceName:"Outdoor Adventure"},{value:yu.cycling,niceName:"Cycling"},{value:yu.running,niceName:"Running"},{value:yu.triathlon,niceName:"Triathlon"},{value:yu.golf,niceName:"Golf"},{value:yu.tactical,niceName:"Tactical"}]},ju=(Eu.lowLight,Eu.mediumLight,Eu.brightLight,Eu.variableLight,{frameShapeFilter:Bu,faceShapeFilter:Fu,sizeFilter:Ou,rxRangeFilter:Iu,lensTechnologyFilter:Du,lensColorFilter:Ru,lensMaterialFilter:zu,frameColorFilter:Hu,frameMaterialFilter:Gu,sportFilter:Vu}),{frameShapeFilter:$u,faceShapeFilter:Wu,sizeFilter:Uu,rxRangeFilter:Ku,lensTechnologyFilter:qu,lensColorFilter:Zu,lensMaterialFilter:Yu,frameColorFilter:Ju,frameMaterialFilter:Xu,sportFilter:Qu}=ju,ep={level_1:[{name:"Fit",filterCategories:[$u,Wu,Uu]},{name:"Lens",filterCategories:[qu,Zu,Yu,Ku]},{name:"Frame",filterCategories:[Ju,Xu]},{name:"Activity",filterCategories:[Qu]}]},tp=(ep.level_1.reduce(((e,t)=>(t.filterCategories.forEach((t=>{let a=t.key,r=t.filterOptions.map((e=>({...e,key:a})));e.push(...r)})),e)),[]),[Cu,wu,xu,Su,Nu,Lu,Tu]),ap=[Pu,Mu,ku,Au,_u],rp=/^filter_\d*/,np=e=>{const t=e.rokaFilters?.value;if(t)return JSON.parse(t)},ip=e=>{const t=e.rokaFilters?.value;if(t)return JSON.parse(t)},op=e=>{const t=e.reduce(((e,t)=>{const a=np(t);if(!a)return t.handle,e;return Object.keys(a).filter((e=>rp.test(e))).forEach((t=>{const r=a[t];e[t]||(e[t]=[]);const n=new Set(e[t]),i=new Set([...n,...new Set(r)]);e[t]=Array.from(i)})),t.variants.nodes.forEach((a=>{const r=ip(a);if(!r)return t.handle,a.id,void a.image;Object.keys(r).filter((e=>rp.test(e))).forEach((t=>{const a=r[t];e[t]||(e[t]=[]);const n=new Set(e[t]),i=new Set([...n,...new Set(a)]);e[t]=Array.from(i)}))})),e}),{});return sp(t,e)},lp={[Pu]:[fu.prescription]},sp=(e,t)=>{const a=t.reduce(((e,t)=>[...e,...t.variants.nodes]),[]),r=Object.keys(e).filter((e=>tp.includes(e))),n=Object.keys(e).filter((e=>ap.includes(e)));return Object.keys(e).reduce(((i,o)=>{const l=r.includes(o),s=n.includes(o),c=e[o].filter((e=>{if(!(lp[o]&&lp[o].includes(e)))return!0;if(l&&t.every((t=>{const a=np(t);return!a||(!a[o]||a[o].includes(e))})))return!1;return!(s&&a.every((t=>{const a=ip(t);return!a||(!a[o]||a[o].includes(e))})))}));return 0==c.length||(i[o]=c),i}),{})},cp=(e,t)=>{if(0==t.length)return e;const a=t.reduce(((e,t)=>{const{key:a,value:r}=t;return e[a]||(e[a]=[]),e[a].push(r),e}),{}),r=Object.keys(a).filter((e=>tp.includes(e))),n=Object.keys(a).filter((e=>ap.includes(e))),i=e.filter((e=>{const t=np(e);return!!t&&r.every((e=>t[e]&&t[e].some((t=>a[e].includes(t)))))}));if(0==n.length)return i;return i.map((e=>{e.variants.nodes=e.variants.nodes.filter((e=>{const t=ip(e);return!!t&&n.every((e=>t[e]&&t[e].some((t=>a[e].includes(t)))))}));const t=n[0];return e.variants.nodes.sort(((e,r)=>{const n=ip(e),i=ip(r);return a[t].findIndex((e=>n[t].some((t=>t==e))))-a[t].findIndex((e=>i[t].some((t=>t==e))))})),0==e.variants.nodes.length?null:e})).filter((e=>null!==e))},dp={PRICE_ASC:{code:"PRICE_ASC",title:"Price: Low to High"},PRICE_DESC:{code:"PRICE_DESC",title:"Price: High to Low"}},mp=Object.values(dp),up=e=>JSON.parse(JSON.stringify(e)),pp=e=>{const t=(e=>e?.reduce(((e,t)=>[...e,...t.products.nodes]),[])||[])(e),a=((e,t=[])=>{const a=op(e),r=["Eyeglasses","Eyeglasses - Readers"];e.some((e=>r.includes(e.type)))&&delete a[Qu.key];const n=ep.level_1.reduce(((e,r)=>{const n=r.filterCategories.map((e=>{const r=a[e.key];if(t.find((t=>t.key===e.key)))return;if(!r||0===r.length)return;const n=e.filterOptions.filter((e=>r.includes(e.value)));return{...e,filterOptions:n}})).filter((e=>void 0!==e)),i={name:r.name,filterCategories:n};return n&&e.push(i),e}),[]);return{level_1:n}})(t);return{selectedFilters:[],sortMethod:{},activeFilterGroupName:void 0,filterConfig:a,products:t,initialProducts:t,sortCode:void 0,defaultFilters:[],isMobileOpen:!1,sortingOptions:mp}},fp=e.createContext(),hp=e=>Math.min(...e.variants.nodes.map((e=>parseFloat(e.price.amount)))),vp=(e,t)=>hp(e)-hp(t),gp=(e,t)=>{switch(console.log("sortProducts",t.code),t.code){case dp.PRICE_ASC.code:return e.sort(vp);case dp.PRICE_DESC.code:return e.sort(vp).reverse();default:return e}},bp="clearFiltersSelected",yp="setSortingMethod",Ep="toggleFilterSelected",Cp="toggleIsMobileOpen",wp=e=>`${e.key}-${e.value}`,xp=(e,t)=>wp(e)===wp(t),kp=(e,t)=>{switch(t.type){case Cp:return{...e,isMobileOpen:!e.isMobileOpen};case bp:{const t=cp(up(e.initialProducts),[]);return{...e,selectedFilters:[],products:t}}case yp:{const a=gp(e.products,t.payload);return{...e,products:a,sortMethod:t.payload}}case Ep:{let a=[...e.selectedFilters];const r=a.findIndex((e=>xp(e,t.payload)));-1===r?a.push(t.payload):a.splice(r,1);const n=cp(up(e.initialProducts),a),i=gp(n,e.sortMethod);return{...e,products:i,selectedFilters:a}}default:return{...e}}},Sp=({children:t,collections:a})=>{const[r,n]=e.useReducer(kp,a,pp),i=e.useCallback((e=>r.filterConfig.level_1.reduce(((t,a)=>{if(t)return t;return a.filterCategories.find((t=>t.key===e))}),void 0)),[r]),o={toggleFilterSelected:e=>n({type:Ep,payload:e}),clearFiltersSelected:()=>n({type:bp}),toggleIsMobileOpen:()=>n({type:Cp}),setSortingMethod:e=>n({type:yp,payload:e})};return e.createElement(fp.Provider,{value:{...r,...o,getFilterCategoryFromConfig:i}},t)},Np=()=>e.useContext(fp);var Lp=Object.freeze({__proto__:null,CollectionsWithFiltersProvider:Sp,getKeyForSelectedFilter:wp,isSelectedFilterEqual:xp,useCollectionsWithFilters:Np});const Tp={aviator:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-aviator.svg",cateye:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-cateye.svg",rectangle:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-rectangle.svg",round:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-round.svg",shield:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-shield.svg",square:"https://img.roka.com/hydrogen/public/fpo-content/filter-frame-shape-square.svg"},Pp=()=>{const{isOpen:t,setIsOpen:a,filterGroupRef:r,filterGroupStyles:n}=cu(),{selectedFilters:i,getFilterCategoryFromConfig:o,toggleFilterSelected:l}=Np(),s=o(wu);return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:t}),onClick:()=>a(!t)},"Frame Shape"),e.createElement("div",{ref:r,className:"filtrationGroup-options filtrationGroup-optionsFrames",style:n},s?.filterOptions.map((t=>{const a={...t,key:s.key};return e.createElement("div",{key:t.value,className:m("filtrationOption",{selected:i.find((e=>xp(e,a)))}),onClick:()=>{l(a)}},e.createElement("img",{src:Tp[t.value],alt:`Frame Shape Icon ${t.niceName}`}),e.createElement("div",{className:"filtrationOption-title"},t.niceName))}))))},Mp={round:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-round.svg",oval:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-oval.svg",square:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-square.svg",heart:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-heart.svg",diamond:"https://img.roka.com/hydrogen/public/fpo-content/filter-face-shape-diamond.svg"},Ap=()=>{const{isOpen:t,setIsOpen:a,filterGroupRef:r,filterGroupStyles:n}=cu(),{selectedFilters:i,getFilterCategoryFromConfig:o,toggleFilterSelected:l}=Np(),s=o(Cu);return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:t}),onClick:()=>a(!t)},"Face Shape"),e.createElement("div",{ref:r,className:"filtrationGroup-options filtrationGroup-optionsFaces",style:n},s?.filterOptions.map((t=>{const a={...t,key:s.key};return e.createElement("div",{key:t.value,className:m("filtrationOption",{selected:i.find((e=>xp(e,a)))}),onClick:()=>{l(a)}},e.createElement("img",{src:Mp[t.value],alt:`Face Shape ${t.niceName}`}),e.createElement("div",{className:"filtrationOption-title"},t.niceName))}))))},_p=()=>{const{selectedFilters:t,toggleFilterSelected:a,clearFiltersSelected:r}=Np();return e.createElement("div",{className:"filtration-selections"},e.createElement("div",{onClick:r,className:"filtration-clearSelection"},"Clear All"),t.map((t=>e.createElement("div",{key:`${t.key}${t.value}`,className:"filtration-selection",onClick:()=>{a(t)}},t.niceName))))},Bp=({filterCategory:t,selectedFilters:a,toggleFilterSelected:r,title:n,note:i})=>{const{isOpen:o,setIsOpen:l,filterGroupRef:s,filterGroupStyles:c}=cu();if(!t)return null;const{filterOptions:d}=t;return e.createElement("div",{className:"filtrationGroup"},e.createElement("div",{className:m("filtrationGroup-title",{active:o}),onClick:()=>l(!o)},n),e.createElement("div",{ref:s,className:"filtrationGroup-options",style:c},d.map(((n,i)=>{const o={...n,key:t.key};return e.createElement("div",{className:m("filtrationOption",{selected:a.find((e=>xp(e,o)))}),onClick:()=>{r(o)},key:`${n.title}-${i}`},e.createElement("div",{className:"filtrationOption-title"},n.niceName))})),i&&e.createElement("div",{className:"filtrationOption-info"},e.createElement("div",{className:"filtrationGroup-info"},i))))},Fp=({filterCategory:t,selectedFilters:a,toggleFilterSelected:r,title:n})=>{const{isOpen:i,setIsOpen:o,filterGroupRef:l,filterGroupStyles:s}=cu();return e.createElement("div",{className:"filtrationGroup filtrationGroup-swatches"},e.createElement("div",{className:m("filtrationGroup-title",{active:i}),onClick:()=>o(!i)},n),e.createElement("div",{ref:l,className:"filtrationGroup-options active",style:s},t?.filterOptions.map(((n,i)=>{const o={...n,key:t.key},l=Jo(n.niceName);return e.createElement("div",{key:`${n.title}-${i}`,className:m("filtrationOption","filtrationOption-swatch",l,{selected:a.find((e=>xp(e,o)))}),onClick:()=>{r(o)}},e.createElement("div",{className:"filtrationOption-title"},n.niceName))}))))},Op=()=>{const{selectedFilters:t,getFilterCategoryFromConfig:a,toggleFilterSelected:r,clearFiltersSelected:n,isMobileOpen:i,toggleIsMobileOpen:o}=Np(),l=a(ku),s=a(Pu),c=a(Mu),d=a(Au),u=a(Lu),p=a(Tu),f=a(xu),h=i?"Close":"Open";return e.createElement("div",{className:m("collectionFiltration filtration",{display:i})},e.createElement("div",{className:"filtration-header"},"Filter By",e.createElement("div",{className:"filtration-close",onClick:o},h)),e.createElement("div",{className:"filters"},e.createElement(_p,null),e.createElement(Pp,null),e.createElement(Ap,null),e.createElement(Bp,{filterCategory:l,selectedFilters:t,toggleFilterSelected:r,title:"Size"}),e.createElement(Bp,{filterCategory:s,selectedFilters:t,toggleFilterSelected:r,title:"Lens Technology"}),e.createElement(Bp,{filterCategory:f,selectedFilters:t,toggleFilterSelected:r,title:"Prescription Type",note:"Note: In general, we cannot accommodate prescriptions with a SPH stronger than +4.00 or -10.00."}),e.createElement(Fp,{filterCategory:d,selectedFilters:t,toggleFilterSelected:r,title:"Frame Color"}),e.createElement(Fp,{filterCategory:c,selectedFilters:t,toggleFilterSelected:r,title:"Lens Color"}),e.createElement(Bp,{filterCategory:p,selectedFilters:t,toggleFilterSelected:r,title:"Activity"}),e.createElement(Bp,{filterCategory:u,selectedFilters:t,toggleFilterSelected:r,title:"Frame Material"})),e.createElement("div",{className:"filtrationMobileActions"},e.createElement("div",{onClick:n,className:"filtrationMobileActions-clear"},"Clear All"),e.createElement("div",{className:"filtrationMobileActions-apply button",onClick:o},"Close")))},Ip=()=>{const{products:t,toggleIsMobileOpen:a,sortingOptions:r,sortMethod:n,setSortingMethod:i}=Np(),o=t.length;return e.createElement("div",{className:"collectionSort"},e.createElement("div",{className:"collectionSort-filters",role:"button",onClick:a},"Filters"),e.createElement("div",{className:"collectionSort-results"},o||0," Results"),e.createElement("div",{className:"collectionSort-options"},e.createElement("div",{className:"collectionSort-optionSelect"},"Sort By",e.createElement("ul",null,r.map((t=>{const a=n?.code===t.code;return e.createElement("li",{key:t.code,onClick:()=>i(t),className:m({selected:a})},t.title)}))))))},Dp=e.createContext(null),Rp=e.createContext(null);function zp(){return e.useContext(Dp)}const Hp=(e,t)=>{switch(t.type){case"delete":{const a=e.findIndex((e=>e.handle===t.handle));return-1!==a&&e.splice(a,1),e}case"patch":return[...e,...t.data];default:throw Error("Unknown action: "+t.type)}};var Gp=Object.freeze({__proto__:null,CollectionsContext:Dp,CollectionsDispatchContext:Rp,CollectionsProvider:({children:t,value:a={collections:[],marketingTiles:[],products:{}}})=>{const[r,n]=e.useReducer(Hp,a.collections);return e.createElement(Dp.Provider,{value:{collections:r,marketingTiles:a.marketingTiles||[],products:a.products||{}}},e.createElement(Rp.Provider,{value:n},t))},useCollections:zp,useTasksDispatch:function(){return e.useContext(Rp)}});const Vp=({collection:t,slice:a})=>{const{products:r}=zp(),n=Vr(a?.primary?.variants)&&Array.isArray(a?.primary?.variants)&&a.primary.variants.length>0?a.primary.variants:null,i=e.useMemo((()=>n?n.map((e=>{const{productHandle:t,variantId:a}=e.variant||{};if(!t||!a)return null;const n=r[t];if(!n)return null;const i=n.variants.nodes.find((e=>e.id===a));if(!i)return null;let o=i.title;return"string"==typeof e.title&&""!==e.title.trim()&&(o=e.title),{...n,variants:{nodes:[{...i,title:o},...n.variants.nodes.filter((e=>e.id!==a))]}}})).filter(Boolean):t?.products?.nodes||[]),[r,t,n]);return{isCurated:Array.isArray(n)&&n.length>0,products:i}},jp=({slice:t})=>{const{collections:a,marketingTiles:r}=zp(),n=Np(),i=Es(),o=a?.find((e=>e.handle===t.primary.collection_handle)),l=n?.products||n?.initialProducts||o?.products.nodes,s=Xm(r,i);return e.createElement(e.Fragment,null,e.createElement("div",{className:"collection collection--hasFiltration"},e.createElement(Op,null),e.createElement("div",{className:"collectionItems"},e.createElement(Ip,null),l.map(((t,a)=>{const n=Jm(r,a,i);return e.createElement(e.Fragment,{key:t.id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{product:t}))})),s.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))))))},$p=({title:t,image:a,handle:r})=>{const n=a?.url;return e.createElement("div",{className:m("collectionDivider",{"collectionDivider--hasImage":n})},n&&e.createElement("div",{className:"collectionDivider-image"},e.createElement(Un,{src:a.url,alt:a.alt})),e.createElement("div",{className:"collectionDivider-content"},e.createElement("h2",{id:r},t)))},Wp=({navItems:t})=>{const[a,r]=e.useState(null);return t&&0!==t.length?e.createElement("div",{className:"anchorNav"},e.createElement("ul",null,t.map((t=>e.createElement("li",{key:t.id},e.createElement("a",{href:`#${t.id}`,className:a===t.id?"active":"",onClick:e=>((e,t)=>{const a=document.getElementById(t);a&&(e.preventDefault(),e.stopPropagation(),r(t),a.scrollIntoView({behavior:"smooth"}))})(e,t.id)},t.name)))))):null},Up=({collections:t,isMobile:a,section:r})=>{const{collection_handle:n,header:i,header_image:o}=r,l=t?.find((e=>e.handle===n)),s=l?.document?.data?.slices?.find((e=>"collection_products"===e.slice_type)),{isCurated:c,products:d}=Vp({collection:l,slice:s}),m=l?.document?.data?.slices?.filter?.((e=>"collection_marketing_tile"===e.slice_type))??[],u=Xm(m,a);return e.createElement(e.Fragment,{key:n},e.createElement($p,{title:i,image:o,handle:n}),d.map(((t,r)=>{const n=Jm(m,r,a);return e.createElement(e.Fragment,{key:t.id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{hideSwatches:!1===s?.primary?.show_swatches,isCuratedVariant:c,product:t}))})),u.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))))},Kp=e=>"true"===e.metafields?.custom?.is_in_past_collection?.value,qp={default:({slice:t})=>{const{collections:a,marketingTiles:r}=zp(),n=a?.find((e=>e.handle===t?.primary?.collection_handle)),{isCurated:i,products:o}=Vp({collection:n,slice:t}),l=Es(),s=Xm(r,l);return e.createElement("div",{className:"collection"},e.createElement("div",{className:"collectionItems"},o.map(((a,n)=>{const o=Jm(r,n,l);return e.createElement(e.Fragment,{key:a.id},o.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{hideSwatches:!1===t?.primary?.show_swatches,isCuratedVariant:i,product:a}))})),s.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t})))))},collectionProductsWithFilters:({slice:t})=>{const{collections:a}=zp();return e.createElement(Sp,{collections:a},e.createElement(jp,{slice:t}))},collectionProductsWithSections:({slice:t})=>{const{collections:a}=zp(),r=Es(),n=t?.primary?.sections.map((e=>({id:e.collection_handle,name:e.header})));return e.createElement("div",{className:"collection"},e.createElement(Wp,{navItems:n}),e.createElement("div",{className:"collectionItems"},t?.primary?.sections.map((t=>e.createElement(Up,{key:t.collection_handle,collections:a,isMobile:r,section:t})))))},ltd:({slice:t})=>{const[a,r]=e.useState(),{klaviyo_public_api_key:n,klaviyo_signup_error_message:i}=sl(),{submit:o,...l}=ol({apiKey:n,errorMessage:i,listId:t.primary.signup_list_id});e.useEffect((()=>{"error"===l.state&&r(i||"Error subscribing. Please check that you've entered valid contact information."),"success"===l.state&&r("Thanks for signing up, you'll be hearing from us soon!")}),[i,l.state]);const[s,c]=e.useState(!1),[d,u]=e.useState(!1),[p,f]=e.useState(!1),h=Sr({getElement:()=>document.querySelector(".collectionToggleLTD"),offset:100});e.useEffect((()=>{h&&u(!0)}),[h]);const{collections:v,marketingTiles:g}=zp(),b=(Es(),v?.find((e=>e.handle===t.primary.collection_handle))),y=e.useMemo((()=>b?.products.nodes.flatMap((e=>e.variants.nodes.filter((t=>(({product:e,variant:t})=>e.rokaConfig?.badges?.[t.id]?.badgeCodes?.includes?.("ltd")||"true"===t.metafields?.custom?.is_ltd_product?.value)({product:e,variant:t}))).map((t=>({...e,variants:{nodes:[t]}})))))),[b]),E=e.useMemo((()=>y.filter((e=>Kp(e.variants.nodes[0])))),[y]),C=e.useMemo((()=>y.filter((e=>!Kp(e.variants.nodes[0])))),[y]);return e.createElement("div",{className:"collection collection--LTD"},e.createElement("div",{className:"collectionToggleLTD"},e.createElement("div",{className:m("collectionToggleLTD-item",{active:!s}),onClick:()=>c(!1),role:"button"},"Current"),e.createElement("div",{className:m("collectionToggleLTD-item",{active:s}),onClick:()=>c(!0),role:"button"},"Past")),e.createElement("div",{className:"collectionItems"},(s?E:C).map(((t,a)=>{const r=(s?E:C).length-1,n=Jm(g,a,r);return e.createElement(e.Fragment,{key:t.variants.nodes[0].id},n.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{key:t.variants.nodes[0].id,isLtdProduct:!0,product:t}))}))),e.createElement("div",{className:m("stickyCTA stickyCTA--email",{display:d&&!p})},e.createElement("button",{className:"stickyCTAClose",onClick:()=>f(!0)},"Close Email Signup Prompt"),e.createElement("div",{className:"stickyCTAContent"},e.createElement("div",{className:"stickyCTATitle"},"NEVER MISS AN LTD DROP"),e.createElement("form",{className:"formInsetLabels",onSubmit:e=>{e.preventDefault(),e.stopPropagation(),o({attributes:{email:e.target.email.value},source:"ltd-collection"})}},e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"email"},"Email (Required)"),e.createElement("input",{type:"email",name:"email",id:"email",required:!0})),e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:"Submit",className:"button"})))),a&&e.createElement("div",{className:"stickyCTAMessage"},a)))}},Zp=e=>e.primary.items.map((e=>({handle:e.product_handle,variantId:e.variant_id}))).filter((e=>e.handle&&e.variantId)),Yp=e.createContext(),Jp=({children:t})=>{const[a,r]=e.useState(null);return e.createElement(Yp.Provider,{value:{current:a,setCurrent:r}},t)},Xp=({title:t,children:a,isOpenDefault:r=!1})=>{const{isOpen:n,setIsOpen:i,filterGroupRef:o,filterGroupStyles:l}=cu(r),{current:s,setCurrent:c}=(t=>{const a=e.useContext(Yp),[r]=e.useState(t);if(e.useEffect((()=>{t&&r!==t&&a.setCurrent(t)}),[a,t,r]),!a)throw new Error("Invalid buy box accordion group context");return a})(r?t:null);e.useEffect((()=>{s&&s!==t&&i(!1)}),[s,i,t]);const d=n&&s===t;return e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{onClick:()=>{d?(c(null),i(!1)):(c(t),i(!0))},className:m("pdpBuyBoxAccordion-title",{active:d})},t),e.createElement("div",{ref:o,className:"pdpBuyBoxAccordion-content",style:{maxHeight:0,opacity:0,...l}},a))},Qp=()=>{const{accordionsData:t}=xl();if(!t)return null;const{show_hsa_fsa:a}=t;return a?e.createElement(Xp,{title:"How to Use Your Insurance or HSA/FSA"},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement("ol",null,e.createElement("li",null,"Purchase prescription glasses using your debit or credit card.",e.createElement("br",null),"-or-",e.createElement("br",null),"Purchase prescription glasses using your FSA/HSA card."),e.createElement("li",null,"Sign in to your ROKA account. Select your order and download an itemized receipt."),e.createElement("li",null,"Submit the receipt to your insurance provider/FSA/HSA for reimbursement or (if you purchased with your FSA/HSA card directly) save your receipt for your FSA/HSA records.")))):null},ef=()=>{const{accordionsData:t,product:a}=xl();if(!t)return null;const{show_hto:r,hto_content:n}=t;if(!r)return null;const i="Eyeglasses"===a?.productType,o="How to Tryout at Home";return Dr(n)?e.createElement(Xp,{title:o,isOpenDefault:!0},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement(Mn,{field:n}))):e.createElement(Xp,{title:o,isOpenDefault:!0},e.createElement("div",{className:"pdpBuyBoxAccordion-content"},e.createElement("ol",null,e.createElement("li",null,i?e.createElement(e.Fragment,null,e.createElement("b",null,"Select your kit(s)."),"Shop our curated"," ",e.createElement("a",{href:"/collections/home-tryout-collection"},"collection")," ","of kits based on shape, size, or vibe."):e.createElement(e.Fragment,null,e.createElement("b",null,"Select your kit(s).")," ",e.createElement("a",{href:"https://www.roka.com/collections/home-tryout-collection"},"Add a kit to your cart."))),e.createElement("li",null,e.createElement("b",null,"Try out the frames.")," Hit your daily routine, hard. Put some miles on 'em."),e.createElement("li",null,e.createElement("b",null,"Order on ",e.createElement("a",{href:"https://roka.com"},"ROKA.com"),".")," ","Use your $30 gift card towards your purchase."),e.createElement("li",null,e.createElement("b",null,"Get after it.")," Put on your ROKAs. Feel the difference."))))},tf=()=>{const[t,a]=e.useState(!1),{accordionsData:r}=xl();if(!r)return null;const{show_measurements:n,measurements_image:i}=r;if(!n||!i?.url)return null;return e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{onClick:()=>a(!t),className:m("pdpBuyBoxAccordion-title",{active:t})},"Measurements"),e.createElement("div",{className:m("modalGeneric","measurements",{isOpen:t})},e.createElement("div",{className:m("modalGenericContent",{isOpen:t})},e.createElement("div",{className:"modelGenericClose",onClick:()=>a(!t)}),e.createElement("div",{className:"modalGenericContentImage",style:{}},e.createElement(Un,{src:i.url,alt:i.alt})))))},af=()=>{const{accordionsData:t,mwwData:a}=xl();if(!t)return null;const{show_more_ways_to_wear:r}=t;return!r||!a?.products?.length?null:e.createElement(Xp,{title:"More Ways To Wear"},e.createElement(Ko,{modules:[Wi,$i],slidesPerView:1.25,spaceBetween:20,pagination:{el:".pdpBuyBoxProducts-pagination",clickable:!0}},a.products.map(((t,a)=>e.createElement(qo,{key:`${t.id}-${a}`},(()=>e.createElement("a",{key:t.id,href:`/products/${t.handle}`,className:"pdpBuyBoxProduct"},e.createElement("div",{className:"pdpBuyBoxProduct-image"},e.createElement(Un,{src:t.featuredImage.url,alt:t.featuredImage.altText})),e.createElement("div",{className:"pdpBuyBoxProduct-content"},e.createElement("p",{className:"pdpBuyBoxProduct-title"},t.title),e.createElement("p",{className:"pdpBuyBoxProduct-price"},"from"," ",yr(t.priceRange.minVariantPrice.amount)))))))),e.createElement("div",{className:"pdpBuyBoxProducts-pagination"})))},rf=({productGid:t})=>{const a=e.useRef();if(e.useEffect((()=>{"undefined"!=typeof window&&setTimeout((()=>{window.yotpoWidgetsContainer?.initWidgets?.()}),1e3)}),[]),!t)return null;const r={"data-yotpo-instance-id":"558188","data-yotpo-product-id":Number(t.split("/").pop()),"data-yotpo-cart-product-id":"","data-yotpo-section-id":"product"};return e.createElement("div",h({ref:a,className:"yotpo bottomLine"},r))},nf=()=>{const{accordionsData:t,product:a}=xl();if(!t)return null;const{show_review_rating:r}=t;return r?e.createElement("div",{className:"pdpBuyBoxAccordion"},e.createElement("div",{className:"pdpBuyBoxAccordion-title",onClick:e=>{window.scrollTo(),e.preventDefault();const t=document.querySelector("#yotpo-app");t&&t.scrollIntoView({behavior:"smooth"})}},e.createElement(rf,{productGid:a.id}))):null};let of;const lf=new Uint8Array(16);function sf(){if(!of&&(of="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!of))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return of(lf)}var cf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function df(e){return"string"==typeof e&&cf.test(e)}const mf=[];for(let e=0;e<256;++e)mf.push((e+256).toString(16).slice(1));function uf(e,t=0){return mf[e[t+0]]+mf[e[t+1]]+mf[e[t+2]]+mf[e[t+3]]+"-"+mf[e[t+4]]+mf[e[t+5]]+"-"+mf[e[t+6]]+mf[e[t+7]]+"-"+mf[e[t+8]]+mf[e[t+9]]+"-"+mf[e[t+10]]+mf[e[t+11]]+mf[e[t+12]]+mf[e[t+13]]+mf[e[t+14]]+mf[e[t+15]]}function pf(e,t,a){function r(e,r,n,i){var o;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a<e.length;++a)t.push(e.charCodeAt(a));return t}(e)),"string"==typeof r&&(r=function(e){if(!df(e))throw TypeError("Invalid UUID");let t;const a=new Uint8Array(16);return a[0]=(t=parseInt(e.slice(0,8),16))>>>24,a[1]=t>>>16&255,a[2]=t>>>8&255,a[3]=255&t,a[4]=(t=parseInt(e.slice(9,13),16))>>>8,a[5]=255&t,a[6]=(t=parseInt(e.slice(14,18),16))>>>8,a[7]=255&t,a[8]=(t=parseInt(e.slice(19,23),16))>>>8,a[9]=255&t,a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,a[11]=t/4294967296&255,a[12]=t>>>24&255,a[13]=t>>>16&255,a[14]=t>>>8&255,a[15]=255&t,a}(r)),16!==(null===(o=r)||void 0===o?void 0:o.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+e.length);if(l.set(r),l.set(e,r.length),l=a(l),l[6]=15&l[6]|t,l[8]=63&l[8]|128,n){i=i||0;for(let e=0;e<16;++e)n[i+e]=l[e];return n}return uf(l)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function ff(e){return 14+(e+64>>>9<<4)+1}function hf(e,t){const a=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(a>>16)<<16|65535&a}function vf(e,t,a,r,n,i){return hf((o=hf(hf(t,e),hf(r,i)))<<(l=n)|o>>>32-l,a);var o,l}function gf(e,t,a,r,n,i,o){return vf(t&a|~t&r,e,t,n,i,o)}function bf(e,t,a,r,n,i,o){return vf(t&r|a&~r,e,t,n,i,o)}function yf(e,t,a,r,n,i,o){return vf(t^a^r,e,t,n,i,o)}function Ef(e,t,a,r,n,i,o){return vf(a^(t|~r),e,t,n,i,o)}pf("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let a=0;a<t.length;++a)e[a]=t.charCodeAt(a)}return function(e){const t=[],a=32*e.length,r="0123456789abcdef";for(let n=0;n<a;n+=8){const a=e[n>>5]>>>n%32&255,i=parseInt(r.charAt(a>>>4&15)+r.charAt(15&a),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[ff(t)-1]=t;let a=1732584193,r=-271733879,n=-1732584194,i=271733878;for(let t=0;t<e.length;t+=16){const o=a,l=r,s=n,c=i;a=gf(a,r,n,i,e[t],7,-680876936),i=gf(i,a,r,n,e[t+1],12,-389564586),n=gf(n,i,a,r,e[t+2],17,606105819),r=gf(r,n,i,a,e[t+3],22,-1044525330),a=gf(a,r,n,i,e[t+4],7,-176418897),i=gf(i,a,r,n,e[t+5],12,1200080426),n=gf(n,i,a,r,e[t+6],17,-1473231341),r=gf(r,n,i,a,e[t+7],22,-45705983),a=gf(a,r,n,i,e[t+8],7,1770035416),i=gf(i,a,r,n,e[t+9],12,-1958414417),n=gf(n,i,a,r,e[t+10],17,-42063),r=gf(r,n,i,a,e[t+11],22,-1990404162),a=gf(a,r,n,i,e[t+12],7,1804603682),i=gf(i,a,r,n,e[t+13],12,-40341101),n=gf(n,i,a,r,e[t+14],17,-1502002290),r=gf(r,n,i,a,e[t+15],22,1236535329),a=bf(a,r,n,i,e[t+1],5,-165796510),i=bf(i,a,r,n,e[t+6],9,-1069501632),n=bf(n,i,a,r,e[t+11],14,643717713),r=bf(r,n,i,a,e[t],20,-373897302),a=bf(a,r,n,i,e[t+5],5,-701558691),i=bf(i,a,r,n,e[t+10],9,38016083),n=bf(n,i,a,r,e[t+15],14,-660478335),r=bf(r,n,i,a,e[t+4],20,-405537848),a=bf(a,r,n,i,e[t+9],5,568446438),i=bf(i,a,r,n,e[t+14],9,-1019803690),n=bf(n,i,a,r,e[t+3],14,-187363961),r=bf(r,n,i,a,e[t+8],20,1163531501),a=bf(a,r,n,i,e[t+13],5,-1444681467),i=bf(i,a,r,n,e[t+2],9,-51403784),n=bf(n,i,a,r,e[t+7],14,1735328473),r=bf(r,n,i,a,e[t+12],20,-1926607734),a=yf(a,r,n,i,e[t+5],4,-378558),i=yf(i,a,r,n,e[t+8],11,-2022574463),n=yf(n,i,a,r,e[t+11],16,1839030562),r=yf(r,n,i,a,e[t+14],23,-35309556),a=yf(a,r,n,i,e[t+1],4,-1530992060),i=yf(i,a,r,n,e[t+4],11,1272893353),n=yf(n,i,a,r,e[t+7],16,-155497632),r=yf(r,n,i,a,e[t+10],23,-1094730640),a=yf(a,r,n,i,e[t+13],4,681279174),i=yf(i,a,r,n,e[t],11,-358537222),n=yf(n,i,a,r,e[t+3],16,-722521979),r=yf(r,n,i,a,e[t+6],23,76029189),a=yf(a,r,n,i,e[t+9],4,-640364487),i=yf(i,a,r,n,e[t+12],11,-421815835),n=yf(n,i,a,r,e[t+15],16,530742520),r=yf(r,n,i,a,e[t+2],23,-995338651),a=Ef(a,r,n,i,e[t],6,-198630844),i=Ef(i,a,r,n,e[t+7],10,1126891415),n=Ef(n,i,a,r,e[t+14],15,-1416354905),r=Ef(r,n,i,a,e[t+5],21,-57434055),a=Ef(a,r,n,i,e[t+12],6,1700485571),i=Ef(i,a,r,n,e[t+3],10,-1894986606),n=Ef(n,i,a,r,e[t+10],15,-1051523),r=Ef(r,n,i,a,e[t+1],21,-2054922799),a=Ef(a,r,n,i,e[t+8],6,1873313359),i=Ef(i,a,r,n,e[t+15],10,-30611744),n=Ef(n,i,a,r,e[t+6],15,-1560198380),r=Ef(r,n,i,a,e[t+13],21,1309151649),a=Ef(a,r,n,i,e[t+4],6,-145523070),i=Ef(i,a,r,n,e[t+11],10,-1120210379),n=Ef(n,i,a,r,e[t+2],15,718787259),r=Ef(r,n,i,a,e[t+9],21,-343485551),a=hf(a,o),r=hf(r,l),n=hf(n,s),i=hf(i,c)}return[a,r,n,i]}(function(e){if(0===e.length)return[];const t=8*e.length,a=new Uint32Array(ff(t));for(let r=0;r<t;r+=8)a[r>>5]|=(255&e[r/8])<<r%32;return a}(e),8*e.length))}));var Cf={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function wf(e,t,a,r){switch(e){case 0:return t&a^~t&r;case 1:case 3:return t^a^r;case 2:return t&a^t&r^a&r}}function xf(e,t){return e<<t|e>>>32-t}pf("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,n=Math.ceil(r/16),i=new Array(n);for(let t=0;t<n;++t){const a=new Uint32Array(16);for(let r=0;r<16;++r)a[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];i[t]=a}i[n-1][14]=8*(e.length-1)/Math.pow(2,32),i[n-1][14]=Math.floor(i[n-1][14]),i[n-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<n;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=i[e][t];for(let e=16;e<80;++e)r[e]=xf(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let n=a[0],o=a[1],l=a[2],s=a[3],c=a[4];for(let e=0;e<80;++e){const a=Math.floor(e/20),i=xf(n,5)+wf(a,o,l,s)+c+t[a]+r[e]>>>0;c=s,s=l,l=xf(o,30)>>>0,o=n,n=i}a[0]=a[0]+n>>>0,a[1]=a[1]+o>>>0,a[2]=a[2]+l>>>0,a[3]=a[3]+s>>>0,a[4]=a[4]+c>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}));const kf=["frame-temple","frame","lens","rocker","temple","nose"],Sf=e=>{const t=kf.find((t=>new RegExp(t).test(e)));return"temple-pad"===t?"templepad":"frame-temple"===t?"frametemple":t},Nf=["s","tq","p","b"],Lf={kona:["s","p"]},Tf=e=>Lf[e]||Nf,Pf=["san-remo-air","san-remo","cp-1x","matador-air","tl-1","sr-1","sr-1x"],Mf=(e,t)=>{const a=(r=e.baseProductHandle).includes("matador-air")?"matador-air":r.includes("matador")?"matador":r.includes("san-remo-air")?"sanremoair":r.includes("san-remo")?"sanremo":r.slice(0,5).replace(/-/g,"");var r;const n={base:a,handle:e.baseProductHandle,size:"xl"},i=Object.entries(e.componentProductVariants).reduce(((e,[t,a])=>{const r=Sf(t),n=a.barcode;return e[r]=n,e}),n);return Tf(a).map((a=>{const r=new URLSearchParams({...i,perspective:a}).toString();let n="https://custom.roka.com/img";var o;o=e.baseProductHandle,Pf.some((e=>o.includes(e)))&&(n="https://custom-images.roka.com/img");const l=`${n}?${r}`;return{id:l,url:l,altText:t,title:t}}))},Af=/(?<productCode>[a-z]*)[0-9]*-/,_f=(e,t)=>{const a="at-1x-custom-sunglasses"===(r=e.baseProductHandle)?"at1x":"at-1-custom-sunglasses"===r?"at1":r.match(Af).groups.productCode;var r;const n=Object.entries(e.componentProductVariants).reduce(((e,[t,a])=>{const r=Sf(t),n=a.barcode;return e[r]=n,e}),{});return Tf(a).map((e=>({url:`https://img.roka.com/customizer/eyewear/${a}/${e}/${n.frame}_${n.lens}.jpg`,altText:t,title:t})))},Bf={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/frame.png",alt:"outline of an eyeglasses frame"},Ff={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/lens.png",alt:"outline of an eyeglasses lenses"},Of={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/rocker.png",alt:'outline of an eyeglasses under-eye "rocker"'},If={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/custom-icon-temple.svg",alt:"outline of an eyeglasses temple pad"},Df={src:"https://img.roka.com/hydrogen/public/img/customizer-icons/nose-pad-icon-custom.svg",alt:"outline of an eyeglasses nosepad"},Rf=({baseProduct:e,parts:t})=>{const a=t.map((e=>{const t=(e=>{const t=e.toLowerCase().replace(/[^a-zA-Z0-9]/g,"");switch(t){case"framecolor":case"frame":return Bf;case"lens":case"lenscolor":case"lenses":return Ff;case"gekonosepad":case"nosepiece":case"nosepad":return Df;case"gekotemplegrips":case"templecolor":return If;case"rocker":return Of;default:console.log(`No configured icon for ${t}`)}})(e.title);return{id:e.id,handle:e.handle,icon:t,title:e.title,options:e.variants.nodes.map((e=>{const t=Jo(e.title);return{id:e.id,barcode:e.barcode,title:e.title,sku:e.sku,price:e.price,compareAtPrice:e.compareAtPrice,availableForSale:e.availableForSale,swatchClass:t}}))}}));return{partsProducts:a}},zf=e=>/(sl|sr|tl|cp|gp|matador|san-remo)-/.test(e),Hf=(e,t="")=>zf(e.baseProductHandle)?Mf(e,t):_f(e,t),Gf=(e,t)=>`https://www.roka.com/products/${t.handle}`,Vf={frame:"Frame Color - ",lens:"Lenses - ",rocker:"Rocker - ",temple:"GEKO™ Temple Grips - ",nosepiece:"Nosepiece - "},jf=e.createContext({}),$f="INIT",Wf="SELECT_PART",Uf="CHANGE_SIZE",Kf=(e,t)=>{let a;switch(t.type){case $f:return a=Zf(t.payload),{...a};case Wf:const{variant:r,product:n}=t.payload,i={...e.customizedProduct};i.componentProductVariants[n.handle]=r;const o=qf(i,e.pageProduct);return{...e,customizedProduct:i,...o};case Uf:const l=e.sizeOptions.find((e=>e.baseProduct.handle===t.payload.handle));return a=Zf({...e,...l}),{...e,...a};default:throw Error("Unknown action.")}},qf=(e,t)=>{const a=[e.baseProductVariant,...Object.values(e.componentProductVariants)],r=(e=>Object.entries(e.componentProductVariants).map((([e,t])=>{const a=Object.keys(Vf).find((t=>new RegExp(t).test(e)));return`${Vf[a]}${t.title}`})).join(" / "))(e),n=a.map((e=>e.id)),i=a.every((e=>e.availableForSale)),o=(e=>{const t=e.find((e=>e.price.currencyCode)),{currencyCode:a}=t.price;return{amount:e.map((e=>parseFloat(e.price.amount))).reduce(((e,t)=>e+t),0),currencyCode:a}})(a),l=(e=>{const t=e.find((e=>e.price.currencyCode)),{currencyCode:a}=t.price;return{amount:e.map((e=>e.compareAtPrice?parseFloat(e.compareAtPrice.amount):parseFloat(e.price.amount))).reduce(((e,t)=>e+t),0),currencyCode:a}})(a),s=Hf(e,r),c=(e=>Hf(e)[1])(e),d=100*o.amount,m=function(e,t,a){if(Cf.randomUUID&&!t&&!e)return Cf.randomUUID();const r=(e=e||{}).random||(e.rng||sf)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=r[e];return t}return uf(r)}(),u=(e=>e.baseProductVariant.title)(e),p=(e=>zf(e.baseProductHandle))(e);return{selectedVariants:a,selectedVariantIds:n,price:o,compareAtPrice:l,lineItemProperties:{_uuid:m,_rdscustom_uuid:m,_rdscustom_imageurl:c.url,_rdscustom_url:Gf(0,t),_rdscustom_title:u,_rdscustom_description:r,_rdscustom_price:d.toString(),_roka_product_type:"Custom_Sun",_rdscustom_lineitemcount:`${a.length}`},galleryImages:s,image:c.url,title:u,description:r,availableForSale:i,isApex:p}},Zf=e=>{const{baseProduct:t,parts:a,pageProduct:r,sizeOptions:n}=e,{partsProducts:i}=Rf({...e}),o=r.id!==t.id,l={baseProductHandle:t.handle,baseProductVariant:t.variants.nodes[0],componentProductVariants:{...a.reduce(((e,t)=>(e[t.handle]=t.variants.nodes[0],e)),{})},extraProductVariants:{}};return{baseProduct:t,parts:a,partsProducts:i,customizedProduct:l,pageProduct:r,showBackButton:o,sizeOptions:n,...qf(l,r)}},Yf=()=>{const t=e.useContext(jf);if(!t)throw new Error("useRokaProductCustomizer must be used within an RokaProductCustomizer");return t},Jf=({isActive:t,toggle:a,partProduct:r,selectPart:n,selectedVariantIds:i,isApex:o})=>{const l=r.options.find((e=>i.includes(e.id)));return e.createElement(e.Fragment,null,e.createElement("button",{onClick:a,className:"pdpBuyBoxConfigTitle","aria-label":`Expand ${r.title}`,"aria-pressed":t},o&&e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:r.icon.src,alt:r.icon.alt}),e.createElement("span",null,r.title,":")," ",l.title),e.createElement("div",{role:"radiogroup",className:m("pdpBuyBoxConfigOptions","pdpBuyBoxConfigSwatches",{active:t}),style:{maxHeight:t?"200px":0,opacity:t?1:0}},r.options.map((t=>{const a=i.find((e=>e===t.id));return e.createElement("button",{key:t.id,"data-vid":t.id,"data-barcode":t.barcode,"data-sku":t.sku,role:"radio","aria-checked":a,className:m("pdpSwatch",t.swatchClass,{active:i.find((e=>e===t.id)),disabled:!t.availableForSale}),"aria-label":`${t.availableForSale?"":"Unavailable: "}${r.title}: ${t.title}`,onClick:()=>n(r,t)})}))))},Xf=({style:t,text:a,title:r})=>e.createElement("div",{className:m("pdpBuyBoxDisclaimer",t&&`pdpBuyBoxDisclaimer--${t.toLowerCase()}`)},r&&e.createElement("h4",null,r),a&&e.createElement(Mn,{field:a})),Qf={"excluded-from-returns":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--warning"},e.createElement("h4",null,"All Sales Final"),e.createElement("p",null,"Outlet sale pricing applies to in-stock items only (while supplies last) and may not be applied to past purchases. No other discounts apply. No returns or exchanges on this item; however, our manufacturer's warranty does still apply.")),EXCHANGE_ONLY:()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer"},e.createElement("p",null,"Outlet sale pricing applies to in-stock items only (while supplies last) and may not be applied to past purchases. No other discounts apply. No returns are allowed on this item; however, exchanges are allowed, and our manufacturer's warranty does still apply.")),"open-box":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer"},e.createElement("p",null,"Open box sale pricing applies to in-stock items only (while supplies last) may not be applied to past purchases. No other discounts apply. No returns are allowed on the item however exchanges are allowed, and our manufacture's warranty does still apply.")),"price-varies-by-size":()=>e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--default"},e.createElement("h4",null,"Note"),e.createElement("p",null,"Prices vary by size."))},eh="https://img.roka.com/icons/pdp",th={"icon-cloudy":`${eh}/roka-icon-cat-1-cloudy.svg`,"icon-partly-cloudy":`${eh}/roka-icon-cat-2-partly-cloudy.svg`,"icon-full-sun":`${eh}/roka-icon-cat-3-full-sun.svg`,"icon-fullsun":`${eh}/roka-icon-cat-3-full-sun.svg`,"icon-indoor":`${eh}/roka-icon-cat-0-indoor.svg`},ah=({sku:t,optionValue:a,optionName:r,showValueName:n})=>{const i=Vl(t),o=i?.length>1;return e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},n&&e.createElement(e.Fragment,null,r&&e.createElement("span",null,r,":")," ",a)),i.length>0&&i.map(((t,a)=>{let r=0===a?"Primary Lens: ":"Accessory Lens: ";return e.createElement("div",{key:a,className:m({"pdpBuyBoxSelectedInfo-section":o})},o&&e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title-small"},r,t.title),e.createElement("div",{className:"pdpBuyBoxSelectedInfo-specs"},e.createElement("img",{className:"pdpBuyBoxLightIcon",src:th[t.iconClass],alt:"Icon Name"}),`${t.conditionName} - ${t.transmission} Light Transmission`))})))},rh=({optionName:t,optionValue:a,showValueName:r=!0,sku:n})=>{const{vltData:i}=xl();return Gl[n]?e.createElement(ah,{optionValue:a,sku:n,optionName:t,showValueName:r}):e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},r&&e.createElement(e.Fragment,null,t&&e.createElement("span",null,t,":")," ",a)),i?.condition&&e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpBuyBoxSelectedInfo-specs"},e.createElement("img",{className:"pdpBuyBoxLightIcon",src:th[i?.condition?.iconClass],alt:"Icon Name"}),`${i.condition.description} - ${i.transmission} Light Transmission`),e.createElement("div",{className:"pdpBuyBoxSelectedInfo-description"},e.createElement("p",null,i.description))))},nh=[.5,1,1.5,2,2.5,3],ih=e=>{const t=new Intl.NumberFormat("en-US",{minimumFractionDigits:1,maximumFractionDigits:1}).format(e);return isNaN(t)?"":t},oh=({onChange:t,value:a})=>{const r=nh.includes(Number(a))?`${ih(a)} Magnification`:"Select Magnification";return e.createElement("div",{className:"pdpBuyBoxMagnification"},e.createElement("div",{className:"pdpBuyBoxMagnificationOptions"},nh.map((r=>e.createElement("div",{className:m("pdpBuyBoxMagnificationOption",{active:r===Number(a)}),key:r,role:"button",onClick:()=>t(r)},ih(r))))),e.createElement("div",{className:"pdpBuyBoxSelectedInfo"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-title"},r)))},lh=({availableForSale:t,inStockDesc:a,backInStockDate:r,backInStockDesc:n})=>t&&a?e.createElement("div",{className:"pdpBuyBoxPrice-shipping"},a):n&&r?e.createElement("div",{className:"pdpBuyBoxPrice-shipping outOfStock"},n.replace(/\{[a-zA-Z]+\}/gu,r)):null,sh={product_carousel:Zp,product_carousel_group:e=>e.primary.group_document.data?.slices?.flatMap(Zp)},ch=(e,t)=>{if(!t)return!1;const a=parseFloat(e.amount),r=parseFloat(t.amount);return a!==r&&a<r},dh=({children:t,isOpen:a,setIsOpen:r,className:n})=>e.createElement("div",{className:m("modalGeneric",n,{isOpen:a})},e.createElement("div",{className:m("modalGenericContent",{isOpen:a})},e.createElement("div",{className:"modelGenericClose",onClick:()=>r(!a)}),t)),mh="Small",uh="Regular",ph="XL",fh="Extra Small",hh="Small",vh="Medium",gh="Large",bh="Extra Large",yh="Extra Extra Large",Eh={[fh]:"xs",[hh]:"s",[vh]:"m",[gh]:"l",[bh]:"xl",[yh]:"xxl"},Ch=[mh,uh,ph],wh=[fh,hh,vh,gh,bh],xh=({optionName:t,optionValues:a,setSelectedVariant:r,isEyewear:n})=>("Size"===t&&a.sort(((e,t)=>((e,t,a)=>{const r=a?Ch:wh;return r.findIndex((t=>e.value.includes(t)))-r.findIndex((e=>t.value.includes(e)))})(e,t,n))),e.createElement("div",{role:"radiogroup",className:m("pdpBuyBoxToggle",{"pdpBuyBoxToggle--accessories":!n})},a.map((({variant:t,option:a,isActive:i})=>{const[o,l]=(s=a.value).includes(mh)?[mh,"Best fit for narrow faces."]:s.includes(uh)?[uh,"Best fit for most faces."]:s.includes(ph)?[ph,"Best fit for wider faces."]:["",""];var s;const{availableForSale:c}=t,d=!c;return e.createElement("span",{key:a.value,className:"pdpBuyBoxToggleLink",onClick:()=>r(t)},e.createElement("button",{role:"radio","aria-checked":i,type:"button",className:m({active:i,disabled:d})},n?e.createElement(e.Fragment,null,o,l&&" ",e.createElement("span",null,l)):e.createElement(Un,{src:`https://img.roka.com/customizer/eyewear/img/swatches/size-${Eh[a.value]}.png`,alt:a.value,width:32,height:32})),d&&e.createElement("div",{className:"pdpBuyBoxSwatchOos"}))})))),kh=({optionValues:t,setSelectedVariant:a})=>e.createElement("div",{className:"pdpBuyBoxThumbnails"},t.map((({variant:t,option:r,isActive:n})=>{if(!t)return null;const{availableForSale:i}=t;return e.createElement("div",{key:r.name+r.value,"data-option-name":r.name,className:m("pdpBuyBoxThumbnail",{active:n,disabled:!i})},e.createElement("span",{onClick:()=>a(t)},r.value))}))),Sh=({optionName:t,optionValues:a,setSelectedVariant:r})=>{const n=`variant-${t.toLowerCase().replace(/\s+/g,"-")}`,i=Object.fromEntries(a.map((({option:e,variant:t})=>[e.value,t])));return e.createElement("div",{className:"pdpBuyBoxConfigs"},e.createElement("div",{className:"pdpBuyBoxConfig"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("span",null,e.createElement("label",{htmlFor:n},t))),e.createElement("div",{className:"pdpBuyBoxConfigSelect"},e.createElement("select",{name:t,id:n,"aria-label":`Select ${t}`,onChange:e=>r(i[e.target.value])},a.map((({variant:t,option:a,isActive:r})=>{if(!t)return null;const{availableForSale:n}=t;return e.createElement("option",{key:a.name+a.value,value:a.value,"data-option-name":a.name,className:m("pdpBuyBoxThumbnail",{active:r,disabled:!n})},a.value)}))))))},Nh=({optionValues:t,setSelectedVariant:a})=>e.createElement("div",{className:"pdpBuyBoxAmount"},e.createElement("div",{className:"pdpBuyBoxAmountOptions"},t.map((t=>e.createElement("div",{className:m("pdpBuyBoxAmountOption",{active:t.isActive}),key:t.value,role:"button",onClick:()=>a(t.variant)},t.value))))),Lh=({optionValues:t,setSelectedVariant:a})=>{const r=Object.fromEntries(nh.map((e=>[e,t.find((t=>Number(t.value)===e))?.variant]))),n=t?.find((({isActive:e})=>e))?.value;return e.createElement(oh,{onChange:e=>{const t=r[Number(e)];t&&a(t)},value:n})},Th=t=>{const{optionName:a,optionValues:r,setSelectedVariant:n,selectedVariant:i}=t,o=r.find((e=>e.isActive)),l="Lens Color"===a;return e.createElement("div",{className:"pdpBuyBoxConfig"},e.createElement("div",{className:m("pdpBuyBoxConfigTitle","active")},e.createElement("span",null,a,":")," ",o.value," "),e.createElement("div",{role:"radiogroup",className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},r.map((t=>{const r=Jo(t.value);return e.createElement("button",{role:"radio","aria-checked":t.isActive,key:t.value,className:m("pdpSwatch",r,{active:t.isActive}),onClick:()=>n(t.variant),"data-sku":t.variant.sku,"data-vid":t.variant.id,"aria-label":`${a}: ${t.value}`})}))),l&&e.createElement(rh,{showValueName:!1,optionValue:o.value,sku:i.sku}))},Ph=["size","color","frame color","lens color"],Mh=e=>{const t=Ph.findIndex((t=>t===e.toLowerCase()));return-1===t?999:t},Ah=({optionGroups:t,selectedVariant:a,setSelectedVariant:r,showCustomToggle:n,setIsCustomModeEnabled:i,relatedRxSunProductPageUrl:o,isEyewear:l})=>{const s=t.sort(((e,t)=>Mh(e.title)-Mh(t.title))),c={setSelectedVariant:r,selectedVariant:a,showCustomToggle:n,setIsCustomModeEnabled:i,relatedRxSunProductPageUrl:o,isEyewear:l},d=s.find((e=>"Size"===e.title)),m=s.filter((e=>"Size"!==e.title));return e.createElement(e.Fragment,null,d&&e.createElement(xh,h({key:d.title},c,{optionName:d.title,optionValues:d.values})),e.createElement("div",{className:"pdpBuyBoxConfigs"},m.map((t=>e.createElement(Th,h({key:t.title},c,{optionName:t.title,optionValues:t.values}))))))},_h=({showCustomToggle:t,setIsCustomModeEnabled:a})=>t?e.createElement("button",{className:"pdpBuyBoxThumbnail pdpBuyBoxThumbnail-icon",onClick:()=>{a(!0)},"aria-label":"Enable full customization mode"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom.svg",alt:"CUSTOM Icon"})):null,Bh=({variant:t})=>t?.metafields?.custom?.ltd_description?.value?e.createElement("div",{className:"pdpBuyBoxSelectedInfo pdpBuyBoxSelectedInfo--ltd"},e.createElement("div",{className:"pdpBuyBoxSelectedInfo-description"},e.createElement("p",null,t?.metafields?.custom?.ltd_description?.value))):null,Fh=({relatedRxSunProductPageUrl:t})=>t?e.createElement("a",{href:t,className:"pdpBuyBoxThumbnail pdpBuyBoxThumbnail-icon","aria-label":"Shop this style in prescription sunglasses"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-rx-sun-black.svg",alt:"RX Sun Icon"})):null,Oh=({optionName:t,optionValues:a,setSelectedVariant:r,selectedVariant:n,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l})=>{const{rokaProductConfig:s}=xl();return e.createElement("div",{role:"radiogroup",className:"pdpBuyBoxThumbnails"},a.map((({variant:a,option:c,isActive:d,image:u},p,f)=>{if(!a)return null;const{availableForSale:h}=a,v=!h,g=p===f.length-1;if(g&&!a)return e.createElement(rh,{key:c.name+c.value,optionName:c.name,optionValue:n.selectedOptions.find((e=>e.name)).value,sku:n.sku});const b=u?.thumbUrl,y=s?.badges?.[a.id]?.badgeCodes?.includes?.("ltd")||"true"===a?.metafields?.custom?.is_ltd_product?.value,E=v?`${c.value} is unavailable`:c.value;return e.createElement(e.Fragment,{key:c.name+c.value},e.createElement("button",{role:"radio","aria-checked":d,tabIndex:"0",className:m("pdpBuyBoxThumbnail",{active:d,disabled:v}),"data-sku":a.sku,"data-id":a.id,onClick:()=>r(a)},e.createElement("span",null,y&&e.createElement("div",{className:"pdpBuyBoxThumbnail-badgeLTD"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-ltd-black.svg",alt:"LTD Limited Edition Logo"})),b?e.createElement("img",{src:u?.thumbUrl,alt:c.value,"aria-label":E}):c.value),v&&e.createElement("div",{className:"pdpBuyBoxSwatchOos"})),g&&e.createElement(e.Fragment,null,e.createElement(_h,{showCustomToggle:i,setIsCustomModeEnabled:o}),e.createElement(Fh,{relatedRxSunProductPageUrl:l}),e.createElement(rh,{optionName:c.name,optionValue:n?.selectedOptions.find((e=>e.name===t))?.value,sku:n.sku}),e.createElement(Bh,{variant:n})))})))},Ih=["color","design","frame color"],Dh=["size"],Rh=["magnification"],zh=["series","frame name"],Hh=["amount"],Gh=["size","color","frame color","lens color","magnification"],Vh=["color","size"],jh=(e,t)=>{const a=(t?Gh:Vh).findIndex((t=>t===e.toLowerCase()));return-1===a?999:a},$h=({galleryRef:t})=>{const{isVtoActive:a,startVto:r}=xl(),n=e.useRef(null),[i,o]=e.useState(),l=e.useRef(!1),[s,c]=e.useState(!1),[d,u]=e.useState(),[p,f]=e.useState(),[h,v]=e.useState();return e.useEffect((()=>{l.current=s}),[s]),e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{if(n.current&&!l.current){const e=n.current.getBoundingClientRect();o(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e.useEffect((()=>{if("undefined"==typeof window)return;const e=()=>{if(!t.current||!n.current)return;const e=t.current.getBoundingClientRect(),a=(()=>{for(const e of document.querySelectorAll("header"))if(e.querySelector(".headerPrimary"))return e;return null})()?.getBoundingClientRect?.(),r=window.innerWidth>1150&&a?a.height:0,o=Math.max(e.top,r),l=window.innerWidth>760?20:12,s=Math.floor(o+l),d=s+80;let m=0;const p=window.innerWidth;p>760&&p<=1150?m=3:p>1150&&p<=1200?m=4:p>1200&&(m=3);const h=i?Math.floor(i.left+i.width/2)-m:0;c(e.top<o&&e.bottom>d),u(s),f(h)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[t,i]),e.useEffect((()=>{v(s?{left:p,top:d}:void 0)}),[p,d,s]),a?null:e.createElement("div",{ref:n,className:m("pdpGalleryVtoLogo",s&&"pdpGalleryVtoLogo--fixed"),role:"button",onClick:e=>{e?.stopPropagation?.(),r()},style:h},e.createElement("svg",{"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 205 36"},e.createElement("defs",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n .cls-1 {\n fill: #231f20;\n }\n\n .cls-2 {\n fill: #fff;\n }\n "}})),e.createElement("path",{className:"cls-1",d:"M187,36H18C8.06,36,0,27.94,0,18S8.06,0,18,0h169c9.94,0,18,8.06,18,18s-8.06,18-18,18Z"}),e.createElement("g",null,e.createElement("g",null,e.createElement("path",{className:"cls-2",d:"M161.37,10.79s-2.51.07-2.88.07-1.79-.78-2.96-1.03c-2.66-.59-6.06-.74-9.16-.59-3.84.18-8.28.89-9.16,1.03s-1.33.15-1.33.89v1.61c0,.46,0,.9.3,1.05s.74.59.89,1.63.96,5.51,1.77,7.54c.59,1.48,1.48,2.66,3.1,3.1s4.29.74,6.95.74,4.43-.59,5.62-1.33,2.36-2.51,3.25-4.73c.3-.74,1.33-4.43,1.48-4.88s.44-1.48,1.03-1.63,1.11-.15,1.11-.15v-3.33Z"}),e.createElement("g",null,e.createElement("path",{className:"cls-1",d:"M147.89,25.64c-.5,0-.99-.02-1.48-.06-2.19-.18-3.82-.55-4.99-1.13-1.02-.51-1.57-1.93-1.96-3.24-.4-1.35-.72-4.37-.72-6.06,0-1.5.55-2.5,1.09-2.82.63-.38,2.21-.74,3.85-.89,1.23-.11,2.57-.17,3.78-.17.46,0,.9,0,1.33.03,1.61.07,5.15.36,7.04.94,1.35.41,1.76,1.54,1.43,3.88-.27,1.9-.82,3.79-1.58,5.48-.72,1.57-1.19,2.61-2.71,3.3-.99.44-3.07.75-5.07.75h0Z"}),e.createElement("path",{className:"cls-2",d:"M147.46,11.76c.45,0,.89,0,1.31.03,1.84.08,5.2.39,6.92.92.92.28,1.42.94,1.08,3.34-.26,1.85-.8,3.7-1.55,5.34-.75,1.65-1.17,2.47-2.46,3.05-.76.34-2.61.71-4.87.71-.5,0-.98-.02-1.44-.06-2.12-.17-3.7-.52-4.81-1.08-.85-.43-1.34-1.73-1.71-2.94-.39-1.31-.7-4.26-.7-5.92,0-1.3.44-2.15.84-2.39.48-.29,1.88-.66,3.64-.82,1.21-.11,2.54-.17,3.73-.17M147.46,10.76c-1.28,0-2.63.07-3.82.18-1.63.15-3.33.52-4.06.96s-1.33,1.63-1.33,3.25.3,4.73.74,6.21c.44,1.48,1.03,2.96,2.22,3.55s2.81.99,5.17,1.18c.5.04,1.01.06,1.52.06,2.14,0,4.25-.33,5.28-.8,1.67-.75,2.22-1.92,2.96-3.55.74-1.63,1.33-3.55,1.63-5.62.3-2.07.15-3.84-1.77-4.43s-5.47-.89-7.17-.96c-.43-.02-.89-.03-1.35-.03h0Z"})),e.createElement("path",{className:"cls-2",d:"M161.17,10.79s2.51.07,2.88.07,1.79-.78,2.96-1.03c2.66-.59,6.06-.74,9.16-.59,3.84.18,8.28.89,9.16,1.03s1.33.15,1.33.89v1.61c0,.46,0,.9-.3,1.05s-.74.59-.89,1.63-.96,5.51-1.77,7.54c-.59,1.48-1.48,2.66-3.1,3.1s-4.29.74-6.95.74-4.43-.59-5.62-1.33-2.36-2.51-3.25-4.73c-.3-.74-1.33-4.43-1.48-4.88s-.44-1.48-1.03-1.63-1.11-.15-1.11-.15v-3.33Z"}),e.createElement("g",null,e.createElement("path",{className:"cls-1",d:"M174.65,25.64c-2,0-4.09-.31-5.07-.75-1.52-.68-1.99-1.72-2.71-3.3-.77-1.69-1.31-3.58-1.58-5.48-.34-2.35.08-3.47,1.42-3.88,1.89-.58,5.43-.87,7.04-.94.43-.02.87-.03,1.33-.03,1.21,0,2.55.06,3.78.17,1.64.15,3.23.52,3.85.89.54.32,1.09,1.32,1.09,2.82,0,1.7-.31,4.71-.72,6.06-.4,1.32-.94,2.73-1.96,3.24-1.17.58-2.8.95-4.99,1.13-.49.04-.99.06-1.48.06Z"}),e.createElement("path",{className:"cls-2",d:"M175.08,11.76c1.19,0,2.52.06,3.73.17,1.76.16,3.16.53,3.64.82.41.24.84,1.1.84,2.39,0,1.66-.3,4.61-.7,5.92-.36,1.21-.85,2.51-1.71,2.94-1.11.55-2.68.91-4.81,1.08-.46.04-.94.06-1.44.06-2.26,0-4.11-.37-4.87-.71-1.29-.58-1.71-1.4-2.46-3.05-.75-1.64-1.28-3.49-1.55-5.34-.34-2.4.16-3.05,1.08-3.34,1.71-.53,5.07-.84,6.92-.92.42-.02.86-.03,1.31-.03M175.08,10.76c-.46,0-.92,0-1.35.03-1.7.07-5.25.37-7.17.96s-2.07,2.36-1.77,4.43c.3,2.07.89,3.99,1.63,5.62.74,1.63,1.29,2.8,2.96,3.55,1.03.46,3.13.8,5.28.8.51,0,1.02-.02,1.52-.06,2.36-.19,3.99-.59,5.17-1.18s1.77-2.07,2.22-3.55c.44-1.48.74-4.58.74-6.21s-.59-2.81-1.33-3.25-2.44-.81-4.06-.96c-1.19-.11-2.55-.18-3.82-.18h0Z"}))),e.createElement("g",null,e.createElement("path",{className:"cls-2",d:"M23.44,23.34h-1.95l-3.15-9.81h1.83l2.31,7.96,2.33-7.96h1.78l-3.15,9.81Z"}),e.createElement("path",{className:"cls-2",d:"M28.09,13.53h1.68v9.81h-1.68v-9.81Z"}),e.createElement("path",{className:"cls-2",d:"M37.62,23.34l-1.82-3.66h-1.99v3.66h-1.68v-9.81h5.04c1.33,0,1.96.63,1.96,1.96v2.18c0,1.18-.49,1.81-1.53,1.93l1.83,3.73h-1.82ZM36.92,18.18c.39,0,.53-.14.53-.53v-2.07c0-.38-.14-.52-.53-.52h-3.11v3.12h3.11Z"}),e.createElement("path",{className:"cls-2",d:"M44.76,15.06v8.28h-1.68v-8.28h-2.77v-1.53h7.24v1.53h-2.79Z"}),e.createElement("path",{className:"cls-2",d:"M56.17,21.38c0,1.33-.63,1.96-1.96,1.96h-3.26c-1.33,0-1.96-.63-1.96-1.96v-7.84h1.68v7.75c0,.38.14.52.52.52h2.77c.39,0,.53-.14.53-.52v-7.75h1.68v7.84Z"}),e.createElement("path",{className:"cls-2",d:"M59.87,20.94l-.74,2.4h-1.77l3.19-9.81h2.34l3.19,9.81h-1.85l-.74-2.4h-3.63ZM61.69,15.04l-1.34,4.36h2.69l-1.34-4.36Z"}),e.createElement("path",{className:"cls-2",d:"M69.23,13.53v8.26h4.44v1.54h-6.12v-9.81h1.68Z"}),e.createElement("path",{className:"cls-2",d:"M81.68,15.06v8.28h-1.68v-8.28h-2.77v-1.53h7.24v1.53h-2.79Z"}),e.createElement("path",{className:"cls-2",d:"M91.52,23.34l-1.82-3.66h-1.99v3.66h-1.68v-9.81h5.04c1.33,0,1.96.63,1.96,1.96v2.18c0,1.18-.49,1.81-1.53,1.93l1.83,3.73h-1.82ZM90.82,18.18c.39,0,.53-.14.53-.53v-2.07c0-.38-.14-.52-.53-.52h-3.11v3.12h3.11Z"}),e.createElement("path",{className:"cls-2",d:"M97.25,23.34v-3.39l-3.29-6.42h1.82l2.33,4.68,2.33-4.68h1.79l-3.29,6.42v3.39h-1.68Z"}),e.createElement("path",{className:"cls-2",d:"M108.36,23.34c-1.33,0-1.96-.63-1.96-1.96v-5.88c0-1.33.63-1.96,1.96-1.96h3.43c1.33,0,1.96.63,1.96,1.96v5.88c0,1.33-.63,1.96-1.96,1.96h-3.43ZM108.08,21.28c0,.38.14.52.52.52h2.96c.38,0,.52-.14.52-.52v-5.69c0-.38-.14-.52-.52-.52h-2.96c-.38,0-.52.14-.52.52v5.69Z"}),e.createElement("path",{className:"cls-2",d:"M123.49,13.53v9.81h-1.65l-4.31-7.17v7.17h-1.62v-9.81h1.78l4.19,6.98v-6.98h1.62Z"})))))},Wh={oos:{classSuffix:"out",text:"Out of Stock"},sale:{classSuffix:"sale",text:"Sale"},new:{classSuffix:"new",text:"New"},ltd:{classSuffix:"ltd",text:"LTD"}},Uh=({url:t,altText:a,title:r})=>e.createElement("img",{src:t,alt:a,title:r}),Kh=({altText:t,isPreview:a,previewImage:r,sources:n})=>e.createElement(e.Fragment,null,a&&e.createElement("div",{className:"pdpGalleryImageVideoPreview"},e.createElement("img",{src:r.url,alt:t}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"pdpGalleryImageVideoPreviewPlayButton"})),!a&&e.createElement("video",{controls:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",poster:r?.url},n.map((({url:t,mimeType:a})=>e.createElement("source",{key:t,src:t,type:a}))))),qh=({altText:t,embedUrl:a,isPreview:r,previewImage:n})=>e.createElement(e.Fragment,null,r&&e.createElement("div",{className:"pdpGalleryImageVideoPreview"},e.createElement("img",{src:n.url,alt:t}),e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-play-white.svg",alt:"Play video",className:"pdpGalleryImageVideoPreviewPlayButton"})),!r&&e.createElement("iframe",{src:a,title:"Video player",allow:"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin"})),Zh=t=>{switch(t.mediaContentType){case"EXTERNAL_VIDEO":return e.createElement(qh,t);case"VIDEO":return e.createElement(Kh,t);default:return e.createElement(Uh,t)}};var Yh=Object.freeze({__proto__:null,AcknowledgeFeature:({children:t,onChange:a,warn:r=!1})=>e.createElement("div",{className:m("pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--acknowledge",{warn:r})},e.createElement("input",{type:"checkbox",id:"acknowledge",name:"acknowledge",onChange:a}),e.createElement("label",{htmlFor:"acknowledge"},t)),BuyBoxAccordions:()=>e.createElement("div",{className:"pdpBuyBoxAccordions"},e.createElement(Jp,null,e.createElement(nf,null),e.createElement(Qp,null),e.createElement(af,null),e.createElement(tf,null),e.createElement(ef,null))),BuyBoxCustomizerBackButton:({onClick:t})=>e.createElement("div",{className:"pdpBuyBoxConfigsTitle"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-custom-horizontal.svg",alt:"CUSTOM Horizontal Icon",width:"96",height:"23"}),e.createElement("button",{className:"pdpBuyBoxConfigsBack",onClick:t}," ","Back to All Colors")),BuyBoxCustomizerSwatchesAccordion:()=>{const{partsProducts:t,selectPart:a,selectedVariantIds:r,isApex:n}=Yf(),[i,o]=e.useState(t?t.reduce(((e,t,a)=>(e[a]=0===a,e)),{}):[]);return t?e.createElement(e.Fragment,null,t.map(((t,l)=>{const s=i[l];return e.createElement("div",{key:t.id,className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement(Jf,{isActive:s,isApex:n,toggle:()=>{const e={...i};e[l]=!e[l],o(e)},partProduct:t,selectPart:a,selectedVariantIds:r}))}))):null},BuyBoxDisclaimer:({productTags:t,additionalData:a,globalSettings:r})=>{if(!t)return null;if(a?.disclaimer?.text)return e.createElement(Xf,{style:a.disclaimer.style?.toLowerCase()||void 0,text:a.disclaimer.text,title:a.disclaimer.title});const n=r?.disclaimers?.find((e=>t.includes(e.tag)));if(n)return e.createElement(Xf,{style:n.style?.toLowerCase()||void 0,text:n.text,title:n.title});const i=t.find((e=>Qf[e]));if(i){const t=Qf[i];return e.createElement(t,null)}return null},BuyBoxGiftCardForm:({onChange:t})=>{const a=e=>{const{name:a,value:r}=e.target;t?.(a,r)};return e.createElement("div",{className:"pdpBuyBoxGiftCardForm"},e.createElement("form",{className:"formInsetLabels"},e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"recipient-email"},"Recipient Email *"),e.createElement("input",{type:"email",id:"recipient-email",name:"Recipient email",onChange:a,required:!0})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"recipient-name"},"Recipient Name"),e.createElement("input",{type:"text",id:"recipient-name",name:"Recipient name",onChange:a,maxLength:255})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"message"},"Message"),e.createElement("textarea",{id:"message",name:"Message",onChange:a,maxLength:200,rows:4})),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"send-date"},"Send on"),e.createElement("input",{type:"date",id:"send-date",name:"Send on",onChange:a,min:(new Date).toISOString().split("T")[0],max:new Date(Date.now()+7776e6).toISOString().split("T")[0]})),e.createElement("input",{type:"hidden",name:"__shopify_send_gift_card_to_recipient",value:"true",onChange:a})))},BuyBoxLensSpecs:rh,BuyBoxMagnifications:oh,BuyBoxPrice:({displayAsFromBaseLensPrice:t,displayAsFromPrice:a,availableForSale:r,price:n,compareAtPrice:i,stock:o,saleTimer:l})=>{const s=ch(n,i),c=(e=>{if(!e)return;const t=e.time_zone.substring(3),a=e.end_time.substring(0,19),r=new Date(`${a}${t}`),n=new Date;let i,o=Math.max((r-n)/1e3,0);if(o<=0)return;if(e.convert_days){const e=Math.floor(o/86400);o-=86400*e;const t=Math.floor(o/3600);o-=3600*t;const a=Math.floor(o/60);o-=60*a,i=`${e} days, ${t} hrs, ${a} minutes`}else{const e=Math.floor(o/3600);o-=3600*e;const t=Math.floor(o/60);o-=60*t,i=`${e} hrs, ${t} minutes`}return e.timer_text.replace("[timer]",i)})(l);return e.createElement("div",{className:m("pdpBuyBoxPrice",{"pdpBuyBoxPrice--sale":s})},e.createElement("div",{className:"pdpBuyBoxPrice-amount"},a&&e.createElement(e.Fragment,null,e.createElement("span",null,"From")," ",s&&e.createElement("span",{className:"strikethru"},i.withoutTrailingZeros)," ",n.withoutTrailingZeros,t&&e.createElement(e.Fragment,null," ",e.createElement("span",null,"with base lens"))),!a&&e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"strikethru"},i.withoutTrailingZeros)," ",n.withoutTrailingZeros)),c&&e.createElement("div",{className:"pdpBuyBoxPrice-countdown"},c),o&&e.createElement(lh,h({availableForSale:r},o)))},BuyBoxReassurances:({reassurances:t})=>{const[a,r]=e.useState(!1);if(!t||!t.length>0)return null;const n=t[0].items.map((t=>{const{popup_title:a,popup_text:r}=t;return e.createElement("div",{key:a,className:"pdpReassuranceItem"},e.createElement("h4",null,a),e.createElement("p",null,r.map((e=>e.text)).join("")))}));return e.createElement(e.Fragment,null,e.createElement(dh,{isOpen:a,setIsOpen:r,className:"reassurances"},n),e.createElement("div",{className:"pdpBuyBoxReassure",onClick:()=>r(!a)},e.createElement("ul",null,t[0].items.map(((t,a)=>{const{icon:r,icon_width:n,buybox_text:i}=t;return e.createElement("li",{key:a},e.createElement(Un,{style:{width:n},src:r.url,alt:r.alt}),i.map((({text:t})=>e.createElement(e.Fragment,null,t))).reduce(((t,a)=>null===t?a:e.createElement(e.Fragment,null,t," ",e.createElement("br",null)," ",a)),null))})))))},BuyBoxShopPayButton:({estimatedShipDate:t})=>e.createElement(e.Fragment,null,e.createElement("button",{className:"buttonShopPay"},"Buy With"," ",e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/icon-shoppay-white.svg",alt:"ShopPay Logo",width:"85",height:"23"})),t&&e.createElement("div",{className:"pdpBuyBoxDisclaimer pdpBuyBoxDisclaimer--preOrder"},e.createElement("p",null,"Expected to ship ",t))),BuyBoxSizeSelector:()=>e.createElement("div",{className:"pdpBuyBoxToggle"},e.createElement("button",{className:"active"},"Small ",e.createElement("span",null,"Best fit for narrow faces.")),e.createElement("button",null,"Regular ",e.createElement("span",null,"Best fit for most faces.")),e.createElement("button",null,"XL ",e.createElement("span",null,"Best fit for wider faces."))),BuyBoxSwatchesAccordion:()=>e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:"https://www.roka.com/cdn/shop/files/frame.png",alt:""}),e.createElement("span",null,"Color:")," Crystal Grey"),e.createElement("div",{className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},e.createElement("div",{className:"pdpSwatch black active"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch tortoise"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch matte-white"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch urban-grey"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch gold-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch silver-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch orange"},"Name of Swatch"))),e.createElement("div",{className:"pdpBuyBoxConfig pdpBuyBoxConfig-accordion"},e.createElement("div",{className:"pdpBuyBoxConfigTitle"},e.createElement("img",{className:"pdpBuyBoxConfigIcon",src:"https://www.roka.com/cdn/shop/files/frame.png",alt:""}),e.createElement("span",null,"Color:")," Crystal Grey"),e.createElement("div",{className:"pdpBuyBoxConfigOptions pdpBuyBoxConfigSwatches"},e.createElement("div",{className:"pdpSwatch black active"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch tortoise"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch matte-white"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch urban-grey"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch gold-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch silver-frost"},"Name of Swatch"),e.createElement("div",{className:"pdpSwatch orange"},"Name of Swatch")))),BuyBoxTitle:({header:t="",subHeaders:a=[]})=>e.createElement("div",{className:"pdpBuyBoxTitle"},e.createElement("h1",null,t),a.map(((t,a)=>e.createElement("p",{key:t},t)))),BuyBoxVariantSelector:t=>{const{optionGroups:a,selectedVariant:r,setSelectedVariant:n,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l,isRxSunProduct:s=!1,isEyewear:c=!0}=t,d=a.sort(((e,t)=>jh(e.title,c)-jh(t.title,c))),m={setSelectedVariant:n,selectedVariant:r,showCustomToggle:i,setIsCustomModeEnabled:o,relatedRxSunProductPageUrl:l,isEyewear:c};return s?e.createElement(Ah,t):e.createElement(e.Fragment,null,d.filter((({title:e,values:t})=>t.length>1||e.match(/color/i)||"color"===e?.toLowerCase?.())).map((t=>{const{title:a,values:r}=t,n={...m,optionName:a,optionValues:r};return i=a,Dh.includes(i.toLowerCase())?e.createElement(xh,h({key:a},n)):(e=>Ih.includes(e.toLowerCase()))(a)?e.createElement(Oh,h({key:a},n)):(e=>Rh.includes(e.toLowerCase()))(a)?e.createElement(Lh,h({key:a},n)):(e=>zh.includes(e.toLowerCase()))(a)?e.createElement(Sh,h({key:a},n)):(e=>Hh.includes(e.toLowerCase()))(a)?e.createElement(Nh,h({key:a},n)):e.createElement(kh,h({key:a},n));var i})))},BuyBoxVariantSelectorButtons:xh,BuyBoxVariantSelectorSwatches:Th,BuyBoxVariantSelectorThumbnails:Oh,BuyBoxVtoButton:()=>{const{isVtoActive:t,startVto:a,stopVto:r,isVtoEnabled:n}=xl();return n?e.createElement("div",{role:"button",className:"pdpBuyBoxVTO",onClick:()=>{t?r():a()}},e.createElement("img",{className:"pdpBuyBoxVTO-script",src:"https://img.roka.com/customizer/eyewear/img/vto/try-on-handwritten-text.png",alt:"virutal try on"}),e.createElement("p",null,"Try on virtually and have the confidence to get them IRL."),e.createElement("img",{className:"pdpBuyBoxVTO-animation",src:"https://img.roka.com/customizer/eyewear/img/vto/vto_rx_video.gif",alt:"gif of people wearing various eyeglasses"})):null},Gallery:({images:t=[],badges:a=[]})=>{const[r,n]=e.useState(-1),[i,o]=e.useState(!1),{isVtoActive:l,isVtoEnabled:s}=xl(),c=e.useRef(null),d=e.useRef(null);return e.useEffect((()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(max-width: 767px)");o(e.matches)}),[]),e.useEffect((()=>{-1!==r?document.body.classList.add("hasPdpGalleryLightbox"):document.body.classList.remove("hasPdpGalleryLightbox")}),[r]),e.useEffect((()=>()=>{document.body.classList.remove("hasPdpGalleryLightbox")}),[]),e.useEffect((()=>{i&&l&&d.current&&d.current.slideTo(0)}),[l,i]),e.createElement(e.Fragment,null,e.createElement("div",{className:"pdpGallery"},s&&e.createElement($h,{galleryRef:c}),a.length>0&&!l&&e.createElement("div",{className:"pdpGalleryBadges"},a.map((t=>{const a=Wh[t];if(!a)return;const{classSuffix:r,text:n}=a;return e.createElement("div",{key:n,className:`pdpGalleryBadge-${r}`},n)}))),i?e.createElement(Ko,{modules:[Wi],spaceBetween:20,scrollbar:{draggable:!0,el:".carouselControlsArrowDrag"},slidesPerView:1,wrapperClass:"pdpGalleryImages",ref:d,onSwiper:e=>d.current=e},s&&e.createElement(qo,{className:m("pdpGalleryImage",{hidden:!l})},e.createElement(kl,null)),t.map((t=>e.createElement(qo,{key:t.id,className:"pdpGalleryImage"},e.createElement(Zh,t)))),e.createElement("div",{slot:"container-end"},e.createElement("div",{className:"carouselControls"},e.createElement("div",{className:"carouselControlsArrowDrag"})))):e.createElement(e.Fragment,null,e.createElement(kl,null),e.createElement("div",{className:"pdpGalleryImages",ref:c},t.map(((t,a)=>e.createElement("div",{key:t.id,className:m("pdpGalleryImage",{"pdpGalleryImage--half":0!==a,"pdpGalleryImage--lifestyle":!1}),role:"button",onClick:()=>n(a)},e.createElement(Zh,h({},t,{isPreview:!0})))))))),-1!==r&&e.createElement("div",{className:"pdpGalleryLightbox"},e.createElement("div",{className:"pdpGalleryLightboxClose",onClick:()=>n(-1)},e.createElement("button",{type:"button",className:"buttonClear"},"Close")),e.createElement(Ko,{direction:"vertical",modules:[zi,Hi,Wi],spaceBetween:20,scrollbar:{draggable:!0,el:".lightboxCarouselControlsArrowDrag"},keyboard:{enabled:!0},mousewheel:{enabled:!0},slidesPerView:1,wrapperClass:"pdpGalleryLightboxSwiper",initialSlide:r},t.map((t=>e.createElement(qo,{key:t.id,className:"pdpGalleryLightboxSwiperSlide"},e.createElement(Zh,t)))),e.createElement("div",{slot:"container-end"},e.createElement("div",{className:"lightboxCarouselControls"},e.createElement("div",{className:"lightboxCarouselControlsArrowDrag"}))))))}});const Jh={ambassadors_grid:()=>e.createElement("div",{"data-slice-name":"AmbassadorsGrid"},"AmbassadorsGrid"),banner_grid:Kn,banner_image:t=>{const a=Zn[t.slice.variation];if(!a)throw new Error(`No BannerImage component found for variation ${t.slice.variation}`);return e.createElement(a,t)},collection_marketing_tile:il,collection_products:t=>{const{slice:a}=t,r=qp[a.variation];if(!r)throw new Error(`No CollectionProducts component found for variation ${a.variation}`);return e.createElement("section",{"data-slice-type":a.slice_type,"data-slice-variation":a.variation},e.createElement(r,{slice:a}))},contact_us:()=>e.createElement("div",{"data-slice-name":"ContactUs"},"ContactUs"),email_signup:pl,foursixty_slider:El,hashtag_banner:({slice:t})=>{const{image:a,title:r}=t.primary;return e.createElement("div",{className:"hashtagBanner hashtagBanner--zombie"},e.createElement("div",{className:"hashtagBannerContent"},r),e.createElement("div",{className:"hashtagBannerCoverImage"},e.createElement("img",{src:a.url,alt:a.alt})))},image_grid:Sl,image_link_carousel:Ll,ironman_calendar:()=>e.createElement("div",{"data-slice-name":"IronmanCalendar"},"IronmanCalendar"),lens_tints:ns,navigation_item:ds,pagehero:Ss,product_cards:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productCards productCards--upsell","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductCards"},e.createElement("h2",null,r),e.createElement("div",{className:"productCardsItems"},a.map(((t,a)=>{const{description:r,image:n,image_hover:i,link:o,price:l,status:s,title:c,variant_info:d}=t;return e.createElement("div",{className:"productCard",key:`${o.url}-${a}`},e.createElement("a",{href:o.url},s&&e.createElement("div",{className:"productCard-status"},s),e.createElement("div",{className:"productCard-images"},e.createElement(Un,{src:n.url,alt:n.alt}),e.createElement(Un,{src:i.url,alt:i.alt})),e.createElement("div",{className:"productCard-content"},c&&e.createElement("h3",null,c),e.createElement("p",{className:"productCard-description"}," ",r," "),e.createElement("p",{className:"productCard-colors"},d),e.createElement("p",{className:"productCard-price"},l))))}))))},product_carousel_group:_s,product_comparison:({slice:t})=>{const{products:a,subtitle:r,title:n}=t.primary;return e.createElement("div",{className:"productComparison","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductComparison"},e.createElement("div",{className:"productComparisonIntro"},e.createElement("h2",null,n),e.createElement("p",null,r)),e.createElement("div",{className:"productComparisonItems"},a.map(((t,a)=>{const{description:r,image:n,subtitle:i,title:o}=t;return e.createElement("div",{className:"productComparisonItem",key:a},e.createElement(Un,{src:n.url,alt:n.alt}),e.createElement("h3",null,o),e.createElement("h4",null,i),e.createElement("p",null,r))}))))},product_core_tech:t=>{const a=Fs[t.slice.variation];if(!a)throw new Error(`No ProductCoreTech component found for variation ${t.slice.variation}`);return e.createElement("div",{className:"productCoreTech-hotfix"},e.createElement("div",{className:m("productCoreTech","productCoreTechCarousel"===t.slice.variation&&"productCoreTech--carousel"),"data-slice-type":t.slice.slice_type,"data-slice-variation":t.slice.variation,"data-slice-name":"ProductCoreTech"},e.createElement("div",{className:"productCoreTechTitle"},e.createElement("h2",null,t.slice.primary.title)),e.createElement(a,t)))},product_info:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productLensInfo","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductInfo"},e.createElement("div",{className:"productLensInfoTitle"},e.createElement("h2",null,r)),e.createElement("div",{className:"productLensInfoItems"},a.map(((t,a)=>{const{content:r,icon:n,subtitle:i,title:o}=t;return e.createElement("div",{className:"productLensInfoItem",key:a},e.createElement(Un,{loading:"lazy",src:n.url,alt:n.alt}),e.createElement("h3",null,o),e.createElement("h4",null,i),e.createElement(Mn,{field:r}))}))))},product_infographic:({slice:t})=>{const{content:a,image:r,overlay_subtitle:n,overlay_title:i,subtitle:o,title:l}=t.primary;return e.createElement("div",{className:"productInfographic productInfographic--rise"},e.createElement("div",{className:"productInfographicContent"},e.createElement("h2",null,l),e.createElement("h3",null,o),e.createElement(Mn,{field:a})),e.createElement("div",{className:"productInfographicImage"},e.createElement("div",{className:"productInfographicImage-overlay"},e.createElement("span",null,i),e.createElement("br",null),n),e.createElement("img",{loading:"lazy",src:r.url,alt:r.alt})))},product_intro:({slice:t})=>{const{content:a,image:r,title:n}=t.primary;return e.createElement("div",{className:"productIntro","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductIntro"},e.createElement("div",{className:"productIntroImage"},e.createElement("img",{loading:"lazy",src:r.url,alt:r.alt})),e.createElement("div",{className:"productIntroContent"},e.createElement("div",{className:"productIntroContent-item"},e.createElement("h2",null,n),e.createElement(Mn,{field:a}))))},product_lifestyle:t=>{const a=Is[t.slice.variation];if(!a)throw new Error(`No ProductLifestyle component found for variation ${t.slice.variation}`);return e.createElement("div",{className:"productLifestyle","data-slice-type":t.slice.slice_type,"data-slice-variation":t.slice.variation,"data-slice-name":"ProductLifestyle"},zr(t.slice.primary.feature_image)&&e.createElement("div",{className:"productLifestyleFeature"},e.createElement("div",{className:"productLifestyleImage"},e.createElement(Un,{field:t.slice.primary.feature_image}))),e.createElement(a,t))},product_specs:({slice:t})=>{const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productSpecs","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductSpecs"},e.createElement("div",{className:"productSpecsTitle"},e.createElement("h2",null,r)),e.createElement("div",{className:"productSpecsItems"},a.map(((t,a)=>{const{content:r,image:n,title:i}=t;return e.createElement("div",{className:"productSpecsItem",key:a},e.createElement("div",{className:"productSpecsItem-image"},e.createElement("h3",null,i),e.createElement(Un,{src:n.url,alt:n.alt})),e.createElement(Mn,{field:r}))}))))},product_tech:({slice:t})=>{if("productTechRise"===t.variation)return e.createElement(Ds,{slice:t});const{items:a,title:r}=t.primary;return e.createElement("div",{className:"productTech","data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"ProductTech"},e.createElement("div",{className:"productTechTitle"},r&&e.createElement("h2",null,r)),e.createElement("div",{className:"productTechItems"},a.map(((t,a)=>{const{image:r,title:n}=t;return e.createElement("div",{className:"productTechItem",key:a},e.createElement("div",{className:"productTechItem-image"},e.createElement(Un,{loading:"lazy",src:r.url,alt:r.alt})),n&&e.createElement("div",{className:"productTechItem-title"},n))}))))},rich_text:({slice:t,...a})=>e.createElement("div",{"data-slice-name":"RichText",className:"standardContent"},e.createElement("div",{className:"standardContent-item"},e.createElement(Mn,{field:t.primary.content}))),sections_collection:()=>e.createElement("div",{"data-slice-name":"SectionsCollection"},"SectionsCollection"),statement:Fm,static_html:({slice:t})=>{const{html:a,visible:r}=t.primary;return r?e.createElement("div",{"data-slice-type":t.slice_type,"data-slice-variation":t.variation,"data-slice-name":"StaticHtml",dangerouslySetInnerHTML:{__html:a}}):null},webflow_assets:({slice:t})=>(e.useEffect((()=>{if(t.primary.page_id?.trim()&&t.primary.site_id?.trim()){const e=document.documentElement;e.setAttribute("data-wf-page",t.primary.page_id),e.setAttribute("data-wf-site",t.primary.site_id)}}),[t.primary.page_id,t.primary.site_id]),e.createElement(e.Fragment,null,t.primary.assets.map(((t,a)=>e.createElement(Rm,h({key:`${t.asset_url?.url}-${a}`},t)))))),video:jm},Xh={PageHeader:({customer:t,globalSettings:a,isLoggedIn:r,location:n,navigation:i,onSubmitQuery:o})=>{const{cart:l,isSidecartOpen:s,setIsSidecartOpen:c}=kr(),{query:d,results:u,setQuery:p,trackSearchAttribution:f}=_m(),[v,g]=e.useState(!1),[b,y]=e.useState(!1),E=e.useRef(null),[C,w]=e.useState(null),[x,k]=e.useState(null),[S,N]=e.useState(null),L=e.useCallback((()=>{if(a?.data?.sitewide_banner||Dr(a?.data?.sitewide_banner_structured)){const{sitewide_banner:r,sitewide_banner_link_color:n,sitewide_banner_structured:i,sitewide_sale_end_time:o}=a.data,l=o?(t=o)?24===t.length?new Date(t.replace(/(\+|-)(\d{2})(\d{2})$/,".000$1$2:$3")):new Date(t):null:null,s=l?(e=>{const t=new Date;let a=Math.max((e-t)/1e3,0);const r=Math.floor(a/3600);a-=3600*r;const n=Math.floor(a/60);return a-=60*n,`${r} hrs. ${n} minutes`})(l):null;let c;if(Dr(i)){const t=i?.map?.((e=>({...e,text:e.text?.replace("[timer]",s)})));c=e.createElement(Mn,{field:t,components:{hyperlink:Km(n),paragraph:qm}})}else c=r.replace("[timer]",s);e.startTransition((()=>{w(c)}))}var t}),[a?.data?.sitewide_banner,a?.data?.sitewide_sale_end_time]);e.useEffect((()=>{L();const e=setInterval(L,1e3);return()=>clearInterval(e)}),[L]),e.useEffect((()=>{const a=gr(t),r=vr(t);a&&r&&k(e.createElement("span",null,"You are now a part of team ",a,", enjoy ",r,"% off select products."))}),[t]),e.useEffect((()=>{t?.tags?.includes?.("PRO-PROGRAM-CUSTOMER")&&Dr(a?.data?.pro_program_banner)&&N(e.createElement(Mn,{field:a?.data?.pro_program_banner,components:{hyperlink:Km("#ffffff"),paragraph:qm}}))}),[t?.tags,a?.data?.pro_program_banner]),e.useEffect((()=>{b&&E.current&&E.current.focus()}),[b,E]);const T=e.useCallback((()=>c(!s)),[s,c]),P=e.useCallback((e=>{e.preventDefault(),e.stopPropagation(),o?.(e.target[0].value)}),[o]),M=si(l?.lines?.nodes),A=C||x||S;return e.createElement(e.Fragment,null,e.createElement("header",{className:m({hasHeaderBanner:A})},C?e.createElement("div",{className:"headerBanner",style:{backgroundColor:a?.data?.sitewide_banner_background_color,color:a?.data?.sitewide_banner_text_color}},C):x||S?e.createElement("div",{className:"headerBanner",style:{backgroundColor:"#000000",color:"#ffffff"}},x||S):null,e.createElement("div",{className:"headerPrimary"},e.createElement("button",{className:"headerToggle headerToggle--open",type:"button",onClick:()=>g(!0)},"Open Navigation Menu"),e.createElement("div",{className:"headerLogo"},e.createElement("a",{href:"/"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/logo-roka.svg",alt:"ROKA logo"}))),e.createElement(us,h({},i,{isOpen:v,location:n,onClose:()=>g(!1)})),e.createElement("div",{className:"headerActions"},e.createElement("ul",null,e.createElement("li",{className:m("headerActions-search",b&&"searching")},b?e.createElement(e.Fragment,null,e.createElement("form",{onSubmit:P},e.createElement("input",{type:"search",id:"site-search",name:"q",placeholder:"Search","aria-label":"Search",onChange:e=>p(e.target.value),ref:E}),e.createElement("button",null,"Search")),e.createElement("button",{type:"button",className:"headerActions-searchClose",onClick:()=>{p(""),y(!1),E.current.value=null}},"Close Search")):e.createElement("button",{type:"button",onClick:()=>y(!0)},"Search")),e.createElement("li",{className:"headerActions-account"},e.createElement("a",{href:"/account"+(r?"":"/login")},"Account")),e.createElement("li",{className:"headerActions-cart"},M>0&&e.createElement("div",{className:"headerActions-cartQuantity"},M),e.createElement("button",{onClick:T},"Cart")))))),b&&d&&e.createElement(Um,{results:u,query:d,trackSearchAttribution:f}))},PageFooter:({globalSettings:t,navigation:a})=>{const{footer_legal_links:r,footer_signup_form_list_id:n,klaviyo_public_api_key:i,klaviyo_signup_error_message:o}=t.data,{slices:l}=a.data;return e.createElement("footer",null,e.createElement("div",{className:"footerBrand"},e.createElement("div",{className:"footerLogo"},e.createElement("a",{href:"/"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/img/logo-roka.svg",alt:"ROKA logo"}))),e.createElement("p",null,"Austin, Texas")),e.createElement("nav",{className:"footerNav","aria-label":"Supplemental Navigation"},l.map((t=>e.createElement($m,{key:t.id,slice:t}))),e.createElement(Wm,{apiKey:i,listId:n,errorMessage:o})),e.createElement("div",{className:"footerRegionSocial"},e.createElement("div",{className:"footerSocial"},e.createElement("ul",null,e.createElement("li",{className:"instagram"},e.createElement("a",{href:"https://www.instagram.com/roka",target:"_blank"},"ROKA Instagram @roka")),e.createElement("li",{className:"tiktok"},e.createElement("a",{href:"https://www.tiktok.com/@roka",target:"_blank"},"ROKA TikTok @roka")),e.createElement("li",{className:"facebook"},e.createElement("a",{href:"https://www.facebook.com/ROKA",target:"_blank"},"ROKA Facebook")),e.createElement("li",{className:"linkedin"},e.createElement("a",{href:"https://www.linkedin.com/company/roka-sports/",target:"_blank"},"ROKA LinkedIn")),e.createElement("li",{className:"strava"},e.createElement("a",{href:"https://www.strava.com/clubs/150610",target:"_blank"},"ROKA Strava Club"))))),e.createElement("div",{className:"footerLegal"},e.createElement("ul",null,r.map((({link:t,title:a},r)=>e.createElement("li",{key:`${t.url}-${r}`},e.createElement("a",{href:t.url},a))))),e.createElement("p",null,"© ROKA Sports, Inc. All Prices USD. All prices exclude international duties and taxes.")))},CollectionMarketingTile:il,CollectionProducts:({products:t,hasFiltration:a=!1,hasSearch:r=!1,marketingTiles:n=[]})=>{const i=Es(),o=t,l=Xm(n,i);return e.createElement("div",{className:m("collection",{"collection--hasFiltration":a,"collection--search":r})},a&&e.createElement(Op,null),e.createElement("div",{className:"collectionItems"},r&&e.createElement(su,null),a&&e.createElement(Ip,null),o.map(((t,a)=>{const r=Jm(n,a,i);return e.createElement(e.Fragment,{key:t.id},r.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),e.createElement(lu,{product:t,position:a+1}))})),l.map(((t,a)=>e.createElement(il,{key:`CollectionMarketingTile-${t.id}-${a}`,slice:t}))),0===o.length&&e.createElement("div",{className:"collectionNoMatches"},e.createElement("div",{className:"collectionNoMatches-content"},"Try clearing filters or changing your input"))))},...Yh};exports.AccountGateway=({onSubmit:t,renderForm:a=n})=>{const r=a;return e.createElement("div",{className:"accountGateway"},e.createElement("div",{className:"accountGatewayBranding"},e.createElement("img",{src:"https://img.roka.com/hydrogen/public/fpo-content/account-gateway-brand.jpg",alt:"Athletes wearing ROKA sunglasses"})),e.createElement("div",{className:"accountForm"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"Maximize your gains."),e.createElement("p",null,"Sign in and create a profile to access exclusive rewards and manage your preferences.")),e.createElement(r,{onSubmit:t},e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:"Sign In",className:"button"})))))},exports.AccountNavigation=({activities:t,location:a,onCustomerSupportClick:r,signOut:n})=>{const[i,o]=e.useState(!1),l=t&&t.length>0,s=l&&t.length>8,d={"Customer Support":r};return e.createElement(e.Fragment,null,e.createElement("div",{className:"accountDashNav"},e.createElement("ul",null,u.map((([t,r])=>e.createElement("li",{key:t},e.createElement("a",{className:m({active:a?.pathname.includes(r)}),href:r,onClick:e=>{const a=d[t];a&&a(e)&&(e.stopPropagation(),e.preventDefault())}},t))))),l&&e.createElement("div",{className:"accountDashActivities"},e.createElement("div",{className:"accountDashActivities-header"},e.createElement("h2",null,"Your Activities"),e.createElement("a",{className:"accountEdit",href:"/account/profile?edit=activities"},"Edit")),e.createElement("div",{className:"activities"},(i?t:t.slice(0,8)).map((t=>e.createElement(c,{key:t,activity:t,variant:"black"})))),s&&e.createElement("div",{className:"accountsItemAction"},e.createElement("button",{type:"button",onClick:()=>o(!i)},"Show ",i?"Fewer":"All")))),e.createElement("div",{className:"accountSignOut"},e.createElement("button",{className:"buttonReversedOutlined",onClick:n},"Sign Out")))},exports.AccountSettings=({consentSaved:t,customer:a,editAddressesUrl:r,editProfileUrl:n,editTeamAccountUrl:i,loading:o,onChangeConsent:l,updateConsentError:s})=>e.createElement("div",{className:"accountSettings"},e.createElement(er,null,e.createElement(lr,h({},a,{editUrl:`${n}?edit=profile`,email:a.emailAddress?.emailAddress})),e.createElement(rr,{addresses:a.addresses,editUrl:r})),e.createElement(er,null,e.createElement(Qa,{email:a.emailAddress?.emailAddress}),e.createElement(tr,{activities:a.activities,editUrl:`${n}?edit=activities`}),e.createElement(nr,h({},a,{errorMessage:s,loading:o,onChange:l,saved:t})),e.createElement(br,{customer:a,editUrl:i}))),exports.ActivateCustomer=({activateCustomer:t,customer:a,error:r,loading:n,onCancel:i})=>{const o=a?.id?.split("/").pop(),l=gr(a),{formState:{errors:s},handleSubmit:c,register:d}=Ge({defaultValues:{teamHandle:l||"",pin:"",shopifyCustomerId:o}});return e.createElement("div",{className:"accountForm accountForm--edit"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"ROKA Team Account")),e.createElement("form",{className:"formInsetLabels",onSubmit:n||l?void 0:c(t)},e.createElement("input",{type:"hidden",name:"shopifyCustomerId",value:o}),e.createElement(We,{id:"teamHandle",label:"Team Handle",name:"teamHandle",register:d,disabled:l,required:!0}),s.teamHandle&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},s.teamHandle.message)),e.createElement(We,{id:"pin",label:"Team Passcode",name:"pin",register:d,required:!0,disabled:l}),s.pin&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},s.pin.message)),r&&e.createElement("div",{className:"formItem-info"},e.createElement("div",{className:"formItem-description formItem-error"},r)),!l&&e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:n?"Saving…":"Save Changes",className:"button",disabled:n})),e.createElement("div",{className:"formItem formItem-action"},e.createElement("button",{type:"button",className:"accountBasicButton",onClick:i},"Cancel"))))},exports.Activity=c,exports.AddressForm=Je,exports.AddressList=({instanceError:t,items:a,loading:r,onCreate:n,onDelete:i,onUpdate:o})=>{const[l,s]=e.useState(!1);return e.useEffect((()=>{l&&s(!1)}),[a]),e.createElement("div",{className:"accountForm accountForm--edit"},e.createElement("div",{className:"accountFormIntro"},e.createElement("h1",null,"Address Book")),a.map((({defaultAddress:n,...l})=>e.createElement("div",{key:l.id,className:"formGroup"},e.createElement(Je,{address:l,defaultAddress:n||1===a.length,error:t&&t.id===l.id?t.error:void 0,loading:r,onDelete:()=>i(l.id),onSubmit:e=>o({id:l.id,...e})})))),(!a||0===a.length)&&!l&&e.createElement("div",{className:"formGroup"},e.createElement("div",{className:"formItem formItem-action"},e.createElement("p",{style:{marginTop:36}},"You have no addresses saved."))),!l&&e.createElement("div",{className:"formGroup"},e.createElement("div",{className:"formItem formItem-action"},e.createElement("button",{type:"button",className:"buttonOutlined",onClick:()=>s(!0)},"Add New Address"))),l&&e.createElement("div",{className:"formGroup"},e.createElement(Je,{defaultAddress:!a||0===a.length,error:t&&!t.id?t.error:void 0,loading:r,onCancel:()=>s(!1),onSubmit:n})))},exports.BackToTop=({isVisible:t})=>{const[a,r]=e.useState(!1),{isSidecartOpen:n}=kr();e.useEffect((()=>{const e=window.matchMedia("(max-width: 767px)");r(e.matches);const t=e=>r(e.matches);return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}),[]);if(a&&!t)return null;if(n)return null;const i=a?"Go back to top":"↑ Return to top of page ↑";return e.createElement("div",{className:m("backToTop",{sticky:a,isVisible:t})},e.createElement("button",{className:"button",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},"aria-label":i},i))},exports.BannerGrid=Kn,exports.Cart=({afterPay:t,freeShippingThreshold:a,isSidecart:r})=>{const{cart:n,removeLines:i,setIsSidecartOpen:o,state:l,updateLines:s,cartAttributes:c}=kr();if(!n)return null;const{allowCheckout:d,hasNotifications:u}=c;let p=Number(n.cost.subtotalAmount.amount);p=isNaN(p)?0:p.toFixed(2);const f=(h=n.lines.nodes,ii(h).map((e=>ci(e,h))));var h;const v=n.lines.nodes.filter((e=>e.attributes.some((({key:e})=>e===ei))));return e.createElement(e.Fragment,null,!r&&n&&e.createElement(ui,null),e.createElement("div",{className:m("cart",r?"cart--side":"cart--page",{loading:"idle"!==l})},e.createElement(rl,{isSidecart:r},e.createElement(mi,{cart:n,isSidecart:r,setIsSidecartOpen:o}),e.createElement("div",{className:"cartContent"},n.totalQuantity>0&&e.createElement(al,{cart:n,threshold:a}),n.totalQuantity>0&&e.createElement("div",{className:"cartItems"},n.lines.nodes.filter((e=>!e.merchandise?.product?.handle?.startsWith("rx"))).filter((e=>!oi(e))).filter((e=>!!e.merchandise)).map((t=>e.createElement(fi,{key:t.id,item:t,removeLines:i,updateLines:s}))),f.map((t=>e.createElement(hi,{key:t.id,item:t,removeLines:i,updateLines:s})))),v.length>0&&e.createElement("div",{className:"cartNotice"},e.createElement("p",null,"Products in your order are on pre-order and will not ship immediately.")),!r&&n.totalQuantity>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:"cartSubTotal"},e.createElement("div",{className:"cartSubTotalContent"},e.createElement("span",null,"Subtotal $",p))),e.createElement(Qn,{afterPay:t,checkoutUrl:n.checkoutUrl})),e.createElement(tl,null),r&&e.createElement("div",{className:"cartHelp"},e.createElement("p",null,"Need help? Visit our ",e.createElement("a",{href:"/pages/help"},"Help Center"),","," ",e.createElement("a",{href:"mailto:support@roka.com"},"email us"),","," ",e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),window.Kustomer?.open()}},"chat live")," ","or call ",e.createElement("a",{href:"tel:8779857652"},"(877) 985-7652"),"."))),r&&n.totalQuantity>0&&e.createElement("div",{className:m("cartCheckout",{cartCheckoutHTO:u})},e.createElement(Xn,{isSideCart:!0}),d?e.createElement("a",{href:n.checkoutUrl,className:"button"},"Checkout"," ",e.createElement("span",{className:"cartCheckout-price"},"$",p)):e.createElement("a",{className:"button buttonDisabled"},"Checkout Unavailable")))))},exports.CartProvider=function({children:t,...a}){const[r,n]=e.useState(!1),[i,o]=e.useState(xr),{cart:l}=a;return e.useEffect((()=>{if(!l?.lines)return;const e=wr(l);o(e)}),[l]),e.createElement(Er.Provider,{value:{isSidecartOpen:r,setIsSidecartOpen:n,cartAttributes:i,...a}},t)},exports.CollectionMarketingTile=il,exports.CollectionsContext=Gp,exports.CollectionsWithFiltersContext=Lp,exports.EmailSignup=pl,exports.FoursixtySlider=El,exports.Fulfillment=vt,exports.FulfillmentStatus=lt,exports.Fulfillments=gt,exports.GlobalSettingsProvider=function({children:t,globalSettings:a}){return e.createElement(ll.Provider,{value:a},t)},exports.Goggles=es,exports.GroupedStatusSection=dt,exports.HeroProvider=({children:t})=>{const a=e.useRef(!1);return e.createElement(ps.Provider,{value:{getHeadingComponent:()=>a.current?"h2":(a.current=!0,"h1")}},t)},exports.ImageGrid=Sl,exports.ImageLinkCarousel=Ll,exports.ItemizedReceipt=({lineItems:t=[],order:a={}})=>{const{customer:r={},shippingAddress:n={}}=a,i=t.reduce(((e,t)=>e+Number(t.price.amount)),0),o=t.reduce(((e,t)=>e+Number(t.totalDiscount.amount)),0),l=Math.round(Number(a.totalTax.amount)/Number(a.totalPrice.amount)*1e4)/100;return e.createElement("div",{className:"itemized-receipt"},e.createElement("div",{className:"receipt"},e.createElement("div",{className:"header"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement(Tl,null)),e.createElement("div",{className:"col"},e.createElement("p",null,"2214-A West Braker Lane",e.createElement("br",null),"Austin, TX 78758")),e.createElement("div",{className:"col"},e.createElement("p",null,"1 (877) 985-7652",e.createElement("br",null),"support@rokasports.com")))),e.createElement("div",{className:"info"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement("h2",null,"Receipt"),e.createElement("p",null,a?.name,e.createElement("br",null),a?.createdAt?new Date(a.createdAt).toLocaleDateString():"")),e.createElement("div",{className:"col"},e.createElement("h2",null,"Purchaser"),n&&e.createElement(e.Fragment,null,e.createElement("p",null,[n.firstName,n.lastName].filter(Boolean).join(" ")),e.createElement("p",null,n.address1,n.address2&&e.createElement(e.Fragment,null,e.createElement("br",null),n.address2),e.createElement("br",null),n.city,", ",n.zoneCode," ",n.zip,e.createElement("br",null),n.country)),r.phoneNumber?.phoneNumber&&e.createElement("p",null,(s=r.phoneNumber?.phoneNumber,"string"!=typeof s?"":s.startsWith("+1")?s.replace(/\+1(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):s)),r.emailAddress?.emailAddress&&e.createElement("p",null,r.emailAddress?.emailAddress)))),e.createElement("div",{className:"summary"},e.createElement("h2",null,"Order Summary"),e.createElement("div",{className:"table"},e.createElement("div",{className:"row labels"},e.createElement("div",{className:"cell"},"Description"),e.createElement("div",{className:"cell"},"Units"),e.createElement("div",{className:"cell"},"Cost Per Unit"),e.createElement("div",{className:"cell"},"Amount")),t.map(((t,a)=>{const r=Number(t.totalPrice.amount)-Number(t.totalDiscount.amount),n=r/Number(t.quantity);return e.createElement("div",{className:"row",key:`${t.id}-${a}`},e.createElement("div",{className:"cell"},(({title:e,variantTitle:t})=>e in Al?`${Al[e]} - ${t}`:[e,t].filter(Boolean).join(" - "))(t)),e.createElement("div",{className:"cell"},t.quantity),e.createElement("div",{className:"cell"},Ml(n)),e.createElement("div",{className:"cell"},Ml(r)))})))),e.createElement("div",{className:"total"},e.createElement("div",{className:"content"},e.createElement("div",{className:"col"},e.createElement("h2",null,"Order Total"),e.createElement("p",{className:"xl"},Ml(a.totalPrice.amount))),e.createElement("div",{className:"col"},e.createElement("div",{className:"table"},e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Original Total"),e.createElement("div",{className:"cell"},Ml(i))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Other (discount)"),e.createElement("div",{className:"cell"},"-",Ml(o))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Tax Rate"),e.createElement("div",{className:"cell"},l?l.toFixed(2):0,"%")),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Taxes"),e.createElement("div",{className:"cell"},Ml(a.totalTax.amount))),e.createElement("div",{className:"row"},e.createElement("div",{className:"cell label"},"Shipping"),e.createElement("div",{className:"cell"},Ml(a.totalShipping.amount))))))),e.createElement("div",{className:"footer"},e.createElement("div",{className:"content"},e.createElement("p",{className:"sm"},"(1) This invoice reflects the actual value paid for this item by the customer."),e.createElement("p",{className:"sm"},"(2) These commodities, technology, or software were exported from the United States in accordance with the Export Administration Regulations. Diversion contrary to the United States law is prohibited.")))));var s},exports.LensTints=ns,exports.LineItem=st,exports.LineItems=ct,exports.Material=$c,exports.MaterialNote=Wc,exports.Order=Ct,exports.OrderDetails=ht,exports.OrderStatus=yt,exports.Orders=({orders:t=[]})=>{const a=t.filter((e=>e.fulfillments.some(xt))),r=t.filter((e=>e.fulfillments.every(kt)));return e.createElement("div",{className:"accountOrders"},0===t.length&&e.createElement("p",null,"You haven’t placed any orders."," ",e.createElement("a",{href:"/collections"},"Start shopping →")),a.length>0&&e.createElement("div",{className:"accountOrdersGroup accountOrdersGroup--inProgress"},e.createElement("h2",null,"In Progress Orders"),a.map((t=>e.createElement(Ct,h({key:t.id},t))))),r.length>0&&e.createElement("div",{className:"accountOrdersGroup accountOrdersGroup--completed"},e.createElement("h2",null,"Orders"),r.map((t=>e.createElement(Ct,h({key:t.id},t,{completed:!0}))))))},exports.PageHero=Ss,exports.PdpProvider=function({children:t,...a}){return e.createElement(wl.Provider,{value:a},t)},exports.ProductCarouselGroup=_s,exports.ProductsContext=Ts,exports.ProductsProvider=function({children:t,products:a={}}){return e.createElement(Ts.Provider,{value:a},t)},exports.ProfileForm=({customer:t,disableSkip:a,errorMessage:r,loading:n,onSkip:o,onSubmit:l,submitText:s="Submit",success:c})=>{const[d,m]=e.useState();e.useEffect((()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search).get("edit")||void 0;e&&qa.includes(e)?m(e):m(null)}),[]);const{control:u,formState:{errors:p},handleSubmit:f,register:v}=Ge({defaultValues:{activities:t?.activities,birthDate:t?.birthDate,firstName:t?.firstName,gender:t?.gender,lastName:t?.lastName,marketingConsent:t?.marketingConsent,phoneNumber:t?.phoneNumber}}),g=X({control:u,name:"phoneNumber",defaultValue:t?.phoneNumber,rules:{required:(!d||d===Ua)&&"Please enter your phone number."}}),b=t?.emailAddress?.emailAddress,y=[t?.firstName,t?.lastName].filter(Boolean).join(" ");return void 0===d?null:e.createElement("div",{className:"accountGateway accountGateway-profile"},e.createElement("div",{className:"accountForm accountForm--profile"},!d&&e.createElement("div",{className:"accountFormWelcome"},e.createElement("h1",null,"Welcome to the team",y&&","),y&&e.createElement("p",null,y)),e.createElement("form",{className:"formInsetLabels",onSubmit:n?void 0:f(l)},(!d||d===Ua)&&e.createElement(e.Fragment,null,e.createElement("h2",null,"Customize your profile."),b&&e.createElement("div",{className:"formItem formItem-info"},e.createElement("p",null,b),e.createElement("p",{className:"formItem-description"},"Email")),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"firstName"},"First Name*"),e.createElement("input",h({type:"text",name:"name",id:"firstName"},v("firstName",{required:"Please enter your first name."})))),p.firstName&&e.createElement(Ja,{message:p.firstName.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"firstName"},"Last Name*"),e.createElement("input",h({type:"text",name:"name",id:"lastName"},v("lastName",{required:"Please enter your last name."})))),p.lastName&&e.createElement(Ja,{message:p.lastName.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"phoneNumber"},"Phone Number*"),e.createElement(Wa,h({},g.field,{country:!t.phoneNumber||t.phoneNumber?.startsWith?.("+1")?"us":void 0,inputProps:{ref:g.field.ref},placeholder:""}))),p.phoneNumber&&e.createElement(Ja,{message:p.phoneNumber.message}),e.createElement("div",{className:"formItem"},e.createElement("label",{htmlFor:"birthDate"},"Birth Date*"),e.createElement("input",h({type:"date",name:"birthDate",id:"birthDate"},v("birthDate",{required:"Please enter your birth date.",validate:e=>{const t="Please enter a valid birth date.",a=new Date(e);if(!Vt(a))return t;const r=$t(new Date,a);return!(r<13||r>120)||t}})))),p.birthDate&&e.createElement(Ja,{message:p.birthDate.message}),e.createElement("div",{className:"formItem formItem-radio accountForm-radio"},e.createElement("fieldset",null,e.createElement("legend",null,"Gender*"),Ya.map((([t,a])=>e.createElement("div",{key:t},e.createElement("input",h({type:"radio",id:t,value:t},v("gender",{required:"Please select a gender."}))),e.createElement("label",{htmlFor:t},a))))))),(!d||d===Ka)&&e.createElement("div",{className:"formItem formItem-checkbox accountForm-activity"},e.createElement("fieldset",null,e.createElement("legend",null,"What activities interest you?"),Za.map((t=>e.createElement("div",{className:"activity",key:t},e.createElement("input",h({type:"checkbox",id:t,name:t,value:t},v("activities"))),e.createElement("label",{htmlFor:t},i[t])))))),!d&&e.createElement("div",{className:"formItem formItem-checkbox accountFormPrompt"},e.createElement("input",h({id:"marketing",type:"checkbox",name:"marketing"},v("marketingConsent"))),e.createElement("label",{htmlFor:"marketing"},"By checking this box, I agree to receive marketing communications from ROKA. This preference can be updated anytime in account settings.")),r&&e.createElement("div",{className:"formItem formItem-info formItem-error"},e.createElement("p",null,r)),c&&e.createElement("div",{className:"formItem formItem-info formItem-success"},e.createElement("p",null,"Your profile has been updated.")),e.createElement("div",{className:"formItem formItem-action"},e.createElement("input",{type:"submit",value:n?"Saving…":s,className:"button",disabled:n}),!a&&e.createElement("button",{type:"button",className:"buttonOutlined",onClick:n?void 0:o,disabled:n},"Skip For Now")))))},exports.RokaProductCustomizerProvider=({children:t,data:a})=>{const[r,n]=e.useReducer(Kf,a,(e=>{if(!e)return{};return Zf(e)}));e.useEffect((()=>{a&&n({type:$f,payload:a})}),[a]);const i=e.useMemo((()=>(e=>({initialize:t=>{e({type:$f,payload:t})},selectPart:(t,a)=>{e({type:Wf,payload:{product:t,variant:a}})},selectSize:t=>{e({type:Uf,payload:t})}}))(n)),[]);return e.createElement(jf.Provider,{value:{...r,...i}},t)},exports.RxModal=()=>{const t=Vc(),a=t.steps[t.step],[r,n,i]=Mm[a]||[];return e.createElement(Uc,h({},t,{component:n,note:i,title:r}))},exports.RxProvider=({children:t,colors:a,estimatedShipDate:r,magnification:n,materials:i,onChat:o,onClose:l,onComplete:s,onUpload:c,polarizations:d,product:m,prescriptionTypes:u,rokaProductConfig:p,nosepads:f,uuid:h,variantId:v,useRokaProductCustomizerData:g})=>{const b=e.useMemo((()=>({...m,selectedVariants:g?.selectedVariants,nosepadAddonKitVariantId:p?.nosepadAddOns&&p.nosepadAddOns[v]})),[m,g]),y=b.variants.find((e=>e.id===v)),E=e.useMemo((()=>Ic(b,{variant:y,colors:a,materials:i,polarizations:d,prescriptionTypes:u,nosepads:f,rokaProductConfig:p})),[b,a,i,d,u,f,y,p]),[C,w]=e.useState(E);e.useEffect((()=>{w(E)}),[E]);const[x,k]=e.useState();e.useEffect((()=>{if(g?.selectedVariants)return;const e=p?.nosepadAddOns;if(!e)return;const t=e[v];if(!t)return;const a=((e,t)=>{const a=e.variants.find((e=>e.id===parseInt(t,10)));if(!a)return{no:{variant:void 0,price:null}};const r=Tc({price:0},a);return{no:{variant:_c,price:null},yes:{variant:a,price:r}}})(f,t);k(a)}),[f,p,v,g?.selectedVariants]);const[S,N]=e.useState(0),[L,T]=e.useState(null),P=e.useMemo((()=>Lc(b,C)),[C,b]),M=e.useMemo((()=>wc(b)),[b]),A=e.useMemo((()=>xc(b)),[b]),_=e.useMemo((()=>P.length),[P]),B=e.useCallback((()=>N(S>0?S-1:S)),[S,N]),F=e.useCallback((()=>{T(null),N(S<_-1?S+1:S)}),[S,_,N,T]),O=e.useCallback((()=>{N(0),T(null),w({}),l()}),[w,N,T,l]),I=e.useCallback((async()=>{let e={...C};zs in e&&delete e[Rs];let t=Object.values(e).filter((e=>e?.sku)),a=js in e?e[js]:void 0,r=$s in e?e[$s]:void 0,n=Ws in e?e[Ws]:void 0;await s({variants:t,prescriptionData:a,pupillaryDistance:n,pupillaryDistanceSource:r}),w({}),N(0),T(null)}),[C,s]),[D,R]=e.useState();e.useEffect((()=>{const e=((e,t,a)=>{const r=t[e]===js;if(a.tags.includes("huberman-red-lens")&&a.title.includes("Eyeglasses")&&r)return'Our Wind Down™ prescription lens has a range limit. <a href="https://support.roka.com/en-US/what-prescription-range-works-for-your-lenses-and-frames-937234">View our help center article on prescription range limits.</a>'})(S,P,m);R(e)}),[S,P,m]);const z=(({data:e,variant:t,product:a})=>{const r=Oc({variant:t,product:a});let n=Object.values(e).reduce(((e,t)=>t?.price?e+Number(t.price):e),r);return isNaN(e[Rs]?.price)||(n-=e[Rs].price),n})({data:C,variant:y,product:b});let H=b.images.find((e=>e.variant_ids.includes(y?.id))),G=b.title,V=y?.option1&&` / ${y.option1}`;g&&(H={src:g.image,alt:g.title},G=g.title,V=g.description);const j={colors:a,data:C,error:L,estimatedShipDate:r,magnification:n,materials:i,next:F,onChat:o,onClose:O,onComplete:I,onUpload:c,polarizations:d,prescriptionTypes:u,previous:B,product:b,setData:w,setError:T,setStep:N,step:S,steps:P,totalSteps:_,uuid:h,variant:y,subtotal:z,useRokaProductCustomizerData:g,image:H,productTitle:G,description:V,headerWarning:D,nosepadOptions:x,allowPrescriptionTypeEdit:!(M||A)};return e.createElement(Gc.Provider,{value:j},t)},exports.SearchProvider=function({children:t,...a}){return e.createElement(Am.Provider,{value:a},t)},exports.Statement=Fm,exports.TrackerStatus=bt,exports.UserOverview=({activities:t,address1:a,address2:r,city:n,email:i,name:o,points:l,territoryCode:s,tier:d,zip:m,zoneCode:u})=>{const[p,f]=e.useState(!1),h=t&&t.length>0,v=h&&t.length>4,g=[[a,r].filter(Boolean).join(" "),[n,n&&u?`, ${u}`:"",m].filter(Boolean).join(" "),"US"!==s?s:""].filter(Boolean).map(((t,a)=>e.createElement(e.Fragment,{key:a},a>0&&e.createElement("br",null),t)));return e.createElement("div",{className:"accountDashOwner"},e.createElement("h1",null,o),d||l?e.createElement("p",{className:"accountDashOwner-status"},d&&`${d} `,l&&e.createElement("span",null,l," ",1===l?"Point":"Points")):null,e.createElement("p",{className:"accountDashOwner-email"},e.createElement("a",{href:`mailto:${i}`},i)),e.createElement("address",null,g),h&&e.createElement("div",{className:"accountDashActivities"},e.createElement("div",{className:"accountDashActivities-header"},e.createElement("h2",null,"Your Activities"),e.createElement("a",{className:"accountEdit",href:"/account/settings/activities"},"Edit")),e.createElement("div",{className:"activities"},(p?t:t.slice(0,4)).map((t=>e.createElement(c,{key:t,activity:t,variant:"black"})))),v&&e.createElement("div",{className:"accountsItemAction"},e.createElement("button",{type:"button",onClick:()=>f(!p)},"Show ",p?"Fewer":"All"))))},exports.Video=jm,exports.activityIcons=s,exports.activityNames=i,exports.components=Xh,exports.genders=Ya,exports.getPriceIsOnSale=ch,exports.getSlicesProducts=e=>e.flatMap((e=>sh[e.slice_type]?.(e)||[])),exports.iconRoot=o,exports.iconVariants=l,exports.materialTitle=jc,exports.slices=Jh,exports.useCart=kr,exports.useGlobalSettings=sl,exports.useHero=fs,exports.usePdp=xl,exports.useProduct=Ps,exports.useRokaProductCustomizer=Yf,exports.useRx=Vc,exports.useScrolledPast=Sr,exports.useSearch=_m;
20
20
  //# sourceMappingURL=index.js.map