@qratilabs/qrati-connect 2.5.0 → 2.5.2

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/element/{AuthLayout-EC2U3nsK.js → AuthLayout-IGFGeMq5.js} +1 -1
  3. package/element/{ContentsPage-BGtOyWxg.js → ContentsPage-Bu42OF-F.js} +1 -1
  4. package/element/{CuratePage-BLa771HN.js → CuratePage-CBMluidb.js} +1 -1
  5. package/element/{Dialog-D3m_eBiJ.js → Dialog-DVSvxBn8.js} +1 -1
  6. package/element/{DotLottiePlayer-FgGW1IR7.js → DotLottiePlayer-DHVhIw5H.js} +1 -1
  7. package/element/{EventHeaderAdminButtons-CW2SupWX.js → EventHeaderAdminButtons-zE3NbEUA.js} +1 -1
  8. package/element/{FolderBreadcrumb-CUpIfUTx.js → FolderBreadcrumb-1w72I1FP.js} +1 -1
  9. package/element/{ForgotPasswordPage-Cd0Oj-RE.js → ForgotPasswordPage-CIw8RrkZ.js} +1 -1
  10. package/element/{InputField-B_y35j-5.js → InputField-XP30segE.js} +1 -1
  11. package/element/{LazyLoadImage-CQL8-B3z.js → LazyLoadImage-n94OUygV.js} +1 -1
  12. package/element/{LeaderboardPage-BRBrFWpp.js → LeaderboardPage-CGuP207i.js} +1 -1
  13. package/element/{LoginPage-Ba9HTjV1.js → LoginPage-B15CMpYe.js} +1 -1
  14. package/element/{NCMVHL6D-CCAMoHuQ.js → NCMVHL6D-D_O5jdHL.js} +1 -1
  15. package/element/{PublicEvents-CddoYNW6.js → PublicEvents-DOp9N4xU.js} +1 -1
  16. package/element/{RegisterPage-DZGdPdu_.js → RegisterPage-D-6uVKjj.js} +1 -1
  17. package/element/{SocialLoginButton-BSK0uHQy.js → SocialLoginButton-BuZ03WV-.js} +1 -1
  18. package/element/{UploadPage-6k9f8u8c.js → UploadPage-Dhjmh06j.js} +1 -1
  19. package/element/{VideoPlayer-B6NcsNiP.js → VideoPlayer-cWSLl4fO.js} +1 -1
  20. package/element/element.es.js +1 -1
  21. package/element/{heic2any-JTWseCtt.js → heic2any-Dui1sz1X.js} +1 -1
  22. package/element/{index-Dq8XMn-B.js → index-DsN-W6V_.js} +1 -1
  23. package/element/{index-jVkC2DYJ.js → index-jzNVBihK.js} +1 -1
  24. package/element/{index.esm-mRBXJrk0.js → index.esm-CsbPHPGO.js} +1 -1
  25. package/element/{photoswipe-BdJR2C9a.js → photoswipe-5mcef1lI.js} +1 -1
  26. package/element/styles.css +1 -1
  27. package/element/{tslib.es6-CT89L4O4.js → tslib.es6-Dp_1P0Dk.js} +1 -1
  28. package/element/{useOrgAccess-DHToEbG_.js → useOrgAccess-B1cbGHT_.js} +1 -1
  29. package/element/web.es.js +1 -1
  30. package/package.json +1 -1
  31. package/react/{DPgWGmoG.js → 6xRxF6pz.js} +1 -1
  32. package/react/{BEzP8sbl.js → BZvhXg2G.js} +1 -1
  33. package/react/{BDeLdfbp.js → BaA7RHRf.js} +1 -1
  34. package/react/{CImTSnHg.js → Bebe5T7J.js} +1 -1
  35. package/react/{B5w5BP6w.js → C565I04Q.js} +1 -1
  36. package/react/{DPeVo4aL.js → CE-MbwCB.js} +1 -1
  37. package/react/{DH_wlDkr.js → CIlaT7eJ.js} +1 -1
  38. package/react/{JfRXqbqu.js → CS7icy9d.js} +1 -1
  39. package/react/{BUZq1uY0.js → Cp86U6va.js} +1 -1
  40. package/react/{LF1Cet66.js → Cv7EiFQU.js} +1 -1
  41. package/react/{eUvYQTPt.js → D1emifDo.js} +1 -1
  42. package/react/{BwHqpHe9.js → DPtqYlwJ.js} +1 -1
  43. package/react/{DcQdnYr8.js → DS2UD7gV.js} +1 -1
  44. package/react/{CYoLgOTC.js → DZitaH5o.js} +1 -1
  45. package/react/{CQHQocew.js → DjmC7CGh.js} +1 -1
  46. package/react/{BYYb8zAx.js → DwNWOPAY.js} +1 -1
  47. package/react/{6z8qI7He.js → Dyk2_V8r.js} +1 -1
  48. package/react/{CldWPPzn.js → LMErjmPc.js} +1 -1
  49. package/react/{BeDQQM0T.js → VOx0knsi.js} +1 -1
  50. package/react/{C-Ri1Eh9.js → W8TabW9M.js} +1 -1
  51. package/react/{CtX-oYOP.js → cWB0y40v.js} +1 -1
  52. package/react/index.es.js +1 -1
  53. package/react/{U9LCogz5.js → jM4FWKDA.js} +1 -1
  54. package/react/styles.css +1 -1
  55. package/react/{D464cx8y.js → vmkon26e.js} +1 -1
  56. package/umd/web.umd.js +2 -2
@@ -1 +1 @@
1
- import{j as t,w as e,c as n,V as i,W as r,b as o,d as a,u as s,H as c,k as l,i as p,X as u,E as d,S as f,h as m,N as h,P as g,T as v,g as x,J as y,Y as b,Z as w}from"./BDeLdfbp.js";import*as A from"react";import S,{forwardRef as P,useImperativeHandle as C,Fragment as T,useMemo as k,useRef as E,useReducer as I,useEffect as j,useCallback as D,createContext as M,useLayoutEffect as F,useId as U,useContext as R,useInsertionEffect as O,Children as L,isValidElement as N,useState as B,createElement as V,Component as q}from"react";import{g as z}from"./BW2mijRq.js";import{r as _}from"./G275Ly1Q.js";import{_ as G}from"./D6nr9_KD.js";import{d as $,E as H}from"./DPgWGmoG.js";import{V as W}from"./CQHQocew.js";const X=[];for(let t=0;t<256;++t)X.push((t+256).toString(16).slice(1));let Y;const K=new Uint8Array(16);const Z={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Q(t,e,n){const i=(t=t||{}).random??t.rng?.()??function(){if(!Y){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Y=crypto.getRandomValues.bind(crypto)}return Y(K)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(X[t[e+0]]+X[t[e+1]]+X[t[e+2]]+X[t[e+3]]+"-"+X[t[e+4]]+X[t[e+5]]+"-"+X[t[e+6]]+X[t[e+7]]+"-"+X[t[e+8]]+X[t[e+9]]+"-"+X[t[e+10]]+X[t[e+11]]+X[t[e+12]]+X[t[e+13]]+X[t[e+14]]+X[t[e+15]]).toLowerCase()}(i)}function J(t,e,n){return Z.randomUUID&&!t?Z.randomUUID():Q(t)}const tt=Object.prototype.hasOwnProperty;class et extends Event{constructor(t,e){super(t),this.detail=e}}class nt extends EventTarget{constructor(t={}){super();const{concurrency:e=1/0,timeout:n=0,autostart:i=!1,results:r=null}=t;this.concurrency=e,this.timeout=n,this.autostart=i,this.results=r,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers=[],this.addEventListener("error",this._errorHandler)}_errorHandler(t){this.end(t.detail.error)}pop(){return this.jobs.pop()}shift(){return this.jobs.shift()}indexOf(t,e){return this.jobs.indexOf(t,e)}lastIndexOf(t,e){return void 0!==e?this.jobs.lastIndexOf(t,e):this.jobs.lastIndexOf(t)}slice(t,e){return this.jobs=this.jobs.slice(t,e),this}reverse(){return this.jobs.reverse(),this}push(...t){const e=this.jobs.push(...t);return this.autostart&&this._start(),e}unshift(...t){const e=this.jobs.unshift(...t);return this.autostart&&this._start(),e}splice(t,e,...n){return this.jobs.splice(t,e,...n),this.autostart&&this._start(),this}get length(){return this.pending+this.jobs.length}start(t){if(this.running)throw new Error("already started");let e;return t?this._addCallbackToEndEvent(t):e=this._createPromiseToEndEvent(),this._start(),e}_start(){if(this.running=!0,this.pending>=this.concurrency)return;if(0===this.jobs.length)return void(0===this.pending&&this.done());const t=this.jobs.shift(),e=this.session,n=void 0!==t&&tt.call(t,"timeout")?t.timeout:this.timeout;let i=!0,r=null,o=!1,a=null;const s=(n,...s)=>{i&&this.session===e&&(i=!1,this.pending--,null!==r&&(this.timers=this.timers.filter(t=>t!==r),clearTimeout(r)),n?this.dispatchEvent(new et("error",{error:n,job:t})):o||(null!==a&&null!==this.results&&(this.results[a]=[...s]),this.dispatchEvent(new et("success",{result:[...s],job:t}))),this.session===e&&(0===this.pending&&0===this.jobs.length?this.done():this.running&&this._start()))};n&&(r=setTimeout(()=>{o=!0,this.dispatchEvent(new et("timeout",{next:s,job:t})),s()},n),this.timers.push(r)),null!=this.results&&(a=this.results.length,this.results[a]=null),this.pending++,this.dispatchEvent(new et("start",{job:t})),t.promise=t(s),void 0!==t.promise&&"function"==typeof t.promise.then&&t.promise.then(function(t){return s(void 0,t)}).catch(function(t){return s(t||!0)}),this.running&&this.jobs.length>0&&this._start()}stop(){this.running=!1}end(t){this.clearTimers(),this.jobs.length=0,this.pending=0,this.done(t)}clearTimers(){this.timers.forEach(t=>{clearTimeout(t)}),this.timers=[]}_addCallbackToEndEvent(t){const e=n=>{this.removeEventListener("end",e),t(n.detail.error,this.results)};this.addEventListener("end",e)}_createPromiseToEndEvent(){return new Promise((t,e)=>{this._addCallbackToEndEvent((n,i)=>{n?e(n):t(i)})})}done(t){this.session++,this.running=!1,this.dispatchEvent(new et("end",{error:t}))}}const it=z(_()),rt=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 ot(t,e,n){const i=function(t){const{name:e}=t;if(e&&-1!==e.lastIndexOf(".")&&!t.type){const n=e.split(".").pop().toLowerCase(),i=rt.get(n);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}(t),{webkitRelativePath:r}=t,o="string"==typeof e?e:"string"==typeof r&&r.length>0?r:`./${t.name}`;return"string"!=typeof i.path&&at(i,"path",o),at(i,"relativePath",o),i}function at(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const st=[".DS_Store","Thumbs.db"];function ct(t){return"object"==typeof t&&null!==t}function lt(t){return t.filter(t=>-1===st.indexOf(t.name))}function pt(t){if(null===t)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function ut(t){if("function"!=typeof t.webkitGetAsEntry)return ft(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?ht(e):ft(t,e)}function dt(t){return t.reduce((t,e)=>[...t,...Array.isArray(e)?dt(e):[e]],[])}function ft(t,e){return G(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&"function"==typeof t.getAsFileSystemHandle){const e=yield t.getAsFileSystemHandle();if(null===e)throw new Error(`${t} is not a File`);if(void 0!==e){const t=yield e.getFile();return t.handle=e,ot(t)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return ot(i,null!==(n=e?.fullPath)&&void 0!==n?n:void 0)})}function mt(t){return G(this,void 0,void 0,function*(){return t.isDirectory?ht(t):function(t){return G(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(n=>{const i=ot(n,t.fullPath);e(i)},t=>{n(t)})})})}(t)})}function ht(t){const e=t.createReader();return new Promise((t,n)=>{const i=[];!function r(){e.readEntries(e=>G(this,void 0,void 0,function*(){if(e.length){const t=Promise.all(e.map(mt));i.push(t),r()}else try{const e=yield Promise.all(i);t(e)}catch(t){n(t)}}),t=>{n(t)})}()})}var gt,vt={};var xt=(gt||(gt=1,vt.__esModule=!0,vt.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(0===n.length)return!0;var i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(t){var e=t.trim().toLowerCase();return"."===e.charAt(0)?i.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}return!0}),vt);const yt=z(xt);function bt(t){return function(t){if(Array.isArray(t))return Tt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ct(t)||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 wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function At(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach(function(e){St(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function St(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||Ct(t,e)||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 Ct(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(t,e)}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var kt="function"==typeof yt?yt:yt.default,Et=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),e=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:"file-invalid-type",message:"File type must be ".concat(e)}},It=function(t){return{code:"file-too-large",message:"File is larger than ".concat(t," ").concat(1===t?"byte":"bytes")}},jt=function(t){return{code:"file-too-small",message:"File is smaller than ".concat(t," ").concat(1===t?"byte":"bytes")}},Dt={code:"too-many-files",message:"Too many files"};function Mt(t,e){var n="application/x-moz-file"===t.type||kt(t,e);return[n,n?null:Et(e)]}function Ft(t,e,n){if(Ut(t.size))if(Ut(e)&&Ut(n)){if(t.size>n)return[!1,It(n)];if(t.size<e)return[!1,jt(e)]}else{if(Ut(e)&&t.size<e)return[!1,jt(e)];if(Ut(n)&&t.size>n)return[!1,It(n)]}return[!0,null]}function Ut(t){return null!=t}function Rt(t){return"function"==typeof t.isPropagationStopped?t.isPropagationStopped():typeof t.cancelBubble<"u"&&t.cancelBubble}function Ot(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(t){return"Files"===t||"application/x-moz-file"===t}):!!t.target&&!!t.target.files}function Lt(t){t.preventDefault()}function Nt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.some(function(e){return!Rt(t)&&e&&e.apply(void 0,[t].concat(i)),Rt(t)})}}function Bt(t){return"audio/*"===t||"video/*"===t||"image/*"===t||"text/*"===t||"application/*"===t||/\w+\/[-+.\w]+/g.test(t)}function Vt(t){return/^.*\.[\w]+$/.test(t)}var qt=["children"],zt=["open"],_t=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Gt=["refKey","onChange","onClick"];function $t(t){return function(t){if(Array.isArray(t))return Xt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wt(t)||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 Ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||Wt(t,e)||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 Wt(t,e){if(t){if("string"==typeof t)return Xt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xt(t,e)}}function Xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Kt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(n),!0).forEach(function(e){Zt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qt(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Jt=P(function(t,e){var n=t.children,i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Kt(Kt({},te),t),n=e.accept,i=e.disabled,r=e.getFilesFromEvent,o=e.maxSize,a=e.minSize,s=e.multiple,c=e.maxFiles,l=e.onDragEnter,p=e.onDragLeave,u=e.onDragOver,d=e.onDrop,f=e.onDropAccepted,m=e.onDropRejected,h=e.onFileDialogCancel,g=e.onFileDialogOpen,v=e.useFsAccessApi,x=e.autoFocus,y=e.preventDropOnDocument,b=e.noClick,w=e.noKeyboard,A=e.noDrag,S=e.noDragEventsBubbling,P=e.onError,C=e.validator,T=k(function(){return function(t){if(Ut(t))return Object.entries(t).reduce(function(t,e){var n=Pt(e,2),i=n[0],r=n[1];return[].concat(bt(t),[i],bt(r))},[]).filter(function(t){return Bt(t)||Vt(t)}).join(",")}(n)},[n]),M=k(function(){return function(t){return Ut(t)?[{description:"Files",accept:Object.entries(t).filter(function(t){var e=Pt(t,2),n=e[0],i=e[1],r=!0;return Bt(n)||(console.warn('Skipped "'.concat(n,'" 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.')),r=!1),(!Array.isArray(i)||!i.every(Vt))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(t,e){var n=Pt(e,2),i=n[0],r=n[1];return At(At({},t),{},St({},i,r))},{})}]:t}(n)},[n]),F=k(function(){return"function"==typeof g?g:ie},[g]),U=k(function(){return"function"==typeof h?h:ie},[h]),R=E(null),O=E(null),L=Ht(I(ne,ee),2),N=L[0],B=L[1],V=N.isFocused,q=N.isFileDialogActive,z=E(typeof window<"u"&&window.isSecureContext&&v&&"showOpenFilePicker"in window),_=function(){!z.current&&q&&setTimeout(function(){O.current&&(O.current.files.length||(B({type:"closeDialog"}),U()))},300)};j(function(){return window.addEventListener("focus",_,!1),function(){window.removeEventListener("focus",_,!1)}},[O,q,U,z]);var G=E([]),$=function(t){R.current&&R.current.contains(t.target)||(t.preventDefault(),G.current=[])};j(function(){return y&&(document.addEventListener("dragover",Lt,!1),document.addEventListener("drop",$,!1)),function(){y&&(document.removeEventListener("dragover",Lt),document.removeEventListener("drop",$))}},[R,y]),j(function(){return!i&&x&&R.current&&R.current.focus(),function(){}},[R,x,i]);var H=D(function(t){P?P(t):console.error(t)},[P]),W=D(function(t){t.preventDefault(),t.persist(),at(t),G.current=[].concat($t(G.current),[t.target]),Ot(t)&&Promise.resolve(r(t)).then(function(e){if(!Rt(t)||S){var n=e.length,i=n>0&&function(t){var e=t.files,n=t.accept,i=t.minSize,r=t.maxSize,o=t.multiple,a=t.maxFiles,s=t.validator;return!(!o&&e.length>1||o&&a>=1&&e.length>a)&&e.every(function(t){var e=Pt(Mt(t,n),1)[0],o=Pt(Ft(t,i,r),1)[0],a=s?s(t):null;return e&&o&&!a})}({files:e,accept:T,minSize:a,maxSize:o,multiple:s,maxFiles:c,validator:C});B({isDragAccept:i,isDragReject:n>0&&!i,isDragActive:!0,type:"setDraggedFiles"}),l&&l(t)}}).catch(function(t){return H(t)})},[r,l,H,S,T,a,o,s,c,C]),X=D(function(t){t.preventDefault(),t.persist(),at(t);var e=Ot(t);if(e&&t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch{}return e&&u&&u(t),!1},[u,S]),Y=D(function(t){t.preventDefault(),t.persist(),at(t);var e=G.current.filter(function(t){return R.current&&R.current.contains(t)}),n=e.indexOf(t.target);-1!==n&&e.splice(n,1),G.current=e,!(e.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ot(t)&&p&&p(t))},[R,p,S]),K=D(function(t,e){var n=[],i=[];t.forEach(function(t){var e=Ht(Mt(t,T),2),r=e[0],s=e[1],c=Ht(Ft(t,a,o),2),l=c[0],p=c[1],u=C?C(t):null;if(r&&l&&!u)n.push(t);else{var d=[s,p];u&&(d=d.concat(u)),i.push({file:t,errors:d.filter(function(t){return t})})}}),(!s&&n.length>1||s&&c>=1&&n.length>c)&&(n.forEach(function(t){i.push({file:t,errors:[Dt]})}),n.splice(0)),B({acceptedFiles:n,fileRejections:i,isDragReject:i.length>0,type:"setFiles"}),d&&d(n,i,e),i.length>0&&m&&m(i,e),n.length>0&&f&&f(n,e)},[B,s,T,a,o,c,d,f,m,C]),Z=D(function(t){t.preventDefault(),t.persist(),at(t),G.current=[],Ot(t)&&Promise.resolve(r(t)).then(function(e){Rt(t)&&!S||K(e,t)}).catch(function(t){return H(t)}),B({type:"reset"})},[r,K,H,S]),Q=D(function(){if(z.current){B({type:"openDialog"}),F();var t={multiple:s,types:M};window.showOpenFilePicker(t).then(function(t){return r(t)}).then(function(t){K(t,null),B({type:"closeDialog"})}).catch(function(t){!function(t){return t instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)}(t)?function(t){return t instanceof DOMException&&("SecurityError"===t.name||t.code===t.SECURITY_ERR)}(t)?(z.current=!1,O.current?(O.current.value=null,O.current.click()):H(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."))):H(t):(U(t),B({type:"closeDialog"}))})}else O.current&&(B({type:"openDialog"}),F(),O.current.value=null,O.current.click())},[B,F,U,v,K,H,M,s]),J=D(function(t){!R.current||!R.current.isEqualNode(t.target)||(" "===t.key||"Enter"===t.key||32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),Q())},[R,Q]),tt=D(function(){B({type:"focus"})},[]),et=D(function(){B({type:"blur"})},[]),nt=D(function(){b||(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?setTimeout(Q,0):Q())},[b,Q]),it=function(t){return i?null:t},rt=function(t){return w?null:it(t)},ot=function(t){return A?null:it(t)},at=function(t){S&&t.stopPropagation()},st=k(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,r=t.role,o=t.onKeyDown,a=t.onFocus,s=t.onBlur,c=t.onClick,l=t.onDragEnter,p=t.onDragOver,u=t.onDragLeave,d=t.onDrop,f=Qt(t,_t);return Kt(Kt(Zt({onKeyDown:rt(Nt(o,J)),onFocus:rt(Nt(a,tt)),onBlur:rt(Nt(s,et)),onClick:it(Nt(c,nt)),onDragEnter:ot(Nt(l,W)),onDragOver:ot(Nt(p,X)),onDragLeave:ot(Nt(u,Y)),onDrop:ot(Nt(d,Z)),role:"string"==typeof r&&""!==r?r:"presentation"},n,R),i||w?{}:{tabIndex:0}),f)}},[R,J,tt,et,nt,W,X,Y,Z,w,A,i]),ct=D(function(t){t.stopPropagation()},[]),lt=k(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onChange,r=t.onClick,o=Qt(t,Gt);return Kt(Kt({},Zt({accept:T,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:it(Nt(i,Z)),onClick:it(Nt(r,ct)),tabIndex:-1},n,O)),o)}},[O,n,s,Z,i]);return Kt(Kt({},N),{},{isFocused:V&&!i,getRootProps:st,getInputProps:lt,rootRef:R,inputRef:O,open:it(Q)})}(Qt(t,qt)),r=i.open,o=Qt(i,zt);return C(e,function(){return{open:r}},[r]),S.createElement(T,null,n(Kt(Kt({},o),{},{open:r})))});Jt.displayName="Dropzone";var te={disabled:!1,getFilesFromEvent:function(t){return G(this,void 0,void 0,function*(){return ct(t)&&function(t){return ct(t)}(t.dataTransfer)?function(t,e){return G(this,void 0,void 0,function*(){if(t.items){const n=pt(t.items).filter(t=>"file"===t.kind);if("drop"!==e)return n;return lt(dt(yield Promise.all(n.map(ut))))}return lt(pt(t.files).map(t=>ot(t)))})}(t.dataTransfer,t.type):function(t){return ct(t)&&ct(t.target)}(t)?function(t){return pt(t.target.files).map(t=>ot(t))}(t):Array.isArray(t)&&t.every(t=>"getFile"in t&&"function"==typeof t.getFile)?function(t){return G(this,void 0,void 0,function*(){return(yield Promise.all(t.map(t=>t.getFile()))).map(t=>ot(t))})}(t):[]})},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};Jt.defaultProps=te,Jt.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var ee={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ne(t,e){switch(e.type){case"focus":return Kt(Kt({},t),{},{isFocused:!0});case"blur":return Kt(Kt({},t),{},{isFocused:!1});case"openDialog":return Kt(Kt({},ee),{},{isFileDialogActive:!0});case"closeDialog":return Kt(Kt({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Kt(Kt({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Kt(Kt({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return Kt({},ee);default:return t}}function ie(){}const re=M({});function oe(t){const e=E(null);return null===e.current&&(e.current=t()),e.current}const ae=typeof window<"u",se=ae?F:j,ce=M(null);function le(t,e){-1===t.indexOf(e)&&t.push(e)}function pe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ue=(t,e,n)=>n>e?e:n<t?t:n;function de(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let fe=()=>{},me=()=>{};"production"!==process.env.NODE_ENV&&(fe=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(de(e,n))},me=(t,e,n)=>{if(!t)throw new Error(de(e,n))});const he={},ge=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ve(t){return"object"==typeof t&&null!==t}const xe=t=>/^0[^.\s]+$/u.test(t);function ye(t){let e;return()=>(void 0===e&&(e=t()),e)}const be=t=>t,we=(t,e)=>n=>e(t(n)),Ae=(...t)=>t.reduce(we),Se=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class Pe{constructor(){this.subscriptions=[]}add(t){return le(this.subscriptions,t),()=>pe(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=t=>1e3*t,Te=t=>t/1e3;function ke(t,e){return e?t*(1e3/e):0}const Ee=new Set;function Ie(t,e,n){t||Ee.has(e)||(console.warn(de(e,n)),Ee.add(e))}const je=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function De(t,e,n,i){if(t===e&&n===i)return be;const r=e=>function(t,e,n,i,r){let o,a,s=0;do{a=e+(n-e)/2,o=je(a,i,r)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<12);return a}(e,0,1,t,n);return t=>0===t||1===t?t:je(r(t),e,i)}const Me=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Fe=t=>e=>1-t(1-e),Ue=De(.33,1.53,.69,.99),Re=Fe(Ue),Oe=Me(Re),Le=t=>(t*=2)<1?.5*Re(t):.5*(2-Math.pow(2,-10*(t-1))),Ne=t=>1-Math.sin(Math.acos(t)),Be=Fe(Ne),Ve=Me(Ne),qe=De(.42,0,1,1),ze=De(0,0,.58,1),_e=De(.42,0,.58,1),Ge=t=>Array.isArray(t)&&"number"==typeof t[0],$e={linear:be,easeIn:qe,easeInOut:_e,easeOut:ze,circIn:Ne,circInOut:Ve,circOut:Be,backIn:Re,backInOut:Oe,backOut:Ue,anticipate:Le},He=t=>{if(Ge(t)){me(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return De(e,n,i,r)}return(t=>"string"==typeof t)(t)?(me(void 0!==$e[t],`Invalid easing type '${t}'`,"invalid-easing-type"),$e[t]):t},We=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Xe(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=We.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(e){o.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,r=!1,a=!1)=>{const s=a&&i?e:n;return r&&o.add(t),s.has(t)||s.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[e,n]=[n,e],e.forEach(s),e.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o),t),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:p,update:u,preRender:d,render:f,postRender:m}=a,h=()=>{const o=he.useManualTiming?r.timestamp:performance.now();n=!1,he.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,s.process(r),c.process(r),l.process(r),p.process(r),u.process(r),d.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(h))};return{schedule:We.reduce((e,o)=>{const s=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(h)),s.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<We.length;e++)a[We[e]].cancel(t)},state:r,steps:a}}const{schedule:Ye,cancel:Ke,state:Ze,steps:Qe}=Xe(typeof requestAnimationFrame<"u"?requestAnimationFrame:be,!0);let Je;function tn(){Je=void 0}const en={now:()=>(void 0===Je&&en.set(Ze.isProcessing||he.useManualTiming?Ze.timestamp:performance.now()),Je),set:t=>{Je=t,queueMicrotask(tn)}},nn=t=>e=>"string"==typeof e&&e.startsWith(t),rn=nn("--"),on=nn("var(--"),an=t=>!!on(t)&&sn.test(t.split("/*")[0].trim()),sn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cn={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ln={...cn,transform:t=>ue(0,1,t)},pn={...cn,default:1},un=t=>Math.round(1e5*t)/1e5,dn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const fn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mn=(t,e)=>n=>!!("string"==typeof n&&fn.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),hn=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,a,s]=i.match(dn);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},gn={...cn,transform:t=>Math.round((t=>ue(0,255,t))(t))},vn={test:mn("rgb","red"),parse:hn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+gn.transform(t)+", "+gn.transform(e)+", "+gn.transform(n)+", "+un(ln.transform(i))+")"};const xn={test:mn("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:vn.transform},yn=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),bn=yn("deg"),wn=yn("%"),An=yn("px"),Sn=yn("vh"),Pn=yn("vw"),Cn={...wn,parse:t=>wn.parse(t)/100,transform:t=>wn.transform(100*t)},Tn={test:mn("hsl","hue"),parse:hn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+wn.transform(un(e))+", "+wn.transform(un(n))+", "+un(ln.transform(i))+")"},kn={test:t=>vn.test(t)||xn.test(t)||Tn.test(t),parse:t=>vn.test(t)?vn.parse(t):Tn.test(t)?Tn.parse(t):xn.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?vn.transform(t):Tn.transform(t),getAnimatableNone:t=>{const e=kn.parse(t);return e.alpha=0,kn.transform(e)}},En=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const In="number",jn="color",Dn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(Dn,t=>(kn.test(t)?(i.color.push(o),r.push(jn),n.push(kn.parse(t))):t.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(t)):(i.number.push(o),r.push(In),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:a,indexes:i,types:r}}function Fn(t){return Mn(t).values}function Un(t){const{split:e,types:n}=Mn(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===In?un(t[o]):e===jn?kn.transform(t[o]):t[o]}return r}}const Rn=t=>"number"==typeof t?0:kn.test(t)?kn.getAnimatableNone(t):t;const On={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(dn)?.length||0)+(t.match(En)?.length||0)>0},parse:Fn,createTransformer:Un,getAnimatableNone:function(t){const e=Fn(t);return Un(t)(e.map(Rn))}};function Ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Nn(t,e){return n=>n>0?e:t}const Bn=(t,e,n)=>t+(e-t)*n,Vn=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},qn=[xn,vn,Tn];function zn(t){const e=(t=>qn.find(e=>e.test(t)))(t);if(fe(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Tn&&(n=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;r=Ln(s,i,t+1/3),o=Ln(s,i,t),a=Ln(s,i,t-1/3)}else r=o=a=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*a),alpha:i}}(n)),n}const _n=(t,e)=>{const n=zn(t),i=zn(e);if(!n||!i)return Nn(t,e);const r={...n};return t=>(r.red=Vn(n.red,i.red,t),r.green=Vn(n.green,i.green,t),r.blue=Vn(n.blue,i.blue,t),r.alpha=Bn(n.alpha,i.alpha,t),vn.transform(r))},Gn=new Set(["none","hidden"]);function $n(t,e){return n=>Bn(t,e,n)}function Hn(t){return"number"==typeof t?$n:"string"==typeof t?an(t)?Nn:kn.test(t)?_n:Yn:Array.isArray(t)?Wn:"object"==typeof t?kn.test(t)?_n:Xn:Nn}function Wn(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>Hn(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Xn(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=Hn(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Yn=(t,e)=>{const n=On.createTransformer(e),i=Mn(t),r=Mn(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Gn.has(t)&&!r.values.length||Gn.has(e)&&!i.values.length?function(t,e){return Gn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ae(Wn(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],s=t.values[a]??0;n[r]=s,i[o]++}return n}(i,r),r.values),n):(fe(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Nn(t,e))};function Kn(t,e,n){return"number"==typeof t&&"number"==typeof e&&"number"==typeof n?Bn(t,e,n):Hn(t)(t,e)}const Zn=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Ye.update(e,t),stop:()=>Ke(e),now:()=>Ze.isProcessing?Ze.timestamp:en.now()}},Qn=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Jn=2e4;function ti(t){let e=0;let n=t.next(e);for(;!n.done&&e<Jn;)e+=50,n=t.next(e);return e>=Jn?1/0:e}function ei(t,e,n){const i=Math.max(e-5,0);return ke(n-t(i),e-i)}const ni=100,ii=10,ri=1,oi=0,ai=800,si=.3,ci=.3,li={granular:.01,default:2},pi={granular:.005,default:.5},ui=.01,di=10,fi=.05,mi=1,hi=.001;function gi({duration:t=ai,bounce:e=si,velocity:n=oi,mass:i=ri}){let r,o;fe(t<=Ce(di),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=ue(fi,mi,a),t=ue(ui,di,Te(t)),a<1?(r=e=>{const i=e*a,r=i*t,o=i-n,s=xi(e,a),c=Math.exp(-r);return hi-o/s*c},o=e=>{const i=e*a*t,o=i*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,c=Math.exp(-i),l=xi(Math.pow(e,2),a);return(-r(e)+hi>0?-1:1)*((o-s)*c)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-hi,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let i=n;for(let n=1;n<vi;n++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=Ce(t),isNaN(s))return{stiffness:ni,damping:ii,duration:t};{const e=Math.pow(s,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const vi=12;function xi(t,e){return t*Math.sqrt(1-e*e)}const yi=["duration","bounce"],bi=["stiffness","damping","mass"];function wi(t,e){return e.some(e=>void 0!==t[e])}function Ai(t=ci,e=si){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:p,duration:u,velocity:d,isResolvedFromDuration:f}=function(t){let e={velocity:oi,stiffness:ni,damping:ii,mass:ri,isResolvedFromDuration:!1,...t};if(!wi(t,bi)&&wi(t,yi))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*ue(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:ri,stiffness:r,damping:o}}else{const n=gi(t);e={...e,...n,mass:ri},e.isResolvedFromDuration=!0}return e}({...n,velocity:-Te(n.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(c*p)),g=a-o,v=Te(Math.sqrt(c/p)),x=Math.abs(g)<5;let y;if(i||(i=x?li.granular:li.default),r||(r=x?pi.granular:pi.default),h<1){const t=xi(v,h);y=e=>{const n=Math.exp(-h*v*e);return a-n*((m+h*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===h)y=t=>a-Math.exp(-v*t)*(g+(m+v*g)*t);else{const t=v*Math.sqrt(h*h-1);y=e=>{const n=Math.exp(-h*v*e),i=Math.min(t*e,300);return a-n*((m+h*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:f&&u||null,next:t=>{const e=y(t);if(f)s.done=t>=u;else{let n=0===t?m:0;h<1&&(n=0===t?Ce(m):ei(y,t,e));const o=Math.abs(n)<=i,c=Math.abs(a-e)<=r;s.done=o&&c}return s.value=s.done?a:e,s},toString:()=>{const t=Math.min(ti(b),Jn),e=Qn(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function Si({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:p}){const u=t[0],d={done:!1,value:u},f=t=>void 0===s?c:void 0===c||Math.abs(s-t)<Math.abs(c-t)?s:c;let m=n*e;const h=u+m,g=void 0===a?h:a(h);g!==h&&(m=g-u);const v=t=>-m*Math.exp(-t/i),x=t=>g+v(t),y=t=>{const e=v(t),n=x(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,w;const A=t=>{(t=>void 0!==s&&t<s||void 0!==c&&t>c)(d.value)&&(b=t,w=Ai({keyframes:[d.value,f(d.value)],velocity:ei(x,t,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:p}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return!w&&void 0===b&&(e=!0,y(t),A(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&y(t),d)}}}function Pi(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(me(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||he.mix||Kn,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||be:e;o=Ae(t,o)}i.push(o)}return i}(e,i,r),c=s.length,l=n=>{if(a&&n<t[0])return e[0];let i=0;if(c>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=Se(t[i],t[i+1],n);return s[i](r)};return n?e=>l(ue(t[0],t[o-1],e)):l}function Ci(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Se(0,e,i);t.push(Bn(n,1,r))}}(e,t.length-1),e}function Ti(t,e){return t.map(()=>e||_e).splice(0,t.length-1)}function ki({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(He):He(i),o={done:!1,value:e[0]},a=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ci(e),t),s=Pi(a,e,{ease:Array.isArray(r)?r:Ti(e,r)});return{calculatedDuration:t,next:e=>(o.value=s(e),o.done=e>=t,o)}}Ai.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(ti(i),Jn);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:Te(r)}}(t,100,Ai);return t.ease=e.ease,t.duration=Ce(e.duration),t.type="keyframes",t};const Ei=t=>null!==t;function Ii(t,{repeat:e,repeatType:n="loop"},i,r=1){const o=t.filter(Ei),a=r<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}const ji={decay:Si,inertia:Si,tween:ki,keyframes:ki,spring:Ai};function Di(t){"string"==typeof t.type&&(t.type=ji[t.type])}class Mi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Fi=t=>t/100;class Ui extends Mi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Di(t);const{type:e=ki,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const s=e||ki;"production"!==process.env.NODE_ENV&&s!==ki&&me(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==ki&&"number"!=typeof a[0]&&(this.mixKeyframes=Ae(Fi,Kn(a[0],a[1])),a=[0,100]);const c=s({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=s({...t,keyframes:[...a].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=ti(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:l,repeat:p,repeatType:u,repeatDelay:d,type:f,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,y=n;if(p){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,p+1),!!(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/a)):"mirror"===u&&(y=o)),x=ue(0,1,n)*a}const b=v?{done:!1,value:l[0]}:y.next(x);r&&(b.value=r(b.value));let{done:w}=b;!v&&null!==s&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&f!==Si&&(b.value=Ii(l,this.options,h,this.speed)),m&&m(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return Te(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(en.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Te(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Zn,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ri=t=>180*t/Math.PI,Oi=t=>{const e=Ri(Math.atan2(t[1],t[0]));return Ni(e)},Li={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oi,rotateZ:Oi,skewX:t=>Ri(Math.atan(t[1])),skewY:t=>Ri(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ni=t=>((t%=360)<0&&(t+=360),t),Bi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Vi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),qi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bi,scaleY:Vi,scale:t=>(Bi(t)+Vi(t))/2,rotateX:t=>Ni(Ri(Math.atan2(t[6],t[5]))),rotateY:t=>Ni(Ri(Math.atan2(-t[2],t[0]))),rotateZ:Oi,rotate:Oi,skewX:t=>Ri(Math.atan(t[4])),skewY:t=>Ri(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zi(t){return t.includes("scale")?1:0}function _i(t,e){if(!t||"none"===t)return zi(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=qi,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Li,r=e}if(!r)return zi(e);const o=i[e],a=r[1].split(",").map(Gi);return"function"==typeof o?o(a):a[o]}function Gi(t){return parseFloat(t.trim())}const $i=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hi=new Set($i),Wi=t=>t===cn||t===An,Xi=new Set(["x","y","z"]),Yi=$i.filter(t=>!Xi.has(t));const Ki={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>_i(e,"x"),y:(t,{transform:e})=>_i(e,"y")};Ki.translateX=Ki.x,Ki.translateY=Ki.y;const Zi=new Set;let Qi=!1,Ji=!1,tr=!1;function er(){if(Ji){const t=Array.from(Zi).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Yi.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ji=!1,Qi=!1,Zi.forEach(t=>t.complete(tr)),Zi.clear()}function nr(){Zi.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ji=!0)})}class ir{constructor(t,e,n,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Zi.add(this),Qi||(Qi=!0,Ye.read(nr),Ye.resolveKeyframes(er))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Zi.delete(this)}cancel(){"scheduled"===this.state&&(Zi.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const rr=ye(()=>void 0!==window.ScrollTimeline),or={};function ar(t,e){const n=ye(t);return()=>or[e]??n()}const sr=ar(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,lr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function pr(t,e){if(t)return"function"==typeof t?sr()?Qn(t,e):"ease-out":Ge(t)?cr(t):Array.isArray(t)?t.map(t=>pr(t,e)||lr.easeOut):lr[t]}function ur(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const p={[e]:n};c&&(p.offset=c);const u=pr(s,r);Array.isArray(u)&&(p.easing=u);const d={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(p,d)}function dr(t){return"function"==typeof t&&"applyToOptions"in t}class fr extends Mi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,me("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=function({type:t,...e}){return dr(t)&&sr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=ur(e,n,i,c,r),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=Ii(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"===t||"finished"===t||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Te(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&rr()?(this.animation.timeline=t,be):e(this)}}const mr={anticipate:Le,backInOut:Oe,circInOut:Ve};function hr(t){"string"==typeof t.ease&&function(t){return t in mr}(t.ease)&&(t.ease=mr[t.ease])}class gr extends fr{constructor(t){hr(t),Di(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ui({...o,autoplay:!1}),s=Ce(this.finishedTime??this.time);e.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}const vr=(t,e)=>"zIndex"!==e&&!("number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!On.test(t)&&"0"!==t||t.startsWith("url(")));function xr(t){t.duration=0,t.type="keyframes"}const yr=new Set(["opacity","clipPath","filter","transform"]),br=ye(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class wr extends Mi{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:s,motionValue:c,element:l,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,name:s,motionValue:c,element:l,...p},d=l?.KeyframeResolver||ir;this.keyframeResolver=new d(a,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=en.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],a=vr(r,e),s=vr(o,e);return fe(a===s,`You are trying to animate ${e} from "${r}" to "${o}". "${a?o:r}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||dr(n))&&i)}(t,r,o,a)||((he.instantAnimations||!s)&&l?.(Ii(t,n,e)),t[0]=t[t.length-1],xr(n),n.repeat=0);const p={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=e.owner.getProps();return br()&&n&&yr.has(n)&&("transform"!==n||!c)&&!s&&!i&&"mirror"!==r&&0!==o&&"inertia"!==a}(p)?new gr({...p,element:p.motionValue.owner.current}):new Ui(p);u.finished.then(()=>this.notifyFinished()).catch(be),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tr=!0,nr(),er(),tr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ar=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sr(t,e,n=1){me(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=Ar.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ge(t)?parseFloat(t):t}return an(r)?Sr(r,e,n+1):r}function Pr(t,e){return t?.[e]??t?.default??t}const Cr=new Set(["width","height","top","left","right","bottom",...$i]),Tr=t=>e=>e.test(t),kr=[cn,An,wn,bn,Pn,Sn,{test:t=>"auto"===t,parse:t=>t}],Er=t=>kr.find(Tr(t));function Ir(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||xe(t))}const jr=new Set(["brightness","contrast","saturate","opacity"]);function Dr(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(dn)||[];if(!i)return t;const r=n.replace(i,"");let o=jr.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const Mr=/\b([a-z-]*)\(.*?\)/gu,Fr={...On,getAnimatableNone:t=>{const e=t.match(Mr);return e?e.map(Dr).join(" "):t}},Ur={...cn,transform:Math.round},Rr={borderWidth:An,borderTopWidth:An,borderRightWidth:An,borderBottomWidth:An,borderLeftWidth:An,borderRadius:An,radius:An,borderTopLeftRadius:An,borderTopRightRadius:An,borderBottomRightRadius:An,borderBottomLeftRadius:An,width:An,maxWidth:An,height:An,maxHeight:An,top:An,right:An,bottom:An,left:An,padding:An,paddingTop:An,paddingRight:An,paddingBottom:An,paddingLeft:An,margin:An,marginTop:An,marginRight:An,marginBottom:An,marginLeft:An,backgroundPositionX:An,backgroundPositionY:An,...{rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:pn,scaleX:pn,scaleY:pn,scaleZ:pn,skew:bn,skewX:bn,skewY:bn,distance:An,translateX:An,translateY:An,translateZ:An,x:An,y:An,z:An,perspective:An,transformPerspective:An,opacity:ln,originX:Cn,originY:Cn,originZ:An},zIndex:Ur,fillOpacity:ln,strokeOpacity:ln,numOctaves:Ur},Or={...Rr,color:kn,backgroundColor:kn,outlineColor:kn,fill:kn,stroke:kn,borderColor:kn,borderTopColor:kn,borderRightColor:kn,borderBottomColor:kn,borderLeftColor:kn,filter:Fr,WebkitFilter:Fr},Lr=t=>Or[t];function Nr(t,e){let n=Lr(t);return n!==Fr&&(n=On),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Br=new Set(["auto","none","0"]);class Vr extends ir{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),an(i))){const r=Sr(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Cr.has(n)||2!==t.length)return;const[i,r]=t,o=Er(i),a=Er(r);if(o!==a)if(Wi(o)&&Wi(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Ki[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ir(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Br.has(e)&&Mn(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=Nr(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ki[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,o=n[r];n[r]=Ki[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const qr=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function zr(t){return ve(t)&&"offsetHeight"in t}class _r{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=en.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=en.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&Ie(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Pe);const n=this.events[t].add(e);return"change"===t?()=>{n(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=en.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ke(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(t,e){return new _r(t,e)}const{schedule:$r}=Xe(queueMicrotask,!1),Hr={x:!1,y:!1};function Wr(){return Hr.x||Hr.y}function Xr(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Yr(t){return!("touch"===t.pointerType||Wr())}const Kr=(t,e)=>!!e&&(t===e||Kr(t,e.parentElement)),Zr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Qr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Jr=new WeakSet;function to(t){return e=>{"Enter"===e.key&&t(e)}}function eo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function no(t){return Zr(t)&&!Wr()}function io(t,e,n={}){const[i,r,o]=Xr(t,n),a=t=>{const i=t.currentTarget;if(!no(t))return;Jr.add(i);const o=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",c),Jr.has(i)&&Jr.delete(i),no(t)&&"function"==typeof o&&o(t,{success:e})},s=t=>{a(t,i===window||i===document||n.useGlobalTarget||Kr(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",s,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),zr(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=to(()=>{if(Jr.has(n))return;eo(n,"down");const t=to(()=>{eo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>eo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),!function(t){return Qr.has(t.tagName)||-1!==t.tabIndex}(t)&&!t.hasAttribute("tabindex")&&(t.tabIndex=0))}),o}function ro(t){return ve(t)&&"ownerSVGElement"in t}const oo=t=>!(!t||!t.getVelocity),ao=[...kr,kn,On],so=M({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function co(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function lo(...t){return A.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=co(t,e);return!n&&"function"==typeof i&&(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():co(t[e],null)}}}}(...t),t)}class po extends A.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=zr(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function uo({children:e,isPresent:n,anchorX:i,root:r}){const o=U(),a=E(null),s=E({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=R(so),l=lo(a,e?.ref);return O(()=>{const{width:t,height:e,top:l,left:p,right:u}=s.current;if(n||!a.current||!t||!e)return;const d="left"===i?`left: ${p}`:`right: ${u}`;a.current.dataset.motionPopId=o;const f=document.createElement("style");c&&(f.nonce=c);const m=r??document.head;return m.appendChild(f),f.sheet&&f.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${l}px !important;\n }\n `),()=>{m.contains(f)&&m.removeChild(f)}},[n]),t.jsx(po,{isPresent:n,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:l})})}const fo=({children:e,initial:n,isPresent:i,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:s,anchorX:c,root:l})=>{const p=oe(mo),u=U();let d=!0,f=k(()=>(d=!1,{id:u,initial:n,isPresent:i,custom:o,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;r&&r()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[i,p,r]);return a&&d&&(f={...f}),k(()=>{p.forEach((t,e)=>p.set(e,!1))},[i]),A.useEffect(()=>{!i&&!p.size&&r&&r()},[i]),"popLayout"===s&&(e=t.jsx(uo,{isPresent:i,anchorX:c,root:l,children:e})),t.jsx(ce.Provider,{value:f,children:e})};function mo(){return new Map}function ho(t=!0){const e=R(ce);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,o=U();j(()=>{if(t)return r(o)},[t]);const a=D(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,a]:[!0]}const go=t=>t.key||"";function vo(t){const e=[];return L.forEach(t,t=>{N(t)&&e.push(t)}),e}const xo=({children:e,custom:n,initial:i=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:s=!1,anchorX:c="left",root:l})=>{const[p,u]=ho(s),d=k(()=>vo(e),[e]),f=s&&!p?[]:d.map(go),m=E(!0),h=E(d),g=oe(()=>new Map),[v,x]=B(d),[y,b]=B(d);se(()=>{m.current=!1,h.current=d;for(let t=0;t<y.length;t++){const e=go(y[t]);f.includes(e)?g.delete(e):!0!==g.get(e)&&g.set(e,!1)}},[y,f.length,f.join("-")]);const w=[];if(d!==v){let t=[...d];for(let e=0;e<y.length;e++){const n=y[e],i=go(n);f.includes(i)||(t.splice(e,0,n),w.push(n))}return"wait"===a&&w.length&&(t=w),b(vo(t)),x(d),null}"production"!==process.env.NODE_ENV&&"wait"===a&&y.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:A}=R(re);return t.jsx(t.Fragment,{children:y.map(e=>{const v=go(e),x=!(s&&!p)&&(d===y||f.includes(v));return t.jsx(fo,{isPresent:x,initial:!(m.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:a,root:l,onExitComplete:x?void 0:()=>{if(!g.has(v))return;g.set(v,!0);let t=!0;g.forEach(e=>{e||(t=!1)}),t&&(A?.(),b(h.current),s&&u?.(),r&&r())},anchorX:c,children:e},v)})})},yo=M({strict:!1}),bo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},wo={};for(const t in bo)wo[t]={isEnabled:e=>bo[t].some(t=>!!e[t])};const Ao=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function So(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ao.has(t)}let Po=t=>!So(t);try{"function"==typeof(Co=require("@emotion/is-prop-valid").default)&&(Po=t=>t.startsWith("on")?!So(t):Co(t))}catch{}var Co;const To=M({});function ko(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Eo(t){return"string"==typeof t||Array.isArray(t)}const Io=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jo=["initial",...Io];function Do(t){return ko(t.animate)||jo.some(e=>Eo(t[e]))}function Mo(t){return!(!Do(t)&&!t.variants)}function Fo(t){const{initial:e,animate:n}=function(t,e){if(Do(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Eo(e)?e:void 0,animate:Eo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,R(To));return k(()=>({initial:e,animate:n}),[Uo(e),Uo(n)])}function Uo(t){return Array.isArray(t)?t.join(" "):t}const Ro={};function Oo(t,{layout:e,layoutId:n}){return Hi.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ro[t]||"opacity"===t)}const Lo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},No=$i.length;function Bo(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let a=!1,s=!1;for(const t in e){const n=e[t];if(Hi.has(t))a=!0;else if(rn(t))r[t]=n;else{const e=qr(n,Rr[t]);t.startsWith("origin")?(s=!0,o[t]=e):i[t]=e}}if(e.transform||(a||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<No;o++){const a=$i[o],s=t[a];if(void 0===s)continue;let c=!0;if(c="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!c||n){const t=qr(s,Rr[a]);c||(r=!1,i+=`${Lo[a]||a}(${t}) `),n&&(e[a]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),s){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Vo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qo(t,e,n){for(const i in e)!oo(e[i])&&!Oo(i,n)&&(t[i]=e[i])}function zo(t,e){const n={};return qo(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return k(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Bo(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function _o(t,e){const n={},i=zo(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function Ho(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...s},c,l,p){if(Bo(t,s,l),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=p?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Go:$o;t[o.offset]=An.transform(-i);const a=An.transform(e),s=An.transform(n);t[o.array]=`${a} ${s}`}(u,r,o,a,!1)}const Wo=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Xo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Yo(t,e,n,i){const r=k(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ho(n,e,Xo(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};qo(e,t.style,t),r.style={...e,...r.style}}return r}const Ko=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Zo(t){return"string"==typeof t&&!t.includes("-")&&!!(Ko.indexOf(t)>-1||/[A-Z]/u.test(t))}function Qo(t,e,n,{latestValues:i},r,o=!1){const a=(Zo(t)?Yo:_o)(e,i,r,t),s=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(Po(r)||!0===n&&So(r)||!e&&!So(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(e,"string"==typeof t,o),c=t!==T?{...s,...a,ref:n}:{},{children:l}=e,p=k(()=>oo(l)?l.get():l,[l]);return V(t,{...c,children:p})}function Jo(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ta(t,e,n,i){if("function"==typeof e){const[r,o]=Jo(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=Jo(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function ea(t){return oo(t)?t.get():t}function na(t,e,n,i){const r={},o=i(t,{});for(const t in o)r[t]=ea(o[t]);let{initial:a,animate:s}=t;const c=Do(t),l=Mo(t);e&&l&&!c&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===s&&(s=e.animate));let p=!!n&&!1===n.initial;p=p||!1===a;const u=p?s:a;if(u&&"boolean"!=typeof u&&!ko(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=ta(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[p?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}const ia=t=>(e,n)=>{const i=R(To),r=R(ce),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:na(n,i,r,t),renderState:e()}}(t,e,i,r);return n?o():oe(o)};function ra(t,e,n){const{style:i}=t,r={};for(const o in i)(oo(i[o])||e.style&&oo(e.style[o])||Oo(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(r[o]=i[o]);return r}const oa=ia({scrapeMotionValuesFromProps:ra,createRenderState:Vo});function aa(t,e,n){const i=ra(t,e,n);for(const n in t)if(oo(t[n])||oo(e[n])){i[-1!==$i.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const sa=ia({scrapeMotionValuesFromProps:aa,createRenderState:Wo}),ca=Symbol.for("motionComponentSymbol");function la(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function pa(t,e,n){return D(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):la(n)&&(n.current=i))},[e])}const ua=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),da="data-"+ua("framerAppearId"),fa=M({});function ma(t,e,n,i,r){const{visualElement:o}=R(To),a=R(yo),s=R(ce),c=R(so).reducedMotion,l=E(null);i=i||a.renderer,!l.current&&i&&(l.current=i(t,{visualState:e,parent:o,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:c}));const p=l.current,u=R(fa);p&&!p.projection&&r&&("html"===p.type||"svg"===p.type)&&function(t,e,n,i){const{layoutId:r,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ha(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||s&&la(s),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:c,layoutRoot:l})}(l.current,n,r,u);const d=E(!1);O(()=>{p&&d.current&&p.update(n,s)});const f=n[da],m=E(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return se(()=>{p&&(d.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),m.current&&p.animationState&&p.animationState.animateChanges())}),j(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),m.current=!1),p.enteringChildren=void 0)}),p}function ha(t){if(t)return!1!==t.options.allowProjection?t.projection:ha(t.parent)}function ga(e,{forwardMotionProps:n=!1}={},i,r){i&&function(t){for(const e in t)wo[e]={...wo[e],...t[e]}}(i);const o=Zo(e)?sa:oa;function a(a,s){let c;const l={...R(so),...a,layoutId:va(a)},{isStatic:p}=l,u=Fo(a),d=o(a,p);if(!p&&ae){!function(t,e){const n=R(yo).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?fe(!1,e,"lazy-strict-mode"):me(!1,e,"lazy-strict-mode")}}(l,i);const t=function(t){const{drag:e,layout:n}=wo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);c=t.MeasureLayout,u.visualElement=ma(e,d,l,r,t.ProjectionNode)}return t.jsxs(To.Provider,{value:u,children:[c&&u.visualElement?t.jsx(c,{visualElement:u.visualElement,...l}):null,Qo(e,a,pa(d,u.visualElement,s),d,p,n)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const s=P(a);return s[ca]=e,s}function va({layoutId:t}){const e=R(re).id;return e&&void 0!==t?e+"-"+t:t}function xa(t,e){if(typeof Proxy>"u")return ga;const n=new Map,i=(n,i)=>ga(n,i,t,e);return new Proxy((t,e)=>("production"!==process.env.NODE_ENV&&Ie(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(r,o)=>"create"===o?i:(n.has(o)||n.set(o,ga(o,void 0,t,e)),n.get(o))})}function ya({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ba(t){return void 0===t||1===t}function wa({scale:t,scaleX:e,scaleY:n}){return!ba(t)||!ba(e)||!ba(n)}function Aa(t){return wa(t)||Sa(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Sa(t){return Pa(t.x)||Pa(t.y)}function Pa(t){return t&&"0%"!==t}function Ca(t,e,n){return n+e*(t-n)}function Ta(t,e,n,i,r){return void 0!==r&&(t=Ca(t,r,i)),Ca(t,n,i)+e}function ka(t,e=0,n=1,i,r){t.min=Ta(t.min,e,n,i,r),t.max=Ta(t.max,e,n,i,r)}function Ea(t,{x:e,y:n}){ka(t.x,e.translate,e.scale,e.originPoint),ka(t.y,n.translate,n.scale,n.originPoint)}const Ia=.999999999999,ja=1.0000000000001;function Da(t,e){t.min=t.min+e,t.max=t.max+e}function Ma(t,e,n,i,r=.5){ka(t,e,n,Bn(t.min,t.max,r),i)}function Fa(t,e){Ma(t.x,e.x,e.scaleX,e.scale,e.originX),Ma(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ua(t,e){return ya(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Ra=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Oa={current:null},La={current:!1};const Na=new WeakMap;const Ba=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Va{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ir,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=en.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Ye.render(this.render,!1,!0))};const{latestValues:s,renderState:c}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Do(e),this.isVariantNode=Mo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!t||!t.current);const{willChange:l,...p}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in p){const e=p[t];void 0!==s[t]&&oo(e)&&e.set(s[t])}}mount(t){this.current=t,Na.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),La.current||function(){if(La.current=!0,ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Oa.current=t.matches;t.addEventListener("change",e),e()}else Oa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Oa.current),"production"!==process.env.NODE_ENV&&Ie(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ke(this.notifyUpdate),Ke(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Hi.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in wo){const e=wo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ba.length;e++){const n=Ba[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(oo(r))t.addValue(i,r);else if(oo(o))t.addValue(i,Gr(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Gr(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Gr(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(ge(n)||xe(n))?n=parseFloat(n):!(t=>ao.find(Tr(t)))(n)&&On.test(e)&&(n=Nr(t,e)),this.setBaseTarget(t,oo(n)?n.get():n)),oo(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ta(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||oo(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Pe),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){$r.render(this.render)}}class qa extends Va{constructor(){super(...arguments),this.KeyframeResolver=Vr}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;oo(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function za(t,{style:e,vars:n},i,r){const o=t.style;let a;for(a in e)o[a]=e[a];for(a in r?.applyProjectionStyles(o,i),n)o.setProperty(a,n[a])}class _a extends qa{constructor(){super(...arguments),this.type="html",this.renderInstance=za}readValueFromInstance(t,e){if(Hi.has(e))return this.projection?.isProjecting?zi(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return _i(n,e)})(t,e);{const n=function(t){return window.getComputedStyle(t)}(t),i=(rn(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ua(t,e)}build(t,e,n){Bo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ra(t,e,n)}}const Ga=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class $a extends qa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ra}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Hi.has(e)){const t=Lr(e);return t&&t.default||0}return e=Ga.has(e)?e:ua(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return aa(t,e,n)}build(t,e,n){Ho(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){za(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ga.has(n)?n:ua(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}const Ha=(t,e)=>Zo(t)?new $a(e):new _a(e,{allowProjection:t!==T});function Wa(t,e,n){const i=t.getProps();return ta(i,e,void 0!==n?n:i.custom,t)}const Xa=t=>Array.isArray(t);function Ya(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gr(n))}function Ka(t){return Xa(t)?t[t.length-1]||0:t}function Za(t,e){const n=t.getValue("willChange");if(function(t){return!(!oo(t)||!t.add)}(n))return n.add(e);if(!n&&he.WillChange){const n=new he.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Qa(t){return t.props[da]}const Ja=t=>null!==t;const ts={type:"spring",stiffness:500,damping:25,restSpeed:10},es={type:"keyframes",duration:.8},ns={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},is=(t,{keyframes:e})=>e.length>2?es:Hi.has(t)?t.startsWith("scale")?(t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}))(e[1]):ts:ns;const rs=(t,e,n,i={},r,o)=>a=>{const s=Pr(i,t)||{},c=s.delay||i.delay||0;let{elapsed:l=0}=i;l-=Ce(c);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...s,delay:-l,onUpdate:t=>{e.set(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...p}){return!!Object.keys(p).length})(s)||Object.assign(p,is(t,p)),p.duration&&(p.duration=Ce(p.duration)),p.repeatDelay&&(p.repeatDelay=Ce(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let u=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(xr(p),0===p.delay&&(u=!0)),(he.instantAnimations||he.skipAnimations)&&(u=!0,xr(p),p.delay=0),p.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"}){const i=t.filter(Ja);return i[e&&"loop"!==n&&e%2==1?0:i.length-1]}(p.keyframes,s);if(void 0!==t)return void Ye.update(()=>{p.onUpdate(t),p.onComplete()})}return s.isSync?new Ui(p):new wr(p)};function os({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function as(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:a,...s}=e;i&&(o=i);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in s){const i=t.getValue(e,t.latestValues[e]??null),r=s[e];if(void 0===r||l&&os(l,e))continue;const a={delay:n,...Pr(o||{},e)},p=i.get();if(void 0!==p&&!i.isAnimating&&!Array.isArray(r)&&r===p&&!a.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Qa(t);if(n){const t=window.MotionHandoffAnimation(n,e,Ye);null!==t&&(a.startTime=t,u=!0)}}Za(t,e),i.start(rs(e,i,r,t.shouldReduceMotion&&Cr.has(e)?{type:!1}:a,t,u));const d=i.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{Ye.update(()=>{a&&function(t,e){const n=Wa(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const e in o)Ya(t,e,Ka(o[e]))}(t,a)})}),c}function ss(t,e,n,i=0,r=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,s=(a-1)*i;return"function"==typeof n?n(o,a):1===r?o*i:s-o*i}function cs(t,e,n={}){const i=Wa(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(as(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=r;return function(t,e,n=0,i=0,r=0,o=1,a){const s=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),s.push(cs(c,e,{...a,delay:n+("function"==typeof i?0:i)+ss(t.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(s)}(t,e,i,o,a,s,n)}:()=>Promise.resolve(),{when:s}=r;if(s){const[t,e]="beforeChildren"===s?[o,a]:[a,o];return t().then(()=>e())}return Promise.all([o(),a(n.delay)])}function ls(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ps=jo.length;function us(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&us(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<ps;n++){const i=jo[n],r=t.props[i];(Eo(r)||!1===r)&&(e[i]=r)}return e}const ds=[...Io].reverse(),fs=Io.length;function ms(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>cs(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=cs(t,e,n);else{const r="function"==typeof e?Wa(t,e,n.custom):e;i=Promise.all(as(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function hs(t){let e=ms(t),n=xs(),i=!0;const r=e=>(n,i)=>{const r=Wa(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function o(o){const{props:a}=t,s=us(t.parent)||{},c=[],l=new Set;let p={},u=1/0;for(let e=0;e<fs;e++){const d=ds[e],f=n[d],m=void 0!==a[d]?a[d]:s[d],h=Eo(m),g=d===o?f.isActive:null;!1===g&&(u=e);let v=m===s[d]&&m!==a[d]&&h;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...p},!f.isActive&&null===g||!m&&!f.prevProp||ko(m)||"boolean"==typeof m)continue;const x=gs(f.prevProp,m);let y=x||d===o&&f.isActive&&!v&&h||e>u&&h,b=!1;const w=Array.isArray(m)?m:[m];let A=w.reduce(r(d),{});!1===g&&(A={});const{prevResolvedValues:S={}}=f,P={...S,...A},C=e=>{y=!0,l.has(e)&&(b=!0,l.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=A[t],n=S[t];if(p.hasOwnProperty(t))continue;let i=!1;i=Xa(e)&&Xa(n)?!ls(e,n):e!==n,i?null!=e?C(t):l.add(t):void 0!==e&&l.has(t)?C(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=A,f.isActive&&(p={...p,...A}),i&&t.blockInitialAnimation&&(y=!1);const T=v&&x;y&&(!T||b)&&c.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!T&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,r=Wa(i,e);if(i.enteringChildren&&r){const{delayChildren:e}=r.transition||{};n.delay=ss(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof a.initial){const n=Wa(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let d=!!c.length;return i&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(d=!1),i=!1,d?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=xs()}}}function gs(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ls(e,t)}function vs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xs(){return{animate:vs(!0),whileInView:vs(),whileHover:vs(),whileTap:vs(),whileDrag:vs(),whileFocus:vs(),exit:vs()}}class ys{constructor(t){this.isMounted=!1,this.node=t}update(){}}let bs=0;const ws={animation:{Feature:class extends ys{constructor(t){super(t),t.animationState||(t.animationState=hs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ko(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ys{constructor(){super(...arguments),this.id=bs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function As(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Ss(t){return{point:{x:t.pageX,y:t.pageY}}}function Ps(t,e,n,i){return As(t,e,(t=>e=>Zr(e)&&t(e,Ss(e)))(n),i)}function Cs(t){return t.max-t.min}function Ts(t,e,n,i=.5){t.origin=i,t.originPoint=Bn(e.min,e.max,t.origin),t.scale=Cs(n)/Cs(e),t.translate=Bn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function ks(t,e,n,i){Ts(t.x,e.x,n.x,i?i.originX:void 0),Ts(t.y,e.y,n.y,i?i.originY:void 0)}function Es(t,e,n){t.min=n.min+e.min,t.max=t.min+Cs(e)}function Is(t,e,n){t.min=e.min-n.min,t.max=t.min+Cs(e)}function js(t,e,n){Is(t.x,e.x,n.x),Is(t.y,e.y,n.y)}function Ds(t){return[t("x"),t("y")]}const Ms=({current:t})=>t?t.ownerDocument.defaultView:null,Fs=(t,e)=>Math.abs(t-e);class Us{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ls(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Fs(t.x,e.x),i=Fs(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Ze;this.history.push({...i,timestamp:r});const{onStart:o,onMove:a}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Rs(e,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ls("pointercancel"===t.type?this.lastMoveEventInfo:Rs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Zr(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Rs(Ss(t),this.transformPagePoint),{point:s}=a,{timestamp:c}=Ze;this.history=[{...s,timestamp:c}];const{onSessionStart:l}=e;l&&l(t,Ls(a,this.history)),this.removeListeners=Ae(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ke(this.updatePoint)}}function Rs(t,e){return e?{point:e(t.point)}:t}function Os(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ls({point:t},e){return{point:t,delta:Os(t,Bs(e)),offset:Os(t,Ns(e)),velocity:Vs(e,.1)}}function Ns(t){return t[0]}function Bs(t){return t[t.length-1]}function Vs(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Bs(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Ce(e)));)n--;if(!i)return{x:0,y:0};const o=Te(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const a={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function qs(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function zs(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const _s=.35;function Gs(t,e,n){return{min:$s(t,e),max:$s(t,n)}}function $s(t,e){return"number"==typeof t?t:t[e]||0}const Hs=new WeakMap;class Ws{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Us(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ss(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){return"x"===t||"y"===t?Hr[t]?null:(Hr[t]=!0,()=>{Hr[t]=!1}):Hr.x||Hr.y?null:(Hr.x=Hr.y=!0,()=>{Hr.x=Hr.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ds(t=>{let e=this.getAxisMotionValue(t).get()||0;if(wn.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];i&&(e=Cs(i)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&Ye.postRender(()=>r(t,e)),Za(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(a),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Ds(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:n,contextWindow:Ms(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Ye.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Xs(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Bn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Bn(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&la(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:qs(t.x,n,r),y:qs(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=_s){return!1===t?t=0:!0===t&&(t=_s),{x:Gs(t,"left","right"),y:Gs(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ds(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!la(t))return!1;const n=t.current;me(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=Ua(t,n),{scroll:r}=e;return r&&(Da(i.x,r.offset.x),Da(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:zs(t.x,e.x),y:zs(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ya(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},c=Ds(a=>{if(!Xs(a,e,this.currentDirection))return;let c=s&&s[a]||{};o&&(c={min:0,max:0});const l=i?200:1e6,p=i?40:1e7,u={type:"inertia",velocity:n?t[a]:0,bounceStiffness:l,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...c};return this.startAxisValueAnimation(a,u)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Za(this.visualElement,t),n.start(rs(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ds(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ds(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ds(e=>{const{drag:n}=this.getProps();if(!Xs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-Bn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!la(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ds(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Cs(t),r=Cs(e);return r>i?n=Se(e.min,e.max-i,t.min):i>r&&(n=Se(t.min,t.max-r,e.min)),ue(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ds(e=>{if(!Xs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(Bn(r,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Hs.set(this.visualElement,this);const t=Ps(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();la(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ye.read(e);const r=As(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ds(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=_s,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Xs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ys=t=>(e,n)=>{t&&Ye.postRender(()=>t(e,n))};const Ks={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qs={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!An.test(t))return t;t=parseFloat(t)}return`${Zs(t,e.target.x)}% ${Zs(t,e.target.y)}%`}},Js={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=On.parse(t);if(r.length>5)return i;const o=On.createTransformer(t),a="number"!=typeof r[0]?1:0,s=n.x.scale*e.x,c=n.y.scale*e.y;r[0+a]/=s,r[1+a]/=c;const l=Bn(s,c,.5);return"number"==typeof r[2+a]&&(r[2+a]/=l),"number"==typeof r[3+a]&&(r[3+a]/=l),o(r)}};let tc=!1;class ec extends q{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;(function(t){for(const e in t)Ro[e]=t[e],rn(e)&&(Ro[e].isCSSVariable=!0)})(ic),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),tc&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ks.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:o}=n;return o&&(o.isPresent=r,tc=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||Ye.postRender(()=>{const t=o.getStack();(!t||!t.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$r.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;tc=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nc(e){const[n,i]=ho(),r=R(re);return t.jsx(ec,{...e,layoutGroup:r,switchLayoutGroup:R(fa),isPresent:n,safeToRemove:i})}const ic={borderRadius:{...Qs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qs,borderTopRightRadius:Qs,borderBottomLeftRadius:Qs,borderBottomRightRadius:Qs,boxShadow:Js};const rc=(t,e)=>t.depth-e.depth;class oc{constructor(){this.children=[],this.isDirty=!1}add(t){le(this.children,t),this.isDirty=!0}remove(t){pe(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rc),this.isDirty=!1,this.children.forEach(t)}}const ac=["TopLeft","TopRight","BottomLeft","BottomRight"],sc=ac.length,cc=t=>"string"==typeof t?parseFloat(t):t,lc=t=>"number"==typeof t||An.test(t);function pc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const uc=fc(0,.5,Be),dc=fc(.5,.95,be);function fc(t,e,n){return i=>i<t?0:i>e?1:n(Se(t,e,i))}function mc(t,e){t.min=e.min,t.max=e.max}function hc(t,e){mc(t.x,e.x),mc(t.y,e.y)}function gc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function vc(t,e,n,i,r){return t=Ca(t-=e,1/n,i),void 0!==r&&(t=Ca(t,1/r,i)),t}function xc(t,e,[n,i,r],o,a){!function(t,e=0,n=1,i=.5,r,o=t,a=t){if(wn.test(e)&&(e=parseFloat(e),e=Bn(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let s=Bn(o.min,o.max,i);t===o&&(s-=e),t.min=vc(t.min,e,n,s,r),t.max=vc(t.max,e,n,s,r)}(t,e[n],e[i],e[r],e.scale,o,a)}const yc=["x","scaleX","originX"],bc=["y","scaleY","originY"];function wc(t,e,n,i){xc(t.x,e,yc,n?n.x:void 0,i?i.x:void 0),xc(t.y,e,bc,n?n.y:void 0,i?i.y:void 0)}function Ac(t){return 0===t.translate&&1===t.scale}function Sc(t){return Ac(t.x)&&Ac(t.y)}function Pc(t,e){return t.min===e.min&&t.max===e.max}function Cc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Tc(t,e){return Cc(t.x,e.x)&&Cc(t.y,e.y)}function kc(t){return Cs(t.x)/Cs(t.y)}function Ec(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ic{constructor(){this.members=[]}add(t){le(this.members,t),t.scheduleRender()}remove(t){if(pe(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const jc=["","X","Y","Z"];let Dc=0;function Mc(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Fc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Qa(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Fc(i)}function Uc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=Dc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Lc),this.nodes.forEach(Gc),this.nodes.forEach($c),this.nodes.forEach(Nc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new oc)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Pe),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ro(e)&&!function(t){return ro(t)&&"svg"===t.tagName}(e),this.instance=e;const{layoutId:n,layout:i,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const r=()=>this.root.updateBlockedByResize=!1;Ye.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=en.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Ke(i),t(o-e))};return Ye.setup(i,!0),()=>Ke(i)}(r,250),Ks.hasAnimatedSinceResize&&(Ks.hasAnimatedSinceResize=!1,this.nodes.forEach(_c)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&r&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||r.getDefaultTransition()||Zc,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=r.getProps(),c=!this.targetLayout||!Tc(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Pr(o,"layout"),onPlay:a,onComplete:s};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,l)}else e||_c(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ke(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Hc),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Vc);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(qc);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(zc),this.nodes.forEach(Rc),this.nodes.forEach(Oc)):this.nodes.forEach(qc),this.clearAllSnapshots();const t=en.now();Ze.delta=ue(0,1e3/60,t-Ze.timestamp),Ze.timestamp=t,Ze.isProcessing=!0,Qe.update.process(Ze),Qe.preRender.process(Ze),Qe.render.process(Ze),Ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$r.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bc),this.sharedNodes.forEach(Wc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Cs(this.snapshot.measuredBox.x)&&!Cs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Sc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Aa(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),function(t){tl(t.x),tl(t.y)}(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(nl)){const{scroll:t}=this.root;t&&(Da(e.x,t.offset.x),Da(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(hc(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&hc(e,t),Da(e.x,r.offset.x),Da(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};hc(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Fa(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Aa(i.latestValues)&&Fa(n,i.latestValues)}return Aa(this.latestValues)&&Fa(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};hc(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance||!Aa(n.latestValues))continue;wa(n.latestValues)&&n.updateSnapshot();const i=Ra();hc(i,n.measurePageBox()),wc(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Aa(this.latestValues)&&wc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=!!this.resumingFrom||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Ze.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),hc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(t,e,n){Es(t.x,e.x,n.x),Es(t.y,e.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hc(this.target,this.layout.layoutBox),Ea(this.target,this.targetDelta)):hc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.target,t.target),hc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!wa(this.parent.latestValues)&&!Sa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){const t=this.getLead(),e=!!this.resumingFrom||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ze.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;hc(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;(function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,a;e.x=e.y=1;for(let s=0;s<r;s++){o=n[s],a=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Fa(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,Ea(t,a)),i&&Aa(o.latestValues)&&Fa(t,o.latestValues))}e.x<ja&&e.x>Ia&&(e.x=1),e.y<ja&&e.y>Ia&&(e.y=1)})(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=t;s?(this.projectionDelta&&this.prevProjectionDelta?(gc(this.prevProjectionDelta.x,this.projectionDelta.x),gc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ks(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==o||this.treeScale.y!==a||!Ec(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ec(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,p=!(!s||l||!0!==this.options.crossfade||this.path.some(Kc));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;Xc(o.x,t.x,n),Xc(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(js(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Yc(t.x,e.x,n.x,i),Yc(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,a,n),u&&function(t,e){return Pc(t.x,e.x)&&Pc(t.y,e.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),hc(u,this.relativeTarget)),s&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=Bn(0,n.opacity??1,uc(i)),t.opacityExit=Bn(e.opacity??1,0,dc(i))):o&&(t.opacity=Bn(e.opacity??1,n.opacity??1,i));for(let r=0;r<sc;r++){const o=`border${ac[r]}Radius`;let a=pc(e,o),s=pc(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||lc(a)===lc(s)?(t[o]=Math.max(Bn(cc(a),cc(s),i),0),(wn.test(s)||wn.test(a))&&(t[o]+="%")):t[o]=s)}(e.rotate||n.rotate)&&(t.rotate=Bn(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,p,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{Ks.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gr(0)),this.currentAnimation=function(t,e,n){const i=oo(t)?t:Gr(t);return i.start(rs("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&el(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Cs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Cs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}hc(e,n),Fa(e,r),ks(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ic),this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Mc("z",t,i,this.animationValues);for(let e=0;e<jc.length;e++)Mc(`rotate${jc[e]}`,t,i,this.animationValues),Mc(`skew${jc[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=ea(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ea(e?.pointerEvents)||""),void(this.hasProjected&&!Aa(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const r=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,a=n?.z||0;if((r||o||a)&&(i=`translate3d(${r}px, ${o}px, ${a}px) `),(1!==e.x||1!==e.y)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:a,skewY:s}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),a&&(i+=`skewX(${a}deg) `),s&&(i+=`skewY(${s}deg) `)}const s=t.x.scale*e.x,c=t.y.scale*e.y;return(1!==s||1!==c)&&(i+=`scale(${s}, ${c})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);n&&(o=n(r,o)),t.transform=o;const{x:a,y:s}=this.projectionDelta;t.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,i.animationValues?t.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const e in Ro){if(void 0===r[e])continue;const{correct:n,applyTo:a,isCSSVariable:s}=Ro[e],c="none"===o?r[e]:n(r[e],i);if(a){const e=a.length;for(let n=0;n<e;n++)t[a[n]]=c}else s?this.options.visualElement.renderState.vars[e]=c:t[e]=c}this.options.layoutId&&(t.pointerEvents=i===this?ea(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Vc),this.root.sharedNodes.clear()}}}function Rc(t){t.updateLayout()}function Oc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;"size"===r?Ds(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],r=Cs(i);i.min=n[t].min,i.max=i.min+r}):el(r,e.layoutBox,n)&&Ds(i=>{const r=o?e.measuredBox[i]:e.layoutBox[i],a=Cs(n[i]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ks(a,n,e.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?ks(s,t.applyTransform(i,!0),e.measuredBox):ks(s,n,e.layoutBox);const c=!Sc(a);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const a={x:{min:0,max:0},y:{min:0,max:0}};js(a,e.layoutBox,r.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};js(s,n,o.layoutBox),Tc(a,s)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=s,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Lc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Nc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bc(t){t.clearSnapshot()}function Vc(t){t.clearMeasurements()}function qc(t){t.isLayoutDirty=!1}function zc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _c(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gc(t){t.resolveTargetDelta()}function $c(t){t.calcProjection()}function Hc(t){t.resetSkewAndRotation()}function Wc(t){t.removeLeadSnapshot()}function Xc(t,e,n){t.translate=Bn(e.translate,0,n),t.scale=Bn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yc(t,e,n,i){t.min=Bn(e.min,n.min,i),t.max=Bn(e.max,n.max,i)}function Kc(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zc={duration:.45,ease:[.4,0,.1,1]},Qc=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Jc=Qc("applewebkit/")&&!Qc("chrome/")?Math.round:be;function tl(t){t.min=Jc(t.min),t.max=Jc(t.max)}function el(t,e,n){return"position"===t||"preserve-aspect"===t&&!function(t,e,n){return Math.abs(t-e)<=n}(kc(e),kc(n),.2)}function nl(t){return t!==t.root&&t.scroll?.wasRoot}const il=Uc({attachResizeListener:(t,e)=>As(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rl={current:void 0},ol=Uc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rl.current){const t=new il({});t.mount(window),t.setOptions({layoutScroll:!0}),rl.current=t}return rl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),al={pan:{Feature:class extends ys{constructor(){super(...arguments),this.removePointerDownListener=be}onPointerDown(t){this.session=new Us(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ms(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ys(t),onStart:Ys(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Ye.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ys{constructor(t){super(t),this.removeGroupControls=be,this.removeListeners=be,this.controls=new Ws(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||be}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ol,MeasureLayout:nc}};function sl(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&Ye.postRender(()=>r(e,Ss(e)))}function cl(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&Ye.postRender(()=>r(e,Ss(e)))}const ll=new WeakMap,pl=new WeakMap,ul=t=>{const e=ll.get(t.target);e&&e(t)},dl=t=>{t.forEach(ul)};function fl(t,e,n){const i=function({root:t,...e}){const n=t||document;pl.has(n)||pl.set(n,{});const i=pl.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(dl,{root:t,...e})),i[r]}(e);return ll.set(t,n),i.observe(t),()=>{ll.delete(t),i.unobserve(t)}}const ml={some:0,all:1};const hl={inView:{Feature:class extends ys{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:ml[i]};return fl(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ys{mount(){const{current:t}=this.node;t&&(this.unmount=io(t,(t,e)=>(cl(this.node,e,"Start"),(t,{success:e})=>cl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends ys{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ae(As(this.node.current,"focus",()=>this.onFocus()),As(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ys{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,o]=Xr(t,n),a=t=>{if(!Yr(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Yr(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,r)};return i.forEach(t=>{t.addEventListener("pointerenter",a,r)}),o}(t,(t,e)=>(sl(this.node,e,"Start"),t=>sl(this.node,t,"End"))))}unmount(){}}}},gl=xa({...ws,...hl,...al,...{layout:{ProjectionNode:ol,MeasureLayout:nc}}},Ha);function vl(t,e){return new Promise(function(n,i){let r;return xl(t).then(function(t){try{return r=t,n(new Blob([e.slice(0,2),r,e.slice(2)],{type:"image/jpeg"}))}catch(t){return i(t)}},i)})}const xl=t=>new Promise((e,n)=>{const i=new FileReader;i.addEventListener("load",({target:{result:t}})=>{const i=new DataView(t);let r=0;if(65496!==i.getUint16(r))return n("not a valid JPEG");for(r+=2;;){const o=i.getUint16(r);if(65498===o)break;const a=i.getUint16(r+2);if(65505===o&&1165519206===i.getUint32(r+4)){const o=r+10;let s;switch(i.getUint16(o)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==i.getUint16(o+2,s))return n("TIFF header contains invalid version");const c=i.getUint32(o+4,s),l=o+c+2+12*i.getUint16(o+c,s);for(let t=o+c+2;t<l;t+=12)if(274==i.getUint16(t,s)){if(3!==i.getUint16(t+2,s))return n("Orientation data type is invalid");if(1!==i.getUint32(t+4,s))return n("Orientation data count is invalid");i.setUint16(t+8,1,s);break}return e(t.slice(r,r+2+a))}r+=2+a}return e(new Blob)}),i.readAsArrayBuffer(t)});var yl,bl,wl,Al={},Sl={get exports(){return Al},set exports(t){Al=t}};wl={},Sl.exports=wl,wl.parse=function(t,e){for(var n=wl.bin.readUshort,i=wl.bin.readUint,r=0,o={},a=new Uint8Array(t),s=a.length-4;101010256!=i(a,s);)s--;r=s,r+=4;var c=n(a,r+=4);n(a,r+=2);var l=i(a,r+=2),p=i(a,r+=4);r+=4,r=p;for(var u=0;u<c;u++){i(a,r),r+=4,r+=4,r+=4,i(a,r+=4),l=i(a,r+=4);var d=i(a,r+=4),f=n(a,r+=4),m=n(a,r+2),h=n(a,r+4);r+=6;var g=i(a,r+=8);r+=4,r+=f+m+h,wl._readLocal(a,g,o,l,d,e)}return o},wl._readLocal=function(t,e,n,i,r,o){var a=wl.bin.readUshort,s=wl.bin.readUint;s(t,e),a(t,e+=4),a(t,e+=2);var c=a(t,e+=2);s(t,e+=2),s(t,e+=4),e+=4;var l=a(t,e+=8),p=a(t,e+=2);e+=2;var u=wl.bin.readUTF8(t,e,l);if(e+=l,e+=p,o)n[u]={size:r,csize:i};else{var d=new Uint8Array(t.buffer,e);if(0==c)n[u]=new Uint8Array(d.buffer.slice(e,e+i));else{if(8!=c)throw"unknown compression method: "+c;var f=new Uint8Array(r);wl.inflateRaw(d,f),n[u]=f}}},wl.inflateRaw=function(t,e){return wl.F.inflate(t,e)},wl.inflate=function(t,e){return t[0],t[1],wl.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),e)},wl.deflate=function(t,e){null==e&&(e={level:6});var n=0,i=new Uint8Array(50+Math.floor(1.1*t.length));i[n]=120,i[n+1]=156,n+=2,n=wl.F.deflateRaw(t,i,n,e.level);var r=wl.adler(t,0,t.length);return i[n+0]=r>>>24&255,i[n+1]=r>>>16&255,i[n+2]=r>>>8&255,i[n+3]=r>>>0&255,new Uint8Array(i.buffer,0,n+4)},wl.deflateRaw=function(t,e){null==e&&(e={level:6});var n=new Uint8Array(50+Math.floor(1.1*t.length)),i=wl.F.deflateRaw(t,n,i,e.level);return new Uint8Array(n.buffer,0,i)},wl.encode=function(t,e){null==e&&(e=!1);var n=0,i=wl.bin.writeUint,r=wl.bin.writeUshort,o={};for(var a in t){var s=!wl._noNeed(a)&&!e,c=t[a],l=wl.crc.crc(c,0,c.length);o[a]={cpr:s,usize:c.length,crc:l,file:s?wl.deflateRaw(c):c}}for(var a in o)n+=o[a].file.length+30+46+2*wl.bin.sizeUTF8(a);n+=22;var p=new Uint8Array(n),u=0,d=[];for(var a in o){var f=o[a];d.push(u),u=wl._writeHeader(p,u,a,f,0)}var m=0,h=u;for(var a in o)f=o[a],d.push(u),u=wl._writeHeader(p,u,a,f,1,d[m++]);var g=u-h;return i(p,u,101010256),u+=4,r(p,u+=4,m),r(p,u+=2,m),i(p,u+=2,g),i(p,u+=4,h),u+=4,u+=2,p.buffer},wl._noNeed=function(t){var e=t.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(e)},wl._writeHeader=function(t,e,n,i,r,o){var a=wl.bin.writeUint,s=wl.bin.writeUshort,c=i.file;return a(t,e,0==r?67324752:33639248),e+=4,1==r&&(e+=2),s(t,e,20),s(t,e+=2,0),s(t,e+=2,i.cpr?8:0),a(t,e+=2,0),a(t,e+=4,i.crc),a(t,e+=4,c.length),a(t,e+=4,i.usize),s(t,e+=4,wl.bin.sizeUTF8(n)),s(t,e+=2,0),e+=2,1==r&&(e+=2,e+=2,a(t,e+=6,o),e+=4),e+=wl.bin.writeUTF8(t,e,n),0==r&&(t.set(c,e),e+=c.length),e},wl.crc={table:function(){for(var t=new Uint32Array(256),e=0;e<256;e++){for(var n=e,i=0;i<8;i++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update:function(t,e,n,i){for(var r=0;r<i;r++)t=wl.crc.table[255&(t^e[n+r])]^t>>>8;return t},crc:function(t,e,n){return 4294967295^wl.crc.update(4294967295,t,e,n)}},wl.adler=function(t,e,n){for(var i=1,r=0,o=e,a=e+n;o<a;){for(var s=Math.min(o+5552,a);o<s;)r+=i+=t[o++];i%=65521,r%=65521}return r<<16|i},wl.bin={readUshort:function(t,e){return t[e]|t[e+1]<<8},writeUshort:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255},readUint:function(t,e){return 16777216*t[e+3]+(t[e+2]<<16|t[e+1]<<8|t[e])},writeUint:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255,t[e+2]=n>>16&255,t[e+3]=n>>24&255},readASCII:function(t,e,n){for(var i="",r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII:function(t,e,n){for(var i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,e,n){for(var i,r="",o=0;o<n;o++)r+="%"+wl.bin.pad(t[e+o].toString(16));try{i=decodeURIComponent(r)}catch{return wl.bin.readASCII(t,e,n)}return i},writeUTF8:function(t,e,n){for(var i=n.length,r=0,o=0;o<i;o++){var a=n.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";t[e+r]=240|a>>18,t[e+r+1]=128|a>>12&63,t[e+r+2]=128|a>>6&63,t[e+r+3]=128|63&a,r+=4}else t[e+r]=224|a>>12,t[e+r+1]=128|a>>6&63,t[e+r+2]=128|63&a,r+=3;else t[e+r]=192|a>>6,t[e+r+1]=128|63&a,r+=2;else t[e+r]=a,r++}return r},sizeUTF8:function(t){for(var e=t.length,n=0,i=0;i<e;i++){var r=t.charCodeAt(i);if(4294967168&r)if(4294965248&r)if(4294901760&r){if(4292870144&r)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},wl.F={},wl.F.deflateRaw=function(t,e,n,i){var r=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=wl.F.U,a=wl.F._goodIndex;wl.F._hash;var s=wl.F._putsE,c=0,l=n<<3,p=0,u=t.length;if(0==i){for(;c<u;)s(e,l,c+(S=Math.min(65535,u-c))==u?1:0),l=wl.F._copyExact(t,c,S,e,l+8),c+=S;return l>>>3}var d=o.lits,f=o.strt,m=o.prev,h=0,g=0,v=0,x=0,y=0,b=0;for(u>2&&(f[b=wl.F._hash(t,0)]=0),c=0;c<u;c++){if(y=b,c+1<u-2){b=wl.F._hash(t,c+1);var w=c+1&32767;m[w]=f[b],f[b]=w}if(p<=c){(h>14e3||g>26697)&&u-c>100&&(p<c&&(d[h]=c-p,h+=2,p=c),l=wl.F._writeBlock(c==u-1||p==u?1:0,d,h,x,t,v,c-v,e,l),h=g=x=0,v=c);var A=0;c<u-2&&(A=wl.F._bestMatch(t,c,m,y,Math.min(r[2],u-c),r[3]));var S=A>>>16,P=65535&A;if(0!=A){P=65535&A;var C=a(S=A>>>16,o.of0);o.lhst[257+C]++;var T=a(P,o.df0);o.dhst[T]++,x+=o.exb[C]+o.dxb[T],d[h]=S<<23|c-p,d[h+1]=P<<16|C<<8|T,h+=2,p=c+S}else o.lhst[t[c]]++;g++}}for(v==c&&0!=t.length||(p<c&&(d[h]=c-p,h+=2,p=c),l=wl.F._writeBlock(1,d,h,x,t,v,c-v,e,l),h=0,g=0,h=g=x=0,v=c);7&l;)l++;return l>>>3},wl.F._bestMatch=function(t,e,n,i,r,o){var a=32767&e,s=n[a],c=a-s+32768&32767;if(s==a||i!=wl.F._hash(t,e-c))return 0;for(var l=0,p=0,u=Math.min(32767,e);c<=u&&0!=--o&&s!=a;){if(0==l||t[e+l]==t[e+l-c]){var d=wl.F._howLong(t,e,c);if(d>l){if(p=c,(l=d)>=r)break;c+2<d&&(d=c+2);for(var f=0,m=0;m<d-2;m++){var h=e-c+m+32768&32767,g=h-n[h]+32768&32767;g>f&&(f=g,s=h)}}}c+=(a=s)-(s=n[a])+32768&32767}return l<<16|p},wl.F._howLong=function(t,e,n){if(t[e]!=t[e-n]||t[e+1]!=t[e+1-n]||t[e+2]!=t[e+2-n])return 0;var i=e,r=Math.min(t.length,e+258);for(e+=3;e<r&&t[e]==t[e-n];)e++;return e-i},wl.F._hash=function(t,e){return(t[e]<<8|t[e+1])+(t[e+2]<<4)&65535},wl.saved=0,wl.F._writeBlock=function(t,e,n,i,r,o,a,s,c){var l,p,u,d,f,m,h,g,v,x=wl.F.U,y=wl.F._putsF,b=wl.F._putsE;x.lhst[256]++,p=(l=wl.F.getTrees())[0],u=l[1],d=l[2],f=l[3],m=l[4],h=l[5],g=l[6],v=l[7];var w=32+(c+3&7?8-(c+3&7):0)+(a<<3),A=i+wl.F.contSize(x.fltree,x.lhst)+wl.F.contSize(x.fdtree,x.dhst),S=i+wl.F.contSize(x.ltree,x.lhst)+wl.F.contSize(x.dtree,x.dhst);S+=14+3*h+wl.F.contSize(x.itree,x.ihst)+(2*x.ihst[16]+3*x.ihst[17]+7*x.ihst[18]);for(var P=0;P<286;P++)x.lhst[P]=0;for(P=0;P<30;P++)x.dhst[P]=0;for(P=0;P<19;P++)x.ihst[P]=0;var C=w<A&&w<S?0:A<S?1:2;if(y(s,c,t),y(s,c+1,C),c+=3,0==C){for(;7&c;)c++;c=wl.F._copyExact(r,o,a,s,c)}else{var T,k;if(1==C&&(T=x.fltree,k=x.fdtree),2==C){wl.F.makeCodes(x.ltree,p),wl.F.revCodes(x.ltree,p),wl.F.makeCodes(x.dtree,u),wl.F.revCodes(x.dtree,u),wl.F.makeCodes(x.itree,d),wl.F.revCodes(x.itree,d),T=x.ltree,k=x.dtree,b(s,c,f-257),b(s,c+=5,m-1),b(s,c+=5,h-4),c+=4;for(var E=0;E<h;E++)b(s,c+3*E,x.itree[1+(x.ordr[E]<<1)]);c+=3*h,c=wl.F._codeTiny(g,x.itree,s,c),c=wl.F._codeTiny(v,x.itree,s,c)}for(var I=o,j=0;j<n;j+=2){for(var D=e[j],M=D>>>23,F=I+(8388607&D);I<F;)c=wl.F._writeLit(r[I++],T,s,c);if(0!=M){var U=e[j+1],R=U>>16,O=U>>8&255,L=255&U;b(s,c=wl.F._writeLit(257+O,T,s,c),M-x.of0[O]),c+=x.exb[O],y(s,c=wl.F._writeLit(L,k,s,c),R-x.df0[L]),c+=x.dxb[L],I+=M}}c=wl.F._writeLit(256,T,s,c)}return c},wl.F._copyExact=function(t,e,n,i,r){var o=r>>>3;return i[o]=n,i[o+1]=n>>>8,i[o+2]=255-i[o],i[o+3]=255-i[o+1],o+=4,i.set(new Uint8Array(t.buffer,e,n),o),r+(n+4<<3)},wl.F.getTrees=function(){for(var t=wl.F.U,e=wl.F._hufTree(t.lhst,t.ltree,15),n=wl.F._hufTree(t.dhst,t.dtree,15),i=[],r=wl.F._lenCodes(t.ltree,i),o=[],a=wl.F._lenCodes(t.dtree,o),s=0;s<i.length;s+=2)t.ihst[i[s]]++;for(s=0;s<o.length;s+=2)t.ihst[o[s]]++;for(var c=wl.F._hufTree(t.ihst,t.itree,7),l=19;l>4&&0==t.itree[1+(t.ordr[l-1]<<1)];)l--;return[e,n,c,r,a,l,i,o]},wl.F.getSecond=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(t[n+1]);return e},wl.F.nonZero=function(t){for(var e="",n=0;n<t.length;n+=2)0!=t[n+1]&&(e+=(n>>1)+",");return e},wl.F.contSize=function(t,e){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[1+(i<<1)];return n},wl.F._codeTiny=function(t,e,n,i){for(var r=0;r<t.length;r+=2){var o=t[r],a=t[r+1];i=wl.F._writeLit(o,e,n,i);var s=16==o?2:17==o?3:7;o>15&&(wl.F._putsE(n,i,a,s),i+=s)}return i},wl.F._lenCodes=function(t,e){for(var n=t.length;2!=n&&0==t[n-1];)n-=2;for(var i=0;i<n;i+=2){var r=t[i+1],o=i+3<n?t[i+3]:-1,a=i+5<n?t[i+5]:-1,s=0==i?-1:t[i-1];if(0==r&&o==r&&a==r){for(var c=i+5;c+2<n&&t[c+2]==r;)c+=2;(l=Math.min(c+1-i>>>1,138))<11?e.push(17,l-3):e.push(18,l-11),i+=2*l-2}else if(r==s&&o==r&&a==r){for(c=i+5;c+2<n&&t[c+2]==r;)c+=2;var l=Math.min(c+1-i>>>1,6);e.push(16,l-3),i+=2*l-2}else e.push(r,0)}return n>>>1},wl.F._hufTree=function(t,e,n){var i=[],r=t.length,o=e.length,a=0;for(a=0;a<o;a+=2)e[a]=0,e[a+1]=0;for(a=0;a<r;a++)0!=t[a]&&i.push({lit:a,f:t[a]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,e[1+(l<<1)]=1,e[1+(c<<1)]=1,1}i.sort(function(t,e){return t.f-e.f});var p=i[0],u=i[1],d=0,f=1,m=2;for(i[0]={lit:-1,f:p.f+u.f,l:p,r:u,d:0};f!=s-1;)p=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],u=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],i[f++]={lit:-1,f:p.f+u.f,l:p,r:u};var h=wl.F.setDepth(i[f-1],0);for(h>n&&(wl.F.restrictDepth(c,n,h),h=n),a=0;a<s;a++)e[1+(c[a].lit<<1)]=c[a].d;return h},wl.F.setDepth=function(t,e){return-1!=t.lit?(t.d=e,e):Math.max(wl.F.setDepth(t.l,e+1),wl.F.setDepth(t.r,e+1))},wl.F.restrictDepth=function(t,e,n){var i=0,r=1<<n-e,o=0;for(t.sort(function(t,e){return e.d==t.d?t.f-e.f:e.d-t.d}),i=0;i<t.length&&t[i].d>e;i++){var a=t[i].d;t[i].d=e,o+=r-(1<<n-a)}for(o>>>=n-e;o>0;)(a=t[i].d)<e?(t[i].d++,o-=1<<e-a-1):i++;for(;i>=0;i--)t[i].d==e&&o<0&&(t[i].d--,o++);0!=o&&console.log("debt left")},wl.F._goodIndex=function(t,e){var n=0;return e[16|n]<=t&&(n|=16),e[8|n]<=t&&(n|=8),e[4|n]<=t&&(n|=4),e[2|n]<=t&&(n|=2),e[1|n]<=t&&(n|=1),n},wl.F._writeLit=function(t,e,n,i){return wl.F._putsF(n,i,e[t<<1]),i+e[1+(t<<1)]},wl.F.inflate=function(t,e){var n=Uint8Array;if(3==t[0]&&0==t[1])return e||new n(0);var i=wl.F,r=i._bitsF,o=i._bitsE,a=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,p=i.U,u=null==e;u&&(e=new n(t.length>>>2<<3));for(var d,f,m=0,h=0,g=0,v=0,x=0,y=0,b=0,w=0,A=0;0==m;)if(m=r(t,A,1),h=r(t,A+1,2),A+=3,0!=h){if(u&&(e=wl.F._check(e,w+(1<<17))),1==h&&(d=p.flmap,f=p.fdmap,y=511,b=31),2==h){g=o(t,A,5)+257,v=o(t,A+5,5)+1,x=o(t,A+10,4)+4,A+=14;for(var S=0;S<38;S+=2)p.itree[S]=0,p.itree[S+1]=0;var P=1;for(S=0;S<x;S++){var C=o(t,A+3*S,3);p.itree[1+(p.ordr[S]<<1)]=C,C>P&&(P=C)}A+=3*x,s(p.itree,P),c(p.itree,P,p.imap),d=p.lmap,f=p.dmap,A=a(p.imap,(1<<P)-1,g+v,t,A,p.ttree);var T=i._copyOut(p.ttree,0,g,p.ltree);y=(1<<T)-1;var k=i._copyOut(p.ttree,g,v,p.dtree);b=(1<<k)-1,s(p.ltree,T),c(p.ltree,T,d),s(p.dtree,k),c(p.dtree,k,f)}for(;;){var E=d[l(t,A)&y];A+=15&E;var I=E>>>4;if(I>>>8){if(256==I)break;var j=w+I-254;if(I>264){var D=p.ldef[I-257];j=w+(D>>>3)+o(t,A,7&D),A+=7&D}var M=f[l(t,A)&b];A+=15&M;var F=M>>>4,U=p.ddef[F],R=(U>>>4)+r(t,A,15&U);for(A+=15&U,u&&(e=wl.F._check(e,w+(1<<17)));w<j;)e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R];w=j}else e[w++]=I}}else{7&A&&(A+=8-(7&A));var O=4+(A>>>3),L=t[O-4]|t[O-3]<<8;u&&(e=wl.F._check(e,w+L)),e.set(new n(t.buffer,t.byteOffset+O,L),w),A=O+L<<3,w+=L}return e.length==w?e:e.slice(0,w)},wl.F._check=function(t,e){var n=t.length;if(e<=n)return t;var i=new Uint8Array(Math.max(n<<1,e));return i.set(t,0),i},wl.F._decodeTiny=function(t,e,n,i,r,o){for(var a=wl.F._bitsE,s=wl.F._get17,c=0;c<n;){var l=t[s(i,r)&e];r+=15&l;var p=l>>>4;if(p<=15)o[c]=p,c++;else{var u=0,d=0;16==p?(d=3+a(i,r,2),r+=2,u=o[c-1]):17==p?(d=3+a(i,r,3),r+=3):18==p&&(d=11+a(i,r,7),r+=7);for(var f=c+d;c<f;)o[c]=u,c++}}return r},wl.F._copyOut=function(t,e,n,i){for(var r=0,o=0,a=i.length>>>1;o<n;){var s=t[o+e];i[o<<1]=0,i[1+(o<<1)]=s,s>r&&(r=s),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},wl.F.makeCodes=function(t,e){for(var n,i,r,o,a=wl.F.U,s=t.length,c=a.bl_count,l=0;l<=e;l++)c[l]=0;for(l=1;l<s;l+=2)c[t[l]]++;var p=a.next_code;for(n=0,c[0]=0,i=1;i<=e;i++)n=n+c[i-1]<<1,p[i]=n;for(r=0;r<s;r+=2)0!=(o=t[r+1])&&(t[r]=p[o],p[o]++)},wl.F.codes2map=function(t,e,n){for(var i=t.length,r=wl.F.U.rev15,o=0;o<i;o+=2)if(0!=t[o+1])for(var a=o>>1,s=t[o+1],c=a<<4|s,l=e-s,p=t[o]<<l,u=p+(1<<l);p!=u;)n[r[p]>>>15-e]=c,p++},wl.F.revCodes=function(t,e){for(var n=wl.F.U.rev15,i=15-e,r=0;r<t.length;r+=2){var o=t[r]<<e-t[r+1];t[r]=n[o]>>>i}},wl.F._putsE=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},wl.F._putsF=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},wl.F._bitsE=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},wl.F._bitsF=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},wl.F._get17=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},wl.F._get25=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},wl.F.U=(yl=Uint16Array,bl=Uint32Array,{next_code:new yl(16),bl_count:new yl(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new yl(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new bl(32),flmap:new yl(512),fltree:[],fdmap:new yl(32),fdtree:[],lmap:new yl(32768),ltree:[],ttree:[],dmap:new yl(32768),dtree:[],imap:new yl(512),itree:[],rev15:new yl(32768),lhst:new bl(286),dhst:new bl(30),ihst:new bl(19),lits:new bl(15e3),strt:new yl(65536),prev:new yl(32768)}),function(){for(var t=wl.F.U,e=0;e<32768;e++){var n=e;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,t.rev15[e]=(n>>>16|n<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(e=0;e<32;e++)t.ldef[e]=t.of0[e]<<3|t.exb[e],t.ddef[e]=t.df0[e]<<4|t.dxb[e];i(t.fltree,144,8),i(t.fltree,112,9),i(t.fltree,24,7),i(t.fltree,8,8),wl.F.makeCodes(t.fltree,9),wl.F.codes2map(t.fltree,9,t.flmap),wl.F.revCodes(t.fltree,9),i(t.fdtree,32,5),wl.F.makeCodes(t.fdtree,5),wl.F.codes2map(t.fdtree,5,t.fdmap),wl.F.revCodes(t.fdtree,5),i(t.itree,19,0),i(t.ltree,286,0),i(t.dtree,30,0),i(t.ttree,320,0)}();var Pl=function(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})}),Object.freeze(t)}({__proto__:null,default:Al},[Al]);const Cl=function(){var t={nextZero(t,e){for(;0!=t[e];)e++;return e},readUshort:(t,e)=>t[e]<<8|t[e+1],writeUshort(t,e,n){t[e]=n>>8&255,t[e+1]=255&n},readUint:(t,e)=>16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3]),writeUint(t,e,n){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},readASCII(t,e,n){let i="";for(let r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},readBytes(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t[e+r]);return i},pad:t=>t.length<2?`0${t}`:t,readUTF8(e,n,i){let r,o="";for(let r=0;r<i;r++)o+=`%${t.pad(e[n+r].toString(16))}`;try{r=decodeURIComponent(o)}catch{return t.readASCII(e,n,i)}return r}};function e(e,n,i,r){const a=n*i,s=o(r),c=Math.ceil(n*s/8),l=new Uint8Array(4*a),p=new Uint32Array(l.buffer),{ctype:u}=r,{depth:d}=r,f=t.readUshort;if(6==u){const t=a<<2;if(8==d)for(var m=0;m<t;m+=4)l[m]=e[m],l[m+1]=e[m+1],l[m+2]=e[m+2],l[m+3]=e[m+3];if(16==d)for(m=0;m<t;m++)l[m]=e[m<<1]}else if(2==u){const t=r.tabs.tRNS;if(null==t){if(8==d)for(m=0;m<a;m++){var h=3*m;p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h]}if(16==d)for(m=0;m<a;m++)h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h]}else{var g=t[0];const n=t[1],i=t[2];if(8==d)for(m=0;m<a;m++){var v=m<<2;h=3*m,p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h],e[h]==g&&e[h+1]==n&&e[h+2]==i&&(l[v+3]=0)}if(16==d)for(m=0;m<a;m++)v=m<<2,h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h],f(e,h)==g&&f(e,h+2)==n&&f(e,h+4)==i&&(l[v+3]=0)}}else if(3==u){const t=r.tabs.PLTE,o=r.tabs.tRNS,s=o?o.length:0;if(1==d)for(var x=0;x<i;x++){var y=x*c,b=x*n;for(m=0;m<n;m++){v=b+m<<2;var w=3*(A=e[y+(m>>3)]>>7-(7&m)&1);l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}if(2==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>2)]>>6-((3&m)<<1)&3),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(4==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>1)]>>4-((1&m)<<2)&15),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(8==d)for(m=0;m<a;m++){var A;v=m<<2,w=3*(A=e[m]),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}else if(4==u){if(8==d)for(m=0;m<a;m++){v=m<<2;var S=e[P=m<<1];l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[P+1]}if(16==d)for(m=0;m<a;m++){var P;v=m<<2,S=e[P=m<<2],l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[P+2]}}else if(0==u)for(g=r.tabs.tRNS?r.tabs.tRNS:-1,x=0;x<i;x++){const t=x*c,i=x*n;if(1==d)for(var C=0;C<n;C++){var T=(S=255*(e[t+(C>>>3)]>>>7-(7&C)&1))==255*g?0:255;p[i+C]=T<<24|S<<16|S<<8|S}else if(2==d)for(C=0;C<n;C++)T=(S=85*(e[t+(C>>>2)]>>>6-((3&C)<<1)&3))==85*g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(4==d)for(C=0;C<n;C++)T=(S=17*(e[t+(C>>>1)]>>>4-((1&C)<<2)&15))==17*g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(8==d)for(C=0;C<n;C++)T=(S=e[t+C])==g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(16==d)for(C=0;C<n;C++)S=e[t+(C<<1)],T=f(e,t+(C<<1))==g?0:255,p[i+C]=T<<24|S<<16|S<<8|S}return l}function n(t,e,n,s){const c=o(t),l=Math.ceil(n*c/8),p=new Uint8Array((l+1+t.interlace)*s);return e=t.tabs.CgBI?r(e,p):i(e,p),0==t.interlace?e=a(e,t,0,n,s):1==t.interlace&&(e=function(t,e){const n=e.width,i=e.height,r=o(e),s=r>>3,c=Math.ceil(n*r/8),l=new Uint8Array(i*c);let p=0;const u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1];let h=0;for(;h<7;){const o=f[h],v=m[h];let x=0,y=0,b=u[h];for(;b<i;)b+=o,y++;let w=d[h];for(;w<n;)w+=v,x++;const A=Math.ceil(x*r/8);a(t,e,p,x,y);let S=0,P=u[h];for(;P<i;){let e=d[h],i=p+S*A<<3;for(;e<n;){var g;if(1==r&&(g=(g=t[i>>3])>>7-(7&i)&1,l[P*c+(e>>3)]|=g<<7-(7&e)),2==r&&(g=(g=t[i>>3])>>6-(7&i)&3,l[P*c+(e>>2)]|=g<<6-((3&e)<<1)),4==r&&(g=(g=t[i>>3])>>4-(7&i)&15,l[P*c+(e>>1)]|=g<<4-((1&e)<<2)),r>=8){const n=P*c+e*s;for(let e=0;e<s;e++)l[n+e]=t[(i>>3)+e]}i+=r,e+=v}S++,P+=o}x*y!=0&&(p+=y*(1+A)),h+=1}return l}(e,t)),e}function i(t,e){return r(new Uint8Array(t.buffer,2,t.length-6),e)}var r=function(){const t={H:{}};return t.H.N=function(e,n){const i=Uint8Array;let r,o,a=0,s=0,c=0,l=0,p=0,u=0,d=0,f=0,m=0;if(3==e[0]&&0==e[1])return n||new i(0);const h=t.H,g=h.b,v=h.e,x=h.R,y=h.n,b=h.A,w=h.Z,A=h.m,S=null==n;for(S&&(n=new i(e.length>>>2<<5));0==a;)if(a=g(e,m,1),s=g(e,m+1,2),m+=3,0!=s){if(S&&(n=t.H.W(n,f+(1<<17))),1==s&&(r=A.J,o=A.h,u=511,d=31),2==s){c=v(e,m,5)+257,l=v(e,m+5,5)+1,p=v(e,m+10,4)+4,m+=14;let t=1;for(var P=0;P<38;P+=2)A.Q[P]=0,A.Q[P+1]=0;for(P=0;P<p;P++){const n=v(e,m+3*P,3);A.Q[1+(A.X[P]<<1)]=n,n>t&&(t=n)}m+=3*p,y(A.Q,t),b(A.Q,t,A.u),r=A.w,o=A.d,m=x(A.u,(1<<t)-1,c+l,e,m,A.v);const n=h.V(A.v,0,c,A.C);u=(1<<n)-1;const i=h.V(A.v,c,l,A.D);d=(1<<i)-1,y(A.C,n),b(A.C,n,r),y(A.D,i),b(A.D,i,o)}for(;;){const t=r[w(e,m)&u];m+=15&t;const i=t>>>4;if(i>>>8){if(256==i)break;{let t=f+i-254;if(i>264){const n=A.q[i-257];t=f+(n>>>3)+v(e,m,7&n),m+=7&n}const r=o[w(e,m)&d];m+=15&r;const a=r>>>4,s=A.c[a],c=(s>>>4)+g(e,m,15&s);for(m+=15&s;f<t;)n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c];f=t}}else n[f++]=i}}else{7&m&&(m+=8-(7&m));const r=4+(m>>>3),o=e[r-4]|e[r-3]<<8;S&&(n=t.H.W(n,f+o)),n.set(new i(e.buffer,e.byteOffset+r,o),f),m=r+o<<3,f+=o}return n.length==f?n:n.slice(0,f)},t.H.W=function(t,e){const n=t.length;if(e<=n)return t;const i=new Uint8Array(n<<1);return i.set(t,0),i},t.H.R=function(e,n,i,r,o,a){const s=t.H.e,c=t.H.Z;let l=0;for(;l<i;){const t=e[c(r,o)&n];o+=15&t;const i=t>>>4;if(i<=15)a[l]=i,l++;else{let t=0,e=0;16==i?(e=3+s(r,o,2),o+=2,t=a[l-1]):17==i?(e=3+s(r,o,3),o+=3):18==i&&(e=11+s(r,o,7),o+=7);const n=l+e;for(;l<n;)a[l]=t,l++}}return o},t.H.V=function(t,e,n,i){let r=0,o=0;const a=i.length>>>1;for(;o<n;){const n=t[o+e];i[o<<1]=0,i[1+(o<<1)]=n,n>r&&(r=n),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},t.H.n=function(e,n){const i=t.H.m,r=e.length;let o,a,s,c;const l=i.j;for(var p=0;p<=n;p++)l[p]=0;for(p=1;p<r;p+=2)l[e[p]]++;const u=i.K;for(o=0,l[0]=0,a=1;a<=n;a++)o=o+l[a-1]<<1,u[a]=o;for(s=0;s<r;s+=2)c=e[s+1],0!=c&&(e[s]=u[c],u[c]++)},t.H.A=function(e,n,i){const r=e.length,o=t.H.m.r;for(let t=0;t<r;t+=2)if(0!=e[t+1]){const r=t>>1,a=e[t+1],s=r<<4|a,c=n-a;let l=e[t]<<c;const p=l+(1<<c);for(;l!=p;)i[o[l]>>>15-n]=s,l++}},t.H.l=function(e,n){const i=t.H.m.r,r=15-n;for(let t=0;t<e.length;t+=2){const o=e[t]<<n-e[t+1];e[t]=i[o]>>>r}},t.H.M=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},t.H.I=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},t.H.e=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},t.H.b=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},t.H.Z=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},t.H.i=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},t.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const e=t.H.m;for(var n=0;n<32768;n++){let t=n;t=(2863311530&t)>>>1|(1431655765&t)<<1,t=(3435973836&t)>>>2|(858993459&t)<<2,t=(4042322160&t)>>>4|(252645135&t)<<4,t=(4278255360&t)>>>8|(16711935&t)<<8,e.r[n]=(t>>>16|t<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(n=0;n<32;n++)e.q[n]=e.S[n]<<3|e.T[n],e.c[n]=e.p[n]<<4|e.z[n];i(e._,144,8),i(e._,112,9),i(e._,24,7),i(e._,8,8),t.H.n(e._,9),t.H.A(e._,9,e.J),t.H.l(e._,9),i(e.$,32,5),t.H.n(e.$,5),t.H.A(e.$,5,e.h),t.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),t.H.N}();function o(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth}function a(t,e,n,i,r){let a=o(e);const c=Math.ceil(i*a/8);let l,p;a=Math.ceil(a/8);let u=t[n],d=0;if(u>1&&(t[n]=[0,0,1][u-2]),3==u)for(d=a;d<c;d++)t[d+1]=t[d+1]+(t[d+1-a]>>>1)&255;for(let e=0;e<r;e++)if(l=n+e*c,p=l+e+1,u=t[p-1],d=0,0==u)for(;d<c;d++)t[l+d]=t[p+d];else if(1==u){for(;d<a;d++)t[l+d]=t[p+d];for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-a]}else if(2==u)for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-c];else if(3==u){for(;d<a;d++)t[l+d]=t[p+d]+(t[l+d-c]>>>1);for(;d<c;d++)t[l+d]=t[p+d]+(t[l+d-c]+t[l+d-a]>>>1)}else{for(;d<a;d++)t[l+d]=t[p+d]+s(0,t[l+d-c],0);for(;d<c;d++)t[l+d]=t[p+d]+s(t[l+d-a],t[l+d-c],t[l+d-a-c])}return t}function s(t,e,n){const i=t+e-n,r=i-t,o=i-e,a=i-n;return r*r<=o*o&&r*r<=a*a?t:o*o<=a*a?e:n}function c(e,n,i){i.width=t.readUint(e,n),n+=4,i.height=t.readUint(e,n),n+=4,i.depth=e[n],n++,i.ctype=e[n],n++,i.compress=e[n],n++,i.filter=e[n],n++,i.interlace=e[n],n++}function l(t,e,n,i,r,o,a,s,c){const l=Math.min(e,r),p=Math.min(n,o);let u=0,d=0;for(let n=0;n<p;n++)for(let o=0;o<l;o++)if(a>=0&&s>=0?(u=n*e+o<<2,d=(s+n)*r+a+o<<2):(u=(-s+n)*e-a+o<<2,d=n*r+o<<2),0==c)i[d]=t[u],i[d+1]=t[u+1],i[d+2]=t[u+2],i[d+3]=t[u+3];else if(1==c){var f=.00392156862745098*t[u+3],m=t[u]*f,h=t[u+1]*f,g=t[u+2]*f,v=i[d+3]*(1/255),x=i[d]*v,y=i[d+1]*v,b=i[d+2]*v;const e=1-f,n=f+v*e,r=0==n?0:1/n;i[d+3]=255*n,i[d+0]=(m+x*e)*r,i[d+1]=(h+y*e)*r,i[d+2]=(g+b*e)*r}else if(2==c)f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=m,i[d+1]=h,i[d+2]=g,i[d+3]=f);else if(3==c){if(f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b)continue;if(f<220&&v>20)return!1}return!0}return{decode:function(e){const o=new Uint8Array(e);let a=8;const s=t,l=s.readUshort,p=s.readUint,u={tabs:{},frames:[]},d=new Uint8Array(o.length);let f,m=0,h=0;const g=[137,80,78,71,13,10,26,10];for(var v=0;v<8;v++)if(o[v]!=g[v])throw"The input is not a PNG file!";for(;a<o.length;){const t=s.readUint(o,a);a+=4;const e=s.readASCII(o,a,4);if(a+=4,"IHDR"==e)c(o,a,u);else if("iCCP"==e){for(var x=a;0!=o[x];)x++;s.readASCII(o,a,x-a),o[x+1];const n=o.slice(x+2,a+t);let c=null;try{c=i(n)}catch{c=r(n)}u.tabs[e]=c}else if("CgBI"==e)u.tabs[e]=o.slice(a,a+4);else if("IDAT"==e){for(v=0;v<t;v++)d[m+v]=o[a+v];m+=t}else if("acTL"==e)u.tabs[e]={num_frames:p(o,a),num_plays:p(o,a+4)},f=new Uint8Array(o.length);else if("fcTL"==e){0!=h&&((P=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),P.rect.width,P.rect.height),h=0);const t={x:p(o,a+12),y:p(o,a+16),width:p(o,a+4),height:p(o,a+8)};let e=l(o,a+22);e=l(o,a+20)/(0==e?100:e);const i={rect:t,delay:Math.round(1e3*e),dispose:o[a+24],blend:o[a+25]};u.frames.push(i)}else if("fdAT"==e){for(v=0;v<t-4;v++)f[h+v]=o[a+v+4];h+=t-4}else if("pHYs"==e)u.tabs[e]=[s.readUint(o,a),s.readUint(o,a+4),o[a+8]];else if("cHRM"==e)for(u.tabs[e]=[],v=0;v<8;v++)u.tabs[e].push(s.readUint(o,a+4*v));else if("tEXt"==e||"zTXt"==e){null==u.tabs[e]&&(u.tabs[e]={});var y=s.nextZero(o,a),b=s.readASCII(o,a,y-a),w=a+t-y-1;if("tEXt"==e)S=s.readASCII(o,y+1,w);else{var A=i(o.slice(y+2,y+2+w));S=s.readUTF8(A,0,A.length)}u.tabs[e][b]=S}else if("iTXt"==e){null==u.tabs[e]&&(u.tabs[e]={}),y=0,x=a,y=s.nextZero(o,x),b=s.readASCII(o,x,y-x);const n=o[x=y+1];var S;o[x+1],x+=2,y=s.nextZero(o,x),s.readASCII(o,x,y-x),x=y+1,y=s.nextZero(o,x),s.readUTF8(o,x,y-x),w=t-((x=y+1)-a),0==n?S=s.readUTF8(o,x,w):(A=i(o.slice(x,x+w)),S=s.readUTF8(A,0,A.length)),u.tabs[e][b]=S}else if("PLTE"==e)u.tabs[e]=s.readBytes(o,a,t);else if("hIST"==e){const t=u.tabs.PLTE.length/3;for(u.tabs[e]=[],v=0;v<t;v++)u.tabs[e].push(l(o,a+2*v))}else if("tRNS"==e)3==u.ctype?u.tabs[e]=s.readBytes(o,a,t):0==u.ctype?u.tabs[e]=l(o,a):2==u.ctype&&(u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]);else if("gAMA"==e)u.tabs[e]=s.readUint(o,a)/1e5;else if("sRGB"==e)u.tabs[e]=o[a];else if("bKGD"==e)0==u.ctype||4==u.ctype?u.tabs[e]=[l(o,a)]:2==u.ctype||6==u.ctype?u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]:3==u.ctype&&(u.tabs[e]=o[a]);else if("IEND"==e)break;a+=t,s.readUint(o,a),a+=4}var P;return 0!=h&&((P=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),P.rect.width,P.rect.height)),u.data=n(u,d,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(t){const n=t.width,i=t.height;if(null==t.tabs.acTL)return[e(t.data,n,i,t).buffer];const r=[];null==t.frames[0].data&&(t.frames[0].data=t.data);const o=n*i*4,a=new Uint8Array(o),s=new Uint8Array(o),c=new Uint8Array(o);for(let u=0;u<t.frames.length;u++){const d=t.frames[u],f=d.rect.x,m=d.rect.y,h=d.rect.width,g=d.rect.height,v=e(d.data,h,g,t);if(0!=u)for(var p=0;p<o;p++)c[p]=a[p];if(0==d.blend?l(v,h,g,a,n,i,f,m,0):1==d.blend&&l(v,h,g,a,n,i,f,m,1),r.push(a.buffer.slice(0)),0!=d.dispose)if(1==d.dispose)l(s,h,g,a,n,i,f,m,0);else if(2==d.dispose)for(p=0;p<o;p++)a[p]=c[p]}return r},_paeth:s,_copyTile:l,_bin:t}}();!function(){const{_copyTile:t}=Cl,{_bin:e}=Cl,n=Cl._paeth;var i={table:function(){const t=new Uint32Array(256);for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update(t,e,n,r){for(let o=0;o<r;o++)t=i.table[255&(t^e[n+o])]^t>>>8;return t},crc:(t,e,n)=>4294967295^i.update(4294967295,t,e,n)};function r(t,e,n,i){e[n]+=t[0]*i>>4,e[n+1]+=t[1]*i>>4,e[n+2]+=t[2]*i>>4,e[n+3]+=t[3]*i>>4}function o(t){return Math.max(0,Math.min(255,t))}function a(t,e){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return n*n+i*i+r*r+o*o}function s(t,e,n,i,s,c,l){null==l&&(l=1);const p=i.length,u=[];for(var d=0;d<p;d++){const t=i[d];u.push([t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255])}for(d=0;d<p;d++){let t=4294967295;for(var f=0,m=0;m<p;m++){var h=a(u[d],u[m]);m!=d&&h<t&&(t=h,f=m)}}const g=new Uint32Array(s.buffer),v=new Int16Array(e*n*4),x=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(d=0;d<x.length;d++)x[d]=255*((x[d]+.5)/16-.5);for(let s=0;s<n;s++)for(let b=0;b<e;b++){var y;d=4*(s*e+b),2!=l?y=[o(t[d]+v[d]),o(t[d+1]+v[d+1]),o(t[d+2]+v[d+2]),o(t[d+3]+v[d+3])]:(h=x[4*(3&s)+(3&b)],y=[o(t[d]+h),o(t[d+1]+h),o(t[d+2]+h),o(t[d+3]+h)]),f=0;let w=16777215;for(m=0;m<p;m++){const t=a(y,u[m]);t<w&&(w=t,f=m)}const A=u[f],S=[y[0]-A[0],y[1]-A[1],y[2]-A[2],y[3]-A[3]];1==l&&(b!=e-1&&r(S,v,d+4,7),s!=n-1&&(0!=b&&r(S,v,d+4*e-4,3),r(S,v,d+4*e,5),b!=e-1&&r(S,v,d+4*e+4,1))),c[d>>2]=f,g[d>>2]=i[f]}}function c(t,n,r,o,a){null==a&&(a={});const{crc:s}=i,c=e.writeUint,l=e.writeUshort,p=e.writeASCII;let u=8;const d=t.frames.length>1;let f,m=!1,h=33+(d?20:0);if(null!=a.sRGB&&(h+=13),null!=a.pHYs&&(h+=21),null!=a.iCCP&&(f=pako.deflate(a.iCCP),h+=21+f.length+4),3==t.ctype){for(var g=t.plte.length,v=0;v<g;v++)t.plte[v]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var x=0;x<t.frames.length;x++)d&&(h+=38),h+=(A=t.frames[x]).cimg.length+12,0!=x&&(h+=4);h+=12;const y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(v=0;v<8;v++)y[v]=b[v];if(c(y,u,13),u+=4,p(y,u,"IHDR"),u+=4,c(y,u,n),u+=4,c(y,u,r),u+=4,y[u]=t.depth,u++,y[u]=t.ctype,u++,y[u]=0,u++,y[u]=0,u++,y[u]=0,u++,c(y,u,s(y,u-17,17)),u+=4,null!=a.sRGB&&(c(y,u,1),u+=4,p(y,u,"sRGB"),u+=4,y[u]=a.sRGB,u++,c(y,u,s(y,u-5,5)),u+=4),null!=a.iCCP){const t=13+f.length;c(y,u,t),u+=4,p(y,u,"iCCP"),u+=4,p(y,u,"ICC profile"),u+=11,u+=2,y.set(f,u),u+=f.length,c(y,u,s(y,u-(t+4),t+4)),u+=4}if(null!=a.pHYs&&(c(y,u,9),u+=4,p(y,u,"pHYs"),u+=4,c(y,u,a.pHYs[0]),u+=4,c(y,u,a.pHYs[1]),u+=4,y[u]=a.pHYs[2],u++,c(y,u,s(y,u-13,13)),u+=4),d&&(c(y,u,8),u+=4,p(y,u,"acTL"),u+=4,c(y,u,t.frames.length),u+=4,c(y,u,null!=a.loop?a.loop:0),u+=4,c(y,u,s(y,u-12,12)),u+=4),3==t.ctype){for(c(y,u,3*(g=t.plte.length)),u+=4,p(y,u,"PLTE"),u+=4,v=0;v<g;v++){const e=3*v,n=t.plte[v],i=255&n,r=n>>>8&255,o=n>>>16&255;y[u+e+0]=i,y[u+e+1]=r,y[u+e+2]=o}if(u+=3*g,c(y,u,s(y,u-3*g-4,3*g+4)),u+=4,m){for(c(y,u,g),u+=4,p(y,u,"tRNS"),u+=4,v=0;v<g;v++)y[u+v]=t.plte[v]>>>24&255;u+=g,c(y,u,s(y,u-g-4,g+4)),u+=4}}let w=0;for(x=0;x<t.frames.length;x++){var A=t.frames[x];d&&(c(y,u,26),u+=4,p(y,u,"fcTL"),u+=4,c(y,u,w++),u+=4,c(y,u,A.rect.width),u+=4,c(y,u,A.rect.height),u+=4,c(y,u,A.rect.x),u+=4,c(y,u,A.rect.y),u+=4,l(y,u,o[x]),u+=2,l(y,u,1e3),u+=2,y[u]=A.dispose,u++,y[u]=A.blend,u++,c(y,u,s(y,u-30,30)),u+=4);const e=A.cimg;c(y,u,(g=e.length)+(0==x?0:4)),u+=4;const n=u;p(y,u,0==x?"IDAT":"fdAT"),u+=4,0!=x&&(c(y,u,w++),u+=4),y.set(e,u),u+=g,c(y,u,s(y,n,u-n)),u+=4}return c(y,u,0),u+=4,p(y,u,"IEND"),u+=4,c(y,u,s(y,u-4,4)),u+=4,y.buffer}function l(t,e,n){for(let i=0;i<t.frames.length;i++){const r=t.frames[i];r.rect.width;const o=r.rect.height,a=new Uint8Array(o*r.bpl+o);r.cimg=f(r.img,o,r.bpp,r.bpl,a,e,n)}}function p(e,n,i,r,o){const a=o[0],c=o[1],l=o[2],p=o[3],f=o[4],m=o[5];let g=6,v=8,x=255;for(var y=0;y<e.length;y++){const t=new Uint8Array(e[y]);for(var b=t.length,w=0;w<b;w+=4)x&=t[w+3]}const A=255!=x,S=function(e,n,i,r,o,a){const s=[];for(var c=0;c<e.length;c++){const u=new Uint8Array(e[c]),f=new Uint32Array(u.buffer);var l;let h=0,g=0,v=n,x=i,y=r?1:0;if(0!=c){const b=a||r||1==c||0!=s[c-2].dispose?1:2;let w=0,A=1e9;for(let t=0;t<b;t++){var p=new Uint8Array(e[c-1-t]);const r=new Uint32Array(e[c-1-t]);let a=n,s=i,l=-1,u=-1;for(let t=0;t<i;t++)for(let e=0;e<n;e++)f[m=t*n+e]!=r[m]&&(e<a&&(a=e),e>l&&(l=e),t<s&&(s=t),t>u&&(u=t));-1==l&&(a=s=l=u=0),o&&(!(1&~a)&&a--,!(1&~s)&&s--);const d=(l-a+1)*(u-s+1);d<A&&(A=d,w=t,h=a,g=s,v=l-a+1,x=u-s+1)}p=new Uint8Array(e[c-1-w]),1==w&&(s[c-1].dispose=2),l=new Uint8Array(v*x*4),t(p,n,i,l,v,x,-h,-g,0),y=t(u,n,i,l,v,x,-h,-g,3)?1:0,1==y?d(u,n,i,l,{x:h,y:g,width:v,height:x}):t(u,n,i,l,v,x,-h,-g,0)}else l=u.slice(0);s.push({rect:{x:h,y:g,width:v,height:x},img:l,blend:y,dispose:0})}if(r)for(c=0;c<s.length;c++){if(1==(h=s[c]).blend)continue;const t=h.rect,r=s[c-1].rect,a=Math.min(t.x,r.x),l=Math.min(t.y,r.y),p={x:a,y:l,width:Math.max(t.x+t.width,r.x+r.width)-a,height:Math.max(t.y+t.height,r.y+r.height)-l};s[c-1].dispose=1,c-1!=0&&u(e,n,i,s,c-1,p,o),u(e,n,i,s,c,p,o)}let f=0;if(1!=e.length)for(var m=0;m<s.length;m++){var h;f+=(h=s[m]).rect.width*h.rect.height}return s}(e,n,i,a,c,l),P={},C=[],T=[];if(0!=r){const t=[];for(w=0;w<S.length;w++)t.push(S[w].img.buffer);const e=h(function(t){let e=0;for(var n=0;n<t.length;n++)e+=t[n].byteLength;const i=new Uint8Array(e);let r=0;for(n=0;n<t.length;n++){const e=new Uint8Array(t[n]),o=e.length;for(let t=0;t<o;t+=4){let n=e[t],o=e[t+1],a=e[t+2];const s=e[t+3];0==s&&(n=o=a=0),i[r+t]=n,i[r+t+1]=o,i[r+t+2]=a,i[r+t+3]=s}r+=o}return i.buffer}(t),r);for(w=0;w<e.plte.length;w++)C.push(e.plte[w].est.rgba);let n=0;for(w=0;w<S.length;w++){const t=(E=S[w]).img.length;var k=new Uint8Array(e.inds.buffer,n>>2,t>>2);T.push(k);const i=new Uint8Array(e.abuf,n,t);m&&s(E.img,E.rect.width,E.rect.height,C,i,k),E.img.set(i),n+=t}}else for(y=0;y<S.length;y++){var E=S[y];const t=new Uint32Array(E.img.buffer);var I=E.rect.width;for(b=t.length,k=new Uint8Array(b),T.push(k),w=0;w<b;w++){const e=t[w];if(0!=w&&e==t[w-1])k[w]=k[w-1];else if(w>I&&e==t[w-I])k[w]=k[w-I];else{let t=P[e];if(null==t&&(P[e]=t=C.length,C.push(e),C.length>=300))break;k[w]=t}}}const j=C.length;for(j<=256&&0==f&&(v=j<=2?1:j<=4?2:j<=16?4:8,v=Math.max(v,p)),y=0;y<S.length;y++){(E=S[y]).rect.x,E.rect.y,I=E.rect.width;const t=E.rect.height;let e=E.img;new Uint32Array(e.buffer);let n=4*I,i=4;if(j<=256&&0==f){n=Math.ceil(v*I/8);var D=new Uint8Array(n*t);const r=T[y];for(let e=0;e<t;e++){w=e*n;const t=e*I;if(8==v)for(var M=0;M<I;M++)D[w+M]=r[t+M];else if(4==v)for(M=0;M<I;M++)D[w+(M>>1)]|=r[t+M]<<4-4*(1&M);else if(2==v)for(M=0;M<I;M++)D[w+(M>>2)]|=r[t+M]<<6-2*(3&M);else if(1==v)for(M=0;M<I;M++)D[w+(M>>3)]|=r[t+M]<<7-1*(7&M)}e=D,g=3,i=1}else if(0==A&&1==S.length){D=new Uint8Array(I*t*3);const r=I*t;for(w=0;w<r;w++){const t=3*w,n=4*w;D[t]=e[n],D[t+1]=e[n+1],D[t+2]=e[n+2]}e=D,g=2,i=3,n=3*I}E.img=e,E.bpl=n,E.bpp=i}return{ctype:g,depth:v,plte:C,frames:S}}function u(e,n,i,r,o,a,s){const c=Uint8Array,l=Uint32Array,p=new c(e[o-1]),u=new l(e[o-1]),f=o+1<e.length?new c(e[o+1]):null,m=new c(e[o]),h=new l(m.buffer);let g=n,v=i,x=-1,y=-1;for(let t=0;t<a.height;t++)for(let e=0;e<a.width;e++){const i=a.x+e,s=a.y+t,c=s*n+i,l=h[c];0==l||0==r[o-1].dispose&&u[c]==l&&(null==f||0!=f[4*c+3])||(i<g&&(g=i),i>x&&(x=i),s<v&&(v=s),s>y&&(y=s))}-1==x&&(g=v=x=y=0),s&&(!(1&~g)&&g--,!(1&~v)&&v--),a={x:g,y:v,width:x-g+1,height:y-v+1};const b=r[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==r[o-1].dispose?(t(p,n,i,b.img,a.width,a.height,-a.x,-a.y,0),d(m,n,i,b.img,a)):t(m,n,i,b.img,a.width,a.height,-a.x,-a.y,0)}function d(e,n,i,r,o){t(e,n,i,r,o.width,o.height,-o.x,-o.y,2)}function f(t,e,n,i,r,o,a){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(e*i>5e5||1==n)&&(l=[0]),a&&(c={level:0});const p=Pl;for(var u=0;u<l.length;u++){for(let o=0;o<e;o++)m(r,t,o,i,n,l[u]);s.push(p.deflate(r,c))}let d,f=1e9;for(u=0;u<s.length;u++)s[u].length<f&&(d=u,f=s[u].length);return s[d]}function m(t,e,i,r,o,a){const s=i*r;let c=s+i;if(t[c]=a,c++,0==a)if(r<500)for(var l=0;l<r;l++)t[c+l]=e[s+l];else t.set(new Uint8Array(e.buffer,s,r),c);else if(1==a){for(l=0;l<o;l++)t[c+l]=e[s+l];for(l=o;l<r;l++)t[c+l]=e[s+l]-e[s+l-o]+256&255}else if(0==i){for(l=0;l<o;l++)t[c+l]=e[s+l];if(2==a)for(l=o;l<r;l++)t[c+l]=e[s+l];if(3==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-(e[s+l-o]>>1)+256&255;if(4==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-n(e[s+l-o],0,0)+256&255}else{if(2==a)for(l=0;l<r;l++)t[c+l]=e[s+l]+256-e[s+l-r]&255;if(3==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-(e[s+l-r]>>1)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-(e[s+l-r]+e[s+l-o]>>1)&255}if(4==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-n(0,e[s+l-r],0)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-n(e[s+l-o],e[s+l-r],e[s+l-o-r])&255}}}function h(t,e){const n=new Uint8Array(t),i=n.slice(0),r=new Uint32Array(i.buffer),o=g(i,e),a=o[0],s=o[1],c=n.length,l=new Uint8Array(c>>2);let p;if(n.length<2e7)for(var u=0;u<c;u+=4)p=v(a,d=n[u]*(1/255),f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255)),l[u>>2]=p.ind,r[u>>2]=p.est.rgba;else for(u=0;u<c;u+=4){var d=.00392156862745098*n[u],f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255);for(p=a;p.left;)p=x(p.est,d,f,m,h)<=0?p.left:p.right;l[u>>2]=p.ind,r[u>>2]=p.est.rgba}return{abuf:i.buffer,inds:l,plte:s}}function g(t,e,n){null==n&&(n=1e-4);const i=new Uint32Array(t.buffer),r={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=w(t,r.i0,r.i1),r.est=A(r.bst);const o=[r];for(;o.length<e;){let e=0,r=0;for(var a=0;a<o.length;a++)o[a].est.L>e&&(e=o[a].est.L,r=a);if(e<n)break;const s=o[r],c=y(t,i,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}const l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=w(t,l.i0,l.i1),l.est=A(l.bst);const p={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(p.bst={R:[],m:[],N:s.bst.N-l.bst.N},a=0;a<16;a++)p.bst.R[a]=s.bst.R[a]-l.bst.R[a];for(a=0;a<4;a++)p.bst.m[a]=s.bst.m[a]-l.bst.m[a];p.est=A(p.bst),s.left=l,s.right=p,o[r]=l,o.push(p)}for(o.sort((t,e)=>e.bst.N-t.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[r,o]}function v(t,e,n,i,r){if(null==t.left)return t.tdst=function(t,e,n,i,r){const o=e-t[0],a=n-t[1],s=i-t[2],c=r-t[3];return o*o+a*a+s*s+c*c}(t.est.q,e,n,i,r),t;const o=x(t.est,e,n,i,r);let a=t.left,s=t.right;o>0&&(a=t.right,s=t.left);const c=v(a,e,n,i,r);if(c.tdst<=o*o)return c;const l=v(s,e,n,i,r);return l.tdst<c.tdst?l:c}function x(t,e,n,i,r){const{e:o}=t;return o[0]*e+o[1]*n+o[2]*i+o[3]*r-t.eMq}function y(t,e,n,i,r,o){for(i-=4;n<i;){for(;b(t,n,r)<=o;)n+=4;for(;b(t,i,r)>o;)i-=4;if(n>=i)break;const a=e[n>>2];e[n>>2]=e[i>>2],e[i>>2]=a,n+=4,i-=4}for(;b(t,n,r)>o;)n-=4;return n+4}function b(t,e,n){return t[e]*n[0]+t[e+1]*n[1]+t[e+2]*n[2]+t[e+3]*n[3]}function w(t,e,n){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-e>>2;for(let o=e;o<n;o+=4){const e=.00392156862745098*t[o],n=t[o+1]*(1/255),a=t[o+2]*(1/255),s=t[o+3]*(1/255);r[0]+=e,r[1]+=n,r[2]+=a,r[3]+=s,i[0]+=e*e,i[1]+=e*n,i[2]+=e*a,i[3]+=e*s,i[5]+=n*n,i[6]+=n*a,i[7]+=n*s,i[10]+=a*a,i[11]+=a*s,i[15]+=s*s}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:o}}function A(t){const{R:e}=t,{m:n}=t,{N:i}=t,r=n[0],o=n[1],a=n[2],s=n[3],c=0==i?0:1/i,l=[e[0]-r*r*c,e[1]-r*o*c,e[2]-r*a*c,e[3]-r*s*c,e[4]-o*r*c,e[5]-o*o*c,e[6]-o*a*c,e[7]-o*s*c,e[8]-a*r*c,e[9]-a*o*c,e[10]-a*a*c,e[11]-a*s*c,e[12]-s*r*c,e[13]-s*o*c,e[14]-s*a*c,e[15]-s*s*c],p=l,u=S;let d=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,m=0;if(0!=i)for(let t=0;t<16&&(d=u.multVec(p,d),m=Math.sqrt(u.dot(d,d)),d=u.sml(1/m,d),!(0!=t&&Math.abs(m-f)<1e-9));t++)f=m;const h=[r*c,o*c,a*c,s*c];return{Cov:l,q:h,e:d,L:f,eMq255:u.dot(u.sml(255,h),d),eMq:u.dot(d,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0]))>>>0}}var S={multVec:(t,e)=>[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]],dot:(t,e)=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],sml:(t,e)=>[t*e[0],t*e[1],t*e[2],t*e[3]]};Cl.encode=function(t,e,n,i,r,o,a){null==i&&(i=0),null==a&&(a=!1);const s=p(t,e,n,i,[!1,!1,!1,0,a,!1]);return l(s,-1),c(s,e,n,r,o)},Cl.encodeLL=function(t,e,n,i,r,o,a,s){const p={ctype:0+(1==i?0:2)+(0==r?0:4),depth:o,frames:[]},u=(i+r)*o,d=u*e;for(let i=0;i<t.length;i++)p.frames.push({rect:{x:0,y:0,width:e,height:n},img:new Uint8Array(t[i]),blend:0,dispose:1,bpp:Math.ceil(u/8),bpl:Math.ceil(d/8)});return l(p,0,!0),c(p,e,n,a,s)},Cl.encode.compress=p,Cl.encode.dither=s,Cl.quantize=h,Cl.quantize.getKDtree=g,Cl.quantize.getNearest=v}();const Tl={toArrayBuffer(t,e){const n=t.width,i=t.height,r=n<<2,o=t.getContext("2d").getImageData(0,0,n,i),a=new Uint32Array(o.data.buffer),s=(32*n+31)/32<<2,c=s*i,l=122+c,p=new ArrayBuffer(l),u=new DataView(p),d=1<<20;let f,m,h,g,v=d,x=0,y=0,b=0;function w(t){u.setUint16(y,t,!0),y+=2}function A(t){u.setUint32(y,t,!0),y+=4}function S(t){y+=t}w(19778),A(l),S(4),A(122),A(108),A(n),A(-i>>>0),w(1),w(32),A(3),A(c),A(2835),A(2835),S(8),A(16711680),A(65280),A(255),A(4278190080),A(1466527264),function t(){for(;x<i&&v>0;){for(g=122+x*s,f=0;f<r;)v--,m=a[b++],h=m>>>24,u.setUint32(g+f,m<<8|h),f+=4;x++}b<a.length?(v=d,setTimeout(t,Tl._dly)):e(p)}()},toBlob(t,e){this.toArrayBuffer(t,t=>{e(new Blob([t],{type:"image/bmp"}))})},_dly:9};var kl={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},El={[kl.CHROME]:16384,[kl.FIREFOX]:11180,[kl.DESKTOP_SAFARI]:16384,[kl.IE]:8192,[kl.IOS]:4096,[kl.ETC]:8192};const Il=typeof window<"u",jl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Dl=Il&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Ml=(Il||jl)&&(Dl&&Dl.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Fl=(Il||jl)&&(Dl&&Dl.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Ul(t,e,n=Date.now()){return new Promise(i=>{const r=t.split(","),o=r[0].match(/:(.*?);/)[1],a=globalThis.atob(r[1]);let s=a.length;const c=new Uint8Array(s);for(;s--;)c[s]=a.charCodeAt(s);const l=new Blob([c],{type:o});l.name=e,l.lastModified=n,i(l)})}function Rl(t){return new Promise((e,n)=>{const i=new Fl;i.onload=()=>e(i.result),i.onerror=t=>n(t),i.readAsDataURL(t)})}function Ol(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=t=>n(t),i.src=t})}function Ll(){if(void 0!==Ll.cachedResult)return Ll.cachedResult;let t=kl.ETC;const{userAgent:e}=navigator;return/Chrom(e|ium)/i.test(e)?t=kl.CHROME:/iP(ad|od|hone)/i.test(e)&&/WebKit/i.test(e)?t=kl.IOS:/Safari/i.test(e)?t=kl.DESKTOP_SAFARI:/Firefox/i.test(e)?t=kl.FIREFOX:(/MSIE/i.test(e)||document.documentMode)&&(t=kl.IE),Ll.cachedResult=t,Ll.cachedResult}function Nl(t,e){const n=Ll(),i=El[n];let r=t,o=e,a=r*o;const s=r>o?o/r:r/o;for(;a>i*i;){const t=(i+r)/2,e=(i+o)/2;t<e?(o=e,r=e*s):(o=t*s,r=t),a=r*o}return{width:r,height:o}}function Bl(t,e){let n,i;try{if(n=new OffscreenCanvas(t,e),i=n.getContext("2d"),null===i)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),i=n.getContext("2d")}return n.width=t,n.height=e,[n,i]}function Vl(t,e){const{width:n,height:i}=Nl(t.width,t.height),[r,o]=Bl(n,i);return e&&/jpe?g/.test(e)&&(o.fillStyle="white",o.fillRect(0,0,r.width,r.height)),o.drawImage(t,0,0,r.width,r.height),r}function ql(){return void 0!==ql.cachedResult||(ql.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),ql.cachedResult}function zl(t,e={}){return new Promise(function(n,i){let r,o;var a=function(){try{return o=Vl(r,e.fileType||t.type),n([r,o])}catch(t){return i(t)}},s=function(e){try{var n=function(t){try{throw t}catch(t){return i(t)}};try{let e;return Rl(t).then(function(t){try{return e=t,Ol(e).then(function(t){try{return r=t,function(){try{return a()}catch(t){return i(t)}}()}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)}catch(t){n(t)}}catch(t){return i(t)}};try{if(ql()||[kl.DESKTOP_SAFARI,kl.MOBILE_SAFARI].includes(Ll()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(t).then(function(t){try{return r=t,a()}catch{return s()}},s)}catch{s()}})}function _l(t,e,n,i,r=1){return new Promise(function(o,a){let s;if("image/png"===e){let o,a,l;return o=t.getContext("2d"),({data:a}=o.getImageData(0,0,t.width,t.height)),l=Cl.encode([a.buffer],t.width,t.height,4096*r),s=new Blob([l],{type:e}),s.name=n,s.lastModified=i,c.call(this)}{let o=function(){return c.call(this)};if("image/bmp"===e)return new Promise(e=>Tl.toBlob(t,e)).then(function(t){try{return s=t,s.name=n,s.lastModified=i,o.call(this)}catch(t){return a(t)}}.bind(this),a);{let c=function(){return o.call(this)};if("function"==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)return t.convertToBlob({type:e,quality:r}).then(function(t){try{return s=t,s.name=n,s.lastModified=i,c.call(this)}catch(t){return a(t)}}.bind(this),a);{let o;return o=t.toDataURL(e,r),Ul(o,n,i).then(function(t){try{return s=t,c.call(this)}catch(t){return a(t)}}.bind(this),a)}}}function c(){return o(s)}})}function Gl(t){t.width=0,t.height=0}function $l(){return new Promise(function(t,e){let n,i,r,o;return void 0!==$l.cachedResult?t($l.cachedResult):Ul("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,zl(n).then(function(a){try{return i=a[1],_l(i,n.type,n.name,n.lastModified).then(function(n){try{return r=n,Gl(i),zl(r).then(function(n){try{return o=n[0],$l.cachedResult=1===o.width&&2===o.height,t($l.cachedResult)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)})}function Hl(t){return new Promise((e,n)=>{const i=new Fl;i.onload=t=>{const n=new DataView(t.target.result);if(65496!=n.getUint16(0,!1))return e(-2);const i=n.byteLength;let r=2;for(;r<i;){if(n.getUint16(r+2,!1)<=8)return e(-1);const t=n.getUint16(r,!1);if(r+=2,65505==t){if(1165519206!=n.getUint32(r+=2,!1))return e(-1);const t=18761==n.getUint16(r+=6,!1);r+=n.getUint32(r+4,t);const i=n.getUint16(r,t);r+=2;for(let o=0;o<i;o++)if(274==n.getUint16(r+12*o,t))return e(n.getUint16(r+12*o+8,t))}else{if(65280&~t)break;r+=n.getUint16(r,!1)}}return e(-1)},i.onerror=t=>n(t),i.readAsArrayBuffer(t)})}function Wl(t,e){const{width:n}=t,{height:i}=t,{maxWidthOrHeight:r}=e;let o,a=t;return isFinite(r)&&(n>r||i>r)&&([a,o]=Bl(n,i),n>i?(a.width=r,a.height=i/n*r):(a.width=n/i*r,a.height=r),o.drawImage(t,0,0,a.width,a.height),Gl(t)),a}function Xl(t,e){const{width:n}=t,{height:i}=t,[r,o]=Bl(n,i);switch(e>4&&e<9?(r.width=i,r.height=n):(r.width=n,r.height=i),e){case 2:o.transform(-1,0,0,1,n,0);break;case 3:o.transform(-1,0,0,-1,n,i);break;case 4:o.transform(1,0,0,-1,0,i);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,i,0);break;case 7:o.transform(0,-1,-1,0,i,n);break;case 8:o.transform(0,-1,1,0,0,n)}return o.drawImage(t,0,0,n,i),Gl(t),r}function Yl(t,e,n=0){return new Promise(function(i,r){let o,a,s,c,l,p,u,d,f,m,h,g,v,x,y,b,w,A,S,P;function C(t=5){if(e.signal&&e.signal.aborted)throw e.signal.reason;o+=t,e.onProgress(Math.min(o,100))}function T(t){if(e.signal&&e.signal.aborted)throw e.signal.reason;o=Math.min(Math.max(t,o),100),e.onProgress(o)}return o=n,a=e.maxIteration||10,s=1024*e.maxSizeMB*1024,C(),zl(t,e).then(function(n){try{return[,c]=n,C(),l=Wl(c,e),C(),new Promise(function(n,i){var r;if(!(r=e.exifOrientation))return Hl(t).then(function(t){try{return r=t,o.call(this)}catch(t){return i(t)}}.bind(this),i);function o(){return n(r)}return o.call(this)}).then(function(n){try{return p=n,C(),$l().then(function(n){try{return u=n?l:Xl(l,p),C(),d=e.initialQuality||1,f=e.fileType||t.type,_l(u,f,t.name,t.lastModified,d).then(function(n){try{{let p=function(){if(a--&&(y>s||y>v)){let e,n;return e=P?.95*S.width:S.width,n=P?.95*S.height:S.height,[w,A]=Bl(e,n),A.drawImage(S,0,0,e,n),d*="image/png"===f?.85:.95,_l(w,f,t.name,t.lastModified,d).then(function(t){try{return b=t,Gl(S),S=w,y=b.size,T(Math.min(99,Math.floor((x-y)/(x-s)*100))),p}catch(t){return r(t)}},r)}return[1]},k=function(){return Gl(S),Gl(w),Gl(l),Gl(u),Gl(c),T(100),i(b)};return m=n,C(),h=m.size>s,g=m.size>t.size,h||g?(v=t.size,x=m.size,y=x,S=u,P=!e.alwaysKeepResolution&&h,(o=function(t){for(;t;){if(t.then)return void t.then(o,r);try{if(t.pop){if(t.length)return t.pop()?k.call(this):t;t=p}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(p)):(T(100),i(m));var o}}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)})}let Kl;function Zl(t,e){return new Promise(function(n,i){let r,o,a,s,c,l;if(r={...e},a=0,({onProgress:s}=r),r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof r.useWebWorker||r.useWebWorker,delete r.useWebWorker,r.onProgress=t=>{a=t,"function"==typeof s&&s(a)},!(t instanceof Blob||t instanceof Ml))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return i(new Error("The file given is not an image"));if(l=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return Yl(t,r).then(function(t){try{return o=t,d.call(this)}catch(t){return i(t)}}.bind(this),i);var p=function(){try{return d.call(this)}catch(t){return i(t)}}.bind(this),u=function(e){try{return Yl(t,r).then(function(t){try{return o=t,p()}catch(t){return i(t)}},i)}catch(t){return i(t)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",function(t,e){return new Promise((n,i)=>{Kl||(Kl=function(t){const e=[];return e.push(t),URL.createObjectURL(new Blob(e))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const r=new Worker(Kl);r.addEventListener("message",function(t){if(e.signal&&e.signal.aborted)r.terminate();else if(void 0===t.data.progress){if(t.data.error)return i(new Error(t.data.error)),void r.terminate();n(t.data.file),r.terminate()}else e.onProgress(t.data.progress)}),r.addEventListener("error",i),e.signal&&e.signal.addEventListener("abort",()=>{i(e.signal.reason),r.terminate()}),r.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})})}(t,r).then(function(t){try{return o=t,p()}catch{return u()}},u)}catch{u()}function d(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{r.preserveExif&&"image/jpeg"===t.type&&(!r.fileType||r.fileType&&r.fileType===t.type)&&(o=vl(t,o))}catch{}return n(o)}})}Zl.getDataUrlFromFile=Rl,Zl.getFilefromDataUrl=Ul,Zl.loadImage=Ol,Zl.drawImageInCanvas=Vl,Zl.drawFileInCanvas=zl,Zl.canvasToFile=_l,Zl.getExifOrientation=Hl,Zl.handleMaxWidthOrHeight=Wl,Zl.followExifOrientation=Xl,Zl.cleanupCanvasMemory=Gl,Zl.isAutoOrientationInBrowser=$l,Zl.approximateBelowMaximumCanvasSizeOfBrowser=Nl,Zl.copyExifWithoutOrientation=vl,Zl.getBrowserName=Ll,Zl.version="2.0.2";let Ql=class{constructor(t){if(function(t){return"object"!=typeof t||void 0===t.length||void 0===t.readUInt8||void 0===t.readUInt16LE||void 0===t.readUInt16BE||void 0===t.readUInt32LE||void 0===t.readUInt32BE||void 0===t.readInt32LE||void 0===t.readInt32BE}(t))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}getUint8(t){return this.buffer.readUInt8(t)}getUint16(t,e){return e?this.buffer.readUInt16LE(t):this.buffer.readUInt16BE(t)}getUint32(t,e){return e?this.buffer.readUInt32LE(t):this.buffer.readUInt32BE(t)}getInt32(t,e){return e?this.buffer.readInt32LE(t):this.buffer.readInt32BE(t)}};function Jl(t,e,n){try{return new DataView(t,e,n)}catch{return new Ql(t,e,n)}}function tp(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r++)i.push(t.getUint8(e+r));return rp(i)}function ep(t,e){const n=[];let i=0;for(;e+i<t.byteLength;){const r=t.getUint8(e+i);if(0===r)break;n.push(r),i++}return rp(n)}function np(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r+=2)i.push(t.getUint16(e+r));return 0===i[i.length-1]&&i.pop(),rp(i)}function ip(t,e){const n=t.getUint8(e);return[n,tp(t,e+1,n)]}function rp(t){return t.map(t=>String.fromCharCode(t)).join("")}function op(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function ap(t,e,n){let i=!1;Object.defineProperty(t,e,{get:()=>(i||(i=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]),configurable:!0,enumerable:!0})}function sp(t){return typeof btoa<"u"?btoa("string"==typeof t?t:Array.prototype.reduce.call(new Uint8Array(t),(t,e)=>t+String.fromCharCode(e),"")):typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function cp(t,e){return new Array(e+1).join(t)}const lp=void 0;function pp(t,e,n,i="string"){if(0===e&&"function"==typeof DecompressionStream){const e=new DecompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return"dataview"===i?new Response(r).arrayBuffer().then(t=>new DataView(t)):new Response(r).arrayBuffer().then(t=>new TextDecoder(n).decode(t))}return void 0!==e?Promise.reject(`Unknown compression method ${e}.`):t}const up=!0,dp=!0;function fp(t){return t.map(t=>String.fromCharCode(t)).join("")}function mp(t){if(t.length>=8){const e=fp(t.slice(0,8));if("ASCII\0\0\0"===e)return fp(t.slice(8));if("JIS\0\0\0\0\0"===e)return"[JIS encoded text]";if("UNICODE\0"===e)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===e)return"[Undefined encoding]"}return"Undefined"}function hp(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const gp=18761,vp=19789,xp={BIG_ENDIAN:vp,LITTLE_ENDIAN:gp,getByteOrder:function(t,e){if(t.getUint16(e)===gp)return gp;if(t.getUint16(e)===vp)return vp;throw new Error("Illegal byte order value. Faulty image.")}};const yp={isTiffFile:function(t){return!!t&&t.byteLength>=4&&function(t){const e=t.getUint16(0)===xp.LITTLE_ENDIAN;return 42===t.getUint16(2,e)}(t)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};const bp={isJpegFile:function(t){return!!t&&t.byteLength>=wp&&t.getUint16(0)===Ap},findJpegOffsets:function(t){let e,n,i,r,o,a,s,c,l,p=Sp;for(;p+Pp+5<=t.byteLength;){if(eu(t,p))e=t.getUint16(p+Cp),n=p+Cp;else if(nu(t,p))e=t.getUint16(p+Cp),i=p+Cp;else if(ou(t,p))e=t.getUint16(p+Cp),r=p+Tp;else if(au(t,p))e=t.getUint16(p+Cp),o=p+kp;else if(su(t,p))s||(s=[]),e=t.getUint16(p+Cp),s.push(lu(p,e));else if(cu(t,p))s||(s=[]),e=t.getUint16(p+Cp),s.push(pu(p,e));else if(uu(t,p))e=t.getUint16(p+Cp),a=p+Ep;else if(iu(t,p)){e=t.getUint16(p+Cp);const n=p+Dp,i=e-(Dp-Cp),r=t.getUint8(p+Up),o=t.getUint8(p+Rp);c||(c=[]),c.push({offset:n,length:i,chunkNumber:r,chunksTotal:o})}else if(ru(t,p))e=t.getUint16(p+Cp),l=p+Mp;else{if(!du(t,p)){if(fu(t,p)){p++;continue}break}e=t.getUint16(p+Cp)}p+=Cp+e}return{hasAppMarkers:p>Sp,fileDataOffset:n||i,jfifDataOffset:r,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:s,iccChunks:c,mpfDataOffset:l}}},wp=2,Ap=65496,Sp=2,Pp=4,Cp=2,Tp=2,kp=10,Ep=18,Ip=33,jp=79,Dp=18,Mp=8,Fp="ICC_PROFILE\0",Up=Pp+Fp.length,Rp=Up+1,Op="MPF\0",Lp=65472,Np=65474,Bp=65476,Vp=65499,qp=65501,zp=65498,_p=65504,Gp=65505,$p=65506,Hp=65517,Wp=65519,Xp=65534,Yp=65535,Kp="JFIF",Zp="Exif",Qp="http://ns.adobe.com/xap/1.0/\0",Jp="http://ns.adobe.com/xmp/extension/\0",tu="Photoshop 3.0";function eu(t,e){return t.getUint16(e)===Lp}function nu(t,e){return t.getUint16(e)===Np}function iu(t,e){const n=Fp.length;return t.getUint16(e)===$p&&tp(t,e+Pp,n)===Fp}function ru(t,e){const n=Op.length;return t.getUint16(e)===$p&&tp(t,e+Pp,n)===Op}function ou(t,e){const n=Kp.length;return t.getUint16(e)===_p&&tp(t,e+Pp,n)===Kp&&0===t.getUint8(e+Pp+n)}function au(t,e){const n=Zp.length;return t.getUint16(e)===Gp&&tp(t,e+Pp,n)===Zp&&0===t.getUint8(e+Pp+n)}function su(t,e){return t.getUint16(e)===Gp&&function(t,e){const n=Qp.length;return tp(t,e+Pp,n)===Qp}(t,e)}function cu(t,e){return t.getUint16(e)===Gp&&function(t,e){const n=Jp.length;return tp(t,e+Pp,n)===Jp}(t,e)}function lu(t,e){return{dataOffset:t+Ip,length:e-(Ip-Cp)}}function pu(t,e){return{dataOffset:t+jp,length:e-(jp-Cp)}}function uu(t,e){const n=tu.length;return t.getUint16(e)===Hp&&tp(t,e+Pp,n)===tu&&0===t.getUint8(e+Pp+n)}function du(t,e){const n=t.getUint16(e);return n>=_p&&n<=Wp||n===Xp||n===Lp||n===Np||n===Bp||n===Vp||n===qp||n===zp}function fu(t,e){return t.getUint16(e)===Yp}const mu={isPngFile:function(t){return!!t&&tp(t,0,hu.length)===hu},findPngOffsets:function(t,e){const n={hasAppMarkers:!1};let i=hu.length;for(;i+gu+vu<=t.byteLength;){if(Iu(t,i))n.hasAppMarkers=!0,n.pngHeaderOffset=i+bu;else if(ju(t,i)){const e=Ru(t,i);void 0!==e&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:e,length:t.getUint32(i+xu)-(e-(i+bu))}])}else if(Du(t,i,e)){n.hasAppMarkers=!0;const e=tp(t,i+yu,vu);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:t.getUint32(i+xu),type:e,offset:i+bu})}else if(Mu(t,i))n.hasAppMarkers=!0,n.tiffHeaderOffset=i+bu;else if(e&&Fu(t,i)){n.hasAppMarkers=!0;const e=t.getUint32(i+xu),r=i+bu,{profileName:o,compressionMethod:a,compressedProfileOffset:s}=Ou(t,r);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:e-(s-r),chunkNumber:1,chunksTotal:1,profileName:o,compressionMethod:a})}else Uu(t,i)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(i+xu));i+=t.getUint32(i+xu)+gu+vu+4}return n}},hu="‰PNG\r\n\n",gu=4,vu=4,xu=0,yu=gu,bu=gu+vu,wu="XML:com.adobe.xmp\0",Au="tEXt",Su="iTXt",Pu="zTXt",Cu="pHYs",Tu="tIME",ku="eXIf",Eu="iCCP";function Iu(t,e){return"IHDR"===tp(t,e+yu,vu)}function ju(t,e){return tp(t,e+yu,vu)===Su&&tp(t,e+bu,wu.length)===wu}function Du(t,e,n){const i=tp(t,e+yu,vu);return i===Au||i===Su||i===Pu&&n}function Mu(t,e){return tp(t,e+yu,vu)===ku}function Fu(t,e){return tp(t,e+yu,vu)===Eu}function Uu(t,e){const n=[Cu,Tu],i=tp(t,e+yu,vu);return n.includes(i)}function Ru(t,e){e+=bu+wu.length+1+1;let n=0;for(;n<2&&e<t.byteLength;)0===t.getUint8(e)&&n++,e++;if(!(n<2))return e}function Ou(t,e){const n=ep(t,e);e+=n.length+1;return{profileName:n,compressionMethod:t.getUint8(e),compressedProfileOffset:e+=1}}function Lu(t,e,n,i,r,o,a,s){if(void 0===s)return[];const c=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=Nu(t,l,e),l+=i.item.itemId,n.constructionMethod=1===e||2===e?15&t.getUint16(l):void 0,l+=i.item.constructionMethod,n.dataReferenceIndex=t.getUint16(l),l+=i.item.dataReferenceIndex,n.baseOffset=Vu(t,l,i.item.baseOffset),l+=i.item.baseOffset,n.extentCount=t.getUint16(l),l+=i.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Bu(t,e,l,a),l+=i.item.extent.extentIndex,s.extentOffset=Vu(t,l,r),l+=i.item.extent.extentOffset,s.extentLength=Vu(t,l,o),l+=i.item.extent.extentLength,n.extents.push(s)}c.push(n)}return c}function Nu(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}function Bu(t,e,n,i){if((1===e||2===e)&&i>0)return Vu(t,n,i)}function Vu(t,e,n){return 4===n?t.getUint32(e):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(t,e){return t.getUint32(e+4)}(t,e)):0}const qu=1165519206,zu=1835625829,_u=1970432288;function Gu(t,e){const{length:n,contentOffset:i}=function(t,e){const n=t.getUint32(e);return function(t){return 0===t}(n)?{length:t.byteLength-e,contentOffset:e+4+4}:function(t){return 1===t}(n)&&function(t,e){return 0===t.getUint32(e+8)}(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:n,contentOffset:e+4+4}}(t,e);if(n<8)return;const r=t.getUint32(e+4);if(1718909296===r)return function(t,e,n){return{type:"ftyp",majorBrand:tp(t,e,4),length:n}}(t,i,n);if(1768977008===r)return function(t,e,n,i){return{type:"iprp",subBoxes:Xu(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1768973167===r)return function(t,e,n,i){return{type:"ipco",properties:Xu(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1668246642===r)return function(t,e,n){return{type:"colr",icc:Wu(t,e),length:n}}(t,i,n);const o=t.getUint8(i);return 1835365473===r?function(t,e,n,i){return{type:"meta",subBoxes:Xu(t,n+3,i-(n+3-e)),length:i}}(t,e,i+1,n):1768714083===r?function(t,e,n,i){const{offsets:r,sizes:o}=function(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):2===t&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===t||2===t?2:0;const i={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return i.itemCount=e+2,i.items=i.itemCount+n.itemCount,i.item={itemId:0},i.item.constructionMethod=i.item.itemId+n.item.itemId,i.item.dataReferenceIndex=i.item.constructionMethod+n.item.constructionMethod,{offsets:i,sizes:n}}(e,n+3),a=t.getUint8(r.offsetSize)>>4;o.item.extent.extentOffset=a;const s=15&t.getUint8(r.lengthSize);o.item.extent.extentLength=s;const c=t.getUint8(r.baseOffsetSize)>>4;o.item.baseOffset=c;const l=function(t,e,n){if(1===n||2===n)return 15&t.getUint8(e)}(t,r.indexSize,e);o.item.extent.extentIndex=void 0!==l?l:0;const p=function(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}(t,r.itemCount,e);return{type:"iloc",items:Lu(t,e,r,o,a,s,l,p),length:i}}(t,o,i+1,n):1768517222===r?function(t,e,n,i,r){const{offsets:o}=function(t,e){const n={entryCount:e+3},i={};return i.entryCount=0===t?2:4,n.itemInfos=n.entryCount+i.entryCount,{offsets:n}}(n,i);return{type:"iinf",itemInfos:Xu(t,o.itemInfos,r-(o.itemInfos-e)),length:r}}(t,e,o,i+1,n):1768842853===r?function(t,e,n,i,r){i+=3;const o={type:"infe",length:r};return(0===n||1===n)&&(o.itemId=t.getUint16(i),i+=2,o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemName=ep(t,i),i+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=t.getUint16(i),i+=2):3===n&&(o.itemId=t.getUint32(i),i+=4),o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemType=t.getUint32(i),i+=4,o.itemName=ep(t,i),i+=o.itemName.length+1,o.itemType===zu?(o.contentType=ep(t,i),i+=o.contentType.length+1,e+r>i&&(o.contentEncoding=ep(t,i),i+=o.contentEncoding.length+1)):o.itemType===_u&&(o.itemUri=ep(t,i),i+=o.itemUri.length+1)),o}(t,e,o,i+1,n):{type:void 0,length:n}}function $u(t){{const e={},n=function(t){let e=0;for(;e+4+4<=t.byteLength;){const n=Gu(t,e);if(void 0===n)break;if("meta"===n.type)return n;e+=n.length}}(t);return n?(e.tiffHeaderOffset=function(t,e){try{const n=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===qu)}(e).itemId,i=Hu(e,n);return function(t,e){return e+4+t.getUint32(e)}(t,i.baseOffset+i.extents[0].extentOffset)}catch{return}}(t,n),e.xmpChunks=function(t){try{const e=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===zu&&"application/rdf+xml"===t.contentType)}(t).itemId,n=Hu(t,e),i=Hu(t,e).extents[0];return[{dataOffset:n.baseOffset+i.extentOffset,length:i.extentLength}]}catch{return}}(n),e.iccChunks=function(t){try{const e=t.subBoxes.find(t=>"iprp"===t.type).subBoxes.find(t=>"ipco"===t.type).properties.find(t=>"colr"===t.type).icc;if(e)return[e]}catch{}}(n),e.hasAppMarkers=void 0!==e.tiffHeaderOffset||void 0!==e.xmpChunks||void 0!==e.iccChunks,e):{hasAppMarkers:!1}}}function Hu(t,e){return t.subBoxes.find(t=>"iloc"===t.type).items.find(t=>t.itemId===e)}function Wu(t,e){const n=tp(t,e,4);if("prof"===n||"rICC"===n)return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function Xu(t,e,n){const i=[qu,zu],r=[];let o=e;for(;o<e+n;){const e=Gu(t,o);if(void 0===e)break;void 0!==e.type&&(void 0===e.itemType||-1!==i.indexOf(e.itemType))&&r.push(e),o+=e.length}return r}const Yu={isHeicFile:function(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Gu(t,0);return n&&-1!==e.indexOf(n.majorBrand)}catch{return!1}},findHeicOffsets:function(t){return $u(t)}};const Ku={isAvifFile:function(t){if(!t)return!1;try{const e=Gu(t,0);return e&&"avif"===e.majorBrand}catch{return!1}},findAvifOffsets:function(t){return $u(t)}};const Zu={isWebpFile:function(t){const e="RIFF",n="WEBP";return!!t&&tp(t,0,4)===e&&tp(t,8,4)===n},findOffsets:function(t){const e="Exif\0\0";let n,i,r,o,a=12,s=!1;for(;a+8<t.byteLength;){const c=tp(t,a,4),l=t.getUint32(a+4,!0);"EXIF"===c?(s=!0,n=tp(t,a+8,6)===e?a+8+6:a+8):"XMP "===c?(s=!0,i=[{dataOffset:a+8,length:l}]):"ICCP"===c?(s=!0,r=[{offset:a+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(s=!0,o=a+8),a+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:i,iccChunks:r,vp8xChunkOffset:o}}};const Qu={isGifFile:function(t){return!!t&&td.includes(tp(t,0,Ju))},findOffsets:function(){return{gifHeaderOffset:0}}},Ju=6,td=["GIF87a","GIF89a"];const ed={isXMLFile:function(t){return!!t&&tp(t,nd,id.length)===id},findOffsets:function(t){const e=[];return e.push({dataOffset:nd,length:t.byteLength}),{xmpChunks:e}}},nd=0,id="<?xpacket begin";const rd={parseAppMarkers:function(t,e){if(yp.isTiffFile(t))return od(yp.findTiffOffsets(),"tiff","TIFF");if(bp.isJpegFile(t))return od(bp.findJpegOffsets(t),"jpeg","JPEG");if(mu.isPngFile(t))return od(mu.findPngOffsets(t,e),"png","PNG");if(Yu.isHeicFile(t))return od(Yu.findHeicOffsets(t),"heic","HEIC");if(Ku.isAvifFile(t))return od(Ku.findAvifOffsets(t),"avif","AVIF");if(Zu.isWebpFile(t))return od(Zu.findOffsets(t),"webp","WebP");if(Qu.isGifFile(t))return od(Qu.findOffsets(t),"gif","GIF");if(ed.isXMLFile(t))return od(ed.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}};function od(t,e,n){return op({},t,{fileType:{value:e,description:n}})}const ad={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace:t=>1===t?"sRGB":65535===t?"Uncalibrated":"Unknown",ComponentsConfiguration:t=>t.map(t=>49===t?"Y":50===t?"Cb":51===t?"Cr":52===t?"R":53===t?"G":54===t?"B":void 0).join(""),Contrast:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",CustomRendered:t=>0===t?"Normal process":1===t?"Custom process":"Unknown",ExposureMode:t=>0===t?"Auto exposure":1===t?"Manual exposure":2===t?"Auto bracket":"Unknown",ExposureProgram:t=>0===t?"Undefined":1===t?"Manual":2===t?"Normal program":3===t?"Aperture priority":4===t?"Shutter priority":5===t?"Creative program":6===t?"Action program":7===t?"Portrait mode":8===t?"Landscape mode":9===t?"Bulb":"Unknown",ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return 0!==t[0]?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit:t=>2===t?"inches":3===t?"centimeters":4===t?"millimeters":"Unknown",LightSource:t=>1===t?"Daylight":2===t?"Fluorescent":3===t?"Tungsten (incandescent light)":4===t?"Flash":9===t?"Fine weather":10===t?"Cloudy weather":11===t?"Shade":12===t?"Daylight fluorescent (D 5700 – 7100K)":13===t?"Day white fluorescent (N 4600 – 5400K)":14===t?"Cool white fluorescent (W 3900 – 4500K)":15===t?"White fluorescent (WW 3200 – 3700K)":17===t?"Standard light A":18===t?"Standard light B":19===t?"Standard light C":20===t?"D55":21===t?"D65":22===t?"D75":23===t?"D50":24===t?"ISO studio tungsten":255===t?"Other light source":"Unknown",MeteringMode:t=>1===t?"Average":2===t?"CenterWeightedAverage":3===t?"Spot":4===t?"MultiSpot":5===t?"Pattern":6===t?"Partial":255===t?"Other":"Unknown",ResolutionUnit:t=>2===t?"inches":3===t?"centimeters":"Unknown",Saturation:t=>0===t?"Normal":1===t?"Low saturation":2===t?"High saturation":"Unknown",FocalLengthIn35mmFilm:t=>0===t?"Unknown":t+" mm",SceneCaptureType:t=>0===t?"Standard":1===t?"Landscape":2===t?"Portrait":3===t?"Night scene":"Unknown",Sharpness:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance:t=>0===t?"Auto white balance":1===t?"Manual white balance":"Unknown",XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},sd={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[t]||"Unknown")},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[t]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[t]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"}[t]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>1===t?"top-left":2===t?"top-right":3===t?"bottom-right":4===t?"bottom-left":5===t?"left-top":6===t?"right-top":7===t?"right-bottom":8===t?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:ad.XResolution},283:{name:"YResolution",description:ad.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[t]||"Unknown")},296:{name:"ResolutionUnit",description:ad.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"}[t]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[t]||"Unknown")},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(t=>e[t]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(t=>""+t[0]/t[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>1===t?"centered":2===t?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(t=>""+t[0]/t[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:cd},40092:{name:"XPComment",description:cd},40093:{name:"XPAuthor",description:cd},40094:{name:"XPKeywords",description:cd},40095:{name:"XPSubject",description:cd},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"}[t]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:ad.LightSource},50779:{name:"CalibrationIlluminant2",description:ad.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[t]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[t]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"}[t]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function cd(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const ld={33434:{name:"ExposureTime",description:ad.ExposureTime},33437:{name:"FNumber",description:ad.FNumber},34850:{name:"ExposureProgram",description:ad.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[t]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>fp(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ad.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ad.ShutterSpeedValue},37378:{name:"ApertureValue",description:ad.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:ad.MeteringMode},37384:{name:"LightSource",description:ad.LightSource},37385:{name:"Flash",description:t=>0===t?"Flash did not fire":1===t?"Flash fired":5===t?"Strobe return light not detected":7===t?"Strobe return light detected":9===t?"Flash fired, compulsory flash mode":13===t?"Flash fired, compulsory flash mode, return light not detected":15===t?"Flash fired, compulsory flash mode, return light detected":16===t?"Flash did not fire, compulsory flash mode":24===t?"Flash did not fire, auto mode":25===t?"Flash fired, auto mode":29===t?"Flash fired, auto mode, return light not detected":31===t?"Flash fired, auto mode, return light detected":32===t?"No flash function":65===t?"Flash fired, red-eye reduction mode":69===t?"Flash fired, red-eye reduction mode, return light not detected":71===t?"Flash fired, red-eye reduction mode, return light detected":73===t?"Flash fired, compulsory flash mode, red-eye reduction mode":77===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===t?"Flash fired, auto mode, red-eye reduction mode":93===t?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===t?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:ad.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[t]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>2===t.length?`Location; X: ${t[0]}, Y: ${t[1]}`:3===t.length?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:4===t.length?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:mp},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(t=>String.fromCharCode(t)).join("")},40961:{name:"ColorSpace",description:ad.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:ad.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>1===t?"Undefined":2===t?"One-chip color area sensor":3===t?"Two-chip color area sensor":4===t?"Three-chip color area sensor":5===t?"Color sequential area sensor":7===t?"Trilinear sensor":8===t?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>3===t?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>1===t?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:ad.CustomRendered},41986:{name:"ExposureMode",description:ad.ExposureMode},41987:{name:"WhiteBalance",description:ad.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>0===t[0]?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:ad.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:ad.SceneCaptureType},41991:{name:"GainControl",description:t=>0===t?"None":1===t?"Low gain up":2===t?"High gain up":3===t?"Low gain down":4===t?"High gain down":"Unknown"},41992:{name:"Contrast",description:ad.Contrast},41993:{name:"Saturation",description:ad.Saturation},41994:{name:"Sharpness",description:ad.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>1===t?"Macro":2===t?"Close view":3===t?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=`${parseFloat((t[0][0]/t[0][1]).toFixed(5))}-${parseFloat((t[1][0]/t[1][1]).toFixed(5))} mm`;if(0===t[3][1])return`${e} f/?`;const n=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${e} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[t]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},pd={0:{name:"GPSVersionID",description:t=>2===t[0]&&2===t[1]&&0===t[2]&&0===t[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:hp},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:hp},5:{name:"GPSAltitudeRef",description:t=>0===t?"Sea level":1===t?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([t,e])=>{const n=t/e;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return"A"===e?"Measurement in progress":"V"===e?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return"2"===e?"2-dimensional measurement":"3"===e?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers per hour":"M"===e?"Miles per hour":"N"===e?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers":"M"===e?"Miles":"N"===e?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:mp},28:{name:"GPSAreaInformation",description:mp},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>0===t?"Measurement without differential correction":1===t?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},ud={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>fp(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},dd={45056:{name:"MPFVersion",description:t=>fp(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},fd=op({},sd,ld),md="0th",hd="1st",gd="exif",vd="gps",xd="interoperability",yd="mpf",bd="canon",wd="pentax",Ad={[md]:fd,[hd]:sd,[gd]:fd,[vd]:pd,[xd]:ud,[yd]:dd,[bd]:{4:{name:"ShotInfo",description:t=>t}},[wd]:{0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"}},Sd={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Pd={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Cd={getAsciiValue:function(t){return t.map(t=>String.fromCharCode(t))},getByteAt:Td,getAsciiAt:function(t,e){return t.getUint8(e)},getShortAt:function(t,e,n){return t.getUint16(e,n===xp.LITTLE_ENDIAN)},getLongAt:kd,getRationalAt:function(t,e,n){return[kd(t,e,n),kd(t,e+4,n)]},getUndefinedAt:function(t,e){return Td(t,e)},getSlongAt:Ed,getSrationalAt:function(t,e,n){return[Ed(t,e,n),Ed(t,e+4,n)]},getIfdPointerAt:function(t,e,n){return kd(t,e,n)},typeSizes:Sd,tagTypes:Pd,getTypeSize:function(t){if(void 0===Pd[t])throw new Error("No such type found.");return Sd[Pd[t]]}};function Td(t,e){return t.getUint8(e)}function kd(t,e,n){return t.getUint32(e,n===xp.LITTLE_ENDIAN)}function Ed(t,e,n){return t.getInt32(e,n===xp.LITTLE_ENDIAN)}const Id={1:Cd.getByteAt,2:Cd.getAsciiAt,3:Cd.getShortAt,4:Cd.getLongAt,5:Cd.getRationalAt,7:Cd.getUndefinedAt,9:Cd.getSlongAt,10:Cd.getSrationalAt,13:Cd.getIfdPointerAt};function jd(t,e,n){return e+Cd.getLongAt(t,e+4,n)}function Dd(t,e,n,i,r,o){const a=Cd.getTypeSize("SHORT"),s={},c=function(t,e,n){return e+Cd.getTypeSize("SHORT")<=t.byteLength?Cd.getShortAt(t,e,n):0}(t,i,r);i+=a;for(let a=0;a<c&&!(i+12>t.byteLength);a++){const a=Md(t,e,n,i,r,o);void 0!==a&&(s[a.name]={id:a.id,value:a.value,description:a.description},("MakerNote"===a.name||e===wd&&"LevelInfo"===a.name)&&(s[a.name].__offset=a.__offset)),i+=12}if(i<t.byteLength-Cd.getTypeSize("LONG")){const a=Cd.getLongAt(t,i,r);0!==a&&e===md&&(s.Thumbnail=Dd(t,"1st",n,n+a,r,o))}return s}function Md(t,e,n,i,r,o){const a=Cd.getTypeSize("SHORT"),s=a+Cd.getTypeSize("SHORT"),c=s+Cd.getTypeSize("LONG"),l=Cd.getShortAt(t,i,r),p=Cd.getShortAt(t,i+a,r),u=Cd.getLongAt(t,i+s,r);let d,f;if(void 0===Cd.typeSizes[p]||!o&&void 0===Ad[e][l])return;if(function(t,e){return Cd.typeSizes[t]*e<=Cd.getTypeSize("LONG")}(p,u))f=i+c,d=Fd(t,f,p,u,r);else if(f=Cd.getLongAt(t,i+c,r),function(t,e,n,i,r){return e+n+Cd.typeSizes[i]*r<=t.byteLength}(t,n,f,p,u)){d=Fd(t,n+f,p,u,r,33723===l)}else d="<faulty value>";p===Cd.tagTypes.ASCII&&(d=function(t){const e=[];let n=0;for(let i=0;i<t.length;i++)"\0"!==t[i]?(void 0===e[n]&&(e[n]=""),e[n]+=t[i]):n++;return e}(d),d=function(t){try{return t.map(t=>decodeURIComponent(escape(t)))}catch{return t}}(d));let m=`undefined-${l}`,h=d;if(void 0!==Ad[e][l])if(void 0!==Ad[e][l].name&&void 0!==Ad[e][l].description){m=Ad[e][l].name;try{h=Ad[e][l].description(d)}catch{h=Ud(d)}}else p===Cd.tagTypes.RATIONAL||p===Cd.tagTypes.SRATIONAL?(m=Ad[e][l],h=""+d[0]/d[1]):(m=Ad[e][l],h=Ud(d));return{id:l,name:m,value:d,description:h,__offset:f}}function Fd(t,e,n,i,r,o=!1){let a=[];o&&(i*=Cd.typeSizes[n],n=Cd.tagTypes.BYTE);for(let o=0;o<i;o++)a.push(Id[n](t,e,r)),e+=Cd.typeSizes[n];return n===Cd.tagTypes.ASCII?a=Cd.getAsciiValue(a):1===a.length&&(a=a[0]),a}function Ud(t){return t instanceof Array?t.join(", "):t}const Rd="Exif IFD Pointer",Od="GPS Info IFD Pointer",Ld="Interoperability IFD Pointer",Nd={read:function(t,e,n){const i=xp.getByteOrder(t,e);let r=function(t,e,n,i){return Dd(t,md,e,jd(t,e,n),n,i)}(t,e,i,n);return r=function(t,e,n,i,r){return void 0!==t[Rd]?op(t,Dd(e,gd,n,n+t[Rd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Od]?op(t,Dd(e,vd,n,n+t[Od].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Ld]?op(t,Dd(e,xd,n,n+t[Ld].value,i,r)):t}(r,t,e,i,n),{tags:r,byteOrder:i}}};const Bd={read:function(t,e,n){const i=xp.getByteOrder(t,e),r=Dd(t,"mpf",e,jd(t,e,i),i,n);return function(t,e,n,i){if(!n.MPEntry)return n;const r=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Vd);o++){r[o]={};const a=qd(n.MPEntry.value,o*Vd,Cd.getTypeSize("LONG"),i);r[o].ImageFlags=zd(a),r[o].ImageFormat=_d(a),r[o].ImageType=Gd(a);const s=qd(n.MPEntry.value,o*Vd+4,Cd.getTypeSize("LONG"),i);r[o].ImageSize={value:s,description:""+s};const c=$d(o,n.MPEntry,i,e);r[o].ImageOffset={value:c,description:""+c};const l=qd(n.MPEntry.value,o*Vd+12,Cd.getTypeSize("SHORT"),i);r[o].DependentImage1EntryNumber={value:l,description:""+l};const p=qd(n.MPEntry.value,o*Vd+14,Cd.getTypeSize("SHORT"),i);r[o].DependentImage2EntryNumber={value:p,description:""+p},r[o].image=t.buffer.slice(c,c+s),ap(r[o],"base64",function(){return sp(this.image)})}return n.Images=r,n}(t,e,r,i)}},Vd=16;function qd(t,e,n,i){if(i===xp.LITTLE_ENDIAN){let i=0;for(let r=0;r<n;r++)i+=t[e+r]<<8*r;return i}let r=0;for(let i=0;i<n;i++)r+=t[e+i]<<8*(n-1-i);return r}function zd(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function _d(t){const e=t>>24&7;return{value:e,description:0===e?"JPEG":"Unknown"}}function Gd(t){const e=16777215&t;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function $d(t,e,n,i){return function(t){return 0===t}(t)?0:qd(e.value,t*Vd+8,Cd.getTypeSize("LONG"),n)+i}const Hd={read:function(t,e){const n=function(t,e){return Cd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(8>n)return;const i=Cd.getByteAt(t,e+7);return{value:i,description:""+i}}(t,e,n);return{"Bits Per Sample":Wd(t,e,n),"Image Height":Xd(t,e,n),"Image Width":Yd(t,e,n),"Color Components":i,Subsampling:i&&Kd(t,e,i.value,n)}}};function Wd(t,e,n){if(3>n)return;const i=Cd.getByteAt(t,e+2);return{value:i,description:""+i}}function Xd(t,e,n){if(5>n)return;const i=Cd.getShortAt(t,e+3);return{value:i,description:`${i}px`}}function Yd(t,e,n){if(7>n)return;const i=Cd.getShortAt(t,e+5);return{value:i,description:`${i}px`}}function Kd(t,e,n,i){if(8+3*n>i)return;const r=[];for(let i=0;i<n;i++){const n=e+8+3*i;r.push([Cd.getByteAt(t,n),Cd.getByteAt(t,n+1),Cd.getByteAt(t,n+2)])}return{value:r,description:r.length>1?Zd(r)+Qd(r):""}}function Zd(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(t=>e[t[0]]).join("")}function Qd(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===t.length||void 0===t[0][1]||void 0===e[t[0][1]]?"":e[t[0][1]]}const Jd={read:function(t,e){const n=function(t,e){return Cd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(15>n)return;const i=Cd.getByteAt(t,e+14);return{value:i,description:`${i}px`}}(t,e,n),r=function(t,e,n){if(16>n)return;const i=Cd.getByteAt(t,e+15);return{value:i,description:`${i}px`}}(t,e,n),o={"JFIF Version":tf(t,e,n),"Resolution Unit":ef(t,e,n),XResolution:rf(t,e,n),YResolution:of(t,e,n),"JFIF Thumbnail Width":i,"JFIF Thumbnail Height":r};if(void 0!==i&&void 0!==r){const a=function(t,e,n,i){return 0===n||16+n>i?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}(t,e,3*i.value*r.value,n);a&&(o["JFIF Thumbnail"]=a)}for(const t in o)void 0===o[t]&&delete o[t];return o}};function tf(t,e,n){if(9>n)return;const i=Cd.getByteAt(t,e+7),r=Cd.getByteAt(t,e+7+1);return{value:256*i+r,description:i+"."+r}}function ef(t,e,n){if(10>n)return;const i=Cd.getByteAt(t,e+9);return{value:i,description:nf(i)}}function nf(t){return 0===t?"None":1===t?"inches":2===t?"cm":"Unknown"}function rf(t,e,n){if(12>n)return;const i=Cd.getShortAt(t,e+10);return{value:i,description:""+i}}function of(t,e,n){if(14>n)return;const i=Cd.getShortAt(t,e+12);return{value:i,description:""+i}}const af={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:sf},336:{name:"Time Sent",description:cf},346:{name:"Coded Character Set",description:lf,encoding_name:lf},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>"01"===fp(t)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=fp(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=fp(t);return"01"===e?"Object Kill":"02"===e?"Object Replace":"03"===e?"Object Append":"04"===e?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:sf},572:{name:"Time Created",description:cf},574:{name:"Digital Creation Date",description:sf},575:{name:"Digital Creation Time",description:cf},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=fp(t);return"a"===e?"morning":"p"===e?"evening":"b"===e?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=fp(t);return"P"===e?"Portrait":"L"===e?"Landscape":"S"===e?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=fp(t),n=e.charAt(0),i=e.charAt(1);let r="";return"1"===n?r+="Mono":"2"===n&&(r+="Stereo"),"A"===i?r+=", actuality":"C"===i?r+=", question and answer session":"M"===i?r+=", music, transmitted by itself":"Q"===i?r+=", response to a question":"R"===i?r+=", raw sound":"S"===i?r+=", scener":"V"===i?r+=", voicer":"W"===i&&(r+=", wrap"),""!==r?r:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(fp(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(fp(t),10);return e+(1===e?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=fp(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>2===t.length?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(2===t.length){const e=(t[0]<<8)+t[1];return 0===e?"No ObjectData":1===e?"IPTC-NAA Digital Newsphoto Parameter Record":2===e?"IPTC7901 Recommended Message Format":3===e?"Tagged Image File Format (Adobe/Aldus Image data)":4===e?"Illustrator (Adobe Graphics data)":5===e?"AppleSingle (Apple Computer Inc)":6===e?"NAA 89-3 (ANPA 1312)":7===e?"MacBinary II":8===e?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===e?"United Press International ANPA 1312 variant":10===e?"United Press International Down-Load Message":11===e?"JPEG File Interchange (JFIF)":12===e?"Photo-CD Image-Pac (Eastman Kodak)":13===e?"Microsoft Bit Mapped Graphics File [*.BMP]":14===e?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===e?"Audio plus Moving Video [*.AVI] (Microsoft)":16===e?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===e?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===e?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===e?"RIFF Wave (Microsoft Corporation)":20===e?"Freehand (Macromedia/Aldus)":21===e?'Hypertext Markup Language "HTML" (The Internet Society)':22===e?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===e?"MPEG 2 Audio Layer 3, ISO/IEC":24===e?"Portable Document File (*.PDF) Adobe":25===e?"News Industry Text Format (NITF)":26===e?"Tape Archive (*.TAR)":27===e?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===e?"Ritzaus Bureau NITF version (RBNITF DTD)":29===e?"Corel Draw [*.CDR]":`Unknown format ${e}`}return fp(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},i=fp(t);if(e["ObjectData Preview File Format"]){const t=fp(e["ObjectData Preview File Format"].value);if(n[t]&&n[t][i])return n[t][i]}return i}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function sf(t){const e=fp(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function cf(t){const e=fp(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),11===e.length&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function lf(t){const e=fp(t);return"%G"===e?"UTF-8":"%5"===e?"Windows-1252":"%/G"===e?"UTF-8 Level 1":"%/H"===e?"UTF-8 Level 2":"%/I"===e?"UTF-8 Level 3":"/A"===e?"ISO-8859-1":"/B"===e?"ISO-8859-2":"/C"===e?"ISO-8859-3":"/D"===e?"ISO-8859-4":"/@"===e?"ISO-8859-5":"/G"===e?"ISO-8859-6":"/F"===e?"ISO-8859-7":"/H"===e?"ISO-8859-8":"Unknown"}const pf={get:function(){if(typeof TextDecoder<"u")return TextDecoder}};const uf={decode:function(t,e){const n=pf.get();if(typeof n<"u"&&void 0!==t)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const i=e.map(t=>String.fromCharCode(t)).join("");return function(t){try{return decodeURIComponent(escape(t))}catch{return t}}(i)},TAG_HEADER_SIZE:5};const df={read:function(t,e,n){try{if(Array.isArray(t))return gf(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:i,dataOffset:r}=function(t,e){for(;e+12<=t.byteLength;){const n=ff(t,e);if(mf(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+hf(n)}throw new Error("No IPTC NAA resource block.")}(t,e);return gf(t,i,r,n)}catch{return{}}}};function ff(t,e){if(943868237!==t.getUint32(e,!1))throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+4+2),i=(n%2==0?n+1:n)+1;return{headerSize:6+i+4,type:t.getUint16(e+4),size:t.getUint32(e+4+2+i)}}function mf(t){return 1028===t.type}function hf(t){return t.size%2!=0?1:0}function gf(t,e,n,i){const r={};let o;const a=n+e.size;for(;n<a&&n<t.byteLength;){const{tag:e,tagSize:a}=vf(t,n,r,o,i);if(null===e)break;e&&("encoding"in e&&(o=e.encoding),void 0===r[e.name]||void 0===e.repeatable?r[e.name]={id:e.id,value:e.value,description:e.description}:(r[e.name]instanceof Array||(r[e.name]=[{id:r[e.name].id,value:r[e.name].value,description:r[e.name].description}]),r[e.name].push({id:e.id,value:e.value,description:e.description}))),n+=5+a}return r}function vf(t,e,n,i,r){if(function(t,e){return 28!==t.getUint8(e)}(t,e))return{tag:null,tagSize:0};const o=t.getUint16(e+1),a=t.getUint16(e+3);if(!r&&!af.iptc[o])return{tag:void 0,tagSize:a};const s=function(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t.getUint8(e+r));return i}(t,e+5,a),c={id:o,name:xf(af.iptc[o],o,s),value:s,description:yf(af.iptc[o],s,n,i)};return function(t){return af.iptc[t]&&af.iptc[t].repeatable}(o)&&(c.repeatable=!0),function(t){return af.iptc[t]&&void 0!==af.iptc[t].encoding_name}(o)&&(c.encoding=af.iptc[o].encoding_name(s)),{tag:c,tagSize:a}}function xf(t,e,n){return t?function(t){return"string"==typeof t}(t)?t:function(t){return"function"==typeof t.name}(t)?t.name(n):t.name:`undefined-${e}`}function yf(t,e,n,i){if(function(t){return t&&void 0!==t.description}(t))try{return t.description(e,n)}catch{}return function(t,e){return t&&e instanceof Array}(t,e)?uf.decode(i,e):e}const bf={"tiff:Orientation":t=>"1"===t?"Horizontal (normal)":"2"===t?"Mirror horizontal":"3"===t?"Rotate 180":"4"===t?"Mirror vertical":"5"===t?"Mirror horizontal and rotate 270 CW":"6"===t?"Rotate 90 CW":"7"===t?"Mirror horizontal and rotate 90 CW":"8"===t?"Rotate 270 CW":t,"tiff:ResolutionUnit":t=>ad.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>wf(ad.XResolution,t),"tiff:YResolution":t=>wf(ad.YResolution,t),"exif:ApertureValue":t=>wf(ad.ApertureValue,t),"exif:GPSLatitude":Sf,"exif:GPSLongitude":Sf,"exif:FNumber":t=>wf(ad.FNumber,t),"exif:FocalLength":t=>wf(ad.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>ad.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>ad.ColorSpace(function(t){return"0x"===t.substring(0,2)?parseInt(t.substring(2),16):parseInt(t,10)}(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const t=e.split(", ").map(t=>t.charCodeAt(0));return ad.ComponentsConfiguration(t)}return e},"exif:Contrast":t=>ad.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>ad.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>ad.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>ad.ExposureProgram(parseInt(t,10)),"exif:ExposureTime":t=>Af(t)?ad.ExposureTime(t.split("/").map(t=>parseInt(t,10))):t,"exif:MeteringMode":t=>ad.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>ad.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>ad.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>ad.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>wf(ad.ShutterSpeedValue,t),"exif:WhiteBalance":t=>ad.WhiteBalance(parseInt(t,10))};function wf(t,e){return Af(e)?t(e.split("/")):e}function Af(t){return/^-?\d+\/-?\d+$/.test(t)}function Sf(t){const[e,n]=t.split(",");if(void 0!==e&&void 0!==n){const t=parseFloat(e),i=parseFloat(n),r=n.charAt(n.length-1);if(!Number.isNaN(t)&&!Number.isNaN(i))return""+(t+i/60)+r}return t}const Pf={get:function(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}};function Cf(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],i=function(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let i;for(;null!==(i=n.exec(t));)-1===e.indexOf(i[1])&&e.push(i[1]);return e}(t),r=function(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];"xmlns"===t||"xml"===t||-1===e.indexOf(t)&&e.push(t)}return e}(t).filter(t=>-1===i.indexOf(t));if(0===r.length)return t;const o=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Tf[i]||"http://fallback.namespace/"+i;e.push(" xmlns:"+i+'="'+r+'"')}return e.join("")}(r);return function(t,e,n){const i=new RegExp("<"+e+"([^>]*)>");return t.replace(i,"<"+e+"$1"+n+">")}(t,n,o)}const Tf={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};const kf={read:function(t,e,n){const i={};if("string"==typeof t)return jf(i,t,n),i;const[r,o]=function(t,e){if(0===e.length)return[];const n=[If(t,e.slice(0,1))];return e.length>1&&n.push(If(t,e.slice(1))),n}(t,e),a=jf(i,r,n);if(o){const r=jf(i,o,n);!a&&!r&&(delete i._raw,jf(i,If(t,e),n))}return i}};class Ef extends Error{constructor(t){super(t),this.name="ParseError"}}function If(t,e){const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;for(let n=0;n<e.length;n++){const o=e[n],a=t.buffer.slice(o.dataOffset,o.dataOffset+o.length);i.set(new Uint8Array(a),r),r+=o.length}return new DataView(i.buffer)}function jf(t,e,n){try{const{doc:i,raw:r}=function(t,e){const n=Pf.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const i="string"==typeof t?t:tp(t,0,t.byteLength);return{doc:Mf(n,Df(i)),raw:i}}(e,n);t._raw=(t._raw||"")+r;return op(t,Of(Uf(Ff(i),!0))),!0}catch{return!1}}function Df(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function Mf(t,e,n=!1){try{const n=t.parseFromString(e,"application/xml"),i=n.getElementsByTagName("parsererror");if(i.length>0)throw new Ef(i[0].textContent);return n}catch(i){if("ParseError"===i.name&&function(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}(i)&&!n)return Mf(t,Cf(e),!0);throw i}}function Ff(t){for(let e=0;e<t.childNodes.length;e++){if("x:xmpmeta"===t.childNodes[e].tagName)return Ff(t.childNodes[e]);if("rdf:RDF"===t.childNodes[e].tagName)return t.childNodes[e]}throw new Error}function Uf(t,e=!1){const n=function(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}(t);return function(t){return 1===t.length&&"#text"===t[0].nodeName}(n)?e?{}:function(t){return t.nodeValue}(n[0]):function(t){const e={};return t.forEach(t=>{if(function(t){return t.nodeName&&"#text"!==t.nodeName}(t)){const n=function(t){return{attributes:Rf(t),value:Uf(t)}}(t);void 0!==e[t.nodeName]?(Array.isArray(e[t.nodeName])||(e[t.nodeName]=[e[t.nodeName]]),e[t.nodeName].push(n)):e[t.nodeName]=n}}),e}(n)}function Rf(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function Of(t){const e={};if("string"==typeof t)return t;for(const n in t){let i=t[n];Array.isArray(i)||(i=[i]),i.forEach(t=>{op(e,Lf(t.attributes)),"object"==typeof t.value&&op(e,_f(t.value))})}return e}function Lf(t){const e={};for(const n in t)try{Nf(n)&&(e[Vf(n)]={value:t[n],attributes:{},description:qf(t[n],n)})}catch{}return e}function Nf(t){return"rdf:parseType"!==t&&!Bf(t)}function Bf(t){return"xmlns"===t.split(":")[0]}function Vf(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function qf(t,e=void 0){if(Array.isArray(t)){const n=function(t){return t.map(t=>void 0!==t.value?qf(t.value):qf(t)).join(", ")}(t);return e&&"function"==typeof bf[e]?bf[e](t,n):n}if("object"==typeof t)return function(t){const e=[];for(const n in t)e.push(`${zf(n)}: ${qf(t[n].value)}`);return e.join("; ")}(t);try{return e&&"function"==typeof bf[e]?bf[e](t):decodeURIComponent(escape(t))}catch{return t}}function zf(t){return"CiAdrCity"===t?"CreatorCity":"CiAdrCtry"===t?"CreatorCountry":"CiAdrExtadr"===t?"CreatorAddress":"CiAdrPcode"===t?"CreatorPostalCode":"CiAdrRegion"===t?"CreatorRegion":"CiEmailWork"===t?"CreatorWorkEmail":"CiTelWork"===t?"CreatorWorkPhone":"CiUrlWork"===t?"CreatorWorkUrl":t}function _f(t){const e={};for(const n in t)try{Bf(n)||(e[Vf(n)]=Gf(t[n],n))}catch{}return e}function Gf(t,e){return function(t){return Array.isArray(t)}(t)?function(t,e){return Jf(t[t.length-1],e)}(t,e):function(t){return"Resource"===t.attributes["rdf:parseType"]&&"string"==typeof t.value&&""===t.value.trim()}(t)?{value:"",attributes:{},description:""}:$f(t)?Hf(t,e):Xf(t)?Yf(t,e):Kf(t)?Zf(t,e):function(t){return void 0!==Qf(t.value)}(t)?function(t,e){let n=Qf(t.value).value["rdf:li"];const i=Wf(t),r=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach(t=>{r.push(function(t){return $f(t)?Hf(t):Xf(t)?Yf(t).value:Kf(t)?Zf(t).value:Jf(t)}(t))}),{value:r,attributes:i,description:qf(r,e)}}(t,e):Jf(t,e)}function $f(t){return"Resource"===t.attributes["rdf:parseType"]&&void 0!==t.value["rdf:value"]||void 0!==t.value["rdf:Description"]&&void 0!==t.value["rdf:Description"].value["rdf:value"]}function Hf(t,e){const n=Wf(t);void 0!==t.value["rdf:Description"]&&(t=t.value["rdf:Description"]),op(n,Wf(t),function(t){const e={};for(const n in t.value)"rdf:value"!==n&&!Bf(n)&&(e[Vf(n)]=t.value[n].value);return e}(t));const i=function(t){return tm(t.value["rdf:value"])||t.value["rdf:value"].value}(t);return{value:i,attributes:n,description:qf(i,e)}}function Wf(t){const e={};for(const n in t.attributes)"rdf:parseType"!==n&&"rdf:resource"!==n&&!Bf(n)&&(e[Vf(n)]=t.attributes[n]);return e}function Xf(t){return"Resource"===t.attributes["rdf:parseType"]||void 0!==t.value["rdf:Description"]&&void 0===t.value["rdf:Description"].value["rdf:value"]}function Yf(t,e){const n={value:{},attributes:{}};return void 0!==t.value["rdf:Description"]&&(op(n.value,Lf(t.value["rdf:Description"].attributes)),op(n.attributes,Wf(t)),t=t.value["rdf:Description"]),op(n.value,_f(t.value)),n.description=qf(n.value,e),n}function Kf(t){return 0===Object.keys(t.value).length&&void 0===t.attributes["xml:lang"]&&void 0===t.attributes["rdf:resource"]}function Zf(t,e){const n=Lf(t.attributes);return{value:n,attributes:{},description:qf(n,e)}}function Qf(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function Jf(t,e){const n=tm(t)||Of(t.value);return{value:n,attributes:Wf(t),description:qf(n,e)}}function tm(t){return t.attributes&&t.attributes["rdf:resource"]}const em=0,nm=1,im=2,rm=3,om=4,am=5,sm=6,cm=7,lm=8,pm={2e3:{name:"PathInformation",description:function(t){const e={},n=[];for(let i=0;i<t.byteLength;i+=26){const r=Cd.getShortAt(t,i);um[r]&&(e[r]||(e[r]=um[r].description),n.push({type:r,path:um[r].path(t,i+2)}))}return JSON.stringify({types:e,paths:n})}},2999:{name:"ClippingPathName",description(t){const[,e]=ip(t,0);return e}}};const um={[em]:{description:"Closed subpath length",path:(t,e)=>[Cd.getShortAt(t,e)]},[nm]:{description:"Closed subpath Bezier knot, linked",path:dm},[im]:{description:"Closed subpath Bezier knot, unlinked",path:dm},[rm]:{description:"Open subpath length",path:(t,e)=>[Cd.getShortAt(t,e)]},[om]:{description:"Open subpath Bezier knot, linked",path:dm},[am]:{description:"Open subpath Bezier knot, unlinked",path:dm},[sm]:{description:"Path fill rule",path:()=>[]},[lm]:{description:"Initial fill rule",path:(t,e)=>[Cd.getShortAt(t,e)]},[cm]:{description:"Clipboard",path:function(t,e){return[[mm(t,e,8),mm(t,e+4,8),mm(t,e+8,8),mm(t,e+12,8)],mm(t,e+16,8)]}}};function dm(t,e){const n=[];for(let i=0;i<24;i+=8)n.push(fm(t,e+i));return n}function fm(t,e){const n=mm(t,e,8);return[mm(t,e+4,8),n]}function mm(t,e,n){const i=Cd.getLongAt(t,e),r=i>>>31?-1:1,o=(2130706432&i)>>>32-n,a=i&parseInt(cp("1",32-n),2);return r*function(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}(o.toString(2)+"."+function(t,e,n){return cp(n,e-t.length)+t}(a.toString(2),32-n,"0"),2)}const hm={read:function(t,e){const n=Jl(new Uint8Array(t).buffer),i={};let r=0;for(;r<t.length;){const t=tp(n,r,ym);r+=ym;const o=Cd.getShortAt(n,r);r+=vm;const{tagName:a,tagNameSize:s}=bm(n,r);r+=s;const c=Cd.getLongAt(n,r);if(r+=xm,t===gm){const t=Jl(n.buffer,r,c),s={id:o,value:tp(t,0,c)};if(pm[o]){try{s.description=pm[o].description(t)}catch{s.description="<no description formatter>"}i[a||pm[o].name]=s}else e&&(i[`undefined-${o}`]=s)}r+=c+c%2}return i}},gm="8BIM",vm=2,xm=4,ym=gm.length;function bm(t,e){const[n,i]=ip(t,e);return{tagName:i,tagNameSize:1+n+(n%2==0?1:0)}}const wm={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Am={4:{name:"Preferred CMM type",value:(t,e)=>tp(t,e,4),description:t=>null!==t?Sm(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>tp(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>tp(t,e,4)},20:{name:"Connection Space",value:(t,e)=>tp(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>function(t,e){const n=t.getUint16(e),i=t.getUint16(e+2)-1,r=t.getUint16(e+4),o=t.getUint16(e+6),a=t.getUint16(e+8),s=t.getUint16(e+10);return new Date(Date.UTC(n,i,r,o,a,s))}(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>function(t){return String.fromCharCode.apply(null,new Uint8Array(t))}(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>tp(t,e,4),description:t=>Sm(t)},48:{name:"Device Manufacturer",value:(t,e)=>tp(t,e,4),description:t=>Sm(t)},52:{name:"Device Model Number",value:(t,e)=>tp(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>tp(t,e,4)}};function Sm(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const Pm={read:function(t,e,n){return n&&e[0].compressionMethod!==lp?function(t,e){if(!function(t){return 0===t}(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return pp(n,e[0].compressionMethod,"utf-8","dataview").then(Um).catch(()=>({}))}(t,e):function(t,e){try{const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;const o=function(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}(t);for(let t=1;t<=e.length;t++){const n=e.find(e=>e.chunkNumber===t);if(!n)throw new Error(`ICC chunk ${t} not found`);const a=o.slice(n.offset,n.offset+n.length),s=new Uint8Array(a);i.set(s,r),r+=s.length}return Um(new DataView(i.buffer))}catch{return{}}}(t,e)}},Cm=84,Tm=128,km="acsp",Em="desc",Im="mluc",jm="text",Dm="sig ",Mm=12;function Fm(t,e){return t.length<e+Mm}function Um(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<Cm)throw new Error("ICC profile too short");const i={},r=Object.keys(Am);for(let e=0;e<r.length;e++){const n=r[e],o=Am[n],a=o.value(t,parseInt(n,10));let s=a;o.description&&(s=o.description(a)),i[o.name]={value:a,description:s}}if(Rm(e.slice(36,40))!==km)throw new Error("ICC profile: missing signature");if(function(t){return t.length<Tm+4}(e))return i;const o=t.getUint32(128);let a=132;for(let n=0;n<o;n++){if(Fm(e,a))return i;const n=tp(t,a,4),r=t.getUint32(a+4),o=t.getUint32(a+8);if(r>e.length)return i;const s=tp(t,r,4);if(s===Em){const a=t.getUint32(r+8);if(a>o)return i;Om(i,n,Rm(e.slice(r+12,r+a+11)))}else if(s===Im){const e=t.getUint32(r+8),o=t.getUint32(r+12);let a=r+16;const s=[];for(let n=0;n<e;n++){const e=tp(t,a+0,2),n=tp(t,a+2,2),i=t.getUint32(a+4),c=t.getUint32(a+8),l=np(t,r+c,i);s.push({languageCode:e,countryCode:n,text:l}),a+=o}if(1===e)Om(i,n,s[0].text);else{const t={};for(let e=0;e<s.length;e++)t[`${s[e].languageCode}-${s[e].countryCode}`]=s[e].text;Om(i,n,t)}}else if(s===jm){Om(i,n,Rm(e.slice(r+8,r+o-7)))}else if(s===Dm){Om(i,n,Rm(e.slice(r+8,r+12)))}a+=12}return i}function Rm(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Om(t,e,n){wm[e]?t[wm[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Lm=27,Nm={read:function(t,e,n,i,r){let o=Dd(t,bd,e,e+n,i,r);return o.ShotInfo&&(o=op({},o,function(t){const e={};return void 0!==t[Lm]&&(e.AutoRotate={value:t[Lm],description:Bm(t[Lm])}),e}(o.ShotInfo.value)),delete o.ShotInfo),o},SHOT_INFO_AUTO_ROTATE:Lm};function Bm(t){return 0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown"}const Vm={K3_III:78420},qm={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},zm={read:function(t,e,n,i){const r=xp.getByteOrder(t,e+n+8),o=e+n;let a=Dd(t,wd,o,o+10,r,i);return function(t){return t.PentaxModelID&&t.PentaxModelID.value===Vm.K3_III&&t.LevelInfo}(a)&&(a=op({},a,function(t,e,n){const i={};if(e+7>t.byteLength)return i;const r=t.getInt8(e+qm.CAMERA_ORIENTATION);i.CameraOrientation={value:r,description:_m(r)};const o=t.getInt16(e+qm.ROLL_ANGLE,n===xp.LITTLE_ENDIAN);i.RollAngle={value:o,description:Gm(o)};const a=t.getInt16(e+qm.PITCH_ANGLE,n===xp.LITTLE_ENDIAN);return i.PitchAngle={value:a,description:$m(a)},i}(t,o+a.LevelInfo.__offset,r)),delete a.LevelInfo),a},PENTAX_IFD_OFFSET:10,MODEL_ID:Vm,LIK3III:qm};function _m(t){return 0===t?"Horizontal (normal)":1===t?"Rotate 270 CW":2===t?"Rotate 180":3===t?"Rotate 90 CW":4===t?"Upwards":5===t?"Downwards":"Unknown"}function Gm(t){return""+-.5*t}function $m(t){return""+-.5*t}const Hm={read:function(t,e){return{"Image Width":Wm(t,e),"Image Height":Xm(t,e),"Bit Depth":Ym(t,e),"Color Type":Km(t,e),Compression:Zm(t,e),Filter:Qm(t,e),Interlace:Jm(t,e)}}};function Wm(t,e){if(e+0+4>t.byteLength)return;const n=Cd.getLongAt(t,e);return{value:n,description:`${n}px`}}function Xm(t,e){if(e+4+4>t.byteLength)return;const n=Cd.getLongAt(t,e+4);return{value:n,description:`${n}px`}}function Ym(t,e){if(e+8+1>t.byteLength)return;const n=Cd.getByteAt(t,e+8);return{value:n,description:`${n}`}}function Km(t,e){if(e+9+1>t.byteLength)return;const n=Cd.getByteAt(t,e+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function Zm(t,e){if(e+10+1>t.byteLength)return;const n=Cd.getByteAt(t,e+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Qm(t,e){if(e+11+1>t.byteLength)return;const n=Cd.getByteAt(t,e+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function Jm(t,e){if(e+12+1>t.byteLength)return;const n=Cd.getByteAt(t,e+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}const th={read:function(t,e,n,i){const r={},o=[];for(let a=0;a<e.length;a++){const{offset:s,length:c,type:l}=e[a],p=lh(t,s,c,l,n);if(p instanceof Promise)o.push(p.then(({name:t,value:e,description:n})=>{try{if(up&&hh(t,e))return{__exif:Nd.read(vh(e),ch,i).tags};if(dp&&gh(t,e))return{__iptc:df.read(vh(e),0,i)};if(t&&!hh(t,e)&&!gh(t,e))return{[t]:{value:e,description:n}}}catch{}return{}}));else{const{name:t,value:e,description:n}=p;t&&(r[t]={value:e,description:n})}}return{readTags:r,readTagsPromise:o.length>0?Promise.all(o):void 0}}},eh="STATE_KEYWORD",nh="STATE_COMPRESSION",ih="STATE_LANG",rh="STATE_TRANSLATED_KEYWORD",oh="STATE_TEXT",ah=1,sh=1,ch=6;function lh(t,e,n,i,r){const o=[],a=[];let s,c=eh,l=lp;for(let r=0;r<n&&e+r<t.byteLength;r++){if(c===nh){l=ph({type:i,dataView:t,offset:e+r}),i===Su&&(r+=ah),c=uh(i,c);continue}if(c===oh){s=new DataView(t.buffer.slice(e+r,e+n));break}const p=t.getUint8(e+r);0===p?c=uh(i,c):c===eh?o.push(p):c===ih&&a.push(p)}if(l!==lp&&!r)return{};const p=pp(s,l,function(t){return t===Au||t===Pu?"latin1":"utf-8"}(i));return p instanceof Promise?p.then(t=>dh(t,i,a,o)).catch(()=>dh("<text using unknown compression>".split(""),i,a,o)):dh(p,i,a,o)}function ph({type:t,dataView:e,offset:n}){if(t===Su){if(e.getUint8(n)===sh)return e.getUint8(n+1)}else if(t===Pu)return e.getUint8(n);return lp}function uh(t,e){return e===eh&&[Su,Pu].includes(t)?nh:e===nh?t===Su?ih:oh:e===ih?rh:oh}function dh(t,e,n,i){const r=function(t){return t instanceof DataView?tp(t,0,t.byteLength):t}(t);return{name:fh(e,n,i),value:r,description:e===Su?mh(t):r}}function fh(t,e,n){const i=rp(n);if(t===Au||0===e.length)return i;return`${i} (${rp(e)})`}function mh(t){return uf.decode("UTF-8",t)}function hh(t,e){return"raw profile type exif"===t.toLowerCase()&&"exif"===e.substring(1,5)}function gh(t,e){return"raw profile type iptc"===t.toLowerCase()&&"iptc"===e.substring(1,5)}function vh(t){return function(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}(t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}const xh={read:function(t,e){const n={};for(let i=0;i<e.length;i++){const r=Cd.getLongAt(t,e[i]+xu),o=tp(t,e[i]+yu,vu);o===Cu?(n["Pixels Per Unit X"]=yh(t,e[i],r),n["Pixels Per Unit Y"]=bh(t,e[i],r),n["Pixel Units"]=wh(t,e[i],r)):o===Tu&&(n["Modify Date"]=Ah(t,e[i],r))}return n}};function yh(t,e,n){if(!Sh(t,e,n,0,4))return;const i=Cd.getLongAt(t,e+bu+0);return{value:i,description:""+i}}function bh(t,e,n){if(!Sh(t,e,n,4,4))return;const i=Cd.getLongAt(t,e+bu+4);return{value:i,description:""+i}}function wh(t,e,n){if(!Sh(t,e,n,8,1))return;const i=Cd.getByteAt(t,e+bu+8);return{value:i,description:1===i?"meters":"Unknown"}}function Ah(t,e,n){if(!Sh(t,e,n,0,7))return;const i=Cd.getShortAt(t,e+bu),r=Cd.getByteAt(t,e+bu+2),o=Cd.getByteAt(t,e+bu+3),a=Cd.getByteAt(t,e+bu+4),s=Cd.getByteAt(t,e+bu+5),c=Cd.getByteAt(t,e+bu+6);return{value:[i,r,o,a,s,c],description:`${Ph(i,4)}-${Ph(r,2)}-${Ph(o,2)} ${Ph(a,2)}:${Ph(s,2)}:${Ph(c,2)}`}}function Sh(t,e,n,i,r){return i+r<=n&&e+bu+i+r<=t.byteLength}function Ph(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const Ch={read:function(t,e){const n={},i=Cd.getByteAt(t,e);return n.Alpha=function(t){const e=16&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.Animation=function(t){const e=2&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.ImageWidth=Eh(t,e+Th),n.ImageHeight=Eh(t,e+kh),n}},Th=4,kh=7;function Eh(t,e){const n=Cd.getByteAt(t,e)+256*Cd.getByteAt(t,e+1)+65536*Cd.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const Ih={read:function(t){return{"GIF Version":jh(t),"Image Width":Dh(t),"Image Height":Mh(t),"Global Color Map":Fh(t),"Bits Per Pixel":Rh(t),"Color Resolution Depth":Uh(t)}}};function jh(t){if(6>t.byteLength)return;const e=tp(t,3,3);return{value:e,description:e}}function Dh(t){if(8>t.byteLength)return;const e=t.getUint16(6,!0);return{value:e,description:`${e}px`}}function Mh(t){if(10>t.byteLength)return;const e=t.getUint16(8,!0);return{value:e,description:`${e}px`}}function Fh(t){if(11>t.byteLength)return;const e=(128&t.getUint8(10))>>>7;return{value:e,description:1===e?"Yes":"No"}}function Uh(t){if(11>t.byteLength)return;const e=((112&t.getUint8(10))>>>4)+1;return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}function Rh(t){if(11>t.byteLength)return;const e=1+(7&t.getUint8(10));return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}const Oh=[6,7,99],Lh={get:function(t,e,n){if(function(t){return t&&(void 0===t.Compression||Oh.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}(e)){e.type="image/jpeg";const i=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(i,i+e.JPEGInterchangeFormatLength.value),ap(e,"base64",function(){return sp(this.image)})}return e}};const Nh=2,Bh=3,Vh=4,qh=25.4,zh=10,_h=1,Gh={get:function(t,e){const n={};let i=!1;const r=$h(t,"exif","FocalLength",e),o=$h(t,"exif","FocalPlaneXResolution",e),a=$h(t,"exif","FocalPlaneYResolution",e),s=$h(t,"exif","FocalPlaneResolutionUnit",e),c=$h(t,"file","Image Width",e),l=$h(t,"file","Image Height",e),p=$h(t,"exif","FocalLengthIn35mmFilm",e)||function(t,e,n,i,r,o){if(t&&e&&n&&i&&r&&o)try{let a;switch(n){case Nh:a=qh;break;case Bh:a=zh;break;case Vh:a=_h;break;default:return}const s=t[0]/t[1]*a,c=e[0]/e[1]*a,l=i/s,p=r/c,u=Math.sqrt(l**2+p**2);return o[0]/o[1]*(43.27/u)}catch{}}(o,a,s,c,l,r);p&&(n.FocalLength35efl={value:p,description:ad.FocalLengthIn35mmFilm(p)},i=!0);const u=function(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}(r,p);u&&(n.ScaleFactorTo35mmEquivalent=u,i=!0);const d=function(t){if(t)try{const e=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:e,description:e.toFixed(1)+" deg"}}catch{}}(p);if(d&&(n.FieldOfView=d,i=!0),i)return n}};function $h(t,e,n,i){return i&&t[e]&&t[e][n]?t[e][n].value:!i&&t[n]?t[n].value:void 0}function Hh(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=(new Error).stack}Hh.prototype=new Error;const Wh={MetadataMissingError:Hh};function Xh(t,e={}){return function(t){return"string"==typeof t}(t)?(e.async=!0,function(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?function(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:"bytes=0-"+(e-1)}),fetch(t,n).then(t=>t.arrayBuffer())}(t,e):function(t,{length:e}={}){return new Promise((n,i)=>{const r={};Number.isInteger(e)&&e>=0&&(r.headers={range:"bytes=0-"+(e-1)}),function(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}(t)(t,r,t=>{if(t.statusCode>=200&&t.statusCode<=299){const e=[];t.on("data",t=>e.push(Buffer.from(t))),t.on("error",t=>i(t)),t.on("end",()=>n(Buffer.concat(e)))}else i(`Could not fetch file: ${t.statusCode} ${t.statusMessage}`),t.resume()}).on("error",t=>i(t))})}(t,e):function(t){return/^data:[^;,]*(;base64)?,/.test(t)}(t)?Promise.resolve(function(t){const e=t.substring(t.indexOf(",")+1);if(-1!==t.indexOf(";base64"))return typeof atob<"u"?Uint8Array.from(atob(e),t=>t.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,t=>t.charCodeAt(0)).buffer}(t)):function(t,{length:e}={}){return new Promise((n,i)=>{const r=function(){try{return __non_webpack_require__("fs")}catch{return}}();r.open(t,(o,a)=>{o?i(o):r.stat(t,(o,s)=>{if(o)i(o);else{const o=Math.min(s.size,void 0!==e?e:s.size),c=Buffer.alloc(o),l={buffer:c,length:o};r.read(a,l,e=>{e?i(e):r.close(a,e=>{e&&console.warn(`Could not close file ${t}:`,e),n(c)})})}})})})}(t,e)}(t,e).then(t=>Yh(t,e))):function(t){return typeof File<"u"&&t instanceof File}(t)?(e.async=!0,function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=()=>n(i.error),i.readAsArrayBuffer(t)})}(t).then(t=>Yh(t,e))):Yh(t,e)}function Yh(t,e){return function(t){try{return Buffer.isBuffer(t)}catch{return!1}}(t)&&(t=new Uint8Array(t).buffer),function(t,{expanded:e=!1,async:n=!1,includeUnknown:i=!1,domParser:r}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,a={};const s=[],{fileType:c,fileDataOffset:l,jfifDataOffset:p,tiffHeaderOffset:u,iptcDataOffset:d,xmpChunks:f,iccChunks:m,mpfDataOffset:h,pngHeaderOffset:g,pngTextChunks:v,pngChunkOffsets:x,vp8xChunkOffset:y,gifHeaderOffset:b}=rd.parseAppMarkers(t,n);if(function(t){return void 0!==t}(l)){o=!0;const n=Hd.read(t,l);e?a.file=n:a=op({},a,n)}if(function(t){return void 0!==t}(p)){o=!0;const n=Jd.read(t,p);e?a.jfif=n:a=op({},a,n)}if(function(t){return void 0!==t}(u)){o=!0;const{tags:n,byteOrder:s}=Nd.read(t,u,i);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),e?(a.exif=n,function(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=hp(t.exif.GPSLatitude.value),"S"===t.exif.GPSLatitudeRef.value.join("")&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=hp(t.exif.GPSLongitude.value),"W"===t.exif.GPSLongitudeRef.value.join("")&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],1===t.exif.GPSAltitudeRef.value&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}(a)):a=op({},a,n),n["IPTC-NAA"]&&!Kh(d)){const t=df.read(n["IPTC-NAA"].value,0,i);e?a.iptc=t:a=op({},a,t)}if(n.ApplicationNotes&&!Zh(f)){const t=kf.read(rp(n.ApplicationNotes.value),void 0,r);e?a.xmp=t:(delete t._raw,a=op({},a,t))}if(n.ImageSourceData&&n.PhotoshopSettings){const t=hm.read(n.PhotoshopSettings.value,i);e?a.photoshop=t:a=op({},a,t)}if(n.ICC_Profile&&!Qh(m)){const t=Pm.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?a.icc=t:a=op({},a,t)}if(n.MakerNote)if(function(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&"Canon"===t.Make.value[0]&&t.MakerNote&&t.MakerNote.__offset}(n)){const r=Nm.read(t,u,n.MakerNote.__offset,s,i);e?a.makerNotes=r:a=op({},a,r)}else if(function(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&rp(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}(n)){const r=zm.read(t,u,n.MakerNote.__offset,i);e?a.makerNotes=r:a=op({},a,r)}n.MakerNote&&delete n.MakerNote.__offset}if(Kh(d)){o=!0;const n=df.read(t,d,i);e?a.iptc=n:a=op({},a,n)}if(Zh(f)){o=!0;const n=kf.read(t,f,r);e?a.xmp=n:(delete n._raw,a=op({},a,n))}if(Qh(m)){o=!0;const e=Pm.read(t,m,n);e instanceof Promise?s.push(e.then(S)):S(e)}if(function(t){return void 0!==t}(h)){o=!0;const n=Bd.read(t,h,i);e?a.mpf=n:a=op({},a,n)}if(function(t){return void 0!==t}(g)){o=!0;const n=Hm.read(t,g);e?(a.png=a.png?op({},a.png,n):n,a.pngFile=n):a=op({},a,n)}if(function(t){return void 0!==t}(v)){o=!0;const{readTags:e,readTagsPromise:r}=th.read(t,v,n,i);P(e),r&&s.push(r.then(t=>t.forEach(P)))}if(function(t){return void 0!==t}(x)){o=!0;const n=xh.read(t,x);e?a.png=a.png?op({},a.png,n):n:a=op({},a,n)}if(function(t){return void 0!==t}(y)){o=!0;const n=Ch.read(t,y);e?a.riff=a.riff?op({},a.riff,n):n:a=op({},a,n)}if(function(t){return void 0!==t}(b)){o=!0;const n=Ih.read(t,b);e?a.gif=a.gif?op({},a.gif,n):n:a=op({},a,n)}const w=Gh.get(a,e);w&&(e?a.composite=w:a=op({},a,w));const A=Lh.get(t,a.Thumbnail,u);if(A?(o=!0,a.Thumbnail=A):delete a.Thumbnail,c&&(e?(a.file||(a.file={}),a.file.FileType=c):a.FileType=c,o=!0),!o)throw new Wh.MetadataMissingError;return n?Promise.all(s).then(()=>a):a;function S(t){e?a.icc=t:a=op({},a,t)}function P(t){if(e){for(const e of["exif","iptc"]){const n=`__${e}`;t[n]&&(a[e]=a[e]?op({},a.exif,t[n]):t[n],delete t[n])}a.png=a.png?op({},a.png,t):t,a.pngText=a.pngText?op({},a.png,t):t}else a=op({},a,t.__exif?t.__exif:{},t.__iptc?t.__iptc:{},t),delete a.__exif,delete a.__iptc}}(function(t){try{return new DataView(t)}catch{return new Ql(t)}}(t),e)}function Kh(t){return void 0!==t}function Zh(t){return Array.isArray(t)&&t.length>0}function Qh(t){return Array.isArray(t)&&t.length>0}const Jh=["jpg","jpeg","png","webp","heic","tiff","bmp"],tg=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","3gp","m4v","mpg","mpeg"],eg=t=>{const n=t.name.split(".").pop()?.toLowerCase();return n&&Jh.includes(n)?e.IMAGE:n&&tg.includes(n)?e.VIDEO:"unknown"},ng=({enableCaption:o,ada:a,content:s,removeImage:c,caption:l,disabled:p,onCaptionChange:u,playingVideo:d,onPlay:f,onPause:m,onEnd:h,uploadStatus:g={status:"",progress:0}})=>{const v=k(()=>s.type===e.IMAGE?t.jsx("img",{alt:"Image not found",className:"qc:size-full qc:rounded-t qc:object-contain",src:s.compressedFile?URL.createObjectURL(s.compressedFile):""}):t.jsx(W,{fit:"contain",showFullscreen:!1,src:URL.createObjectURL(s.originalFile),playing:d,onPlay:f,onPause:m,onEnd:h}),[s.type,s.status,d]);return t.jsxs("div",{className:"qc:relative",children:[t.jsxs("div",{className:n("qc:border-border qc:relative qc:h-44 qc:max-h-screen qc:overflow-hidden qc:rounded qc:border qc:sm:h-80",!o&&"qc:rounded-b"),children:[(s.status===i.WAITING||s.status===i.PROCESSING)&&t.jsx("div",{className:"qc:absolute qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-2",children:t.jsx("span",{className:"qc:text-sm qc:text-gray-500",children:"Processing"})}),s.status===i.DONE&&v,(g.status===r.WAITING||g.status===r.UPLOADING)&&t.jsxs("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center",children:[t.jsx("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:z-0 qc:h-full qc:bg-opacity-75",style:{width:`${g.progress}%`}}),t.jsx("h3",{className:"qc:text-foreground qc:z-10 qc:text-center qc:font-medium",children:g.status===r.WAITING?"Waiting...":100===Math.round(g.progress)?"Finalizing...":`Uploading (${Math.round(g.progress)}%)`})]}),(g.status===r.DONE||g.status===r.ERROR)&&t.jsx("div",{className:"qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:bg-opacity-75",children:g.status===r.DONE?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-success qc:size-12",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-destructive qc:size-12",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})})]}),t.jsx("button",{disabled:p,className:"qc:text-primary qc:bg-destructive qc:absolute qc:right-4 qc:top-4 qc:cursor-pointer qc:rounded-full qc:p-1 qc:transition-all qc:hover:bg-opacity-100 qc:sm:bg-opacity-50 qc:sm:p-2",onClick:()=>c(s.uid),children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-5 qc:text-white",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),(o||a)&&t.jsx("div",{className:"qc:mt-3 qc:w-full qc:space-y-3",children:t.jsx("textarea",{rows:2,value:l,className:n("qc:border-primary qc:shadow-outer qc:placeholder:text-primary qc:block qc:w-full qc:rounded qc:border qc:px-3 qc:py-2.5 qc:font-bold qc:placeholder:opacity-50 qc:focus:border-primary-light qc:focus:outline-none qc:focus:ring-primary-light",p?"qc:text-muted qc:bg-transparent":"qc:text-foreground qc:bg-white qc:bg-opacity-75"),disabled:p,onChange:t=>u(t.target.value),placeholder:"Caption"})})]},s.uid)},ig=100,rg=52428800,og=new nt({concurrency:1,autostart:!0}),ag=new nt({concurrency:3,autostart:!0}),sg={hidden:{opacity:0,scale:.8},visible:t=>({opacity:1,scale:1,transition:{delay:.1*t,duration:.3}}),exit:{opacity:0,scale:.8,transition:{duration:.3}}},cg=()=>{const{eventSlug:A}=o(),S=a(),{props:{organizationId:P,loginUrl:C},loadingUser:I,user:D,organization:M}=s(),{event:F}=c({eventSlug:A}),{increment:U}=$(F),[R,O]=B(!1),[L,N]=B([]),[V,q]=B({}),[z,_]=B(null),[G,W]=B(null),[X,Y]=B({}),[K,Z]=B(0),[Q,tt]=B(0),[et,nt]=B({}),it=E(0);j(()=>{D&&rt()},[D]);const rt=async()=>{O(!0);try{const t=await l.get(p.GET_UPLOAD_COUNT,{searchParams:{eventSlug:A},headers:{"x-org-id":P,Authorization:D?`Bearer ${D.token}`:void 0}}).json();if(t.error)throw new Error(t.error);Y(t.data.uploadCount)}catch(t){console.error(t),_("Failed to fetch upload count")}O(!1)},ot=async t=>{if(t.type===e.IMAGE){N(e=>e.map(e=>e.uid===t.uid?{...e,status:i.PROCESSING}:e));const e=await(async(t,e)=>{const n=Date.now();let i=t.originalFile,r={};try{r=await Xh(i,{expanded:!1,includeUnknown:!0}),delete r.Images,delete r.Thumbnail}catch(t){console.error(t)}try{const e=t.originalFile?.name?.split(".").pop();if(["heic","heif"].includes(e?.toLowerCase())&&typeof window<"u"){const e=(await import("./ybrHsuRh.js").then(t=>t.h)).default;i=await e({blob:t.originalFile,toType:"image/jpeg"})}}catch(t){console.error(t)}let o=i;try{i.size/1024/1024>1&&(o=await Zl(i,{maxSizeMB:2,maxWidthOrHeight:2400,useWebWorker:!0,preserveExif:!0,maxIteration:3,onProgress:e}))}catch(t){console.error(t)}return{exif:r,compressedFile:o,colors:{},clientProcessingTime:Date.now()-n}})(t);N(n=>n.map(n=>n.uid===t.uid?{...n,...e,status:i.DONE}:n))}else if(t.type===e.VIDEO){N(e=>e.map(e=>e.uid===t.uid?{...e,status:i.PROCESSING}:e));const e=await(async t=>new Promise(e=>{const n=t.originalFile;if(n){const t=document?.createElement("video");t.onloadedmetadata=()=>{e(t.duration)};const i=URL.createObjectURL(n);t.src=i}else e(0)}))(t);N(n=>n.map(n=>n.uid===t.uid?{...n,length:e,status:i.DONE}:n))}},at=t=>{const e=L.filter(e=>e.uid!==t);N(e)},st=t=>{const e=F?.uploadLimit-X[u.APPROVED]-X[u.IN_REVIEW]-X[u.REJECTED],n=[];Array.from(t).forEach(t=>{if(!L.some(e=>e.originalFile.name===t.name)){const e={uid:J(),originalFile:t,type:eg(t),status:i.WAITING};n.push(e)}}),!(L.length+n.length>ig)&&(n.slice(0,Math.min(e-L.length,ig-L.length)).forEach(t=>og.push(()=>ot(t))),N([...L,...n]))},ct=F?F?.uploadLimit-(X?X[u.APPROVED]+X[u.IN_REVIEW]+X[u.REJECTED]:0):0,lt=k(()=>Object.values(et).some(t=>[r.WAITING,r.UPLOADING].includes(t.status)),[et]);let pt=!0;for(let t=0;t<L.length;t++)if(L[t].status!==i.DONE){pt=!1;break}const ut=R||!F||!D||F?.status!==d.OPEN||L.length>=Math.min(ct,ig)||lt,dt=F?F?.enableVideo?[...Jh,...tg]:Jh:[];if(I)return t.jsx(f,{className:"qc:mx-auto qc:mt-8 qc:h-6 qc:w-64"});if(!D){if(!M.customAuth)return t.jsx(h,{to:g.LOGIN,state:{referrer:S.pathname}});if(!C)return t.jsx(m,{title:"Please login to upload content"});window.history.pushState({},"",C)}return t.jsxs("div",{className:"qc:relative qc:min-h-[80vh] qc:w-full qc:space-y-8 qc:bg-background",children:[t.jsx("div",{className:"qc:flex qc:flex-row qc:justify-end",children:t.jsx(H,{event:F})}),t.jsx(v,{variant:"h3",align:"center",immutable:!0,children:F?.name}),R&&t.jsxs("div",{className:"qc:w-full qc:space-y-8 qc:pb-8",children:[t.jsx(f,{className:"qc:mx-auto qc:h-7 qc:w-64"}),t.jsx(f,{className:"qc:mx-auto qc:h-56 qc:w-full qc:max-w-xl"})]}),!R&&D&&F?F?.status!==d.OPEN?t.jsxs("div",{className:"qc:mt-16 qc:flex qc:flex-col qc:items-center qc:gap-8",children:[t.jsx(m,{title:"Event not open",description:"Please find some open event to upload content",iconSvg:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-full",viewBox:"0 0 885.86993 622.8043",xmlnsXlink:"http://www.w3.org/1999/xlink",role:"img",children:[t.jsx("title",{children:"through_the_park"}),t.jsx("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),t.jsx("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"342.46486",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"337.53055",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"332.59625",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("path",{d:"M775.57723,513.38047h-1.97372c0-93.59519-76.14539-169.7401-169.7401-169.7401-93.59518,0-169.74009,76.14491-169.74009,169.7401H432.1496c0-94.68325,77.03057-171.71382,171.71381-171.71382C698.54714,341.66665,775.57723,418.69722,775.57723,513.38047Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"161.35177",cy:"161.35177",r:"161.35177",fill:"currentColor"}),t.jsx("path",{d:"M438.4403,192.17931a161.36436,161.36436,0,0,1-268.85975,170.77,161.36567,161.36567,0,1,0,268.85975-170.77Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"161.795 161.352 162.238 161.352 170.217 618.811 153.373 618.811 161.795 161.352",fill:"#3f3d56"}),t.jsx("rect",{x:"329.05538",y:"537.54454",width:"7.97893",height:"30.14264",transform:"translate(509.8146 -138.12101) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"755.27647",cy:"229.8063",r:"130.59346",fill:"currentColor"}),t.jsx("path",{d:"M1009.48506,281.178a130.60365,130.60365,0,0,1-217.60732,138.2163A130.60471,130.60471,0,1,0,1009.48506,281.178Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"755.635 229.806 755.994 229.806 762.452 600.06 748.819 600.06 755.635 229.806",fill:"#3f3d56"}),t.jsx("rect",{x:"920.95206",y:"560.70661",width:"6.45792",height:"24.39658",transform:"translate(843.51724 -650.35577) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"369.90725",cy:"321.70366",r:"20.55846",fill:"currentColor"}),t.jsx("path",{d:"M542.265,446.57008a20.56006,20.56006,0,0,1-34.25647,21.75847A20.56023,20.56023,0,1,0,542.265,446.57008Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"369.964 321.704 370.02 321.704 371.037 379.99 368.891 379.99 369.964 321.704",fill:"#3f3d56"}),t.jsx("rect",{x:"528.32779",y:"490.57441",width:"1.01663",height:"3.84059",transform:"translate(561.19589 -343.48173) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"559.878",cy:"255.44299",r:"52.63144",fill:"currentColor"}),t.jsx("path",{d:"M756.09357,358.88718A52.63554,52.63554,0,0,1,668.394,414.59075a52.636,52.636,0,1,0,87.69954-55.70357Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"560.023 255.443 560.167 255.443 562.77 404.662 557.275 404.662 560.023 255.443",fill:"#3f3d56"}),t.jsx("rect",{x:"720.41323",y:"471.54209",width:"2.60265",height:"9.83225",transform:"translate(650.03004 -522.71764) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("path",{d:"M354.5881,734.63564s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"193.57562",cy:"575.45671",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"192.43789",y:"587.23109",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M403.93115,702.06922s.68149-14.27971,14.652-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"242.91867",cy:"542.89029",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"241.78094",y:"554.66468",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M552.67,591.58462s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"392.46975",cy:"436.6403",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"391.56611",y:"445.99208",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M769.77945,556.05762s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"609.57917",cy:"401.1133",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"608.67553",y:"410.46508",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M562.53864,621.19045s.54127-11.34163,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"402.33836",cy:"466.24613",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"401.43472",y:"475.59791",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M538.854,642.90139s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"378.6537",cy:"487.95707",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"377.75006",y:"497.30885",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M803.33272,574.808s.54128-11.34162,11.63736-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"643.13244",cy:"419.86366",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"642.22881",y:"429.21544",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M483.58976,599.47951s.54127-11.34163,11.63735-10.02332",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"323.38948",cy:"444.53519",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"322.48584",y:"453.88696",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M740.17362,543.22843s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"579.97334",cy:"388.28411",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"579.0697",y:"397.63589",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M268.73119,737.59622s.68149-14.27971,14.652-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"107.71872",cy:"578.41729",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"106.58099",y:"590.19168",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M948.67842,733.64878s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"787.66594",cy:"574.46985",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"786.52822",y:"586.24423",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M891.44048,700.0955s.68149-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"730.42801",cy:"540.91657",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"729.29028",y:"552.69096",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M883.54559,750.42541s.6815-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"722.53312",cy:"591.24648",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"721.39539",y:"603.02087",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M280.09142,761.08258S590.95263,679.17311,587.992,595.28993c-5.42774-23.19124-42.92846-29.1124-42.92846-29.1124s-88.81749-11.84233-40.4613-40.4613,180.59557-21.71094,180.59557-21.71094-136.18682,21.71094-75.9883,33.55327c48.35619,2.96058,110.52843,15.78978,110.52843,15.78978S846.0562,579.99358,863.8197,645.12641s2.96058,115.46273,2.96058,115.46273Z",transform:"translate(-157.06503 -138.59785)",fill:"#e6e6e6"}),t.jsx("path",{d:"M618.67289,761.40215l-1.16407-1.627q2.4668-1.76367,4.85938-3.50781l1.17773,1.61719Q621.14359,759.63213,618.67289,761.40215Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M633.18265,750.72832l-1.207-1.59375c3.23144-2.44727,6.41406-4.90918,9.46-7.31738l1.24023,1.56836C639.61917,745.80254,636.42484,748.27324,633.18265,750.72832Zm18.82324-14.89941-1.27734-1.53907c3.12793-2.59863,6.18652-5.21,9.09082-7.76074l1.32031,1.502C658.22171,730.59453,655.14847,733.21855,652.00589,735.82891Zm18.03223-15.86914-1.36914-1.459c2.98535-2.7998,5.86328-5.60254,8.55469-8.332l1.42382,1.4043C675.93851,714.32012,673.04105,717.14238,670.03812,719.95977Zm16.8584-17.14063-1.48828-1.33594c2.74218-3.05468,5.33593-6.11426,7.709-9.09277l1.56445,1.24609C692.28421,696.64531,689.66507,699.73516,686.89652,702.81914ZM701.84964,683.952,700.1973,682.825c2.32519-3.40723,4.42285-6.80859,6.23437-10.10938l1.75391.9629C706.34281,677.035,704.211,680.492,701.84964,683.952Zm11.5-21.21386-1.86133-.73047a69.37031,69.37031,0,0,0,3.39551-11.29l1.959.40234A71.21576,71.21576,0,0,1,713.34964,662.73809Zm2.66992-23.69629a47.10965,47.10965,0,0,0-1.60839-11.50684l1.93164-.52148a49.17317,49.17317,0,0,1,1.67675,11.99511Zm-5.98339-22.30274a60.32109,60.32109,0,0,0-6.65625-9.66406l1.5332-1.2832a62.27891,62.27891,0,0,1,6.87695,9.98632Zm-14.91993-18.10449a108.36226,108.36226,0,0,0-9.32617-7.34766l1.1543-1.63281a110.07889,110.07889,0,0,1,9.498,7.48438Zm-19.34863-13.78418c-3.27148-1.92285-6.80078-3.8418-10.4873-5.70312l.90039-1.78516c3.72558,1.87988,7.292,3.81933,10.60058,5.76367Zm-21.29687-10.81445c-3.48145-1.54688-7.18946-3.10352-11.02149-4.62793l.74024-1.85742c3.85547,1.5332,7.58789,3.10058,11.09375,4.65722ZM632.23539,565.157c-3.56348-1.292-7.37305-2.61816-11.32129-3.94141l.63476-1.89648c3.96387,1.3291,7.78906,2.66016,11.36817,3.957Zm-22.73145-7.64648c-3.48535-1.09961-7.2373-2.25684-11.47119-3.53907l.58008-1.91406c4.24072,1.28418,8.00048,2.44434,11.49267,3.54492Zm-22.979-6.99317c-4.0459-1.21-7.90332-2.36621-11.51465-3.47851l.58886-1.91211c3.60645,1.1123,7.458,2.2666,11.499,3.47461Zm-22.98389-7.1875a95.0565,95.0565,0,0,1-11.26416-4.53418l.89941-1.78711a92.76387,92.76387,0,0,0,11.019,4.43067Zm-15.103-13.11035-1.42578-1.40234c1.82324-1.85254,5.42969-3.665,11.02539-5.542l.63574,1.89649C553.45658,526.9207,550.01273,528.61992,548.438,530.21953Zm21.67676-8.30566-.4834-1.94141c3.459-.86133,7.39942-1.76269,11.71192-2.67871l.415,1.957C577.46878,520.16094,573.5513,521.05742,570.11478,521.91387Zm23.36963-5.01856-.375-1.96484c3.68506-.7041,7.65381-1.4336,11.79687-2.168l.34961,1.96875C601.12113,515.46465,597.16117,516.19219,593.48441,516.89531ZM617.05374,512.7l-.33007-1.97266q5.65283-.94775,11.83105-1.93847l.31641,1.97461Q622.69827,511.75371,617.05374,512.7Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M640.9307,508.865l-.30664-1.97656q2.9165-.45119,5.93554-.91114l.30079,1.97657Q643.84281,508.41387,640.9307,508.865Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M685.194,305.71659l9.08474-7.26606c-7.05753-.77863-9.95734,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75483,13.75483,0,0,0,685.194,305.71659Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M516.44078,361.96766l9.08474-7.26605c-7.05753-.77864-9.95734,3.07039-11.14411,6.11692-5.51363-2.28946-11.51587.711-11.51587.711l18.17688,6.59885A13.75487,13.75487,0,0,0,516.44078,361.96766Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M560.84953,245.51807l9.08473-7.26606c-7.05753-.77863-9.95733,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75484,13.75484,0,0,0,560.84953,245.51807Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M659.609,569.03965s-7.86875,0-8.74306,4.80868-2.18577,57.267-1.31146,63.82431.87431,5.24584.87431,5.24584-1.743,12.4609,2.18858,13.00631S656.5489,641.607,656.5489,641.607l3.06008-53.33264Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M693.7069,569.03965s7.86875,0,8.74306,4.80868,2.18577,57.267,1.31146,63.82431-.8743,5.24584-.8743,5.24584,1.743,12.4609-2.18859,13.00631S696.767,641.607,696.767,641.607l-3.06008-53.33263Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M658.29752,751.76952h-3.49721a7.86866,7.86866,0,0,0-7.86875,7.86857v.00018H668.352V749.58375H658.29752Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("path",{d:"M691.95829,751.76952h3.49721a7.86867,7.86867,0,0,1,7.86875,7.86857v.00018H681.90377V749.58375h10.05452Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"516.09568",cy:"409.02131",r:"11.36598",fill:"#9e616a"}),t.jsx("path",{d:"M670.53781,553.73931s-1.31146,14.426-3.06008,15.73749,18.36042-.8743,18.36042-.8743-6.99444-10.49167-5.683-13.98889S670.53781,553.73931,670.53781,553.73931Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M696.32981,569.03965s-24.04341-10.05451-39.78091,0c0,0-3.93436,10.05451-.87431,15.7375s7.86875,19.23472,3.06008,28.41493.43716,5.24584.43716,5.24584-6.12014,24.48056-6.99445,43.71525,2.62293,88.30487,5.24583,88.742,10.92883,1.31146,11.80314,0,6.99444-92.67636,6.99444-92.67636,2.62292,93.55069,5.24582,93.55069,9.61737,0,10.92883-2.18577,12.24027-86.55625,8.30591-104.04235-6.55729-26.22917-6.55729-26.22917,4.80867-3.06007,3.49723-4.80869-7.86877-20.54616-4.80869-23.60625S696.32981,569.03965,696.32981,569.03965Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"523.30871",cy:"402.17104",r:"18.36042",fill:"#2f2e41"}),t.jsx("path",{d:"M691.83867,531.57749a12.36814,12.36814,0,0,1-9.33162-14.29294c-.05359.188-.104.37762-.14921.57a12.36847,12.36847,0,0,0,24.0811,5.65832c.0452-.19233.08448-.38459.12022-.57676A12.36815,12.36815,0,0,1,691.83867,531.57749Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"535.52108",cy:"386.38703",r:"8.98489",fill:"#2f2e41"})]})}),t.jsx(x,{to:g.PUBLIC_EVENTS,state:{internalNavigation:!0},children:t.jsx(y,{children:"All events"})})]}):t.jsxs(T,{children:[t.jsxs(v,{variant:"h5",align:"center",children:["Available entries : ",t.jsx("span",{className:"qc:text-primary",children:ct})]}),L.length<=0&&t.jsx("div",{className:"qc:flex qc:w-full qc:flex-auto qc:justify-center qc:mt-6",children:t.jsx(Jt,{accept:(()=>{const t={},e=dt.filter(t=>Jh.includes(t)),n=dt.filter(t=>tg.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:ut,onDrop:st,children:({getRootProps:e,getInputProps:i,isDragActive:r})=>t.jsxs("div",{...e(),className:n("qc:bg-background qc:w-auto qc:max-w-2xl qc:rounded qc:border-2 qc:border-dashed qc:px-4 qc:py-12 qc:text-center",L.length>=ct?"qc:border-border":"",ut?"qc:border-border qc:hover:cursor-not-allowed":"qc:border-primary qc:hover:cursor-pointer"),children:[t.jsx("input",{...i()}),t.jsxs("svg",{className:n(ut?"qc:text-gray-500":"qc:text-primary","qc:mx-auto qc:size-12"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("rect",{x:"0",y:"0",width:"24",height:"24",fill:"none",stroke:"none"}),t.jsx("path",{fill:"currentColor",d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5l5 5h-3z"})]}),t.jsx("span",{className:n(ut?"qc:text-muted":"qc:text-foreground","qc:mt-2 qc:block qc:font-medium"),children:r?"Drop files here...":`Select Images ${F?.enableVideo?"or Videos (60s)":""} to upload (${L.length}/${Math.min(ct,ig)})`}),!lt&&t.jsx("div",{className:"qc:text-muted-foreground qc:mt-6 qc:w-full qc:text-center qc:text-xs qc:italic",children:"* Only your new, original photos will be eligible for upload. Our team will review them before publication."})]})})}),t.jsx("div",{className:"qc:grid qc:grid-cols-2 qc:gap-6 qc:sm:pt-3 qc:lg:grid-cols-3 qc:xl:grid-cols-4",children:t.jsxs(xo,{children:[L.map((e,n)=>t.jsx(gl.div,{layout:!0,variants:sg,initial:"hidden",animate:"visible",exit:"exit",custom:n,className:"qc:relative",children:t.jsx(ng,{enableCaption:F?.enableCaption,enableAICaption:F?.enableAICaption,ada:F?.ada,content:e,disabled:lt,removeImage:at,caption:V[e.uid],onCaptionChange:t=>{q(n=>({...n,[e.uid]:t}))},playingVideo:G===e.uid,onPlay:()=>W(e.uid),onPause:()=>W(null),onEnd:()=>W(null),uploadStatus:et[e.uid]})},e.uid)),L.length>0&&ct>0&&t.jsx(Jt,{accept:(()=>{const t={},e=dt.filter(t=>Jh.includes(t)),n=dt.filter(t=>tg.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:ut,onDrop:st,children:({getRootProps:e,getInputProps:i,isDragActive:r})=>t.jsxs("div",{...e(),children:[t.jsx("input",{...i()}),t.jsxs(gl.button,{type:"button",layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3},className:n("qc:border-primary qc:bg-background qc:hover:border-primary qc:text-foreground qc:hover:text-primary qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-3 qc:rounded qc:border-2 qc:border-dashed qc:p-12 qc:hover:border-2 qc:focus:outline-none qc:sm:min-h-72",r?"qc:bg-primary qc:bg-opacity-15":"qc:bg-background qc:bg-opacity-100"),children:[t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-14",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h6.5q.212 0 .356.144t.144.357t-.144.356t-.356.143h-6.5q-.27 0-.443.173T5 5.616v12.769q0 .269.173.442t.443.173h12.769q.269 0 .442-.173t.173-.443v-6.5q0-.212.144-.356t.357-.144t.356.144t.143.356v6.5q0 .691-.462 1.153T18.384 20zm1.153-3.616h10.462L14 12.077l-3 3.789l-2-2.404zM17 7h-1.5q-.213 0-.356-.144T15 6.499t.144-.356T15.5 6H17V4.5q0-.213.144-.356T17.501 4t.356.144T18 4.5V6h1.5q.213 0 .356.144t.144.357t-.144.356T19.5 7H18v1.5q0 .213-.144.356T17.499 9t-.356-.144T17 8.5z"})}),t.jsx(v,{variant:"h5",children:r?"Drop files here...":"Add Image"})]})]})})]})}),L.length>0&&t.jsx(y,{fullWidth:!0,loading:lt,onClick:async(t=!0)=>{_(null);let e=!0;if(F?.ada)for(let t=0;t<L.length;t++)if(!V[L[t].uid]){e=!1;break}if(!e)return void _("Caption are needed for each image");Z(L.length),tt(0),it.current=L.length;const n=`upload-group-${J()}`;L.forEach(t=>{ag.push(()=>(async({uid:t,groupId:e,groupContentCount:n,eventId:i,content:o,contentData:a})=>{nt(e=>({...e,[t]:{status:r.UPLOADING,progress:0}}));const s=Math.ceil(o.size/rg);for(let c=0;c<s;c++){const u=c*rg,d=Math.min(o.size,u+rg),f=o.slice(u,d);try{const r=new FormData;r.append("groupId",e),r.append("groupContentCount",n),r.append("eventId",i),r.append("contentData",JSON.stringify(a)),r.append("integrationUpload",!0),r.append("uid",t),r.append("chunk",f),r.append("chunkIndex",c),r.append("totalChunks",s),await l.post(p.SINGLE_UPLOAD,{body:r,headers:{"x-org-id":P,Authorization:D?`Bearer ${D.token}`:void 0}})}catch(e){console.error(e),nt(e=>({...e,[t]:{status:r.FAILED,progress:0}}));break}}Y(t=>({...t,[F?.autoApprove?u.APPROVED:u.IN_REVIEW]:t[F?.autoApprove?u.APPROVED:u.IN_REVIEW]+1})),nt(e=>({...e,[t]:{status:r.DONE,progress:100}})),it.current-=1,N(e=>e.filter(e=>e.uid!==t)),F?.autoApprove||U(),0===it.current&&(q({}),N([]),Z(0),tt(0),nt({}),b.success(F?.visibility===w.PRIVATE&&F?.autoApprove?"Content uploaded":"Upload successful, waiting for approval"))})({uid:t.uid,groupId:n,groupContentCount:L.length,eventId:F?._id,content:t.compressedFile?t.compressedFile:t.originalFile,contentData:{type:t.type,caption:V[t.uid],colors:t.colors,sizes:{original:t.originalFile.size,clientCompressed:t.compressedFile?.size},processingTimes:{client:t.clientProcessingTime},location:{latitude:t.exif?.GPSLatitude?.description,longitude:t.exif?.GPSLongitude?.description},exif:t.exif,capturedAt:t.exif?.DateTimeOriginal?.description}}))});const i={};L.forEach(t=>{i[t.uid]={status:r.WAITING,progress:0}}),nt(i)},icon:"material-symbols:upload-rounded",disabled:!F||lt||!pt,children:lt?`Uploading (${Q}/${K})`:"Upload"})]}):null,L.length<=0&&t.jsx(x,{to:g.GALLERY(A),state:{internalNavigation:!0},children:t.jsx(v,{variant:"h5",align:"center",children:"Goto gallery"})})]})};export{cg as default};
1
+ import{j as t,w as e,c as n,V as i,W as r,b as o,d as a,u as s,H as c,k as l,i as p,X as u,E as d,S as f,h as m,N as h,P as g,T as v,g as x,J as y,Y as b,Z as w}from"./BaA7RHRf.js";import*as A from"react";import S,{forwardRef as P,useImperativeHandle as C,Fragment as T,useMemo as k,useRef as E,useReducer as I,useEffect as j,useCallback as D,createContext as M,useLayoutEffect as F,useId as U,useContext as R,useInsertionEffect as O,Children as L,isValidElement as N,useState as B,createElement as V,Component as q}from"react";import{g as z}from"./BW2mijRq.js";import{r as _}from"./G275Ly1Q.js";import{_ as G}from"./D6nr9_KD.js";import{d as $,E as H}from"./6xRxF6pz.js";import{V as W}from"./DjmC7CGh.js";const X=[];for(let t=0;t<256;++t)X.push((t+256).toString(16).slice(1));let Y;const K=new Uint8Array(16);const Z={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Q(t,e,n){const i=(t=t||{}).random??t.rng?.()??function(){if(!Y){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Y=crypto.getRandomValues.bind(crypto)}return Y(K)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(X[t[e+0]]+X[t[e+1]]+X[t[e+2]]+X[t[e+3]]+"-"+X[t[e+4]]+X[t[e+5]]+"-"+X[t[e+6]]+X[t[e+7]]+"-"+X[t[e+8]]+X[t[e+9]]+"-"+X[t[e+10]]+X[t[e+11]]+X[t[e+12]]+X[t[e+13]]+X[t[e+14]]+X[t[e+15]]).toLowerCase()}(i)}function J(t,e,n){return Z.randomUUID&&!t?Z.randomUUID():Q(t)}const tt=Object.prototype.hasOwnProperty;class et extends Event{constructor(t,e){super(t),this.detail=e}}class nt extends EventTarget{constructor(t={}){super();const{concurrency:e=1/0,timeout:n=0,autostart:i=!1,results:r=null}=t;this.concurrency=e,this.timeout=n,this.autostart=i,this.results=r,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers=[],this.addEventListener("error",this._errorHandler)}_errorHandler(t){this.end(t.detail.error)}pop(){return this.jobs.pop()}shift(){return this.jobs.shift()}indexOf(t,e){return this.jobs.indexOf(t,e)}lastIndexOf(t,e){return void 0!==e?this.jobs.lastIndexOf(t,e):this.jobs.lastIndexOf(t)}slice(t,e){return this.jobs=this.jobs.slice(t,e),this}reverse(){return this.jobs.reverse(),this}push(...t){const e=this.jobs.push(...t);return this.autostart&&this._start(),e}unshift(...t){const e=this.jobs.unshift(...t);return this.autostart&&this._start(),e}splice(t,e,...n){return this.jobs.splice(t,e,...n),this.autostart&&this._start(),this}get length(){return this.pending+this.jobs.length}start(t){if(this.running)throw new Error("already started");let e;return t?this._addCallbackToEndEvent(t):e=this._createPromiseToEndEvent(),this._start(),e}_start(){if(this.running=!0,this.pending>=this.concurrency)return;if(0===this.jobs.length)return void(0===this.pending&&this.done());const t=this.jobs.shift(),e=this.session,n=void 0!==t&&tt.call(t,"timeout")?t.timeout:this.timeout;let i=!0,r=null,o=!1,a=null;const s=(n,...s)=>{i&&this.session===e&&(i=!1,this.pending--,null!==r&&(this.timers=this.timers.filter(t=>t!==r),clearTimeout(r)),n?this.dispatchEvent(new et("error",{error:n,job:t})):o||(null!==a&&null!==this.results&&(this.results[a]=[...s]),this.dispatchEvent(new et("success",{result:[...s],job:t}))),this.session===e&&(0===this.pending&&0===this.jobs.length?this.done():this.running&&this._start()))};n&&(r=setTimeout(()=>{o=!0,this.dispatchEvent(new et("timeout",{next:s,job:t})),s()},n),this.timers.push(r)),null!=this.results&&(a=this.results.length,this.results[a]=null),this.pending++,this.dispatchEvent(new et("start",{job:t})),t.promise=t(s),void 0!==t.promise&&"function"==typeof t.promise.then&&t.promise.then(function(t){return s(void 0,t)}).catch(function(t){return s(t||!0)}),this.running&&this.jobs.length>0&&this._start()}stop(){this.running=!1}end(t){this.clearTimers(),this.jobs.length=0,this.pending=0,this.done(t)}clearTimers(){this.timers.forEach(t=>{clearTimeout(t)}),this.timers=[]}_addCallbackToEndEvent(t){const e=n=>{this.removeEventListener("end",e),t(n.detail.error,this.results)};this.addEventListener("end",e)}_createPromiseToEndEvent(){return new Promise((t,e)=>{this._addCallbackToEndEvent((n,i)=>{n?e(n):t(i)})})}done(t){this.session++,this.running=!1,this.dispatchEvent(new et("end",{error:t}))}}const it=z(_()),rt=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 ot(t,e,n){const i=function(t){const{name:e}=t;if(e&&-1!==e.lastIndexOf(".")&&!t.type){const n=e.split(".").pop().toLowerCase(),i=rt.get(n);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}(t),{webkitRelativePath:r}=t,o="string"==typeof e?e:"string"==typeof r&&r.length>0?r:`./${t.name}`;return"string"!=typeof i.path&&at(i,"path",o),at(i,"relativePath",o),i}function at(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const st=[".DS_Store","Thumbs.db"];function ct(t){return"object"==typeof t&&null!==t}function lt(t){return t.filter(t=>-1===st.indexOf(t.name))}function pt(t){if(null===t)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function ut(t){if("function"!=typeof t.webkitGetAsEntry)return ft(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?ht(e):ft(t,e)}function dt(t){return t.reduce((t,e)=>[...t,...Array.isArray(e)?dt(e):[e]],[])}function ft(t,e){return G(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&"function"==typeof t.getAsFileSystemHandle){const e=yield t.getAsFileSystemHandle();if(null===e)throw new Error(`${t} is not a File`);if(void 0!==e){const t=yield e.getFile();return t.handle=e,ot(t)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return ot(i,null!==(n=e?.fullPath)&&void 0!==n?n:void 0)})}function mt(t){return G(this,void 0,void 0,function*(){return t.isDirectory?ht(t):function(t){return G(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(n=>{const i=ot(n,t.fullPath);e(i)},t=>{n(t)})})})}(t)})}function ht(t){const e=t.createReader();return new Promise((t,n)=>{const i=[];!function r(){e.readEntries(e=>G(this,void 0,void 0,function*(){if(e.length){const t=Promise.all(e.map(mt));i.push(t),r()}else try{const e=yield Promise.all(i);t(e)}catch(t){n(t)}}),t=>{n(t)})}()})}var gt,vt={};var xt=(gt||(gt=1,vt.__esModule=!0,vt.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(0===n.length)return!0;var i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(t){var e=t.trim().toLowerCase();return"."===e.charAt(0)?i.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}return!0}),vt);const yt=z(xt);function bt(t){return function(t){if(Array.isArray(t))return Tt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ct(t)||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 wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function At(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach(function(e){St(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function St(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||Ct(t,e)||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 Ct(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(t,e)}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var kt="function"==typeof yt?yt:yt.default,Et=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),e=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:"file-invalid-type",message:"File type must be ".concat(e)}},It=function(t){return{code:"file-too-large",message:"File is larger than ".concat(t," ").concat(1===t?"byte":"bytes")}},jt=function(t){return{code:"file-too-small",message:"File is smaller than ".concat(t," ").concat(1===t?"byte":"bytes")}},Dt={code:"too-many-files",message:"Too many files"};function Mt(t,e){var n="application/x-moz-file"===t.type||kt(t,e);return[n,n?null:Et(e)]}function Ft(t,e,n){if(Ut(t.size))if(Ut(e)&&Ut(n)){if(t.size>n)return[!1,It(n)];if(t.size<e)return[!1,jt(e)]}else{if(Ut(e)&&t.size<e)return[!1,jt(e)];if(Ut(n)&&t.size>n)return[!1,It(n)]}return[!0,null]}function Ut(t){return null!=t}function Rt(t){return"function"==typeof t.isPropagationStopped?t.isPropagationStopped():typeof t.cancelBubble<"u"&&t.cancelBubble}function Ot(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(t){return"Files"===t||"application/x-moz-file"===t}):!!t.target&&!!t.target.files}function Lt(t){t.preventDefault()}function Nt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.some(function(e){return!Rt(t)&&e&&e.apply(void 0,[t].concat(i)),Rt(t)})}}function Bt(t){return"audio/*"===t||"video/*"===t||"image/*"===t||"text/*"===t||"application/*"===t||/\w+\/[-+.\w]+/g.test(t)}function Vt(t){return/^.*\.[\w]+$/.test(t)}var qt=["children"],zt=["open"],_t=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Gt=["refKey","onChange","onClick"];function $t(t){return function(t){if(Array.isArray(t))return Xt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wt(t)||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 Ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||Wt(t,e)||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 Wt(t,e){if(t){if("string"==typeof t)return Xt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xt(t,e)}}function Xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Kt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(n),!0).forEach(function(e){Zt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qt(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Jt=P(function(t,e){var n=t.children,i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Kt(Kt({},te),t),n=e.accept,i=e.disabled,r=e.getFilesFromEvent,o=e.maxSize,a=e.minSize,s=e.multiple,c=e.maxFiles,l=e.onDragEnter,p=e.onDragLeave,u=e.onDragOver,d=e.onDrop,f=e.onDropAccepted,m=e.onDropRejected,h=e.onFileDialogCancel,g=e.onFileDialogOpen,v=e.useFsAccessApi,x=e.autoFocus,y=e.preventDropOnDocument,b=e.noClick,w=e.noKeyboard,A=e.noDrag,S=e.noDragEventsBubbling,P=e.onError,C=e.validator,T=k(function(){return function(t){if(Ut(t))return Object.entries(t).reduce(function(t,e){var n=Pt(e,2),i=n[0],r=n[1];return[].concat(bt(t),[i],bt(r))},[]).filter(function(t){return Bt(t)||Vt(t)}).join(",")}(n)},[n]),M=k(function(){return function(t){return Ut(t)?[{description:"Files",accept:Object.entries(t).filter(function(t){var e=Pt(t,2),n=e[0],i=e[1],r=!0;return Bt(n)||(console.warn('Skipped "'.concat(n,'" 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.')),r=!1),(!Array.isArray(i)||!i.every(Vt))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(t,e){var n=Pt(e,2),i=n[0],r=n[1];return At(At({},t),{},St({},i,r))},{})}]:t}(n)},[n]),F=k(function(){return"function"==typeof g?g:ie},[g]),U=k(function(){return"function"==typeof h?h:ie},[h]),R=E(null),O=E(null),L=Ht(I(ne,ee),2),N=L[0],B=L[1],V=N.isFocused,q=N.isFileDialogActive,z=E(typeof window<"u"&&window.isSecureContext&&v&&"showOpenFilePicker"in window),_=function(){!z.current&&q&&setTimeout(function(){O.current&&(O.current.files.length||(B({type:"closeDialog"}),U()))},300)};j(function(){return window.addEventListener("focus",_,!1),function(){window.removeEventListener("focus",_,!1)}},[O,q,U,z]);var G=E([]),$=function(t){R.current&&R.current.contains(t.target)||(t.preventDefault(),G.current=[])};j(function(){return y&&(document.addEventListener("dragover",Lt,!1),document.addEventListener("drop",$,!1)),function(){y&&(document.removeEventListener("dragover",Lt),document.removeEventListener("drop",$))}},[R,y]),j(function(){return!i&&x&&R.current&&R.current.focus(),function(){}},[R,x,i]);var H=D(function(t){P?P(t):console.error(t)},[P]),W=D(function(t){t.preventDefault(),t.persist(),at(t),G.current=[].concat($t(G.current),[t.target]),Ot(t)&&Promise.resolve(r(t)).then(function(e){if(!Rt(t)||S){var n=e.length,i=n>0&&function(t){var e=t.files,n=t.accept,i=t.minSize,r=t.maxSize,o=t.multiple,a=t.maxFiles,s=t.validator;return!(!o&&e.length>1||o&&a>=1&&e.length>a)&&e.every(function(t){var e=Pt(Mt(t,n),1)[0],o=Pt(Ft(t,i,r),1)[0],a=s?s(t):null;return e&&o&&!a})}({files:e,accept:T,minSize:a,maxSize:o,multiple:s,maxFiles:c,validator:C});B({isDragAccept:i,isDragReject:n>0&&!i,isDragActive:!0,type:"setDraggedFiles"}),l&&l(t)}}).catch(function(t){return H(t)})},[r,l,H,S,T,a,o,s,c,C]),X=D(function(t){t.preventDefault(),t.persist(),at(t);var e=Ot(t);if(e&&t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch{}return e&&u&&u(t),!1},[u,S]),Y=D(function(t){t.preventDefault(),t.persist(),at(t);var e=G.current.filter(function(t){return R.current&&R.current.contains(t)}),n=e.indexOf(t.target);-1!==n&&e.splice(n,1),G.current=e,!(e.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ot(t)&&p&&p(t))},[R,p,S]),K=D(function(t,e){var n=[],i=[];t.forEach(function(t){var e=Ht(Mt(t,T),2),r=e[0],s=e[1],c=Ht(Ft(t,a,o),2),l=c[0],p=c[1],u=C?C(t):null;if(r&&l&&!u)n.push(t);else{var d=[s,p];u&&(d=d.concat(u)),i.push({file:t,errors:d.filter(function(t){return t})})}}),(!s&&n.length>1||s&&c>=1&&n.length>c)&&(n.forEach(function(t){i.push({file:t,errors:[Dt]})}),n.splice(0)),B({acceptedFiles:n,fileRejections:i,isDragReject:i.length>0,type:"setFiles"}),d&&d(n,i,e),i.length>0&&m&&m(i,e),n.length>0&&f&&f(n,e)},[B,s,T,a,o,c,d,f,m,C]),Z=D(function(t){t.preventDefault(),t.persist(),at(t),G.current=[],Ot(t)&&Promise.resolve(r(t)).then(function(e){Rt(t)&&!S||K(e,t)}).catch(function(t){return H(t)}),B({type:"reset"})},[r,K,H,S]),Q=D(function(){if(z.current){B({type:"openDialog"}),F();var t={multiple:s,types:M};window.showOpenFilePicker(t).then(function(t){return r(t)}).then(function(t){K(t,null),B({type:"closeDialog"})}).catch(function(t){!function(t){return t instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)}(t)?function(t){return t instanceof DOMException&&("SecurityError"===t.name||t.code===t.SECURITY_ERR)}(t)?(z.current=!1,O.current?(O.current.value=null,O.current.click()):H(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."))):H(t):(U(t),B({type:"closeDialog"}))})}else O.current&&(B({type:"openDialog"}),F(),O.current.value=null,O.current.click())},[B,F,U,v,K,H,M,s]),J=D(function(t){!R.current||!R.current.isEqualNode(t.target)||(" "===t.key||"Enter"===t.key||32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),Q())},[R,Q]),tt=D(function(){B({type:"focus"})},[]),et=D(function(){B({type:"blur"})},[]),nt=D(function(){b||(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?setTimeout(Q,0):Q())},[b,Q]),it=function(t){return i?null:t},rt=function(t){return w?null:it(t)},ot=function(t){return A?null:it(t)},at=function(t){S&&t.stopPropagation()},st=k(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,r=t.role,o=t.onKeyDown,a=t.onFocus,s=t.onBlur,c=t.onClick,l=t.onDragEnter,p=t.onDragOver,u=t.onDragLeave,d=t.onDrop,f=Qt(t,_t);return Kt(Kt(Zt({onKeyDown:rt(Nt(o,J)),onFocus:rt(Nt(a,tt)),onBlur:rt(Nt(s,et)),onClick:it(Nt(c,nt)),onDragEnter:ot(Nt(l,W)),onDragOver:ot(Nt(p,X)),onDragLeave:ot(Nt(u,Y)),onDrop:ot(Nt(d,Z)),role:"string"==typeof r&&""!==r?r:"presentation"},n,R),i||w?{}:{tabIndex:0}),f)}},[R,J,tt,et,nt,W,X,Y,Z,w,A,i]),ct=D(function(t){t.stopPropagation()},[]),lt=k(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onChange,r=t.onClick,o=Qt(t,Gt);return Kt(Kt({},Zt({accept:T,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:it(Nt(i,Z)),onClick:it(Nt(r,ct)),tabIndex:-1},n,O)),o)}},[O,n,s,Z,i]);return Kt(Kt({},N),{},{isFocused:V&&!i,getRootProps:st,getInputProps:lt,rootRef:R,inputRef:O,open:it(Q)})}(Qt(t,qt)),r=i.open,o=Qt(i,zt);return C(e,function(){return{open:r}},[r]),S.createElement(T,null,n(Kt(Kt({},o),{},{open:r})))});Jt.displayName="Dropzone";var te={disabled:!1,getFilesFromEvent:function(t){return G(this,void 0,void 0,function*(){return ct(t)&&function(t){return ct(t)}(t.dataTransfer)?function(t,e){return G(this,void 0,void 0,function*(){if(t.items){const n=pt(t.items).filter(t=>"file"===t.kind);if("drop"!==e)return n;return lt(dt(yield Promise.all(n.map(ut))))}return lt(pt(t.files).map(t=>ot(t)))})}(t.dataTransfer,t.type):function(t){return ct(t)&&ct(t.target)}(t)?function(t){return pt(t.target.files).map(t=>ot(t))}(t):Array.isArray(t)&&t.every(t=>"getFile"in t&&"function"==typeof t.getFile)?function(t){return G(this,void 0,void 0,function*(){return(yield Promise.all(t.map(t=>t.getFile()))).map(t=>ot(t))})}(t):[]})},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};Jt.defaultProps=te,Jt.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var ee={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ne(t,e){switch(e.type){case"focus":return Kt(Kt({},t),{},{isFocused:!0});case"blur":return Kt(Kt({},t),{},{isFocused:!1});case"openDialog":return Kt(Kt({},ee),{},{isFileDialogActive:!0});case"closeDialog":return Kt(Kt({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Kt(Kt({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Kt(Kt({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return Kt({},ee);default:return t}}function ie(){}const re=M({});function oe(t){const e=E(null);return null===e.current&&(e.current=t()),e.current}const ae=typeof window<"u",se=ae?F:j,ce=M(null);function le(t,e){-1===t.indexOf(e)&&t.push(e)}function pe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ue=(t,e,n)=>n>e?e:n<t?t:n;function de(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let fe=()=>{},me=()=>{};"production"!==process.env.NODE_ENV&&(fe=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(de(e,n))},me=(t,e,n)=>{if(!t)throw new Error(de(e,n))});const he={},ge=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ve(t){return"object"==typeof t&&null!==t}const xe=t=>/^0[^.\s]+$/u.test(t);function ye(t){let e;return()=>(void 0===e&&(e=t()),e)}const be=t=>t,we=(t,e)=>n=>e(t(n)),Ae=(...t)=>t.reduce(we),Se=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class Pe{constructor(){this.subscriptions=[]}add(t){return le(this.subscriptions,t),()=>pe(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=t=>1e3*t,Te=t=>t/1e3;function ke(t,e){return e?t*(1e3/e):0}const Ee=new Set;function Ie(t,e,n){t||Ee.has(e)||(console.warn(de(e,n)),Ee.add(e))}const je=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function De(t,e,n,i){if(t===e&&n===i)return be;const r=e=>function(t,e,n,i,r){let o,a,s=0;do{a=e+(n-e)/2,o=je(a,i,r)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<12);return a}(e,0,1,t,n);return t=>0===t||1===t?t:je(r(t),e,i)}const Me=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Fe=t=>e=>1-t(1-e),Ue=De(.33,1.53,.69,.99),Re=Fe(Ue),Oe=Me(Re),Le=t=>(t*=2)<1?.5*Re(t):.5*(2-Math.pow(2,-10*(t-1))),Ne=t=>1-Math.sin(Math.acos(t)),Be=Fe(Ne),Ve=Me(Ne),qe=De(.42,0,1,1),ze=De(0,0,.58,1),_e=De(.42,0,.58,1),Ge=t=>Array.isArray(t)&&"number"==typeof t[0],$e={linear:be,easeIn:qe,easeInOut:_e,easeOut:ze,circIn:Ne,circInOut:Ve,circOut:Be,backIn:Re,backInOut:Oe,backOut:Ue,anticipate:Le},He=t=>{if(Ge(t)){me(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return De(e,n,i,r)}return(t=>"string"==typeof t)(t)?(me(void 0!==$e[t],`Invalid easing type '${t}'`,"invalid-easing-type"),$e[t]):t},We=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Xe(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=We.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(e){o.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,r=!1,a=!1)=>{const s=a&&i?e:n;return r&&o.add(t),s.has(t)||s.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[e,n]=[n,e],e.forEach(s),e.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o),t),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:p,update:u,preRender:d,render:f,postRender:m}=a,h=()=>{const o=he.useManualTiming?r.timestamp:performance.now();n=!1,he.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,s.process(r),c.process(r),l.process(r),p.process(r),u.process(r),d.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(h))};return{schedule:We.reduce((e,o)=>{const s=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(h)),s.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<We.length;e++)a[We[e]].cancel(t)},state:r,steps:a}}const{schedule:Ye,cancel:Ke,state:Ze,steps:Qe}=Xe(typeof requestAnimationFrame<"u"?requestAnimationFrame:be,!0);let Je;function tn(){Je=void 0}const en={now:()=>(void 0===Je&&en.set(Ze.isProcessing||he.useManualTiming?Ze.timestamp:performance.now()),Je),set:t=>{Je=t,queueMicrotask(tn)}},nn=t=>e=>"string"==typeof e&&e.startsWith(t),rn=nn("--"),on=nn("var(--"),an=t=>!!on(t)&&sn.test(t.split("/*")[0].trim()),sn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cn={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ln={...cn,transform:t=>ue(0,1,t)},pn={...cn,default:1},un=t=>Math.round(1e5*t)/1e5,dn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const fn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mn=(t,e)=>n=>!!("string"==typeof n&&fn.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),hn=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,a,s]=i.match(dn);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},gn={...cn,transform:t=>Math.round((t=>ue(0,255,t))(t))},vn={test:mn("rgb","red"),parse:hn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+gn.transform(t)+", "+gn.transform(e)+", "+gn.transform(n)+", "+un(ln.transform(i))+")"};const xn={test:mn("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:vn.transform},yn=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),bn=yn("deg"),wn=yn("%"),An=yn("px"),Sn=yn("vh"),Pn=yn("vw"),Cn={...wn,parse:t=>wn.parse(t)/100,transform:t=>wn.transform(100*t)},Tn={test:mn("hsl","hue"),parse:hn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+wn.transform(un(e))+", "+wn.transform(un(n))+", "+un(ln.transform(i))+")"},kn={test:t=>vn.test(t)||xn.test(t)||Tn.test(t),parse:t=>vn.test(t)?vn.parse(t):Tn.test(t)?Tn.parse(t):xn.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?vn.transform(t):Tn.transform(t),getAnimatableNone:t=>{const e=kn.parse(t);return e.alpha=0,kn.transform(e)}},En=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const In="number",jn="color",Dn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(Dn,t=>(kn.test(t)?(i.color.push(o),r.push(jn),n.push(kn.parse(t))):t.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(t)):(i.number.push(o),r.push(In),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:a,indexes:i,types:r}}function Fn(t){return Mn(t).values}function Un(t){const{split:e,types:n}=Mn(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===In?un(t[o]):e===jn?kn.transform(t[o]):t[o]}return r}}const Rn=t=>"number"==typeof t?0:kn.test(t)?kn.getAnimatableNone(t):t;const On={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(dn)?.length||0)+(t.match(En)?.length||0)>0},parse:Fn,createTransformer:Un,getAnimatableNone:function(t){const e=Fn(t);return Un(t)(e.map(Rn))}};function Ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Nn(t,e){return n=>n>0?e:t}const Bn=(t,e,n)=>t+(e-t)*n,Vn=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},qn=[xn,vn,Tn];function zn(t){const e=(t=>qn.find(e=>e.test(t)))(t);if(fe(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Tn&&(n=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;r=Ln(s,i,t+1/3),o=Ln(s,i,t),a=Ln(s,i,t-1/3)}else r=o=a=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*a),alpha:i}}(n)),n}const _n=(t,e)=>{const n=zn(t),i=zn(e);if(!n||!i)return Nn(t,e);const r={...n};return t=>(r.red=Vn(n.red,i.red,t),r.green=Vn(n.green,i.green,t),r.blue=Vn(n.blue,i.blue,t),r.alpha=Bn(n.alpha,i.alpha,t),vn.transform(r))},Gn=new Set(["none","hidden"]);function $n(t,e){return n=>Bn(t,e,n)}function Hn(t){return"number"==typeof t?$n:"string"==typeof t?an(t)?Nn:kn.test(t)?_n:Yn:Array.isArray(t)?Wn:"object"==typeof t?kn.test(t)?_n:Xn:Nn}function Wn(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>Hn(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Xn(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=Hn(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Yn=(t,e)=>{const n=On.createTransformer(e),i=Mn(t),r=Mn(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Gn.has(t)&&!r.values.length||Gn.has(e)&&!i.values.length?function(t,e){return Gn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ae(Wn(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],s=t.values[a]??0;n[r]=s,i[o]++}return n}(i,r),r.values),n):(fe(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Nn(t,e))};function Kn(t,e,n){return"number"==typeof t&&"number"==typeof e&&"number"==typeof n?Bn(t,e,n):Hn(t)(t,e)}const Zn=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Ye.update(e,t),stop:()=>Ke(e),now:()=>Ze.isProcessing?Ze.timestamp:en.now()}},Qn=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Jn=2e4;function ti(t){let e=0;let n=t.next(e);for(;!n.done&&e<Jn;)e+=50,n=t.next(e);return e>=Jn?1/0:e}function ei(t,e,n){const i=Math.max(e-5,0);return ke(n-t(i),e-i)}const ni=100,ii=10,ri=1,oi=0,ai=800,si=.3,ci=.3,li={granular:.01,default:2},pi={granular:.005,default:.5},ui=.01,di=10,fi=.05,mi=1,hi=.001;function gi({duration:t=ai,bounce:e=si,velocity:n=oi,mass:i=ri}){let r,o;fe(t<=Ce(di),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=ue(fi,mi,a),t=ue(ui,di,Te(t)),a<1?(r=e=>{const i=e*a,r=i*t,o=i-n,s=xi(e,a),c=Math.exp(-r);return hi-o/s*c},o=e=>{const i=e*a*t,o=i*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,c=Math.exp(-i),l=xi(Math.pow(e,2),a);return(-r(e)+hi>0?-1:1)*((o-s)*c)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-hi,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let i=n;for(let n=1;n<vi;n++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=Ce(t),isNaN(s))return{stiffness:ni,damping:ii,duration:t};{const e=Math.pow(s,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const vi=12;function xi(t,e){return t*Math.sqrt(1-e*e)}const yi=["duration","bounce"],bi=["stiffness","damping","mass"];function wi(t,e){return e.some(e=>void 0!==t[e])}function Ai(t=ci,e=si){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:p,duration:u,velocity:d,isResolvedFromDuration:f}=function(t){let e={velocity:oi,stiffness:ni,damping:ii,mass:ri,isResolvedFromDuration:!1,...t};if(!wi(t,bi)&&wi(t,yi))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*ue(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:ri,stiffness:r,damping:o}}else{const n=gi(t);e={...e,...n,mass:ri},e.isResolvedFromDuration=!0}return e}({...n,velocity:-Te(n.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(c*p)),g=a-o,v=Te(Math.sqrt(c/p)),x=Math.abs(g)<5;let y;if(i||(i=x?li.granular:li.default),r||(r=x?pi.granular:pi.default),h<1){const t=xi(v,h);y=e=>{const n=Math.exp(-h*v*e);return a-n*((m+h*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===h)y=t=>a-Math.exp(-v*t)*(g+(m+v*g)*t);else{const t=v*Math.sqrt(h*h-1);y=e=>{const n=Math.exp(-h*v*e),i=Math.min(t*e,300);return a-n*((m+h*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:f&&u||null,next:t=>{const e=y(t);if(f)s.done=t>=u;else{let n=0===t?m:0;h<1&&(n=0===t?Ce(m):ei(y,t,e));const o=Math.abs(n)<=i,c=Math.abs(a-e)<=r;s.done=o&&c}return s.value=s.done?a:e,s},toString:()=>{const t=Math.min(ti(b),Jn),e=Qn(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function Si({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:p}){const u=t[0],d={done:!1,value:u},f=t=>void 0===s?c:void 0===c||Math.abs(s-t)<Math.abs(c-t)?s:c;let m=n*e;const h=u+m,g=void 0===a?h:a(h);g!==h&&(m=g-u);const v=t=>-m*Math.exp(-t/i),x=t=>g+v(t),y=t=>{const e=v(t),n=x(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,w;const A=t=>{(t=>void 0!==s&&t<s||void 0!==c&&t>c)(d.value)&&(b=t,w=Ai({keyframes:[d.value,f(d.value)],velocity:ei(x,t,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:p}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return!w&&void 0===b&&(e=!0,y(t),A(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&y(t),d)}}}function Pi(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(me(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||he.mix||Kn,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||be:e;o=Ae(t,o)}i.push(o)}return i}(e,i,r),c=s.length,l=n=>{if(a&&n<t[0])return e[0];let i=0;if(c>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=Se(t[i],t[i+1],n);return s[i](r)};return n?e=>l(ue(t[0],t[o-1],e)):l}function Ci(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Se(0,e,i);t.push(Bn(n,1,r))}}(e,t.length-1),e}function Ti(t,e){return t.map(()=>e||_e).splice(0,t.length-1)}function ki({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(He):He(i),o={done:!1,value:e[0]},a=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ci(e),t),s=Pi(a,e,{ease:Array.isArray(r)?r:Ti(e,r)});return{calculatedDuration:t,next:e=>(o.value=s(e),o.done=e>=t,o)}}Ai.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(ti(i),Jn);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:Te(r)}}(t,100,Ai);return t.ease=e.ease,t.duration=Ce(e.duration),t.type="keyframes",t};const Ei=t=>null!==t;function Ii(t,{repeat:e,repeatType:n="loop"},i,r=1){const o=t.filter(Ei),a=r<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}const ji={decay:Si,inertia:Si,tween:ki,keyframes:ki,spring:Ai};function Di(t){"string"==typeof t.type&&(t.type=ji[t.type])}class Mi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Fi=t=>t/100;class Ui extends Mi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Di(t);const{type:e=ki,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const s=e||ki;"production"!==process.env.NODE_ENV&&s!==ki&&me(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==ki&&"number"!=typeof a[0]&&(this.mixKeyframes=Ae(Fi,Kn(a[0],a[1])),a=[0,100]);const c=s({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=s({...t,keyframes:[...a].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=ti(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:l,repeat:p,repeatType:u,repeatDelay:d,type:f,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,y=n;if(p){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,p+1),!!(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/a)):"mirror"===u&&(y=o)),x=ue(0,1,n)*a}const b=v?{done:!1,value:l[0]}:y.next(x);r&&(b.value=r(b.value));let{done:w}=b;!v&&null!==s&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&f!==Si&&(b.value=Ii(l,this.options,h,this.speed)),m&&m(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return Te(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(en.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Te(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Zn,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ri=t=>180*t/Math.PI,Oi=t=>{const e=Ri(Math.atan2(t[1],t[0]));return Ni(e)},Li={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oi,rotateZ:Oi,skewX:t=>Ri(Math.atan(t[1])),skewY:t=>Ri(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ni=t=>((t%=360)<0&&(t+=360),t),Bi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Vi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),qi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bi,scaleY:Vi,scale:t=>(Bi(t)+Vi(t))/2,rotateX:t=>Ni(Ri(Math.atan2(t[6],t[5]))),rotateY:t=>Ni(Ri(Math.atan2(-t[2],t[0]))),rotateZ:Oi,rotate:Oi,skewX:t=>Ri(Math.atan(t[4])),skewY:t=>Ri(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zi(t){return t.includes("scale")?1:0}function _i(t,e){if(!t||"none"===t)return zi(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=qi,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Li,r=e}if(!r)return zi(e);const o=i[e],a=r[1].split(",").map(Gi);return"function"==typeof o?o(a):a[o]}function Gi(t){return parseFloat(t.trim())}const $i=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hi=new Set($i),Wi=t=>t===cn||t===An,Xi=new Set(["x","y","z"]),Yi=$i.filter(t=>!Xi.has(t));const Ki={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>_i(e,"x"),y:(t,{transform:e})=>_i(e,"y")};Ki.translateX=Ki.x,Ki.translateY=Ki.y;const Zi=new Set;let Qi=!1,Ji=!1,tr=!1;function er(){if(Ji){const t=Array.from(Zi).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Yi.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ji=!1,Qi=!1,Zi.forEach(t=>t.complete(tr)),Zi.clear()}function nr(){Zi.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ji=!0)})}class ir{constructor(t,e,n,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Zi.add(this),Qi||(Qi=!0,Ye.read(nr),Ye.resolveKeyframes(er))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Zi.delete(this)}cancel(){"scheduled"===this.state&&(Zi.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const rr=ye(()=>void 0!==window.ScrollTimeline),or={};function ar(t,e){const n=ye(t);return()=>or[e]??n()}const sr=ar(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,lr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function pr(t,e){if(t)return"function"==typeof t?sr()?Qn(t,e):"ease-out":Ge(t)?cr(t):Array.isArray(t)?t.map(t=>pr(t,e)||lr.easeOut):lr[t]}function ur(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const p={[e]:n};c&&(p.offset=c);const u=pr(s,r);Array.isArray(u)&&(p.easing=u);const d={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(p,d)}function dr(t){return"function"==typeof t&&"applyToOptions"in t}class fr extends Mi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,me("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=function({type:t,...e}){return dr(t)&&sr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=ur(e,n,i,c,r),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=Ii(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"===t||"finished"===t||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Te(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&rr()?(this.animation.timeline=t,be):e(this)}}const mr={anticipate:Le,backInOut:Oe,circInOut:Ve};function hr(t){"string"==typeof t.ease&&function(t){return t in mr}(t.ease)&&(t.ease=mr[t.ease])}class gr extends fr{constructor(t){hr(t),Di(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ui({...o,autoplay:!1}),s=Ce(this.finishedTime??this.time);e.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}const vr=(t,e)=>"zIndex"!==e&&!("number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!On.test(t)&&"0"!==t||t.startsWith("url(")));function xr(t){t.duration=0,t.type="keyframes"}const yr=new Set(["opacity","clipPath","filter","transform"]),br=ye(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class wr extends Mi{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:s,motionValue:c,element:l,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,name:s,motionValue:c,element:l,...p},d=l?.KeyframeResolver||ir;this.keyframeResolver=new d(a,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=en.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],a=vr(r,e),s=vr(o,e);return fe(a===s,`You are trying to animate ${e} from "${r}" to "${o}". "${a?o:r}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||dr(n))&&i)}(t,r,o,a)||((he.instantAnimations||!s)&&l?.(Ii(t,n,e)),t[0]=t[t.length-1],xr(n),n.repeat=0);const p={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=e.owner.getProps();return br()&&n&&yr.has(n)&&("transform"!==n||!c)&&!s&&!i&&"mirror"!==r&&0!==o&&"inertia"!==a}(p)?new gr({...p,element:p.motionValue.owner.current}):new Ui(p);u.finished.then(()=>this.notifyFinished()).catch(be),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tr=!0,nr(),er(),tr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ar=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sr(t,e,n=1){me(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=Ar.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ge(t)?parseFloat(t):t}return an(r)?Sr(r,e,n+1):r}function Pr(t,e){return t?.[e]??t?.default??t}const Cr=new Set(["width","height","top","left","right","bottom",...$i]),Tr=t=>e=>e.test(t),kr=[cn,An,wn,bn,Pn,Sn,{test:t=>"auto"===t,parse:t=>t}],Er=t=>kr.find(Tr(t));function Ir(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||xe(t))}const jr=new Set(["brightness","contrast","saturate","opacity"]);function Dr(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(dn)||[];if(!i)return t;const r=n.replace(i,"");let o=jr.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const Mr=/\b([a-z-]*)\(.*?\)/gu,Fr={...On,getAnimatableNone:t=>{const e=t.match(Mr);return e?e.map(Dr).join(" "):t}},Ur={...cn,transform:Math.round},Rr={borderWidth:An,borderTopWidth:An,borderRightWidth:An,borderBottomWidth:An,borderLeftWidth:An,borderRadius:An,radius:An,borderTopLeftRadius:An,borderTopRightRadius:An,borderBottomRightRadius:An,borderBottomLeftRadius:An,width:An,maxWidth:An,height:An,maxHeight:An,top:An,right:An,bottom:An,left:An,padding:An,paddingTop:An,paddingRight:An,paddingBottom:An,paddingLeft:An,margin:An,marginTop:An,marginRight:An,marginBottom:An,marginLeft:An,backgroundPositionX:An,backgroundPositionY:An,...{rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:pn,scaleX:pn,scaleY:pn,scaleZ:pn,skew:bn,skewX:bn,skewY:bn,distance:An,translateX:An,translateY:An,translateZ:An,x:An,y:An,z:An,perspective:An,transformPerspective:An,opacity:ln,originX:Cn,originY:Cn,originZ:An},zIndex:Ur,fillOpacity:ln,strokeOpacity:ln,numOctaves:Ur},Or={...Rr,color:kn,backgroundColor:kn,outlineColor:kn,fill:kn,stroke:kn,borderColor:kn,borderTopColor:kn,borderRightColor:kn,borderBottomColor:kn,borderLeftColor:kn,filter:Fr,WebkitFilter:Fr},Lr=t=>Or[t];function Nr(t,e){let n=Lr(t);return n!==Fr&&(n=On),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Br=new Set(["auto","none","0"]);class Vr extends ir{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),an(i))){const r=Sr(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Cr.has(n)||2!==t.length)return;const[i,r]=t,o=Er(i),a=Er(r);if(o!==a)if(Wi(o)&&Wi(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Ki[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ir(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Br.has(e)&&Mn(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=Nr(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ki[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,o=n[r];n[r]=Ki[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const qr=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function zr(t){return ve(t)&&"offsetHeight"in t}class _r{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=en.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=en.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&Ie(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Pe);const n=this.events[t].add(e);return"change"===t?()=>{n(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=en.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ke(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(t,e){return new _r(t,e)}const{schedule:$r}=Xe(queueMicrotask,!1),Hr={x:!1,y:!1};function Wr(){return Hr.x||Hr.y}function Xr(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Yr(t){return!("touch"===t.pointerType||Wr())}const Kr=(t,e)=>!!e&&(t===e||Kr(t,e.parentElement)),Zr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Qr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Jr=new WeakSet;function to(t){return e=>{"Enter"===e.key&&t(e)}}function eo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function no(t){return Zr(t)&&!Wr()}function io(t,e,n={}){const[i,r,o]=Xr(t,n),a=t=>{const i=t.currentTarget;if(!no(t))return;Jr.add(i);const o=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",c),Jr.has(i)&&Jr.delete(i),no(t)&&"function"==typeof o&&o(t,{success:e})},s=t=>{a(t,i===window||i===document||n.useGlobalTarget||Kr(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",s,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),zr(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=to(()=>{if(Jr.has(n))return;eo(n,"down");const t=to(()=>{eo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>eo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),!function(t){return Qr.has(t.tagName)||-1!==t.tabIndex}(t)&&!t.hasAttribute("tabindex")&&(t.tabIndex=0))}),o}function ro(t){return ve(t)&&"ownerSVGElement"in t}const oo=t=>!(!t||!t.getVelocity),ao=[...kr,kn,On],so=M({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function co(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function lo(...t){return A.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=co(t,e);return!n&&"function"==typeof i&&(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():co(t[e],null)}}}}(...t),t)}class po extends A.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=zr(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function uo({children:e,isPresent:n,anchorX:i,root:r}){const o=U(),a=E(null),s=E({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=R(so),l=lo(a,e?.ref);return O(()=>{const{width:t,height:e,top:l,left:p,right:u}=s.current;if(n||!a.current||!t||!e)return;const d="left"===i?`left: ${p}`:`right: ${u}`;a.current.dataset.motionPopId=o;const f=document.createElement("style");c&&(f.nonce=c);const m=r??document.head;return m.appendChild(f),f.sheet&&f.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${l}px !important;\n }\n `),()=>{m.contains(f)&&m.removeChild(f)}},[n]),t.jsx(po,{isPresent:n,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:l})})}const fo=({children:e,initial:n,isPresent:i,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:s,anchorX:c,root:l})=>{const p=oe(mo),u=U();let d=!0,f=k(()=>(d=!1,{id:u,initial:n,isPresent:i,custom:o,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;r&&r()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[i,p,r]);return a&&d&&(f={...f}),k(()=>{p.forEach((t,e)=>p.set(e,!1))},[i]),A.useEffect(()=>{!i&&!p.size&&r&&r()},[i]),"popLayout"===s&&(e=t.jsx(uo,{isPresent:i,anchorX:c,root:l,children:e})),t.jsx(ce.Provider,{value:f,children:e})};function mo(){return new Map}function ho(t=!0){const e=R(ce);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,o=U();j(()=>{if(t)return r(o)},[t]);const a=D(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,a]:[!0]}const go=t=>t.key||"";function vo(t){const e=[];return L.forEach(t,t=>{N(t)&&e.push(t)}),e}const xo=({children:e,custom:n,initial:i=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:s=!1,anchorX:c="left",root:l})=>{const[p,u]=ho(s),d=k(()=>vo(e),[e]),f=s&&!p?[]:d.map(go),m=E(!0),h=E(d),g=oe(()=>new Map),[v,x]=B(d),[y,b]=B(d);se(()=>{m.current=!1,h.current=d;for(let t=0;t<y.length;t++){const e=go(y[t]);f.includes(e)?g.delete(e):!0!==g.get(e)&&g.set(e,!1)}},[y,f.length,f.join("-")]);const w=[];if(d!==v){let t=[...d];for(let e=0;e<y.length;e++){const n=y[e],i=go(n);f.includes(i)||(t.splice(e,0,n),w.push(n))}return"wait"===a&&w.length&&(t=w),b(vo(t)),x(d),null}"production"!==process.env.NODE_ENV&&"wait"===a&&y.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:A}=R(re);return t.jsx(t.Fragment,{children:y.map(e=>{const v=go(e),x=!(s&&!p)&&(d===y||f.includes(v));return t.jsx(fo,{isPresent:x,initial:!(m.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:a,root:l,onExitComplete:x?void 0:()=>{if(!g.has(v))return;g.set(v,!0);let t=!0;g.forEach(e=>{e||(t=!1)}),t&&(A?.(),b(h.current),s&&u?.(),r&&r())},anchorX:c,children:e},v)})})},yo=M({strict:!1}),bo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},wo={};for(const t in bo)wo[t]={isEnabled:e=>bo[t].some(t=>!!e[t])};const Ao=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function So(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ao.has(t)}let Po=t=>!So(t);try{"function"==typeof(Co=require("@emotion/is-prop-valid").default)&&(Po=t=>t.startsWith("on")?!So(t):Co(t))}catch{}var Co;const To=M({});function ko(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Eo(t){return"string"==typeof t||Array.isArray(t)}const Io=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jo=["initial",...Io];function Do(t){return ko(t.animate)||jo.some(e=>Eo(t[e]))}function Mo(t){return!(!Do(t)&&!t.variants)}function Fo(t){const{initial:e,animate:n}=function(t,e){if(Do(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Eo(e)?e:void 0,animate:Eo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,R(To));return k(()=>({initial:e,animate:n}),[Uo(e),Uo(n)])}function Uo(t){return Array.isArray(t)?t.join(" "):t}const Ro={};function Oo(t,{layout:e,layoutId:n}){return Hi.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ro[t]||"opacity"===t)}const Lo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},No=$i.length;function Bo(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let a=!1,s=!1;for(const t in e){const n=e[t];if(Hi.has(t))a=!0;else if(rn(t))r[t]=n;else{const e=qr(n,Rr[t]);t.startsWith("origin")?(s=!0,o[t]=e):i[t]=e}}if(e.transform||(a||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<No;o++){const a=$i[o],s=t[a];if(void 0===s)continue;let c=!0;if(c="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!c||n){const t=qr(s,Rr[a]);c||(r=!1,i+=`${Lo[a]||a}(${t}) `),n&&(e[a]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),s){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Vo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qo(t,e,n){for(const i in e)!oo(e[i])&&!Oo(i,n)&&(t[i]=e[i])}function zo(t,e){const n={};return qo(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return k(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Bo(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function _o(t,e){const n={},i=zo(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function Ho(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...s},c,l,p){if(Bo(t,s,l),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=p?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Go:$o;t[o.offset]=An.transform(-i);const a=An.transform(e),s=An.transform(n);t[o.array]=`${a} ${s}`}(u,r,o,a,!1)}const Wo=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Xo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Yo(t,e,n,i){const r=k(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ho(n,e,Xo(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};qo(e,t.style,t),r.style={...e,...r.style}}return r}const Ko=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Zo(t){return"string"==typeof t&&!t.includes("-")&&!!(Ko.indexOf(t)>-1||/[A-Z]/u.test(t))}function Qo(t,e,n,{latestValues:i},r,o=!1){const a=(Zo(t)?Yo:_o)(e,i,r,t),s=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(Po(r)||!0===n&&So(r)||!e&&!So(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(e,"string"==typeof t,o),c=t!==T?{...s,...a,ref:n}:{},{children:l}=e,p=k(()=>oo(l)?l.get():l,[l]);return V(t,{...c,children:p})}function Jo(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ta(t,e,n,i){if("function"==typeof e){const[r,o]=Jo(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=Jo(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function ea(t){return oo(t)?t.get():t}function na(t,e,n,i){const r={},o=i(t,{});for(const t in o)r[t]=ea(o[t]);let{initial:a,animate:s}=t;const c=Do(t),l=Mo(t);e&&l&&!c&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===s&&(s=e.animate));let p=!!n&&!1===n.initial;p=p||!1===a;const u=p?s:a;if(u&&"boolean"!=typeof u&&!ko(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=ta(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[p?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}const ia=t=>(e,n)=>{const i=R(To),r=R(ce),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:na(n,i,r,t),renderState:e()}}(t,e,i,r);return n?o():oe(o)};function ra(t,e,n){const{style:i}=t,r={};for(const o in i)(oo(i[o])||e.style&&oo(e.style[o])||Oo(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(r[o]=i[o]);return r}const oa=ia({scrapeMotionValuesFromProps:ra,createRenderState:Vo});function aa(t,e,n){const i=ra(t,e,n);for(const n in t)if(oo(t[n])||oo(e[n])){i[-1!==$i.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const sa=ia({scrapeMotionValuesFromProps:aa,createRenderState:Wo}),ca=Symbol.for("motionComponentSymbol");function la(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function pa(t,e,n){return D(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):la(n)&&(n.current=i))},[e])}const ua=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),da="data-"+ua("framerAppearId"),fa=M({});function ma(t,e,n,i,r){const{visualElement:o}=R(To),a=R(yo),s=R(ce),c=R(so).reducedMotion,l=E(null);i=i||a.renderer,!l.current&&i&&(l.current=i(t,{visualState:e,parent:o,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:c}));const p=l.current,u=R(fa);p&&!p.projection&&r&&("html"===p.type||"svg"===p.type)&&function(t,e,n,i){const{layoutId:r,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ha(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||s&&la(s),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:c,layoutRoot:l})}(l.current,n,r,u);const d=E(!1);O(()=>{p&&d.current&&p.update(n,s)});const f=n[da],m=E(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return se(()=>{p&&(d.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),m.current&&p.animationState&&p.animationState.animateChanges())}),j(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),m.current=!1),p.enteringChildren=void 0)}),p}function ha(t){if(t)return!1!==t.options.allowProjection?t.projection:ha(t.parent)}function ga(e,{forwardMotionProps:n=!1}={},i,r){i&&function(t){for(const e in t)wo[e]={...wo[e],...t[e]}}(i);const o=Zo(e)?sa:oa;function a(a,s){let c;const l={...R(so),...a,layoutId:va(a)},{isStatic:p}=l,u=Fo(a),d=o(a,p);if(!p&&ae){!function(t,e){const n=R(yo).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?fe(!1,e,"lazy-strict-mode"):me(!1,e,"lazy-strict-mode")}}(l,i);const t=function(t){const{drag:e,layout:n}=wo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);c=t.MeasureLayout,u.visualElement=ma(e,d,l,r,t.ProjectionNode)}return t.jsxs(To.Provider,{value:u,children:[c&&u.visualElement?t.jsx(c,{visualElement:u.visualElement,...l}):null,Qo(e,a,pa(d,u.visualElement,s),d,p,n)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const s=P(a);return s[ca]=e,s}function va({layoutId:t}){const e=R(re).id;return e&&void 0!==t?e+"-"+t:t}function xa(t,e){if(typeof Proxy>"u")return ga;const n=new Map,i=(n,i)=>ga(n,i,t,e);return new Proxy((t,e)=>("production"!==process.env.NODE_ENV&&Ie(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(r,o)=>"create"===o?i:(n.has(o)||n.set(o,ga(o,void 0,t,e)),n.get(o))})}function ya({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ba(t){return void 0===t||1===t}function wa({scale:t,scaleX:e,scaleY:n}){return!ba(t)||!ba(e)||!ba(n)}function Aa(t){return wa(t)||Sa(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Sa(t){return Pa(t.x)||Pa(t.y)}function Pa(t){return t&&"0%"!==t}function Ca(t,e,n){return n+e*(t-n)}function Ta(t,e,n,i,r){return void 0!==r&&(t=Ca(t,r,i)),Ca(t,n,i)+e}function ka(t,e=0,n=1,i,r){t.min=Ta(t.min,e,n,i,r),t.max=Ta(t.max,e,n,i,r)}function Ea(t,{x:e,y:n}){ka(t.x,e.translate,e.scale,e.originPoint),ka(t.y,n.translate,n.scale,n.originPoint)}const Ia=.999999999999,ja=1.0000000000001;function Da(t,e){t.min=t.min+e,t.max=t.max+e}function Ma(t,e,n,i,r=.5){ka(t,e,n,Bn(t.min,t.max,r),i)}function Fa(t,e){Ma(t.x,e.x,e.scaleX,e.scale,e.originX),Ma(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ua(t,e){return ya(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Ra=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Oa={current:null},La={current:!1};const Na=new WeakMap;const Ba=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Va{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ir,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=en.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Ye.render(this.render,!1,!0))};const{latestValues:s,renderState:c}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Do(e),this.isVariantNode=Mo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!t||!t.current);const{willChange:l,...p}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in p){const e=p[t];void 0!==s[t]&&oo(e)&&e.set(s[t])}}mount(t){this.current=t,Na.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),La.current||function(){if(La.current=!0,ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Oa.current=t.matches;t.addEventListener("change",e),e()}else Oa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Oa.current),"production"!==process.env.NODE_ENV&&Ie(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ke(this.notifyUpdate),Ke(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Hi.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in wo){const e=wo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ba.length;e++){const n=Ba[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(oo(r))t.addValue(i,r);else if(oo(o))t.addValue(i,Gr(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Gr(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Gr(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(ge(n)||xe(n))?n=parseFloat(n):!(t=>ao.find(Tr(t)))(n)&&On.test(e)&&(n=Nr(t,e)),this.setBaseTarget(t,oo(n)?n.get():n)),oo(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ta(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||oo(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Pe),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){$r.render(this.render)}}class qa extends Va{constructor(){super(...arguments),this.KeyframeResolver=Vr}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;oo(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function za(t,{style:e,vars:n},i,r){const o=t.style;let a;for(a in e)o[a]=e[a];for(a in r?.applyProjectionStyles(o,i),n)o.setProperty(a,n[a])}class _a extends qa{constructor(){super(...arguments),this.type="html",this.renderInstance=za}readValueFromInstance(t,e){if(Hi.has(e))return this.projection?.isProjecting?zi(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return _i(n,e)})(t,e);{const n=function(t){return window.getComputedStyle(t)}(t),i=(rn(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ua(t,e)}build(t,e,n){Bo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ra(t,e,n)}}const Ga=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class $a extends qa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ra}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Hi.has(e)){const t=Lr(e);return t&&t.default||0}return e=Ga.has(e)?e:ua(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return aa(t,e,n)}build(t,e,n){Ho(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){za(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ga.has(n)?n:ua(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}const Ha=(t,e)=>Zo(t)?new $a(e):new _a(e,{allowProjection:t!==T});function Wa(t,e,n){const i=t.getProps();return ta(i,e,void 0!==n?n:i.custom,t)}const Xa=t=>Array.isArray(t);function Ya(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gr(n))}function Ka(t){return Xa(t)?t[t.length-1]||0:t}function Za(t,e){const n=t.getValue("willChange");if(function(t){return!(!oo(t)||!t.add)}(n))return n.add(e);if(!n&&he.WillChange){const n=new he.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Qa(t){return t.props[da]}const Ja=t=>null!==t;const ts={type:"spring",stiffness:500,damping:25,restSpeed:10},es={type:"keyframes",duration:.8},ns={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},is=(t,{keyframes:e})=>e.length>2?es:Hi.has(t)?t.startsWith("scale")?(t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}))(e[1]):ts:ns;const rs=(t,e,n,i={},r,o)=>a=>{const s=Pr(i,t)||{},c=s.delay||i.delay||0;let{elapsed:l=0}=i;l-=Ce(c);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...s,delay:-l,onUpdate:t=>{e.set(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...p}){return!!Object.keys(p).length})(s)||Object.assign(p,is(t,p)),p.duration&&(p.duration=Ce(p.duration)),p.repeatDelay&&(p.repeatDelay=Ce(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let u=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(xr(p),0===p.delay&&(u=!0)),(he.instantAnimations||he.skipAnimations)&&(u=!0,xr(p),p.delay=0),p.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"}){const i=t.filter(Ja);return i[e&&"loop"!==n&&e%2==1?0:i.length-1]}(p.keyframes,s);if(void 0!==t)return void Ye.update(()=>{p.onUpdate(t),p.onComplete()})}return s.isSync?new Ui(p):new wr(p)};function os({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function as(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:a,...s}=e;i&&(o=i);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in s){const i=t.getValue(e,t.latestValues[e]??null),r=s[e];if(void 0===r||l&&os(l,e))continue;const a={delay:n,...Pr(o||{},e)},p=i.get();if(void 0!==p&&!i.isAnimating&&!Array.isArray(r)&&r===p&&!a.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Qa(t);if(n){const t=window.MotionHandoffAnimation(n,e,Ye);null!==t&&(a.startTime=t,u=!0)}}Za(t,e),i.start(rs(e,i,r,t.shouldReduceMotion&&Cr.has(e)?{type:!1}:a,t,u));const d=i.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{Ye.update(()=>{a&&function(t,e){const n=Wa(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const e in o)Ya(t,e,Ka(o[e]))}(t,a)})}),c}function ss(t,e,n,i=0,r=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,s=(a-1)*i;return"function"==typeof n?n(o,a):1===r?o*i:s-o*i}function cs(t,e,n={}){const i=Wa(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(as(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=r;return function(t,e,n=0,i=0,r=0,o=1,a){const s=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),s.push(cs(c,e,{...a,delay:n+("function"==typeof i?0:i)+ss(t.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(s)}(t,e,i,o,a,s,n)}:()=>Promise.resolve(),{when:s}=r;if(s){const[t,e]="beforeChildren"===s?[o,a]:[a,o];return t().then(()=>e())}return Promise.all([o(),a(n.delay)])}function ls(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ps=jo.length;function us(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&us(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<ps;n++){const i=jo[n],r=t.props[i];(Eo(r)||!1===r)&&(e[i]=r)}return e}const ds=[...Io].reverse(),fs=Io.length;function ms(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>cs(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=cs(t,e,n);else{const r="function"==typeof e?Wa(t,e,n.custom):e;i=Promise.all(as(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function hs(t){let e=ms(t),n=xs(),i=!0;const r=e=>(n,i)=>{const r=Wa(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function o(o){const{props:a}=t,s=us(t.parent)||{},c=[],l=new Set;let p={},u=1/0;for(let e=0;e<fs;e++){const d=ds[e],f=n[d],m=void 0!==a[d]?a[d]:s[d],h=Eo(m),g=d===o?f.isActive:null;!1===g&&(u=e);let v=m===s[d]&&m!==a[d]&&h;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...p},!f.isActive&&null===g||!m&&!f.prevProp||ko(m)||"boolean"==typeof m)continue;const x=gs(f.prevProp,m);let y=x||d===o&&f.isActive&&!v&&h||e>u&&h,b=!1;const w=Array.isArray(m)?m:[m];let A=w.reduce(r(d),{});!1===g&&(A={});const{prevResolvedValues:S={}}=f,P={...S,...A},C=e=>{y=!0,l.has(e)&&(b=!0,l.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=A[t],n=S[t];if(p.hasOwnProperty(t))continue;let i=!1;i=Xa(e)&&Xa(n)?!ls(e,n):e!==n,i?null!=e?C(t):l.add(t):void 0!==e&&l.has(t)?C(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=A,f.isActive&&(p={...p,...A}),i&&t.blockInitialAnimation&&(y=!1);const T=v&&x;y&&(!T||b)&&c.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!T&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,r=Wa(i,e);if(i.enteringChildren&&r){const{delayChildren:e}=r.transition||{};n.delay=ss(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof a.initial){const n=Wa(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let d=!!c.length;return i&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(d=!1),i=!1,d?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=xs()}}}function gs(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ls(e,t)}function vs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xs(){return{animate:vs(!0),whileInView:vs(),whileHover:vs(),whileTap:vs(),whileDrag:vs(),whileFocus:vs(),exit:vs()}}class ys{constructor(t){this.isMounted=!1,this.node=t}update(){}}let bs=0;const ws={animation:{Feature:class extends ys{constructor(t){super(t),t.animationState||(t.animationState=hs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ko(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ys{constructor(){super(...arguments),this.id=bs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function As(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Ss(t){return{point:{x:t.pageX,y:t.pageY}}}function Ps(t,e,n,i){return As(t,e,(t=>e=>Zr(e)&&t(e,Ss(e)))(n),i)}function Cs(t){return t.max-t.min}function Ts(t,e,n,i=.5){t.origin=i,t.originPoint=Bn(e.min,e.max,t.origin),t.scale=Cs(n)/Cs(e),t.translate=Bn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function ks(t,e,n,i){Ts(t.x,e.x,n.x,i?i.originX:void 0),Ts(t.y,e.y,n.y,i?i.originY:void 0)}function Es(t,e,n){t.min=n.min+e.min,t.max=t.min+Cs(e)}function Is(t,e,n){t.min=e.min-n.min,t.max=t.min+Cs(e)}function js(t,e,n){Is(t.x,e.x,n.x),Is(t.y,e.y,n.y)}function Ds(t){return[t("x"),t("y")]}const Ms=({current:t})=>t?t.ownerDocument.defaultView:null,Fs=(t,e)=>Math.abs(t-e);class Us{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ls(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Fs(t.x,e.x),i=Fs(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Ze;this.history.push({...i,timestamp:r});const{onStart:o,onMove:a}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Rs(e,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ls("pointercancel"===t.type?this.lastMoveEventInfo:Rs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Zr(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Rs(Ss(t),this.transformPagePoint),{point:s}=a,{timestamp:c}=Ze;this.history=[{...s,timestamp:c}];const{onSessionStart:l}=e;l&&l(t,Ls(a,this.history)),this.removeListeners=Ae(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ke(this.updatePoint)}}function Rs(t,e){return e?{point:e(t.point)}:t}function Os(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ls({point:t},e){return{point:t,delta:Os(t,Bs(e)),offset:Os(t,Ns(e)),velocity:Vs(e,.1)}}function Ns(t){return t[0]}function Bs(t){return t[t.length-1]}function Vs(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Bs(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Ce(e)));)n--;if(!i)return{x:0,y:0};const o=Te(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const a={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function qs(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function zs(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const _s=.35;function Gs(t,e,n){return{min:$s(t,e),max:$s(t,n)}}function $s(t,e){return"number"==typeof t?t:t[e]||0}const Hs=new WeakMap;class Ws{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Us(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ss(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){return"x"===t||"y"===t?Hr[t]?null:(Hr[t]=!0,()=>{Hr[t]=!1}):Hr.x||Hr.y?null:(Hr.x=Hr.y=!0,()=>{Hr.x=Hr.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ds(t=>{let e=this.getAxisMotionValue(t).get()||0;if(wn.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];i&&(e=Cs(i)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&Ye.postRender(()=>r(t,e)),Za(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(a),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Ds(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:n,contextWindow:Ms(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Ye.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Xs(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Bn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Bn(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&la(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:qs(t.x,n,r),y:qs(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=_s){return!1===t?t=0:!0===t&&(t=_s),{x:Gs(t,"left","right"),y:Gs(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ds(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!la(t))return!1;const n=t.current;me(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=Ua(t,n),{scroll:r}=e;return r&&(Da(i.x,r.offset.x),Da(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:zs(t.x,e.x),y:zs(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ya(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},c=Ds(a=>{if(!Xs(a,e,this.currentDirection))return;let c=s&&s[a]||{};o&&(c={min:0,max:0});const l=i?200:1e6,p=i?40:1e7,u={type:"inertia",velocity:n?t[a]:0,bounceStiffness:l,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...c};return this.startAxisValueAnimation(a,u)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Za(this.visualElement,t),n.start(rs(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ds(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ds(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ds(e=>{const{drag:n}=this.getProps();if(!Xs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-Bn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!la(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ds(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Cs(t),r=Cs(e);return r>i?n=Se(e.min,e.max-i,t.min):i>r&&(n=Se(t.min,t.max-r,e.min)),ue(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ds(e=>{if(!Xs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(Bn(r,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Hs.set(this.visualElement,this);const t=Ps(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();la(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ye.read(e);const r=As(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ds(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=_s,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Xs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ys=t=>(e,n)=>{t&&Ye.postRender(()=>t(e,n))};const Ks={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qs={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!An.test(t))return t;t=parseFloat(t)}return`${Zs(t,e.target.x)}% ${Zs(t,e.target.y)}%`}},Js={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=On.parse(t);if(r.length>5)return i;const o=On.createTransformer(t),a="number"!=typeof r[0]?1:0,s=n.x.scale*e.x,c=n.y.scale*e.y;r[0+a]/=s,r[1+a]/=c;const l=Bn(s,c,.5);return"number"==typeof r[2+a]&&(r[2+a]/=l),"number"==typeof r[3+a]&&(r[3+a]/=l),o(r)}};let tc=!1;class ec extends q{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;(function(t){for(const e in t)Ro[e]=t[e],rn(e)&&(Ro[e].isCSSVariable=!0)})(ic),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),tc&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ks.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:o}=n;return o&&(o.isPresent=r,tc=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||Ye.postRender(()=>{const t=o.getStack();(!t||!t.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$r.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;tc=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nc(e){const[n,i]=ho(),r=R(re);return t.jsx(ec,{...e,layoutGroup:r,switchLayoutGroup:R(fa),isPresent:n,safeToRemove:i})}const ic={borderRadius:{...Qs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qs,borderTopRightRadius:Qs,borderBottomLeftRadius:Qs,borderBottomRightRadius:Qs,boxShadow:Js};const rc=(t,e)=>t.depth-e.depth;class oc{constructor(){this.children=[],this.isDirty=!1}add(t){le(this.children,t),this.isDirty=!0}remove(t){pe(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rc),this.isDirty=!1,this.children.forEach(t)}}const ac=["TopLeft","TopRight","BottomLeft","BottomRight"],sc=ac.length,cc=t=>"string"==typeof t?parseFloat(t):t,lc=t=>"number"==typeof t||An.test(t);function pc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const uc=fc(0,.5,Be),dc=fc(.5,.95,be);function fc(t,e,n){return i=>i<t?0:i>e?1:n(Se(t,e,i))}function mc(t,e){t.min=e.min,t.max=e.max}function hc(t,e){mc(t.x,e.x),mc(t.y,e.y)}function gc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function vc(t,e,n,i,r){return t=Ca(t-=e,1/n,i),void 0!==r&&(t=Ca(t,1/r,i)),t}function xc(t,e,[n,i,r],o,a){!function(t,e=0,n=1,i=.5,r,o=t,a=t){if(wn.test(e)&&(e=parseFloat(e),e=Bn(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let s=Bn(o.min,o.max,i);t===o&&(s-=e),t.min=vc(t.min,e,n,s,r),t.max=vc(t.max,e,n,s,r)}(t,e[n],e[i],e[r],e.scale,o,a)}const yc=["x","scaleX","originX"],bc=["y","scaleY","originY"];function wc(t,e,n,i){xc(t.x,e,yc,n?n.x:void 0,i?i.x:void 0),xc(t.y,e,bc,n?n.y:void 0,i?i.y:void 0)}function Ac(t){return 0===t.translate&&1===t.scale}function Sc(t){return Ac(t.x)&&Ac(t.y)}function Pc(t,e){return t.min===e.min&&t.max===e.max}function Cc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Tc(t,e){return Cc(t.x,e.x)&&Cc(t.y,e.y)}function kc(t){return Cs(t.x)/Cs(t.y)}function Ec(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ic{constructor(){this.members=[]}add(t){le(this.members,t),t.scheduleRender()}remove(t){if(pe(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const jc=["","X","Y","Z"];let Dc=0;function Mc(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Fc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Qa(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Fc(i)}function Uc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=Dc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Lc),this.nodes.forEach(Gc),this.nodes.forEach($c),this.nodes.forEach(Nc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new oc)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Pe),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ro(e)&&!function(t){return ro(t)&&"svg"===t.tagName}(e),this.instance=e;const{layoutId:n,layout:i,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const r=()=>this.root.updateBlockedByResize=!1;Ye.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=en.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Ke(i),t(o-e))};return Ye.setup(i,!0),()=>Ke(i)}(r,250),Ks.hasAnimatedSinceResize&&(Ks.hasAnimatedSinceResize=!1,this.nodes.forEach(_c)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&r&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||r.getDefaultTransition()||Zc,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=r.getProps(),c=!this.targetLayout||!Tc(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Pr(o,"layout"),onPlay:a,onComplete:s};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,l)}else e||_c(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ke(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Hc),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Vc);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(qc);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(zc),this.nodes.forEach(Rc),this.nodes.forEach(Oc)):this.nodes.forEach(qc),this.clearAllSnapshots();const t=en.now();Ze.delta=ue(0,1e3/60,t-Ze.timestamp),Ze.timestamp=t,Ze.isProcessing=!0,Qe.update.process(Ze),Qe.preRender.process(Ze),Qe.render.process(Ze),Ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$r.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bc),this.sharedNodes.forEach(Wc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Cs(this.snapshot.measuredBox.x)&&!Cs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Sc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Aa(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),function(t){tl(t.x),tl(t.y)}(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(nl)){const{scroll:t}=this.root;t&&(Da(e.x,t.offset.x),Da(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(hc(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&hc(e,t),Da(e.x,r.offset.x),Da(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};hc(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Fa(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Aa(i.latestValues)&&Fa(n,i.latestValues)}return Aa(this.latestValues)&&Fa(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};hc(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance||!Aa(n.latestValues))continue;wa(n.latestValues)&&n.updateSnapshot();const i=Ra();hc(i,n.measurePageBox()),wc(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Aa(this.latestValues)&&wc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=!!this.resumingFrom||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Ze.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),hc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(t,e,n){Es(t.x,e.x,n.x),Es(t.y,e.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hc(this.target,this.layout.layoutBox),Ea(this.target,this.targetDelta)):hc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.target,t.target),hc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!wa(this.parent.latestValues)&&!Sa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){const t=this.getLead(),e=!!this.resumingFrom||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ze.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;hc(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;(function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,a;e.x=e.y=1;for(let s=0;s<r;s++){o=n[s],a=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Fa(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,Ea(t,a)),i&&Aa(o.latestValues)&&Fa(t,o.latestValues))}e.x<ja&&e.x>Ia&&(e.x=1),e.y<ja&&e.y>Ia&&(e.y=1)})(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=t;s?(this.projectionDelta&&this.prevProjectionDelta?(gc(this.prevProjectionDelta.x,this.projectionDelta.x),gc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ks(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==o||this.treeScale.y!==a||!Ec(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ec(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,p=!(!s||l||!0!==this.options.crossfade||this.path.some(Kc));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;Xc(o.x,t.x,n),Xc(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(js(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Yc(t.x,e.x,n.x,i),Yc(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,a,n),u&&function(t,e){return Pc(t.x,e.x)&&Pc(t.y,e.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),hc(u,this.relativeTarget)),s&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=Bn(0,n.opacity??1,uc(i)),t.opacityExit=Bn(e.opacity??1,0,dc(i))):o&&(t.opacity=Bn(e.opacity??1,n.opacity??1,i));for(let r=0;r<sc;r++){const o=`border${ac[r]}Radius`;let a=pc(e,o),s=pc(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||lc(a)===lc(s)?(t[o]=Math.max(Bn(cc(a),cc(s),i),0),(wn.test(s)||wn.test(a))&&(t[o]+="%")):t[o]=s)}(e.rotate||n.rotate)&&(t.rotate=Bn(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,p,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{Ks.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gr(0)),this.currentAnimation=function(t,e,n){const i=oo(t)?t:Gr(t);return i.start(rs("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&el(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Cs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Cs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}hc(e,n),Fa(e,r),ks(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ic),this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Mc("z",t,i,this.animationValues);for(let e=0;e<jc.length;e++)Mc(`rotate${jc[e]}`,t,i,this.animationValues),Mc(`skew${jc[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=ea(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ea(e?.pointerEvents)||""),void(this.hasProjected&&!Aa(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const r=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,a=n?.z||0;if((r||o||a)&&(i=`translate3d(${r}px, ${o}px, ${a}px) `),(1!==e.x||1!==e.y)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:a,skewY:s}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),a&&(i+=`skewX(${a}deg) `),s&&(i+=`skewY(${s}deg) `)}const s=t.x.scale*e.x,c=t.y.scale*e.y;return(1!==s||1!==c)&&(i+=`scale(${s}, ${c})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);n&&(o=n(r,o)),t.transform=o;const{x:a,y:s}=this.projectionDelta;t.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,i.animationValues?t.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const e in Ro){if(void 0===r[e])continue;const{correct:n,applyTo:a,isCSSVariable:s}=Ro[e],c="none"===o?r[e]:n(r[e],i);if(a){const e=a.length;for(let n=0;n<e;n++)t[a[n]]=c}else s?this.options.visualElement.renderState.vars[e]=c:t[e]=c}this.options.layoutId&&(t.pointerEvents=i===this?ea(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Vc),this.root.sharedNodes.clear()}}}function Rc(t){t.updateLayout()}function Oc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;"size"===r?Ds(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],r=Cs(i);i.min=n[t].min,i.max=i.min+r}):el(r,e.layoutBox,n)&&Ds(i=>{const r=o?e.measuredBox[i]:e.layoutBox[i],a=Cs(n[i]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ks(a,n,e.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?ks(s,t.applyTransform(i,!0),e.measuredBox):ks(s,n,e.layoutBox);const c=!Sc(a);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const a={x:{min:0,max:0},y:{min:0,max:0}};js(a,e.layoutBox,r.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};js(s,n,o.layoutBox),Tc(a,s)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=s,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Lc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Nc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bc(t){t.clearSnapshot()}function Vc(t){t.clearMeasurements()}function qc(t){t.isLayoutDirty=!1}function zc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _c(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gc(t){t.resolveTargetDelta()}function $c(t){t.calcProjection()}function Hc(t){t.resetSkewAndRotation()}function Wc(t){t.removeLeadSnapshot()}function Xc(t,e,n){t.translate=Bn(e.translate,0,n),t.scale=Bn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yc(t,e,n,i){t.min=Bn(e.min,n.min,i),t.max=Bn(e.max,n.max,i)}function Kc(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zc={duration:.45,ease:[.4,0,.1,1]},Qc=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Jc=Qc("applewebkit/")&&!Qc("chrome/")?Math.round:be;function tl(t){t.min=Jc(t.min),t.max=Jc(t.max)}function el(t,e,n){return"position"===t||"preserve-aspect"===t&&!function(t,e,n){return Math.abs(t-e)<=n}(kc(e),kc(n),.2)}function nl(t){return t!==t.root&&t.scroll?.wasRoot}const il=Uc({attachResizeListener:(t,e)=>As(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rl={current:void 0},ol=Uc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rl.current){const t=new il({});t.mount(window),t.setOptions({layoutScroll:!0}),rl.current=t}return rl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),al={pan:{Feature:class extends ys{constructor(){super(...arguments),this.removePointerDownListener=be}onPointerDown(t){this.session=new Us(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ms(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ys(t),onStart:Ys(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Ye.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ys{constructor(t){super(t),this.removeGroupControls=be,this.removeListeners=be,this.controls=new Ws(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||be}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ol,MeasureLayout:nc}};function sl(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&Ye.postRender(()=>r(e,Ss(e)))}function cl(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&Ye.postRender(()=>r(e,Ss(e)))}const ll=new WeakMap,pl=new WeakMap,ul=t=>{const e=ll.get(t.target);e&&e(t)},dl=t=>{t.forEach(ul)};function fl(t,e,n){const i=function({root:t,...e}){const n=t||document;pl.has(n)||pl.set(n,{});const i=pl.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(dl,{root:t,...e})),i[r]}(e);return ll.set(t,n),i.observe(t),()=>{ll.delete(t),i.unobserve(t)}}const ml={some:0,all:1};const hl={inView:{Feature:class extends ys{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:ml[i]};return fl(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ys{mount(){const{current:t}=this.node;t&&(this.unmount=io(t,(t,e)=>(cl(this.node,e,"Start"),(t,{success:e})=>cl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends ys{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ae(As(this.node.current,"focus",()=>this.onFocus()),As(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ys{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,o]=Xr(t,n),a=t=>{if(!Yr(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Yr(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,r)};return i.forEach(t=>{t.addEventListener("pointerenter",a,r)}),o}(t,(t,e)=>(sl(this.node,e,"Start"),t=>sl(this.node,t,"End"))))}unmount(){}}}},gl=xa({...ws,...hl,...al,...{layout:{ProjectionNode:ol,MeasureLayout:nc}}},Ha);function vl(t,e){return new Promise(function(n,i){let r;return xl(t).then(function(t){try{return r=t,n(new Blob([e.slice(0,2),r,e.slice(2)],{type:"image/jpeg"}))}catch(t){return i(t)}},i)})}const xl=t=>new Promise((e,n)=>{const i=new FileReader;i.addEventListener("load",({target:{result:t}})=>{const i=new DataView(t);let r=0;if(65496!==i.getUint16(r))return n("not a valid JPEG");for(r+=2;;){const o=i.getUint16(r);if(65498===o)break;const a=i.getUint16(r+2);if(65505===o&&1165519206===i.getUint32(r+4)){const o=r+10;let s;switch(i.getUint16(o)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==i.getUint16(o+2,s))return n("TIFF header contains invalid version");const c=i.getUint32(o+4,s),l=o+c+2+12*i.getUint16(o+c,s);for(let t=o+c+2;t<l;t+=12)if(274==i.getUint16(t,s)){if(3!==i.getUint16(t+2,s))return n("Orientation data type is invalid");if(1!==i.getUint32(t+4,s))return n("Orientation data count is invalid");i.setUint16(t+8,1,s);break}return e(t.slice(r,r+2+a))}r+=2+a}return e(new Blob)}),i.readAsArrayBuffer(t)});var yl,bl,wl,Al={},Sl={get exports(){return Al},set exports(t){Al=t}};wl={},Sl.exports=wl,wl.parse=function(t,e){for(var n=wl.bin.readUshort,i=wl.bin.readUint,r=0,o={},a=new Uint8Array(t),s=a.length-4;101010256!=i(a,s);)s--;r=s,r+=4;var c=n(a,r+=4);n(a,r+=2);var l=i(a,r+=2),p=i(a,r+=4);r+=4,r=p;for(var u=0;u<c;u++){i(a,r),r+=4,r+=4,r+=4,i(a,r+=4),l=i(a,r+=4);var d=i(a,r+=4),f=n(a,r+=4),m=n(a,r+2),h=n(a,r+4);r+=6;var g=i(a,r+=8);r+=4,r+=f+m+h,wl._readLocal(a,g,o,l,d,e)}return o},wl._readLocal=function(t,e,n,i,r,o){var a=wl.bin.readUshort,s=wl.bin.readUint;s(t,e),a(t,e+=4),a(t,e+=2);var c=a(t,e+=2);s(t,e+=2),s(t,e+=4),e+=4;var l=a(t,e+=8),p=a(t,e+=2);e+=2;var u=wl.bin.readUTF8(t,e,l);if(e+=l,e+=p,o)n[u]={size:r,csize:i};else{var d=new Uint8Array(t.buffer,e);if(0==c)n[u]=new Uint8Array(d.buffer.slice(e,e+i));else{if(8!=c)throw"unknown compression method: "+c;var f=new Uint8Array(r);wl.inflateRaw(d,f),n[u]=f}}},wl.inflateRaw=function(t,e){return wl.F.inflate(t,e)},wl.inflate=function(t,e){return t[0],t[1],wl.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),e)},wl.deflate=function(t,e){null==e&&(e={level:6});var n=0,i=new Uint8Array(50+Math.floor(1.1*t.length));i[n]=120,i[n+1]=156,n+=2,n=wl.F.deflateRaw(t,i,n,e.level);var r=wl.adler(t,0,t.length);return i[n+0]=r>>>24&255,i[n+1]=r>>>16&255,i[n+2]=r>>>8&255,i[n+3]=r>>>0&255,new Uint8Array(i.buffer,0,n+4)},wl.deflateRaw=function(t,e){null==e&&(e={level:6});var n=new Uint8Array(50+Math.floor(1.1*t.length)),i=wl.F.deflateRaw(t,n,i,e.level);return new Uint8Array(n.buffer,0,i)},wl.encode=function(t,e){null==e&&(e=!1);var n=0,i=wl.bin.writeUint,r=wl.bin.writeUshort,o={};for(var a in t){var s=!wl._noNeed(a)&&!e,c=t[a],l=wl.crc.crc(c,0,c.length);o[a]={cpr:s,usize:c.length,crc:l,file:s?wl.deflateRaw(c):c}}for(var a in o)n+=o[a].file.length+30+46+2*wl.bin.sizeUTF8(a);n+=22;var p=new Uint8Array(n),u=0,d=[];for(var a in o){var f=o[a];d.push(u),u=wl._writeHeader(p,u,a,f,0)}var m=0,h=u;for(var a in o)f=o[a],d.push(u),u=wl._writeHeader(p,u,a,f,1,d[m++]);var g=u-h;return i(p,u,101010256),u+=4,r(p,u+=4,m),r(p,u+=2,m),i(p,u+=2,g),i(p,u+=4,h),u+=4,u+=2,p.buffer},wl._noNeed=function(t){var e=t.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(e)},wl._writeHeader=function(t,e,n,i,r,o){var a=wl.bin.writeUint,s=wl.bin.writeUshort,c=i.file;return a(t,e,0==r?67324752:33639248),e+=4,1==r&&(e+=2),s(t,e,20),s(t,e+=2,0),s(t,e+=2,i.cpr?8:0),a(t,e+=2,0),a(t,e+=4,i.crc),a(t,e+=4,c.length),a(t,e+=4,i.usize),s(t,e+=4,wl.bin.sizeUTF8(n)),s(t,e+=2,0),e+=2,1==r&&(e+=2,e+=2,a(t,e+=6,o),e+=4),e+=wl.bin.writeUTF8(t,e,n),0==r&&(t.set(c,e),e+=c.length),e},wl.crc={table:function(){for(var t=new Uint32Array(256),e=0;e<256;e++){for(var n=e,i=0;i<8;i++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update:function(t,e,n,i){for(var r=0;r<i;r++)t=wl.crc.table[255&(t^e[n+r])]^t>>>8;return t},crc:function(t,e,n){return 4294967295^wl.crc.update(4294967295,t,e,n)}},wl.adler=function(t,e,n){for(var i=1,r=0,o=e,a=e+n;o<a;){for(var s=Math.min(o+5552,a);o<s;)r+=i+=t[o++];i%=65521,r%=65521}return r<<16|i},wl.bin={readUshort:function(t,e){return t[e]|t[e+1]<<8},writeUshort:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255},readUint:function(t,e){return 16777216*t[e+3]+(t[e+2]<<16|t[e+1]<<8|t[e])},writeUint:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255,t[e+2]=n>>16&255,t[e+3]=n>>24&255},readASCII:function(t,e,n){for(var i="",r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII:function(t,e,n){for(var i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,e,n){for(var i,r="",o=0;o<n;o++)r+="%"+wl.bin.pad(t[e+o].toString(16));try{i=decodeURIComponent(r)}catch{return wl.bin.readASCII(t,e,n)}return i},writeUTF8:function(t,e,n){for(var i=n.length,r=0,o=0;o<i;o++){var a=n.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";t[e+r]=240|a>>18,t[e+r+1]=128|a>>12&63,t[e+r+2]=128|a>>6&63,t[e+r+3]=128|63&a,r+=4}else t[e+r]=224|a>>12,t[e+r+1]=128|a>>6&63,t[e+r+2]=128|63&a,r+=3;else t[e+r]=192|a>>6,t[e+r+1]=128|63&a,r+=2;else t[e+r]=a,r++}return r},sizeUTF8:function(t){for(var e=t.length,n=0,i=0;i<e;i++){var r=t.charCodeAt(i);if(4294967168&r)if(4294965248&r)if(4294901760&r){if(4292870144&r)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},wl.F={},wl.F.deflateRaw=function(t,e,n,i){var r=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=wl.F.U,a=wl.F._goodIndex;wl.F._hash;var s=wl.F._putsE,c=0,l=n<<3,p=0,u=t.length;if(0==i){for(;c<u;)s(e,l,c+(S=Math.min(65535,u-c))==u?1:0),l=wl.F._copyExact(t,c,S,e,l+8),c+=S;return l>>>3}var d=o.lits,f=o.strt,m=o.prev,h=0,g=0,v=0,x=0,y=0,b=0;for(u>2&&(f[b=wl.F._hash(t,0)]=0),c=0;c<u;c++){if(y=b,c+1<u-2){b=wl.F._hash(t,c+1);var w=c+1&32767;m[w]=f[b],f[b]=w}if(p<=c){(h>14e3||g>26697)&&u-c>100&&(p<c&&(d[h]=c-p,h+=2,p=c),l=wl.F._writeBlock(c==u-1||p==u?1:0,d,h,x,t,v,c-v,e,l),h=g=x=0,v=c);var A=0;c<u-2&&(A=wl.F._bestMatch(t,c,m,y,Math.min(r[2],u-c),r[3]));var S=A>>>16,P=65535&A;if(0!=A){P=65535&A;var C=a(S=A>>>16,o.of0);o.lhst[257+C]++;var T=a(P,o.df0);o.dhst[T]++,x+=o.exb[C]+o.dxb[T],d[h]=S<<23|c-p,d[h+1]=P<<16|C<<8|T,h+=2,p=c+S}else o.lhst[t[c]]++;g++}}for(v==c&&0!=t.length||(p<c&&(d[h]=c-p,h+=2,p=c),l=wl.F._writeBlock(1,d,h,x,t,v,c-v,e,l),h=0,g=0,h=g=x=0,v=c);7&l;)l++;return l>>>3},wl.F._bestMatch=function(t,e,n,i,r,o){var a=32767&e,s=n[a],c=a-s+32768&32767;if(s==a||i!=wl.F._hash(t,e-c))return 0;for(var l=0,p=0,u=Math.min(32767,e);c<=u&&0!=--o&&s!=a;){if(0==l||t[e+l]==t[e+l-c]){var d=wl.F._howLong(t,e,c);if(d>l){if(p=c,(l=d)>=r)break;c+2<d&&(d=c+2);for(var f=0,m=0;m<d-2;m++){var h=e-c+m+32768&32767,g=h-n[h]+32768&32767;g>f&&(f=g,s=h)}}}c+=(a=s)-(s=n[a])+32768&32767}return l<<16|p},wl.F._howLong=function(t,e,n){if(t[e]!=t[e-n]||t[e+1]!=t[e+1-n]||t[e+2]!=t[e+2-n])return 0;var i=e,r=Math.min(t.length,e+258);for(e+=3;e<r&&t[e]==t[e-n];)e++;return e-i},wl.F._hash=function(t,e){return(t[e]<<8|t[e+1])+(t[e+2]<<4)&65535},wl.saved=0,wl.F._writeBlock=function(t,e,n,i,r,o,a,s,c){var l,p,u,d,f,m,h,g,v,x=wl.F.U,y=wl.F._putsF,b=wl.F._putsE;x.lhst[256]++,p=(l=wl.F.getTrees())[0],u=l[1],d=l[2],f=l[3],m=l[4],h=l[5],g=l[6],v=l[7];var w=32+(c+3&7?8-(c+3&7):0)+(a<<3),A=i+wl.F.contSize(x.fltree,x.lhst)+wl.F.contSize(x.fdtree,x.dhst),S=i+wl.F.contSize(x.ltree,x.lhst)+wl.F.contSize(x.dtree,x.dhst);S+=14+3*h+wl.F.contSize(x.itree,x.ihst)+(2*x.ihst[16]+3*x.ihst[17]+7*x.ihst[18]);for(var P=0;P<286;P++)x.lhst[P]=0;for(P=0;P<30;P++)x.dhst[P]=0;for(P=0;P<19;P++)x.ihst[P]=0;var C=w<A&&w<S?0:A<S?1:2;if(y(s,c,t),y(s,c+1,C),c+=3,0==C){for(;7&c;)c++;c=wl.F._copyExact(r,o,a,s,c)}else{var T,k;if(1==C&&(T=x.fltree,k=x.fdtree),2==C){wl.F.makeCodes(x.ltree,p),wl.F.revCodes(x.ltree,p),wl.F.makeCodes(x.dtree,u),wl.F.revCodes(x.dtree,u),wl.F.makeCodes(x.itree,d),wl.F.revCodes(x.itree,d),T=x.ltree,k=x.dtree,b(s,c,f-257),b(s,c+=5,m-1),b(s,c+=5,h-4),c+=4;for(var E=0;E<h;E++)b(s,c+3*E,x.itree[1+(x.ordr[E]<<1)]);c+=3*h,c=wl.F._codeTiny(g,x.itree,s,c),c=wl.F._codeTiny(v,x.itree,s,c)}for(var I=o,j=0;j<n;j+=2){for(var D=e[j],M=D>>>23,F=I+(8388607&D);I<F;)c=wl.F._writeLit(r[I++],T,s,c);if(0!=M){var U=e[j+1],R=U>>16,O=U>>8&255,L=255&U;b(s,c=wl.F._writeLit(257+O,T,s,c),M-x.of0[O]),c+=x.exb[O],y(s,c=wl.F._writeLit(L,k,s,c),R-x.df0[L]),c+=x.dxb[L],I+=M}}c=wl.F._writeLit(256,T,s,c)}return c},wl.F._copyExact=function(t,e,n,i,r){var o=r>>>3;return i[o]=n,i[o+1]=n>>>8,i[o+2]=255-i[o],i[o+3]=255-i[o+1],o+=4,i.set(new Uint8Array(t.buffer,e,n),o),r+(n+4<<3)},wl.F.getTrees=function(){for(var t=wl.F.U,e=wl.F._hufTree(t.lhst,t.ltree,15),n=wl.F._hufTree(t.dhst,t.dtree,15),i=[],r=wl.F._lenCodes(t.ltree,i),o=[],a=wl.F._lenCodes(t.dtree,o),s=0;s<i.length;s+=2)t.ihst[i[s]]++;for(s=0;s<o.length;s+=2)t.ihst[o[s]]++;for(var c=wl.F._hufTree(t.ihst,t.itree,7),l=19;l>4&&0==t.itree[1+(t.ordr[l-1]<<1)];)l--;return[e,n,c,r,a,l,i,o]},wl.F.getSecond=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(t[n+1]);return e},wl.F.nonZero=function(t){for(var e="",n=0;n<t.length;n+=2)0!=t[n+1]&&(e+=(n>>1)+",");return e},wl.F.contSize=function(t,e){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[1+(i<<1)];return n},wl.F._codeTiny=function(t,e,n,i){for(var r=0;r<t.length;r+=2){var o=t[r],a=t[r+1];i=wl.F._writeLit(o,e,n,i);var s=16==o?2:17==o?3:7;o>15&&(wl.F._putsE(n,i,a,s),i+=s)}return i},wl.F._lenCodes=function(t,e){for(var n=t.length;2!=n&&0==t[n-1];)n-=2;for(var i=0;i<n;i+=2){var r=t[i+1],o=i+3<n?t[i+3]:-1,a=i+5<n?t[i+5]:-1,s=0==i?-1:t[i-1];if(0==r&&o==r&&a==r){for(var c=i+5;c+2<n&&t[c+2]==r;)c+=2;(l=Math.min(c+1-i>>>1,138))<11?e.push(17,l-3):e.push(18,l-11),i+=2*l-2}else if(r==s&&o==r&&a==r){for(c=i+5;c+2<n&&t[c+2]==r;)c+=2;var l=Math.min(c+1-i>>>1,6);e.push(16,l-3),i+=2*l-2}else e.push(r,0)}return n>>>1},wl.F._hufTree=function(t,e,n){var i=[],r=t.length,o=e.length,a=0;for(a=0;a<o;a+=2)e[a]=0,e[a+1]=0;for(a=0;a<r;a++)0!=t[a]&&i.push({lit:a,f:t[a]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,e[1+(l<<1)]=1,e[1+(c<<1)]=1,1}i.sort(function(t,e){return t.f-e.f});var p=i[0],u=i[1],d=0,f=1,m=2;for(i[0]={lit:-1,f:p.f+u.f,l:p,r:u,d:0};f!=s-1;)p=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],u=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],i[f++]={lit:-1,f:p.f+u.f,l:p,r:u};var h=wl.F.setDepth(i[f-1],0);for(h>n&&(wl.F.restrictDepth(c,n,h),h=n),a=0;a<s;a++)e[1+(c[a].lit<<1)]=c[a].d;return h},wl.F.setDepth=function(t,e){return-1!=t.lit?(t.d=e,e):Math.max(wl.F.setDepth(t.l,e+1),wl.F.setDepth(t.r,e+1))},wl.F.restrictDepth=function(t,e,n){var i=0,r=1<<n-e,o=0;for(t.sort(function(t,e){return e.d==t.d?t.f-e.f:e.d-t.d}),i=0;i<t.length&&t[i].d>e;i++){var a=t[i].d;t[i].d=e,o+=r-(1<<n-a)}for(o>>>=n-e;o>0;)(a=t[i].d)<e?(t[i].d++,o-=1<<e-a-1):i++;for(;i>=0;i--)t[i].d==e&&o<0&&(t[i].d--,o++);0!=o&&console.log("debt left")},wl.F._goodIndex=function(t,e){var n=0;return e[16|n]<=t&&(n|=16),e[8|n]<=t&&(n|=8),e[4|n]<=t&&(n|=4),e[2|n]<=t&&(n|=2),e[1|n]<=t&&(n|=1),n},wl.F._writeLit=function(t,e,n,i){return wl.F._putsF(n,i,e[t<<1]),i+e[1+(t<<1)]},wl.F.inflate=function(t,e){var n=Uint8Array;if(3==t[0]&&0==t[1])return e||new n(0);var i=wl.F,r=i._bitsF,o=i._bitsE,a=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,p=i.U,u=null==e;u&&(e=new n(t.length>>>2<<3));for(var d,f,m=0,h=0,g=0,v=0,x=0,y=0,b=0,w=0,A=0;0==m;)if(m=r(t,A,1),h=r(t,A+1,2),A+=3,0!=h){if(u&&(e=wl.F._check(e,w+(1<<17))),1==h&&(d=p.flmap,f=p.fdmap,y=511,b=31),2==h){g=o(t,A,5)+257,v=o(t,A+5,5)+1,x=o(t,A+10,4)+4,A+=14;for(var S=0;S<38;S+=2)p.itree[S]=0,p.itree[S+1]=0;var P=1;for(S=0;S<x;S++){var C=o(t,A+3*S,3);p.itree[1+(p.ordr[S]<<1)]=C,C>P&&(P=C)}A+=3*x,s(p.itree,P),c(p.itree,P,p.imap),d=p.lmap,f=p.dmap,A=a(p.imap,(1<<P)-1,g+v,t,A,p.ttree);var T=i._copyOut(p.ttree,0,g,p.ltree);y=(1<<T)-1;var k=i._copyOut(p.ttree,g,v,p.dtree);b=(1<<k)-1,s(p.ltree,T),c(p.ltree,T,d),s(p.dtree,k),c(p.dtree,k,f)}for(;;){var E=d[l(t,A)&y];A+=15&E;var I=E>>>4;if(I>>>8){if(256==I)break;var j=w+I-254;if(I>264){var D=p.ldef[I-257];j=w+(D>>>3)+o(t,A,7&D),A+=7&D}var M=f[l(t,A)&b];A+=15&M;var F=M>>>4,U=p.ddef[F],R=(U>>>4)+r(t,A,15&U);for(A+=15&U,u&&(e=wl.F._check(e,w+(1<<17)));w<j;)e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R];w=j}else e[w++]=I}}else{7&A&&(A+=8-(7&A));var O=4+(A>>>3),L=t[O-4]|t[O-3]<<8;u&&(e=wl.F._check(e,w+L)),e.set(new n(t.buffer,t.byteOffset+O,L),w),A=O+L<<3,w+=L}return e.length==w?e:e.slice(0,w)},wl.F._check=function(t,e){var n=t.length;if(e<=n)return t;var i=new Uint8Array(Math.max(n<<1,e));return i.set(t,0),i},wl.F._decodeTiny=function(t,e,n,i,r,o){for(var a=wl.F._bitsE,s=wl.F._get17,c=0;c<n;){var l=t[s(i,r)&e];r+=15&l;var p=l>>>4;if(p<=15)o[c]=p,c++;else{var u=0,d=0;16==p?(d=3+a(i,r,2),r+=2,u=o[c-1]):17==p?(d=3+a(i,r,3),r+=3):18==p&&(d=11+a(i,r,7),r+=7);for(var f=c+d;c<f;)o[c]=u,c++}}return r},wl.F._copyOut=function(t,e,n,i){for(var r=0,o=0,a=i.length>>>1;o<n;){var s=t[o+e];i[o<<1]=0,i[1+(o<<1)]=s,s>r&&(r=s),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},wl.F.makeCodes=function(t,e){for(var n,i,r,o,a=wl.F.U,s=t.length,c=a.bl_count,l=0;l<=e;l++)c[l]=0;for(l=1;l<s;l+=2)c[t[l]]++;var p=a.next_code;for(n=0,c[0]=0,i=1;i<=e;i++)n=n+c[i-1]<<1,p[i]=n;for(r=0;r<s;r+=2)0!=(o=t[r+1])&&(t[r]=p[o],p[o]++)},wl.F.codes2map=function(t,e,n){for(var i=t.length,r=wl.F.U.rev15,o=0;o<i;o+=2)if(0!=t[o+1])for(var a=o>>1,s=t[o+1],c=a<<4|s,l=e-s,p=t[o]<<l,u=p+(1<<l);p!=u;)n[r[p]>>>15-e]=c,p++},wl.F.revCodes=function(t,e){for(var n=wl.F.U.rev15,i=15-e,r=0;r<t.length;r+=2){var o=t[r]<<e-t[r+1];t[r]=n[o]>>>i}},wl.F._putsE=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},wl.F._putsF=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},wl.F._bitsE=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},wl.F._bitsF=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},wl.F._get17=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},wl.F._get25=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},wl.F.U=(yl=Uint16Array,bl=Uint32Array,{next_code:new yl(16),bl_count:new yl(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new yl(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new bl(32),flmap:new yl(512),fltree:[],fdmap:new yl(32),fdtree:[],lmap:new yl(32768),ltree:[],ttree:[],dmap:new yl(32768),dtree:[],imap:new yl(512),itree:[],rev15:new yl(32768),lhst:new bl(286),dhst:new bl(30),ihst:new bl(19),lits:new bl(15e3),strt:new yl(65536),prev:new yl(32768)}),function(){for(var t=wl.F.U,e=0;e<32768;e++){var n=e;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,t.rev15[e]=(n>>>16|n<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(e=0;e<32;e++)t.ldef[e]=t.of0[e]<<3|t.exb[e],t.ddef[e]=t.df0[e]<<4|t.dxb[e];i(t.fltree,144,8),i(t.fltree,112,9),i(t.fltree,24,7),i(t.fltree,8,8),wl.F.makeCodes(t.fltree,9),wl.F.codes2map(t.fltree,9,t.flmap),wl.F.revCodes(t.fltree,9),i(t.fdtree,32,5),wl.F.makeCodes(t.fdtree,5),wl.F.codes2map(t.fdtree,5,t.fdmap),wl.F.revCodes(t.fdtree,5),i(t.itree,19,0),i(t.ltree,286,0),i(t.dtree,30,0),i(t.ttree,320,0)}();var Pl=function(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})}),Object.freeze(t)}({__proto__:null,default:Al},[Al]);const Cl=function(){var t={nextZero(t,e){for(;0!=t[e];)e++;return e},readUshort:(t,e)=>t[e]<<8|t[e+1],writeUshort(t,e,n){t[e]=n>>8&255,t[e+1]=255&n},readUint:(t,e)=>16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3]),writeUint(t,e,n){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},readASCII(t,e,n){let i="";for(let r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},readBytes(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t[e+r]);return i},pad:t=>t.length<2?`0${t}`:t,readUTF8(e,n,i){let r,o="";for(let r=0;r<i;r++)o+=`%${t.pad(e[n+r].toString(16))}`;try{r=decodeURIComponent(o)}catch{return t.readASCII(e,n,i)}return r}};function e(e,n,i,r){const a=n*i,s=o(r),c=Math.ceil(n*s/8),l=new Uint8Array(4*a),p=new Uint32Array(l.buffer),{ctype:u}=r,{depth:d}=r,f=t.readUshort;if(6==u){const t=a<<2;if(8==d)for(var m=0;m<t;m+=4)l[m]=e[m],l[m+1]=e[m+1],l[m+2]=e[m+2],l[m+3]=e[m+3];if(16==d)for(m=0;m<t;m++)l[m]=e[m<<1]}else if(2==u){const t=r.tabs.tRNS;if(null==t){if(8==d)for(m=0;m<a;m++){var h=3*m;p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h]}if(16==d)for(m=0;m<a;m++)h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h]}else{var g=t[0];const n=t[1],i=t[2];if(8==d)for(m=0;m<a;m++){var v=m<<2;h=3*m,p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h],e[h]==g&&e[h+1]==n&&e[h+2]==i&&(l[v+3]=0)}if(16==d)for(m=0;m<a;m++)v=m<<2,h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h],f(e,h)==g&&f(e,h+2)==n&&f(e,h+4)==i&&(l[v+3]=0)}}else if(3==u){const t=r.tabs.PLTE,o=r.tabs.tRNS,s=o?o.length:0;if(1==d)for(var x=0;x<i;x++){var y=x*c,b=x*n;for(m=0;m<n;m++){v=b+m<<2;var w=3*(A=e[y+(m>>3)]>>7-(7&m)&1);l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}if(2==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>2)]>>6-((3&m)<<1)&3),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(4==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>1)]>>4-((1&m)<<2)&15),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(8==d)for(m=0;m<a;m++){var A;v=m<<2,w=3*(A=e[m]),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}else if(4==u){if(8==d)for(m=0;m<a;m++){v=m<<2;var S=e[P=m<<1];l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[P+1]}if(16==d)for(m=0;m<a;m++){var P;v=m<<2,S=e[P=m<<2],l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[P+2]}}else if(0==u)for(g=r.tabs.tRNS?r.tabs.tRNS:-1,x=0;x<i;x++){const t=x*c,i=x*n;if(1==d)for(var C=0;C<n;C++){var T=(S=255*(e[t+(C>>>3)]>>>7-(7&C)&1))==255*g?0:255;p[i+C]=T<<24|S<<16|S<<8|S}else if(2==d)for(C=0;C<n;C++)T=(S=85*(e[t+(C>>>2)]>>>6-((3&C)<<1)&3))==85*g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(4==d)for(C=0;C<n;C++)T=(S=17*(e[t+(C>>>1)]>>>4-((1&C)<<2)&15))==17*g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(8==d)for(C=0;C<n;C++)T=(S=e[t+C])==g?0:255,p[i+C]=T<<24|S<<16|S<<8|S;else if(16==d)for(C=0;C<n;C++)S=e[t+(C<<1)],T=f(e,t+(C<<1))==g?0:255,p[i+C]=T<<24|S<<16|S<<8|S}return l}function n(t,e,n,s){const c=o(t),l=Math.ceil(n*c/8),p=new Uint8Array((l+1+t.interlace)*s);return e=t.tabs.CgBI?r(e,p):i(e,p),0==t.interlace?e=a(e,t,0,n,s):1==t.interlace&&(e=function(t,e){const n=e.width,i=e.height,r=o(e),s=r>>3,c=Math.ceil(n*r/8),l=new Uint8Array(i*c);let p=0;const u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1];let h=0;for(;h<7;){const o=f[h],v=m[h];let x=0,y=0,b=u[h];for(;b<i;)b+=o,y++;let w=d[h];for(;w<n;)w+=v,x++;const A=Math.ceil(x*r/8);a(t,e,p,x,y);let S=0,P=u[h];for(;P<i;){let e=d[h],i=p+S*A<<3;for(;e<n;){var g;if(1==r&&(g=(g=t[i>>3])>>7-(7&i)&1,l[P*c+(e>>3)]|=g<<7-(7&e)),2==r&&(g=(g=t[i>>3])>>6-(7&i)&3,l[P*c+(e>>2)]|=g<<6-((3&e)<<1)),4==r&&(g=(g=t[i>>3])>>4-(7&i)&15,l[P*c+(e>>1)]|=g<<4-((1&e)<<2)),r>=8){const n=P*c+e*s;for(let e=0;e<s;e++)l[n+e]=t[(i>>3)+e]}i+=r,e+=v}S++,P+=o}x*y!=0&&(p+=y*(1+A)),h+=1}return l}(e,t)),e}function i(t,e){return r(new Uint8Array(t.buffer,2,t.length-6),e)}var r=function(){const t={H:{}};return t.H.N=function(e,n){const i=Uint8Array;let r,o,a=0,s=0,c=0,l=0,p=0,u=0,d=0,f=0,m=0;if(3==e[0]&&0==e[1])return n||new i(0);const h=t.H,g=h.b,v=h.e,x=h.R,y=h.n,b=h.A,w=h.Z,A=h.m,S=null==n;for(S&&(n=new i(e.length>>>2<<5));0==a;)if(a=g(e,m,1),s=g(e,m+1,2),m+=3,0!=s){if(S&&(n=t.H.W(n,f+(1<<17))),1==s&&(r=A.J,o=A.h,u=511,d=31),2==s){c=v(e,m,5)+257,l=v(e,m+5,5)+1,p=v(e,m+10,4)+4,m+=14;let t=1;for(var P=0;P<38;P+=2)A.Q[P]=0,A.Q[P+1]=0;for(P=0;P<p;P++){const n=v(e,m+3*P,3);A.Q[1+(A.X[P]<<1)]=n,n>t&&(t=n)}m+=3*p,y(A.Q,t),b(A.Q,t,A.u),r=A.w,o=A.d,m=x(A.u,(1<<t)-1,c+l,e,m,A.v);const n=h.V(A.v,0,c,A.C);u=(1<<n)-1;const i=h.V(A.v,c,l,A.D);d=(1<<i)-1,y(A.C,n),b(A.C,n,r),y(A.D,i),b(A.D,i,o)}for(;;){const t=r[w(e,m)&u];m+=15&t;const i=t>>>4;if(i>>>8){if(256==i)break;{let t=f+i-254;if(i>264){const n=A.q[i-257];t=f+(n>>>3)+v(e,m,7&n),m+=7&n}const r=o[w(e,m)&d];m+=15&r;const a=r>>>4,s=A.c[a],c=(s>>>4)+g(e,m,15&s);for(m+=15&s;f<t;)n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c];f=t}}else n[f++]=i}}else{7&m&&(m+=8-(7&m));const r=4+(m>>>3),o=e[r-4]|e[r-3]<<8;S&&(n=t.H.W(n,f+o)),n.set(new i(e.buffer,e.byteOffset+r,o),f),m=r+o<<3,f+=o}return n.length==f?n:n.slice(0,f)},t.H.W=function(t,e){const n=t.length;if(e<=n)return t;const i=new Uint8Array(n<<1);return i.set(t,0),i},t.H.R=function(e,n,i,r,o,a){const s=t.H.e,c=t.H.Z;let l=0;for(;l<i;){const t=e[c(r,o)&n];o+=15&t;const i=t>>>4;if(i<=15)a[l]=i,l++;else{let t=0,e=0;16==i?(e=3+s(r,o,2),o+=2,t=a[l-1]):17==i?(e=3+s(r,o,3),o+=3):18==i&&(e=11+s(r,o,7),o+=7);const n=l+e;for(;l<n;)a[l]=t,l++}}return o},t.H.V=function(t,e,n,i){let r=0,o=0;const a=i.length>>>1;for(;o<n;){const n=t[o+e];i[o<<1]=0,i[1+(o<<1)]=n,n>r&&(r=n),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},t.H.n=function(e,n){const i=t.H.m,r=e.length;let o,a,s,c;const l=i.j;for(var p=0;p<=n;p++)l[p]=0;for(p=1;p<r;p+=2)l[e[p]]++;const u=i.K;for(o=0,l[0]=0,a=1;a<=n;a++)o=o+l[a-1]<<1,u[a]=o;for(s=0;s<r;s+=2)c=e[s+1],0!=c&&(e[s]=u[c],u[c]++)},t.H.A=function(e,n,i){const r=e.length,o=t.H.m.r;for(let t=0;t<r;t+=2)if(0!=e[t+1]){const r=t>>1,a=e[t+1],s=r<<4|a,c=n-a;let l=e[t]<<c;const p=l+(1<<c);for(;l!=p;)i[o[l]>>>15-n]=s,l++}},t.H.l=function(e,n){const i=t.H.m.r,r=15-n;for(let t=0;t<e.length;t+=2){const o=e[t]<<n-e[t+1];e[t]=i[o]>>>r}},t.H.M=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},t.H.I=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},t.H.e=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},t.H.b=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},t.H.Z=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},t.H.i=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},t.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const e=t.H.m;for(var n=0;n<32768;n++){let t=n;t=(2863311530&t)>>>1|(1431655765&t)<<1,t=(3435973836&t)>>>2|(858993459&t)<<2,t=(4042322160&t)>>>4|(252645135&t)<<4,t=(4278255360&t)>>>8|(16711935&t)<<8,e.r[n]=(t>>>16|t<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(n=0;n<32;n++)e.q[n]=e.S[n]<<3|e.T[n],e.c[n]=e.p[n]<<4|e.z[n];i(e._,144,8),i(e._,112,9),i(e._,24,7),i(e._,8,8),t.H.n(e._,9),t.H.A(e._,9,e.J),t.H.l(e._,9),i(e.$,32,5),t.H.n(e.$,5),t.H.A(e.$,5,e.h),t.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),t.H.N}();function o(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth}function a(t,e,n,i,r){let a=o(e);const c=Math.ceil(i*a/8);let l,p;a=Math.ceil(a/8);let u=t[n],d=0;if(u>1&&(t[n]=[0,0,1][u-2]),3==u)for(d=a;d<c;d++)t[d+1]=t[d+1]+(t[d+1-a]>>>1)&255;for(let e=0;e<r;e++)if(l=n+e*c,p=l+e+1,u=t[p-1],d=0,0==u)for(;d<c;d++)t[l+d]=t[p+d];else if(1==u){for(;d<a;d++)t[l+d]=t[p+d];for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-a]}else if(2==u)for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-c];else if(3==u){for(;d<a;d++)t[l+d]=t[p+d]+(t[l+d-c]>>>1);for(;d<c;d++)t[l+d]=t[p+d]+(t[l+d-c]+t[l+d-a]>>>1)}else{for(;d<a;d++)t[l+d]=t[p+d]+s(0,t[l+d-c],0);for(;d<c;d++)t[l+d]=t[p+d]+s(t[l+d-a],t[l+d-c],t[l+d-a-c])}return t}function s(t,e,n){const i=t+e-n,r=i-t,o=i-e,a=i-n;return r*r<=o*o&&r*r<=a*a?t:o*o<=a*a?e:n}function c(e,n,i){i.width=t.readUint(e,n),n+=4,i.height=t.readUint(e,n),n+=4,i.depth=e[n],n++,i.ctype=e[n],n++,i.compress=e[n],n++,i.filter=e[n],n++,i.interlace=e[n],n++}function l(t,e,n,i,r,o,a,s,c){const l=Math.min(e,r),p=Math.min(n,o);let u=0,d=0;for(let n=0;n<p;n++)for(let o=0;o<l;o++)if(a>=0&&s>=0?(u=n*e+o<<2,d=(s+n)*r+a+o<<2):(u=(-s+n)*e-a+o<<2,d=n*r+o<<2),0==c)i[d]=t[u],i[d+1]=t[u+1],i[d+2]=t[u+2],i[d+3]=t[u+3];else if(1==c){var f=.00392156862745098*t[u+3],m=t[u]*f,h=t[u+1]*f,g=t[u+2]*f,v=i[d+3]*(1/255),x=i[d]*v,y=i[d+1]*v,b=i[d+2]*v;const e=1-f,n=f+v*e,r=0==n?0:1/n;i[d+3]=255*n,i[d+0]=(m+x*e)*r,i[d+1]=(h+y*e)*r,i[d+2]=(g+b*e)*r}else if(2==c)f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=m,i[d+1]=h,i[d+2]=g,i[d+3]=f);else if(3==c){if(f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b)continue;if(f<220&&v>20)return!1}return!0}return{decode:function(e){const o=new Uint8Array(e);let a=8;const s=t,l=s.readUshort,p=s.readUint,u={tabs:{},frames:[]},d=new Uint8Array(o.length);let f,m=0,h=0;const g=[137,80,78,71,13,10,26,10];for(var v=0;v<8;v++)if(o[v]!=g[v])throw"The input is not a PNG file!";for(;a<o.length;){const t=s.readUint(o,a);a+=4;const e=s.readASCII(o,a,4);if(a+=4,"IHDR"==e)c(o,a,u);else if("iCCP"==e){for(var x=a;0!=o[x];)x++;s.readASCII(o,a,x-a),o[x+1];const n=o.slice(x+2,a+t);let c=null;try{c=i(n)}catch{c=r(n)}u.tabs[e]=c}else if("CgBI"==e)u.tabs[e]=o.slice(a,a+4);else if("IDAT"==e){for(v=0;v<t;v++)d[m+v]=o[a+v];m+=t}else if("acTL"==e)u.tabs[e]={num_frames:p(o,a),num_plays:p(o,a+4)},f=new Uint8Array(o.length);else if("fcTL"==e){0!=h&&((P=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),P.rect.width,P.rect.height),h=0);const t={x:p(o,a+12),y:p(o,a+16),width:p(o,a+4),height:p(o,a+8)};let e=l(o,a+22);e=l(o,a+20)/(0==e?100:e);const i={rect:t,delay:Math.round(1e3*e),dispose:o[a+24],blend:o[a+25]};u.frames.push(i)}else if("fdAT"==e){for(v=0;v<t-4;v++)f[h+v]=o[a+v+4];h+=t-4}else if("pHYs"==e)u.tabs[e]=[s.readUint(o,a),s.readUint(o,a+4),o[a+8]];else if("cHRM"==e)for(u.tabs[e]=[],v=0;v<8;v++)u.tabs[e].push(s.readUint(o,a+4*v));else if("tEXt"==e||"zTXt"==e){null==u.tabs[e]&&(u.tabs[e]={});var y=s.nextZero(o,a),b=s.readASCII(o,a,y-a),w=a+t-y-1;if("tEXt"==e)S=s.readASCII(o,y+1,w);else{var A=i(o.slice(y+2,y+2+w));S=s.readUTF8(A,0,A.length)}u.tabs[e][b]=S}else if("iTXt"==e){null==u.tabs[e]&&(u.tabs[e]={}),y=0,x=a,y=s.nextZero(o,x),b=s.readASCII(o,x,y-x);const n=o[x=y+1];var S;o[x+1],x+=2,y=s.nextZero(o,x),s.readASCII(o,x,y-x),x=y+1,y=s.nextZero(o,x),s.readUTF8(o,x,y-x),w=t-((x=y+1)-a),0==n?S=s.readUTF8(o,x,w):(A=i(o.slice(x,x+w)),S=s.readUTF8(A,0,A.length)),u.tabs[e][b]=S}else if("PLTE"==e)u.tabs[e]=s.readBytes(o,a,t);else if("hIST"==e){const t=u.tabs.PLTE.length/3;for(u.tabs[e]=[],v=0;v<t;v++)u.tabs[e].push(l(o,a+2*v))}else if("tRNS"==e)3==u.ctype?u.tabs[e]=s.readBytes(o,a,t):0==u.ctype?u.tabs[e]=l(o,a):2==u.ctype&&(u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]);else if("gAMA"==e)u.tabs[e]=s.readUint(o,a)/1e5;else if("sRGB"==e)u.tabs[e]=o[a];else if("bKGD"==e)0==u.ctype||4==u.ctype?u.tabs[e]=[l(o,a)]:2==u.ctype||6==u.ctype?u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]:3==u.ctype&&(u.tabs[e]=o[a]);else if("IEND"==e)break;a+=t,s.readUint(o,a),a+=4}var P;return 0!=h&&((P=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),P.rect.width,P.rect.height)),u.data=n(u,d,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(t){const n=t.width,i=t.height;if(null==t.tabs.acTL)return[e(t.data,n,i,t).buffer];const r=[];null==t.frames[0].data&&(t.frames[0].data=t.data);const o=n*i*4,a=new Uint8Array(o),s=new Uint8Array(o),c=new Uint8Array(o);for(let u=0;u<t.frames.length;u++){const d=t.frames[u],f=d.rect.x,m=d.rect.y,h=d.rect.width,g=d.rect.height,v=e(d.data,h,g,t);if(0!=u)for(var p=0;p<o;p++)c[p]=a[p];if(0==d.blend?l(v,h,g,a,n,i,f,m,0):1==d.blend&&l(v,h,g,a,n,i,f,m,1),r.push(a.buffer.slice(0)),0!=d.dispose)if(1==d.dispose)l(s,h,g,a,n,i,f,m,0);else if(2==d.dispose)for(p=0;p<o;p++)a[p]=c[p]}return r},_paeth:s,_copyTile:l,_bin:t}}();!function(){const{_copyTile:t}=Cl,{_bin:e}=Cl,n=Cl._paeth;var i={table:function(){const t=new Uint32Array(256);for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update(t,e,n,r){for(let o=0;o<r;o++)t=i.table[255&(t^e[n+o])]^t>>>8;return t},crc:(t,e,n)=>4294967295^i.update(4294967295,t,e,n)};function r(t,e,n,i){e[n]+=t[0]*i>>4,e[n+1]+=t[1]*i>>4,e[n+2]+=t[2]*i>>4,e[n+3]+=t[3]*i>>4}function o(t){return Math.max(0,Math.min(255,t))}function a(t,e){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return n*n+i*i+r*r+o*o}function s(t,e,n,i,s,c,l){null==l&&(l=1);const p=i.length,u=[];for(var d=0;d<p;d++){const t=i[d];u.push([t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255])}for(d=0;d<p;d++){let t=4294967295;for(var f=0,m=0;m<p;m++){var h=a(u[d],u[m]);m!=d&&h<t&&(t=h,f=m)}}const g=new Uint32Array(s.buffer),v=new Int16Array(e*n*4),x=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(d=0;d<x.length;d++)x[d]=255*((x[d]+.5)/16-.5);for(let s=0;s<n;s++)for(let b=0;b<e;b++){var y;d=4*(s*e+b),2!=l?y=[o(t[d]+v[d]),o(t[d+1]+v[d+1]),o(t[d+2]+v[d+2]),o(t[d+3]+v[d+3])]:(h=x[4*(3&s)+(3&b)],y=[o(t[d]+h),o(t[d+1]+h),o(t[d+2]+h),o(t[d+3]+h)]),f=0;let w=16777215;for(m=0;m<p;m++){const t=a(y,u[m]);t<w&&(w=t,f=m)}const A=u[f],S=[y[0]-A[0],y[1]-A[1],y[2]-A[2],y[3]-A[3]];1==l&&(b!=e-1&&r(S,v,d+4,7),s!=n-1&&(0!=b&&r(S,v,d+4*e-4,3),r(S,v,d+4*e,5),b!=e-1&&r(S,v,d+4*e+4,1))),c[d>>2]=f,g[d>>2]=i[f]}}function c(t,n,r,o,a){null==a&&(a={});const{crc:s}=i,c=e.writeUint,l=e.writeUshort,p=e.writeASCII;let u=8;const d=t.frames.length>1;let f,m=!1,h=33+(d?20:0);if(null!=a.sRGB&&(h+=13),null!=a.pHYs&&(h+=21),null!=a.iCCP&&(f=pako.deflate(a.iCCP),h+=21+f.length+4),3==t.ctype){for(var g=t.plte.length,v=0;v<g;v++)t.plte[v]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var x=0;x<t.frames.length;x++)d&&(h+=38),h+=(A=t.frames[x]).cimg.length+12,0!=x&&(h+=4);h+=12;const y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(v=0;v<8;v++)y[v]=b[v];if(c(y,u,13),u+=4,p(y,u,"IHDR"),u+=4,c(y,u,n),u+=4,c(y,u,r),u+=4,y[u]=t.depth,u++,y[u]=t.ctype,u++,y[u]=0,u++,y[u]=0,u++,y[u]=0,u++,c(y,u,s(y,u-17,17)),u+=4,null!=a.sRGB&&(c(y,u,1),u+=4,p(y,u,"sRGB"),u+=4,y[u]=a.sRGB,u++,c(y,u,s(y,u-5,5)),u+=4),null!=a.iCCP){const t=13+f.length;c(y,u,t),u+=4,p(y,u,"iCCP"),u+=4,p(y,u,"ICC profile"),u+=11,u+=2,y.set(f,u),u+=f.length,c(y,u,s(y,u-(t+4),t+4)),u+=4}if(null!=a.pHYs&&(c(y,u,9),u+=4,p(y,u,"pHYs"),u+=4,c(y,u,a.pHYs[0]),u+=4,c(y,u,a.pHYs[1]),u+=4,y[u]=a.pHYs[2],u++,c(y,u,s(y,u-13,13)),u+=4),d&&(c(y,u,8),u+=4,p(y,u,"acTL"),u+=4,c(y,u,t.frames.length),u+=4,c(y,u,null!=a.loop?a.loop:0),u+=4,c(y,u,s(y,u-12,12)),u+=4),3==t.ctype){for(c(y,u,3*(g=t.plte.length)),u+=4,p(y,u,"PLTE"),u+=4,v=0;v<g;v++){const e=3*v,n=t.plte[v],i=255&n,r=n>>>8&255,o=n>>>16&255;y[u+e+0]=i,y[u+e+1]=r,y[u+e+2]=o}if(u+=3*g,c(y,u,s(y,u-3*g-4,3*g+4)),u+=4,m){for(c(y,u,g),u+=4,p(y,u,"tRNS"),u+=4,v=0;v<g;v++)y[u+v]=t.plte[v]>>>24&255;u+=g,c(y,u,s(y,u-g-4,g+4)),u+=4}}let w=0;for(x=0;x<t.frames.length;x++){var A=t.frames[x];d&&(c(y,u,26),u+=4,p(y,u,"fcTL"),u+=4,c(y,u,w++),u+=4,c(y,u,A.rect.width),u+=4,c(y,u,A.rect.height),u+=4,c(y,u,A.rect.x),u+=4,c(y,u,A.rect.y),u+=4,l(y,u,o[x]),u+=2,l(y,u,1e3),u+=2,y[u]=A.dispose,u++,y[u]=A.blend,u++,c(y,u,s(y,u-30,30)),u+=4);const e=A.cimg;c(y,u,(g=e.length)+(0==x?0:4)),u+=4;const n=u;p(y,u,0==x?"IDAT":"fdAT"),u+=4,0!=x&&(c(y,u,w++),u+=4),y.set(e,u),u+=g,c(y,u,s(y,n,u-n)),u+=4}return c(y,u,0),u+=4,p(y,u,"IEND"),u+=4,c(y,u,s(y,u-4,4)),u+=4,y.buffer}function l(t,e,n){for(let i=0;i<t.frames.length;i++){const r=t.frames[i];r.rect.width;const o=r.rect.height,a=new Uint8Array(o*r.bpl+o);r.cimg=f(r.img,o,r.bpp,r.bpl,a,e,n)}}function p(e,n,i,r,o){const a=o[0],c=o[1],l=o[2],p=o[3],f=o[4],m=o[5];let g=6,v=8,x=255;for(var y=0;y<e.length;y++){const t=new Uint8Array(e[y]);for(var b=t.length,w=0;w<b;w+=4)x&=t[w+3]}const A=255!=x,S=function(e,n,i,r,o,a){const s=[];for(var c=0;c<e.length;c++){const u=new Uint8Array(e[c]),f=new Uint32Array(u.buffer);var l;let h=0,g=0,v=n,x=i,y=r?1:0;if(0!=c){const b=a||r||1==c||0!=s[c-2].dispose?1:2;let w=0,A=1e9;for(let t=0;t<b;t++){var p=new Uint8Array(e[c-1-t]);const r=new Uint32Array(e[c-1-t]);let a=n,s=i,l=-1,u=-1;for(let t=0;t<i;t++)for(let e=0;e<n;e++)f[m=t*n+e]!=r[m]&&(e<a&&(a=e),e>l&&(l=e),t<s&&(s=t),t>u&&(u=t));-1==l&&(a=s=l=u=0),o&&(!(1&~a)&&a--,!(1&~s)&&s--);const d=(l-a+1)*(u-s+1);d<A&&(A=d,w=t,h=a,g=s,v=l-a+1,x=u-s+1)}p=new Uint8Array(e[c-1-w]),1==w&&(s[c-1].dispose=2),l=new Uint8Array(v*x*4),t(p,n,i,l,v,x,-h,-g,0),y=t(u,n,i,l,v,x,-h,-g,3)?1:0,1==y?d(u,n,i,l,{x:h,y:g,width:v,height:x}):t(u,n,i,l,v,x,-h,-g,0)}else l=u.slice(0);s.push({rect:{x:h,y:g,width:v,height:x},img:l,blend:y,dispose:0})}if(r)for(c=0;c<s.length;c++){if(1==(h=s[c]).blend)continue;const t=h.rect,r=s[c-1].rect,a=Math.min(t.x,r.x),l=Math.min(t.y,r.y),p={x:a,y:l,width:Math.max(t.x+t.width,r.x+r.width)-a,height:Math.max(t.y+t.height,r.y+r.height)-l};s[c-1].dispose=1,c-1!=0&&u(e,n,i,s,c-1,p,o),u(e,n,i,s,c,p,o)}let f=0;if(1!=e.length)for(var m=0;m<s.length;m++){var h;f+=(h=s[m]).rect.width*h.rect.height}return s}(e,n,i,a,c,l),P={},C=[],T=[];if(0!=r){const t=[];for(w=0;w<S.length;w++)t.push(S[w].img.buffer);const e=h(function(t){let e=0;for(var n=0;n<t.length;n++)e+=t[n].byteLength;const i=new Uint8Array(e);let r=0;for(n=0;n<t.length;n++){const e=new Uint8Array(t[n]),o=e.length;for(let t=0;t<o;t+=4){let n=e[t],o=e[t+1],a=e[t+2];const s=e[t+3];0==s&&(n=o=a=0),i[r+t]=n,i[r+t+1]=o,i[r+t+2]=a,i[r+t+3]=s}r+=o}return i.buffer}(t),r);for(w=0;w<e.plte.length;w++)C.push(e.plte[w].est.rgba);let n=0;for(w=0;w<S.length;w++){const t=(E=S[w]).img.length;var k=new Uint8Array(e.inds.buffer,n>>2,t>>2);T.push(k);const i=new Uint8Array(e.abuf,n,t);m&&s(E.img,E.rect.width,E.rect.height,C,i,k),E.img.set(i),n+=t}}else for(y=0;y<S.length;y++){var E=S[y];const t=new Uint32Array(E.img.buffer);var I=E.rect.width;for(b=t.length,k=new Uint8Array(b),T.push(k),w=0;w<b;w++){const e=t[w];if(0!=w&&e==t[w-1])k[w]=k[w-1];else if(w>I&&e==t[w-I])k[w]=k[w-I];else{let t=P[e];if(null==t&&(P[e]=t=C.length,C.push(e),C.length>=300))break;k[w]=t}}}const j=C.length;for(j<=256&&0==f&&(v=j<=2?1:j<=4?2:j<=16?4:8,v=Math.max(v,p)),y=0;y<S.length;y++){(E=S[y]).rect.x,E.rect.y,I=E.rect.width;const t=E.rect.height;let e=E.img;new Uint32Array(e.buffer);let n=4*I,i=4;if(j<=256&&0==f){n=Math.ceil(v*I/8);var D=new Uint8Array(n*t);const r=T[y];for(let e=0;e<t;e++){w=e*n;const t=e*I;if(8==v)for(var M=0;M<I;M++)D[w+M]=r[t+M];else if(4==v)for(M=0;M<I;M++)D[w+(M>>1)]|=r[t+M]<<4-4*(1&M);else if(2==v)for(M=0;M<I;M++)D[w+(M>>2)]|=r[t+M]<<6-2*(3&M);else if(1==v)for(M=0;M<I;M++)D[w+(M>>3)]|=r[t+M]<<7-1*(7&M)}e=D,g=3,i=1}else if(0==A&&1==S.length){D=new Uint8Array(I*t*3);const r=I*t;for(w=0;w<r;w++){const t=3*w,n=4*w;D[t]=e[n],D[t+1]=e[n+1],D[t+2]=e[n+2]}e=D,g=2,i=3,n=3*I}E.img=e,E.bpl=n,E.bpp=i}return{ctype:g,depth:v,plte:C,frames:S}}function u(e,n,i,r,o,a,s){const c=Uint8Array,l=Uint32Array,p=new c(e[o-1]),u=new l(e[o-1]),f=o+1<e.length?new c(e[o+1]):null,m=new c(e[o]),h=new l(m.buffer);let g=n,v=i,x=-1,y=-1;for(let t=0;t<a.height;t++)for(let e=0;e<a.width;e++){const i=a.x+e,s=a.y+t,c=s*n+i,l=h[c];0==l||0==r[o-1].dispose&&u[c]==l&&(null==f||0!=f[4*c+3])||(i<g&&(g=i),i>x&&(x=i),s<v&&(v=s),s>y&&(y=s))}-1==x&&(g=v=x=y=0),s&&(!(1&~g)&&g--,!(1&~v)&&v--),a={x:g,y:v,width:x-g+1,height:y-v+1};const b=r[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==r[o-1].dispose?(t(p,n,i,b.img,a.width,a.height,-a.x,-a.y,0),d(m,n,i,b.img,a)):t(m,n,i,b.img,a.width,a.height,-a.x,-a.y,0)}function d(e,n,i,r,o){t(e,n,i,r,o.width,o.height,-o.x,-o.y,2)}function f(t,e,n,i,r,o,a){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(e*i>5e5||1==n)&&(l=[0]),a&&(c={level:0});const p=Pl;for(var u=0;u<l.length;u++){for(let o=0;o<e;o++)m(r,t,o,i,n,l[u]);s.push(p.deflate(r,c))}let d,f=1e9;for(u=0;u<s.length;u++)s[u].length<f&&(d=u,f=s[u].length);return s[d]}function m(t,e,i,r,o,a){const s=i*r;let c=s+i;if(t[c]=a,c++,0==a)if(r<500)for(var l=0;l<r;l++)t[c+l]=e[s+l];else t.set(new Uint8Array(e.buffer,s,r),c);else if(1==a){for(l=0;l<o;l++)t[c+l]=e[s+l];for(l=o;l<r;l++)t[c+l]=e[s+l]-e[s+l-o]+256&255}else if(0==i){for(l=0;l<o;l++)t[c+l]=e[s+l];if(2==a)for(l=o;l<r;l++)t[c+l]=e[s+l];if(3==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-(e[s+l-o]>>1)+256&255;if(4==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-n(e[s+l-o],0,0)+256&255}else{if(2==a)for(l=0;l<r;l++)t[c+l]=e[s+l]+256-e[s+l-r]&255;if(3==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-(e[s+l-r]>>1)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-(e[s+l-r]+e[s+l-o]>>1)&255}if(4==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-n(0,e[s+l-r],0)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-n(e[s+l-o],e[s+l-r],e[s+l-o-r])&255}}}function h(t,e){const n=new Uint8Array(t),i=n.slice(0),r=new Uint32Array(i.buffer),o=g(i,e),a=o[0],s=o[1],c=n.length,l=new Uint8Array(c>>2);let p;if(n.length<2e7)for(var u=0;u<c;u+=4)p=v(a,d=n[u]*(1/255),f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255)),l[u>>2]=p.ind,r[u>>2]=p.est.rgba;else for(u=0;u<c;u+=4){var d=.00392156862745098*n[u],f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255);for(p=a;p.left;)p=x(p.est,d,f,m,h)<=0?p.left:p.right;l[u>>2]=p.ind,r[u>>2]=p.est.rgba}return{abuf:i.buffer,inds:l,plte:s}}function g(t,e,n){null==n&&(n=1e-4);const i=new Uint32Array(t.buffer),r={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=w(t,r.i0,r.i1),r.est=A(r.bst);const o=[r];for(;o.length<e;){let e=0,r=0;for(var a=0;a<o.length;a++)o[a].est.L>e&&(e=o[a].est.L,r=a);if(e<n)break;const s=o[r],c=y(t,i,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}const l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=w(t,l.i0,l.i1),l.est=A(l.bst);const p={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(p.bst={R:[],m:[],N:s.bst.N-l.bst.N},a=0;a<16;a++)p.bst.R[a]=s.bst.R[a]-l.bst.R[a];for(a=0;a<4;a++)p.bst.m[a]=s.bst.m[a]-l.bst.m[a];p.est=A(p.bst),s.left=l,s.right=p,o[r]=l,o.push(p)}for(o.sort((t,e)=>e.bst.N-t.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[r,o]}function v(t,e,n,i,r){if(null==t.left)return t.tdst=function(t,e,n,i,r){const o=e-t[0],a=n-t[1],s=i-t[2],c=r-t[3];return o*o+a*a+s*s+c*c}(t.est.q,e,n,i,r),t;const o=x(t.est,e,n,i,r);let a=t.left,s=t.right;o>0&&(a=t.right,s=t.left);const c=v(a,e,n,i,r);if(c.tdst<=o*o)return c;const l=v(s,e,n,i,r);return l.tdst<c.tdst?l:c}function x(t,e,n,i,r){const{e:o}=t;return o[0]*e+o[1]*n+o[2]*i+o[3]*r-t.eMq}function y(t,e,n,i,r,o){for(i-=4;n<i;){for(;b(t,n,r)<=o;)n+=4;for(;b(t,i,r)>o;)i-=4;if(n>=i)break;const a=e[n>>2];e[n>>2]=e[i>>2],e[i>>2]=a,n+=4,i-=4}for(;b(t,n,r)>o;)n-=4;return n+4}function b(t,e,n){return t[e]*n[0]+t[e+1]*n[1]+t[e+2]*n[2]+t[e+3]*n[3]}function w(t,e,n){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-e>>2;for(let o=e;o<n;o+=4){const e=.00392156862745098*t[o],n=t[o+1]*(1/255),a=t[o+2]*(1/255),s=t[o+3]*(1/255);r[0]+=e,r[1]+=n,r[2]+=a,r[3]+=s,i[0]+=e*e,i[1]+=e*n,i[2]+=e*a,i[3]+=e*s,i[5]+=n*n,i[6]+=n*a,i[7]+=n*s,i[10]+=a*a,i[11]+=a*s,i[15]+=s*s}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:o}}function A(t){const{R:e}=t,{m:n}=t,{N:i}=t,r=n[0],o=n[1],a=n[2],s=n[3],c=0==i?0:1/i,l=[e[0]-r*r*c,e[1]-r*o*c,e[2]-r*a*c,e[3]-r*s*c,e[4]-o*r*c,e[5]-o*o*c,e[6]-o*a*c,e[7]-o*s*c,e[8]-a*r*c,e[9]-a*o*c,e[10]-a*a*c,e[11]-a*s*c,e[12]-s*r*c,e[13]-s*o*c,e[14]-s*a*c,e[15]-s*s*c],p=l,u=S;let d=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,m=0;if(0!=i)for(let t=0;t<16&&(d=u.multVec(p,d),m=Math.sqrt(u.dot(d,d)),d=u.sml(1/m,d),!(0!=t&&Math.abs(m-f)<1e-9));t++)f=m;const h=[r*c,o*c,a*c,s*c];return{Cov:l,q:h,e:d,L:f,eMq255:u.dot(u.sml(255,h),d),eMq:u.dot(d,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0]))>>>0}}var S={multVec:(t,e)=>[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]],dot:(t,e)=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],sml:(t,e)=>[t*e[0],t*e[1],t*e[2],t*e[3]]};Cl.encode=function(t,e,n,i,r,o,a){null==i&&(i=0),null==a&&(a=!1);const s=p(t,e,n,i,[!1,!1,!1,0,a,!1]);return l(s,-1),c(s,e,n,r,o)},Cl.encodeLL=function(t,e,n,i,r,o,a,s){const p={ctype:0+(1==i?0:2)+(0==r?0:4),depth:o,frames:[]},u=(i+r)*o,d=u*e;for(let i=0;i<t.length;i++)p.frames.push({rect:{x:0,y:0,width:e,height:n},img:new Uint8Array(t[i]),blend:0,dispose:1,bpp:Math.ceil(u/8),bpl:Math.ceil(d/8)});return l(p,0,!0),c(p,e,n,a,s)},Cl.encode.compress=p,Cl.encode.dither=s,Cl.quantize=h,Cl.quantize.getKDtree=g,Cl.quantize.getNearest=v}();const Tl={toArrayBuffer(t,e){const n=t.width,i=t.height,r=n<<2,o=t.getContext("2d").getImageData(0,0,n,i),a=new Uint32Array(o.data.buffer),s=(32*n+31)/32<<2,c=s*i,l=122+c,p=new ArrayBuffer(l),u=new DataView(p),d=1<<20;let f,m,h,g,v=d,x=0,y=0,b=0;function w(t){u.setUint16(y,t,!0),y+=2}function A(t){u.setUint32(y,t,!0),y+=4}function S(t){y+=t}w(19778),A(l),S(4),A(122),A(108),A(n),A(-i>>>0),w(1),w(32),A(3),A(c),A(2835),A(2835),S(8),A(16711680),A(65280),A(255),A(4278190080),A(1466527264),function t(){for(;x<i&&v>0;){for(g=122+x*s,f=0;f<r;)v--,m=a[b++],h=m>>>24,u.setUint32(g+f,m<<8|h),f+=4;x++}b<a.length?(v=d,setTimeout(t,Tl._dly)):e(p)}()},toBlob(t,e){this.toArrayBuffer(t,t=>{e(new Blob([t],{type:"image/bmp"}))})},_dly:9};var kl={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},El={[kl.CHROME]:16384,[kl.FIREFOX]:11180,[kl.DESKTOP_SAFARI]:16384,[kl.IE]:8192,[kl.IOS]:4096,[kl.ETC]:8192};const Il=typeof window<"u",jl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Dl=Il&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Ml=(Il||jl)&&(Dl&&Dl.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Fl=(Il||jl)&&(Dl&&Dl.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Ul(t,e,n=Date.now()){return new Promise(i=>{const r=t.split(","),o=r[0].match(/:(.*?);/)[1],a=globalThis.atob(r[1]);let s=a.length;const c=new Uint8Array(s);for(;s--;)c[s]=a.charCodeAt(s);const l=new Blob([c],{type:o});l.name=e,l.lastModified=n,i(l)})}function Rl(t){return new Promise((e,n)=>{const i=new Fl;i.onload=()=>e(i.result),i.onerror=t=>n(t),i.readAsDataURL(t)})}function Ol(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=t=>n(t),i.src=t})}function Ll(){if(void 0!==Ll.cachedResult)return Ll.cachedResult;let t=kl.ETC;const{userAgent:e}=navigator;return/Chrom(e|ium)/i.test(e)?t=kl.CHROME:/iP(ad|od|hone)/i.test(e)&&/WebKit/i.test(e)?t=kl.IOS:/Safari/i.test(e)?t=kl.DESKTOP_SAFARI:/Firefox/i.test(e)?t=kl.FIREFOX:(/MSIE/i.test(e)||document.documentMode)&&(t=kl.IE),Ll.cachedResult=t,Ll.cachedResult}function Nl(t,e){const n=Ll(),i=El[n];let r=t,o=e,a=r*o;const s=r>o?o/r:r/o;for(;a>i*i;){const t=(i+r)/2,e=(i+o)/2;t<e?(o=e,r=e*s):(o=t*s,r=t),a=r*o}return{width:r,height:o}}function Bl(t,e){let n,i;try{if(n=new OffscreenCanvas(t,e),i=n.getContext("2d"),null===i)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),i=n.getContext("2d")}return n.width=t,n.height=e,[n,i]}function Vl(t,e){const{width:n,height:i}=Nl(t.width,t.height),[r,o]=Bl(n,i);return e&&/jpe?g/.test(e)&&(o.fillStyle="white",o.fillRect(0,0,r.width,r.height)),o.drawImage(t,0,0,r.width,r.height),r}function ql(){return void 0!==ql.cachedResult||(ql.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),ql.cachedResult}function zl(t,e={}){return new Promise(function(n,i){let r,o;var a=function(){try{return o=Vl(r,e.fileType||t.type),n([r,o])}catch(t){return i(t)}},s=function(e){try{var n=function(t){try{throw t}catch(t){return i(t)}};try{let e;return Rl(t).then(function(t){try{return e=t,Ol(e).then(function(t){try{return r=t,function(){try{return a()}catch(t){return i(t)}}()}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)}catch(t){n(t)}}catch(t){return i(t)}};try{if(ql()||[kl.DESKTOP_SAFARI,kl.MOBILE_SAFARI].includes(Ll()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(t).then(function(t){try{return r=t,a()}catch{return s()}},s)}catch{s()}})}function _l(t,e,n,i,r=1){return new Promise(function(o,a){let s;if("image/png"===e){let o,a,l;return o=t.getContext("2d"),({data:a}=o.getImageData(0,0,t.width,t.height)),l=Cl.encode([a.buffer],t.width,t.height,4096*r),s=new Blob([l],{type:e}),s.name=n,s.lastModified=i,c.call(this)}{let o=function(){return c.call(this)};if("image/bmp"===e)return new Promise(e=>Tl.toBlob(t,e)).then(function(t){try{return s=t,s.name=n,s.lastModified=i,o.call(this)}catch(t){return a(t)}}.bind(this),a);{let c=function(){return o.call(this)};if("function"==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)return t.convertToBlob({type:e,quality:r}).then(function(t){try{return s=t,s.name=n,s.lastModified=i,c.call(this)}catch(t){return a(t)}}.bind(this),a);{let o;return o=t.toDataURL(e,r),Ul(o,n,i).then(function(t){try{return s=t,c.call(this)}catch(t){return a(t)}}.bind(this),a)}}}function c(){return o(s)}})}function Gl(t){t.width=0,t.height=0}function $l(){return new Promise(function(t,e){let n,i,r,o;return void 0!==$l.cachedResult?t($l.cachedResult):Ul("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,zl(n).then(function(a){try{return i=a[1],_l(i,n.type,n.name,n.lastModified).then(function(n){try{return r=n,Gl(i),zl(r).then(function(n){try{return o=n[0],$l.cachedResult=1===o.width&&2===o.height,t($l.cachedResult)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)})}function Hl(t){return new Promise((e,n)=>{const i=new Fl;i.onload=t=>{const n=new DataView(t.target.result);if(65496!=n.getUint16(0,!1))return e(-2);const i=n.byteLength;let r=2;for(;r<i;){if(n.getUint16(r+2,!1)<=8)return e(-1);const t=n.getUint16(r,!1);if(r+=2,65505==t){if(1165519206!=n.getUint32(r+=2,!1))return e(-1);const t=18761==n.getUint16(r+=6,!1);r+=n.getUint32(r+4,t);const i=n.getUint16(r,t);r+=2;for(let o=0;o<i;o++)if(274==n.getUint16(r+12*o,t))return e(n.getUint16(r+12*o+8,t))}else{if(65280&~t)break;r+=n.getUint16(r,!1)}}return e(-1)},i.onerror=t=>n(t),i.readAsArrayBuffer(t)})}function Wl(t,e){const{width:n}=t,{height:i}=t,{maxWidthOrHeight:r}=e;let o,a=t;return isFinite(r)&&(n>r||i>r)&&([a,o]=Bl(n,i),n>i?(a.width=r,a.height=i/n*r):(a.width=n/i*r,a.height=r),o.drawImage(t,0,0,a.width,a.height),Gl(t)),a}function Xl(t,e){const{width:n}=t,{height:i}=t,[r,o]=Bl(n,i);switch(e>4&&e<9?(r.width=i,r.height=n):(r.width=n,r.height=i),e){case 2:o.transform(-1,0,0,1,n,0);break;case 3:o.transform(-1,0,0,-1,n,i);break;case 4:o.transform(1,0,0,-1,0,i);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,i,0);break;case 7:o.transform(0,-1,-1,0,i,n);break;case 8:o.transform(0,-1,1,0,0,n)}return o.drawImage(t,0,0,n,i),Gl(t),r}function Yl(t,e,n=0){return new Promise(function(i,r){let o,a,s,c,l,p,u,d,f,m,h,g,v,x,y,b,w,A,S,P;function C(t=5){if(e.signal&&e.signal.aborted)throw e.signal.reason;o+=t,e.onProgress(Math.min(o,100))}function T(t){if(e.signal&&e.signal.aborted)throw e.signal.reason;o=Math.min(Math.max(t,o),100),e.onProgress(o)}return o=n,a=e.maxIteration||10,s=1024*e.maxSizeMB*1024,C(),zl(t,e).then(function(n){try{return[,c]=n,C(),l=Wl(c,e),C(),new Promise(function(n,i){var r;if(!(r=e.exifOrientation))return Hl(t).then(function(t){try{return r=t,o.call(this)}catch(t){return i(t)}}.bind(this),i);function o(){return n(r)}return o.call(this)}).then(function(n){try{return p=n,C(),$l().then(function(n){try{return u=n?l:Xl(l,p),C(),d=e.initialQuality||1,f=e.fileType||t.type,_l(u,f,t.name,t.lastModified,d).then(function(n){try{{let p=function(){if(a--&&(y>s||y>v)){let e,n;return e=P?.95*S.width:S.width,n=P?.95*S.height:S.height,[w,A]=Bl(e,n),A.drawImage(S,0,0,e,n),d*="image/png"===f?.85:.95,_l(w,f,t.name,t.lastModified,d).then(function(t){try{return b=t,Gl(S),S=w,y=b.size,T(Math.min(99,Math.floor((x-y)/(x-s)*100))),p}catch(t){return r(t)}},r)}return[1]},k=function(){return Gl(S),Gl(w),Gl(l),Gl(u),Gl(c),T(100),i(b)};return m=n,C(),h=m.size>s,g=m.size>t.size,h||g?(v=t.size,x=m.size,y=x,S=u,P=!e.alwaysKeepResolution&&h,(o=function(t){for(;t;){if(t.then)return void t.then(o,r);try{if(t.pop){if(t.length)return t.pop()?k.call(this):t;t=p}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(p)):(T(100),i(m));var o}}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)})}let Kl;function Zl(t,e){return new Promise(function(n,i){let r,o,a,s,c,l;if(r={...e},a=0,({onProgress:s}=r),r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof r.useWebWorker||r.useWebWorker,delete r.useWebWorker,r.onProgress=t=>{a=t,"function"==typeof s&&s(a)},!(t instanceof Blob||t instanceof Ml))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return i(new Error("The file given is not an image"));if(l=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return Yl(t,r).then(function(t){try{return o=t,d.call(this)}catch(t){return i(t)}}.bind(this),i);var p=function(){try{return d.call(this)}catch(t){return i(t)}}.bind(this),u=function(e){try{return Yl(t,r).then(function(t){try{return o=t,p()}catch(t){return i(t)}},i)}catch(t){return i(t)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",function(t,e){return new Promise((n,i)=>{Kl||(Kl=function(t){const e=[];return e.push(t),URL.createObjectURL(new Blob(e))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const r=new Worker(Kl);r.addEventListener("message",function(t){if(e.signal&&e.signal.aborted)r.terminate();else if(void 0===t.data.progress){if(t.data.error)return i(new Error(t.data.error)),void r.terminate();n(t.data.file),r.terminate()}else e.onProgress(t.data.progress)}),r.addEventListener("error",i),e.signal&&e.signal.addEventListener("abort",()=>{i(e.signal.reason),r.terminate()}),r.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})})}(t,r).then(function(t){try{return o=t,p()}catch{return u()}},u)}catch{u()}function d(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{r.preserveExif&&"image/jpeg"===t.type&&(!r.fileType||r.fileType&&r.fileType===t.type)&&(o=vl(t,o))}catch{}return n(o)}})}Zl.getDataUrlFromFile=Rl,Zl.getFilefromDataUrl=Ul,Zl.loadImage=Ol,Zl.drawImageInCanvas=Vl,Zl.drawFileInCanvas=zl,Zl.canvasToFile=_l,Zl.getExifOrientation=Hl,Zl.handleMaxWidthOrHeight=Wl,Zl.followExifOrientation=Xl,Zl.cleanupCanvasMemory=Gl,Zl.isAutoOrientationInBrowser=$l,Zl.approximateBelowMaximumCanvasSizeOfBrowser=Nl,Zl.copyExifWithoutOrientation=vl,Zl.getBrowserName=Ll,Zl.version="2.0.2";let Ql=class{constructor(t){if(function(t){return"object"!=typeof t||void 0===t.length||void 0===t.readUInt8||void 0===t.readUInt16LE||void 0===t.readUInt16BE||void 0===t.readUInt32LE||void 0===t.readUInt32BE||void 0===t.readInt32LE||void 0===t.readInt32BE}(t))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}getUint8(t){return this.buffer.readUInt8(t)}getUint16(t,e){return e?this.buffer.readUInt16LE(t):this.buffer.readUInt16BE(t)}getUint32(t,e){return e?this.buffer.readUInt32LE(t):this.buffer.readUInt32BE(t)}getInt32(t,e){return e?this.buffer.readInt32LE(t):this.buffer.readInt32BE(t)}};function Jl(t,e,n){try{return new DataView(t,e,n)}catch{return new Ql(t,e,n)}}function tp(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r++)i.push(t.getUint8(e+r));return rp(i)}function ep(t,e){const n=[];let i=0;for(;e+i<t.byteLength;){const r=t.getUint8(e+i);if(0===r)break;n.push(r),i++}return rp(n)}function np(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r+=2)i.push(t.getUint16(e+r));return 0===i[i.length-1]&&i.pop(),rp(i)}function ip(t,e){const n=t.getUint8(e);return[n,tp(t,e+1,n)]}function rp(t){return t.map(t=>String.fromCharCode(t)).join("")}function op(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function ap(t,e,n){let i=!1;Object.defineProperty(t,e,{get:()=>(i||(i=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]),configurable:!0,enumerable:!0})}function sp(t){return typeof btoa<"u"?btoa("string"==typeof t?t:Array.prototype.reduce.call(new Uint8Array(t),(t,e)=>t+String.fromCharCode(e),"")):typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function cp(t,e){return new Array(e+1).join(t)}const lp=void 0;function pp(t,e,n,i="string"){if(0===e&&"function"==typeof DecompressionStream){const e=new DecompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return"dataview"===i?new Response(r).arrayBuffer().then(t=>new DataView(t)):new Response(r).arrayBuffer().then(t=>new TextDecoder(n).decode(t))}return void 0!==e?Promise.reject(`Unknown compression method ${e}.`):t}const up=!0,dp=!0;function fp(t){return t.map(t=>String.fromCharCode(t)).join("")}function mp(t){if(t.length>=8){const e=fp(t.slice(0,8));if("ASCII\0\0\0"===e)return fp(t.slice(8));if("JIS\0\0\0\0\0"===e)return"[JIS encoded text]";if("UNICODE\0"===e)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===e)return"[Undefined encoding]"}return"Undefined"}function hp(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const gp=18761,vp=19789,xp={BIG_ENDIAN:vp,LITTLE_ENDIAN:gp,getByteOrder:function(t,e){if(t.getUint16(e)===gp)return gp;if(t.getUint16(e)===vp)return vp;throw new Error("Illegal byte order value. Faulty image.")}};const yp={isTiffFile:function(t){return!!t&&t.byteLength>=4&&function(t){const e=t.getUint16(0)===xp.LITTLE_ENDIAN;return 42===t.getUint16(2,e)}(t)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};const bp={isJpegFile:function(t){return!!t&&t.byteLength>=wp&&t.getUint16(0)===Ap},findJpegOffsets:function(t){let e,n,i,r,o,a,s,c,l,p=Sp;for(;p+Pp+5<=t.byteLength;){if(eu(t,p))e=t.getUint16(p+Cp),n=p+Cp;else if(nu(t,p))e=t.getUint16(p+Cp),i=p+Cp;else if(ou(t,p))e=t.getUint16(p+Cp),r=p+Tp;else if(au(t,p))e=t.getUint16(p+Cp),o=p+kp;else if(su(t,p))s||(s=[]),e=t.getUint16(p+Cp),s.push(lu(p,e));else if(cu(t,p))s||(s=[]),e=t.getUint16(p+Cp),s.push(pu(p,e));else if(uu(t,p))e=t.getUint16(p+Cp),a=p+Ep;else if(iu(t,p)){e=t.getUint16(p+Cp);const n=p+Dp,i=e-(Dp-Cp),r=t.getUint8(p+Up),o=t.getUint8(p+Rp);c||(c=[]),c.push({offset:n,length:i,chunkNumber:r,chunksTotal:o})}else if(ru(t,p))e=t.getUint16(p+Cp),l=p+Mp;else{if(!du(t,p)){if(fu(t,p)){p++;continue}break}e=t.getUint16(p+Cp)}p+=Cp+e}return{hasAppMarkers:p>Sp,fileDataOffset:n||i,jfifDataOffset:r,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:s,iccChunks:c,mpfDataOffset:l}}},wp=2,Ap=65496,Sp=2,Pp=4,Cp=2,Tp=2,kp=10,Ep=18,Ip=33,jp=79,Dp=18,Mp=8,Fp="ICC_PROFILE\0",Up=Pp+Fp.length,Rp=Up+1,Op="MPF\0",Lp=65472,Np=65474,Bp=65476,Vp=65499,qp=65501,zp=65498,_p=65504,Gp=65505,$p=65506,Hp=65517,Wp=65519,Xp=65534,Yp=65535,Kp="JFIF",Zp="Exif",Qp="http://ns.adobe.com/xap/1.0/\0",Jp="http://ns.adobe.com/xmp/extension/\0",tu="Photoshop 3.0";function eu(t,e){return t.getUint16(e)===Lp}function nu(t,e){return t.getUint16(e)===Np}function iu(t,e){const n=Fp.length;return t.getUint16(e)===$p&&tp(t,e+Pp,n)===Fp}function ru(t,e){const n=Op.length;return t.getUint16(e)===$p&&tp(t,e+Pp,n)===Op}function ou(t,e){const n=Kp.length;return t.getUint16(e)===_p&&tp(t,e+Pp,n)===Kp&&0===t.getUint8(e+Pp+n)}function au(t,e){const n=Zp.length;return t.getUint16(e)===Gp&&tp(t,e+Pp,n)===Zp&&0===t.getUint8(e+Pp+n)}function su(t,e){return t.getUint16(e)===Gp&&function(t,e){const n=Qp.length;return tp(t,e+Pp,n)===Qp}(t,e)}function cu(t,e){return t.getUint16(e)===Gp&&function(t,e){const n=Jp.length;return tp(t,e+Pp,n)===Jp}(t,e)}function lu(t,e){return{dataOffset:t+Ip,length:e-(Ip-Cp)}}function pu(t,e){return{dataOffset:t+jp,length:e-(jp-Cp)}}function uu(t,e){const n=tu.length;return t.getUint16(e)===Hp&&tp(t,e+Pp,n)===tu&&0===t.getUint8(e+Pp+n)}function du(t,e){const n=t.getUint16(e);return n>=_p&&n<=Wp||n===Xp||n===Lp||n===Np||n===Bp||n===Vp||n===qp||n===zp}function fu(t,e){return t.getUint16(e)===Yp}const mu={isPngFile:function(t){return!!t&&tp(t,0,hu.length)===hu},findPngOffsets:function(t,e){const n={hasAppMarkers:!1};let i=hu.length;for(;i+gu+vu<=t.byteLength;){if(Iu(t,i))n.hasAppMarkers=!0,n.pngHeaderOffset=i+bu;else if(ju(t,i)){const e=Ru(t,i);void 0!==e&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:e,length:t.getUint32(i+xu)-(e-(i+bu))}])}else if(Du(t,i,e)){n.hasAppMarkers=!0;const e=tp(t,i+yu,vu);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:t.getUint32(i+xu),type:e,offset:i+bu})}else if(Mu(t,i))n.hasAppMarkers=!0,n.tiffHeaderOffset=i+bu;else if(e&&Fu(t,i)){n.hasAppMarkers=!0;const e=t.getUint32(i+xu),r=i+bu,{profileName:o,compressionMethod:a,compressedProfileOffset:s}=Ou(t,r);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:e-(s-r),chunkNumber:1,chunksTotal:1,profileName:o,compressionMethod:a})}else Uu(t,i)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(i+xu));i+=t.getUint32(i+xu)+gu+vu+4}return n}},hu="‰PNG\r\n\n",gu=4,vu=4,xu=0,yu=gu,bu=gu+vu,wu="XML:com.adobe.xmp\0",Au="tEXt",Su="iTXt",Pu="zTXt",Cu="pHYs",Tu="tIME",ku="eXIf",Eu="iCCP";function Iu(t,e){return"IHDR"===tp(t,e+yu,vu)}function ju(t,e){return tp(t,e+yu,vu)===Su&&tp(t,e+bu,wu.length)===wu}function Du(t,e,n){const i=tp(t,e+yu,vu);return i===Au||i===Su||i===Pu&&n}function Mu(t,e){return tp(t,e+yu,vu)===ku}function Fu(t,e){return tp(t,e+yu,vu)===Eu}function Uu(t,e){const n=[Cu,Tu],i=tp(t,e+yu,vu);return n.includes(i)}function Ru(t,e){e+=bu+wu.length+1+1;let n=0;for(;n<2&&e<t.byteLength;)0===t.getUint8(e)&&n++,e++;if(!(n<2))return e}function Ou(t,e){const n=ep(t,e);e+=n.length+1;return{profileName:n,compressionMethod:t.getUint8(e),compressedProfileOffset:e+=1}}function Lu(t,e,n,i,r,o,a,s){if(void 0===s)return[];const c=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=Nu(t,l,e),l+=i.item.itemId,n.constructionMethod=1===e||2===e?15&t.getUint16(l):void 0,l+=i.item.constructionMethod,n.dataReferenceIndex=t.getUint16(l),l+=i.item.dataReferenceIndex,n.baseOffset=Vu(t,l,i.item.baseOffset),l+=i.item.baseOffset,n.extentCount=t.getUint16(l),l+=i.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Bu(t,e,l,a),l+=i.item.extent.extentIndex,s.extentOffset=Vu(t,l,r),l+=i.item.extent.extentOffset,s.extentLength=Vu(t,l,o),l+=i.item.extent.extentLength,n.extents.push(s)}c.push(n)}return c}function Nu(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}function Bu(t,e,n,i){if((1===e||2===e)&&i>0)return Vu(t,n,i)}function Vu(t,e,n){return 4===n?t.getUint32(e):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(t,e){return t.getUint32(e+4)}(t,e)):0}const qu=1165519206,zu=1835625829,_u=1970432288;function Gu(t,e){const{length:n,contentOffset:i}=function(t,e){const n=t.getUint32(e);return function(t){return 0===t}(n)?{length:t.byteLength-e,contentOffset:e+4+4}:function(t){return 1===t}(n)&&function(t,e){return 0===t.getUint32(e+8)}(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:n,contentOffset:e+4+4}}(t,e);if(n<8)return;const r=t.getUint32(e+4);if(1718909296===r)return function(t,e,n){return{type:"ftyp",majorBrand:tp(t,e,4),length:n}}(t,i,n);if(1768977008===r)return function(t,e,n,i){return{type:"iprp",subBoxes:Xu(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1768973167===r)return function(t,e,n,i){return{type:"ipco",properties:Xu(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1668246642===r)return function(t,e,n){return{type:"colr",icc:Wu(t,e),length:n}}(t,i,n);const o=t.getUint8(i);return 1835365473===r?function(t,e,n,i){return{type:"meta",subBoxes:Xu(t,n+3,i-(n+3-e)),length:i}}(t,e,i+1,n):1768714083===r?function(t,e,n,i){const{offsets:r,sizes:o}=function(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):2===t&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===t||2===t?2:0;const i={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return i.itemCount=e+2,i.items=i.itemCount+n.itemCount,i.item={itemId:0},i.item.constructionMethod=i.item.itemId+n.item.itemId,i.item.dataReferenceIndex=i.item.constructionMethod+n.item.constructionMethod,{offsets:i,sizes:n}}(e,n+3),a=t.getUint8(r.offsetSize)>>4;o.item.extent.extentOffset=a;const s=15&t.getUint8(r.lengthSize);o.item.extent.extentLength=s;const c=t.getUint8(r.baseOffsetSize)>>4;o.item.baseOffset=c;const l=function(t,e,n){if(1===n||2===n)return 15&t.getUint8(e)}(t,r.indexSize,e);o.item.extent.extentIndex=void 0!==l?l:0;const p=function(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}(t,r.itemCount,e);return{type:"iloc",items:Lu(t,e,r,o,a,s,l,p),length:i}}(t,o,i+1,n):1768517222===r?function(t,e,n,i,r){const{offsets:o}=function(t,e){const n={entryCount:e+3},i={};return i.entryCount=0===t?2:4,n.itemInfos=n.entryCount+i.entryCount,{offsets:n}}(n,i);return{type:"iinf",itemInfos:Xu(t,o.itemInfos,r-(o.itemInfos-e)),length:r}}(t,e,o,i+1,n):1768842853===r?function(t,e,n,i,r){i+=3;const o={type:"infe",length:r};return(0===n||1===n)&&(o.itemId=t.getUint16(i),i+=2,o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemName=ep(t,i),i+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=t.getUint16(i),i+=2):3===n&&(o.itemId=t.getUint32(i),i+=4),o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemType=t.getUint32(i),i+=4,o.itemName=ep(t,i),i+=o.itemName.length+1,o.itemType===zu?(o.contentType=ep(t,i),i+=o.contentType.length+1,e+r>i&&(o.contentEncoding=ep(t,i),i+=o.contentEncoding.length+1)):o.itemType===_u&&(o.itemUri=ep(t,i),i+=o.itemUri.length+1)),o}(t,e,o,i+1,n):{type:void 0,length:n}}function $u(t){{const e={},n=function(t){let e=0;for(;e+4+4<=t.byteLength;){const n=Gu(t,e);if(void 0===n)break;if("meta"===n.type)return n;e+=n.length}}(t);return n?(e.tiffHeaderOffset=function(t,e){try{const n=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===qu)}(e).itemId,i=Hu(e,n);return function(t,e){return e+4+t.getUint32(e)}(t,i.baseOffset+i.extents[0].extentOffset)}catch{return}}(t,n),e.xmpChunks=function(t){try{const e=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===zu&&"application/rdf+xml"===t.contentType)}(t).itemId,n=Hu(t,e),i=Hu(t,e).extents[0];return[{dataOffset:n.baseOffset+i.extentOffset,length:i.extentLength}]}catch{return}}(n),e.iccChunks=function(t){try{const e=t.subBoxes.find(t=>"iprp"===t.type).subBoxes.find(t=>"ipco"===t.type).properties.find(t=>"colr"===t.type).icc;if(e)return[e]}catch{}}(n),e.hasAppMarkers=void 0!==e.tiffHeaderOffset||void 0!==e.xmpChunks||void 0!==e.iccChunks,e):{hasAppMarkers:!1}}}function Hu(t,e){return t.subBoxes.find(t=>"iloc"===t.type).items.find(t=>t.itemId===e)}function Wu(t,e){const n=tp(t,e,4);if("prof"===n||"rICC"===n)return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function Xu(t,e,n){const i=[qu,zu],r=[];let o=e;for(;o<e+n;){const e=Gu(t,o);if(void 0===e)break;void 0!==e.type&&(void 0===e.itemType||-1!==i.indexOf(e.itemType))&&r.push(e),o+=e.length}return r}const Yu={isHeicFile:function(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Gu(t,0);return n&&-1!==e.indexOf(n.majorBrand)}catch{return!1}},findHeicOffsets:function(t){return $u(t)}};const Ku={isAvifFile:function(t){if(!t)return!1;try{const e=Gu(t,0);return e&&"avif"===e.majorBrand}catch{return!1}},findAvifOffsets:function(t){return $u(t)}};const Zu={isWebpFile:function(t){const e="RIFF",n="WEBP";return!!t&&tp(t,0,4)===e&&tp(t,8,4)===n},findOffsets:function(t){const e="Exif\0\0";let n,i,r,o,a=12,s=!1;for(;a+8<t.byteLength;){const c=tp(t,a,4),l=t.getUint32(a+4,!0);"EXIF"===c?(s=!0,n=tp(t,a+8,6)===e?a+8+6:a+8):"XMP "===c?(s=!0,i=[{dataOffset:a+8,length:l}]):"ICCP"===c?(s=!0,r=[{offset:a+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(s=!0,o=a+8),a+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:i,iccChunks:r,vp8xChunkOffset:o}}};const Qu={isGifFile:function(t){return!!t&&td.includes(tp(t,0,Ju))},findOffsets:function(){return{gifHeaderOffset:0}}},Ju=6,td=["GIF87a","GIF89a"];const ed={isXMLFile:function(t){return!!t&&tp(t,nd,id.length)===id},findOffsets:function(t){const e=[];return e.push({dataOffset:nd,length:t.byteLength}),{xmpChunks:e}}},nd=0,id="<?xpacket begin";const rd={parseAppMarkers:function(t,e){if(yp.isTiffFile(t))return od(yp.findTiffOffsets(),"tiff","TIFF");if(bp.isJpegFile(t))return od(bp.findJpegOffsets(t),"jpeg","JPEG");if(mu.isPngFile(t))return od(mu.findPngOffsets(t,e),"png","PNG");if(Yu.isHeicFile(t))return od(Yu.findHeicOffsets(t),"heic","HEIC");if(Ku.isAvifFile(t))return od(Ku.findAvifOffsets(t),"avif","AVIF");if(Zu.isWebpFile(t))return od(Zu.findOffsets(t),"webp","WebP");if(Qu.isGifFile(t))return od(Qu.findOffsets(t),"gif","GIF");if(ed.isXMLFile(t))return od(ed.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}};function od(t,e,n){return op({},t,{fileType:{value:e,description:n}})}const ad={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace:t=>1===t?"sRGB":65535===t?"Uncalibrated":"Unknown",ComponentsConfiguration:t=>t.map(t=>49===t?"Y":50===t?"Cb":51===t?"Cr":52===t?"R":53===t?"G":54===t?"B":void 0).join(""),Contrast:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",CustomRendered:t=>0===t?"Normal process":1===t?"Custom process":"Unknown",ExposureMode:t=>0===t?"Auto exposure":1===t?"Manual exposure":2===t?"Auto bracket":"Unknown",ExposureProgram:t=>0===t?"Undefined":1===t?"Manual":2===t?"Normal program":3===t?"Aperture priority":4===t?"Shutter priority":5===t?"Creative program":6===t?"Action program":7===t?"Portrait mode":8===t?"Landscape mode":9===t?"Bulb":"Unknown",ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return 0!==t[0]?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit:t=>2===t?"inches":3===t?"centimeters":4===t?"millimeters":"Unknown",LightSource:t=>1===t?"Daylight":2===t?"Fluorescent":3===t?"Tungsten (incandescent light)":4===t?"Flash":9===t?"Fine weather":10===t?"Cloudy weather":11===t?"Shade":12===t?"Daylight fluorescent (D 5700 – 7100K)":13===t?"Day white fluorescent (N 4600 – 5400K)":14===t?"Cool white fluorescent (W 3900 – 4500K)":15===t?"White fluorescent (WW 3200 – 3700K)":17===t?"Standard light A":18===t?"Standard light B":19===t?"Standard light C":20===t?"D55":21===t?"D65":22===t?"D75":23===t?"D50":24===t?"ISO studio tungsten":255===t?"Other light source":"Unknown",MeteringMode:t=>1===t?"Average":2===t?"CenterWeightedAverage":3===t?"Spot":4===t?"MultiSpot":5===t?"Pattern":6===t?"Partial":255===t?"Other":"Unknown",ResolutionUnit:t=>2===t?"inches":3===t?"centimeters":"Unknown",Saturation:t=>0===t?"Normal":1===t?"Low saturation":2===t?"High saturation":"Unknown",FocalLengthIn35mmFilm:t=>0===t?"Unknown":t+" mm",SceneCaptureType:t=>0===t?"Standard":1===t?"Landscape":2===t?"Portrait":3===t?"Night scene":"Unknown",Sharpness:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance:t=>0===t?"Auto white balance":1===t?"Manual white balance":"Unknown",XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},sd={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[t]||"Unknown")},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[t]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[t]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"}[t]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>1===t?"top-left":2===t?"top-right":3===t?"bottom-right":4===t?"bottom-left":5===t?"left-top":6===t?"right-top":7===t?"right-bottom":8===t?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:ad.XResolution},283:{name:"YResolution",description:ad.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[t]||"Unknown")},296:{name:"ResolutionUnit",description:ad.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"}[t]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[t]||"Unknown")},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(t=>e[t]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(t=>""+t[0]/t[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>1===t?"centered":2===t?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(t=>""+t[0]/t[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:cd},40092:{name:"XPComment",description:cd},40093:{name:"XPAuthor",description:cd},40094:{name:"XPKeywords",description:cd},40095:{name:"XPSubject",description:cd},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"}[t]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:ad.LightSource},50779:{name:"CalibrationIlluminant2",description:ad.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[t]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[t]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"}[t]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function cd(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const ld={33434:{name:"ExposureTime",description:ad.ExposureTime},33437:{name:"FNumber",description:ad.FNumber},34850:{name:"ExposureProgram",description:ad.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[t]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>fp(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ad.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ad.ShutterSpeedValue},37378:{name:"ApertureValue",description:ad.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:ad.MeteringMode},37384:{name:"LightSource",description:ad.LightSource},37385:{name:"Flash",description:t=>0===t?"Flash did not fire":1===t?"Flash fired":5===t?"Strobe return light not detected":7===t?"Strobe return light detected":9===t?"Flash fired, compulsory flash mode":13===t?"Flash fired, compulsory flash mode, return light not detected":15===t?"Flash fired, compulsory flash mode, return light detected":16===t?"Flash did not fire, compulsory flash mode":24===t?"Flash did not fire, auto mode":25===t?"Flash fired, auto mode":29===t?"Flash fired, auto mode, return light not detected":31===t?"Flash fired, auto mode, return light detected":32===t?"No flash function":65===t?"Flash fired, red-eye reduction mode":69===t?"Flash fired, red-eye reduction mode, return light not detected":71===t?"Flash fired, red-eye reduction mode, return light detected":73===t?"Flash fired, compulsory flash mode, red-eye reduction mode":77===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===t?"Flash fired, auto mode, red-eye reduction mode":93===t?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===t?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:ad.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[t]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>2===t.length?`Location; X: ${t[0]}, Y: ${t[1]}`:3===t.length?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:4===t.length?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:mp},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(t=>String.fromCharCode(t)).join("")},40961:{name:"ColorSpace",description:ad.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:ad.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>1===t?"Undefined":2===t?"One-chip color area sensor":3===t?"Two-chip color area sensor":4===t?"Three-chip color area sensor":5===t?"Color sequential area sensor":7===t?"Trilinear sensor":8===t?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>3===t?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>1===t?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:ad.CustomRendered},41986:{name:"ExposureMode",description:ad.ExposureMode},41987:{name:"WhiteBalance",description:ad.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>0===t[0]?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:ad.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:ad.SceneCaptureType},41991:{name:"GainControl",description:t=>0===t?"None":1===t?"Low gain up":2===t?"High gain up":3===t?"Low gain down":4===t?"High gain down":"Unknown"},41992:{name:"Contrast",description:ad.Contrast},41993:{name:"Saturation",description:ad.Saturation},41994:{name:"Sharpness",description:ad.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>1===t?"Macro":2===t?"Close view":3===t?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=`${parseFloat((t[0][0]/t[0][1]).toFixed(5))}-${parseFloat((t[1][0]/t[1][1]).toFixed(5))} mm`;if(0===t[3][1])return`${e} f/?`;const n=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${e} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[t]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},pd={0:{name:"GPSVersionID",description:t=>2===t[0]&&2===t[1]&&0===t[2]&&0===t[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:hp},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:hp},5:{name:"GPSAltitudeRef",description:t=>0===t?"Sea level":1===t?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([t,e])=>{const n=t/e;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return"A"===e?"Measurement in progress":"V"===e?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return"2"===e?"2-dimensional measurement":"3"===e?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers per hour":"M"===e?"Miles per hour":"N"===e?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers":"M"===e?"Miles":"N"===e?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:mp},28:{name:"GPSAreaInformation",description:mp},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>0===t?"Measurement without differential correction":1===t?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},ud={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>fp(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},dd={45056:{name:"MPFVersion",description:t=>fp(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},fd=op({},sd,ld),md="0th",hd="1st",gd="exif",vd="gps",xd="interoperability",yd="mpf",bd="canon",wd="pentax",Ad={[md]:fd,[hd]:sd,[gd]:fd,[vd]:pd,[xd]:ud,[yd]:dd,[bd]:{4:{name:"ShotInfo",description:t=>t}},[wd]:{0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"}},Sd={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Pd={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Cd={getAsciiValue:function(t){return t.map(t=>String.fromCharCode(t))},getByteAt:Td,getAsciiAt:function(t,e){return t.getUint8(e)},getShortAt:function(t,e,n){return t.getUint16(e,n===xp.LITTLE_ENDIAN)},getLongAt:kd,getRationalAt:function(t,e,n){return[kd(t,e,n),kd(t,e+4,n)]},getUndefinedAt:function(t,e){return Td(t,e)},getSlongAt:Ed,getSrationalAt:function(t,e,n){return[Ed(t,e,n),Ed(t,e+4,n)]},getIfdPointerAt:function(t,e,n){return kd(t,e,n)},typeSizes:Sd,tagTypes:Pd,getTypeSize:function(t){if(void 0===Pd[t])throw new Error("No such type found.");return Sd[Pd[t]]}};function Td(t,e){return t.getUint8(e)}function kd(t,e,n){return t.getUint32(e,n===xp.LITTLE_ENDIAN)}function Ed(t,e,n){return t.getInt32(e,n===xp.LITTLE_ENDIAN)}const Id={1:Cd.getByteAt,2:Cd.getAsciiAt,3:Cd.getShortAt,4:Cd.getLongAt,5:Cd.getRationalAt,7:Cd.getUndefinedAt,9:Cd.getSlongAt,10:Cd.getSrationalAt,13:Cd.getIfdPointerAt};function jd(t,e,n){return e+Cd.getLongAt(t,e+4,n)}function Dd(t,e,n,i,r,o){const a=Cd.getTypeSize("SHORT"),s={},c=function(t,e,n){return e+Cd.getTypeSize("SHORT")<=t.byteLength?Cd.getShortAt(t,e,n):0}(t,i,r);i+=a;for(let a=0;a<c&&!(i+12>t.byteLength);a++){const a=Md(t,e,n,i,r,o);void 0!==a&&(s[a.name]={id:a.id,value:a.value,description:a.description},("MakerNote"===a.name||e===wd&&"LevelInfo"===a.name)&&(s[a.name].__offset=a.__offset)),i+=12}if(i<t.byteLength-Cd.getTypeSize("LONG")){const a=Cd.getLongAt(t,i,r);0!==a&&e===md&&(s.Thumbnail=Dd(t,"1st",n,n+a,r,o))}return s}function Md(t,e,n,i,r,o){const a=Cd.getTypeSize("SHORT"),s=a+Cd.getTypeSize("SHORT"),c=s+Cd.getTypeSize("LONG"),l=Cd.getShortAt(t,i,r),p=Cd.getShortAt(t,i+a,r),u=Cd.getLongAt(t,i+s,r);let d,f;if(void 0===Cd.typeSizes[p]||!o&&void 0===Ad[e][l])return;if(function(t,e){return Cd.typeSizes[t]*e<=Cd.getTypeSize("LONG")}(p,u))f=i+c,d=Fd(t,f,p,u,r);else if(f=Cd.getLongAt(t,i+c,r),function(t,e,n,i,r){return e+n+Cd.typeSizes[i]*r<=t.byteLength}(t,n,f,p,u)){d=Fd(t,n+f,p,u,r,33723===l)}else d="<faulty value>";p===Cd.tagTypes.ASCII&&(d=function(t){const e=[];let n=0;for(let i=0;i<t.length;i++)"\0"!==t[i]?(void 0===e[n]&&(e[n]=""),e[n]+=t[i]):n++;return e}(d),d=function(t){try{return t.map(t=>decodeURIComponent(escape(t)))}catch{return t}}(d));let m=`undefined-${l}`,h=d;if(void 0!==Ad[e][l])if(void 0!==Ad[e][l].name&&void 0!==Ad[e][l].description){m=Ad[e][l].name;try{h=Ad[e][l].description(d)}catch{h=Ud(d)}}else p===Cd.tagTypes.RATIONAL||p===Cd.tagTypes.SRATIONAL?(m=Ad[e][l],h=""+d[0]/d[1]):(m=Ad[e][l],h=Ud(d));return{id:l,name:m,value:d,description:h,__offset:f}}function Fd(t,e,n,i,r,o=!1){let a=[];o&&(i*=Cd.typeSizes[n],n=Cd.tagTypes.BYTE);for(let o=0;o<i;o++)a.push(Id[n](t,e,r)),e+=Cd.typeSizes[n];return n===Cd.tagTypes.ASCII?a=Cd.getAsciiValue(a):1===a.length&&(a=a[0]),a}function Ud(t){return t instanceof Array?t.join(", "):t}const Rd="Exif IFD Pointer",Od="GPS Info IFD Pointer",Ld="Interoperability IFD Pointer",Nd={read:function(t,e,n){const i=xp.getByteOrder(t,e);let r=function(t,e,n,i){return Dd(t,md,e,jd(t,e,n),n,i)}(t,e,i,n);return r=function(t,e,n,i,r){return void 0!==t[Rd]?op(t,Dd(e,gd,n,n+t[Rd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Od]?op(t,Dd(e,vd,n,n+t[Od].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Ld]?op(t,Dd(e,xd,n,n+t[Ld].value,i,r)):t}(r,t,e,i,n),{tags:r,byteOrder:i}}};const Bd={read:function(t,e,n){const i=xp.getByteOrder(t,e),r=Dd(t,"mpf",e,jd(t,e,i),i,n);return function(t,e,n,i){if(!n.MPEntry)return n;const r=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Vd);o++){r[o]={};const a=qd(n.MPEntry.value,o*Vd,Cd.getTypeSize("LONG"),i);r[o].ImageFlags=zd(a),r[o].ImageFormat=_d(a),r[o].ImageType=Gd(a);const s=qd(n.MPEntry.value,o*Vd+4,Cd.getTypeSize("LONG"),i);r[o].ImageSize={value:s,description:""+s};const c=$d(o,n.MPEntry,i,e);r[o].ImageOffset={value:c,description:""+c};const l=qd(n.MPEntry.value,o*Vd+12,Cd.getTypeSize("SHORT"),i);r[o].DependentImage1EntryNumber={value:l,description:""+l};const p=qd(n.MPEntry.value,o*Vd+14,Cd.getTypeSize("SHORT"),i);r[o].DependentImage2EntryNumber={value:p,description:""+p},r[o].image=t.buffer.slice(c,c+s),ap(r[o],"base64",function(){return sp(this.image)})}return n.Images=r,n}(t,e,r,i)}},Vd=16;function qd(t,e,n,i){if(i===xp.LITTLE_ENDIAN){let i=0;for(let r=0;r<n;r++)i+=t[e+r]<<8*r;return i}let r=0;for(let i=0;i<n;i++)r+=t[e+i]<<8*(n-1-i);return r}function zd(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function _d(t){const e=t>>24&7;return{value:e,description:0===e?"JPEG":"Unknown"}}function Gd(t){const e=16777215&t;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function $d(t,e,n,i){return function(t){return 0===t}(t)?0:qd(e.value,t*Vd+8,Cd.getTypeSize("LONG"),n)+i}const Hd={read:function(t,e){const n=function(t,e){return Cd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(8>n)return;const i=Cd.getByteAt(t,e+7);return{value:i,description:""+i}}(t,e,n);return{"Bits Per Sample":Wd(t,e,n),"Image Height":Xd(t,e,n),"Image Width":Yd(t,e,n),"Color Components":i,Subsampling:i&&Kd(t,e,i.value,n)}}};function Wd(t,e,n){if(3>n)return;const i=Cd.getByteAt(t,e+2);return{value:i,description:""+i}}function Xd(t,e,n){if(5>n)return;const i=Cd.getShortAt(t,e+3);return{value:i,description:`${i}px`}}function Yd(t,e,n){if(7>n)return;const i=Cd.getShortAt(t,e+5);return{value:i,description:`${i}px`}}function Kd(t,e,n,i){if(8+3*n>i)return;const r=[];for(let i=0;i<n;i++){const n=e+8+3*i;r.push([Cd.getByteAt(t,n),Cd.getByteAt(t,n+1),Cd.getByteAt(t,n+2)])}return{value:r,description:r.length>1?Zd(r)+Qd(r):""}}function Zd(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(t=>e[t[0]]).join("")}function Qd(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===t.length||void 0===t[0][1]||void 0===e[t[0][1]]?"":e[t[0][1]]}const Jd={read:function(t,e){const n=function(t,e){return Cd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(15>n)return;const i=Cd.getByteAt(t,e+14);return{value:i,description:`${i}px`}}(t,e,n),r=function(t,e,n){if(16>n)return;const i=Cd.getByteAt(t,e+15);return{value:i,description:`${i}px`}}(t,e,n),o={"JFIF Version":tf(t,e,n),"Resolution Unit":ef(t,e,n),XResolution:rf(t,e,n),YResolution:of(t,e,n),"JFIF Thumbnail Width":i,"JFIF Thumbnail Height":r};if(void 0!==i&&void 0!==r){const a=function(t,e,n,i){return 0===n||16+n>i?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}(t,e,3*i.value*r.value,n);a&&(o["JFIF Thumbnail"]=a)}for(const t in o)void 0===o[t]&&delete o[t];return o}};function tf(t,e,n){if(9>n)return;const i=Cd.getByteAt(t,e+7),r=Cd.getByteAt(t,e+7+1);return{value:256*i+r,description:i+"."+r}}function ef(t,e,n){if(10>n)return;const i=Cd.getByteAt(t,e+9);return{value:i,description:nf(i)}}function nf(t){return 0===t?"None":1===t?"inches":2===t?"cm":"Unknown"}function rf(t,e,n){if(12>n)return;const i=Cd.getShortAt(t,e+10);return{value:i,description:""+i}}function of(t,e,n){if(14>n)return;const i=Cd.getShortAt(t,e+12);return{value:i,description:""+i}}const af={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:sf},336:{name:"Time Sent",description:cf},346:{name:"Coded Character Set",description:lf,encoding_name:lf},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>"01"===fp(t)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=fp(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=fp(t);return"01"===e?"Object Kill":"02"===e?"Object Replace":"03"===e?"Object Append":"04"===e?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:sf},572:{name:"Time Created",description:cf},574:{name:"Digital Creation Date",description:sf},575:{name:"Digital Creation Time",description:cf},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=fp(t);return"a"===e?"morning":"p"===e?"evening":"b"===e?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=fp(t);return"P"===e?"Portrait":"L"===e?"Landscape":"S"===e?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=fp(t),n=e.charAt(0),i=e.charAt(1);let r="";return"1"===n?r+="Mono":"2"===n&&(r+="Stereo"),"A"===i?r+=", actuality":"C"===i?r+=", question and answer session":"M"===i?r+=", music, transmitted by itself":"Q"===i?r+=", response to a question":"R"===i?r+=", raw sound":"S"===i?r+=", scener":"V"===i?r+=", voicer":"W"===i&&(r+=", wrap"),""!==r?r:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(fp(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(fp(t),10);return e+(1===e?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=fp(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>2===t.length?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(2===t.length){const e=(t[0]<<8)+t[1];return 0===e?"No ObjectData":1===e?"IPTC-NAA Digital Newsphoto Parameter Record":2===e?"IPTC7901 Recommended Message Format":3===e?"Tagged Image File Format (Adobe/Aldus Image data)":4===e?"Illustrator (Adobe Graphics data)":5===e?"AppleSingle (Apple Computer Inc)":6===e?"NAA 89-3 (ANPA 1312)":7===e?"MacBinary II":8===e?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===e?"United Press International ANPA 1312 variant":10===e?"United Press International Down-Load Message":11===e?"JPEG File Interchange (JFIF)":12===e?"Photo-CD Image-Pac (Eastman Kodak)":13===e?"Microsoft Bit Mapped Graphics File [*.BMP]":14===e?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===e?"Audio plus Moving Video [*.AVI] (Microsoft)":16===e?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===e?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===e?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===e?"RIFF Wave (Microsoft Corporation)":20===e?"Freehand (Macromedia/Aldus)":21===e?'Hypertext Markup Language "HTML" (The Internet Society)':22===e?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===e?"MPEG 2 Audio Layer 3, ISO/IEC":24===e?"Portable Document File (*.PDF) Adobe":25===e?"News Industry Text Format (NITF)":26===e?"Tape Archive (*.TAR)":27===e?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===e?"Ritzaus Bureau NITF version (RBNITF DTD)":29===e?"Corel Draw [*.CDR]":`Unknown format ${e}`}return fp(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},i=fp(t);if(e["ObjectData Preview File Format"]){const t=fp(e["ObjectData Preview File Format"].value);if(n[t]&&n[t][i])return n[t][i]}return i}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function sf(t){const e=fp(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function cf(t){const e=fp(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),11===e.length&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function lf(t){const e=fp(t);return"%G"===e?"UTF-8":"%5"===e?"Windows-1252":"%/G"===e?"UTF-8 Level 1":"%/H"===e?"UTF-8 Level 2":"%/I"===e?"UTF-8 Level 3":"/A"===e?"ISO-8859-1":"/B"===e?"ISO-8859-2":"/C"===e?"ISO-8859-3":"/D"===e?"ISO-8859-4":"/@"===e?"ISO-8859-5":"/G"===e?"ISO-8859-6":"/F"===e?"ISO-8859-7":"/H"===e?"ISO-8859-8":"Unknown"}const pf={get:function(){if(typeof TextDecoder<"u")return TextDecoder}};const uf={decode:function(t,e){const n=pf.get();if(typeof n<"u"&&void 0!==t)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const i=e.map(t=>String.fromCharCode(t)).join("");return function(t){try{return decodeURIComponent(escape(t))}catch{return t}}(i)},TAG_HEADER_SIZE:5};const df={read:function(t,e,n){try{if(Array.isArray(t))return gf(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:i,dataOffset:r}=function(t,e){for(;e+12<=t.byteLength;){const n=ff(t,e);if(mf(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+hf(n)}throw new Error("No IPTC NAA resource block.")}(t,e);return gf(t,i,r,n)}catch{return{}}}};function ff(t,e){if(943868237!==t.getUint32(e,!1))throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+4+2),i=(n%2==0?n+1:n)+1;return{headerSize:6+i+4,type:t.getUint16(e+4),size:t.getUint32(e+4+2+i)}}function mf(t){return 1028===t.type}function hf(t){return t.size%2!=0?1:0}function gf(t,e,n,i){const r={};let o;const a=n+e.size;for(;n<a&&n<t.byteLength;){const{tag:e,tagSize:a}=vf(t,n,r,o,i);if(null===e)break;e&&("encoding"in e&&(o=e.encoding),void 0===r[e.name]||void 0===e.repeatable?r[e.name]={id:e.id,value:e.value,description:e.description}:(r[e.name]instanceof Array||(r[e.name]=[{id:r[e.name].id,value:r[e.name].value,description:r[e.name].description}]),r[e.name].push({id:e.id,value:e.value,description:e.description}))),n+=5+a}return r}function vf(t,e,n,i,r){if(function(t,e){return 28!==t.getUint8(e)}(t,e))return{tag:null,tagSize:0};const o=t.getUint16(e+1),a=t.getUint16(e+3);if(!r&&!af.iptc[o])return{tag:void 0,tagSize:a};const s=function(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t.getUint8(e+r));return i}(t,e+5,a),c={id:o,name:xf(af.iptc[o],o,s),value:s,description:yf(af.iptc[o],s,n,i)};return function(t){return af.iptc[t]&&af.iptc[t].repeatable}(o)&&(c.repeatable=!0),function(t){return af.iptc[t]&&void 0!==af.iptc[t].encoding_name}(o)&&(c.encoding=af.iptc[o].encoding_name(s)),{tag:c,tagSize:a}}function xf(t,e,n){return t?function(t){return"string"==typeof t}(t)?t:function(t){return"function"==typeof t.name}(t)?t.name(n):t.name:`undefined-${e}`}function yf(t,e,n,i){if(function(t){return t&&void 0!==t.description}(t))try{return t.description(e,n)}catch{}return function(t,e){return t&&e instanceof Array}(t,e)?uf.decode(i,e):e}const bf={"tiff:Orientation":t=>"1"===t?"Horizontal (normal)":"2"===t?"Mirror horizontal":"3"===t?"Rotate 180":"4"===t?"Mirror vertical":"5"===t?"Mirror horizontal and rotate 270 CW":"6"===t?"Rotate 90 CW":"7"===t?"Mirror horizontal and rotate 90 CW":"8"===t?"Rotate 270 CW":t,"tiff:ResolutionUnit":t=>ad.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>wf(ad.XResolution,t),"tiff:YResolution":t=>wf(ad.YResolution,t),"exif:ApertureValue":t=>wf(ad.ApertureValue,t),"exif:GPSLatitude":Sf,"exif:GPSLongitude":Sf,"exif:FNumber":t=>wf(ad.FNumber,t),"exif:FocalLength":t=>wf(ad.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>ad.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>ad.ColorSpace(function(t){return"0x"===t.substring(0,2)?parseInt(t.substring(2),16):parseInt(t,10)}(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const t=e.split(", ").map(t=>t.charCodeAt(0));return ad.ComponentsConfiguration(t)}return e},"exif:Contrast":t=>ad.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>ad.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>ad.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>ad.ExposureProgram(parseInt(t,10)),"exif:ExposureTime":t=>Af(t)?ad.ExposureTime(t.split("/").map(t=>parseInt(t,10))):t,"exif:MeteringMode":t=>ad.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>ad.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>ad.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>ad.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>wf(ad.ShutterSpeedValue,t),"exif:WhiteBalance":t=>ad.WhiteBalance(parseInt(t,10))};function wf(t,e){return Af(e)?t(e.split("/")):e}function Af(t){return/^-?\d+\/-?\d+$/.test(t)}function Sf(t){const[e,n]=t.split(",");if(void 0!==e&&void 0!==n){const t=parseFloat(e),i=parseFloat(n),r=n.charAt(n.length-1);if(!Number.isNaN(t)&&!Number.isNaN(i))return""+(t+i/60)+r}return t}const Pf={get:function(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}};function Cf(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],i=function(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let i;for(;null!==(i=n.exec(t));)-1===e.indexOf(i[1])&&e.push(i[1]);return e}(t),r=function(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];"xmlns"===t||"xml"===t||-1===e.indexOf(t)&&e.push(t)}return e}(t).filter(t=>-1===i.indexOf(t));if(0===r.length)return t;const o=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Tf[i]||"http://fallback.namespace/"+i;e.push(" xmlns:"+i+'="'+r+'"')}return e.join("")}(r);return function(t,e,n){const i=new RegExp("<"+e+"([^>]*)>");return t.replace(i,"<"+e+"$1"+n+">")}(t,n,o)}const Tf={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};const kf={read:function(t,e,n){const i={};if("string"==typeof t)return jf(i,t,n),i;const[r,o]=function(t,e){if(0===e.length)return[];const n=[If(t,e.slice(0,1))];return e.length>1&&n.push(If(t,e.slice(1))),n}(t,e),a=jf(i,r,n);if(o){const r=jf(i,o,n);!a&&!r&&(delete i._raw,jf(i,If(t,e),n))}return i}};class Ef extends Error{constructor(t){super(t),this.name="ParseError"}}function If(t,e){const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;for(let n=0;n<e.length;n++){const o=e[n],a=t.buffer.slice(o.dataOffset,o.dataOffset+o.length);i.set(new Uint8Array(a),r),r+=o.length}return new DataView(i.buffer)}function jf(t,e,n){try{const{doc:i,raw:r}=function(t,e){const n=Pf.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const i="string"==typeof t?t:tp(t,0,t.byteLength);return{doc:Mf(n,Df(i)),raw:i}}(e,n);t._raw=(t._raw||"")+r;return op(t,Of(Uf(Ff(i),!0))),!0}catch{return!1}}function Df(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function Mf(t,e,n=!1){try{const n=t.parseFromString(e,"application/xml"),i=n.getElementsByTagName("parsererror");if(i.length>0)throw new Ef(i[0].textContent);return n}catch(i){if("ParseError"===i.name&&function(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}(i)&&!n)return Mf(t,Cf(e),!0);throw i}}function Ff(t){for(let e=0;e<t.childNodes.length;e++){if("x:xmpmeta"===t.childNodes[e].tagName)return Ff(t.childNodes[e]);if("rdf:RDF"===t.childNodes[e].tagName)return t.childNodes[e]}throw new Error}function Uf(t,e=!1){const n=function(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}(t);return function(t){return 1===t.length&&"#text"===t[0].nodeName}(n)?e?{}:function(t){return t.nodeValue}(n[0]):function(t){const e={};return t.forEach(t=>{if(function(t){return t.nodeName&&"#text"!==t.nodeName}(t)){const n=function(t){return{attributes:Rf(t),value:Uf(t)}}(t);void 0!==e[t.nodeName]?(Array.isArray(e[t.nodeName])||(e[t.nodeName]=[e[t.nodeName]]),e[t.nodeName].push(n)):e[t.nodeName]=n}}),e}(n)}function Rf(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function Of(t){const e={};if("string"==typeof t)return t;for(const n in t){let i=t[n];Array.isArray(i)||(i=[i]),i.forEach(t=>{op(e,Lf(t.attributes)),"object"==typeof t.value&&op(e,_f(t.value))})}return e}function Lf(t){const e={};for(const n in t)try{Nf(n)&&(e[Vf(n)]={value:t[n],attributes:{},description:qf(t[n],n)})}catch{}return e}function Nf(t){return"rdf:parseType"!==t&&!Bf(t)}function Bf(t){return"xmlns"===t.split(":")[0]}function Vf(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function qf(t,e=void 0){if(Array.isArray(t)){const n=function(t){return t.map(t=>void 0!==t.value?qf(t.value):qf(t)).join(", ")}(t);return e&&"function"==typeof bf[e]?bf[e](t,n):n}if("object"==typeof t)return function(t){const e=[];for(const n in t)e.push(`${zf(n)}: ${qf(t[n].value)}`);return e.join("; ")}(t);try{return e&&"function"==typeof bf[e]?bf[e](t):decodeURIComponent(escape(t))}catch{return t}}function zf(t){return"CiAdrCity"===t?"CreatorCity":"CiAdrCtry"===t?"CreatorCountry":"CiAdrExtadr"===t?"CreatorAddress":"CiAdrPcode"===t?"CreatorPostalCode":"CiAdrRegion"===t?"CreatorRegion":"CiEmailWork"===t?"CreatorWorkEmail":"CiTelWork"===t?"CreatorWorkPhone":"CiUrlWork"===t?"CreatorWorkUrl":t}function _f(t){const e={};for(const n in t)try{Bf(n)||(e[Vf(n)]=Gf(t[n],n))}catch{}return e}function Gf(t,e){return function(t){return Array.isArray(t)}(t)?function(t,e){return Jf(t[t.length-1],e)}(t,e):function(t){return"Resource"===t.attributes["rdf:parseType"]&&"string"==typeof t.value&&""===t.value.trim()}(t)?{value:"",attributes:{},description:""}:$f(t)?Hf(t,e):Xf(t)?Yf(t,e):Kf(t)?Zf(t,e):function(t){return void 0!==Qf(t.value)}(t)?function(t,e){let n=Qf(t.value).value["rdf:li"];const i=Wf(t),r=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach(t=>{r.push(function(t){return $f(t)?Hf(t):Xf(t)?Yf(t).value:Kf(t)?Zf(t).value:Jf(t)}(t))}),{value:r,attributes:i,description:qf(r,e)}}(t,e):Jf(t,e)}function $f(t){return"Resource"===t.attributes["rdf:parseType"]&&void 0!==t.value["rdf:value"]||void 0!==t.value["rdf:Description"]&&void 0!==t.value["rdf:Description"].value["rdf:value"]}function Hf(t,e){const n=Wf(t);void 0!==t.value["rdf:Description"]&&(t=t.value["rdf:Description"]),op(n,Wf(t),function(t){const e={};for(const n in t.value)"rdf:value"!==n&&!Bf(n)&&(e[Vf(n)]=t.value[n].value);return e}(t));const i=function(t){return tm(t.value["rdf:value"])||t.value["rdf:value"].value}(t);return{value:i,attributes:n,description:qf(i,e)}}function Wf(t){const e={};for(const n in t.attributes)"rdf:parseType"!==n&&"rdf:resource"!==n&&!Bf(n)&&(e[Vf(n)]=t.attributes[n]);return e}function Xf(t){return"Resource"===t.attributes["rdf:parseType"]||void 0!==t.value["rdf:Description"]&&void 0===t.value["rdf:Description"].value["rdf:value"]}function Yf(t,e){const n={value:{},attributes:{}};return void 0!==t.value["rdf:Description"]&&(op(n.value,Lf(t.value["rdf:Description"].attributes)),op(n.attributes,Wf(t)),t=t.value["rdf:Description"]),op(n.value,_f(t.value)),n.description=qf(n.value,e),n}function Kf(t){return 0===Object.keys(t.value).length&&void 0===t.attributes["xml:lang"]&&void 0===t.attributes["rdf:resource"]}function Zf(t,e){const n=Lf(t.attributes);return{value:n,attributes:{},description:qf(n,e)}}function Qf(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function Jf(t,e){const n=tm(t)||Of(t.value);return{value:n,attributes:Wf(t),description:qf(n,e)}}function tm(t){return t.attributes&&t.attributes["rdf:resource"]}const em=0,nm=1,im=2,rm=3,om=4,am=5,sm=6,cm=7,lm=8,pm={2e3:{name:"PathInformation",description:function(t){const e={},n=[];for(let i=0;i<t.byteLength;i+=26){const r=Cd.getShortAt(t,i);um[r]&&(e[r]||(e[r]=um[r].description),n.push({type:r,path:um[r].path(t,i+2)}))}return JSON.stringify({types:e,paths:n})}},2999:{name:"ClippingPathName",description(t){const[,e]=ip(t,0);return e}}};const um={[em]:{description:"Closed subpath length",path:(t,e)=>[Cd.getShortAt(t,e)]},[nm]:{description:"Closed subpath Bezier knot, linked",path:dm},[im]:{description:"Closed subpath Bezier knot, unlinked",path:dm},[rm]:{description:"Open subpath length",path:(t,e)=>[Cd.getShortAt(t,e)]},[om]:{description:"Open subpath Bezier knot, linked",path:dm},[am]:{description:"Open subpath Bezier knot, unlinked",path:dm},[sm]:{description:"Path fill rule",path:()=>[]},[lm]:{description:"Initial fill rule",path:(t,e)=>[Cd.getShortAt(t,e)]},[cm]:{description:"Clipboard",path:function(t,e){return[[mm(t,e,8),mm(t,e+4,8),mm(t,e+8,8),mm(t,e+12,8)],mm(t,e+16,8)]}}};function dm(t,e){const n=[];for(let i=0;i<24;i+=8)n.push(fm(t,e+i));return n}function fm(t,e){const n=mm(t,e,8);return[mm(t,e+4,8),n]}function mm(t,e,n){const i=Cd.getLongAt(t,e),r=i>>>31?-1:1,o=(2130706432&i)>>>32-n,a=i&parseInt(cp("1",32-n),2);return r*function(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}(o.toString(2)+"."+function(t,e,n){return cp(n,e-t.length)+t}(a.toString(2),32-n,"0"),2)}const hm={read:function(t,e){const n=Jl(new Uint8Array(t).buffer),i={};let r=0;for(;r<t.length;){const t=tp(n,r,ym);r+=ym;const o=Cd.getShortAt(n,r);r+=vm;const{tagName:a,tagNameSize:s}=bm(n,r);r+=s;const c=Cd.getLongAt(n,r);if(r+=xm,t===gm){const t=Jl(n.buffer,r,c),s={id:o,value:tp(t,0,c)};if(pm[o]){try{s.description=pm[o].description(t)}catch{s.description="<no description formatter>"}i[a||pm[o].name]=s}else e&&(i[`undefined-${o}`]=s)}r+=c+c%2}return i}},gm="8BIM",vm=2,xm=4,ym=gm.length;function bm(t,e){const[n,i]=ip(t,e);return{tagName:i,tagNameSize:1+n+(n%2==0?1:0)}}const wm={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Am={4:{name:"Preferred CMM type",value:(t,e)=>tp(t,e,4),description:t=>null!==t?Sm(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>tp(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>tp(t,e,4)},20:{name:"Connection Space",value:(t,e)=>tp(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>function(t,e){const n=t.getUint16(e),i=t.getUint16(e+2)-1,r=t.getUint16(e+4),o=t.getUint16(e+6),a=t.getUint16(e+8),s=t.getUint16(e+10);return new Date(Date.UTC(n,i,r,o,a,s))}(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>function(t){return String.fromCharCode.apply(null,new Uint8Array(t))}(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>tp(t,e,4),description:t=>Sm(t)},48:{name:"Device Manufacturer",value:(t,e)=>tp(t,e,4),description:t=>Sm(t)},52:{name:"Device Model Number",value:(t,e)=>tp(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>tp(t,e,4)}};function Sm(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const Pm={read:function(t,e,n){return n&&e[0].compressionMethod!==lp?function(t,e){if(!function(t){return 0===t}(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return pp(n,e[0].compressionMethod,"utf-8","dataview").then(Um).catch(()=>({}))}(t,e):function(t,e){try{const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;const o=function(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}(t);for(let t=1;t<=e.length;t++){const n=e.find(e=>e.chunkNumber===t);if(!n)throw new Error(`ICC chunk ${t} not found`);const a=o.slice(n.offset,n.offset+n.length),s=new Uint8Array(a);i.set(s,r),r+=s.length}return Um(new DataView(i.buffer))}catch{return{}}}(t,e)}},Cm=84,Tm=128,km="acsp",Em="desc",Im="mluc",jm="text",Dm="sig ",Mm=12;function Fm(t,e){return t.length<e+Mm}function Um(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<Cm)throw new Error("ICC profile too short");const i={},r=Object.keys(Am);for(let e=0;e<r.length;e++){const n=r[e],o=Am[n],a=o.value(t,parseInt(n,10));let s=a;o.description&&(s=o.description(a)),i[o.name]={value:a,description:s}}if(Rm(e.slice(36,40))!==km)throw new Error("ICC profile: missing signature");if(function(t){return t.length<Tm+4}(e))return i;const o=t.getUint32(128);let a=132;for(let n=0;n<o;n++){if(Fm(e,a))return i;const n=tp(t,a,4),r=t.getUint32(a+4),o=t.getUint32(a+8);if(r>e.length)return i;const s=tp(t,r,4);if(s===Em){const a=t.getUint32(r+8);if(a>o)return i;Om(i,n,Rm(e.slice(r+12,r+a+11)))}else if(s===Im){const e=t.getUint32(r+8),o=t.getUint32(r+12);let a=r+16;const s=[];for(let n=0;n<e;n++){const e=tp(t,a+0,2),n=tp(t,a+2,2),i=t.getUint32(a+4),c=t.getUint32(a+8),l=np(t,r+c,i);s.push({languageCode:e,countryCode:n,text:l}),a+=o}if(1===e)Om(i,n,s[0].text);else{const t={};for(let e=0;e<s.length;e++)t[`${s[e].languageCode}-${s[e].countryCode}`]=s[e].text;Om(i,n,t)}}else if(s===jm){Om(i,n,Rm(e.slice(r+8,r+o-7)))}else if(s===Dm){Om(i,n,Rm(e.slice(r+8,r+12)))}a+=12}return i}function Rm(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Om(t,e,n){wm[e]?t[wm[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Lm=27,Nm={read:function(t,e,n,i,r){let o=Dd(t,bd,e,e+n,i,r);return o.ShotInfo&&(o=op({},o,function(t){const e={};return void 0!==t[Lm]&&(e.AutoRotate={value:t[Lm],description:Bm(t[Lm])}),e}(o.ShotInfo.value)),delete o.ShotInfo),o},SHOT_INFO_AUTO_ROTATE:Lm};function Bm(t){return 0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown"}const Vm={K3_III:78420},qm={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},zm={read:function(t,e,n,i){const r=xp.getByteOrder(t,e+n+8),o=e+n;let a=Dd(t,wd,o,o+10,r,i);return function(t){return t.PentaxModelID&&t.PentaxModelID.value===Vm.K3_III&&t.LevelInfo}(a)&&(a=op({},a,function(t,e,n){const i={};if(e+7>t.byteLength)return i;const r=t.getInt8(e+qm.CAMERA_ORIENTATION);i.CameraOrientation={value:r,description:_m(r)};const o=t.getInt16(e+qm.ROLL_ANGLE,n===xp.LITTLE_ENDIAN);i.RollAngle={value:o,description:Gm(o)};const a=t.getInt16(e+qm.PITCH_ANGLE,n===xp.LITTLE_ENDIAN);return i.PitchAngle={value:a,description:$m(a)},i}(t,o+a.LevelInfo.__offset,r)),delete a.LevelInfo),a},PENTAX_IFD_OFFSET:10,MODEL_ID:Vm,LIK3III:qm};function _m(t){return 0===t?"Horizontal (normal)":1===t?"Rotate 270 CW":2===t?"Rotate 180":3===t?"Rotate 90 CW":4===t?"Upwards":5===t?"Downwards":"Unknown"}function Gm(t){return""+-.5*t}function $m(t){return""+-.5*t}const Hm={read:function(t,e){return{"Image Width":Wm(t,e),"Image Height":Xm(t,e),"Bit Depth":Ym(t,e),"Color Type":Km(t,e),Compression:Zm(t,e),Filter:Qm(t,e),Interlace:Jm(t,e)}}};function Wm(t,e){if(e+0+4>t.byteLength)return;const n=Cd.getLongAt(t,e);return{value:n,description:`${n}px`}}function Xm(t,e){if(e+4+4>t.byteLength)return;const n=Cd.getLongAt(t,e+4);return{value:n,description:`${n}px`}}function Ym(t,e){if(e+8+1>t.byteLength)return;const n=Cd.getByteAt(t,e+8);return{value:n,description:`${n}`}}function Km(t,e){if(e+9+1>t.byteLength)return;const n=Cd.getByteAt(t,e+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function Zm(t,e){if(e+10+1>t.byteLength)return;const n=Cd.getByteAt(t,e+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Qm(t,e){if(e+11+1>t.byteLength)return;const n=Cd.getByteAt(t,e+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function Jm(t,e){if(e+12+1>t.byteLength)return;const n=Cd.getByteAt(t,e+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}const th={read:function(t,e,n,i){const r={},o=[];for(let a=0;a<e.length;a++){const{offset:s,length:c,type:l}=e[a],p=lh(t,s,c,l,n);if(p instanceof Promise)o.push(p.then(({name:t,value:e,description:n})=>{try{if(up&&hh(t,e))return{__exif:Nd.read(vh(e),ch,i).tags};if(dp&&gh(t,e))return{__iptc:df.read(vh(e),0,i)};if(t&&!hh(t,e)&&!gh(t,e))return{[t]:{value:e,description:n}}}catch{}return{}}));else{const{name:t,value:e,description:n}=p;t&&(r[t]={value:e,description:n})}}return{readTags:r,readTagsPromise:o.length>0?Promise.all(o):void 0}}},eh="STATE_KEYWORD",nh="STATE_COMPRESSION",ih="STATE_LANG",rh="STATE_TRANSLATED_KEYWORD",oh="STATE_TEXT",ah=1,sh=1,ch=6;function lh(t,e,n,i,r){const o=[],a=[];let s,c=eh,l=lp;for(let r=0;r<n&&e+r<t.byteLength;r++){if(c===nh){l=ph({type:i,dataView:t,offset:e+r}),i===Su&&(r+=ah),c=uh(i,c);continue}if(c===oh){s=new DataView(t.buffer.slice(e+r,e+n));break}const p=t.getUint8(e+r);0===p?c=uh(i,c):c===eh?o.push(p):c===ih&&a.push(p)}if(l!==lp&&!r)return{};const p=pp(s,l,function(t){return t===Au||t===Pu?"latin1":"utf-8"}(i));return p instanceof Promise?p.then(t=>dh(t,i,a,o)).catch(()=>dh("<text using unknown compression>".split(""),i,a,o)):dh(p,i,a,o)}function ph({type:t,dataView:e,offset:n}){if(t===Su){if(e.getUint8(n)===sh)return e.getUint8(n+1)}else if(t===Pu)return e.getUint8(n);return lp}function uh(t,e){return e===eh&&[Su,Pu].includes(t)?nh:e===nh?t===Su?ih:oh:e===ih?rh:oh}function dh(t,e,n,i){const r=function(t){return t instanceof DataView?tp(t,0,t.byteLength):t}(t);return{name:fh(e,n,i),value:r,description:e===Su?mh(t):r}}function fh(t,e,n){const i=rp(n);if(t===Au||0===e.length)return i;return`${i} (${rp(e)})`}function mh(t){return uf.decode("UTF-8",t)}function hh(t,e){return"raw profile type exif"===t.toLowerCase()&&"exif"===e.substring(1,5)}function gh(t,e){return"raw profile type iptc"===t.toLowerCase()&&"iptc"===e.substring(1,5)}function vh(t){return function(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}(t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}const xh={read:function(t,e){const n={};for(let i=0;i<e.length;i++){const r=Cd.getLongAt(t,e[i]+xu),o=tp(t,e[i]+yu,vu);o===Cu?(n["Pixels Per Unit X"]=yh(t,e[i],r),n["Pixels Per Unit Y"]=bh(t,e[i],r),n["Pixel Units"]=wh(t,e[i],r)):o===Tu&&(n["Modify Date"]=Ah(t,e[i],r))}return n}};function yh(t,e,n){if(!Sh(t,e,n,0,4))return;const i=Cd.getLongAt(t,e+bu+0);return{value:i,description:""+i}}function bh(t,e,n){if(!Sh(t,e,n,4,4))return;const i=Cd.getLongAt(t,e+bu+4);return{value:i,description:""+i}}function wh(t,e,n){if(!Sh(t,e,n,8,1))return;const i=Cd.getByteAt(t,e+bu+8);return{value:i,description:1===i?"meters":"Unknown"}}function Ah(t,e,n){if(!Sh(t,e,n,0,7))return;const i=Cd.getShortAt(t,e+bu),r=Cd.getByteAt(t,e+bu+2),o=Cd.getByteAt(t,e+bu+3),a=Cd.getByteAt(t,e+bu+4),s=Cd.getByteAt(t,e+bu+5),c=Cd.getByteAt(t,e+bu+6);return{value:[i,r,o,a,s,c],description:`${Ph(i,4)}-${Ph(r,2)}-${Ph(o,2)} ${Ph(a,2)}:${Ph(s,2)}:${Ph(c,2)}`}}function Sh(t,e,n,i,r){return i+r<=n&&e+bu+i+r<=t.byteLength}function Ph(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const Ch={read:function(t,e){const n={},i=Cd.getByteAt(t,e);return n.Alpha=function(t){const e=16&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.Animation=function(t){const e=2&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.ImageWidth=Eh(t,e+Th),n.ImageHeight=Eh(t,e+kh),n}},Th=4,kh=7;function Eh(t,e){const n=Cd.getByteAt(t,e)+256*Cd.getByteAt(t,e+1)+65536*Cd.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const Ih={read:function(t){return{"GIF Version":jh(t),"Image Width":Dh(t),"Image Height":Mh(t),"Global Color Map":Fh(t),"Bits Per Pixel":Rh(t),"Color Resolution Depth":Uh(t)}}};function jh(t){if(6>t.byteLength)return;const e=tp(t,3,3);return{value:e,description:e}}function Dh(t){if(8>t.byteLength)return;const e=t.getUint16(6,!0);return{value:e,description:`${e}px`}}function Mh(t){if(10>t.byteLength)return;const e=t.getUint16(8,!0);return{value:e,description:`${e}px`}}function Fh(t){if(11>t.byteLength)return;const e=(128&t.getUint8(10))>>>7;return{value:e,description:1===e?"Yes":"No"}}function Uh(t){if(11>t.byteLength)return;const e=((112&t.getUint8(10))>>>4)+1;return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}function Rh(t){if(11>t.byteLength)return;const e=1+(7&t.getUint8(10));return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}const Oh=[6,7,99],Lh={get:function(t,e,n){if(function(t){return t&&(void 0===t.Compression||Oh.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}(e)){e.type="image/jpeg";const i=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(i,i+e.JPEGInterchangeFormatLength.value),ap(e,"base64",function(){return sp(this.image)})}return e}};const Nh=2,Bh=3,Vh=4,qh=25.4,zh=10,_h=1,Gh={get:function(t,e){const n={};let i=!1;const r=$h(t,"exif","FocalLength",e),o=$h(t,"exif","FocalPlaneXResolution",e),a=$h(t,"exif","FocalPlaneYResolution",e),s=$h(t,"exif","FocalPlaneResolutionUnit",e),c=$h(t,"file","Image Width",e),l=$h(t,"file","Image Height",e),p=$h(t,"exif","FocalLengthIn35mmFilm",e)||function(t,e,n,i,r,o){if(t&&e&&n&&i&&r&&o)try{let a;switch(n){case Nh:a=qh;break;case Bh:a=zh;break;case Vh:a=_h;break;default:return}const s=t[0]/t[1]*a,c=e[0]/e[1]*a,l=i/s,p=r/c,u=Math.sqrt(l**2+p**2);return o[0]/o[1]*(43.27/u)}catch{}}(o,a,s,c,l,r);p&&(n.FocalLength35efl={value:p,description:ad.FocalLengthIn35mmFilm(p)},i=!0);const u=function(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}(r,p);u&&(n.ScaleFactorTo35mmEquivalent=u,i=!0);const d=function(t){if(t)try{const e=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:e,description:e.toFixed(1)+" deg"}}catch{}}(p);if(d&&(n.FieldOfView=d,i=!0),i)return n}};function $h(t,e,n,i){return i&&t[e]&&t[e][n]?t[e][n].value:!i&&t[n]?t[n].value:void 0}function Hh(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=(new Error).stack}Hh.prototype=new Error;const Wh={MetadataMissingError:Hh};function Xh(t,e={}){return function(t){return"string"==typeof t}(t)?(e.async=!0,function(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?function(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:"bytes=0-"+(e-1)}),fetch(t,n).then(t=>t.arrayBuffer())}(t,e):function(t,{length:e}={}){return new Promise((n,i)=>{const r={};Number.isInteger(e)&&e>=0&&(r.headers={range:"bytes=0-"+(e-1)}),function(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}(t)(t,r,t=>{if(t.statusCode>=200&&t.statusCode<=299){const e=[];t.on("data",t=>e.push(Buffer.from(t))),t.on("error",t=>i(t)),t.on("end",()=>n(Buffer.concat(e)))}else i(`Could not fetch file: ${t.statusCode} ${t.statusMessage}`),t.resume()}).on("error",t=>i(t))})}(t,e):function(t){return/^data:[^;,]*(;base64)?,/.test(t)}(t)?Promise.resolve(function(t){const e=t.substring(t.indexOf(",")+1);if(-1!==t.indexOf(";base64"))return typeof atob<"u"?Uint8Array.from(atob(e),t=>t.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,t=>t.charCodeAt(0)).buffer}(t)):function(t,{length:e}={}){return new Promise((n,i)=>{const r=function(){try{return __non_webpack_require__("fs")}catch{return}}();r.open(t,(o,a)=>{o?i(o):r.stat(t,(o,s)=>{if(o)i(o);else{const o=Math.min(s.size,void 0!==e?e:s.size),c=Buffer.alloc(o),l={buffer:c,length:o};r.read(a,l,e=>{e?i(e):r.close(a,e=>{e&&console.warn(`Could not close file ${t}:`,e),n(c)})})}})})})}(t,e)}(t,e).then(t=>Yh(t,e))):function(t){return typeof File<"u"&&t instanceof File}(t)?(e.async=!0,function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=()=>n(i.error),i.readAsArrayBuffer(t)})}(t).then(t=>Yh(t,e))):Yh(t,e)}function Yh(t,e){return function(t){try{return Buffer.isBuffer(t)}catch{return!1}}(t)&&(t=new Uint8Array(t).buffer),function(t,{expanded:e=!1,async:n=!1,includeUnknown:i=!1,domParser:r}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,a={};const s=[],{fileType:c,fileDataOffset:l,jfifDataOffset:p,tiffHeaderOffset:u,iptcDataOffset:d,xmpChunks:f,iccChunks:m,mpfDataOffset:h,pngHeaderOffset:g,pngTextChunks:v,pngChunkOffsets:x,vp8xChunkOffset:y,gifHeaderOffset:b}=rd.parseAppMarkers(t,n);if(function(t){return void 0!==t}(l)){o=!0;const n=Hd.read(t,l);e?a.file=n:a=op({},a,n)}if(function(t){return void 0!==t}(p)){o=!0;const n=Jd.read(t,p);e?a.jfif=n:a=op({},a,n)}if(function(t){return void 0!==t}(u)){o=!0;const{tags:n,byteOrder:s}=Nd.read(t,u,i);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),e?(a.exif=n,function(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=hp(t.exif.GPSLatitude.value),"S"===t.exif.GPSLatitudeRef.value.join("")&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=hp(t.exif.GPSLongitude.value),"W"===t.exif.GPSLongitudeRef.value.join("")&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],1===t.exif.GPSAltitudeRef.value&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}(a)):a=op({},a,n),n["IPTC-NAA"]&&!Kh(d)){const t=df.read(n["IPTC-NAA"].value,0,i);e?a.iptc=t:a=op({},a,t)}if(n.ApplicationNotes&&!Zh(f)){const t=kf.read(rp(n.ApplicationNotes.value),void 0,r);e?a.xmp=t:(delete t._raw,a=op({},a,t))}if(n.ImageSourceData&&n.PhotoshopSettings){const t=hm.read(n.PhotoshopSettings.value,i);e?a.photoshop=t:a=op({},a,t)}if(n.ICC_Profile&&!Qh(m)){const t=Pm.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?a.icc=t:a=op({},a,t)}if(n.MakerNote)if(function(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&"Canon"===t.Make.value[0]&&t.MakerNote&&t.MakerNote.__offset}(n)){const r=Nm.read(t,u,n.MakerNote.__offset,s,i);e?a.makerNotes=r:a=op({},a,r)}else if(function(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&rp(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}(n)){const r=zm.read(t,u,n.MakerNote.__offset,i);e?a.makerNotes=r:a=op({},a,r)}n.MakerNote&&delete n.MakerNote.__offset}if(Kh(d)){o=!0;const n=df.read(t,d,i);e?a.iptc=n:a=op({},a,n)}if(Zh(f)){o=!0;const n=kf.read(t,f,r);e?a.xmp=n:(delete n._raw,a=op({},a,n))}if(Qh(m)){o=!0;const e=Pm.read(t,m,n);e instanceof Promise?s.push(e.then(S)):S(e)}if(function(t){return void 0!==t}(h)){o=!0;const n=Bd.read(t,h,i);e?a.mpf=n:a=op({},a,n)}if(function(t){return void 0!==t}(g)){o=!0;const n=Hm.read(t,g);e?(a.png=a.png?op({},a.png,n):n,a.pngFile=n):a=op({},a,n)}if(function(t){return void 0!==t}(v)){o=!0;const{readTags:e,readTagsPromise:r}=th.read(t,v,n,i);P(e),r&&s.push(r.then(t=>t.forEach(P)))}if(function(t){return void 0!==t}(x)){o=!0;const n=xh.read(t,x);e?a.png=a.png?op({},a.png,n):n:a=op({},a,n)}if(function(t){return void 0!==t}(y)){o=!0;const n=Ch.read(t,y);e?a.riff=a.riff?op({},a.riff,n):n:a=op({},a,n)}if(function(t){return void 0!==t}(b)){o=!0;const n=Ih.read(t,b);e?a.gif=a.gif?op({},a.gif,n):n:a=op({},a,n)}const w=Gh.get(a,e);w&&(e?a.composite=w:a=op({},a,w));const A=Lh.get(t,a.Thumbnail,u);if(A?(o=!0,a.Thumbnail=A):delete a.Thumbnail,c&&(e?(a.file||(a.file={}),a.file.FileType=c):a.FileType=c,o=!0),!o)throw new Wh.MetadataMissingError;return n?Promise.all(s).then(()=>a):a;function S(t){e?a.icc=t:a=op({},a,t)}function P(t){if(e){for(const e of["exif","iptc"]){const n=`__${e}`;t[n]&&(a[e]=a[e]?op({},a.exif,t[n]):t[n],delete t[n])}a.png=a.png?op({},a.png,t):t,a.pngText=a.pngText?op({},a.png,t):t}else a=op({},a,t.__exif?t.__exif:{},t.__iptc?t.__iptc:{},t),delete a.__exif,delete a.__iptc}}(function(t){try{return new DataView(t)}catch{return new Ql(t)}}(t),e)}function Kh(t){return void 0!==t}function Zh(t){return Array.isArray(t)&&t.length>0}function Qh(t){return Array.isArray(t)&&t.length>0}const Jh=["jpg","jpeg","png","webp","heic","tiff","bmp"],tg=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","3gp","m4v","mpg","mpeg"],eg=t=>{const n=t.name.split(".").pop()?.toLowerCase();return n&&Jh.includes(n)?e.IMAGE:n&&tg.includes(n)?e.VIDEO:"unknown"},ng=({enableCaption:o,ada:a,content:s,removeImage:c,caption:l,disabled:p,onCaptionChange:u,playingVideo:d,onPlay:f,onPause:m,onEnd:h,uploadStatus:g={status:"",progress:0}})=>{const v=k(()=>s.type===e.IMAGE?t.jsx("img",{alt:"Image not found",className:"qc:size-full qc:rounded-t qc:object-contain",src:s.compressedFile?URL.createObjectURL(s.compressedFile):""}):t.jsx(W,{fit:"contain",showFullscreen:!1,src:URL.createObjectURL(s.originalFile),playing:d,onPlay:f,onPause:m,onEnd:h}),[s.type,s.status,d]);return t.jsxs("div",{className:"qc:relative",children:[t.jsxs("div",{className:n("qc:border-border qc:relative qc:h-44 qc:max-h-screen qc:overflow-hidden qc:rounded qc:border qc:sm:h-80",!o&&"qc:rounded-b"),children:[(s.status===i.WAITING||s.status===i.PROCESSING)&&t.jsx("div",{className:"qc:absolute qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-2",children:t.jsx("span",{className:"qc:text-sm qc:text-gray-500",children:"Processing"})}),s.status===i.DONE&&v,(g.status===r.WAITING||g.status===r.UPLOADING)&&t.jsxs("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center",children:[t.jsx("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:z-0 qc:h-full qc:bg-opacity-75",style:{width:`${g.progress}%`}}),t.jsx("h3",{className:"qc:text-foreground qc:z-10 qc:text-center qc:font-medium",children:g.status===r.WAITING?"Waiting...":100===Math.round(g.progress)?"Finalizing...":`Uploading (${Math.round(g.progress)}%)`})]}),(g.status===r.DONE||g.status===r.ERROR)&&t.jsx("div",{className:"qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:bg-opacity-75",children:g.status===r.DONE?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-success qc:size-12",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-destructive qc:size-12",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})})]}),t.jsx("button",{disabled:p,className:"qc:text-primary qc:bg-destructive qc:absolute qc:right-4 qc:top-4 qc:cursor-pointer qc:rounded-full qc:p-1 qc:transition-all qc:hover:bg-opacity-100 qc:sm:bg-opacity-50 qc:sm:p-2",onClick:()=>c(s.uid),children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-5 qc:text-white",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),(o||a)&&t.jsx("div",{className:"qc:mt-3 qc:w-full qc:space-y-3",children:t.jsx("textarea",{rows:2,value:l,className:n("qc:border-primary qc:shadow-outer qc:placeholder:text-primary qc:block qc:w-full qc:rounded qc:border qc:px-3 qc:py-2.5 qc:font-bold qc:placeholder:opacity-50 qc:focus:border-primary-light qc:focus:outline-none qc:focus:ring-primary-light",p?"qc:text-muted qc:bg-transparent":"qc:text-foreground qc:bg-white qc:bg-opacity-75"),disabled:p,onChange:t=>u(t.target.value),placeholder:"Caption"})})]},s.uid)},ig=100,rg=52428800,og=new nt({concurrency:1,autostart:!0}),ag=new nt({concurrency:3,autostart:!0}),sg={hidden:{opacity:0,scale:.8},visible:t=>({opacity:1,scale:1,transition:{delay:.1*t,duration:.3}}),exit:{opacity:0,scale:.8,transition:{duration:.3}}},cg=()=>{const{eventSlug:A}=o(),S=a(),{props:{organizationId:P,loginUrl:C},loadingUser:I,user:D,organization:M}=s(),{event:F}=c({eventSlug:A}),{increment:U}=$(F),[R,O]=B(!1),[L,N]=B([]),[V,q]=B({}),[z,_]=B(null),[G,W]=B(null),[X,Y]=B({}),[K,Z]=B(0),[Q,tt]=B(0),[et,nt]=B({}),it=E(0);j(()=>{D&&rt()},[D]);const rt=async()=>{O(!0);try{const t=await l.get(p.GET_UPLOAD_COUNT,{searchParams:{eventSlug:A},headers:{"x-org-id":P,Authorization:D?`Bearer ${D.token}`:void 0}}).json();if(t.error)throw new Error(t.error);Y(t.data.uploadCount)}catch(t){console.error(t),_("Failed to fetch upload count")}O(!1)},ot=async t=>{if(t.type===e.IMAGE){N(e=>e.map(e=>e.uid===t.uid?{...e,status:i.PROCESSING}:e));const e=await(async(t,e)=>{const n=Date.now();let i=t.originalFile,r={};try{r=await Xh(i,{expanded:!1,includeUnknown:!0}),delete r.Images,delete r.Thumbnail}catch(t){console.error(t)}try{const e=t.originalFile?.name?.split(".").pop();if(["heic","heif"].includes(e?.toLowerCase())&&typeof window<"u"){const e=(await import("./ybrHsuRh.js").then(t=>t.h)).default;i=await e({blob:t.originalFile,toType:"image/jpeg"})}}catch(t){console.error(t)}let o=i;try{i.size/1024/1024>1&&(o=await Zl(i,{maxSizeMB:2,maxWidthOrHeight:2400,useWebWorker:!0,preserveExif:!0,maxIteration:3,onProgress:e}))}catch(t){console.error(t)}return{exif:r,compressedFile:o,colors:{},clientProcessingTime:Date.now()-n}})(t);N(n=>n.map(n=>n.uid===t.uid?{...n,...e,status:i.DONE}:n))}else if(t.type===e.VIDEO){N(e=>e.map(e=>e.uid===t.uid?{...e,status:i.PROCESSING}:e));const e=await(async t=>new Promise(e=>{const n=t.originalFile;if(n){const t=document?.createElement("video");t.onloadedmetadata=()=>{e(t.duration)};const i=URL.createObjectURL(n);t.src=i}else e(0)}))(t);N(n=>n.map(n=>n.uid===t.uid?{...n,length:e,status:i.DONE}:n))}},at=t=>{const e=L.filter(e=>e.uid!==t);N(e)},st=t=>{const e=F?.uploadLimit-X[u.APPROVED]-X[u.IN_REVIEW]-X[u.REJECTED],n=[];Array.from(t).forEach(t=>{if(!L.some(e=>e.originalFile.name===t.name)){const e={uid:J(),originalFile:t,type:eg(t),status:i.WAITING};n.push(e)}}),!(L.length+n.length>ig)&&(n.slice(0,Math.min(e-L.length,ig-L.length)).forEach(t=>og.push(()=>ot(t))),N([...L,...n]))},ct=F?F?.uploadLimit-(X?X[u.APPROVED]+X[u.IN_REVIEW]+X[u.REJECTED]:0):0,lt=k(()=>Object.values(et).some(t=>[r.WAITING,r.UPLOADING].includes(t.status)),[et]);let pt=!0;for(let t=0;t<L.length;t++)if(L[t].status!==i.DONE){pt=!1;break}const ut=R||!F||!D||F?.status!==d.OPEN||L.length>=Math.min(ct,ig)||lt,dt=F?F?.enableVideo?[...Jh,...tg]:Jh:[];if(I)return t.jsx(f,{className:"qc:mx-auto qc:mt-8 qc:h-6 qc:w-64"});if(!D){if(!M.customAuth)return t.jsx(h,{to:g.LOGIN,state:{referrer:S.pathname}});if(!C)return t.jsx(m,{title:"Please login to upload content"});window.history.pushState({},"",C)}return t.jsxs("div",{className:"qc:relative qc:min-h-[80vh] qc:w-full qc:space-y-8 qc:bg-background",children:[t.jsx("div",{className:"qc:flex qc:flex-row qc:justify-end",children:t.jsx(H,{event:F})}),t.jsx(v,{variant:"h3",align:"center",immutable:!0,children:F?.name}),R&&t.jsxs("div",{className:"qc:w-full qc:space-y-8 qc:pb-8",children:[t.jsx(f,{className:"qc:mx-auto qc:h-7 qc:w-64"}),t.jsx(f,{className:"qc:mx-auto qc:h-56 qc:w-full qc:max-w-xl"})]}),!R&&D&&F?F?.status!==d.OPEN?t.jsxs("div",{className:"qc:mt-16 qc:flex qc:flex-col qc:items-center qc:gap-8",children:[t.jsx(m,{title:"Event not open",description:"Please find some open event to upload content",iconSvg:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-full",viewBox:"0 0 885.86993 622.8043",xmlnsXlink:"http://www.w3.org/1999/xlink",role:"img",children:[t.jsx("title",{children:"through_the_park"}),t.jsx("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),t.jsx("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"342.46486",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"337.53055",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("rect",{x:"400.53636",y:"332.59625",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),t.jsx("path",{d:"M775.57723,513.38047h-1.97372c0-93.59519-76.14539-169.7401-169.7401-169.7401-93.59518,0-169.74009,76.14491-169.74009,169.7401H432.1496c0-94.68325,77.03057-171.71382,171.71381-171.71382C698.54714,341.66665,775.57723,418.69722,775.57723,513.38047Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"161.35177",cy:"161.35177",r:"161.35177",fill:"currentColor"}),t.jsx("path",{d:"M438.4403,192.17931a161.36436,161.36436,0,0,1-268.85975,170.77,161.36567,161.36567,0,1,0,268.85975-170.77Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"161.795 161.352 162.238 161.352 170.217 618.811 153.373 618.811 161.795 161.352",fill:"#3f3d56"}),t.jsx("rect",{x:"329.05538",y:"537.54454",width:"7.97893",height:"30.14264",transform:"translate(509.8146 -138.12101) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"755.27647",cy:"229.8063",r:"130.59346",fill:"currentColor"}),t.jsx("path",{d:"M1009.48506,281.178a130.60365,130.60365,0,0,1-217.60732,138.2163A130.60471,130.60471,0,1,0,1009.48506,281.178Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"755.635 229.806 755.994 229.806 762.452 600.06 748.819 600.06 755.635 229.806",fill:"#3f3d56"}),t.jsx("rect",{x:"920.95206",y:"560.70661",width:"6.45792",height:"24.39658",transform:"translate(843.51724 -650.35577) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"369.90725",cy:"321.70366",r:"20.55846",fill:"currentColor"}),t.jsx("path",{d:"M542.265,446.57008a20.56006,20.56006,0,0,1-34.25647,21.75847A20.56023,20.56023,0,1,0,542.265,446.57008Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"369.964 321.704 370.02 321.704 371.037 379.99 368.891 379.99 369.964 321.704",fill:"#3f3d56"}),t.jsx("rect",{x:"528.32779",y:"490.57441",width:"1.01663",height:"3.84059",transform:"translate(561.19589 -343.48173) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("circle",{cx:"559.878",cy:"255.44299",r:"52.63144",fill:"currentColor"}),t.jsx("path",{d:"M756.09357,358.88718A52.63554,52.63554,0,0,1,668.394,414.59075a52.636,52.636,0,1,0,87.69954-55.70357Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),t.jsx("polygon",{points:"560.023 255.443 560.167 255.443 562.77 404.662 557.275 404.662 560.023 255.443",fill:"#3f3d56"}),t.jsx("rect",{x:"720.41323",y:"471.54209",width:"2.60265",height:"9.83225",transform:"translate(650.03004 -522.71764) rotate(62.23413)",fill:"#3f3d56"}),t.jsx("path",{d:"M354.5881,734.63564s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"193.57562",cy:"575.45671",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"192.43789",y:"587.23109",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M403.93115,702.06922s.68149-14.27971,14.652-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"242.91867",cy:"542.89029",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"241.78094",y:"554.66468",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M552.67,591.58462s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"392.46975",cy:"436.6403",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"391.56611",y:"445.99208",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M769.77945,556.05762s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"609.57917",cy:"401.1133",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"608.67553",y:"410.46508",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M562.53864,621.19045s.54127-11.34163,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"402.33836",cy:"466.24613",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"401.43472",y:"475.59791",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M538.854,642.90139s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"378.6537",cy:"487.95707",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"377.75006",y:"497.30885",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M803.33272,574.808s.54128-11.34162,11.63736-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"643.13244",cy:"419.86366",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"642.22881",y:"429.21544",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M483.58976,599.47951s.54127-11.34163,11.63735-10.02332",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"323.38948",cy:"444.53519",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"322.48584",y:"453.88696",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M740.17362,543.22843s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"579.97334",cy:"388.28411",r:"5.55351",fill:"currentColor"}),t.jsx("rect",{x:"579.0697",y:"397.63589",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),t.jsx("path",{d:"M268.73119,737.59622s.68149-14.27971,14.652-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"107.71872",cy:"578.41729",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"106.58099",y:"590.19168",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M948.67842,733.64878s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"787.66594",cy:"574.46985",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"786.52822",y:"586.24423",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M891.44048,700.0955s.68149-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"730.42801",cy:"540.91657",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"729.29028",y:"552.69096",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M883.54559,750.42541s.6815-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("circle",{cx:"722.53312",cy:"591.24648",r:"6.99217",fill:"currentColor"}),t.jsx("rect",{x:"721.39539",y:"603.02087",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),t.jsx("path",{d:"M280.09142,761.08258S590.95263,679.17311,587.992,595.28993c-5.42774-23.19124-42.92846-29.1124-42.92846-29.1124s-88.81749-11.84233-40.4613-40.4613,180.59557-21.71094,180.59557-21.71094-136.18682,21.71094-75.9883,33.55327c48.35619,2.96058,110.52843,15.78978,110.52843,15.78978S846.0562,579.99358,863.8197,645.12641s2.96058,115.46273,2.96058,115.46273Z",transform:"translate(-157.06503 -138.59785)",fill:"#e6e6e6"}),t.jsx("path",{d:"M618.67289,761.40215l-1.16407-1.627q2.4668-1.76367,4.85938-3.50781l1.17773,1.61719Q621.14359,759.63213,618.67289,761.40215Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M633.18265,750.72832l-1.207-1.59375c3.23144-2.44727,6.41406-4.90918,9.46-7.31738l1.24023,1.56836C639.61917,745.80254,636.42484,748.27324,633.18265,750.72832Zm18.82324-14.89941-1.27734-1.53907c3.12793-2.59863,6.18652-5.21,9.09082-7.76074l1.32031,1.502C658.22171,730.59453,655.14847,733.21855,652.00589,735.82891Zm18.03223-15.86914-1.36914-1.459c2.98535-2.7998,5.86328-5.60254,8.55469-8.332l1.42382,1.4043C675.93851,714.32012,673.04105,717.14238,670.03812,719.95977Zm16.8584-17.14063-1.48828-1.33594c2.74218-3.05468,5.33593-6.11426,7.709-9.09277l1.56445,1.24609C692.28421,696.64531,689.66507,699.73516,686.89652,702.81914ZM701.84964,683.952,700.1973,682.825c2.32519-3.40723,4.42285-6.80859,6.23437-10.10938l1.75391.9629C706.34281,677.035,704.211,680.492,701.84964,683.952Zm11.5-21.21386-1.86133-.73047a69.37031,69.37031,0,0,0,3.39551-11.29l1.959.40234A71.21576,71.21576,0,0,1,713.34964,662.73809Zm2.66992-23.69629a47.10965,47.10965,0,0,0-1.60839-11.50684l1.93164-.52148a49.17317,49.17317,0,0,1,1.67675,11.99511Zm-5.98339-22.30274a60.32109,60.32109,0,0,0-6.65625-9.66406l1.5332-1.2832a62.27891,62.27891,0,0,1,6.87695,9.98632Zm-14.91993-18.10449a108.36226,108.36226,0,0,0-9.32617-7.34766l1.1543-1.63281a110.07889,110.07889,0,0,1,9.498,7.48438Zm-19.34863-13.78418c-3.27148-1.92285-6.80078-3.8418-10.4873-5.70312l.90039-1.78516c3.72558,1.87988,7.292,3.81933,10.60058,5.76367Zm-21.29687-10.81445c-3.48145-1.54688-7.18946-3.10352-11.02149-4.62793l.74024-1.85742c3.85547,1.5332,7.58789,3.10058,11.09375,4.65722ZM632.23539,565.157c-3.56348-1.292-7.37305-2.61816-11.32129-3.94141l.63476-1.89648c3.96387,1.3291,7.78906,2.66016,11.36817,3.957Zm-22.73145-7.64648c-3.48535-1.09961-7.2373-2.25684-11.47119-3.53907l.58008-1.91406c4.24072,1.28418,8.00048,2.44434,11.49267,3.54492Zm-22.979-6.99317c-4.0459-1.21-7.90332-2.36621-11.51465-3.47851l.58886-1.91211c3.60645,1.1123,7.458,2.2666,11.499,3.47461Zm-22.98389-7.1875a95.0565,95.0565,0,0,1-11.26416-4.53418l.89941-1.78711a92.76387,92.76387,0,0,0,11.019,4.43067Zm-15.103-13.11035-1.42578-1.40234c1.82324-1.85254,5.42969-3.665,11.02539-5.542l.63574,1.89649C553.45658,526.9207,550.01273,528.61992,548.438,530.21953Zm21.67676-8.30566-.4834-1.94141c3.459-.86133,7.39942-1.76269,11.71192-2.67871l.415,1.957C577.46878,520.16094,573.5513,521.05742,570.11478,521.91387Zm23.36963-5.01856-.375-1.96484c3.68506-.7041,7.65381-1.4336,11.79687-2.168l.34961,1.96875C601.12113,515.46465,597.16117,516.19219,593.48441,516.89531ZM617.05374,512.7l-.33007-1.97266q5.65283-.94775,11.83105-1.93847l.31641,1.97461Q622.69827,511.75371,617.05374,512.7Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M640.9307,508.865l-.30664-1.97656q2.9165-.45119,5.93554-.91114l.30079,1.97657Q643.84281,508.41387,640.9307,508.865Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),t.jsx("path",{d:"M685.194,305.71659l9.08474-7.26606c-7.05753-.77863-9.95734,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75483,13.75483,0,0,0,685.194,305.71659Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M516.44078,361.96766l9.08474-7.26605c-7.05753-.77864-9.95734,3.07039-11.14411,6.11692-5.51363-2.28946-11.51587.711-11.51587.711l18.17688,6.59885A13.75487,13.75487,0,0,0,516.44078,361.96766Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M560.84953,245.51807l9.08473-7.26606c-7.05753-.77863-9.95733,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75484,13.75484,0,0,0,560.84953,245.51807Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),t.jsx("path",{d:"M659.609,569.03965s-7.86875,0-8.74306,4.80868-2.18577,57.267-1.31146,63.82431.87431,5.24584.87431,5.24584-1.743,12.4609,2.18858,13.00631S656.5489,641.607,656.5489,641.607l3.06008-53.33264Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M693.7069,569.03965s7.86875,0,8.74306,4.80868,2.18577,57.267,1.31146,63.82431-.8743,5.24584-.8743,5.24584,1.743,12.4609-2.18859,13.00631S696.767,641.607,696.767,641.607l-3.06008-53.33263Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M658.29752,751.76952h-3.49721a7.86866,7.86866,0,0,0-7.86875,7.86857v.00018H668.352V749.58375H658.29752Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("path",{d:"M691.95829,751.76952h3.49721a7.86867,7.86867,0,0,1,7.86875,7.86857v.00018H681.90377V749.58375h10.05452Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"516.09568",cy:"409.02131",r:"11.36598",fill:"#9e616a"}),t.jsx("path",{d:"M670.53781,553.73931s-1.31146,14.426-3.06008,15.73749,18.36042-.8743,18.36042-.8743-6.99444-10.49167-5.683-13.98889S670.53781,553.73931,670.53781,553.73931Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),t.jsx("path",{d:"M696.32981,569.03965s-24.04341-10.05451-39.78091,0c0,0-3.93436,10.05451-.87431,15.7375s7.86875,19.23472,3.06008,28.41493.43716,5.24584.43716,5.24584-6.12014,24.48056-6.99445,43.71525,2.62293,88.30487,5.24583,88.742,10.92883,1.31146,11.80314,0,6.99444-92.67636,6.99444-92.67636,2.62292,93.55069,5.24582,93.55069,9.61737,0,10.92883-2.18577,12.24027-86.55625,8.30591-104.04235-6.55729-26.22917-6.55729-26.22917,4.80867-3.06007,3.49723-4.80869-7.86877-20.54616-4.80869-23.60625S696.32981,569.03965,696.32981,569.03965Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"523.30871",cy:"402.17104",r:"18.36042",fill:"#2f2e41"}),t.jsx("path",{d:"M691.83867,531.57749a12.36814,12.36814,0,0,1-9.33162-14.29294c-.05359.188-.104.37762-.14921.57a12.36847,12.36847,0,0,0,24.0811,5.65832c.0452-.19233.08448-.38459.12022-.57676A12.36815,12.36815,0,0,1,691.83867,531.57749Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),t.jsx("circle",{cx:"535.52108",cy:"386.38703",r:"8.98489",fill:"#2f2e41"})]})}),t.jsx(x,{to:g.PUBLIC_EVENTS,state:{internalNavigation:!0},children:t.jsx(y,{children:"All events"})})]}):t.jsxs(T,{children:[t.jsxs(v,{variant:"h5",align:"center",children:["Available entries : ",t.jsx("span",{className:"qc:text-primary",children:ct})]}),L.length<=0&&t.jsx("div",{className:"qc:flex qc:w-full qc:flex-auto qc:justify-center qc:mt-6",children:t.jsx(Jt,{accept:(()=>{const t={},e=dt.filter(t=>Jh.includes(t)),n=dt.filter(t=>tg.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:ut,onDrop:st,children:({getRootProps:e,getInputProps:i,isDragActive:r})=>t.jsxs("div",{...e(),className:n("qc:bg-background qc:w-auto qc:max-w-2xl qc:rounded qc:border-2 qc:border-dashed qc:px-4 qc:py-12 qc:text-center",L.length>=ct?"qc:border-border":"",ut?"qc:border-border qc:hover:cursor-not-allowed":"qc:border-primary qc:hover:cursor-pointer"),children:[t.jsx("input",{...i()}),t.jsxs("svg",{className:n(ut?"qc:text-gray-500":"qc:text-primary","qc:mx-auto qc:size-12"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("rect",{x:"0",y:"0",width:"24",height:"24",fill:"none",stroke:"none"}),t.jsx("path",{fill:"currentColor",d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5l5 5h-3z"})]}),t.jsx("span",{className:n(ut?"qc:text-muted":"qc:text-foreground","qc:mt-2 qc:block qc:font-medium"),children:r?"Drop files here...":`Select Images ${F?.enableVideo?"or Videos (60s)":""} to upload (${L.length}/${Math.min(ct,ig)})`}),!lt&&t.jsx("div",{className:"qc:text-muted-foreground qc:mt-6 qc:w-full qc:text-center qc:text-xs qc:italic",children:"* Only your new, original photos will be eligible for upload. Our team will review them before publication."})]})})}),t.jsx("div",{className:"qc:grid qc:grid-cols-2 qc:gap-6 qc:sm:pt-3 qc:lg:grid-cols-3 qc:xl:grid-cols-4",children:t.jsxs(xo,{children:[L.map((e,n)=>t.jsx(gl.div,{layout:!0,variants:sg,initial:"hidden",animate:"visible",exit:"exit",custom:n,className:"qc:relative",children:t.jsx(ng,{enableCaption:F?.enableCaption,enableAICaption:F?.enableAICaption,ada:F?.ada,content:e,disabled:lt,removeImage:at,caption:V[e.uid],onCaptionChange:t=>{q(n=>({...n,[e.uid]:t}))},playingVideo:G===e.uid,onPlay:()=>W(e.uid),onPause:()=>W(null),onEnd:()=>W(null),uploadStatus:et[e.uid]})},e.uid)),L.length>0&&ct>0&&t.jsx(Jt,{accept:(()=>{const t={},e=dt.filter(t=>Jh.includes(t)),n=dt.filter(t=>tg.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:ut,onDrop:st,children:({getRootProps:e,getInputProps:i,isDragActive:r})=>t.jsxs("div",{...e(),children:[t.jsx("input",{...i()}),t.jsxs(gl.button,{type:"button",layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3},className:n("qc:border-primary qc:bg-background qc:hover:border-primary qc:text-foreground qc:hover:text-primary qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-3 qc:rounded qc:border-2 qc:border-dashed qc:p-12 qc:hover:border-2 qc:focus:outline-none qc:sm:min-h-72",r?"qc:bg-primary qc:bg-opacity-15":"qc:bg-background qc:bg-opacity-100"),children:[t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-14",viewBox:"0 0 24 24",children:t.jsx("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h6.5q.212 0 .356.144t.144.357t-.144.356t-.356.143h-6.5q-.27 0-.443.173T5 5.616v12.769q0 .269.173.442t.443.173h12.769q.269 0 .442-.173t.173-.443v-6.5q0-.212.144-.356t.357-.144t.356.144t.143.356v6.5q0 .691-.462 1.153T18.384 20zm1.153-3.616h10.462L14 12.077l-3 3.789l-2-2.404zM17 7h-1.5q-.213 0-.356-.144T15 6.499t.144-.356T15.5 6H17V4.5q0-.213.144-.356T17.501 4t.356.144T18 4.5V6h1.5q.213 0 .356.144t.144.357t-.144.356T19.5 7H18v1.5q0 .213-.144.356T17.499 9t-.356-.144T17 8.5z"})}),t.jsx(v,{variant:"h5",children:r?"Drop files here...":"Add Image"})]})]})})]})}),L.length>0&&t.jsx(y,{fullWidth:!0,loading:lt,onClick:async(t=!0)=>{_(null);let e=!0;if(F?.ada)for(let t=0;t<L.length;t++)if(!V[L[t].uid]){e=!1;break}if(!e)return void _("Caption are needed for each image");Z(L.length),tt(0),it.current=L.length;const n=`upload-group-${J()}`;L.forEach(t=>{ag.push(()=>(async({uid:t,groupId:e,groupContentCount:n,eventId:i,content:o,contentData:a})=>{nt(e=>({...e,[t]:{status:r.UPLOADING,progress:0}}));const s=Math.ceil(o.size/rg);for(let c=0;c<s;c++){const u=c*rg,d=Math.min(o.size,u+rg),f=o.slice(u,d);try{const r=new FormData;r.append("groupId",e),r.append("groupContentCount",n),r.append("eventId",i),r.append("contentData",JSON.stringify(a)),r.append("integrationUpload",!0),r.append("uid",t),r.append("chunk",f),r.append("chunkIndex",c),r.append("totalChunks",s),await l.post(p.SINGLE_UPLOAD,{body:r,headers:{"x-org-id":P,Authorization:D?`Bearer ${D.token}`:void 0}})}catch(e){console.error(e),nt(e=>({...e,[t]:{status:r.FAILED,progress:0}}));break}}Y(t=>({...t,[F?.autoApprove?u.APPROVED:u.IN_REVIEW]:t[F?.autoApprove?u.APPROVED:u.IN_REVIEW]+1})),nt(e=>({...e,[t]:{status:r.DONE,progress:100}})),it.current-=1,N(e=>e.filter(e=>e.uid!==t)),F?.autoApprove||U(),0===it.current&&(q({}),N([]),Z(0),tt(0),nt({}),b.success(F?.visibility===w.PRIVATE&&F?.autoApprove?"Content uploaded":"Upload successful, waiting for approval"))})({uid:t.uid,groupId:n,groupContentCount:L.length,eventId:F?._id,content:t.compressedFile?t.compressedFile:t.originalFile,contentData:{type:t.type,caption:V[t.uid],colors:t.colors,sizes:{original:t.originalFile.size,clientCompressed:t.compressedFile?.size},processingTimes:{client:t.clientProcessingTime},location:{latitude:t.exif?.GPSLatitude?.description,longitude:t.exif?.GPSLongitude?.description},exif:t.exif,capturedAt:t.exif?.DateTimeOriginal?.description}}))});const i={};L.forEach(t=>{i[t.uid]={status:r.WAITING,progress:0}}),nt(i)},icon:"material-symbols:upload-rounded",disabled:!F||lt||!pt,children:lt?`Uploading (${Q}/${K})`:"Upload"})]}):null,L.length<=0&&t.jsx(x,{to:g.GALLERY(A),state:{internalNavigation:!0},children:t.jsx(v,{variant:"h5",align:"center",children:"Goto gallery"})})]})};export{cg as default};