react-modern-audio-player 1.0.0 → 1.1.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.
- package/README.md +28 -22
- package/dist/index.cjs +68 -158
- package/dist/index.css +1 -1
- package/dist/index.es.js +61 -144
- package/dist/types/components/AudioPlayer/Context/StateContext/element.d.ts +1 -0
- package/dist/types/components/AudioPlayer/Context/StateContext/placement.d.ts +1 -1
- package/dist/types/components/Dropdown/Dropdown.d.ts +1 -0
- package/package.json +4 -8
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var P=require("react"),Vo=require("react-dom"),be=require("styled-components");function mn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var W=mn(P),xa=mn(Vo),ae=mn(be);function Aa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Aa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function vn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Aa(e))&&(n&&(n+=" "),n+=t);return n}function gn(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var bn={};gn(bn,"SSRProvider",()=>Uo);gn(bn,"useSSRSafeId",()=>Ta);gn(bn,"useIsSSR",()=>at);const Xt={prefix:String(Math.round(Math.random()*1e10)),current:0},Dt=W.default.createContext(Xt);function Uo(e){let t=P.useContext(Dt),r=P.useMemo(()=>({prefix:t===Xt?"":`${t.prefix}-${++t.current}`,current:0}),[t]);return W.default.createElement(Dt.Provider,{value:r},e.children)}let jo=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function Ta(e){let t=P.useContext(Dt);return t===Xt&&!jo&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),P.useMemo(()=>e||`react-aria${t.prefix}-${++t.current}`,[e])}function at(){let t=P.useContext(Dt)!==Xt,[r,n]=P.useState(t);return typeof window!="undefined"&&t&&P.useLayoutEffect(()=>{n(!1)},[]),r}var Rr=function(e,t){return Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Rr(e,t)};function Kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Rr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var J=function(){return J=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},J.apply(this,arguments)};function dr(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var X;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(X||(X={}));var te;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(te||(te={}));var rt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(rt||(rt={}));function zn(e){return e.type===te.literal}function Go(e){return e.type===te.argument}function Ca(e){return e.type===te.number}function Sa(e){return e.type===te.date}function ka(e){return e.type===te.time}function Oa(e){return e.type===te.select}function Ra(e){return e.type===te.plural}function zo(e){return e.type===te.pound}function _a(e){return e.type===te.tag}function Ma(e){return!!(e&&typeof e=="object"&&e.type===rt.number)}function _r(e){return!!(e&&typeof e=="object"&&e.type===rt.dateTime)}var La=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xo=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Ko(e){var t={};return e.replace(Xo,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Yo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function qo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Yo).filter(function(b){return b.length>0}),r=[],n=0,a=t;n<a.length;n++){var i=a[n],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),h=0,p=l;h<p.length;h++){var w=p[h];if(w.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function Jo(e){return e.replace(/^(.*?)-/,"")}var Xn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ia=/^(@+)?(\+|#+)?[rs]?$/g,Qo=/(\*)(0+)|(#+)(0+)|(0+)/g,Na=/^(0+)$/;function Kn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ia,function(r,n,a){return typeof a!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):a==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof a=="string"?a.length:0)),""}),t}function Da(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Zo(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Na.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Yn(e){var t={},r=Da(e);return r||t}function es(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Jo(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=J(J(J({},t),{notation:"scientific"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"engineering":t=J(J(J({},t),{notation:"engineering"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Qo,function(l,h,p,w,b,v){if(h)t.minimumIntegerDigits=p.length;else{if(w&&b)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Na.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Xn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Xn,function(l,h,p,w,b,v){return p==="*"?t.minimumFractionDigits=h.length:w&&w[0]==="#"?t.maximumFractionDigits=w.length:b&&v?(t.minimumFractionDigits=b.length,t.maximumFractionDigits=b.length+v.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var i=a.options[0];i==="w"?t=J(J({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=J(J({},t),Kn(i)));continue}if(Ia.test(a.stem)){t=J(J({},t),Kn(a.stem));continue}var s=Da(a.stem);s&&(t=J(J({},t),s));var o=Zo(a.stem);o&&(t=J(J({},t),o))}return t}var Ct={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ts(e,t){for(var r="",n=0;n<e.length;n++){var a=e.charAt(n);if(a==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===a;)i++,n++;var s=1+(i&1),o=i<2?1:3+(i>>1),l="a",h=rs(t);for((h=="H"||h=="k")&&(o=0);o-- >0;)r+=l;for(;s-- >0;)r=h+r}else a==="J"?r+="H":r+=a}return r}function rs(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var a=Ct[n||""]||Ct[r||""]||Ct["".concat(r,"-001")]||Ct["001"];return a[0]}var hr,ns=new RegExp("^".concat(La.source,"*")),as=new RegExp("".concat(La.source,"*$"));function K(e,t){return{start:e,end:t}}var is=!!String.prototype.startsWith,os=!!String.fromCodePoint,ss=!!Object.fromEntries,ls=!!String.prototype.codePointAt,us=!!String.prototype.trimStart,cs=!!String.prototype.trimEnd,fs=!!Number.isSafeInteger,ds=fs?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mr=!0;try{var hs=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Mr=((hr=hs.exec("a"))===null||hr===void 0?void 0:hr[0])==="a"}catch{Mr=!1}var qn=is?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Lr=os?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Jn=ss?Object.fromEntries:function(t){for(var r={},n=0,a=t;n<a.length;n++){var i=a[n],s=i[0],o=i[1];r[s]=o}return r},Ba=ls?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var a=t.charCodeAt(r),i;return a<55296||a>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},ps=us?function(t){return t.trimStart()}:function(t){return t.replace(ns,"")},ms=cs?function(t){return t.trimEnd()}:function(t){return t.replace(as,"")};function Ha(e,t){return new RegExp(e,t)}var Ir;if(Mr){var Qn=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ir=function(t,r){var n;Qn.lastIndex=r;var a=Qn.exec(t);return(n=a[1])!==null&&n!==void 0?n:""}}else Ir=function(t,r){for(var n=[];;){var a=Ba(t,r);if(a===void 0||Fa(a)||ys(a))break;n.push(a),r+=a>=65536?2:1}return Lr.apply(void 0,n)};var vs=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),a.push({type:te.pound,location:K(o,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(X.UNMATCHED_CLOSING_TAG,K(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Nr(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:te.literal,value:"<".concat(a,"/>"),location:K(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Nr(this.char()))return this.error(X.INVALID_TAG,K(o,this.clonePosition()));var l=this.clonePosition(),h=this.parseTagName();return a!==h?this.error(X.UNMATCHED_CLOSING_TAG,K(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:te.tag,value:a,children:s,location:K(n,this.clonePosition())},err:null}:this.error(X.INVALID_TAG,K(o,this.clonePosition())))}else return this.error(X.UNCLOSED_TAG,K(n,this.clonePosition()))}else return this.error(X.INVALID_TAG,K(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&bs(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),a="";;){var i=this.tryParseQuote(r);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){a+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){a+=o;continue}break}var l=K(n,this.clonePosition());return{val:{type:te.literal,value:a,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!gs(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Lr.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Lr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(X.EMPTY_ARGUMENT,K(n,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:te.argument,value:a,location:K(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition())):this.parseArgumentOptions(t,r,a,n);default:return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Ir(this.message,r),a=r+n.length;this.bumpTo(a);var i=this.clonePosition(),s=K(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,a){var i,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(X.EXPECT_ARGUMENT_TYPE,K(s,l));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition(),w=this.parseSimpleArgStyleIfPossible();if(w.err)return w;var b=ms(w.val);if(b.length===0)return this.error(X.EXPECT_ARGUMENT_STYLE,K(this.clonePosition(),this.clonePosition()));var v=K(p,this.clonePosition());h={style:b,styleLocation:v}}var x=this.tryParseArgumentClose(a);if(x.err)return x;var A=K(a,this.clonePosition());if(h&&qn(h==null?void 0:h.style,"::",0)){var k=ps(h.style.slice(2));if(o==="number"){var w=this.parseNumberSkeletonFromString(k,h.styleLocation);return w.err?w:{val:{type:te.number,value:n,location:A,style:w.val},err:null}}else{if(k.length===0)return this.error(X.EXPECT_DATE_TIME_SKELETON,A);var C=k;this.locale&&(C=ts(k,this.locale));var b={type:rt.dateTime,pattern:C,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?Ko(C):{}},S=o==="date"?te.date:te.time;return{val:{type:S,value:n,location:A,style:b},err:null}}}return{val:{type:o==="number"?te.number:o==="date"?te.date:te.time,value:n,location:A,style:(i=h==null?void 0:h.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(X.EXPECT_SELECT_ARGUMENT_OPTIONS,K(O,J({},O)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),D=0;if(o!=="select"&&g.value==="offset"){if(!this.bumpIf(":"))return this.error(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,K(this.clonePosition(),this.clonePosition()));this.bumpSpace();var w=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,X.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(w.err)return w;this.bumpSpace(),g=this.parseIdentifierIfPossible(),D=w.val}var M=this.tryParsePluralOrSelectOptions(t,o,r,g);if(M.err)return M;var x=this.tryParseArgumentClose(a);if(x.err)return x;var N=K(a,this.clonePosition());return o==="select"?{val:{type:te.select,value:n,options:Jn(M.val),location:N},err:null}:{val:{type:te.plural,value:n,options:Jn(M.val),offset:D,pluralType:o==="plural"?"cardinal":"ordinal",location:N},err:null}}default:return this.error(X.INVALID_ARGUMENT_TYPE,K(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(X.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,K(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=qo(t)}catch{return this.error(X.INVALID_NUMBER_SKELETON,r)}return{val:{type:rt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?es(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,a){for(var i,s=!1,o=[],l=new Set,h=a.value,p=a.location;;){if(h.length===0){var w=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var b=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_SELECTOR,X.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;p=K(w,this.clonePosition()),h=this.message.slice(w.offset,this.offset())}else break}if(l.has(h))return this.error(r==="select"?X.DUPLICATE_SELECT_ARGUMENT_SELECTOR:X.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,p);h==="other"&&(s=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:X.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,K(this.clonePosition(),this.clonePosition()));var x=this.parseMessage(t+1,r,n);if(x.err)return x;var A=this.tryParseArgumentClose(v);if(A.err)return A;o.push([h,{value:x.val,location:K(v,this.clonePosition())}]),l.add(h),this.bumpSpace(),i=this.parseIdentifierIfPossible(),h=i.value,p=i.location}return o.length===0?this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR:X.EXPECT_PLURAL_ARGUMENT_SELECTOR,K(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(X.MISSING_OTHER_CLAUSE,K(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)i=!0,s=s*10+(o-48),this.bump();else break}var l=K(a,this.clonePosition());return i?(s*=n,ds(s)?{val:s,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Ba(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(qn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Fa(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Nr(e){return e>=97&&e<=122||e>=65&&e<=90}function gs(e){return Nr(e)||e===47}function bs(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Fa(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ys(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dr(e){e.forEach(function(t){if(delete t.location,Oa(t)||Ra(t))for(var r in t.options)delete t.options[r].location,Dr(t.options[r].value);else Ca(t)&&Ma(t.style)||(Sa(t)||ka(t))&&_r(t.style)?delete t.style.location:_a(t)&&Dr(t.children)})}function $s(e,t){t===void 0&&(t={}),t=J({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new vs(e,t).parse();if(r.err){var n=SyntaxError(X[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Dr(r.val),r.val}function pr(e,t){var r=t&&t.cache?t.cache:Ts,n=t&&t.serializer?t.serializer:As,a=t&&t.strategy?t.strategy:Es;return a(e,{cache:r,serializer:n})}function ws(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Wa(e,t,r,n){var a=ws(n)?n:r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,n),t.set(a,i)),i}function Va(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,n),t.set(a,i)),i}function yn(e,t,r,n,a){return r.bind(t,e,n,a)}function Es(e,t){var r=e.length===1?Wa:Va;return yn(e,this,r,t.cache.create(),t.serializer)}function Ps(e,t){return yn(e,this,Va,t.cache.create(),t.serializer)}function xs(e,t){return yn(e,this,Wa,t.cache.create(),t.serializer)}var As=function(){return JSON.stringify(arguments)};function $n(){this.cache=Object.create(null)}$n.prototype.get=function(e){return this.cache[e]};$n.prototype.set=function(e,t){this.cache[e]=t};var Ts={create:function(){return new $n}},mr={variadic:Ps,monadic:xs},nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(nt||(nt={}));var Yt=function(e){Kt(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Zn=function(e){Kt(t,e);function t(r,n,a,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(a).join('", "'),'"'),nt.INVALID_VALUE,i)||this}return t}(Yt),Cs=function(e){Kt(t,e);function t(r,n,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),nt.INVALID_VALUE,a)||this}return t}(Yt),Ss=function(e){Kt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),nt.MISSING_VALUE,n)||this}return t}(Yt),se;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(se||(se={}));function ks(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==se.literal||r.type!==se.literal?t.push(r):n.value+=r.value,t},[])}function Os(e){return typeof e=="function"}function Lt(e,t,r,n,a,i,s){if(e.length===1&&zn(e[0]))return[{type:se.literal,value:e[0].value}];for(var o=[],l=0,h=e;l<h.length;l++){var p=h[l];if(zn(p)){o.push({type:se.literal,value:p.value});continue}if(zo(p)){typeof i=="number"&&o.push({type:se.literal,value:r.getNumberFormat(t).format(i)});continue}var w=p.value;if(!(a&&w in a))throw new Ss(w,s);var b=a[w];if(Go(p)){(!b||typeof b=="string"||typeof b=="number")&&(b=typeof b=="string"||typeof b=="number"?String(b):""),o.push({type:typeof b=="string"?se.literal:se.object,value:b});continue}if(Sa(p)){var v=typeof p.style=="string"?n.date[p.style]:_r(p.style)?p.style.parsedOptions:void 0;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(ka(p)){var v=typeof p.style=="string"?n.time[p.style]:_r(p.style)?p.style.parsedOptions:n.time.medium;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(Ca(p)){var v=typeof p.style=="string"?n.number[p.style]:Ma(p.style)?p.style.parsedOptions:void 0;v&&v.scale&&(b=b*(v.scale||1)),o.push({type:se.literal,value:r.getNumberFormat(t,v).format(b)});continue}if(_a(p)){var x=p.children,A=p.value,k=a[A];if(!Os(k))throw new Cs(A,"function",s);var C=Lt(x,t,r,n,a,i),S=k(C.map(function(D){return D.value}));Array.isArray(S)||(S=[S]),o.push.apply(o,S.map(function(D){return{type:typeof D=="string"?se.literal:se.object,value:D}}))}if(Oa(p)){var O=p.options[b]||p.options.other;if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a));continue}if(Ra(p)){var O=p.options["=".concat(b)];if(!O){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var x=require("react"),Vo=require("react-dom"),be=require("styled-components");function mn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var W=mn(x),Pa=mn(Vo),ae=mn(be);function Aa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Aa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function vn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Aa(e))&&(n&&(n+=" "),n+=t);return n}function gn(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var bn={};gn(bn,"SSRProvider",()=>Uo);gn(bn,"useSSRSafeId",()=>Ta);gn(bn,"useIsSSR",()=>at);const Xt={prefix:String(Math.round(Math.random()*1e10)),current:0},Dt=W.default.createContext(Xt);function Uo(e){let t=x.useContext(Dt),r=x.useMemo(()=>({prefix:t===Xt?"":`${t.prefix}-${++t.current}`,current:0}),[t]);return W.default.createElement(Dt.Provider,{value:r},e.children)}let jo=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function Ta(e){let t=x.useContext(Dt);return t===Xt&&!jo&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),x.useMemo(()=>e||`react-aria${t.prefix}-${++t.current}`,[e])}function at(){let t=x.useContext(Dt)!==Xt,[r,n]=x.useState(t);return typeof window!="undefined"&&t&&x.useLayoutEffect(()=>{n(!1)},[]),r}var Rr=function(e,t){return Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Rr(e,t)};function Kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Rr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var J=function(){return J=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},J.apply(this,arguments)};function dr(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var X;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(X||(X={}));var te;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(te||(te={}));var rt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(rt||(rt={}));function zn(e){return e.type===te.literal}function Go(e){return e.type===te.argument}function Ca(e){return e.type===te.number}function Sa(e){return e.type===te.date}function ka(e){return e.type===te.time}function Oa(e){return e.type===te.select}function Ra(e){return e.type===te.plural}function zo(e){return e.type===te.pound}function _a(e){return e.type===te.tag}function Ma(e){return!!(e&&typeof e=="object"&&e.type===rt.number)}function _r(e){return!!(e&&typeof e=="object"&&e.type===rt.dateTime)}var La=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xo=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Ko(e){var t={};return e.replace(Xo,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Yo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function qo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Yo).filter(function(b){return b.length>0}),r=[],n=0,a=t;n<a.length;n++){var i=a[n],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),h=0,p=l;h<p.length;h++){var $=p[h];if($.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function Jo(e){return e.replace(/^(.*?)-/,"")}var Xn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ia=/^(@+)?(\+|#+)?[rs]?$/g,Qo=/(\*)(0+)|(#+)(0+)|(0+)/g,Na=/^(0+)$/;function Kn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ia,function(r,n,a){return typeof a!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):a==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof a=="string"?a.length:0)),""}),t}function Da(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Zo(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Na.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Yn(e){var t={},r=Da(e);return r||t}function es(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Jo(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=J(J(J({},t),{notation:"scientific"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"engineering":t=J(J(J({},t),{notation:"engineering"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Qo,function(l,h,p,$,b,v){if(h)t.minimumIntegerDigits=p.length;else{if($&&b)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Na.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Xn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Xn,function(l,h,p,$,b,v){return p==="*"?t.minimumFractionDigits=h.length:$&&$[0]==="#"?t.maximumFractionDigits=$.length:b&&v?(t.minimumFractionDigits=b.length,t.maximumFractionDigits=b.length+v.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var i=a.options[0];i==="w"?t=J(J({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=J(J({},t),Kn(i)));continue}if(Ia.test(a.stem)){t=J(J({},t),Kn(a.stem));continue}var s=Da(a.stem);s&&(t=J(J({},t),s));var o=Zo(a.stem);o&&(t=J(J({},t),o))}return t}var Ct={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ts(e,t){for(var r="",n=0;n<e.length;n++){var a=e.charAt(n);if(a==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===a;)i++,n++;var s=1+(i&1),o=i<2?1:3+(i>>1),l="a",h=rs(t);for((h=="H"||h=="k")&&(o=0);o-- >0;)r+=l;for(;s-- >0;)r=h+r}else a==="J"?r+="H":r+=a}return r}function rs(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var a=Ct[n||""]||Ct[r||""]||Ct["".concat(r,"-001")]||Ct["001"];return a[0]}var hr,ns=new RegExp("^".concat(La.source,"*")),as=new RegExp("".concat(La.source,"*$"));function K(e,t){return{start:e,end:t}}var is=!!String.prototype.startsWith,os=!!String.fromCodePoint,ss=!!Object.fromEntries,ls=!!String.prototype.codePointAt,us=!!String.prototype.trimStart,cs=!!String.prototype.trimEnd,fs=!!Number.isSafeInteger,ds=fs?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mr=!0;try{var hs=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Mr=((hr=hs.exec("a"))===null||hr===void 0?void 0:hr[0])==="a"}catch{Mr=!1}var qn=is?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Lr=os?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Jn=ss?Object.fromEntries:function(t){for(var r={},n=0,a=t;n<a.length;n++){var i=a[n],s=i[0],o=i[1];r[s]=o}return r},Ba=ls?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var a=t.charCodeAt(r),i;return a<55296||a>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},ps=us?function(t){return t.trimStart()}:function(t){return t.replace(ns,"")},ms=cs?function(t){return t.trimEnd()}:function(t){return t.replace(as,"")};function Ha(e,t){return new RegExp(e,t)}var Ir;if(Mr){var Qn=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ir=function(t,r){var n;Qn.lastIndex=r;var a=Qn.exec(t);return(n=a[1])!==null&&n!==void 0?n:""}}else Ir=function(t,r){for(var n=[];;){var a=Ba(t,r);if(a===void 0||Fa(a)||ys(a))break;n.push(a),r+=a>=65536?2:1}return Lr.apply(void 0,n)};var vs=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),a.push({type:te.pound,location:K(o,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(X.UNMATCHED_CLOSING_TAG,K(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Nr(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:te.literal,value:"<".concat(a,"/>"),location:K(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Nr(this.char()))return this.error(X.INVALID_TAG,K(o,this.clonePosition()));var l=this.clonePosition(),h=this.parseTagName();return a!==h?this.error(X.UNMATCHED_CLOSING_TAG,K(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:te.tag,value:a,children:s,location:K(n,this.clonePosition())},err:null}:this.error(X.INVALID_TAG,K(o,this.clonePosition())))}else return this.error(X.UNCLOSED_TAG,K(n,this.clonePosition()))}else return this.error(X.INVALID_TAG,K(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&bs(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),a="";;){var i=this.tryParseQuote(r);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){a+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){a+=o;continue}break}var l=K(n,this.clonePosition());return{val:{type:te.literal,value:a,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!gs(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Lr.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Lr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(X.EMPTY_ARGUMENT,K(n,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:te.argument,value:a,location:K(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition())):this.parseArgumentOptions(t,r,a,n);default:return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Ir(this.message,r),a=r+n.length;this.bumpTo(a);var i=this.clonePosition(),s=K(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,a){var i,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(X.EXPECT_ARGUMENT_TYPE,K(s,l));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition(),$=this.parseSimpleArgStyleIfPossible();if($.err)return $;var b=ms($.val);if(b.length===0)return this.error(X.EXPECT_ARGUMENT_STYLE,K(this.clonePosition(),this.clonePosition()));var v=K(p,this.clonePosition());h={style:b,styleLocation:v}}var P=this.tryParseArgumentClose(a);if(P.err)return P;var A=K(a,this.clonePosition());if(h&&qn(h==null?void 0:h.style,"::",0)){var k=ps(h.style.slice(2));if(o==="number"){var $=this.parseNumberSkeletonFromString(k,h.styleLocation);return $.err?$:{val:{type:te.number,value:n,location:A,style:$.val},err:null}}else{if(k.length===0)return this.error(X.EXPECT_DATE_TIME_SKELETON,A);var C=k;this.locale&&(C=ts(k,this.locale));var b={type:rt.dateTime,pattern:C,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?Ko(C):{}},S=o==="date"?te.date:te.time;return{val:{type:S,value:n,location:A,style:b},err:null}}}return{val:{type:o==="number"?te.number:o==="date"?te.date:te.time,value:n,location:A,style:(i=h==null?void 0:h.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(X.EXPECT_SELECT_ARGUMENT_OPTIONS,K(O,J({},O)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),D=0;if(o!=="select"&&g.value==="offset"){if(!this.bumpIf(":"))return this.error(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,K(this.clonePosition(),this.clonePosition()));this.bumpSpace();var $=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,X.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if($.err)return $;this.bumpSpace(),g=this.parseIdentifierIfPossible(),D=$.val}var M=this.tryParsePluralOrSelectOptions(t,o,r,g);if(M.err)return M;var P=this.tryParseArgumentClose(a);if(P.err)return P;var N=K(a,this.clonePosition());return o==="select"?{val:{type:te.select,value:n,options:Jn(M.val),location:N},err:null}:{val:{type:te.plural,value:n,options:Jn(M.val),offset:D,pluralType:o==="plural"?"cardinal":"ordinal",location:N},err:null}}default:return this.error(X.INVALID_ARGUMENT_TYPE,K(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(X.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,K(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=qo(t)}catch{return this.error(X.INVALID_NUMBER_SKELETON,r)}return{val:{type:rt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?es(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,a){for(var i,s=!1,o=[],l=new Set,h=a.value,p=a.location;;){if(h.length===0){var $=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var b=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_SELECTOR,X.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;p=K($,this.clonePosition()),h=this.message.slice($.offset,this.offset())}else break}if(l.has(h))return this.error(r==="select"?X.DUPLICATE_SELECT_ARGUMENT_SELECTOR:X.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,p);h==="other"&&(s=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:X.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,K(this.clonePosition(),this.clonePosition()));var P=this.parseMessage(t+1,r,n);if(P.err)return P;var A=this.tryParseArgumentClose(v);if(A.err)return A;o.push([h,{value:P.val,location:K(v,this.clonePosition())}]),l.add(h),this.bumpSpace(),i=this.parseIdentifierIfPossible(),h=i.value,p=i.location}return o.length===0?this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR:X.EXPECT_PLURAL_ARGUMENT_SELECTOR,K(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(X.MISSING_OTHER_CLAUSE,K(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)i=!0,s=s*10+(o-48),this.bump();else break}var l=K(a,this.clonePosition());return i?(s*=n,ds(s)?{val:s,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Ba(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(qn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Fa(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Nr(e){return e>=97&&e<=122||e>=65&&e<=90}function gs(e){return Nr(e)||e===47}function bs(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Fa(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ys(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dr(e){e.forEach(function(t){if(delete t.location,Oa(t)||Ra(t))for(var r in t.options)delete t.options[r].location,Dr(t.options[r].value);else Ca(t)&&Ma(t.style)||(Sa(t)||ka(t))&&_r(t.style)?delete t.style.location:_a(t)&&Dr(t.children)})}function $s(e,t){t===void 0&&(t={}),t=J({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new vs(e,t).parse();if(r.err){var n=SyntaxError(X[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Dr(r.val),r.val}function pr(e,t){var r=t&&t.cache?t.cache:Ts,n=t&&t.serializer?t.serializer:As,a=t&&t.strategy?t.strategy:Es;return a(e,{cache:r,serializer:n})}function ws(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Wa(e,t,r,n){var a=ws(n)?n:r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,n),t.set(a,i)),i}function Va(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,n),t.set(a,i)),i}function yn(e,t,r,n,a){return r.bind(t,e,n,a)}function Es(e,t){var r=e.length===1?Wa:Va;return yn(e,this,r,t.cache.create(),t.serializer)}function xs(e,t){return yn(e,this,Va,t.cache.create(),t.serializer)}function Ps(e,t){return yn(e,this,Wa,t.cache.create(),t.serializer)}var As=function(){return JSON.stringify(arguments)};function $n(){this.cache=Object.create(null)}$n.prototype.get=function(e){return this.cache[e]};$n.prototype.set=function(e,t){this.cache[e]=t};var Ts={create:function(){return new $n}},mr={variadic:xs,monadic:Ps},nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(nt||(nt={}));var Yt=function(e){Kt(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Zn=function(e){Kt(t,e);function t(r,n,a,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(a).join('", "'),'"'),nt.INVALID_VALUE,i)||this}return t}(Yt),Cs=function(e){Kt(t,e);function t(r,n,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),nt.INVALID_VALUE,a)||this}return t}(Yt),Ss=function(e){Kt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),nt.MISSING_VALUE,n)||this}return t}(Yt),se;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(se||(se={}));function ks(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==se.literal||r.type!==se.literal?t.push(r):n.value+=r.value,t},[])}function Os(e){return typeof e=="function"}function Lt(e,t,r,n,a,i,s){if(e.length===1&&zn(e[0]))return[{type:se.literal,value:e[0].value}];for(var o=[],l=0,h=e;l<h.length;l++){var p=h[l];if(zn(p)){o.push({type:se.literal,value:p.value});continue}if(zo(p)){typeof i=="number"&&o.push({type:se.literal,value:r.getNumberFormat(t).format(i)});continue}var $=p.value;if(!(a&&$ in a))throw new Ss($,s);var b=a[$];if(Go(p)){(!b||typeof b=="string"||typeof b=="number")&&(b=typeof b=="string"||typeof b=="number"?String(b):""),o.push({type:typeof b=="string"?se.literal:se.object,value:b});continue}if(Sa(p)){var v=typeof p.style=="string"?n.date[p.style]:_r(p.style)?p.style.parsedOptions:void 0;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(ka(p)){var v=typeof p.style=="string"?n.time[p.style]:_r(p.style)?p.style.parsedOptions:n.time.medium;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(Ca(p)){var v=typeof p.style=="string"?n.number[p.style]:Ma(p.style)?p.style.parsedOptions:void 0;v&&v.scale&&(b=b*(v.scale||1)),o.push({type:se.literal,value:r.getNumberFormat(t,v).format(b)});continue}if(_a(p)){var P=p.children,A=p.value,k=a[A];if(!Os(k))throw new Cs(A,"function",s);var C=Lt(P,t,r,n,a,i),S=k(C.map(function(D){return D.value}));Array.isArray(S)||(S=[S]),o.push.apply(o,S.map(function(D){return{type:typeof D=="string"?se.literal:se.object,value:D}}))}if(Oa(p)){var O=p.options[b]||p.options.other;if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a));continue}if(Ra(p)){var O=p.options["=".concat(b)];if(!O){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,nt.MISSING_INTL_API,s);var g=r.getPluralRules(t,{type:p.pluralType}).select(b-(p.offset||0));O=p.options[g]||p.options.other}if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a,b-(p.offset||0)));continue}}return ks(o)}function Rs(e,t){return t?J(J(J({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=J(J({},e[n]),t[n]||{}),r},{})):e}function _s(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Rs(e[n],t[n]),r},J({},e)):e}function vr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ms(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.number),strategy:mr.variadic}),getDateTimeFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.dateTime),strategy:mr.variadic}),getPluralRules:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.pluralRules),strategy:mr.variadic})}}var Ls=function(){function e(t,r,n,a){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(s){var o=i.formatToParts(s);if(o.length===1)return o[0].value;var l=o.reduce(function(h,p){return!h.length||p.type!==se.literal||typeof h[h.length-1]!="string"?h.push(p.value):h[h.length-1]+=p.value,h},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(s){return Lt(i.ast,i.locales,i.formatters,i.formats,s,void 0,i.message)},this.resolvedOptions=function(){return{locale:i.resolvedLocale.toString()}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:a==null?void 0:a.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_s(e.formats,n),this.formatters=a&&a.formatters||Ms(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=$s,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Is=Ls;function Ua(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ns={};Ua(Ns,"MessageDictionary",()=>ja);class ja{getStringForLocale(t,r){let n=this.messages[r];n||(n=Ds(r,this.messages,this.defaultLocale),this.messages[r]=n);let a=n[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}constructor(t,r="en-US"){this.messages={...t},this.defaultLocale=r}}function Ds(e,t,r="en-US"){if(t[e])return t[e];let n=Bs(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function Bs(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var Hs={};Ua(Hs,"MessageFormatter",()=>Ga);class Ga{format(t,r){let n=this.cache[t];if(!n){let i=this.messages.getStringForLocale(t,this.locale);if(!i)throw new Error(`Could not find intl message ${t} in ${this.locale} locale`);n=new Is(i,this.locale),this.cache[t]=n}let a;return r&&(a=Object.keys(r).reduce((i,s)=>(i[s]=r[s]==null?!1:r[s],i),{})),n.format(a)}constructor(t,r){this.locale=t,this.messages=r,this.cache={}}}let gr=new Map;class Fs{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} \u2013 ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Us()&&(this.resolvedHourCycle||(this.resolvedHourCycle=js(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,r={}){this.formatter=za(t,r),this.options=r}}const Ws={true:{ja:"h11"},false:{}};function za(e,t={}){if(typeof t.hour12=="boolean"&&Vs()){t={...t};let a=Ws[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=a!=null?a:i,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(gr.has(r))return gr.get(r);let n=new Intl.DateTimeFormat(e,t);return gr.set(r,n),n}let br=null;function Vs(){return br==null&&(br=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),br}let yr=null;function Us(){return yr==null&&(yr=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),yr}function js(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=za(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}let $r=new Map,Br=!1;try{Br=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Bt=!1;try{Bt=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Xa={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}};class Gs{format(t){let r="";if(!Br&&this.options.signDisplay!=null?r=Xs(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!Bt){var n;let{unit:a,unitDisplay:i="short",locale:s}=this.resolvedOptions(),o=(n=Xa[a])===null||n===void 0?void 0:n[i];r+=o[s]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Br&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Bt&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=zs(t,r),this.options=r}}function zs(e,t={}){let{numberingSystem:r}=t;if(r&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${r}`),t.style==="unit"&&!Bt){var n;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=Xa[s])===null||n===void 0)&&n[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let a=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if($r.has(a))return $r.get(a);let i=new Intl.NumberFormat(e,t);return $r.set(a,i),i}function Xs(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),i=e.format(r),s=a.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(r)}}function je(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ka={};je(Ka,"I18nProvider",()=>Za);je(Ka,"useLocale",()=>_e);const Ks=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ys=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ya(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize().script;return Ks.has(r)}let t=e.split("-")[0];return Ys.has(t)}function qa(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Ya(e)?"rtl":"ltr"}}let Hr=qa(),ct=new Set;function ea(){Hr=qa();for(let e of ct)e(Hr)}function Ja(){let e=at(),[t,r]=P.useState(Hr);return P.useEffect(()=>(ct.size===0&&window.addEventListener("languagechange",ea),ct.add(r),()=>{ct.delete(r),ct.size===0&&window.removeEventListener("languagechange",ea)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Qa=W.default.createContext(null);function Za(e){let{locale:t,children:r}=e,n=Ja(),a=t?{locale:t,direction:Ya(t)?"rtl":"ltr"}:n;return W.default.createElement(Qa.Provider,{value:a},r)}function _e(){let e=Ja();return P.useContext(Qa)||e}var qs={};je(qs,"useMessageFormatter",()=>ei);const ta=new WeakMap;function Js(e){let t=ta.get(e);return t||(t=new ja(e),ta.set(e,t)),t}function ei(e){let{locale:t}=_e(),r=P.useMemo(()=>Js(e),[e]),n=P.useMemo(()=>new Ga(t,r),[t,r]);return P.useCallback((a,i)=>n.format(a,i),[n])}var Qs={};je(Qs,"useDateFormatter",()=>Zs);function Zs(e){let t=P.useRef(null);e&&t.current&&el(e,t.current)&&(e=t.current),t.current=e;let{locale:r}=_e();return P.useMemo(()=>new Fs(r,e),[r,e])}function el(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}var tl={};je(tl,"useNumberFormatter",()=>rl);function rl(e={}){let{locale:t}=_e();return P.useMemo(()=>new Gs(t,e),[t,e])}var nl={};je(nl,"useCollator",()=>ti);let wr=new Map;function ti(e){let{locale:t}=_e(),r=t+(e?Object.entries(e).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(wr.has(r))return wr.get(r);let n=new Intl.Collator(t,e);return wr.set(r,n),n}var al={};je(al,"useFilter",()=>il);function il(e){let t=ti({usage:"search",...e});return{startsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(0,n.length),n)===0)},endsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(-n.length),n)===0)},contains(r,n){if(n.length===0)return!0;r=r.normalize("NFC"),n=n.normalize("NFC");let a=0,i=n.length;for(;a+i<=r.length;a++){let s=r.slice(a,a+i);if(t.compare(n,s)===0)return!0}return!1}}}function qt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ol={};qt(ol,"useControlledState",()=>sl);function sl(e,t,r){let[n,a]=P.useState(e||t),i=P.useRef(e!==void 0),s=i.current,o=e!==void 0,l=P.useRef(n);s!==o&&console.warn(`WARN: A component changed from ${s?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o;let h=P.useCallback((p,...w)=>{let b=(v,...x)=>{r&&(Object.is(l.current,v)||r(v,...x)),o||(l.current=v)};typeof p=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((x,...A)=>{let k=p(o?l.current:x,...A);return b(k,...w),o?x:k})):(o||a(p),b(p,...w))},[o,r]);return o?l.current=e:e=n,[e,h]}var wn={};qt(wn,"clamp",()=>ri);qt(wn,"snapValueToStep",()=>ni);qt(wn,"toFixedNumber",()=>ll);function ri(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function ni(e,t,r,n){let a=(e-(isNaN(t)?0:t))%n,i=Math.abs(a)*2>=n?e+Math.sign(a)*(n-Math.abs(a)):e-a;isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(r/n)*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor((r-t)/n)*n);let s=n.toString(),o=s.indexOf("."),l=o>=0?s.length-o:0;if(l>0){let h=Math.pow(10,l);i=Math.round(i*h)/h}return i}function ll(e,t,r=10){const n=Math.pow(r,t);return Math.round(e*n)/n}function q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var En={};q(En,"useId",()=>Jt);q(En,"mergeIds",()=>ai);q(En,"useSlotId",()=>cl);var ul={};q(ul,"useLayoutEffect",()=>he);const he=typeof window!="undefined"?W.default.useLayoutEffect:()=>{};let Ht=new Map;function Jt(e){let[t,r]=P.useState(e),n=P.useRef(null),a=Ta(t),i=P.useCallback(s=>{n.current=s},[]);return Ht.set(a,i),he(()=>{let s=a;return()=>{Ht.delete(s)}},[a]),P.useEffect(()=>{let s=n.current;s&&(n.current=null,r(s))}),a}function ai(e,t){if(e===t)return e;let r=Ht.get(e);if(r)return r(t),t;let n=Ht.get(t);return n?(n(e),e):t}function cl(e=[]){let t=Jt(),[r,n]=Cn(t),a=P.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:null})},[t,n]);return he(a,[t,a,...e]),r}var fl={};q(fl,"chain",()=>bt);function bt(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var dl={};q(dl,"mergeProps",()=>Pe);function Pe(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let i=t[a],s=n[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=bt(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=vn(i,s):a==="id"&&i&&s?t.id=ai(i,s):t[a]=s!==void 0?s:i}}return t}var hl={};q(hl,"mergeRefs",()=>pl);function pl(...e){return t=>{for(let r of e)typeof r=="function"?r(t):r!=null&&(r.current=t)}}var ml={};q(ml,"filterDOMProps",()=>xe);const vl=new Set(["id"]),gl=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bl=/^(data-.*)$/;function xe(e,t={}){let{labelable:r,propNames:n}=t,a={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(vl.has(i)||r&&gl.has(i)||(n==null?void 0:n.has(i))||bl.test(i))&&(a[i]=e[i]);return a}var yl={};q(yl,"focusWithoutScrolling",()=>ft);function ft(e){if($l())e.focus({preventScroll:!0});else{let t=wl(e);e.focus(),El(t)}}let St=null;function $l(){if(St==null){St=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return St=!0,!0}})}catch{}}return St}function wl(e){for(var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function El(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}var Pl={};q(Pl,"getOffset",()=>ii);function ii(e,t,r="horizontal"){let n=e.getBoundingClientRect();return t?r==="horizontal"?n.right:n.bottom:r==="horizontal"?n.left:n.top}var oi={};q(oi,"clamp",()=>ri);q(oi,"snapValueToStep",()=>ni);var xl={};q(xl,"runAfterTransition",()=>si);let Qe=new Map,Fr=new Set;function ra(){if(typeof window=="undefined")return;let e=r=>{let n=Qe.get(r.target);n||(n=new Set,Qe.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=Qe.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),Qe.delete(r.target)),Qe.size===0)){for(let a of Fr)a();Fr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?ra():document.addEventListener("DOMContentLoaded",ra));function si(e){requestAnimationFrame(()=>{Qe.size===0?e():Fr.add(e)})}var Al={};q(Al,"useDrag1D",()=>Tl);const kt=[];function Tl(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:r,orientation:n,onHover:a,onDrag:i,onPositionChange:s,onIncrement:o,onDecrement:l,onIncrementToMax:h,onDecrementToMin:p,onCollapseToggle:w}=e,b=N=>n==="horizontal"?N.clientX:N.clientY,v=N=>{let I=ii(t.current,r,n),R=b(N);return r?I-R:R-I},x=P.useRef(!1),A=P.useRef(0),k=P.useRef({onPositionChange:s,onDrag:i});k.current.onDrag=i,k.current.onPositionChange=s;let C=N=>{N.preventDefault();let I=v(N);x.current||(x.current=!0,k.current.onDrag&&k.current.onDrag(!0),k.current.onPositionChange&&k.current.onPositionChange(I)),A.current!==I&&(A.current=I,s&&s(I))},S=N=>{const I=N.target;x.current=!1;let R=v(N);k.current.onDrag&&k.current.onDrag(!1),k.current.onPositionChange&&k.current.onPositionChange(R),kt.splice(kt.indexOf(I),1),window.removeEventListener("mouseup",S,!1),window.removeEventListener("mousemove",C,!1)};return{onMouseDown:N=>{const I=N.currentTarget;kt.some(R=>I.contains(R))||(kt.push(I),window.addEventListener("mousemove",C,!1),window.addEventListener("mouseup",S,!1))},onMouseEnter:()=>{a&&a(!0)},onMouseOut:()=>{a&&a(!1)},onKeyDown:N=>{switch(N.key){case"Left":case"ArrowLeft":n==="horizontal"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Up":case"ArrowUp":n==="vertical"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Right":case"ArrowRight":n==="horizontal"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Down":case"ArrowDown":n==="vertical"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Home":N.preventDefault(),p&&p();break;case"End":N.preventDefault(),h&&h();break;case"Enter":N.preventDefault(),w&&w();break}}}}var Cl={};q(Cl,"useGlobalListeners",()=>Qt);function Qt(){let e=P.useRef(new Map),t=P.useCallback((a,i,s,o)=>{let l=o!=null&&o.once?(...h)=>{e.current.delete(s),s(...h)}:s;e.current.set(s,{type:i,eventTarget:a,fn:l,options:o}),a.addEventListener(i,s,o)},[]),r=P.useCallback((a,i,s,o)=>{var l;let h=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;a.removeEventListener(i,h,o),e.current.delete(s)},[]),n=P.useCallback(()=>{e.current.forEach((a,i)=>{r(a.eventTarget,a.type,i,a.options)})},[r]);return P.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var Sl={};q(Sl,"useLabels",()=>li);function li(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=Jt(r),a&&n?a=[...new Set([...a.trim().split(/\s+/),r])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}var kl={};q(kl,"useObjectRef",()=>Ol);function Ol(e){const t=P.useRef();return he(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)},[e]),t}var Rl={};q(Rl,"useUpdateEffect",()=>_l);function _l(e,t){const r=P.useRef(!0);P.useEffect(()=>{r.current?r.current=!1:e()},t)}var Ml={};q(Ml,"useResizeObserver",()=>ui);function Ll(){return typeof window.ResizeObserver!="undefined"}function ui(e){const{ref:t,onResize:r}=e;P.useEffect(()=>{let n=t==null?void 0:t.current;if(!!n)if(Ll()){const a=new window.ResizeObserver(i=>{!i.length||r()});return a.observe(n),()=>{n&&a.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t])}var Il={};q(Il,"useSyncRef",()=>Pn);function Pn(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}var Nl={};q(Nl,"getScrollParent",()=>xn);function xn(e){for(;e&&!Dl(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Dl(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}var Bl={};q(Bl,"useViewportSize",()=>Hl);let Ee=typeof window!="undefined"&&window.visualViewport;function Hl(){let[e,t]=P.useState(()=>na());return P.useEffect(()=>{let r=()=>{t(n=>{let a=na();return a.width===n.width&&a.height===n.height?n:a})};return Ee?Ee.addEventListener("resize",r):window.addEventListener("resize",r),()=>{Ee?Ee.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),e}function na(){return{width:(Ee==null?void 0:Ee.width)||window.innerWidth,height:(Ee==null?void 0:Ee.height)||window.innerHeight}}var Fl={};q(Fl,"useDescription",()=>ci);let Wl=0;const Er=new Map;function ci(e){let[t,r]=P.useState(null);return he(()=>{if(!e)return;let n=Er.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${Wl++}`;r(a);let i=document.createElement("div");i.id=a,i.style.display="none",i.textContent=e,document.body.appendChild(i),n={refCount:0,element:i},Er.set(e,n)}return n.refCount++,()=>{--n.refCount===0&&(n.element.remove(),Er.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var Ne={};q(Ne,"isMac",()=>Zt);q(Ne,"isIPhone",()=>fi);q(Ne,"isIPad",()=>di);q(Ne,"isIOS",()=>wt);q(Ne,"isAppleDevice",()=>Vl);q(Ne,"isWebKit",()=>Ul);q(Ne,"isChrome",()=>hi);q(Ne,"isAndroid",()=>jl);function An(e){var t;return typeof window=="undefined"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Tn(e){return typeof window!="undefined"&&window.navigator!=null?e.test((window.navigator.userAgentData||window.navigator).platform):!1}function Zt(){return Tn(/^Mac/i)}function fi(){return Tn(/^iPhone/i)}function di(){return Tn(/^iPad/i)||Zt()&&navigator.maxTouchPoints>1}function wt(){return fi()||di()}function Vl(){return Zt()||wt()}function Ul(){return An(/AppleWebKit/i)&&!hi()}function hi(){return An(/Chrome/i)}function jl(){return An(/Android/i)}var Gl={};q(Gl,"useEvent",()=>pi);function pi(e,t,r,n){let a=P.useRef(r);a.current=r;let i=r==null;P.useEffect(()=>{if(i)return;let s=e.current,o=l=>a.current.call(this,l);return s.addEventListener(t,o,n),()=>{s.removeEventListener(t,o,n)}},[e,t,n,i])}var zl={};q(zl,"useValueEffect",()=>Cn);function Cn(e){let[t,r]=P.useState(e),n=P.useRef(t),a=P.useRef(null);n.current=t;let i=P.useRef(null);i.current=()=>{let o=a.current.next();if(o.done){a.current=null;return}t===o.value?i.current():r(o.value)},he(()=>{a.current&&i.current()});let s=P.useCallback(o=>{a.current=o(n.current),i.current()},[a,i]);return[t,s]}var Xl={};q(Xl,"scrollIntoView",()=>Kl);function Kl(e,t){let r=aa(e,t,"left"),n=aa(e,t,"top"),a=t.offsetWidth,i=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,l=s+e.offsetWidth,h=o+e.offsetHeight;r<=s?s=r:r+a>l&&(s+=r+a-l),n<=o?o=n:n+i>h&&(o+=n+i-h),e.scrollLeft=s,e.scrollTop=o}function aa(e,t,r){const n=r==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[n];break}t=t.offsetParent}return a}function Q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Sn={};Q(Sn,"shouldKeepSpectrumClassNames",()=>Le);Q(Sn,"keepSpectrumClassNames",()=>Yl);Q(Sn,"classNames",()=>It);let Le=!1;function Yl(){Le=!0,console.warn("Legacy spectrum-prefixed class names enabled for backward compatibility. We recommend replacing instances of CSS overrides targeting spectrum selectors in your app with custom class names of your own, and disabling this flag.")}function It(e,...t){let r=[];for(let n of t)if(typeof n=="object"&&n){let a={};for(let i in n)e[i]&&(a[e[i]]=n[i]),(Le||!e[i])&&(a[i]=n[i]);r.push(a)}else typeof n=="string"?(e[n]&&r.push(e[n]),(Le||!e[n])&&r.push(n)):r.push(n);return vn(...r)}var ql={};Q(ql,"getWrappedElement",()=>Jl);function Jl(e){let t;return typeof e=="string"?t=W.default.createElement("span",null,e):t=W.default.Children.only(e),t}var Ql={};Q(Ql,"useMediaQuery",()=>Ft);function Ft(e){let t=typeof window!="undefined"&&typeof window.matchMedia=="function",[r,n]=P.useState(()=>t?window.matchMedia(e).matches:!1);return P.useEffect(()=>{if(!t)return;let i=window.matchMedia(e),s=o=>{n(o.matches)};return i.addListener(s),()=>{i.removeListener(s)}},[t,e]),at()?!1:r}var it={};Q(it,"createDOMRef",()=>kn);Q(it,"createFocusableRef",()=>mi);Q(it,"useDOMRef",()=>De);Q(it,"useFocusableRef",()=>Zl);Q(it,"unwrapDOMRef",()=>vi);Q(it,"useUnwrapDOMRef",()=>eu);function kn(e){return{UNSAFE_getDOMNode(){return e.current}}}function mi(e,t=e){return{...kn(e),focus(){t.current&&t.current.focus()}}}function De(e){let t=P.useRef(null);return P.useImperativeHandle(e,()=>kn(t)),t}function Zl(e,t){let r=P.useRef(null);return P.useImperativeHandle(e,()=>mi(r,t)),r}function vi(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}function eu(e){return P.useMemo(()=>vi(e),[e])}var Be={};Q(Be,"baseStyleProps",()=>er);Q(Be,"dimensionValue",()=>Y);Q(Be,"passthroughStyle",()=>ne);Q(Be,"viewStyleProps",()=>yi);Q(Be,"responsiveDimensionValue",()=>We);Q(Be,"getResponsiveProp",()=>tr);Q(Be,"convertStyleProps",()=>wi);Q(Be,"useStyleProps",()=>Ae);var On={};Q(On,"BreakpointProvider",()=>gi);Q(On,"useMatchedBreakpoints",()=>bi);Q(On,"useBreakpoint",()=>_n);const Rn=W.default.createContext(null);Rn.displayName="BreakpointContext";function gi(e){let{children:t,matchedBreakpoints:r}=e;return W.default.createElement(Rn.Provider,{value:{matchedBreakpoints:r}},t)}function bi(e){let t=Object.entries(e).sort(([,l],[,h])=>h-l),r=t.map(([,l])=>`(min-width: ${l}px)`),n=typeof window!="undefined"&&typeof window.matchMedia=="function",a=()=>{let l=[];for(let h in r){let p=r[h];window.matchMedia(p).matches&&l.push(t[h][0])}return l.push("base"),l},[i,s]=P.useState(()=>n?a():["base"]);return P.useEffect(()=>{if(!n)return;let l=()=>{const h=a();s(p=>p.length!==h.length||p.some((w,b)=>w!==h[b])?[...h]:p)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[n]),at()?["base"]:i}function _n(){return P.useContext(Rn)}const er={margin:["margin",Y],marginStart:[ce("marginLeft","marginRight"),Y],marginEnd:[ce("marginRight","marginLeft"),Y],marginTop:["marginTop",Y],marginBottom:["marginBottom",Y],marginX:[["marginLeft","marginRight"],Y],marginY:[["marginTop","marginBottom"],Y],width:["width",Y],height:["height",Y],minWidth:["minWidth",Y],minHeight:["minHeight",Y],maxWidth:["maxWidth",Y],maxHeight:["maxHeight",Y],isHidden:["display",iu],alignSelf:["alignSelf",ne],justifySelf:["justifySelf",ne],position:["position",Pr],zIndex:["zIndex",Pr],top:["top",Y],bottom:["bottom",Y],start:[ce("left","right"),Y],end:[ce("right","left"),Y],left:["left",Y],right:["right",Y],order:["order",Pr],flex:["flex",ou],flexGrow:["flexGrow",ne],flexShrink:["flexShrink",ne],flexBasis:["flexBasis",ne],gridArea:["gridArea",ne],gridColumn:["gridColumn",ne],gridColumnEnd:["gridColumnEnd",ne],gridColumnStart:["gridColumnStart",ne],gridRow:["gridRow",ne],gridRowEnd:["gridRowEnd",ne],gridRowStart:["gridRowStart",ne]},yi={...er,backgroundColor:["backgroundColor",au],borderWidth:["borderWidth",Ce],borderStartWidth:[ce("borderLeftWidth","borderRightWidth"),Ce],borderEndWidth:[ce("borderRightWidth","borderLeftWidth"),Ce],borderLeftWidth:["borderLeftWidth",Ce],borderRightWidth:["borderRightWidth",Ce],borderTopWidth:["borderTopWidth",Ce],borderBottomWidth:["borderBottomWidth",Ce],borderXWidth:[["borderLeftWidth","borderRightWidth"],Ce],borderYWidth:[["borderTopWidth","borderBottomWidth"],Ce],borderColor:["borderColor",Te],borderStartColor:[ce("borderLeftColor","borderRightColor"),Te],borderEndColor:[ce("borderRightColor","borderLeftColor"),Te],borderLeftColor:["borderLeftColor",Te],borderRightColor:["borderRightColor",Te],borderTopColor:["borderTopColor",Te],borderBottomColor:["borderBottomColor",Te],borderXColor:[["borderLeftColor","borderRightColor"],Te],borderYColor:[["borderTopColor","borderBottomColor"],Te],borderRadius:["borderRadius",Se],borderTopStartRadius:[ce("borderTopLeftRadius","borderTopRightRadius"),Se],borderTopEndRadius:[ce("borderTopRightRadius","borderTopLeftRadius"),Se],borderBottomStartRadius:[ce("borderBottomLeftRadius","borderBottomRightRadius"),Se],borderBottomEndRadius:[ce("borderBottomRightRadius","borderBottomLeftRadius"),Se],borderTopLeftRadius:["borderTopLeftRadius",Se],borderTopRightRadius:["borderTopRightRadius",Se],borderBottomLeftRadius:["borderBottomLeftRadius",Se],borderBottomRightRadius:["borderBottomRightRadius",Se],padding:["padding",Y],paddingStart:[ce("paddingLeft","paddingRight"),Y],paddingEnd:[ce("paddingRight","paddingLeft"),Y],paddingLeft:["paddingLeft",Y],paddingRight:["paddingRight",Y],paddingTop:["paddingTop",Y],paddingBottom:["paddingBottom",Y],paddingX:[["paddingLeft","paddingRight"],Y],paddingY:[["paddingTop","paddingBottom"],Y],overflow:["overflow",ne]},ia={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function ce(e,t){return r=>r==="rtl"?t:e}const tu=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,ru=/^\s*\w+\(/,nu=/(static-)?size-\d+|single-line-(height|width)/g;function Y(e){return typeof e=="number"?e+"px":tu.test(e)?e:ru.test(e)?e.replace(nu,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function We(e,t){return e=tr(e,t),Y(e)}function $i(e,t="default"){return`var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t}))`}function au(e){return`var(--spectrum-alias-background-color-${e}, ${$i(e,"background")})`}function Te(e){return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${$i(e,"border")})`}function Ce(e){return`var(--spectrum-alias-border-size-${e})`}function Se(e){return`var(--spectrum-alias-border-radius-${e})`}function iu(e){return e?"none":void 0}function Pr(e){return e}function ou(e){return typeof e=="boolean"?e?"1":void 0:""+e}function wi(e,t,r,n){let a={};for(let i in e){let s=t[i];if(!s||e[i]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(r));let h=tr(e[i],n),p=l(h);if(Array.isArray(o))for(let w of o)a[w]=p;else a[o]=p}for(let i in ia)a[i]&&(a[ia[i]]="solid",a.boxSizing="border-box");return a}function Ae(e,t=er,r={}){let{UNSAFE_className:n,UNSAFE_style:a,...i}=e,s=_n(),{direction:o}=_e(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=r,h=wi(e,t,o,l),p={...a,...h};i.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),i.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let w={style:p,className:n};return tr(e.isHidden,l)&&(w.hidden=!0),{styleProps:w}}function ne(e){return e}function tr(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let r=0;r<t.length;r++){let n=t[r];if(e[n]!=null)return e[n]}return e.base}return e}var rr={};Q(rr,"useSlotProps",()=>Et);Q(rr,"cssModuleToSlots",()=>su);Q(rr,"SlotProvider",()=>lu);Q(rr,"ClearSlots",()=>Pt);let Wt=W.default.createContext(null);function Et(e,t){let r=e.slot||t,{[r]:n={}}=P.useContext(Wt)||{};return Pe(e,Pe(n,{id:e.id}))}function su(e){return Object.keys(e).reduce((t,r)=>(t[r]={UNSAFE_className:e[r]},t),{})}function lu(e){let t=P.useContext(Wt)||{},{slots:r={},children:n}=e,a=P.useMemo(()=>Object.keys(t).concat(Object.keys(r)).reduce((i,s)=>({...i,[s]:Pe(t[s]||{},r[s]||{})}),{}),[t,r]);return W.default.createElement(Wt.Provider,{value:a},n)}function Pt(e){let{children:t,...r}=e,n=t;return W.default.Children.toArray(t).length<=1&&typeof t=="function"&&(n=W.default.cloneElement(W.default.Children.only(t),r)),W.default.createElement(Wt.Provider,{value:{}},n)}var uu={};Q(uu,"useHasChild",()=>cu);function cu(e,t){let[r,n]=P.useState(!0);return he(()=>{n(!!(t.current&&t.current.querySelector(e)))},[n,e,t]),r}var fu={};Q(fu,"useResizeObserver",()=>ui);var du={};Q(du,"useIsMobileDevice",()=>pu);const hu=700;function pu(){return at()||typeof window=="undefined"?!1:window.screen.width<=hu}var mu={};Q(mu,"useValueEffect",()=>Cn);function yt(e){return e&&e.ownerDocument||document}function vu(e){var t=yt(e);return t&&t.defaultView||window}function gu(e,t){return vu(e).getComputedStyle(e,t)}var bu=/([A-Z])/g;function yu(e){return e.replace(bu,"-$1").toLowerCase()}var $u=/^ms-/;function Ot(e){return yu(e).replace($u,"-ms-")}var wu=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Eu(e){return!!(e&&wu.test(e))}function Me(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Ot(t))||gu(e).getPropertyValue(Ot(t));Object.keys(t).forEach(function(a){var i=t[a];!i&&i!==0?e.style.removeProperty(Ot(a)):Eu(a)?n+=a+"("+i+") ":r+=Ot(a)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}function Pu(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function xu(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function Au(e){return"window"in e&&e.window===e?e:xu(e)&&e.defaultView||!1}function Ei(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function r(n,a){var i=Au(n);if(a===void 0)return i?i[e]:n[t];i?i.scrollTo(i[e],a):n[t]=a}return r}var ht=Ei("pageXOffset"),pt=Ei("pageYOffset");function et(e){var t=yt(e),r={top:0,left:0,height:0,width:0},n=t&&t.documentElement;return!n||!Pu(n,e)||(e.getBoundingClientRect!==void 0&&(r=e.getBoundingClientRect()),r={top:r.top+pt(n)-(n.clientTop||0),left:r.left+ht(n)-(n.clientLeft||0),width:r.width,height:r.height}),r}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(this,arguments)}var Tu=function(t){return!!t&&"offsetParent"in t};function Cu(e){for(var t=yt(e),r=e&&e.offsetParent;Tu(r)&&r.nodeName!=="HTML"&&Me(r,"position")==="static";)r=r.offsetParent;return r||t.documentElement}var Su=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function oa(e,t){var r={top:0,left:0},n;if(Me(e,"position")==="fixed")n=e.getBoundingClientRect();else{var a=t||Cu(e);n=et(e),Su(a)!=="html"&&(r=et(a));var i=String(Me(a,"borderTopWidth")||0);r.top+=parseInt(i,10)-pt(a)||0;var s=String(Me(a,"borderLeftWidth")||0);r.left+=parseInt(s,10)-ht(a)||0}var o=String(Me(e,"marginTop")||0),l=String(Me(e,"marginLeft")||0);return Wr({},n,{top:n.top-r.top-(parseInt(o,10)||0),left:n.left-r.left-(parseInt(l,10)||0)})}function ie(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ku={};ie(ku,"Pressable",()=>Du);var Ou={};ie(Ou,"usePress",()=>Mn);let Ze="default",Vr="",Nt=new WeakMap;function Ur(e){wt()?(Ze==="default"&&(Vr=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Ze="disabled"):e&&(Nt.set(e,e.style.userSelect),e.style.userSelect="none")}function dt(e){if(wt()){if(Ze!=="disabled")return;Ze="restoring",setTimeout(()=>{si(()=>{Ze==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=Vr||""),Vr="",Ze="default")})},300)}else if(e&&Nt.has(e)){let t=Nt.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Nt.delete(e)}}function jr(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}class Ru{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function Pi(e){let t=P.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),P.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,a=i=>{var s,o;t.current.isFocused=!1,n.disabled&&((o=(s=t.current).onBlur)===null||o===void 0||o.call(s,new Ru("blur",i))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}const Vt=W.default.createContext(null);Vt.displayName="PressResponderContext";function _u(e){let t=P.useContext(Vt);if(t){let{register:r,...n}=t;e=Pe(n,e),r()}return Pn(t,e.ref),e}function Mn(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:p,ref:w,...b}=_u(e),v=P.useRef(null);v.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,shouldCancelOnPointerExit:h};let[x,A]=P.useState(!1),k=P.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:S}=Qt(),O=P.useMemo(()=>{let g=k.current,D=(E,m)=>{let{onPressStart:d,onPressChange:y,isDisabled:f}=v.current;f||g.didFirePressStart||(d&&d({type:"pressstart",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),y&&y(!0),g.didFirePressStart=!0,A(!0))},M=(E,m,d=!0)=>{let{onPressEnd:y,onPressChange:f,onPress:c,isDisabled:T}=v.current;!g.didFirePressStart||(g.ignoreClickAfterPress=!0,g.didFirePressStart=!1,y&&y({type:"pressend",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),f&&f(!1),A(!1),c&&d&&!T&&c({type:"press",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}))},N=(E,m)=>{let{onPressUp:d,isDisabled:y}=v.current;y||d&&d({type:"pressup",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey})},I=E=>{g.isPressed&&(g.isOverTarget&&M(ke(g.target,E),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},R={onKeyDown(E){xr(E.nativeEvent)&&E.currentTarget.contains(E.target)&&(la(E.target)&&E.preventDefault(),E.stopPropagation(),!g.isPressed&&!E.repeat&&(g.target=E.currentTarget,g.isPressed=!0,D(E,"keyboard"),C(document,"keyup",B,!1)))},onKeyUp(E){xr(E.nativeEvent)&&!E.repeat&&E.currentTarget.contains(E.target)&&N(ke(g.target,E),"keyboard")},onClick(E){E&&!E.currentTarget.contains(E.target)||E&&E.button===0&&(E.stopPropagation(),s&&E.preventDefault(),!g.ignoreClickAfterPress&&!g.ignoreEmulatedMouseEvents&&(g.pointerType==="virtual"||jr(E.nativeEvent))&&(!s&&!l&&ft(E.currentTarget),D(E,"virtual"),N(E,"virtual"),M(E,"virtual")),g.ignoreEmulatedMouseEvents=!1,g.ignoreClickAfterPress=!1)}},B=E=>{if(g.isPressed&&xr(E)){la(E.target)&&E.preventDefault(),E.stopPropagation(),g.isPressed=!1;let m=E.target;M(ke(g.target,E),"keyboard",g.target.contains(m)),S(),(g.target.contains(m)&&xi(g.target)||g.target.getAttribute("role")==="link")&&g.target.click()}};if(typeof PointerEvent!="undefined"){R.onPointerDown=y=>{if(!(y.button!==0||!y.currentTarget.contains(y.target))){if(Nu(y.nativeEvent)){g.pointerType="virtual";return}Ar(y.currentTarget)&&y.preventDefault(),g.pointerType=y.pointerType,y.stopPropagation(),g.isPressed||(g.isPressed=!0,g.isOverTarget=!0,g.activePointerId=y.pointerId,g.target=y.currentTarget,!s&&!l&&ft(y.currentTarget),p||Ur(g.target),D(y,g.pointerType),C(document,"pointermove",E,!1),C(document,"pointerup",m,!1),C(document,"pointercancel",d,!1))}},R.onMouseDown=y=>{!y.currentTarget.contains(y.target)||y.button===0&&(Ar(y.currentTarget)&&y.preventDefault(),y.stopPropagation())},R.onPointerUp=y=>{!y.currentTarget.contains(y.target)||g.pointerType==="virtual"||y.button===0&&Ke(y,y.currentTarget)&&N(y,g.pointerType||y.pointerType)};let E=y=>{y.pointerId===g.activePointerId&&(Ke(y,g.target)?g.isOverTarget||(g.isOverTarget=!0,D(ke(g.target,y),g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(ke(g.target,y),g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(y)))},m=y=>{y.pointerId===g.activePointerId&&g.isPressed&&y.button===0&&(Ke(y,g.target)?M(ke(g.target,y),g.pointerType):g.isOverTarget&&M(ke(g.target,y),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},d=y=>{I(y)};R.onDragStart=y=>{!y.currentTarget.contains(y.target)||I(y)}}else{R.onMouseDown=d=>{d.button!==0||!d.currentTarget.contains(d.target)||(Ar(d.currentTarget)&&d.preventDefault(),d.stopPropagation(),!g.ignoreEmulatedMouseEvents&&(g.isPressed=!0,g.isOverTarget=!0,g.target=d.currentTarget,g.pointerType=jr(d.nativeEvent)?"virtual":"mouse",!s&&!l&&ft(d.currentTarget),D(d,g.pointerType),C(document,"mouseup",E,!1)))},R.onMouseEnter=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!0,D(d,g.pointerType)))},R.onMouseLeave=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d)))},R.onMouseUp=d=>{!d.currentTarget.contains(d.target)||!g.ignoreEmulatedMouseEvents&&d.button===0&&N(d,g.pointerType)};let E=d=>{if(d.button===0){if(g.isPressed=!1,S(),g.ignoreEmulatedMouseEvents){g.ignoreEmulatedMouseEvents=!1;return}Ke(d,g.target)?M(ke(g.target,d),g.pointerType):g.isOverTarget&&M(ke(g.target,d),g.pointerType,!1),g.isOverTarget=!1}};R.onTouchStart=d=>{if(!d.currentTarget.contains(d.target))return;d.stopPropagation();let y=Mu(d.nativeEvent);!y||(g.activePointerId=y.identifier,g.ignoreEmulatedMouseEvents=!0,g.isOverTarget=!0,g.isPressed=!0,g.target=d.currentTarget,g.pointerType="touch",!s&&!l&&ft(d.currentTarget),p||Ur(g.target),D(d,g.pointerType),C(window,"scroll",m,!0))},R.onTouchMove=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?g.isOverTarget||(g.isOverTarget=!0,D(d,g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d))},R.onTouchEnd=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?(N(d,g.pointerType),M(d,g.pointerType)):g.isOverTarget&&M(d,g.pointerType,!1),g.isPressed=!1,g.activePointerId=null,g.isOverTarget=!1,g.ignoreEmulatedMouseEvents=!0,p||dt(g.target),S()},R.onTouchCancel=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&I(d))};let m=d=>{g.isPressed&&d.target.contains(g.target)&&I({currentTarget:g.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=d=>{!d.currentTarget.contains(d.target)||I(d)}}return R},[C,s,l,S,p]);return P.useEffect(()=>()=>{p||dt(k.current.target)},[p]),{isPressed:o||x,pressProps:Pe(b,O)}}function xi(e){return e.tagName==="A"&&e.hasAttribute("href")}function xr(e){const{key:t,code:r,target:n}=e,a=n,{tagName:i,isContentEditable:s}=a,o=a.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||r==="Space")&&i!=="INPUT"&&i!=="TEXTAREA"&&s!==!0&&(!xi(a)||o==="button"&&t!=="Enter")&&!(o==="link"&&t!=="Enter")}function Mu(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function sa(e,t){const r=e.changedTouches;for(let n=0;n<r.length;n++){const a=r[n];if(a.identifier===t)return a}return null}function ke(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Lu(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Iu(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ke(e,t){let r=t.getBoundingClientRect(),n=Lu(e);return Iu(r,n)}function Ar(e){return!e.draggable}function la(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&e.type==="submit")}function Nu(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const Du=W.default.forwardRef(({children:e,...t},r)=>{let n=P.useRef();r=r!=null?r:n;let{pressProps:a}=Mn({...t,ref:r}),i=W.default.Children.only(e);return W.default.cloneElement(i,{ref:r,...Pe(i.props,a)})});var Bu={};ie(Bu,"PressResponder",()=>Hu);const Hu=W.default.forwardRef(({children:e,...t},r)=>{let n=P.useRef(!1),a=P.useContext(Vt),i=Pe(a||{},{...t,ref:r||(a==null?void 0:a.ref),register(){n.current=!0,a&&a.register()}});return Pn(a,r),P.useEffect(()=>{n.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")},[]),W.default.createElement(Vt.Provider,{value:i},e)});var Fu={};ie(Fu,"useFocus",()=>Ai);function Ai(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const i=P.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),a&&a(!1),!0},[n,a]),s=Pi(i),o=P.useCallback(l=>{l.target===l.currentTarget&&(r&&r(l),a&&a(!0),s(l))},[a,r,s]);return{focusProps:{onFocus:!t&&(r||a||n)?o:void 0,onBlur:!t&&(n||a)?i:null}}}var ot={};ie(ot,"isFocusVisible",()=>Ln);ie(ot,"getInteractionModality",()=>zu);ie(ot,"setInteractionModality",()=>Xu);ie(ot,"useInteractionModality",()=>Ku);ie(ot,"useFocusVisible",()=>qu);ie(ot,"useFocusVisibleListener",()=>Ti);let Re=null,$t=new Set,ua=!1,Ve=!1,Gr=!1;const Wu={Tab:!0,Escape:!0};function nr(e,t){for(let r of $t)r(e,t)}function Vu(e){return!(e.metaKey||!Zt()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ca(e){Ve=!0,Vu(e)&&(Re="keyboard",nr("keyboard",e))}function Ye(e){Re="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ve=!0,nr("pointer",e))}function Uu(e){jr(e)&&(Ve=!0,Re="virtual")}function ju(e){e.target===window||e.target===document||(!Ve&&!Gr&&(Re="virtual",nr("virtual",e)),Ve=!1,Gr=!1)}function Gu(){Ve=!1,Gr=!0}function Ut(){if(typeof window=="undefined"||ua)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Ve=!0,e.apply(this,arguments)},document.addEventListener("keydown",ca,!0),document.addEventListener("keyup",ca,!0),document.addEventListener("click",Uu,!0),window.addEventListener("focus",ju,!0),window.addEventListener("blur",Gu,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Ye,!0),document.addEventListener("pointermove",Ye,!0),document.addEventListener("pointerup",Ye,!0)):(document.addEventListener("mousedown",Ye,!0),document.addEventListener("mousemove",Ye,!0),document.addEventListener("mouseup",Ye,!0)),ua=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Ut():document.addEventListener("DOMContentLoaded",Ut));function Ln(){return Re!=="pointer"}function zu(){return Re}function Xu(e){Re=e,nr(e,null)}function Ku(){Ut();let[e,t]=P.useState(Re);return P.useEffect(()=>{let r=()=>{t(Re)};return $t.add(r),()=>{$t.delete(r)}},[]),e}function Yu(e,t,r){return!(e&&t==="keyboard"&&r instanceof KeyboardEvent&&!Wu[r.key])}function qu(e={}){let{isTextInput:t,autoFocus:r}=e,[n,a]=P.useState(r||Ln());return Ti(i=>{a(i)},[t],{isTextInput:t}),{isFocusVisible:n}}function Ti(e,t,r){Ut(),P.useEffect(()=>{let n=(a,i)=>{!Yu(r==null?void 0:r.isTextInput,a,i)||e(Ln())};return $t.add(n),()=>{$t.delete(n)}},t)}var Ju={};ie(Ju,"useFocusWithin",()=>Ci);function Ci(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,i=P.useRef({isFocusWithin:!1}),s=P.useCallback(h=>{i.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(h),a&&a(!1))},[r,a,i]),o=Pi(s),l=P.useCallback(h=>{i.current.isFocusWithin||(n&&n(h),a&&a(!0),i.current.isFocusWithin=!0,o(h))},[n,a,o]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}var Qu={};ie(Qu,"useHover",()=>ec);let jt=!1,Tr=0;function zr(){jt=!0,setTimeout(()=>{jt=!1},50)}function fa(e){e.pointerType==="touch"&&zr()}function Zu(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",fa):document.addEventListener("touchend",zr),Tr++,()=>{Tr--,!(Tr>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",fa):document.removeEventListener("touchend",zr))}}function ec(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[i,s]=P.useState(!1),o=P.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;P.useEffect(Zu,[]);let{hoverProps:l,triggerHoverEnd:h}=P.useMemo(()=>{let p=(v,x)=>{if(o.pointerType=x,a||x==="touch"||o.isHovered||!v.currentTarget.contains(v.target))return;o.isHovered=!0;let A=v.currentTarget;o.target=A,t&&t({type:"hoverstart",target:A,pointerType:x}),r&&r(!0),s(!0)},w=(v,x)=>{if(o.pointerType="",o.target=null,x==="touch"||!o.isHovered)return;o.isHovered=!1;let A=v.currentTarget;n&&n({type:"hoverend",target:A,pointerType:x}),r&&r(!1),s(!1)},b={};return typeof PointerEvent!="undefined"?(b.onPointerEnter=v=>{jt&&v.pointerType==="mouse"||p(v,v.pointerType)},b.onPointerLeave=v=>{!a&&v.currentTarget.contains(v.target)&&w(v,v.pointerType)}):(b.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=v=>{!o.ignoreEmulatedMouseEvents&&!jt&&p(v,"mouse"),o.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=v=>{!a&&v.currentTarget.contains(v.target)&&w(v,"mouse")}),{hoverProps:b,triggerHoverEnd:w}},[t,r,n,a,o]);return P.useEffect(()=>{a&&h({currentTarget:o.target},o.pointerType)},[a]),{hoverProps:l,isHovered:i}}var tc={};ie(tc,"useInteractOutside",()=>Si);function Si(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,s=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:a}).current;s.onInteractOutside=r,s.onInteractOutsideStart=a,P.useEffect(()=>{if(n)return;let o=l=>{Rt(l,t)&&s.onInteractOutside&&(s.onInteractOutsideStart&&s.onInteractOutsideStart(l),s.isPointerDown=!0)};if(typeof PointerEvent!="undefined"){let l=h=>{s.isPointerDown&&s.onInteractOutside&&Rt(h,t)&&(s.isPointerDown=!1,s.onInteractOutside(h))};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",l,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",l,!0)}}else{let l=p=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&s.onInteractOutside&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))},h=p=>{s.ignoreEmulatedMouseEvents=!0,s.onInteractOutside&&s.isPointerDown&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",l,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",h,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",l,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",h,!0)}}},[t,s,n])}function Rt(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}var rc={};ie(rc,"useKeyboard",()=>nc);function da(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function nc(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:da(e.onKeyDown),onKeyUp:da(e.onKeyUp)}}}var ac={};ie(ac,"useMove",()=>ic);function ic(e){let{onMoveStart:t,onMove:r,onMoveEnd:n}=e,a=P.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:i,removeGlobalListener:s}=Qt();return{moveProps:P.useMemo(()=>{let l={},h=()=>{Ur(),a.current.didMove=!1},p=(v,x,A,k)=>{A===0&&k===0||(a.current.didMove||(a.current.didMove=!0,t==null||t({type:"movestart",pointerType:x,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey})),r({type:"move",pointerType:x,deltaX:A,deltaY:k,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))},w=(v,x)=>{dt(),a.current.didMove&&(n==null||n({type:"moveend",pointerType:x,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))};if(typeof PointerEvent=="undefined"){let v=C=>{C.button===0&&(p(C,"mouse",C.pageX-a.current.lastPosition.pageX,C.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY})},x=C=>{C.button===0&&(w(C,"mouse"),s(window,"mousemove",v,!1),s(window,"mouseup",x,!1))};l.onMouseDown=C=>{C.button===0&&(h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY},i(window,"mousemove",v,!1),i(window,"mouseup",x,!1))};let A=C=>{let S=[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id);if(S>=0){let{pageX:O,pageY:g}=C.changedTouches[S];p(C,"touch",O-a.current.lastPosition.pageX,g-a.current.lastPosition.pageY),a.current.lastPosition={pageX:O,pageY:g}}},k=C=>{[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id)>=0&&(w(C,"touch"),a.current.id=null,s(window,"touchmove",A),s(window,"touchend",k),s(window,"touchcancel",k))};l.onTouchStart=C=>{if(C.changedTouches.length===0||a.current.id!=null)return;let{pageX:S,pageY:O,identifier:g}=C.changedTouches[0];h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:S,pageY:O},a.current.id=g,i(window,"touchmove",A,!1),i(window,"touchend",k,!1),i(window,"touchcancel",k,!1)}}else{let v=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";p(A,k,A.pageX-a.current.lastPosition.pageX,A.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY}}},x=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";w(A,k),a.current.id=null,s(window,"pointermove",v,!1),s(window,"pointerup",x,!1),s(window,"pointercancel",x,!1)}};l.onPointerDown=A=>{A.button===0&&a.current.id==null&&(h(),A.stopPropagation(),A.preventDefault(),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY},a.current.id=A.pointerId,i(window,"pointermove",v,!1),i(window,"pointerup",x,!1),i(window,"pointercancel",x,!1))}}let b=(v,x,A)=>{h(),p(v,"keyboard",x,A),w(v,"keyboard")};return l.onKeyDown=v=>{switch(v.key){case"Left":case"ArrowLeft":v.preventDefault(),v.stopPropagation(),b(v,-1,0);break;case"Right":case"ArrowRight":v.preventDefault(),v.stopPropagation(),b(v,1,0);break;case"Up":case"ArrowUp":v.preventDefault(),v.stopPropagation(),b(v,0,-1);break;case"Down":case"ArrowDown":v.preventDefault(),v.stopPropagation(),b(v,0,1);break}},l},[a,t,r,n,i,s])}}var oc={};ie(oc,"useScrollWheel",()=>sc);function sc(e,t){let{onScroll:r,isDisabled:n}=e,a=P.useCallback(i=>{i.ctrlKey||(i.preventDefault(),i.stopPropagation(),r&&r({deltaX:i.deltaX,deltaY:i.deltaY}))},[r]);pi(t,"wheel",n?null:a)}var lc={};ie(lc,"useLongPress",()=>cc);const uc=500;function cc(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:n,onLongPress:a,threshold:i=uc,accessibilityDescription:s}=e;const o=P.useRef(null);let{addGlobalListener:l,removeGlobalListener:h}=Qt(),{pressProps:p}=Mn({isDisabled:t,onPressStart(b){if((b.pointerType==="mouse"||b.pointerType==="touch")&&(r&&r({...b,type:"longpressstart"}),o.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...b,type:"longpress"}),o.current=null},i),b.pointerType==="touch")){let v=x=>{x.preventDefault()};l(b.target,"contextmenu",v,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{h(b.target,"contextmenu",v)},30)},{once:!0})}},onPressEnd(b){o.current&&clearTimeout(o.current),n&&(b.pointerType==="mouse"||b.pointerType==="touch")&&n({...b,type:"longpressend"})}}),w=ci(a&&!t?s:null);return{longPressProps:Pe(p,w)}}function ki(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Oi={};ki(Oi,"useVisuallyHidden",()=>Ri);ki(Oi,"VisuallyHidden",()=>_i);const ha={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"};function Ri(e={}){let{style:t,isFocusable:r}=e,[n,a]=P.useState(!1),{focusProps:i}=Ai({isDisabled:!r,onFocusChange:a}),s=P.useMemo(()=>n?t:t?{...ha,...t}:ha,[n]);return{visuallyHiddenProps:{...i,style:s}}}function _i(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...i}=e,{visuallyHiddenProps:s}=Ri(e);return W.default.createElement(r,Pe(i,s),t)}function ye(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function fc(e){return e&&e.__esModule?e.default:e}var dc={};ye(dc,"useOverlayPosition",()=>wc);const pa={top:"top",bottom:"top",left:"left",right:"left"},Gt={top:"bottom",bottom:"top",left:"right",right:"left"},hc={top:"left",left:"top"},Xr={top:"height",left:"width"},_t={};let qe=typeof window!="undefined"&&window.visualViewport;function pc(e){let t=0,r=0,n=0,a=0,i={};if(e.tagName==="BODY"){var s;t=(s=qe==null?void 0:qe.width)!==null&&s!==void 0?s:document.documentElement.clientWidth;var o;r=(o=qe==null?void 0:qe.height)!==null&&o!==void 0?o:document.documentElement.clientHeight,i.top=pt(yt(e).documentElement)||pt(e),i.left=ht(yt(e).documentElement)||ht(e)}else({width:t,height:r,top:n,left:a}=et(e)),i.top=pt(e),i.left=ht(e);return{width:t,height:r,scroll:i,top:n,left:a}}function mc(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ma(e,t,r,n,a){let i=n.scroll[e],s=n[Xr[e]],o=t-a-i,l=t+a-i+r;return o<0?-o:l>s?Math.max(s-l,-o):0}function vc(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function va(e){if(_t[e])return _t[e];let[t,r]=e.split(" "),n=pa[t]||"right",a=hc[n];pa[r]||(r="center");let i=Xr[n],s=Xr[a];return _t[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:i,crossSize:s},_t[e]}function Cr(e,t,r,n,a,i,s,o){let{placement:l,crossPlacement:h,axis:p,crossAxis:w,size:b,crossSize:v}=n,x={};x[w]=e[w],h==="center"?x[w]+=(e[v]-r[v])/2:h!==w&&(x[w]+=e[v]-r[v]),x[w]+=i;let A=e[w]+e[v]/2-r[v],k=e[w]+e[v]/2;if(x[w]=Math.min(Math.max(A,x[w]),k),l===p){const C=o?s[b]:t[b];x[Gt[p]]=Math.floor(C-e[p]+a)}else x[p]=Math.floor(e[p]+e[b]+a);return x}function gc(e,t,r,n,a,i){return e.top!=null?Math.max(0,t.height+t.top+t.scroll.top-(r.top+e.top)-(a.top+a.bottom+i)):Math.max(0,n.top+r.top-(t.top+t.scroll.top)-(a.top+a.bottom+i))}function ga(e,t,r,n,a,i){let{placement:s,axis:o,size:l}=i;return s===o?Math.max(0,r[o]-e[o]-e.scroll[o]+t[o]-n[o]-n[Gt[o]]-a):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-r[o]-r[l]-n[o]-n[Gt[o]]-a)}function bc(e,t,r,n,a,i,s,o,l,h,p,w,b){let v=va(e),{size:x,crossAxis:A,crossSize:k,placement:C,crossPlacement:S}=v,O=Cr(t,o,r,v,h,p,l,w),g=h,D=ga(o,l,t,a,i+h,v);if(s&&n[x]>D){let R=va(`${Gt[C]} ${S}`),B=Cr(t,o,r,R,h,p,l,w);ga(o,l,t,a,i+h,R)>D&&(v=R,O=B,g=h)}let M=ma(A,O[A],r[k],o,i);O[A]+=M;let N=gc(O,o,l,t,a,i);b&&b<N&&(N=b),r.height=Math.min(r.height,N),O=Cr(t,o,r,v,g,p,l,w),M=ma(A,O[A],r[k],o,i),O[A]+=M;let I={};return I[A]=t[A]-O[A]+t[k]/2,{position:O,maxHeight:N,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:v.placement}}function yc(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:i,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:h,maxHeight:p}=e,w=n.offsetParent||document.body,b=w.tagName==="BODY";const v=window.getComputedStyle(w).position;let x=!!v&&v!=="static",A=b?et(r):oa(r,w);if(!b){let D=String(Me(r,"marginTop")),M=String(Me(r,"marginLeft"));A.top+=parseInt(D,10)||0,A.left+=parseInt(M,10)||0}let k=et(n),C=vc(n);k.width+=C.left+C.right,k.height+=C.top+C.bottom;let S=mc(a),O=pc(o),g=o.tagName==="BODY"?et(w):oa(w,o);return bc(t,A,k,S,C,i,s,O,g,l,h,x,p)}const Mi=new WeakMap;function $c(e){let{triggerRef:t,isOpen:r,onClose:n}=e;P.useEffect(()=>{if(!r)return;let a=i=>{let s=i.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=n||Mi.get(t.current);o&&o()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}let Je=typeof window!="undefined"&&window.visualViewport;function wc(e){let{direction:t}=_e(),{targetRef:r,overlayRef:n,scrollRef:a=n,placement:i="bottom",containerPadding:s=12,shouldFlip:o=!0,boundaryElement:l=typeof document!="undefined"?document.body:null,offset:h=0,crossOffset:p=0,shouldUpdatePosition:w=!0,isOpen:b=!0,onClose:v,maxHeight:x}=e,[A,k]=P.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),C=[w,i,n.current,r.current,a.current,s,o,l,h,p,b,t,x],S=P.useCallback(()=>{w===!1||!b||!n.current||!r.current||!a.current||!l||k(yc({placement:Pc(i,t),overlayNode:n.current,targetNode:r.current,scrollNode:a.current,padding:s,shouldFlip:o,boundaryElement:l,offset:h,crossOffset:p,maxHeight:x}))},C);he(S,C),Ec(S);let O=P.useRef(!1);he(()=>{let D,M=()=>{O.current=!0,clearTimeout(D),D=setTimeout(()=>{O.current=!1},500),S()};return Je==null||Je.addEventListener("resize",M),()=>{Je==null||Je.removeEventListener("resize",M)}},[S]);let g=P.useCallback(()=>{O.current||v()},[v,O]);return $c({triggerRef:r,isOpen:b,onClose:v?g:void 0}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...A.position,maxHeight:A.maxHeight}},placement:A.placement,arrowProps:{style:{left:A.arrowOffsetLeft,top:A.arrowOffsetTop}},updatePosition:S}}function Ec(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function Pc(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}var xc={};ye(xc,"useOverlay",()=>Ac);const Oe=[];function Ac(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:i=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;P.useEffect(()=>(a&&Oe.push(t),()=>{let x=Oe.indexOf(t);x>=0&&Oe.splice(x,1)}),[a,t]);let l=()=>{Oe[Oe.length-1]===t&&r&&r()},h=x=>{(!o||o(x.target))&&Oe[Oe.length-1]===t&&(x.stopPropagation(),x.preventDefault())},p=x=>{(!o||o(x.target))&&(Oe[Oe.length-1]===t&&(x.stopPropagation(),x.preventDefault()),l())},w=x=>{x.key==="Escape"&&!s&&(x.stopPropagation(),x.preventDefault(),l())};Si({ref:t,onInteractOutside:i?p:null,onInteractOutsideStart:h});let{focusWithinProps:b}=Ci({isDisabled:!n,onBlurWithin:x=>{(!o||o(x.relatedTarget))&&r()}}),v=x=>{x.target===x.currentTarget&&x.preventDefault()};return{overlayProps:{onKeyDown:w,...b},underlayProps:{onPointerDown:v}}}var Tc={};ye(Tc,"useOverlayTrigger",()=>Cc);function Cc(e,t,r){let{type:n}=e,{isOpen:a}=t;P.useEffect(()=>{r&&r.current&&Mi.set(r.current,t.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let s=Jt();return{triggerProps:{"aria-haspopup":i,"aria-expanded":a,"aria-controls":a?s:null},overlayProps:{id:s}}}var Sc={};ye(Sc,"usePreventScroll",()=>Oc);const Sr=typeof window!="undefined"&&window.visualViewport,kc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oc(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return wt()?_c():Rc()},[t])}function Rc(){return bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"))}function _c(){let e,t=0,r=w=>{e=xn(w.target),!(e===document.documentElement&&e===document.body)&&(t=w.changedTouches[0].pageY)},n=w=>{if(e===document.documentElement||e===document.body){w.preventDefault();return}let b=w.changedTouches[0].pageY,v=e.scrollTop,x=e.scrollHeight-e.clientHeight;(v<=0&&b>t||v>=x&&b<t)&&w.preventDefault(),t=b},a=w=>{let b=w.target;ya(b)&&b!==document.activeElement&&(w.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},i=w=>{let b=w.target;ya(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",Sr&&(Sr.height<window.innerHeight?requestAnimationFrame(()=>{ba(b)}):Sr.addEventListener("resize",()=>ba(b),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},o=window.pageXOffset,l=window.pageYOffset,h=bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"),mt(document.body,"marginTop",`-${l}px`));window.scrollTo(0,0);let p=bt(st(document,"touchstart",r,{passive:!1,capture:!0}),st(document,"touchmove",n,{passive:!1,capture:!0}),st(document,"touchend",a,{passive:!1,capture:!0}),st(document,"focus",i,!0),st(window,"scroll",s));return()=>{h(),p(),window.scrollTo(o,l)}}function mt(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function st(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function ba(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=xn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let n=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top;a>n+e.clientHeight&&(r.scrollTop+=a-n)}e=r.parentElement}}function ya(e){return e instanceof HTMLInputElement&&!kc.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var xt={};ye(xt,"ModalProvider",()=>In);ye(xt,"useModalProvider",()=>Nn);ye(xt,"OverlayProvider",()=>Li);ye(xt,"OverlayContainer",()=>Lc);ye(xt,"useModal",()=>Ic);const zt=W.default.createContext(null);function In(e){let{children:t}=e,r=P.useContext(zt),[n,a]=P.useState(0),i=P.useMemo(()=>({parent:r,modalCount:n,addModal(){a(s=>s+1),r&&r.addModal()},removeModal(){a(s=>s-1),r&&r.removeModal()}}),[r,n]);return W.default.createElement(zt.Provider,{value:i},t)}function Nn(){let e=P.useContext(zt);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function Mc(e){let{modalProviderProps:t}=Nn();return W.default.createElement("div",{"data-overlay-container":!0,...e,...t})}function Li(e){return W.default.createElement(In,null,W.default.createElement(Mc,e))}function Lc(e){let{portalContainer:t=document.body,...r}=e;W.default.useEffect(()=>{if(t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]);let n=W.default.createElement(Li,r);return xa.default.createPortal(n,t)}function Ic(e){let t=P.useContext(zt);if(!t)throw new Error("Modal is not contained within a provider");return P.useEffect(()=>{if(!((e==null?void 0:e.isDisabled)||!t||!t.parent))return t.parent.addModal(),()=>{t&&t.parent&&t.parent.removeModal()}},[t,t.parent,e==null?void 0:e.isDisabled]),{modalProps:{"data-ismodal":!(e!=null&&e.isDisabled)}}}var Nc={};ye(Nc,"DismissButton",()=>Dc);var Ii={},Ni={};Ni=JSON.parse('{"dismiss":"\u062A\u062C\u0627\u0647\u0644"}');var Di={};Di=JSON.parse('{"dismiss":"\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"}');var Bi={};Bi=JSON.parse('{"dismiss":"Odstranit"}');var Hi={};Hi=JSON.parse('{"dismiss":"Luk"}');var Fi={};Fi=JSON.parse('{"dismiss":"Schlie\xDFen"}');var Wi={};Wi=JSON.parse('{"dismiss":"\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"}');var Vi={};Vi=JSON.parse('{"dismiss":"Dismiss"}');var Ui={};Ui=JSON.parse('{"dismiss":"Descartar"}');var ji={};ji=JSON.parse('{"dismiss":"L\xF5peta"}');var Gi={};Gi=JSON.parse('{"dismiss":"Hylk\xE4\xE4"}');var zi={};zi=JSON.parse('{"dismiss":"Rejeter"}');var Xi={};Xi=JSON.parse('{"dismiss":"\u05D4\u05EA\u05E2\u05DC\u05DD"}');var Ki={};Ki=JSON.parse('{"dismiss":"Odbaci"}');var Yi={};Yi=JSON.parse('{"dismiss":"Elutas\xEDt\xE1s"}');var qi={};qi=JSON.parse('{"dismiss":"Ignora"}');var Ji={};Ji=JSON.parse('{"dismiss":"\u9589\u3058\u308B"}');var Qi={};Qi=JSON.parse('{"dismiss":"\uBB34\uC2DC"}');var Zi={};Zi=JSON.parse('{"dismiss":"Atmesti"}');var eo={};eo=JSON.parse('{"dismiss":"Ner\u0101d\u012Bt"}');var to={};to=JSON.parse('{"dismiss":"Lukk"}');var ro={};ro=JSON.parse('{"dismiss":"Negeren"}');var no={};no=JSON.parse('{"dismiss":"Zignoruj"}');var ao={};ao=JSON.parse('{"dismiss":"Descartar"}');var io={};io=JSON.parse('{"dismiss":"Dispensar"}');var oo={};oo=JSON.parse('{"dismiss":"Revocare"}');var so={};so=JSON.parse('{"dismiss":"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"}');var lo={};lo=JSON.parse('{"dismiss":"Zru\u0161i\u0165"}');var uo={};uo=JSON.parse('{"dismiss":"Opusti"}');var co={};co=JSON.parse('{"dismiss":"Odbaci"}');var fo={};fo=JSON.parse('{"dismiss":"Avvisa"}');var ho={};ho=JSON.parse('{"dismiss":"Kapat"}');var po={};po=JSON.parse('{"dismiss":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"}');var mo={};mo=JSON.parse('{"dismiss":"\u53D6\u6D88"}');var vo={};vo=JSON.parse('{"dismiss":"\u95DC\u9589"}');Ii={"ar-AE":Ni,"bg-BG":Di,"cs-CZ":Bi,"da-DK":Hi,"de-DE":Fi,"el-GR":Wi,"en-US":Vi,"es-ES":Ui,"et-EE":ji,"fi-FI":Gi,"fr-FR":zi,"he-IL":Xi,"hr-HR":Ki,"hu-HU":Yi,"it-IT":qi,"ja-JP":Ji,"ko-KR":Qi,"lt-LT":Zi,"lv-LV":eo,"nb-NO":to,"nl-NL":ro,"pl-PL":no,"pt-BR":ao,"pt-PT":io,"ro-RO":oo,"ru-RU":so,"sk-SK":lo,"sl-SI":uo,"sr-SP":co,"sv-SE":fo,"tr-TR":ho,"uk-UA":po,"zh-CN":mo,"zh-TW":vo};function Dc(e){let{onDismiss:t,...r}=e,n=ei(fc(Ii)),a=li(r,n("dismiss")),i=()=>{t&&t()};return W.default.createElement(_i,null,W.default.createElement("button",{...a,tabIndex:-1,onClick:i}))}var Bc={};ye(Bc,"ariaHideOutside",()=>Hc);let lt=new WeakMap;function Hc(e,t=document.body){let r=new Set(e),n=new Set,a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return l instanceof HTMLElement&&l.dataset.liveAnnouncer==="true"&&r.add(l),r.has(l)||n.has(l.parentElement)?NodeFilter.FILTER_REJECT:l instanceof HTMLElement&&l.getAttribute("role")==="row"||e.some(h=>l.contains(h))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),i=l=>{var h;let p=(h=lt.get(l))!==null&&h!==void 0?h:0;l.getAttribute("aria-hidden")==="true"&&p===0||(p===0&&l.setAttribute("aria-hidden","true"),n.add(l),lt.set(l,p+1))},s=a.nextNode();for(;s!=null;)i(s),s=a.nextNode();let o=new MutationObserver(l=>{for(let h of l)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...r,...n].some(p=>p.contains(h.target)))for(let p of h.addedNodes)p instanceof HTMLElement&&p.dataset.liveAnnouncer==="true"?r.add(p):p instanceof Element&&i(p)});return o.observe(t,{childList:!0,subtree:!0}),()=>{o.disconnect();for(let l of n){let h=lt.get(l);h===1?(l.removeAttribute("aria-hidden"),lt.delete(l)):lt.set(l,h-1)}}}function $a(e){return e&&e.__esModule?e.default:e}function Ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Dn={};Ge(Dn,"useProvider",()=>ir);Ge(Dn,"Provider",()=>yo);Ge(Dn,"useProviderProps",()=>Gc);var go={};Ge(go,"spectrum",()=>Kr,e=>Kr=e);var Kr;Kr="spectrum_b37d53";var ar={};Ge(ar,"spectrum",()=>Yr,e=>Yr=e);Ge(ar,"spectrum-Body",()=>qr,e=>qr=e);Ge(ar,"spectrum-Body--italic",()=>Jr,e=>Jr=e);var Yr,qr,Jr;Yr="spectrum_2a241c";qr="spectrum-Body_2a241c";Jr="spectrum-Body--italic_2a241c";function Fc(e,t){let r=Ft("(prefers-color-scheme: dark)"),n=Ft("(prefers-color-scheme: light)");return e.dark&&r?"dark":e.light&&n?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function Wc(e){return Ft("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var bo={};bo=JSON.parse('{"name":"@react-spectrum/provider","version":"3.4.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@babel/runtime":"^7.6.2","@react-aria/i18n":"^3.4.1","@react-aria/overlays":"^3.9.1","@react-aria/utils":"^3.13.1","@react-spectrum/utils":"^3.7.1","@react-types/provider":"^3.5.1","@react-types/shared":"^3.13.1","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');const Bn=W.default.createContext(null);Bn.displayName="ProviderContext";const Vc={S:640,M:768,L:1024,XL:1280,XXL:1536};function Uc(e,t){let r=ir(),n=r&&r.colorScheme,a=r&&r.breakpoints,{theme:i=r&&r.theme,defaultColorScheme:s}=e,o=Fc(i,s),l=Wc(i),{locale:h}=_e(),p=!!i[n],{colorScheme:w=p?n:o,scale:b=r?r.scale:l,locale:v=r?h:null,breakpoints:x=r?a:Vc,children:A,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D,...M}=e,N={version:bo.version,theme:i,breakpoints:x,colorScheme:w,scale:b,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D},I=bi(x),R={};Object.entries(N).forEach(([y,f])=>f!==void 0&&(R[y]=f));let B=Object.assign({},r,R),E=A,m=xe(M),{styleProps:d}=Ae(M,void 0,{matchedBreakpoints:I});return(!r||e.locale||i!==r.theme||w!==r.colorScheme||b!==r.scale||Object.keys(m).length>0||M.UNSAFE_className||Object.keys(d.style).length>0)&&(E=W.default.createElement(jc,{...e,UNSAFE_style:{isolation:r?void 0:"isolate",...d.style},ref:t},E)),W.default.createElement(Bn.Provider,{value:B},W.default.createElement(Za,{locale:v},W.default.createElement(gi,{matchedBreakpoints:I},W.default.createElement(In,null,E))))}let yo=W.default.forwardRef(Uc);const jc=W.default.forwardRef(function(t,r){let{children:n,...a}=t,{locale:i,direction:s}=_e(),{theme:o,colorScheme:l,scale:h}=ir(),{modalProviderProps:p}=Nn(),{styleProps:w}=Ae(a),b=De(r),v=Object.keys(o[l])[0],x=Object.keys(o[h])[0],A=vn(w.className,$a(go).spectrum,$a(ar).spectrum,o[l][v],o[h][x],o.global?Object.values(o.global):null,{"react-spectrum-provider":Le,spectrum:Le,[v]:Le,[x]:Le});var k,C;let S={...w.style,colorScheme:(C=(k=t.colorScheme)!==null&&k!==void 0?k:l)!==null&&C!==void 0?C:Object.keys(o).filter(g=>g==="light"||g==="dark").join(" ")},O=P.useRef(!1);return P.useEffect(()=>{if(s&&b.current){let g=b.current.parentElement.closest("[dir]"),D=g&&g.getAttribute("dir");D&&D!==s&&!O.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),O.current=!0)}},[s,b,O]),W.default.createElement("div",{...xe(a),...w,...p,className:A,style:S,lang:i,dir:s,ref:b},n)});function ir(){return P.useContext(Bn)}function Gc(e){let t=ir();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}function ut(e){return e&&e.__esModule?e.default:e}function $e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $o={};$e($o,"spectrum--darkest",()=>Qr,e=>Qr=e);var Qr;Qr="spectrum--darkest_256eeb";var He={};$e(He,"spectrum",()=>Zr,e=>Zr=e);$e(He,"spectrum--medium",()=>en,e=>en=e);$e(He,"spectrum--large",()=>tn,e=>tn=e);$e(He,"spectrum--darkest",()=>rn,e=>rn=e);$e(He,"spectrum--dark",()=>nn,e=>nn=e);$e(He,"spectrum--light",()=>an,e=>an=e);$e(He,"spectrum--lightest",()=>on,e=>on=e);var Zr,en,tn,rn,nn,an,on;Zr="spectrum_9e130c";en="spectrum--medium_9e130c";tn="spectrum--large_9e130c";rn="spectrum--darkest_9e130c";nn="spectrum--dark_9e130c";an="spectrum--light_9e130c";on="spectrum--lightest_9e130c";var wo={};$e(wo,"spectrum--large",()=>sn,e=>sn=e);var sn;sn="spectrum--large_c40598";var Eo={};$e(Eo,"spectrum--light",()=>ln,e=>ln=e);var ln;ln="spectrum--light_a40724";var Po={};$e(Po,"spectrum--medium",()=>un,e=>un=e);var un;un="spectrum--medium_4b172c";let zc={global:ut(He),light:ut(Eo),dark:ut($o),medium:ut(Po),large:ut(wo)};const j=e=>{const t=P.useContext(e);if(!t)throw new Error(`Cannot find ${e}Provider`);return t},pe={templateArea:{artwork:"row1-1",trackInfo:"row1-2",trackTimeCurrent:"row1-3",trackTimeDuration:"row1-4",progress:"row1-5",repeatType:"row1-6",volume:"row1-7",playButton:"row1-8",playList:"row1-9"}},ee=P.createContext(null);function Xc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={exports:{}},sr={};/**
|
|
3
|
+
`,nt.MISSING_INTL_API,s);var g=r.getPluralRules(t,{type:p.pluralType}).select(b-(p.offset||0));O=p.options[g]||p.options.other}if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a,b-(p.offset||0)));continue}}return ks(o)}function Rs(e,t){return t?J(J(J({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=J(J({},e[n]),t[n]||{}),r},{})):e}function _s(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Rs(e[n],t[n]),r},J({},e)):e}function vr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ms(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.number),strategy:mr.variadic}),getDateTimeFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.dateTime),strategy:mr.variadic}),getPluralRules:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.pluralRules),strategy:mr.variadic})}}var Ls=function(){function e(t,r,n,a){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(s){var o=i.formatToParts(s);if(o.length===1)return o[0].value;var l=o.reduce(function(h,p){return!h.length||p.type!==se.literal||typeof h[h.length-1]!="string"?h.push(p.value):h[h.length-1]+=p.value,h},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(s){return Lt(i.ast,i.locales,i.formatters,i.formats,s,void 0,i.message)},this.resolvedOptions=function(){return{locale:i.resolvedLocale.toString()}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:a==null?void 0:a.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_s(e.formats,n),this.formatters=a&&a.formatters||Ms(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=$s,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Is=Ls;function Ua(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ns={};Ua(Ns,"MessageDictionary",()=>ja);class ja{getStringForLocale(t,r){let n=this.messages[r];n||(n=Ds(r,this.messages,this.defaultLocale),this.messages[r]=n);let a=n[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}constructor(t,r="en-US"){this.messages={...t},this.defaultLocale=r}}function Ds(e,t,r="en-US"){if(t[e])return t[e];let n=Bs(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function Bs(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var Hs={};Ua(Hs,"MessageFormatter",()=>Ga);class Ga{format(t,r){let n=this.cache[t];if(!n){let i=this.messages.getStringForLocale(t,this.locale);if(!i)throw new Error(`Could not find intl message ${t} in ${this.locale} locale`);n=new Is(i,this.locale),this.cache[t]=n}let a;return r&&(a=Object.keys(r).reduce((i,s)=>(i[s]=r[s]==null?!1:r[s],i),{})),n.format(a)}constructor(t,r){this.locale=t,this.messages=r,this.cache={}}}let gr=new Map;class Fs{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} \u2013 ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Us()&&(this.resolvedHourCycle||(this.resolvedHourCycle=js(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,r={}){this.formatter=za(t,r),this.options=r}}const Ws={true:{ja:"h11"},false:{}};function za(e,t={}){if(typeof t.hour12=="boolean"&&Vs()){t={...t};let a=Ws[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=a!=null?a:i,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(gr.has(r))return gr.get(r);let n=new Intl.DateTimeFormat(e,t);return gr.set(r,n),n}let br=null;function Vs(){return br==null&&(br=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),br}let yr=null;function Us(){return yr==null&&(yr=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),yr}function js(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=za(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}let $r=new Map,Br=!1;try{Br=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Bt=!1;try{Bt=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Xa={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}};class Gs{format(t){let r="";if(!Br&&this.options.signDisplay!=null?r=Xs(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!Bt){var n;let{unit:a,unitDisplay:i="short",locale:s}=this.resolvedOptions(),o=(n=Xa[a])===null||n===void 0?void 0:n[i];r+=o[s]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Br&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Bt&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=zs(t,r),this.options=r}}function zs(e,t={}){let{numberingSystem:r}=t;if(r&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${r}`),t.style==="unit"&&!Bt){var n;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=Xa[s])===null||n===void 0)&&n[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let a=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if($r.has(a))return $r.get(a);let i=new Intl.NumberFormat(e,t);return $r.set(a,i),i}function Xs(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),i=e.format(r),s=a.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(r)}}function je(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ka={};je(Ka,"I18nProvider",()=>Za);je(Ka,"useLocale",()=>_e);const Ks=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ys=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ya(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize().script;return Ks.has(r)}let t=e.split("-")[0];return Ys.has(t)}function qa(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Ya(e)?"rtl":"ltr"}}let Hr=qa(),ct=new Set;function ea(){Hr=qa();for(let e of ct)e(Hr)}function Ja(){let e=at(),[t,r]=x.useState(Hr);return x.useEffect(()=>(ct.size===0&&window.addEventListener("languagechange",ea),ct.add(r),()=>{ct.delete(r),ct.size===0&&window.removeEventListener("languagechange",ea)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Qa=W.default.createContext(null);function Za(e){let{locale:t,children:r}=e,n=Ja(),a=t?{locale:t,direction:Ya(t)?"rtl":"ltr"}:n;return W.default.createElement(Qa.Provider,{value:a},r)}function _e(){let e=Ja();return x.useContext(Qa)||e}var qs={};je(qs,"useMessageFormatter",()=>ei);const ta=new WeakMap;function Js(e){let t=ta.get(e);return t||(t=new ja(e),ta.set(e,t)),t}function ei(e){let{locale:t}=_e(),r=x.useMemo(()=>Js(e),[e]),n=x.useMemo(()=>new Ga(t,r),[t,r]);return x.useCallback((a,i)=>n.format(a,i),[n])}var Qs={};je(Qs,"useDateFormatter",()=>Zs);function Zs(e){let t=x.useRef(null);e&&t.current&&el(e,t.current)&&(e=t.current),t.current=e;let{locale:r}=_e();return x.useMemo(()=>new Fs(r,e),[r,e])}function el(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}var tl={};je(tl,"useNumberFormatter",()=>rl);function rl(e={}){let{locale:t}=_e();return x.useMemo(()=>new Gs(t,e),[t,e])}var nl={};je(nl,"useCollator",()=>ti);let wr=new Map;function ti(e){let{locale:t}=_e(),r=t+(e?Object.entries(e).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(wr.has(r))return wr.get(r);let n=new Intl.Collator(t,e);return wr.set(r,n),n}var al={};je(al,"useFilter",()=>il);function il(e){let t=ti({usage:"search",...e});return{startsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(0,n.length),n)===0)},endsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(-n.length),n)===0)},contains(r,n){if(n.length===0)return!0;r=r.normalize("NFC"),n=n.normalize("NFC");let a=0,i=n.length;for(;a+i<=r.length;a++){let s=r.slice(a,a+i);if(t.compare(n,s)===0)return!0}return!1}}}function qt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ol={};qt(ol,"useControlledState",()=>sl);function sl(e,t,r){let[n,a]=x.useState(e||t),i=x.useRef(e!==void 0),s=i.current,o=e!==void 0,l=x.useRef(n);s!==o&&console.warn(`WARN: A component changed from ${s?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o;let h=x.useCallback((p,...$)=>{let b=(v,...P)=>{r&&(Object.is(l.current,v)||r(v,...P)),o||(l.current=v)};typeof p=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((P,...A)=>{let k=p(o?l.current:P,...A);return b(k,...$),o?P:k})):(o||a(p),b(p,...$))},[o,r]);return o?l.current=e:e=n,[e,h]}var wn={};qt(wn,"clamp",()=>ri);qt(wn,"snapValueToStep",()=>ni);qt(wn,"toFixedNumber",()=>ll);function ri(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function ni(e,t,r,n){let a=(e-(isNaN(t)?0:t))%n,i=Math.abs(a)*2>=n?e+Math.sign(a)*(n-Math.abs(a)):e-a;isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(r/n)*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor((r-t)/n)*n);let s=n.toString(),o=s.indexOf("."),l=o>=0?s.length-o:0;if(l>0){let h=Math.pow(10,l);i=Math.round(i*h)/h}return i}function ll(e,t,r=10){const n=Math.pow(r,t);return Math.round(e*n)/n}function q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var En={};q(En,"useId",()=>Jt);q(En,"mergeIds",()=>ai);q(En,"useSlotId",()=>cl);var ul={};q(ul,"useLayoutEffect",()=>he);const he=typeof window!="undefined"?W.default.useLayoutEffect:()=>{};let Ht=new Map;function Jt(e){let[t,r]=x.useState(e),n=x.useRef(null),a=Ta(t),i=x.useCallback(s=>{n.current=s},[]);return Ht.set(a,i),he(()=>{let s=a;return()=>{Ht.delete(s)}},[a]),x.useEffect(()=>{let s=n.current;s&&(n.current=null,r(s))}),a}function ai(e,t){if(e===t)return e;let r=Ht.get(e);if(r)return r(t),t;let n=Ht.get(t);return n?(n(e),e):t}function cl(e=[]){let t=Jt(),[r,n]=Cn(t),a=x.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:null})},[t,n]);return he(a,[t,a,...e]),r}var fl={};q(fl,"chain",()=>bt);function bt(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var dl={};q(dl,"mergeProps",()=>xe);function xe(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let i=t[a],s=n[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=bt(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=vn(i,s):a==="id"&&i&&s?t.id=ai(i,s):t[a]=s!==void 0?s:i}}return t}var hl={};q(hl,"mergeRefs",()=>pl);function pl(...e){return t=>{for(let r of e)typeof r=="function"?r(t):r!=null&&(r.current=t)}}var ml={};q(ml,"filterDOMProps",()=>Pe);const vl=new Set(["id"]),gl=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bl=/^(data-.*)$/;function Pe(e,t={}){let{labelable:r,propNames:n}=t,a={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(vl.has(i)||r&&gl.has(i)||(n==null?void 0:n.has(i))||bl.test(i))&&(a[i]=e[i]);return a}var yl={};q(yl,"focusWithoutScrolling",()=>ft);function ft(e){if($l())e.focus({preventScroll:!0});else{let t=wl(e);e.focus(),El(t)}}let St=null;function $l(){if(St==null){St=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return St=!0,!0}})}catch{}}return St}function wl(e){for(var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function El(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}var xl={};q(xl,"getOffset",()=>ii);function ii(e,t,r="horizontal"){let n=e.getBoundingClientRect();return t?r==="horizontal"?n.right:n.bottom:r==="horizontal"?n.left:n.top}var oi={};q(oi,"clamp",()=>ri);q(oi,"snapValueToStep",()=>ni);var Pl={};q(Pl,"runAfterTransition",()=>si);let Qe=new Map,Fr=new Set;function ra(){if(typeof window=="undefined")return;let e=r=>{let n=Qe.get(r.target);n||(n=new Set,Qe.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=Qe.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),Qe.delete(r.target)),Qe.size===0)){for(let a of Fr)a();Fr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?ra():document.addEventListener("DOMContentLoaded",ra));function si(e){requestAnimationFrame(()=>{Qe.size===0?e():Fr.add(e)})}var Al={};q(Al,"useDrag1D",()=>Tl);const kt=[];function Tl(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:r,orientation:n,onHover:a,onDrag:i,onPositionChange:s,onIncrement:o,onDecrement:l,onIncrementToMax:h,onDecrementToMin:p,onCollapseToggle:$}=e,b=N=>n==="horizontal"?N.clientX:N.clientY,v=N=>{let I=ii(t.current,r,n),R=b(N);return r?I-R:R-I},P=x.useRef(!1),A=x.useRef(0),k=x.useRef({onPositionChange:s,onDrag:i});k.current.onDrag=i,k.current.onPositionChange=s;let C=N=>{N.preventDefault();let I=v(N);P.current||(P.current=!0,k.current.onDrag&&k.current.onDrag(!0),k.current.onPositionChange&&k.current.onPositionChange(I)),A.current!==I&&(A.current=I,s&&s(I))},S=N=>{const I=N.target;P.current=!1;let R=v(N);k.current.onDrag&&k.current.onDrag(!1),k.current.onPositionChange&&k.current.onPositionChange(R),kt.splice(kt.indexOf(I),1),window.removeEventListener("mouseup",S,!1),window.removeEventListener("mousemove",C,!1)};return{onMouseDown:N=>{const I=N.currentTarget;kt.some(R=>I.contains(R))||(kt.push(I),window.addEventListener("mousemove",C,!1),window.addEventListener("mouseup",S,!1))},onMouseEnter:()=>{a&&a(!0)},onMouseOut:()=>{a&&a(!1)},onKeyDown:N=>{switch(N.key){case"Left":case"ArrowLeft":n==="horizontal"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Up":case"ArrowUp":n==="vertical"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Right":case"ArrowRight":n==="horizontal"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Down":case"ArrowDown":n==="vertical"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Home":N.preventDefault(),p&&p();break;case"End":N.preventDefault(),h&&h();break;case"Enter":N.preventDefault(),$&&$();break}}}}var Cl={};q(Cl,"useGlobalListeners",()=>Qt);function Qt(){let e=x.useRef(new Map),t=x.useCallback((a,i,s,o)=>{let l=o!=null&&o.once?(...h)=>{e.current.delete(s),s(...h)}:s;e.current.set(s,{type:i,eventTarget:a,fn:l,options:o}),a.addEventListener(i,s,o)},[]),r=x.useCallback((a,i,s,o)=>{var l;let h=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;a.removeEventListener(i,h,o),e.current.delete(s)},[]),n=x.useCallback(()=>{e.current.forEach((a,i)=>{r(a.eventTarget,a.type,i,a.options)})},[r]);return x.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var Sl={};q(Sl,"useLabels",()=>li);function li(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=Jt(r),a&&n?a=[...new Set([...a.trim().split(/\s+/),r])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}var kl={};q(kl,"useObjectRef",()=>Ol);function Ol(e){const t=x.useRef();return he(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)},[e]),t}var Rl={};q(Rl,"useUpdateEffect",()=>_l);function _l(e,t){const r=x.useRef(!0);x.useEffect(()=>{r.current?r.current=!1:e()},t)}var Ml={};q(Ml,"useResizeObserver",()=>ui);function Ll(){return typeof window.ResizeObserver!="undefined"}function ui(e){const{ref:t,onResize:r}=e;x.useEffect(()=>{let n=t==null?void 0:t.current;if(!!n)if(Ll()){const a=new window.ResizeObserver(i=>{!i.length||r()});return a.observe(n),()=>{n&&a.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t])}var Il={};q(Il,"useSyncRef",()=>xn);function xn(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}var Nl={};q(Nl,"getScrollParent",()=>Pn);function Pn(e){for(;e&&!Dl(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Dl(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}var Bl={};q(Bl,"useViewportSize",()=>Hl);let Ee=typeof window!="undefined"&&window.visualViewport;function Hl(){let[e,t]=x.useState(()=>na());return x.useEffect(()=>{let r=()=>{t(n=>{let a=na();return a.width===n.width&&a.height===n.height?n:a})};return Ee?Ee.addEventListener("resize",r):window.addEventListener("resize",r),()=>{Ee?Ee.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),e}function na(){return{width:(Ee==null?void 0:Ee.width)||window.innerWidth,height:(Ee==null?void 0:Ee.height)||window.innerHeight}}var Fl={};q(Fl,"useDescription",()=>ci);let Wl=0;const Er=new Map;function ci(e){let[t,r]=x.useState(null);return he(()=>{if(!e)return;let n=Er.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${Wl++}`;r(a);let i=document.createElement("div");i.id=a,i.style.display="none",i.textContent=e,document.body.appendChild(i),n={refCount:0,element:i},Er.set(e,n)}return n.refCount++,()=>{--n.refCount===0&&(n.element.remove(),Er.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var Ne={};q(Ne,"isMac",()=>Zt);q(Ne,"isIPhone",()=>fi);q(Ne,"isIPad",()=>di);q(Ne,"isIOS",()=>wt);q(Ne,"isAppleDevice",()=>Vl);q(Ne,"isWebKit",()=>Ul);q(Ne,"isChrome",()=>hi);q(Ne,"isAndroid",()=>jl);function An(e){var t;return typeof window=="undefined"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Tn(e){return typeof window!="undefined"&&window.navigator!=null?e.test((window.navigator.userAgentData||window.navigator).platform):!1}function Zt(){return Tn(/^Mac/i)}function fi(){return Tn(/^iPhone/i)}function di(){return Tn(/^iPad/i)||Zt()&&navigator.maxTouchPoints>1}function wt(){return fi()||di()}function Vl(){return Zt()||wt()}function Ul(){return An(/AppleWebKit/i)&&!hi()}function hi(){return An(/Chrome/i)}function jl(){return An(/Android/i)}var Gl={};q(Gl,"useEvent",()=>pi);function pi(e,t,r,n){let a=x.useRef(r);a.current=r;let i=r==null;x.useEffect(()=>{if(i)return;let s=e.current,o=l=>a.current.call(this,l);return s.addEventListener(t,o,n),()=>{s.removeEventListener(t,o,n)}},[e,t,n,i])}var zl={};q(zl,"useValueEffect",()=>Cn);function Cn(e){let[t,r]=x.useState(e),n=x.useRef(t),a=x.useRef(null);n.current=t;let i=x.useRef(null);i.current=()=>{let o=a.current.next();if(o.done){a.current=null;return}t===o.value?i.current():r(o.value)},he(()=>{a.current&&i.current()});let s=x.useCallback(o=>{a.current=o(n.current),i.current()},[a,i]);return[t,s]}var Xl={};q(Xl,"scrollIntoView",()=>Kl);function Kl(e,t){let r=aa(e,t,"left"),n=aa(e,t,"top"),a=t.offsetWidth,i=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,l=s+e.offsetWidth,h=o+e.offsetHeight;r<=s?s=r:r+a>l&&(s+=r+a-l),n<=o?o=n:n+i>h&&(o+=n+i-h),e.scrollLeft=s,e.scrollTop=o}function aa(e,t,r){const n=r==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[n];break}t=t.offsetParent}return a}function Q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Sn={};Q(Sn,"shouldKeepSpectrumClassNames",()=>Le);Q(Sn,"keepSpectrumClassNames",()=>Yl);Q(Sn,"classNames",()=>It);let Le=!1;function Yl(){Le=!0,console.warn("Legacy spectrum-prefixed class names enabled for backward compatibility. We recommend replacing instances of CSS overrides targeting spectrum selectors in your app with custom class names of your own, and disabling this flag.")}function It(e,...t){let r=[];for(let n of t)if(typeof n=="object"&&n){let a={};for(let i in n)e[i]&&(a[e[i]]=n[i]),(Le||!e[i])&&(a[i]=n[i]);r.push(a)}else typeof n=="string"?(e[n]&&r.push(e[n]),(Le||!e[n])&&r.push(n)):r.push(n);return vn(...r)}var ql={};Q(ql,"getWrappedElement",()=>Jl);function Jl(e){let t;return typeof e=="string"?t=W.default.createElement("span",null,e):t=W.default.Children.only(e),t}var Ql={};Q(Ql,"useMediaQuery",()=>Ft);function Ft(e){let t=typeof window!="undefined"&&typeof window.matchMedia=="function",[r,n]=x.useState(()=>t?window.matchMedia(e).matches:!1);return x.useEffect(()=>{if(!t)return;let i=window.matchMedia(e),s=o=>{n(o.matches)};return i.addListener(s),()=>{i.removeListener(s)}},[t,e]),at()?!1:r}var it={};Q(it,"createDOMRef",()=>kn);Q(it,"createFocusableRef",()=>mi);Q(it,"useDOMRef",()=>De);Q(it,"useFocusableRef",()=>Zl);Q(it,"unwrapDOMRef",()=>vi);Q(it,"useUnwrapDOMRef",()=>eu);function kn(e){return{UNSAFE_getDOMNode(){return e.current}}}function mi(e,t=e){return{...kn(e),focus(){t.current&&t.current.focus()}}}function De(e){let t=x.useRef(null);return x.useImperativeHandle(e,()=>kn(t)),t}function Zl(e,t){let r=x.useRef(null);return x.useImperativeHandle(e,()=>mi(r,t)),r}function vi(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}function eu(e){return x.useMemo(()=>vi(e),[e])}var Be={};Q(Be,"baseStyleProps",()=>er);Q(Be,"dimensionValue",()=>Y);Q(Be,"passthroughStyle",()=>ne);Q(Be,"viewStyleProps",()=>yi);Q(Be,"responsiveDimensionValue",()=>We);Q(Be,"getResponsiveProp",()=>tr);Q(Be,"convertStyleProps",()=>wi);Q(Be,"useStyleProps",()=>Ae);var On={};Q(On,"BreakpointProvider",()=>gi);Q(On,"useMatchedBreakpoints",()=>bi);Q(On,"useBreakpoint",()=>_n);const Rn=W.default.createContext(null);Rn.displayName="BreakpointContext";function gi(e){let{children:t,matchedBreakpoints:r}=e;return W.default.createElement(Rn.Provider,{value:{matchedBreakpoints:r}},t)}function bi(e){let t=Object.entries(e).sort(([,l],[,h])=>h-l),r=t.map(([,l])=>`(min-width: ${l}px)`),n=typeof window!="undefined"&&typeof window.matchMedia=="function",a=()=>{let l=[];for(let h in r){let p=r[h];window.matchMedia(p).matches&&l.push(t[h][0])}return l.push("base"),l},[i,s]=x.useState(()=>n?a():["base"]);return x.useEffect(()=>{if(!n)return;let l=()=>{const h=a();s(p=>p.length!==h.length||p.some(($,b)=>$!==h[b])?[...h]:p)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[n]),at()?["base"]:i}function _n(){return x.useContext(Rn)}const er={margin:["margin",Y],marginStart:[ce("marginLeft","marginRight"),Y],marginEnd:[ce("marginRight","marginLeft"),Y],marginTop:["marginTop",Y],marginBottom:["marginBottom",Y],marginX:[["marginLeft","marginRight"],Y],marginY:[["marginTop","marginBottom"],Y],width:["width",Y],height:["height",Y],minWidth:["minWidth",Y],minHeight:["minHeight",Y],maxWidth:["maxWidth",Y],maxHeight:["maxHeight",Y],isHidden:["display",iu],alignSelf:["alignSelf",ne],justifySelf:["justifySelf",ne],position:["position",xr],zIndex:["zIndex",xr],top:["top",Y],bottom:["bottom",Y],start:[ce("left","right"),Y],end:[ce("right","left"),Y],left:["left",Y],right:["right",Y],order:["order",xr],flex:["flex",ou],flexGrow:["flexGrow",ne],flexShrink:["flexShrink",ne],flexBasis:["flexBasis",ne],gridArea:["gridArea",ne],gridColumn:["gridColumn",ne],gridColumnEnd:["gridColumnEnd",ne],gridColumnStart:["gridColumnStart",ne],gridRow:["gridRow",ne],gridRowEnd:["gridRowEnd",ne],gridRowStart:["gridRowStart",ne]},yi={...er,backgroundColor:["backgroundColor",au],borderWidth:["borderWidth",Ce],borderStartWidth:[ce("borderLeftWidth","borderRightWidth"),Ce],borderEndWidth:[ce("borderRightWidth","borderLeftWidth"),Ce],borderLeftWidth:["borderLeftWidth",Ce],borderRightWidth:["borderRightWidth",Ce],borderTopWidth:["borderTopWidth",Ce],borderBottomWidth:["borderBottomWidth",Ce],borderXWidth:[["borderLeftWidth","borderRightWidth"],Ce],borderYWidth:[["borderTopWidth","borderBottomWidth"],Ce],borderColor:["borderColor",Te],borderStartColor:[ce("borderLeftColor","borderRightColor"),Te],borderEndColor:[ce("borderRightColor","borderLeftColor"),Te],borderLeftColor:["borderLeftColor",Te],borderRightColor:["borderRightColor",Te],borderTopColor:["borderTopColor",Te],borderBottomColor:["borderBottomColor",Te],borderXColor:[["borderLeftColor","borderRightColor"],Te],borderYColor:[["borderTopColor","borderBottomColor"],Te],borderRadius:["borderRadius",Se],borderTopStartRadius:[ce("borderTopLeftRadius","borderTopRightRadius"),Se],borderTopEndRadius:[ce("borderTopRightRadius","borderTopLeftRadius"),Se],borderBottomStartRadius:[ce("borderBottomLeftRadius","borderBottomRightRadius"),Se],borderBottomEndRadius:[ce("borderBottomRightRadius","borderBottomLeftRadius"),Se],borderTopLeftRadius:["borderTopLeftRadius",Se],borderTopRightRadius:["borderTopRightRadius",Se],borderBottomLeftRadius:["borderBottomLeftRadius",Se],borderBottomRightRadius:["borderBottomRightRadius",Se],padding:["padding",Y],paddingStart:[ce("paddingLeft","paddingRight"),Y],paddingEnd:[ce("paddingRight","paddingLeft"),Y],paddingLeft:["paddingLeft",Y],paddingRight:["paddingRight",Y],paddingTop:["paddingTop",Y],paddingBottom:["paddingBottom",Y],paddingX:[["paddingLeft","paddingRight"],Y],paddingY:[["paddingTop","paddingBottom"],Y],overflow:["overflow",ne]},ia={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function ce(e,t){return r=>r==="rtl"?t:e}const tu=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,ru=/^\s*\w+\(/,nu=/(static-)?size-\d+|single-line-(height|width)/g;function Y(e){return typeof e=="number"?e+"px":tu.test(e)?e:ru.test(e)?e.replace(nu,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function We(e,t){return e=tr(e,t),Y(e)}function $i(e,t="default"){return`var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t}))`}function au(e){return`var(--spectrum-alias-background-color-${e}, ${$i(e,"background")})`}function Te(e){return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${$i(e,"border")})`}function Ce(e){return`var(--spectrum-alias-border-size-${e})`}function Se(e){return`var(--spectrum-alias-border-radius-${e})`}function iu(e){return e?"none":void 0}function xr(e){return e}function ou(e){return typeof e=="boolean"?e?"1":void 0:""+e}function wi(e,t,r,n){let a={};for(let i in e){let s=t[i];if(!s||e[i]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(r));let h=tr(e[i],n),p=l(h);if(Array.isArray(o))for(let $ of o)a[$]=p;else a[o]=p}for(let i in ia)a[i]&&(a[ia[i]]="solid",a.boxSizing="border-box");return a}function Ae(e,t=er,r={}){let{UNSAFE_className:n,UNSAFE_style:a,...i}=e,s=_n(),{direction:o}=_e(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=r,h=wi(e,t,o,l),p={...a,...h};i.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),i.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let $={style:p,className:n};return tr(e.isHidden,l)&&($.hidden=!0),{styleProps:$}}function ne(e){return e}function tr(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let r=0;r<t.length;r++){let n=t[r];if(e[n]!=null)return e[n]}return e.base}return e}var rr={};Q(rr,"useSlotProps",()=>Et);Q(rr,"cssModuleToSlots",()=>su);Q(rr,"SlotProvider",()=>lu);Q(rr,"ClearSlots",()=>xt);let Wt=W.default.createContext(null);function Et(e,t){let r=e.slot||t,{[r]:n={}}=x.useContext(Wt)||{};return xe(e,xe(n,{id:e.id}))}function su(e){return Object.keys(e).reduce((t,r)=>(t[r]={UNSAFE_className:e[r]},t),{})}function lu(e){let t=x.useContext(Wt)||{},{slots:r={},children:n}=e,a=x.useMemo(()=>Object.keys(t).concat(Object.keys(r)).reduce((i,s)=>({...i,[s]:xe(t[s]||{},r[s]||{})}),{}),[t,r]);return W.default.createElement(Wt.Provider,{value:a},n)}function xt(e){let{children:t,...r}=e,n=t;return W.default.Children.toArray(t).length<=1&&typeof t=="function"&&(n=W.default.cloneElement(W.default.Children.only(t),r)),W.default.createElement(Wt.Provider,{value:{}},n)}var uu={};Q(uu,"useHasChild",()=>cu);function cu(e,t){let[r,n]=x.useState(!0);return he(()=>{n(!!(t.current&&t.current.querySelector(e)))},[n,e,t]),r}var fu={};Q(fu,"useResizeObserver",()=>ui);var du={};Q(du,"useIsMobileDevice",()=>pu);const hu=700;function pu(){return at()||typeof window=="undefined"?!1:window.screen.width<=hu}var mu={};Q(mu,"useValueEffect",()=>Cn);function yt(e){return e&&e.ownerDocument||document}function vu(e){var t=yt(e);return t&&t.defaultView||window}function gu(e,t){return vu(e).getComputedStyle(e,t)}var bu=/([A-Z])/g;function yu(e){return e.replace(bu,"-$1").toLowerCase()}var $u=/^ms-/;function Ot(e){return yu(e).replace($u,"-ms-")}var wu=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Eu(e){return!!(e&&wu.test(e))}function Me(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Ot(t))||gu(e).getPropertyValue(Ot(t));Object.keys(t).forEach(function(a){var i=t[a];!i&&i!==0?e.style.removeProperty(Ot(a)):Eu(a)?n+=a+"("+i+") ":r+=Ot(a)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}function xu(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function Pu(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function Au(e){return"window"in e&&e.window===e?e:Pu(e)&&e.defaultView||!1}function Ei(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function r(n,a){var i=Au(n);if(a===void 0)return i?i[e]:n[t];i?i.scrollTo(i[e],a):n[t]=a}return r}var ht=Ei("pageXOffset"),pt=Ei("pageYOffset");function et(e){var t=yt(e),r={top:0,left:0,height:0,width:0},n=t&&t.documentElement;return!n||!xu(n,e)||(e.getBoundingClientRect!==void 0&&(r=e.getBoundingClientRect()),r={top:r.top+pt(n)-(n.clientTop||0),left:r.left+ht(n)-(n.clientLeft||0),width:r.width,height:r.height}),r}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(this,arguments)}var Tu=function(t){return!!t&&"offsetParent"in t};function Cu(e){for(var t=yt(e),r=e&&e.offsetParent;Tu(r)&&r.nodeName!=="HTML"&&Me(r,"position")==="static";)r=r.offsetParent;return r||t.documentElement}var Su=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function oa(e,t){var r={top:0,left:0},n;if(Me(e,"position")==="fixed")n=e.getBoundingClientRect();else{var a=t||Cu(e);n=et(e),Su(a)!=="html"&&(r=et(a));var i=String(Me(a,"borderTopWidth")||0);r.top+=parseInt(i,10)-pt(a)||0;var s=String(Me(a,"borderLeftWidth")||0);r.left+=parseInt(s,10)-ht(a)||0}var o=String(Me(e,"marginTop")||0),l=String(Me(e,"marginLeft")||0);return Wr({},n,{top:n.top-r.top-(parseInt(o,10)||0),left:n.left-r.left-(parseInt(l,10)||0)})}function ie(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ku={};ie(ku,"Pressable",()=>Du);var Ou={};ie(Ou,"usePress",()=>Mn);let Ze="default",Vr="",Nt=new WeakMap;function Ur(e){wt()?(Ze==="default"&&(Vr=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Ze="disabled"):e&&(Nt.set(e,e.style.userSelect),e.style.userSelect="none")}function dt(e){if(wt()){if(Ze!=="disabled")return;Ze="restoring",setTimeout(()=>{si(()=>{Ze==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=Vr||""),Vr="",Ze="default")})},300)}else if(e&&Nt.has(e)){let t=Nt.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Nt.delete(e)}}function jr(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}class Ru{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function xi(e){let t=x.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),x.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,a=i=>{var s,o;t.current.isFocused=!1,n.disabled&&((o=(s=t.current).onBlur)===null||o===void 0||o.call(s,new Ru("blur",i))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}const Vt=W.default.createContext(null);Vt.displayName="PressResponderContext";function _u(e){let t=x.useContext(Vt);if(t){let{register:r,...n}=t;e=xe(n,e),r()}return xn(t,e.ref),e}function Mn(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:p,ref:$,...b}=_u(e),v=x.useRef(null);v.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,shouldCancelOnPointerExit:h};let[P,A]=x.useState(!1),k=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:S}=Qt(),O=x.useMemo(()=>{let g=k.current,D=(E,m)=>{let{onPressStart:d,onPressChange:y,isDisabled:f}=v.current;f||g.didFirePressStart||(d&&d({type:"pressstart",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),y&&y(!0),g.didFirePressStart=!0,A(!0))},M=(E,m,d=!0)=>{let{onPressEnd:y,onPressChange:f,onPress:c,isDisabled:T}=v.current;!g.didFirePressStart||(g.ignoreClickAfterPress=!0,g.didFirePressStart=!1,y&&y({type:"pressend",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),f&&f(!1),A(!1),c&&d&&!T&&c({type:"press",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}))},N=(E,m)=>{let{onPressUp:d,isDisabled:y}=v.current;y||d&&d({type:"pressup",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey})},I=E=>{g.isPressed&&(g.isOverTarget&&M(ke(g.target,E),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},R={onKeyDown(E){Pr(E.nativeEvent)&&E.currentTarget.contains(E.target)&&(la(E.target)&&E.preventDefault(),E.stopPropagation(),!g.isPressed&&!E.repeat&&(g.target=E.currentTarget,g.isPressed=!0,D(E,"keyboard"),C(document,"keyup",B,!1)))},onKeyUp(E){Pr(E.nativeEvent)&&!E.repeat&&E.currentTarget.contains(E.target)&&N(ke(g.target,E),"keyboard")},onClick(E){E&&!E.currentTarget.contains(E.target)||E&&E.button===0&&(E.stopPropagation(),s&&E.preventDefault(),!g.ignoreClickAfterPress&&!g.ignoreEmulatedMouseEvents&&(g.pointerType==="virtual"||jr(E.nativeEvent))&&(!s&&!l&&ft(E.currentTarget),D(E,"virtual"),N(E,"virtual"),M(E,"virtual")),g.ignoreEmulatedMouseEvents=!1,g.ignoreClickAfterPress=!1)}},B=E=>{if(g.isPressed&&Pr(E)){la(E.target)&&E.preventDefault(),E.stopPropagation(),g.isPressed=!1;let m=E.target;M(ke(g.target,E),"keyboard",g.target.contains(m)),S(),(g.target.contains(m)&&Pi(g.target)||g.target.getAttribute("role")==="link")&&g.target.click()}};if(typeof PointerEvent!="undefined"){R.onPointerDown=y=>{if(!(y.button!==0||!y.currentTarget.contains(y.target))){if(Nu(y.nativeEvent)){g.pointerType="virtual";return}Ar(y.currentTarget)&&y.preventDefault(),g.pointerType=y.pointerType,y.stopPropagation(),g.isPressed||(g.isPressed=!0,g.isOverTarget=!0,g.activePointerId=y.pointerId,g.target=y.currentTarget,!s&&!l&&ft(y.currentTarget),p||Ur(g.target),D(y,g.pointerType),C(document,"pointermove",E,!1),C(document,"pointerup",m,!1),C(document,"pointercancel",d,!1))}},R.onMouseDown=y=>{!y.currentTarget.contains(y.target)||y.button===0&&(Ar(y.currentTarget)&&y.preventDefault(),y.stopPropagation())},R.onPointerUp=y=>{!y.currentTarget.contains(y.target)||g.pointerType==="virtual"||y.button===0&&Ke(y,y.currentTarget)&&N(y,g.pointerType||y.pointerType)};let E=y=>{y.pointerId===g.activePointerId&&(Ke(y,g.target)?g.isOverTarget||(g.isOverTarget=!0,D(ke(g.target,y),g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(ke(g.target,y),g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(y)))},m=y=>{y.pointerId===g.activePointerId&&g.isPressed&&y.button===0&&(Ke(y,g.target)?M(ke(g.target,y),g.pointerType):g.isOverTarget&&M(ke(g.target,y),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},d=y=>{I(y)};R.onDragStart=y=>{!y.currentTarget.contains(y.target)||I(y)}}else{R.onMouseDown=d=>{d.button!==0||!d.currentTarget.contains(d.target)||(Ar(d.currentTarget)&&d.preventDefault(),d.stopPropagation(),!g.ignoreEmulatedMouseEvents&&(g.isPressed=!0,g.isOverTarget=!0,g.target=d.currentTarget,g.pointerType=jr(d.nativeEvent)?"virtual":"mouse",!s&&!l&&ft(d.currentTarget),D(d,g.pointerType),C(document,"mouseup",E,!1)))},R.onMouseEnter=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!0,D(d,g.pointerType)))},R.onMouseLeave=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d)))},R.onMouseUp=d=>{!d.currentTarget.contains(d.target)||!g.ignoreEmulatedMouseEvents&&d.button===0&&N(d,g.pointerType)};let E=d=>{if(d.button===0){if(g.isPressed=!1,S(),g.ignoreEmulatedMouseEvents){g.ignoreEmulatedMouseEvents=!1;return}Ke(d,g.target)?M(ke(g.target,d),g.pointerType):g.isOverTarget&&M(ke(g.target,d),g.pointerType,!1),g.isOverTarget=!1}};R.onTouchStart=d=>{if(!d.currentTarget.contains(d.target))return;d.stopPropagation();let y=Mu(d.nativeEvent);!y||(g.activePointerId=y.identifier,g.ignoreEmulatedMouseEvents=!0,g.isOverTarget=!0,g.isPressed=!0,g.target=d.currentTarget,g.pointerType="touch",!s&&!l&&ft(d.currentTarget),p||Ur(g.target),D(d,g.pointerType),C(window,"scroll",m,!0))},R.onTouchMove=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?g.isOverTarget||(g.isOverTarget=!0,D(d,g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d))},R.onTouchEnd=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?(N(d,g.pointerType),M(d,g.pointerType)):g.isOverTarget&&M(d,g.pointerType,!1),g.isPressed=!1,g.activePointerId=null,g.isOverTarget=!1,g.ignoreEmulatedMouseEvents=!0,p||dt(g.target),S()},R.onTouchCancel=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&I(d))};let m=d=>{g.isPressed&&d.target.contains(g.target)&&I({currentTarget:g.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=d=>{!d.currentTarget.contains(d.target)||I(d)}}return R},[C,s,l,S,p]);return x.useEffect(()=>()=>{p||dt(k.current.target)},[p]),{isPressed:o||P,pressProps:xe(b,O)}}function Pi(e){return e.tagName==="A"&&e.hasAttribute("href")}function Pr(e){const{key:t,code:r,target:n}=e,a=n,{tagName:i,isContentEditable:s}=a,o=a.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||r==="Space")&&i!=="INPUT"&&i!=="TEXTAREA"&&s!==!0&&(!Pi(a)||o==="button"&&t!=="Enter")&&!(o==="link"&&t!=="Enter")}function Mu(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function sa(e,t){const r=e.changedTouches;for(let n=0;n<r.length;n++){const a=r[n];if(a.identifier===t)return a}return null}function ke(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Lu(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Iu(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ke(e,t){let r=t.getBoundingClientRect(),n=Lu(e);return Iu(r,n)}function Ar(e){return!e.draggable}function la(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&e.type==="submit")}function Nu(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const Du=W.default.forwardRef(({children:e,...t},r)=>{let n=x.useRef();r=r!=null?r:n;let{pressProps:a}=Mn({...t,ref:r}),i=W.default.Children.only(e);return W.default.cloneElement(i,{ref:r,...xe(i.props,a)})});var Bu={};ie(Bu,"PressResponder",()=>Hu);const Hu=W.default.forwardRef(({children:e,...t},r)=>{let n=x.useRef(!1),a=x.useContext(Vt),i=xe(a||{},{...t,ref:r||(a==null?void 0:a.ref),register(){n.current=!0,a&&a.register()}});return xn(a,r),x.useEffect(()=>{n.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")},[]),W.default.createElement(Vt.Provider,{value:i},e)});var Fu={};ie(Fu,"useFocus",()=>Ai);function Ai(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const i=x.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),a&&a(!1),!0},[n,a]),s=xi(i),o=x.useCallback(l=>{l.target===l.currentTarget&&(r&&r(l),a&&a(!0),s(l))},[a,r,s]);return{focusProps:{onFocus:!t&&(r||a||n)?o:void 0,onBlur:!t&&(n||a)?i:null}}}var ot={};ie(ot,"isFocusVisible",()=>Ln);ie(ot,"getInteractionModality",()=>zu);ie(ot,"setInteractionModality",()=>Xu);ie(ot,"useInteractionModality",()=>Ku);ie(ot,"useFocusVisible",()=>qu);ie(ot,"useFocusVisibleListener",()=>Ti);let Re=null,$t=new Set,ua=!1,Ve=!1,Gr=!1;const Wu={Tab:!0,Escape:!0};function nr(e,t){for(let r of $t)r(e,t)}function Vu(e){return!(e.metaKey||!Zt()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ca(e){Ve=!0,Vu(e)&&(Re="keyboard",nr("keyboard",e))}function Ye(e){Re="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ve=!0,nr("pointer",e))}function Uu(e){jr(e)&&(Ve=!0,Re="virtual")}function ju(e){e.target===window||e.target===document||(!Ve&&!Gr&&(Re="virtual",nr("virtual",e)),Ve=!1,Gr=!1)}function Gu(){Ve=!1,Gr=!0}function Ut(){if(typeof window=="undefined"||ua)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Ve=!0,e.apply(this,arguments)},document.addEventListener("keydown",ca,!0),document.addEventListener("keyup",ca,!0),document.addEventListener("click",Uu,!0),window.addEventListener("focus",ju,!0),window.addEventListener("blur",Gu,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Ye,!0),document.addEventListener("pointermove",Ye,!0),document.addEventListener("pointerup",Ye,!0)):(document.addEventListener("mousedown",Ye,!0),document.addEventListener("mousemove",Ye,!0),document.addEventListener("mouseup",Ye,!0)),ua=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Ut():document.addEventListener("DOMContentLoaded",Ut));function Ln(){return Re!=="pointer"}function zu(){return Re}function Xu(e){Re=e,nr(e,null)}function Ku(){Ut();let[e,t]=x.useState(Re);return x.useEffect(()=>{let r=()=>{t(Re)};return $t.add(r),()=>{$t.delete(r)}},[]),e}function Yu(e,t,r){return!(e&&t==="keyboard"&&r instanceof KeyboardEvent&&!Wu[r.key])}function qu(e={}){let{isTextInput:t,autoFocus:r}=e,[n,a]=x.useState(r||Ln());return Ti(i=>{a(i)},[t],{isTextInput:t}),{isFocusVisible:n}}function Ti(e,t,r){Ut(),x.useEffect(()=>{let n=(a,i)=>{!Yu(r==null?void 0:r.isTextInput,a,i)||e(Ln())};return $t.add(n),()=>{$t.delete(n)}},t)}var Ju={};ie(Ju,"useFocusWithin",()=>Ci);function Ci(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,i=x.useRef({isFocusWithin:!1}),s=x.useCallback(h=>{i.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(h),a&&a(!1))},[r,a,i]),o=xi(s),l=x.useCallback(h=>{i.current.isFocusWithin||(n&&n(h),a&&a(!0),i.current.isFocusWithin=!0,o(h))},[n,a,o]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}var Qu={};ie(Qu,"useHover",()=>ec);let jt=!1,Tr=0;function zr(){jt=!0,setTimeout(()=>{jt=!1},50)}function fa(e){e.pointerType==="touch"&&zr()}function Zu(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",fa):document.addEventListener("touchend",zr),Tr++,()=>{Tr--,!(Tr>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",fa):document.removeEventListener("touchend",zr))}}function ec(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[i,s]=x.useState(!1),o=x.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;x.useEffect(Zu,[]);let{hoverProps:l,triggerHoverEnd:h}=x.useMemo(()=>{let p=(v,P)=>{if(o.pointerType=P,a||P==="touch"||o.isHovered||!v.currentTarget.contains(v.target))return;o.isHovered=!0;let A=v.currentTarget;o.target=A,t&&t({type:"hoverstart",target:A,pointerType:P}),r&&r(!0),s(!0)},$=(v,P)=>{if(o.pointerType="",o.target=null,P==="touch"||!o.isHovered)return;o.isHovered=!1;let A=v.currentTarget;n&&n({type:"hoverend",target:A,pointerType:P}),r&&r(!1),s(!1)},b={};return typeof PointerEvent!="undefined"?(b.onPointerEnter=v=>{jt&&v.pointerType==="mouse"||p(v,v.pointerType)},b.onPointerLeave=v=>{!a&&v.currentTarget.contains(v.target)&&$(v,v.pointerType)}):(b.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=v=>{!o.ignoreEmulatedMouseEvents&&!jt&&p(v,"mouse"),o.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=v=>{!a&&v.currentTarget.contains(v.target)&&$(v,"mouse")}),{hoverProps:b,triggerHoverEnd:$}},[t,r,n,a,o]);return x.useEffect(()=>{a&&h({currentTarget:o.target},o.pointerType)},[a]),{hoverProps:l,isHovered:i}}var tc={};ie(tc,"useInteractOutside",()=>Si);function Si(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,s=x.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:a}).current;s.onInteractOutside=r,s.onInteractOutsideStart=a,x.useEffect(()=>{if(n)return;let o=l=>{Rt(l,t)&&s.onInteractOutside&&(s.onInteractOutsideStart&&s.onInteractOutsideStart(l),s.isPointerDown=!0)};if(typeof PointerEvent!="undefined"){let l=h=>{s.isPointerDown&&s.onInteractOutside&&Rt(h,t)&&(s.isPointerDown=!1,s.onInteractOutside(h))};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",l,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",l,!0)}}else{let l=p=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&s.onInteractOutside&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))},h=p=>{s.ignoreEmulatedMouseEvents=!0,s.onInteractOutside&&s.isPointerDown&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",l,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",h,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",l,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",h,!0)}}},[t,s,n])}function Rt(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}var rc={};ie(rc,"useKeyboard",()=>nc);function da(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function nc(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:da(e.onKeyDown),onKeyUp:da(e.onKeyUp)}}}var ac={};ie(ac,"useMove",()=>ic);function ic(e){let{onMoveStart:t,onMove:r,onMoveEnd:n}=e,a=x.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:i,removeGlobalListener:s}=Qt();return{moveProps:x.useMemo(()=>{let l={},h=()=>{Ur(),a.current.didMove=!1},p=(v,P,A,k)=>{A===0&&k===0||(a.current.didMove||(a.current.didMove=!0,t==null||t({type:"movestart",pointerType:P,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey})),r({type:"move",pointerType:P,deltaX:A,deltaY:k,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))},$=(v,P)=>{dt(),a.current.didMove&&(n==null||n({type:"moveend",pointerType:P,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))};if(typeof PointerEvent=="undefined"){let v=C=>{C.button===0&&(p(C,"mouse",C.pageX-a.current.lastPosition.pageX,C.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY})},P=C=>{C.button===0&&($(C,"mouse"),s(window,"mousemove",v,!1),s(window,"mouseup",P,!1))};l.onMouseDown=C=>{C.button===0&&(h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY},i(window,"mousemove",v,!1),i(window,"mouseup",P,!1))};let A=C=>{let S=[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id);if(S>=0){let{pageX:O,pageY:g}=C.changedTouches[S];p(C,"touch",O-a.current.lastPosition.pageX,g-a.current.lastPosition.pageY),a.current.lastPosition={pageX:O,pageY:g}}},k=C=>{[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id)>=0&&($(C,"touch"),a.current.id=null,s(window,"touchmove",A),s(window,"touchend",k),s(window,"touchcancel",k))};l.onTouchStart=C=>{if(C.changedTouches.length===0||a.current.id!=null)return;let{pageX:S,pageY:O,identifier:g}=C.changedTouches[0];h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:S,pageY:O},a.current.id=g,i(window,"touchmove",A,!1),i(window,"touchend",k,!1),i(window,"touchcancel",k,!1)}}else{let v=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";p(A,k,A.pageX-a.current.lastPosition.pageX,A.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY}}},P=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";$(A,k),a.current.id=null,s(window,"pointermove",v,!1),s(window,"pointerup",P,!1),s(window,"pointercancel",P,!1)}};l.onPointerDown=A=>{A.button===0&&a.current.id==null&&(h(),A.stopPropagation(),A.preventDefault(),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY},a.current.id=A.pointerId,i(window,"pointermove",v,!1),i(window,"pointerup",P,!1),i(window,"pointercancel",P,!1))}}let b=(v,P,A)=>{h(),p(v,"keyboard",P,A),$(v,"keyboard")};return l.onKeyDown=v=>{switch(v.key){case"Left":case"ArrowLeft":v.preventDefault(),v.stopPropagation(),b(v,-1,0);break;case"Right":case"ArrowRight":v.preventDefault(),v.stopPropagation(),b(v,1,0);break;case"Up":case"ArrowUp":v.preventDefault(),v.stopPropagation(),b(v,0,-1);break;case"Down":case"ArrowDown":v.preventDefault(),v.stopPropagation(),b(v,0,1);break}},l},[a,t,r,n,i,s])}}var oc={};ie(oc,"useScrollWheel",()=>sc);function sc(e,t){let{onScroll:r,isDisabled:n}=e,a=x.useCallback(i=>{i.ctrlKey||(i.preventDefault(),i.stopPropagation(),r&&r({deltaX:i.deltaX,deltaY:i.deltaY}))},[r]);pi(t,"wheel",n?null:a)}var lc={};ie(lc,"useLongPress",()=>cc);const uc=500;function cc(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:n,onLongPress:a,threshold:i=uc,accessibilityDescription:s}=e;const o=x.useRef(null);let{addGlobalListener:l,removeGlobalListener:h}=Qt(),{pressProps:p}=Mn({isDisabled:t,onPressStart(b){if((b.pointerType==="mouse"||b.pointerType==="touch")&&(r&&r({...b,type:"longpressstart"}),o.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...b,type:"longpress"}),o.current=null},i),b.pointerType==="touch")){let v=P=>{P.preventDefault()};l(b.target,"contextmenu",v,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{h(b.target,"contextmenu",v)},30)},{once:!0})}},onPressEnd(b){o.current&&clearTimeout(o.current),n&&(b.pointerType==="mouse"||b.pointerType==="touch")&&n({...b,type:"longpressend"})}}),$=ci(a&&!t?s:null);return{longPressProps:xe(p,$)}}function ki(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Oi={};ki(Oi,"useVisuallyHidden",()=>Ri);ki(Oi,"VisuallyHidden",()=>_i);const ha={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"};function Ri(e={}){let{style:t,isFocusable:r}=e,[n,a]=x.useState(!1),{focusProps:i}=Ai({isDisabled:!r,onFocusChange:a}),s=x.useMemo(()=>n?t:t?{...ha,...t}:ha,[n]);return{visuallyHiddenProps:{...i,style:s}}}function _i(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...i}=e,{visuallyHiddenProps:s}=Ri(e);return W.default.createElement(r,xe(i,s),t)}function ye(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function fc(e){return e&&e.__esModule?e.default:e}var dc={};ye(dc,"useOverlayPosition",()=>wc);const pa={top:"top",bottom:"top",left:"left",right:"left"},Gt={top:"bottom",bottom:"top",left:"right",right:"left"},hc={top:"left",left:"top"},Xr={top:"height",left:"width"},_t={};let qe=typeof window!="undefined"&&window.visualViewport;function pc(e){let t=0,r=0,n=0,a=0,i={};if(e.tagName==="BODY"){var s;t=(s=qe==null?void 0:qe.width)!==null&&s!==void 0?s:document.documentElement.clientWidth;var o;r=(o=qe==null?void 0:qe.height)!==null&&o!==void 0?o:document.documentElement.clientHeight,i.top=pt(yt(e).documentElement)||pt(e),i.left=ht(yt(e).documentElement)||ht(e)}else({width:t,height:r,top:n,left:a}=et(e)),i.top=pt(e),i.left=ht(e);return{width:t,height:r,scroll:i,top:n,left:a}}function mc(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ma(e,t,r,n,a){let i=n.scroll[e],s=n[Xr[e]],o=t-a-i,l=t+a-i+r;return o<0?-o:l>s?Math.max(s-l,-o):0}function vc(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function va(e){if(_t[e])return _t[e];let[t,r]=e.split(" "),n=pa[t]||"right",a=hc[n];pa[r]||(r="center");let i=Xr[n],s=Xr[a];return _t[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:i,crossSize:s},_t[e]}function Cr(e,t,r,n,a,i,s,o){let{placement:l,crossPlacement:h,axis:p,crossAxis:$,size:b,crossSize:v}=n,P={};P[$]=e[$],h==="center"?P[$]+=(e[v]-r[v])/2:h!==$&&(P[$]+=e[v]-r[v]),P[$]+=i;let A=e[$]+e[v]/2-r[v],k=e[$]+e[v]/2;if(P[$]=Math.min(Math.max(A,P[$]),k),l===p){const C=o?s[b]:t[b];P[Gt[p]]=Math.floor(C-e[p]+a)}else P[p]=Math.floor(e[p]+e[b]+a);return P}function gc(e,t,r,n,a,i){return e.top!=null?Math.max(0,t.height+t.top+t.scroll.top-(r.top+e.top)-(a.top+a.bottom+i)):Math.max(0,n.top+r.top-(t.top+t.scroll.top)-(a.top+a.bottom+i))}function ga(e,t,r,n,a,i){let{placement:s,axis:o,size:l}=i;return s===o?Math.max(0,r[o]-e[o]-e.scroll[o]+t[o]-n[o]-n[Gt[o]]-a):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-r[o]-r[l]-n[o]-n[Gt[o]]-a)}function bc(e,t,r,n,a,i,s,o,l,h,p,$,b){let v=va(e),{size:P,crossAxis:A,crossSize:k,placement:C,crossPlacement:S}=v,O=Cr(t,o,r,v,h,p,l,$),g=h,D=ga(o,l,t,a,i+h,v);if(s&&n[P]>D){let R=va(`${Gt[C]} ${S}`),B=Cr(t,o,r,R,h,p,l,$);ga(o,l,t,a,i+h,R)>D&&(v=R,O=B,g=h)}let M=ma(A,O[A],r[k],o,i);O[A]+=M;let N=gc(O,o,l,t,a,i);b&&b<N&&(N=b),r.height=Math.min(r.height,N),O=Cr(t,o,r,v,g,p,l,$),M=ma(A,O[A],r[k],o,i),O[A]+=M;let I={};return I[A]=t[A]-O[A]+t[k]/2,{position:O,maxHeight:N,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:v.placement}}function yc(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:i,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:h,maxHeight:p}=e,$=n.offsetParent||document.body,b=$.tagName==="BODY";const v=window.getComputedStyle($).position;let P=!!v&&v!=="static",A=b?et(r):oa(r,$);if(!b){let D=String(Me(r,"marginTop")),M=String(Me(r,"marginLeft"));A.top+=parseInt(D,10)||0,A.left+=parseInt(M,10)||0}let k=et(n),C=vc(n);k.width+=C.left+C.right,k.height+=C.top+C.bottom;let S=mc(a),O=pc(o),g=o.tagName==="BODY"?et($):oa($,o);return bc(t,A,k,S,C,i,s,O,g,l,h,P,p)}const Mi=new WeakMap;function $c(e){let{triggerRef:t,isOpen:r,onClose:n}=e;x.useEffect(()=>{if(!r)return;let a=i=>{let s=i.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=n||Mi.get(t.current);o&&o()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}let Je=typeof window!="undefined"&&window.visualViewport;function wc(e){let{direction:t}=_e(),{targetRef:r,overlayRef:n,scrollRef:a=n,placement:i="bottom",containerPadding:s=12,shouldFlip:o=!0,boundaryElement:l=typeof document!="undefined"?document.body:null,offset:h=0,crossOffset:p=0,shouldUpdatePosition:$=!0,isOpen:b=!0,onClose:v,maxHeight:P}=e,[A,k]=x.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),C=[$,i,n.current,r.current,a.current,s,o,l,h,p,b,t,P],S=x.useCallback(()=>{$===!1||!b||!n.current||!r.current||!a.current||!l||k(yc({placement:xc(i,t),overlayNode:n.current,targetNode:r.current,scrollNode:a.current,padding:s,shouldFlip:o,boundaryElement:l,offset:h,crossOffset:p,maxHeight:P}))},C);he(S,C),Ec(S);let O=x.useRef(!1);he(()=>{let D,M=()=>{O.current=!0,clearTimeout(D),D=setTimeout(()=>{O.current=!1},500),S()};return Je==null||Je.addEventListener("resize",M),()=>{Je==null||Je.removeEventListener("resize",M)}},[S]);let g=x.useCallback(()=>{O.current||v()},[v,O]);return $c({triggerRef:r,isOpen:b,onClose:v?g:void 0}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...A.position,maxHeight:A.maxHeight}},placement:A.placement,arrowProps:{style:{left:A.arrowOffsetLeft,top:A.arrowOffsetTop}},updatePosition:S}}function Ec(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function xc(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}var Pc={};ye(Pc,"useOverlay",()=>Ac);const Oe=[];function Ac(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:i=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;x.useEffect(()=>(a&&Oe.push(t),()=>{let P=Oe.indexOf(t);P>=0&&Oe.splice(P,1)}),[a,t]);let l=()=>{Oe[Oe.length-1]===t&&r&&r()},h=P=>{(!o||o(P.target))&&Oe[Oe.length-1]===t&&(P.stopPropagation(),P.preventDefault())},p=P=>{(!o||o(P.target))&&(Oe[Oe.length-1]===t&&(P.stopPropagation(),P.preventDefault()),l())},$=P=>{P.key==="Escape"&&!s&&(P.stopPropagation(),P.preventDefault(),l())};Si({ref:t,onInteractOutside:i?p:null,onInteractOutsideStart:h});let{focusWithinProps:b}=Ci({isDisabled:!n,onBlurWithin:P=>{(!o||o(P.relatedTarget))&&r()}}),v=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:$,...b},underlayProps:{onPointerDown:v}}}var Tc={};ye(Tc,"useOverlayTrigger",()=>Cc);function Cc(e,t,r){let{type:n}=e,{isOpen:a}=t;x.useEffect(()=>{r&&r.current&&Mi.set(r.current,t.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let s=Jt();return{triggerProps:{"aria-haspopup":i,"aria-expanded":a,"aria-controls":a?s:null},overlayProps:{id:s}}}var Sc={};ye(Sc,"usePreventScroll",()=>Oc);const Sr=typeof window!="undefined"&&window.visualViewport,kc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oc(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return wt()?_c():Rc()},[t])}function Rc(){return bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"))}function _c(){let e,t=0,r=$=>{e=Pn($.target),!(e===document.documentElement&&e===document.body)&&(t=$.changedTouches[0].pageY)},n=$=>{if(e===document.documentElement||e===document.body){$.preventDefault();return}let b=$.changedTouches[0].pageY,v=e.scrollTop,P=e.scrollHeight-e.clientHeight;(v<=0&&b>t||v>=P&&b<t)&&$.preventDefault(),t=b},a=$=>{let b=$.target;ya(b)&&b!==document.activeElement&&($.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},i=$=>{let b=$.target;ya(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",Sr&&(Sr.height<window.innerHeight?requestAnimationFrame(()=>{ba(b)}):Sr.addEventListener("resize",()=>ba(b),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},o=window.pageXOffset,l=window.pageYOffset,h=bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"),mt(document.body,"marginTop",`-${l}px`));window.scrollTo(0,0);let p=bt(st(document,"touchstart",r,{passive:!1,capture:!0}),st(document,"touchmove",n,{passive:!1,capture:!0}),st(document,"touchend",a,{passive:!1,capture:!0}),st(document,"focus",i,!0),st(window,"scroll",s));return()=>{h(),p(),window.scrollTo(o,l)}}function mt(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function st(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function ba(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=Pn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let n=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top;a>n+e.clientHeight&&(r.scrollTop+=a-n)}e=r.parentElement}}function ya(e){return e instanceof HTMLInputElement&&!kc.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var Pt={};ye(Pt,"ModalProvider",()=>In);ye(Pt,"useModalProvider",()=>Nn);ye(Pt,"OverlayProvider",()=>Li);ye(Pt,"OverlayContainer",()=>Lc);ye(Pt,"useModal",()=>Ic);const zt=W.default.createContext(null);function In(e){let{children:t}=e,r=x.useContext(zt),[n,a]=x.useState(0),i=x.useMemo(()=>({parent:r,modalCount:n,addModal(){a(s=>s+1),r&&r.addModal()},removeModal(){a(s=>s-1),r&&r.removeModal()}}),[r,n]);return W.default.createElement(zt.Provider,{value:i},t)}function Nn(){let e=x.useContext(zt);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function Mc(e){let{modalProviderProps:t}=Nn();return W.default.createElement("div",{"data-overlay-container":!0,...e,...t})}function Li(e){return W.default.createElement(In,null,W.default.createElement(Mc,e))}function Lc(e){let{portalContainer:t=document.body,...r}=e;W.default.useEffect(()=>{if(t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]);let n=W.default.createElement(Li,r);return Pa.default.createPortal(n,t)}function Ic(e){let t=x.useContext(zt);if(!t)throw new Error("Modal is not contained within a provider");return x.useEffect(()=>{if(!((e==null?void 0:e.isDisabled)||!t||!t.parent))return t.parent.addModal(),()=>{t&&t.parent&&t.parent.removeModal()}},[t,t.parent,e==null?void 0:e.isDisabled]),{modalProps:{"data-ismodal":!(e!=null&&e.isDisabled)}}}var Nc={};ye(Nc,"DismissButton",()=>Dc);var Ii={},Ni={};Ni=JSON.parse('{"dismiss":"\u062A\u062C\u0627\u0647\u0644"}');var Di={};Di=JSON.parse('{"dismiss":"\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"}');var Bi={};Bi=JSON.parse('{"dismiss":"Odstranit"}');var Hi={};Hi=JSON.parse('{"dismiss":"Luk"}');var Fi={};Fi=JSON.parse('{"dismiss":"Schlie\xDFen"}');var Wi={};Wi=JSON.parse('{"dismiss":"\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"}');var Vi={};Vi=JSON.parse('{"dismiss":"Dismiss"}');var Ui={};Ui=JSON.parse('{"dismiss":"Descartar"}');var ji={};ji=JSON.parse('{"dismiss":"L\xF5peta"}');var Gi={};Gi=JSON.parse('{"dismiss":"Hylk\xE4\xE4"}');var zi={};zi=JSON.parse('{"dismiss":"Rejeter"}');var Xi={};Xi=JSON.parse('{"dismiss":"\u05D4\u05EA\u05E2\u05DC\u05DD"}');var Ki={};Ki=JSON.parse('{"dismiss":"Odbaci"}');var Yi={};Yi=JSON.parse('{"dismiss":"Elutas\xEDt\xE1s"}');var qi={};qi=JSON.parse('{"dismiss":"Ignora"}');var Ji={};Ji=JSON.parse('{"dismiss":"\u9589\u3058\u308B"}');var Qi={};Qi=JSON.parse('{"dismiss":"\uBB34\uC2DC"}');var Zi={};Zi=JSON.parse('{"dismiss":"Atmesti"}');var eo={};eo=JSON.parse('{"dismiss":"Ner\u0101d\u012Bt"}');var to={};to=JSON.parse('{"dismiss":"Lukk"}');var ro={};ro=JSON.parse('{"dismiss":"Negeren"}');var no={};no=JSON.parse('{"dismiss":"Zignoruj"}');var ao={};ao=JSON.parse('{"dismiss":"Descartar"}');var io={};io=JSON.parse('{"dismiss":"Dispensar"}');var oo={};oo=JSON.parse('{"dismiss":"Revocare"}');var so={};so=JSON.parse('{"dismiss":"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"}');var lo={};lo=JSON.parse('{"dismiss":"Zru\u0161i\u0165"}');var uo={};uo=JSON.parse('{"dismiss":"Opusti"}');var co={};co=JSON.parse('{"dismiss":"Odbaci"}');var fo={};fo=JSON.parse('{"dismiss":"Avvisa"}');var ho={};ho=JSON.parse('{"dismiss":"Kapat"}');var po={};po=JSON.parse('{"dismiss":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"}');var mo={};mo=JSON.parse('{"dismiss":"\u53D6\u6D88"}');var vo={};vo=JSON.parse('{"dismiss":"\u95DC\u9589"}');Ii={"ar-AE":Ni,"bg-BG":Di,"cs-CZ":Bi,"da-DK":Hi,"de-DE":Fi,"el-GR":Wi,"en-US":Vi,"es-ES":Ui,"et-EE":ji,"fi-FI":Gi,"fr-FR":zi,"he-IL":Xi,"hr-HR":Ki,"hu-HU":Yi,"it-IT":qi,"ja-JP":Ji,"ko-KR":Qi,"lt-LT":Zi,"lv-LV":eo,"nb-NO":to,"nl-NL":ro,"pl-PL":no,"pt-BR":ao,"pt-PT":io,"ro-RO":oo,"ru-RU":so,"sk-SK":lo,"sl-SI":uo,"sr-SP":co,"sv-SE":fo,"tr-TR":ho,"uk-UA":po,"zh-CN":mo,"zh-TW":vo};function Dc(e){let{onDismiss:t,...r}=e,n=ei(fc(Ii)),a=li(r,n("dismiss")),i=()=>{t&&t()};return W.default.createElement(_i,null,W.default.createElement("button",{...a,tabIndex:-1,onClick:i}))}var Bc={};ye(Bc,"ariaHideOutside",()=>Hc);let lt=new WeakMap;function Hc(e,t=document.body){let r=new Set(e),n=new Set,a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return l instanceof HTMLElement&&l.dataset.liveAnnouncer==="true"&&r.add(l),r.has(l)||n.has(l.parentElement)?NodeFilter.FILTER_REJECT:l instanceof HTMLElement&&l.getAttribute("role")==="row"||e.some(h=>l.contains(h))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),i=l=>{var h;let p=(h=lt.get(l))!==null&&h!==void 0?h:0;l.getAttribute("aria-hidden")==="true"&&p===0||(p===0&&l.setAttribute("aria-hidden","true"),n.add(l),lt.set(l,p+1))},s=a.nextNode();for(;s!=null;)i(s),s=a.nextNode();let o=new MutationObserver(l=>{for(let h of l)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...r,...n].some(p=>p.contains(h.target)))for(let p of h.addedNodes)p instanceof HTMLElement&&p.dataset.liveAnnouncer==="true"?r.add(p):p instanceof Element&&i(p)});return o.observe(t,{childList:!0,subtree:!0}),()=>{o.disconnect();for(let l of n){let h=lt.get(l);h===1?(l.removeAttribute("aria-hidden"),lt.delete(l)):lt.set(l,h-1)}}}function $a(e){return e&&e.__esModule?e.default:e}function Ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Dn={};Ge(Dn,"useProvider",()=>ir);Ge(Dn,"Provider",()=>yo);Ge(Dn,"useProviderProps",()=>Gc);var go={};Ge(go,"spectrum",()=>Kr,e=>Kr=e);var Kr;Kr="spectrum_b37d53";var ar={};Ge(ar,"spectrum",()=>Yr,e=>Yr=e);Ge(ar,"spectrum-Body",()=>qr,e=>qr=e);Ge(ar,"spectrum-Body--italic",()=>Jr,e=>Jr=e);var Yr,qr,Jr;Yr="spectrum_2a241c";qr="spectrum-Body_2a241c";Jr="spectrum-Body--italic_2a241c";function Fc(e,t){let r=Ft("(prefers-color-scheme: dark)"),n=Ft("(prefers-color-scheme: light)");return e.dark&&r?"dark":e.light&&n?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function Wc(e){return Ft("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var bo={};bo=JSON.parse('{"name":"@react-spectrum/provider","version":"3.4.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@babel/runtime":"^7.6.2","@react-aria/i18n":"^3.4.1","@react-aria/overlays":"^3.9.1","@react-aria/utils":"^3.13.1","@react-spectrum/utils":"^3.7.1","@react-types/provider":"^3.5.1","@react-types/shared":"^3.13.1","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');const Bn=W.default.createContext(null);Bn.displayName="ProviderContext";const Vc={S:640,M:768,L:1024,XL:1280,XXL:1536};function Uc(e,t){let r=ir(),n=r&&r.colorScheme,a=r&&r.breakpoints,{theme:i=r&&r.theme,defaultColorScheme:s}=e,o=Fc(i,s),l=Wc(i),{locale:h}=_e(),p=!!i[n],{colorScheme:$=p?n:o,scale:b=r?r.scale:l,locale:v=r?h:null,breakpoints:P=r?a:Vc,children:A,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D,...M}=e,N={version:bo.version,theme:i,breakpoints:P,colorScheme:$,scale:b,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D},I=bi(P),R={};Object.entries(N).forEach(([y,f])=>f!==void 0&&(R[y]=f));let B=Object.assign({},r,R),E=A,m=Pe(M),{styleProps:d}=Ae(M,void 0,{matchedBreakpoints:I});return(!r||e.locale||i!==r.theme||$!==r.colorScheme||b!==r.scale||Object.keys(m).length>0||M.UNSAFE_className||Object.keys(d.style).length>0)&&(E=W.default.createElement(jc,{...e,UNSAFE_style:{isolation:r?void 0:"isolate",...d.style},ref:t},E)),W.default.createElement(Bn.Provider,{value:B},W.default.createElement(Za,{locale:v},W.default.createElement(gi,{matchedBreakpoints:I},W.default.createElement(In,null,E))))}let yo=W.default.forwardRef(Uc);const jc=W.default.forwardRef(function(t,r){let{children:n,...a}=t,{locale:i,direction:s}=_e(),{theme:o,colorScheme:l,scale:h}=ir(),{modalProviderProps:p}=Nn(),{styleProps:$}=Ae(a),b=De(r),v=Object.keys(o[l])[0],P=Object.keys(o[h])[0],A=vn($.className,$a(go).spectrum,$a(ar).spectrum,o[l][v],o[h][P],o.global?Object.values(o.global):null,{"react-spectrum-provider":Le,spectrum:Le,[v]:Le,[P]:Le});var k,C;let S={...$.style,colorScheme:(C=(k=t.colorScheme)!==null&&k!==void 0?k:l)!==null&&C!==void 0?C:Object.keys(o).filter(g=>g==="light"||g==="dark").join(" ")},O=x.useRef(!1);return x.useEffect(()=>{if(s&&b.current){let g=b.current.parentElement.closest("[dir]"),D=g&&g.getAttribute("dir");D&&D!==s&&!O.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),O.current=!0)}},[s,b,O]),W.default.createElement("div",{...Pe(a),...$,...p,className:A,style:S,lang:i,dir:s,ref:b},n)});function ir(){return x.useContext(Bn)}function Gc(e){let t=ir();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}function ut(e){return e&&e.__esModule?e.default:e}function $e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $o={};$e($o,"spectrum--darkest",()=>Qr,e=>Qr=e);var Qr;Qr="spectrum--darkest_256eeb";var He={};$e(He,"spectrum",()=>Zr,e=>Zr=e);$e(He,"spectrum--medium",()=>en,e=>en=e);$e(He,"spectrum--large",()=>tn,e=>tn=e);$e(He,"spectrum--darkest",()=>rn,e=>rn=e);$e(He,"spectrum--dark",()=>nn,e=>nn=e);$e(He,"spectrum--light",()=>an,e=>an=e);$e(He,"spectrum--lightest",()=>on,e=>on=e);var Zr,en,tn,rn,nn,an,on;Zr="spectrum_9e130c";en="spectrum--medium_9e130c";tn="spectrum--large_9e130c";rn="spectrum--darkest_9e130c";nn="spectrum--dark_9e130c";an="spectrum--light_9e130c";on="spectrum--lightest_9e130c";var wo={};$e(wo,"spectrum--large",()=>sn,e=>sn=e);var sn;sn="spectrum--large_c40598";var Eo={};$e(Eo,"spectrum--light",()=>ln,e=>ln=e);var ln;ln="spectrum--light_a40724";var xo={};$e(xo,"spectrum--medium",()=>un,e=>un=e);var un;un="spectrum--medium_4b172c";let zc={global:ut(He),light:ut(Eo),dark:ut($o),medium:ut(xo),large:ut(wo)};const j=e=>{const t=x.useContext(e);if(!t)throw new Error(`Cannot find ${e}Provider`);return t},pe={templateArea:{artwork:"row1-1",trackInfo:"row1-2",trackTimeCurrent:"row1-3",trackTimeDuration:"row1-4",progress:"row1-5",repeatType:"row1-6",volume:"row1-7",playButton:"row1-8",playList:"row1-9"}},Z=x.createContext(null);function Xc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={exports:{}},sr={};/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
6
6
|
*
|
|
@@ -8,149 +8,51 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var Kc=W.default,Yc=Symbol.for("react.element"),qc=Symbol.for("react.fragment"),Jc=Object.prototype.hasOwnProperty,Qc=Kc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zc={key:!0,ref:!0,__self:!0,__source:!0};function
|
|
11
|
+
*/var Kc=W.default,Yc=Symbol.for("react.element"),qc=Symbol.for("react.fragment"),Jc=Object.prototype.hasOwnProperty,Qc=Kc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zc={key:!0,ref:!0,__self:!0,__source:!0};function Po(e,t,r){var n,a={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)Jc.call(t,n)&&!Zc.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Yc,type:e,key:i,ref:s,props:a,_owner:Qc.current}}sr.Fragment=qc;sr.jsx=Po;sr.jsxs=Po;or.exports=sr;const L=or.exports.jsx,le=or.exports.jsxs,ze=or.exports.Fragment,ef=({children:e,rootContainerProps:t})=>{const{playerPlacement:r}=j(Z),[n,a]=x.useState();return x.useLayoutEffect(()=>{r&&a((()=>{switch(r){case"bottom":return{bottom:0};case"top":return{top:0};case"bottom-left":return{bottom:0,left:0};case"bottom-right":return{bottom:0,right:0};case"top-left":return{top:0,left:0};case"top-right":return{top:0,right:0}}})())},[r]),L(yo,{theme:zc,width:"100%",position:r&&"fixed",UNSAFE_className:"rm-audio-player-provider",...n,...t,children:e})},ue=x.createContext(null),Hn=e=>{const t=`${Math.floor(e/60)}`.padStart(2,"0"),r=`${Math.floor(e%60)}`.padStart(2,"0");return`${t}:${r}`},Fn=(e,t,r)=>{if(!e)return;const{progressHandleEl:n,progressValueEl:a,trackCurTimeEl:i,trackDurationEl:s,audioEl:o,waveformInst:l}=e;r&&(o&&(o.currentTime=0),l==null||l.seekTo(0)),n&&a&&(a.style.transform="scaleX(0)",n.style.transform="translateX(0px)"),i&&s&&(i.innerHTML="00:00",r||(s.innerHTML=t?Hn(t):"00:00"))},tf=(e,t)=>{var r,n,a,i;switch(t.type){case"NEXT_AUDIO":{if(e.curAudioState.repeatType==="NONE"&&e.curIdx+1===e.playList.length)return{...e,curAudioState:{...e.curAudioState,isPlaying:!1}};if(e.curAudioState.repeatType==="SHUFFLE"){let o=0;const l=()=>{o=Math.round(Math.random()*(e.playList.length-1))};for(;o===e.curIdx;)l();return{...e,curPlayId:e.playList[o].id,curIdx:o}}const s=(e.curIdx+1)%e.playList.length;return{...e,curIdx:s,curPlayId:e.playList[s].id}}case"PREV_AUDIO":{if(((r=e.elementRefs)==null?void 0:r.audioEl)&&((n=e.elementRefs)==null?void 0:n.audioEl.currentTime)>1||((a=e.elementRefs)==null?void 0:a.waveformInst)&&((i=e.elementRefs)==null?void 0:i.waveformInst.getCurrentTime())>1||e.curAudioState.repeatType==="NONE"&&e.curIdx===0)return Fn(e.elementRefs,void 0,!0),e;if(e.curAudioState.repeatType==="SHUFFLE"){const o=Math.round(Math.random()*(e.playList.length-1));return{...e,curPlayId:e.playList[o].id,curIdx:o}}const s=(e.curIdx-1+e.playList.length)%e.playList.length;return{...e,curPlayId:e.playList[s].id,curIdx:s}}case"UPDATE_PLAY_LIST":{const s=t.playList.find(o=>o.id===e.curPlayId);return s?{...e,playList:t.playList,curIdx:s.index}:(console.error("UPDATE_PLAY_LIST ERROR - curPlayId is not found on playList"),e)}case"SET_VOLUME":return{...e,curAudioState:{...e.curAudioState,volume:t.volume}};case"SET_INITIAL_AUDIO_STATE":return{...e,curAudioState:{...e.curAudioState,...t.audioInitialState},curPlayId:t.audioInitialState.curPlayId};case"SET_PlAY_STATE":return t.state!==void 0?{...e,curAudioState:{...e.curAudioState,isPlaying:t.state}}:{...e,curAudioState:{...e.curAudioState,isPlaying:!e.curAudioState.isPlaying}};case"SET_CURRENT_INDEX":return{...e,curPlayId:t.currentAudioId,curIdx:t.currentIndex};case"SET_REPEAT_TYPE":return{...e,curAudioState:{...e.curAudioState,repeatType:t.repeatType}};case"SET_PLACEMENTS":return{...e,playerPlacement:t.playerPlacement||e.playerPlacement,playListPlacement:t.playListPlacement||e.playListPlacement,interfacePlacement:t.interfacePlacement};case"SET_MUTED":return{...e,curAudioState:{...e.curAudioState,muted:t.muted}};case"SET_ACTIVE_UI":return{...e,activeUI:{...t.activeUI}};case"SET_ELEMENT_REFS":return{...e,elementRefs:{...e.elementRefs,...t.elementRefs}};case"SET_CUSTOM_ICONS":return{...e,customIcons:{...e.customIcons,...t.customIcons}};case"SET_COVER_IMGS_CSS":return{...e,coverImgsCss:{...e.coverImgsCss,...t.coverImgsCss}};default:throw new Error("Unhandled action")}},rf=({children:e})=>{const[t,r]=x.useReducer(tf,{playList:[],curPlayId:1,curIdx:0,curAudioState:{isPlaying:!1,repeatType:"ALL",volume:1},activeUI:{playButton:!0,volumeSlider:!0},playListPlacement:"bottom",interfacePlacement:{templateArea:{playButton:pe.templateArea.playButton}}});return L(Z.Provider,{value:t,children:L(ue.Provider,{value:r,children:e})})};const nf=be.createGlobalStyle`
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
iframe,
|
|
20
|
-
h1,
|
|
21
|
-
h2,
|
|
22
|
-
h3,
|
|
23
|
-
h4,
|
|
24
|
-
h5,
|
|
25
|
-
h6,
|
|
26
|
-
p,
|
|
27
|
-
blockquote,
|
|
28
|
-
pre,
|
|
29
|
-
a,
|
|
30
|
-
abbr,
|
|
31
|
-
acronym,
|
|
32
|
-
address,
|
|
33
|
-
big,
|
|
34
|
-
cite,
|
|
35
|
-
code,
|
|
36
|
-
del,
|
|
37
|
-
dfn,
|
|
38
|
-
em,
|
|
39
|
-
img,
|
|
40
|
-
ins,
|
|
41
|
-
kbd,
|
|
42
|
-
q,
|
|
43
|
-
s,
|
|
44
|
-
samp,
|
|
45
|
-
small,
|
|
46
|
-
strike,
|
|
47
|
-
strong,
|
|
48
|
-
sub,
|
|
49
|
-
sup,
|
|
50
|
-
tt,
|
|
51
|
-
var,
|
|
52
|
-
b,
|
|
53
|
-
u,
|
|
54
|
-
i,
|
|
55
|
-
center,
|
|
56
|
-
dl,
|
|
57
|
-
dt,
|
|
58
|
-
dd,
|
|
59
|
-
ol,
|
|
60
|
-
ul,
|
|
61
|
-
li,
|
|
62
|
-
fieldset,
|
|
63
|
-
form,
|
|
64
|
-
label,
|
|
65
|
-
legend,
|
|
66
|
-
table,
|
|
67
|
-
caption,
|
|
68
|
-
tbody,
|
|
69
|
-
tfoot,
|
|
70
|
-
thead,
|
|
71
|
-
tr,
|
|
72
|
-
th,
|
|
73
|
-
td,
|
|
74
|
-
article,
|
|
75
|
-
aside,
|
|
76
|
-
canvas,
|
|
77
|
-
details,
|
|
78
|
-
embed,
|
|
79
|
-
figure,
|
|
80
|
-
figcaption,
|
|
81
|
-
footer,
|
|
82
|
-
header,
|
|
83
|
-
hgroup,
|
|
84
|
-
menu,
|
|
85
|
-
nav,
|
|
86
|
-
output,
|
|
87
|
-
ruby,
|
|
88
|
-
section,
|
|
89
|
-
summary,
|
|
90
|
-
time,
|
|
91
|
-
mark,
|
|
92
|
-
audio,
|
|
93
|
-
button,
|
|
94
|
-
video {
|
|
95
|
-
margin: 0;
|
|
96
|
-
padding: 0;
|
|
97
|
-
font: inherit;
|
|
98
|
-
font-size: 100%;
|
|
99
|
-
vertical-align: baseline;
|
|
100
|
-
border: 0;
|
|
101
|
-
}
|
|
102
|
-
/* HTML5 display-role reset for older browsers */
|
|
103
|
-
article,
|
|
104
|
-
aside,
|
|
105
|
-
details,
|
|
106
|
-
figcaption,
|
|
107
|
-
figure,
|
|
108
|
-
footer,
|
|
109
|
-
header,
|
|
110
|
-
hgroup,
|
|
111
|
-
menu,
|
|
112
|
-
nav,
|
|
113
|
-
section {
|
|
114
|
-
display: block;
|
|
115
|
-
}
|
|
116
|
-
body {
|
|
117
|
-
line-height: 1;
|
|
118
|
-
}
|
|
119
|
-
ol,
|
|
120
|
-
ul {
|
|
121
|
-
list-style: none;
|
|
122
|
-
}
|
|
123
|
-
blockquote,
|
|
124
|
-
q {
|
|
125
|
-
quotes: none;
|
|
126
|
-
}
|
|
127
|
-
blockquote:before,
|
|
128
|
-
blockquote:after,
|
|
129
|
-
q:before,
|
|
130
|
-
q:after {
|
|
131
|
-
content: '';
|
|
132
|
-
content: none;
|
|
133
|
-
}
|
|
134
|
-
table {
|
|
135
|
-
border-collapse: collapse;
|
|
136
|
-
border-spacing: 0;
|
|
137
|
-
}
|
|
13
|
+
.rm-audio-player-provider {
|
|
14
|
+
* {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
font: inherit;
|
|
17
|
+
font-size: 100%;
|
|
18
|
+
}
|
|
138
19
|
|
|
139
|
-
|
|
20
|
+
ol,
|
|
21
|
+
ul {
|
|
22
|
+
list-style: none;
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
26
|
+
blockquote,
|
|
27
|
+
q {
|
|
28
|
+
quotes: none;
|
|
29
|
+
}
|
|
30
|
+
blockquote:before,
|
|
31
|
+
blockquote:after,
|
|
32
|
+
q:before,
|
|
33
|
+
q:after {
|
|
34
|
+
content: '';
|
|
35
|
+
content: none;
|
|
36
|
+
}
|
|
37
|
+
table {
|
|
38
|
+
border-collapse: collapse;
|
|
39
|
+
border-spacing: 0;
|
|
40
|
+
}
|
|
41
|
+
button {
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 0;
|
|
140
44
|
background: transparent;
|
|
141
45
|
cursor: pointer;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
`;function lr(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var af={};lr(af,"View",()=>Wn);function of(e,t){e=Et(e);let{elementType:r="div",children:n,...a}=e,{styleProps:i}=Ae(e,yi),s=De(t);return W.default.createElement(r,{...xe(a),...i,ref:s},W.default.createElement(Pt,null,n))}const Wn=P.forwardRef(of);var sf={};lr(sf,"Content",()=>uf);function lf(e,t){e=Et(e,"content");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("section",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const uf=P.forwardRef(lf);var cf={};lr(cf,"Footer",()=>df);function ff(e,t){e=Et(e,"footer");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("footer",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const df=P.forwardRef(ff);var hf={};lr(hf,"Header",()=>mf);function pf(e,t){e=Et(e,"header");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("header",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const mf=P.forwardRef(pf),vf=()=>{const{curAudioState:e,elementRefs:t}=j(ee),r=j(ue),n=P.useCallback(s=>{if(s.currentTarget.readyState===0||!t)return;const o=s.currentTarget.currentTime,l=s.currentTarget.duration,{trackCurTimeEl:h,progressBarEl:p,progressValueEl:w,progressHandleEl:b}=t;if(h&&(h.innerText=Hn(o)),p&&w&&b){const v=p.clientWidth,x=o/l*v;w.style.transform=`scaleX(${o/l})`,b.style.transform=`translateX(${x}px)`}},[t]),a=P.useCallback(()=>{if(!!(t!=null&&t.audioEl)){if(e.repeatType==="ONE"){t.audioEl.currentTime=0,t.audioEl.play();return}r({type:"NEXT_AUDIO"})}},[r,e.repeatType,t==null?void 0:t.audioEl]),i=P.useCallback(s=>{if(!t)return;const{duration:o}=s.currentTarget;Fn(t,o)},[t]);return P.useEffect(()=>{!(t!=null&&t.audioEl)||(e.isPlaying?t==null||t.audioEl.play():t==null||t.audioEl.pause())},[t==null?void 0:t.audioEl,e.isPlaying]),P.useEffect(()=>{!(t!=null&&t.audioEl)||(t.audioEl.volume=e.volume)},[t==null?void 0:t.audioEl,e.volume]),{onTimeUpdate:n,onEnded:a,onLoadedMetadata:i}},gf=()=>{const e=P.useRef(null),{curAudioState:t,curPlayId:r,playList:n}=j(ee),a=j(ue),i=n.find(l=>l.id===r),s=Object.fromEntries(Object.entries(t).filter(l=>!(l[0]==="isPlaying"||l[0]==="repeatType"||l[0]==="curPlayId"))),o=vf();return P.useEffect(()=>{!e.current||a({type:"SET_ELEMENT_REFS",elementRefs:{audioEl:e.current}})},[e.current,a]),L("audio",{id:"rm-audio-player-audio",autoPlay:t.isPlaying,ref:e,src:i.src,...o,...s})},bf=e=>{const t=P.useRef();return P.useLayoutEffect(()=>{const r=Object.entries(e).reduce((n,[a,i])=>({...n,[a]:window.getComputedStyle(document.getElementsByClassName("rm-audio-player-provider")[0]).getPropertyValue(`${i}`)}),{});t.current=r},[e]),t};var Ao={exports:{}};/*!
|
|
46
|
+
vertical-align: baseline;
|
|
47
|
+
border: 0;
|
|
48
|
+
}
|
|
49
|
+
}`;function lr(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var af={};lr(af,"View",()=>Wn);function of(e,t){e=Et(e);let{elementType:r="div",children:n,...a}=e,{styleProps:i}=Ae(e,yi),s=De(t);return W.default.createElement(r,{...Pe(a),...i,ref:s},W.default.createElement(xt,null,n))}const Wn=x.forwardRef(of);var sf={};lr(sf,"Content",()=>uf);function lf(e,t){e=Et(e,"content");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("section",{...Pe(n),...a,ref:i},W.default.createElement(xt,null,r))}const uf=x.forwardRef(lf);var cf={};lr(cf,"Footer",()=>df);function ff(e,t){e=Et(e,"footer");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("footer",{...Pe(n),...a,ref:i},W.default.createElement(xt,null,r))}const df=x.forwardRef(ff);var hf={};lr(hf,"Header",()=>mf);function pf(e,t){e=Et(e,"header");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("header",{...Pe(n),...a,ref:i},W.default.createElement(xt,null,r))}const mf=x.forwardRef(pf),vf=()=>{const{curAudioState:e,elementRefs:t}=j(Z),r=j(ue),n=x.useCallback(s=>{if(s.currentTarget.readyState===0||!t)return;const o=s.currentTarget.currentTime,l=s.currentTarget.duration,{trackCurTimeEl:h,progressBarEl:p,progressValueEl:$,progressHandleEl:b}=t;if(h&&(h.innerText=Hn(o)),p&&$&&b){const v=p.clientWidth,P=o/l*v;$.style.transform=`scaleX(${o/l})`,b.style.transform=`translateX(${P}px)`}},[t]),a=x.useCallback(()=>{if(!!(t!=null&&t.audioEl)){if(e.repeatType==="ONE"){t.audioEl.currentTime=0,t.audioEl.play();return}r({type:"NEXT_AUDIO"})}},[r,e.repeatType,t==null?void 0:t.audioEl]),i=x.useCallback(s=>{if(!t)return;const{duration:o}=s.currentTarget;Fn(t,o)},[t]);return x.useEffect(()=>{!(t!=null&&t.audioEl)||(e.isPlaying?t==null||t.audioEl.play():t==null||t.audioEl.pause())},[t==null?void 0:t.audioEl,e.isPlaying]),x.useEffect(()=>{!(t!=null&&t.audioEl)||(t.audioEl.volume=e.volume)},[t==null?void 0:t.audioEl,e.volume]),{onTimeUpdate:n,onEnded:a,onLoadedMetadata:i}},gf=()=>{const e=x.useRef(null),{curAudioState:t,curPlayId:r,playList:n}=j(Z),a=j(ue),i=n.find(l=>l.id===r),s=Object.fromEntries(Object.entries(t).filter(l=>!(l[0]==="isPlaying"||l[0]==="repeatType"||l[0]==="curPlayId"))),o=vf();return x.useEffect(()=>{!e.current||a({type:"SET_ELEMENT_REFS",elementRefs:{audioEl:e.current}})},[e.current,a]),L("audio",{id:"rm-audio-player-audio",autoPlay:t.isPlaying,ref:e,src:i.src,...o,...s})},bf=e=>{const t=x.useRef();return x.useLayoutEffect(()=>{const r=Object.entries(e).reduce((n,[a,i])=>({...n,[a]:window.getComputedStyle(document.getElementsByClassName("rm-audio-player-provider")[0]).getPropertyValue(`${i}`)}),{});t.current=r},[e]),t};var Ao={exports:{}};/*!
|
|
148
50
|
* wavesurfer.js 6.2.0 (2022-05-16)
|
|
149
51
|
* https://wavesurfer-js.org
|
|
150
52
|
* @license BSD-3-Clause
|
|
151
|
-
*/(function(e,t){(function(n,a){e.exports=a()})(self,()=>(()=>{var r={"./src/drawer.canvasentry.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var h=w(l("./src/util/style.js")),p=w(l("./src/util/get-id.js"));function w(k){return k&&k.__esModule?k:{default:k}}function b(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function v(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function x(k,C,S){return C&&v(k.prototype,C),S&&v(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var A=function(){function k(){b(this,k),this.wave=null,this.waveCtx=null,this.progress=null,this.progressCtx=null,this.start=0,this.end=1,this.id=(0,p.default)(typeof this.constructor.name!="undefined"?this.constructor.name.toLowerCase()+"_":"canvasentry_"),this.canvasContextAttributes={}}return x(k,[{key:"initWave",value:function(S){this.wave=S,this.waveCtx=this.wave.getContext("2d",this.canvasContextAttributes)}},{key:"initProgress",value:function(S){this.progress=S,this.progressCtx=this.progress.getContext("2d",this.canvasContextAttributes)}},{key:"updateDimensions",value:function(S,O,g,D){this.start=this.wave.offsetLeft/O||0,this.end=this.start+S/O,this.wave.width=g,this.wave.height=D;var M={width:S+"px"};(0,h.default)(this.wave,M),this.hasProgressCanvas&&(this.progress.width=g,this.progress.height=D,(0,h.default)(this.progress,M))}},{key:"clearWave",value:function(){this.waveCtx.clearRect(0,0,this.waveCtx.canvas.width,this.waveCtx.canvas.height),this.hasProgressCanvas&&this.progressCtx.clearRect(0,0,this.progressCtx.canvas.width,this.progressCtx.canvas.height)}},{key:"setFillStyles",value:function(S,O){this.waveCtx.fillStyle=this.getFillStyle(this.waveCtx,S),this.hasProgressCanvas&&(this.progressCtx.fillStyle=this.getFillStyle(this.progressCtx,O))}},{key:"getFillStyle",value:function(S,O){if(typeof O=="string"||O instanceof CanvasGradient)return O;var g=S.createLinearGradient(0,0,0,S.canvas.height);return O.forEach(function(D,M){return g.addColorStop(M/O.length,D)}),g}},{key:"applyCanvasTransforms",value:function(S){S&&(this.waveCtx.setTransform(0,1,1,0,0,0),this.hasProgressCanvas&&this.progressCtx.setTransform(0,1,1,0,0,0))}},{key:"fillRects",value:function(S,O,g,D,M){this.fillRectToContext(this.waveCtx,S,O,g,D,M),this.hasProgressCanvas&&this.fillRectToContext(this.progressCtx,S,O,g,D,M)}},{key:"fillRectToContext",value:function(S,O,g,D,M,N){!S||(N?this.drawRoundedRect(S,O,g,D,M,N):S.fillRect(O,g,D,M))}},{key:"drawRoundedRect",value:function(S,O,g,D,M,N){M!==0&&(M<0&&(M*=-1,g-=M),S.beginPath(),S.moveTo(O+N,g),S.lineTo(O+D-N,g),S.quadraticCurveTo(O+D,g,O+D,g+N),S.lineTo(O+D,g+M-N),S.quadraticCurveTo(O+D,g+M,O+D-N,g+M),S.lineTo(O+N,g+M),S.quadraticCurveTo(O,g+M,O,g+M-N),S.lineTo(O,g+N),S.quadraticCurveTo(O,g,O+N,g),S.closePath(),S.fill())}},{key:"drawLines",value:function(S,O,g,D,M,N){this.drawLineToContext(this.waveCtx,S,O,g,D,M,N),this.hasProgressCanvas&&this.drawLineToContext(this.progressCtx,S,O,g,D,M,N)}},{key:"drawLineToContext",value:function(S,O,g,D,M,N,I){if(!!S){var R=O.length/2,B=Math.round(R*this.start),E=Math.round(R*this.end)+1,m=B,d=E,y=this.wave.width/(d-m-1),f=D+M,c=g/D;S.beginPath(),S.moveTo((m-B)*y,f),S.lineTo((m-B)*y,f-Math.round((O[2*m]||0)/c));var T,$,u;for(T=m;T<d;T++)$=O[2*T]||0,u=Math.round($/c),S.lineTo((T-B)*y+this.halfPixel,f-u);var _=d-1;for(_;_>=m;_--)$=O[2*_+1]||0,u=Math.round($/c),S.lineTo((_-B)*y+this.halfPixel,f-u);S.lineTo((m-B)*y,f-Math.round((O[2*m+1]||0)/c)),S.closePath(),S.fill()}}},{key:"destroy",value:function(){this.waveCtx=null,this.wave=null,this.progressCtx=null,this.progress=null}},{key:"getImage",value:function(S,O,g){var D=this;if(g==="blob")return new Promise(function(M){D.wave.toBlob(M,S,O)});if(g==="dataURL")return this.wave.toDataURL(S,O)}}]),k}();o.default=A,s.exports=o.default},"./src/drawer.js":(s,o,l)=>{function h(I){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},h(I)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function w(I){if(typeof WeakMap!="function")return null;var R=new WeakMap,B=new WeakMap;return(w=function(m){return m?B:R})(I)}function b(I,R){if(!R&&I&&I.__esModule)return I;if(I===null||h(I)!=="object"&&typeof I!="function")return{default:I};var B=w(R);if(B&&B.has(I))return B.get(I);var E={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in I)if(d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)){var y=m?Object.getOwnPropertyDescriptor(I,d):null;y&&(y.get||y.set)?Object.defineProperty(E,d,y):E[d]=I[d]}return E.default=I,B&&B.set(I,E),E}function v(I,R){if(!(I instanceof R))throw new TypeError("Cannot call a class as a function")}function x(I,R){for(var B=0;B<R.length;B++){var E=R[B];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}function A(I,R,B){return R&&x(I.prototype,R),B&&x(I,B),Object.defineProperty(I,"prototype",{writable:!1}),I}function k(I,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(R&&R.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),R&&C(I,R)}function C(I,R){return C=Object.setPrototypeOf||function(E,m){return E.__proto__=m,E},C(I,R)}function S(I){var R=D();return function(){var E=M(I),m;if(R){var d=M(this).constructor;m=Reflect.construct(E,arguments,d)}else m=E.apply(this,arguments);return O(this,m)}}function O(I,R){if(R&&(h(R)==="object"||typeof R=="function"))return R;if(R!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(I)}function g(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(I){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},M(I)}var N=function(I){k(B,I);var R=S(B);function B(E,m){var d;return v(this,B),d=R.call(this),d.container=p.withOrientation(E,m.vertical),d.params=m,d.width=0,d.height=m.height*d.params.pixelRatio,d.lastPos=0,d.wrapper=null,d}return A(B,[{key:"style",value:function(m,d){return p.style(m,d)}},{key:"createWrapper",value:function(){this.wrapper=p.withOrientation(this.container.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",cursor:this.params.hideCursor?"none":"auto",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()}},{key:"handleEvent",value:function(m,d){!d&&m.preventDefault();var y=p.withOrientation(m.targetTouches?m.targetTouches[0]:m,this.params.vertical).clientX,f=this.wrapper.getBoundingClientRect(),c=this.width,T=this.getWidth(),$=this.getProgressPixels(f,y),u;return!this.params.fillParent&&c<T?u=$*(this.params.pixelRatio/c)||0:u=($+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0,p.clamp(u,0,1)}},{key:"getProgressPixels",value:function(m,d){return this.params.rtl?m.right-d:d-m.left}},{key:"setupWrapperEvents",value:function(){var m=this;this.wrapper.addEventListener("click",function(d){var y=p.withOrientation(d,m.params.vertical),f=m.wrapper.offsetHeight-m.wrapper.clientHeight;if(f!==0){var c=m.wrapper.getBoundingClientRect();if(y.clientY>=c.bottom-f)return}m.params.interact&&m.fireEvent("click",d,m.handleEvent(d))}),this.wrapper.addEventListener("dblclick",function(d){m.params.interact&&m.fireEvent("dblclick",d,m.handleEvent(d))}),this.wrapper.addEventListener("scroll",function(d){return m.fireEvent("scroll",d)})}},{key:"drawPeaks",value:function(m,d,y,f){this.setWidth(d)||this.clearWave(),this.params.barWidth?this.drawBars(m,0,y,f):this.drawWave(m,0,y,f)}},{key:"resetScroll",value:function(){this.wrapper!==null&&(this.wrapper.scrollLeft=0)}},{key:"recenter",value:function(m){var d=this.wrapper.scrollWidth*m;this.recenterOnPosition(d,!0)}},{key:"recenterOnPosition",value:function(m,d){var y=this.wrapper.scrollLeft,f=~~(this.wrapper.clientWidth/2),c=this.wrapper.scrollWidth-this.wrapper.clientWidth,T=m-f,$=T-y;if(c!=0){if(!d&&-f<=$&&$<f){var u=this.params.autoCenterRate;u/=f,u*=c,$=Math.max(-u,Math.min(u,$)),T=y+$}T=Math.max(0,Math.min(c,T)),T!=y&&(this.wrapper.scrollLeft=T)}}},{key:"getScrollX",value:function(){var m=0;if(this.wrapper){var d=this.params.pixelRatio;if(m=Math.round(this.wrapper.scrollLeft*d),this.params.scrollParent){var y=~~(this.wrapper.scrollWidth*d-this.getWidth());m=Math.min(y,Math.max(0,m))}}return m}},{key:"getWidth",value:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)}},{key:"setWidth",value:function(m){if(this.width==m)return!1;if(this.width=m,this.params.fillParent||this.params.scrollParent)this.style(this.wrapper,{width:""});else{var d=~~(this.width/this.params.pixelRatio)+"px";this.style(this.wrapper,{width:d})}return this.updateSize(),!0}},{key:"setHeight",value:function(m){return m==this.height?!1:(this.height=m,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+"px"}),this.updateSize(),!0)}},{key:"progress",value:function(m){var d=1/this.params.pixelRatio,y=Math.round(m*this.width)*d;if(y<this.lastPos||y-this.lastPos>=d){if(this.lastPos=y,this.params.scrollParent&&this.params.autoCenter){var f=~~(this.wrapper.scrollWidth*m);this.recenterOnPosition(f,this.params.autoCenterImmediately)}this.updateProgress(y)}}},{key:"destroy",value:function(){this.unAll(),this.wrapper&&(this.wrapper.parentNode==this.container.domElement&&this.container.removeChild(this.wrapper.domElement),this.wrapper=null)}},{key:"updateCursor",value:function(){}},{key:"updateSize",value:function(){}},{key:"drawBars",value:function(m,d,y,f){}},{key:"drawWave",value:function(m,d,y,f){}},{key:"clearWave",value:function(){}},{key:"updateProgress",value:function(m){}}]),B}(p.Observer);o.default=N,s.exports=o.default},"./src/drawer.multicanvas.js":(s,o,l)=>{function h(E){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},h(E)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=A(l("./src/drawer.js")),w=x(l("./src/util/index.js")),b=A(l("./src/drawer.canvasentry.js"));function v(E){if(typeof WeakMap!="function")return null;var m=new WeakMap,d=new WeakMap;return(v=function(f){return f?d:m})(E)}function x(E,m){if(!m&&E&&E.__esModule)return E;if(E===null||h(E)!=="object"&&typeof E!="function")return{default:E};var d=v(m);if(d&&d.has(E))return d.get(E);var y={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in E)if(c!=="default"&&Object.prototype.hasOwnProperty.call(E,c)){var T=f?Object.getOwnPropertyDescriptor(E,c):null;T&&(T.get||T.set)?Object.defineProperty(y,c,T):y[c]=E[c]}return y.default=E,d&&d.set(E,y),y}function A(E){return E&&E.__esModule?E:{default:E}}function k(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function C(E,m){for(var d=0;d<m.length;d++){var y=m[d];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,y.key,y)}}function S(E,m,d){return m&&C(E.prototype,m),d&&C(E,d),Object.defineProperty(E,"prototype",{writable:!1}),E}function O(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),m&&g(E,m)}function g(E,m){return g=Object.setPrototypeOf||function(y,f){return y.__proto__=f,y},g(E,m)}function D(E){var m=I();return function(){var y=R(E),f;if(m){var c=R(this).constructor;f=Reflect.construct(y,arguments,c)}else f=y.apply(this,arguments);return M(this,f)}}function M(E,m){if(m&&(h(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(E)}function N(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(E){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},R(E)}var B=function(E){O(d,E);var m=D(d);function d(y,f){var c;return k(this,d),c=m.call(this,y,f),c.maxCanvasWidth=f.maxCanvasWidth,c.maxCanvasElementWidth=Math.round(f.maxCanvasWidth/f.pixelRatio),c.hasProgressCanvas=f.waveColor!=f.progressColor,c.halfPixel=.5/f.pixelRatio,c.canvases=[],c.progressWave=null,c.EntryClass=b.default,c.canvasContextAttributes=f.drawingContextAttributes,c.overlap=2*Math.ceil(f.pixelRatio/2),c.barRadius=f.barRadius||0,c.vertical=f.vertical,c}return S(d,[{key:"init",value:function(){this.createWrapper(),this.createElements()}},{key:"createElements",value:function(){this.progressWave=w.withOrientation(this.wrapper.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.progressWave,{position:"absolute",zIndex:3,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",pointerEvents:"none"}),this.addCanvas(),this.updateCursor()}},{key:"updateCursor",value:function(){this.style(this.progressWave,{borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})}},{key:"updateSize",value:function(){for(var f=this,c=Math.round(this.width/this.params.pixelRatio),T=Math.ceil(c/(this.maxCanvasElementWidth+this.overlap));this.canvases.length<T;)this.addCanvas();for(;this.canvases.length>T;)this.removeCanvas();var $=this.maxCanvasWidth+this.overlap,u=this.canvases.length-1;this.canvases.forEach(function(_,H){H==u&&($=f.width-f.maxCanvasWidth*u),f.updateDimensions(_,$,f.height),_.clearWave()})}},{key:"addCanvas",value:function(){var f=new this.EntryClass;f.canvasContextAttributes=this.canvasContextAttributes,f.hasProgressCanvas=this.hasProgressCanvas,f.halfPixel=this.halfPixel;var c=this.maxCanvasElementWidth*this.canvases.length,T=w.withOrientation(this.wrapper.appendChild(document.createElement("canvas")),this.params.vertical);if(this.style(T,{position:"absolute",zIndex:2,left:c+"px",top:0,bottom:0,height:"100%",pointerEvents:"none"}),f.initWave(T),this.hasProgressCanvas){var $=w.withOrientation(this.progressWave.appendChild(document.createElement("canvas")),this.params.vertical);this.style($,{position:"absolute",left:c+"px",top:0,bottom:0,height:"100%"}),f.initProgress($)}this.canvases.push(f)}},{key:"removeCanvas",value:function(){var f=this.canvases[this.canvases.length-1];f.wave.parentElement.removeChild(f.wave.domElement),this.hasProgressCanvas&&f.progress.parentElement.removeChild(f.progress.domElement),f&&(f.destroy(),f=null),this.canvases.pop()}},{key:"updateDimensions",value:function(f,c,T){var $=Math.round(c/this.params.pixelRatio),u=Math.round(this.width/this.params.pixelRatio);f.updateDimensions($,u,c,T),this.style(this.progressWave,{display:"block"})}},{key:"clearWave",value:function(){var f=this;w.frame(function(){f.canvases.forEach(function(c){return c.clearWave()})})()}},{key:"drawBars",value:function(f,c,T,$){var u=this;return this.prepareDraw(f,c,T,$,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(T!==void 0){var re=V?2:1,fe=z.length/re,Z=u.params.barWidth*u.params.pixelRatio,we=u.params.barGap===null?Math.max(u.params.pixelRatio,~~(Z/2)):Math.max(u.params.pixelRatio,u.params.barGap*u.params.pixelRatio),oe=Z+we,ve=fe/u.width,Ho=T,Fo=$,Xe=Ho;for(Xe;Xe<Fo;Xe+=oe){var cr=0,fr=Math.floor(Xe*ve)*re,Wo=Math.floor((Xe+oe)*ve)*re;do{var Gn=Math.abs(z[fr]);Gn>cr&&(cr=Gn),fr+=re}while(fr<Wo);var Tt=Math.round(cr/H*G);Tt==0&&u.params.barMinHeight&&(Tt=u.params.barMinHeight),u.fillRect(Xe+u.halfPixel,G-Tt+F,Z+u.halfPixel,Tt*2,u.barRadius,U)}}})}},{key:"drawWave",value:function(f,c,T,$){var u=this;return this.prepareDraw(f,c,T,$,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(!V){var re=[],fe=z.length,Z=0;for(Z;Z<fe;Z++)re[2*Z]=z[Z],re[2*Z+1]=-z[Z];z=re}T!==void 0&&u.drawLine(z,H,G,F,T,$,U),u.fillRect(0,G+F-u.halfPixel,u.width,u.halfPixel,u.barRadius,U)})}},{key:"drawLine",value:function(f,c,T,$,u,_,H){var V=this,F=this.params.splitChannelsOptions.channelColors[H]||{},G=F.waveColor,z=F.progressColor;this.canvases.forEach(function(U,re){V.setFillStyles(U,G,z),V.applyCanvasTransforms(U,V.params.vertical),U.drawLines(f,c,T,$,u,_)})}},{key:"fillRect",value:function(f,c,T,$,u,_){var H=Math.floor(f/this.maxCanvasWidth),V=Math.min(Math.ceil((f+T)/this.maxCanvasWidth)+1,this.canvases.length),F=H;for(F;F<V;F++){var G=this.canvases[F],z=F*this.maxCanvasWidth,U={x1:Math.max(f,F*this.maxCanvasWidth),y1:c,x2:Math.min(f+T,F*this.maxCanvasWidth+G.wave.width),y2:c+$};if(U.x1<U.x2){var re=this.params.splitChannelsOptions.channelColors[_]||{},fe=re.waveColor,Z=re.progressColor;this.setFillStyles(G,fe,Z),this.applyCanvasTransforms(G,this.params.vertical),G.fillRects(U.x1-z,U.y1,U.x2-U.x1,U.y2-U.y1,u)}}}},{key:"hideChannel",value:function(f){return this.params.splitChannels&&this.params.splitChannelsOptions.filterChannels.includes(f)}},{key:"prepareDraw",value:function(f,c,T,$,u,_,H){var V=this;return w.frame(function(){if(f[0]instanceof Array){var F=f;if(V.params.splitChannels){var G=F.filter(function(oe,ve){return!V.hideChannel(ve)});V.params.splitChannelsOptions.overlay||V.setHeight(Math.max(G.length,1)*V.params.height*V.params.pixelRatio);var z;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.relativeNormalization&&(z=w.max(F.map(function(oe){return w.absMax(oe)}))),F.forEach(function(oe,ve){return V.prepareDraw(oe,ve,T,$,u,G.indexOf(oe),z)})}f=F[0]}if(!V.hideChannel(c)){var U=1/V.params.barHeight;V.params.normalize&&(U=H===void 0?w.absMax(f):H);var re=[].some.call(f,function(oe){return oe<0}),fe=V.params.height*V.params.pixelRatio,Z=fe/2,we=fe*_||0;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.overlay&&(we=0),u({absmax:U,hasMinVals:re,height:fe,offsetY:we,halfH:Z,peaks:f,channelIndex:c})}})()}},{key:"setFillStyles",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.params.waveColor,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.params.progressColor;f.setFillStyles(c,T)}},{key:"applyCanvasTransforms",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;f.applyCanvasTransforms(c)}},{key:"getImage",value:function(f,c,T){if(T==="blob")return Promise.all(this.canvases.map(function(u){return u.getImage(f,c,T)}));if(T==="dataURL"){var $=this.canvases.map(function(u){return u.getImage(f,c,T)});return $.length>1?$:$[0]}}},{key:"updateProgress",value:function(f){this.style(this.progressWave,{width:f+"px"})}}]),d}(p.default);o.default=B,s.exports=o.default},"./src/mediaelement-webaudio.js":(s,o,l)=>{function h(R){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(R)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=w(l("./src/mediaelement.js"));function w(R){return R&&R.__esModule?R:{default:R}}function b(R,B){if(!(R instanceof B))throw new TypeError("Cannot call a class as a function")}function v(R,B){for(var E=0;E<B.length;E++){var m=B[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(R,m.key,m)}}function x(R,B,E){return B&&v(R.prototype,B),E&&v(R,E),Object.defineProperty(R,"prototype",{writable:!1}),R}function A(){return typeof Reflect!="undefined"&&Reflect.get?A=Reflect.get:A=function(B,E,m){var d=k(B,E);if(!!d){var y=Object.getOwnPropertyDescriptor(d,E);return y.get?y.get.call(arguments.length<3?B:m):y.value}},A.apply(this,arguments)}function k(R,B){for(;!Object.prototype.hasOwnProperty.call(R,B)&&(R=N(R),R!==null););return R}function C(R,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(B&&B.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),B&&S(R,B)}function S(R,B){return S=Object.setPrototypeOf||function(m,d){return m.__proto__=d,m},S(R,B)}function O(R){var B=M();return function(){var m=N(R),d;if(B){var y=N(this).constructor;d=Reflect.construct(m,arguments,y)}else d=m.apply(this,arguments);return g(this,d)}}function g(R,B){if(B&&(h(B)==="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(R)}function D(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function M(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(R){return N=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},N(R)}var I=function(R){C(E,R);var B=O(E);function E(m){var d;return b(this,E),d=B.call(this,m),d.params=m,d.sourceMediaElement=null,d}return x(E,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer(),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode()}},{key:"_load",value:function(d,y,f){A(N(E.prototype),"_load",this).call(this,d,y,f),this.createMediaElementSource(d)}},{key:"createMediaElementSource",value:function(d){this.sourceMediaElement=this.ac.createMediaElementSource(d),this.sourceMediaElement.connect(this.analyser)}},{key:"play",value:function(d,y){return this.resumeAudioContext(),A(N(E.prototype),"play",this).call(this,d,y)}},{key:"destroy",value:function(){A(N(E.prototype),"destroy",this).call(this),this.destroyWebAudio()}}]),E}(p.default);o.default=I,s.exports=o.default},"./src/mediaelement.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=x(l("./src/webaudio.js")),w=v(l("./src/util/index.js"));function b(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return(b=function(c){return c?y:d})(m)}function v(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=b(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var $=c?Object.getOwnPropertyDescriptor(m,T):null;$&&($.get||$.set)?Object.defineProperty(f,T,$):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function x(m){return m&&m.__esModule?m:{default:m}}function A(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function k(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function C(m,d,y){return d&&k(m.prototype,d),y&&k(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function S(){return typeof Reflect!="undefined"&&Reflect.get?S=Reflect.get:S=function(d,y,f){var c=O(d,y);if(!!c){var T=Object.getOwnPropertyDescriptor(c,y);return T.get?T.get.call(arguments.length<3?d:f):T.value}},S.apply(this,arguments)}function O(m,d){for(;!Object.prototype.hasOwnProperty.call(m,d)&&(m=B(m),m!==null););return m}function g(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&D(m,d)}function D(m,d){return D=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},D(m,d)}function M(m){var d=R();return function(){var f=B(m),c;if(d){var T=B(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return N(this,c)}}function N(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I(m)}function I(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function R(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(m){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},B(m)}var E=function(m){g(y,m);var d=M(y);function y(f){var c;return A(this,y),c=d.call(this,f),c.params=f,c.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){},volume:0},c.mediaType=f.mediaType.toLowerCase(),c.elementPosition=f.elementPosition,c.peaks=null,c.playbackRate=1,c.volume=1,c.isMuted=!1,c.buffer=null,c.onPlayEnd=null,c.mediaListeners={},c}return C(y,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer()}},{key:"_setupMediaListeners",value:function(){var c=this;this.mediaListeners.error=function(){c.fireEvent("error","Error loading media element")},this.mediaListeners.canplay=function(){c.fireEvent("canplay")},this.mediaListeners.ended=function(){c.fireEvent("finish")},this.mediaListeners.play=function(){c.fireEvent("play")},this.mediaListeners.pause=function(){c.fireEvent("pause")},this.mediaListeners.seeked=function(T){c.fireEvent("seek")},this.mediaListeners.volumechange=function(T){c.isMuted=c.media.muted,c.isMuted?c.volume=0:c.volume=c.media.volume,c.fireEvent("volume")},Object.keys(this.mediaListeners).forEach(function(T){c.media.removeEventListener(T,c.mediaListeners[T]),c.media.addEventListener(T,c.mediaListeners[T])})}},{key:"createTimer",value:function(){var c=this,T=function $(){c.isPaused()||(c.fireEvent("audioprocess",c.getCurrentTime()),w.frame($)())};this.on("play",T),this.on("pause",function(){c.fireEvent("audioprocess",c.getCurrentTime())})}},{key:"load",value:function(c,T,$,u){var _=document.createElement(this.mediaType);_.controls=this.params.mediaControls,_.autoplay=this.params.autoplay||!1,_.preload=u==null?"auto":u,_.src=c,_.style.width="100%";var H=T.querySelector(this.mediaType);H&&T.removeChild(H),T.appendChild(_),this._load(_,$,u)}},{key:"loadElt",value:function(c,T){c.controls=this.params.mediaControls,c.autoplay=this.params.autoplay||!1,this._load(c,T,c.preload)}},{key:"_load",value:function(c,T,$){if(!(c instanceof HTMLMediaElement)||typeof c.addEventListener=="undefined")throw new Error("media parameter is not a valid media element");typeof c.load=="function"&&!(T&&$=="none")&&c.load(),this.media=c,this._setupMediaListeners(),this.peaks=T,this.onPlayEnd=null,this.buffer=null,this.isMuted=c.muted,this.setPlaybackRate(this.playbackRate),this.setVolume(this.volume)}},{key:"isPaused",value:function(){return!this.media||this.media.paused}},{key:"getDuration",value:function(){if(this.explicitDuration)return this.explicitDuration;var c=(this.buffer||this.media).duration;return c>=1/0&&(c=this.media.seekable.end(0)),c}},{key:"getCurrentTime",value:function(){return this.media&&this.media.currentTime}},{key:"getPlayedPercents",value:function(){return this.getCurrentTime()/this.getDuration()||0}},{key:"getPlaybackRate",value:function(){return this.playbackRate||this.media.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.media.playbackRate=this.playbackRate}},{key:"seekTo",value:function(c){c!=null&&!isNaN(c)&&(this.media.currentTime=c),this.clearPlayEnd()}},{key:"play",value:function(c,T){this.seekTo(c);var $=this.media.play();return T&&this.setPlayEnd(T),$}},{key:"pause",value:function(){var c;return this.media&&(c=this.media.pause()),this.clearPlayEnd(),c}},{key:"setPlayEnd",value:function(c){var T=this;this.clearPlayEnd(),this._onPlayEnd=function($){$>=c&&(T.pause(),T.seekTo(c))},this.on("audioprocess",this._onPlayEnd)}},{key:"clearPlayEnd",value:function(){this._onPlayEnd&&(this.un("audioprocess",this._onPlayEnd),this._onPlayEnd=null)}},{key:"getPeaks",value:function(c,T,$){return this.buffer?S(B(y.prototype),"getPeaks",this).call(this,c,T,$):this.peaks||[]}},{key:"setSinkId",value:function(c){return c?this.media.setSinkId?this.media.setSinkId(c):Promise.reject(new Error("setSinkId is not supported in your browser")):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"getVolume",value:function(){return this.volume}},{key:"setVolume",value:function(c){this.volume=c,this.media.volume!==this.volume&&(this.media.volume=this.volume)}},{key:"setMute",value:function(c){this.isMuted=this.media.muted=c}},{key:"destroy",value:function(){var c=this;this.pause(),this.unAll(),this.destroyed=!0,Object.keys(this.mediaListeners).forEach(function(T){c.media&&c.media.removeEventListener(T,c.mediaListeners[T])}),this.params.removeMediaElementOnDestroy&&this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}]),y}(p.default);o.default=E,s.exports=o.default},"./src/peakcache.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var x=0;x<v.length;x++){var A=v[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,x){return v&&h(b.prototype,v),x&&h(b,x),Object.defineProperty(b,"prototype",{writable:!1}),b}var w=function(){function b(){l(this,b),this.clearPeakCache()}return p(b,[{key:"clearPeakCache",value:function(){this.peakCacheRanges=[],this.peakCacheLength=-1}},{key:"addRangeToPeakCache",value:function(x,A,k){x!=this.peakCacheLength&&(this.clearPeakCache(),this.peakCacheLength=x);for(var C=[],S=0;S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<A;)S++;for(S%2==0&&C.push(A);S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<=k;)C.push(this.peakCacheRanges[S]),S++;S%2==0&&C.push(k),C=C.filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]}),this.peakCacheRanges=this.peakCacheRanges.concat(C),this.peakCacheRanges=this.peakCacheRanges.sort(function(g,D){return g-D}).filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]});var O=[];for(S=0;S<C.length;S+=2)O.push([C[S],C[S+1]]);return O}},{key:"getCacheRanges",value:function(){var x=[],A;for(A=0;A<this.peakCacheRanges.length;A+=2)x.push([this.peakCacheRanges[A],this.peakCacheRanges[A+1]]);return x}}]),b}();o.default=w,s.exports=o.default},"./src/util/absMax.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=b;var h=w(l("./src/util/max.js")),p=w(l("./src/util/min.js"));function w(v){return v&&v.__esModule?v:{default:v}}function b(v){var x=(0,h.default)(v),A=(0,p.default)(v);return-A>x?-A:x}s.exports=o.default},"./src/util/clamp.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p,w){return Math.min(Math.max(p,h),w)}s.exports=o.default},"./src/util/fetch.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=A;var h=p(l("./src/util/observer.js"));function p(k){return k&&k.__esModule?k:{default:k}}function w(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function b(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function v(k,C,S){return C&&b(k.prototype,C),S&&b(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var x=function(){function k(C,S,O){w(this,k),this.instance=C,this.instance._reader=O.body.getReader(),this.total=parseInt(S,10),this.loaded=0}return v(k,[{key:"start",value:function(S){var O=this,g=function D(){O.instance._reader.read().then(function(M){var N=M.done,I=M.value;if(N){O.total===0&&O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:!1}),S.close();return}O.loaded+=I.byteLength,O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:O.total!==0}),S.enqueue(I),D()}).catch(function(M){S.error(M)})};g()}}]),k}();function A(k){if(k){if(!k.url)throw new Error("fetch url missing")}else throw new Error("fetch options missing");var C=new h.default,S=new Headers,O=new Request(k.url);C.controller=new AbortController,k&&k.requestHeaders&&k.requestHeaders.forEach(function(M){S.append(M.key,M.value)});var g=k.responseType||"json",D={method:k.method||"GET",headers:S,mode:k.mode||"cors",credentials:k.credentials||"same-origin",cache:k.cache||"default",redirect:k.redirect||"follow",referrer:k.referrer||"client",signal:C.controller.signal};return fetch(O,D).then(function(M){C.response=M;var N=!0;M.body||(N=!1);var I=M.headers.get("content-length");return I===null&&(N=!1),N?(C.onProgress=function(R){C.fireEvent("progress",R)},new Response(new ReadableStream(new x(C,I,M)),D)):M}).then(function(M){var N;if(M.ok)switch(g){case"arraybuffer":return M.arrayBuffer();case"json":return M.json();case"blob":return M.blob();case"text":return M.text();default:N="Unknown responseType: "+g;break}throw N||(N="HTTP error status: "+M.status),new Error(N)}).then(function(M){C.fireEvent("success",M)}).catch(function(M){C.fireEvent("error",M)}),C.fetchRequest=O,C}s.exports=o.default},"./src/util/frame.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=w;var h=p(l("./src/util/request-animation-frame.js"));function p(b){return b&&b.__esModule?b:{default:b}}function w(b){return function(){for(var v=arguments.length,x=new Array(v),A=0;A<v;A++)x[A]=arguments[A];return(0,h.default)(function(){return b.apply(void 0,x)})}}s.exports=o.default},"./src/util/get-id.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){return h===void 0&&(h="wavesurfer_"),h+Math.random().toString(32).substring(2)}s.exports=o.default},"./src/util/index.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"Observer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(o,"absMax",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(o,"clamp",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"debounce",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(o,"fetchFile",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(o,"frame",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(o,"getId",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(o,"ignoreSilenceMode",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(o,"max",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(o,"min",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(o,"preventClick",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(o,"requestAnimationFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(o,"style",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(o,"withOrientation",{enumerable:!0,get:function(){return D.default}});var h=N(l("./src/util/get-id.js")),p=N(l("./src/util/max.js")),w=N(l("./src/util/min.js")),b=N(l("./src/util/absMax.js")),v=N(l("./src/util/observer.js")),x=N(l("./src/util/style.js")),A=N(l("./src/util/request-animation-frame.js")),k=N(l("./src/util/frame.js")),C=N(l("./node_modules/debounce/index.js")),S=N(l("./src/util/prevent-click.js")),O=N(l("./src/util/fetch.js")),g=N(l("./src/util/clamp.js")),D=N(l("./src/util/orientation.js")),M=N(l("./src/util/silence-mode.js"));function N(I){return I&&I.__esModule?I:{default:I}}},"./src/util/max.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=-1/0;return Object.keys(h).forEach(function(w){h[w]>p&&(p=h[w])}),p}s.exports=o.default},"./src/util/min.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=Number(1/0);return Object.keys(h).forEach(function(w){h[w]<p&&(p=h[w])}),p}s.exports=o.default},"./src/util/observer.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var x=0;x<v.length;x++){var A=v[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,x){return v&&h(b.prototype,v),x&&h(b,x),Object.defineProperty(b,"prototype",{writable:!1}),b}var w=function(){function b(){l(this,b),this._disabledEventEmissions=[],this.handlers=null}return p(b,[{key:"on",value:function(x,A){var k=this;this.handlers||(this.handlers={});var C=this.handlers[x];return C||(C=this.handlers[x]=[]),C.push(A),{name:x,callback:A,un:function(O,g){return k.un(O,g)}}}},{key:"un",value:function(x,A){if(!!this.handlers){var k=this.handlers[x],C;if(k)if(A)for(C=k.length-1;C>=0;C--)k[C]==A&&k.splice(C,1);else k.length=0}}},{key:"unAll",value:function(){this.handlers=null}},{key:"once",value:function(x,A){var k=this,C=function S(){for(var O=arguments.length,g=new Array(O),D=0;D<O;D++)g[D]=arguments[D];A.apply(k,g),setTimeout(function(){k.un(x,S)},0)};return this.on(x,C)}},{key:"setDisabledEventEmissions",value:function(x){this._disabledEventEmissions=x}},{key:"_isDisabledEventEmission",value:function(x){return this._disabledEventEmissions&&this._disabledEventEmissions.includes(x)}},{key:"fireEvent",value:function(x){for(var A=arguments.length,k=new Array(A>1?A-1:0),C=1;C<A;C++)k[C-1]=arguments[C];if(!(!this.handlers||this._isDisabledEventEmission(x))){var S=this.handlers[x];S&&S.forEach(function(O){O.apply(void 0,k)})}}}]),b}();o.default=w,s.exports=o.default},"./src/util/orientation.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=w;var l={width:"height",height:"width",overflowX:"overflowY",overflowY:"overflowX",clientWidth:"clientHeight",clientHeight:"clientWidth",clientX:"clientY",clientY:"clientX",scrollWidth:"scrollHeight",scrollLeft:"scrollTop",offsetLeft:"offsetTop",offsetTop:"offsetLeft",offsetHeight:"offsetWidth",offsetWidth:"offsetHeight",left:"top",right:"bottom",top:"left",bottom:"right",borderRightStyle:"borderBottomStyle",borderRightWidth:"borderBottomWidth",borderRightColor:"borderBottomColor"};function h(b,v){return Object.prototype.hasOwnProperty.call(l,b)&&v?l[b]:b}var p=Symbol("isProxy");function w(b,v){return b[p]?b:new Proxy(b,{get:function(A,k,C){if(k===p)return!0;if(k==="domElement")return A;if(k==="style")return w(A.style,v);if(k==="canvas")return w(A.canvas,v);if(k==="getBoundingClientRect")return function(){return w(A.getBoundingClientRect.apply(A,arguments),v)};if(k==="getContext")return function(){return w(A.getContext.apply(A,arguments),v)};var S=A[h(k,v)];return typeof S=="function"?S.bind(A):S},set:function(A,k,C){return A[h(k,v)]=C,!0}})}s.exports=o.default},"./src/util/prevent-click.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=h;function l(p){p.stopPropagation(),document.body.removeEventListener("click",l,!0)}function h(p){document.body.addEventListener("click",l,!0)}s.exports=o.default},"./src/util/request-animation-frame.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(h,p){return setTimeout(h,1e3/60)}).bind(window);o.default=l,s.exports=o.default},"./src/util/silence-mode.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(){var h="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",p=document.createElement("div");p.innerHTML='<audio x-webkit-airplay="deny"></audio>';var w=p.children.item(0);w.src=h,w.preload="auto",w.type="audio/mpeg",w.disableRemotePlayback=!0,w.play(),w.remove(),p.remove()}s.exports=o.default},"./src/util/style.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p){return Object.keys(p).forEach(function(w){h.style[w]!==p[w]&&(h.style[w]=p[w])}),h}s.exports=o.default},"./src/wavesurfer.js":(s,o,l)=>{function h(f){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},h(f)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=S(l("./src/util/index.js")),w=k(l("./src/drawer.multicanvas.js")),b=k(l("./src/webaudio.js")),v=k(l("./src/mediaelement.js")),x=k(l("./src/peakcache.js")),A=k(l("./src/mediaelement-webaudio.js"));function k(f){return f&&f.__esModule?f:{default:f}}function C(f){if(typeof WeakMap!="function")return null;var c=new WeakMap,T=new WeakMap;return(C=function(u){return u?T:c})(f)}function S(f,c){if(!c&&f&&f.__esModule)return f;if(f===null||h(f)!=="object"&&typeof f!="function")return{default:f};var T=C(c);if(T&&T.has(f))return T.get(f);var $={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in f)if(_!=="default"&&Object.prototype.hasOwnProperty.call(f,_)){var H=u?Object.getOwnPropertyDescriptor(f,_):null;H&&(H.get||H.set)?Object.defineProperty($,_,H):$[_]=f[_]}return $.default=f,T&&T.set(f,$),$}function O(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),c&&g(f,c)}function g(f,c){return g=Object.setPrototypeOf||function($,u){return $.__proto__=u,$},g(f,c)}function D(f){var c=I();return function(){var $=R(f),u;if(c){var _=R(this).constructor;u=Reflect.construct($,arguments,_)}else u=$.apply(this,arguments);return M(this,u)}}function M(f,c){if(c&&(h(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}function N(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(f){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},R(f)}function B(f,c,T){return c in f?Object.defineProperty(f,c,{value:T,enumerable:!0,configurable:!0,writable:!0}):f[c]=T,f}function E(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function m(f,c){for(var T=0;T<c.length;T++){var $=c[T];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(f,$.key,$)}}function d(f,c,T){return c&&m(f.prototype,c),T&&m(f,T),Object.defineProperty(f,"prototype",{writable:!1}),f}var y=function(f){O(T,f);var c=D(T);function T($){var u;if(E(this,T),u=c.call(this),B(N(u),"defaultParams",{audioContext:null,audioScriptProcessor:null,audioRate:1,autoCenter:!0,autoCenterRate:5,autoCenterImmediately:!1,backend:"WebAudio",backgroundColor:null,barHeight:1,barRadius:0,barGap:null,barMinHeight:null,container:null,cursorColor:"#333",cursorWidth:1,dragSelection:!0,drawingContextAttributes:{desynchronized:!1},duration:null,fillParent:!0,forceDecode:!1,height:128,hideScrollbar:!1,hideCursor:!1,ignoreSilenceMode:!1,interact:!0,loopSelection:!0,maxCanvasWidth:4e3,mediaContainer:null,mediaControls:!1,mediaType:"audio",minPxPerSec:20,normalize:!1,partialRender:!1,pixelRatio:window.devicePixelRatio||screen.deviceXDPI/screen.logicalXDPI,plugins:[],progressColor:"#555",removeMediaElementOnDestroy:!0,renderer:w.default,responsive:!1,rtl:!1,scrollParent:!1,skipLength:2,splitChannels:!1,splitChannelsOptions:{overlay:!1,channelColors:{},filterChannels:[],relativeNormalization:!1},vertical:!1,waveColor:"#999",xhr:{}}),B(N(u),"backends",{MediaElement:v.default,WebAudio:b.default,MediaElementWebAudio:A.default}),B(N(u),"util",p),u.params=Object.assign({},u.defaultParams,$),u.params.splitChannelsOptions=Object.assign({},u.defaultParams.splitChannelsOptions,$.splitChannelsOptions),u.container=typeof $.container=="string"?document.querySelector(u.params.container):u.params.container,!u.container)throw new Error("Container element not found");if(u.params.mediaContainer==null?u.mediaContainer=u.container:typeof u.params.mediaContainer=="string"?u.mediaContainer=document.querySelector(u.params.mediaContainer):u.mediaContainer=u.params.mediaContainer,!u.mediaContainer)throw new Error("Media Container element not found");if(u.params.maxCanvasWidth<=1)throw new Error("maxCanvasWidth must be greater than 1");if(u.params.maxCanvasWidth%2==1)throw new Error("maxCanvasWidth must be an even number");if(u.params.rtl===!0&&(u.params.vertical===!0?p.style(u.container,{transform:"rotateX(180deg)"}):p.style(u.container,{transform:"rotateY(180deg)"})),u.params.backgroundColor&&u.setBackgroundColor(u.params.backgroundColor),u.savedVolume=0,u.isMuted=!1,u.tmpEvents=[],u.currentRequest=null,u.arraybuffer=null,u.drawer=null,u.backend=null,u.peakCache=null,typeof u.params.renderer!="function")throw new Error("Renderer parameter is invalid");u.Drawer=u.params.renderer,u.params.backend=="AudioElement"&&(u.params.backend="MediaElement"),(u.params.backend=="WebAudio"||u.params.backend==="MediaElementWebAudio")&&!b.default.prototype.supportsWebAudio.call(null)&&(u.params.backend="MediaElement"),u.Backend=u.backends[u.params.backend],u.initialisedPluginList={},u.isDestroyed=!1,u.isReady=!1;var _=0;return u._onResize=p.debounce(function(){u.drawer.wrapper&&_!=u.drawer.wrapper.clientWidth&&!u.params.scrollParent&&(_=u.drawer.wrapper.clientWidth,_&&u.drawer.fireEvent("redraw"))},typeof u.params.responsive=="number"?u.params.responsive:100),M(u,N(u))}return d(T,[{key:"init",value:function(){return this.registerPlugins(this.params.plugins),this.createDrawer(),this.createBackend(),this.createPeakCache(),this}},{key:"registerPlugins",value:function(u){var _=this;return u.forEach(function(H){return _.addPlugin(H)}),u.forEach(function(H){H.deferInit||_.initPlugin(H.name)}),this.fireEvent("plugins-registered",u),this}},{key:"getActivePlugins",value:function(){return this.initialisedPluginList}},{key:"addPlugin",value:function(u){var _=this;if(!u.name)throw new Error("Plugin does not have a name!");if(!u.instance)throw new Error("Plugin ".concat(u.name," does not have an instance property!"));u.staticProps&&Object.keys(u.staticProps).forEach(function(F){_[F]=u.staticProps[F]});var H=u.instance,V=Object.getOwnPropertyNames(p.Observer.prototype);return V.forEach(function(F){H.prototype[F]=p.Observer.prototype[F]}),this[u.name]=new H(u.params||{},this),this.fireEvent("plugin-added",u.name),this}},{key:"initPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet!"));return this.initialisedPluginList[u]&&this.destroyPlugin(u),this[u].init(),this.initialisedPluginList[u]=!0,this.fireEvent("plugin-initialised",u),this}},{key:"destroyPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet and cannot be destroyed!"));if(!this.initialisedPluginList[u])throw new Error("Plugin ".concat(u," is not active and cannot be destroyed!"));if(typeof this[u].destroy!="function")throw new Error("Plugin ".concat(u," does not have a destroy function!"));return this[u].destroy(),delete this.initialisedPluginList[u],this.fireEvent("plugin-destroyed",u),this}},{key:"destroyAllPlugins",value:function(){var u=this;Object.keys(this.initialisedPluginList).forEach(function(_){return u.destroyPlugin(_)})}},{key:"createDrawer",value:function(){var u=this;this.drawer=new this.Drawer(this.container,this.params),this.drawer.init(),this.fireEvent("drawer-created",this.drawer),this.params.responsive!==!1&&(window.addEventListener("resize",this._onResize,!0),window.addEventListener("orientationchange",this._onResize,!0)),this.drawer.on("redraw",function(){u.drawBuffer(),u.drawer.progress(u.backend.getPlayedPercents())}),this.drawer.on("click",function(_,H){setTimeout(function(){return u.seekTo(H)},0)}),this.drawer.on("scroll",function(_){u.params.partialRender&&u.drawBuffer(),u.fireEvent("scroll",_)})}},{key:"createBackend",value:function(){var u=this;this.backend&&this.backend.destroy(),this.backend=new this.Backend(this.params),this.backend.init(),this.fireEvent("backend-created",this.backend),this.backend.on("finish",function(){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("finish")}),this.backend.on("play",function(){return u.fireEvent("play")}),this.backend.on("pause",function(){return u.fireEvent("pause")}),this.backend.on("audioprocess",function(_){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("audioprocess",_)}),(this.params.backend==="MediaElement"||this.params.backend==="MediaElementWebAudio")&&(this.backend.on("seek",function(){u.drawer.progress(u.backend.getPlayedPercents())}),this.backend.on("volume",function(){var _=u.getVolume();u.fireEvent("volume",_),u.backend.isMuted!==u.isMuted&&(u.isMuted=u.backend.isMuted,u.fireEvent("mute",u.isMuted))}))}},{key:"createPeakCache",value:function(){this.params.partialRender&&(this.peakCache=new x.default)}},{key:"getDuration",value:function(){return this.backend.getDuration()}},{key:"getCurrentTime",value:function(){return this.backend.getCurrentTime()}},{key:"setCurrentTime",value:function(u){u>=this.getDuration()?this.seekTo(1):this.seekTo(u/this.getDuration())}},{key:"play",value:function(u,_){var H=this;return this.params.ignoreSilenceMode&&p.ignoreSilenceMode(),this.fireEvent("interaction",function(){return H.play(u,_)}),this.backend.play(u,_)}},{key:"setPlayEnd",value:function(u){this.backend.setPlayEnd(u)}},{key:"pause",value:function(){if(!this.backend.isPaused())return this.backend.pause()}},{key:"playPause",value:function(){return this.backend.isPaused()?this.play():this.pause()}},{key:"isPlaying",value:function(){return!this.backend.isPaused()}},{key:"skipBackward",value:function(u){this.skip(-u||-this.params.skipLength)}},{key:"skipForward",value:function(u){this.skip(u||this.params.skipLength)}},{key:"skip",value:function(u){var _=this.getDuration()||1,H=this.getCurrentTime()||0;H=Math.max(0,Math.min(_,H+(u||0))),this.seekAndCenter(H/_)}},{key:"seekAndCenter",value:function(u){this.seekTo(u),this.drawer.recenter(u)}},{key:"seekTo",value:function(u){var _=this;if(typeof u!="number"||!isFinite(u)||u<0||u>1)throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");this.fireEvent("interaction",function(){return _.seekTo(u)});var H=this.params.backend==="WebAudio",V=this.backend.isPaused();H&&!V&&this.backend.pause();var F=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(u*this.getDuration()),this.drawer.progress(u),H&&!V&&this.backend.play(),this.params.scrollParent=F,this.fireEvent("seek",u)}},{key:"stop",value:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)}},{key:"setSinkId",value:function(u){return this.backend.setSinkId(u)}},{key:"setVolume",value:function(u){this.backend.setVolume(u),this.fireEvent("volume",u)}},{key:"getVolume",value:function(){return this.backend.getVolume()}},{key:"setPlaybackRate",value:function(u){this.backend.setPlaybackRate(u)}},{key:"getPlaybackRate",value:function(){return this.backend.getPlaybackRate()}},{key:"toggleMute",value:function(){this.setMute(!this.isMuted)}},{key:"setMute",value:function(u){if(u===this.isMuted){this.fireEvent("mute",this.isMuted);return}this.backend.setMute?(this.backend.setMute(u),this.isMuted=u):u?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0,this.fireEvent("volume",0)):(this.backend.setVolume(this.savedVolume),this.isMuted=!1,this.fireEvent("volume",this.savedVolume)),this.fireEvent("mute",this.isMuted)}},{key:"getMute",value:function(){return this.isMuted}},{key:"getFilters",value:function(){return this.backend.filters||[]}},{key:"toggleScroll",value:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()}},{key:"toggleInteraction",value:function(){this.params.interact=!this.params.interact}},{key:"getWaveColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].waveColor:this.params.waveColor}},{key:"setWaveColor",value:function(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].waveColor=u:this.params.waveColor=u,this.drawBuffer()}},{key:"getProgressColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].progressColor:this.params.progressColor}},{key:"setProgressColor",value:function(u,_){this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].progressColor=u:this.params.progressColor=u,this.drawBuffer()}},{key:"getBackgroundColor",value:function(){return this.params.backgroundColor}},{key:"setBackgroundColor",value:function(u){this.params.backgroundColor=u,p.style(this.container,{background:this.params.backgroundColor})}},{key:"getCursorColor",value:function(){return this.params.cursorColor}},{key:"setCursorColor",value:function(u){this.params.cursorColor=u,this.drawer.updateCursor()}},{key:"getHeight",value:function(){return this.params.height}},{key:"setHeight",value:function(u){this.params.height=u,this.drawer.setHeight(u*this.params.pixelRatio),this.drawBuffer()}},{key:"setFilteredChannels",value:function(u){this.params.splitChannelsOptions.filterChannels=u,this.drawBuffer()}},{key:"drawBuffer",value:function(){var u=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),_=this.drawer.getWidth(),H=u,V=0,F=Math.max(V+_,H);this.params.fillParent&&(!this.params.scrollParent||u<_)&&(H=_,V=0,F=H);var G;if(this.params.partialRender){var z=this.peakCache.addRangeToPeakCache(H,V,F),U;for(U=0;U<z.length;U++)G=this.backend.getPeaks(H,z[U][0],z[U][1]),this.drawer.drawPeaks(G,H,z[U][0],z[U][1])}else G=this.backend.getPeaks(H,V,F),this.drawer.drawPeaks(G,H,V,F);this.fireEvent("redraw",G,H)}},{key:"zoom",value:function(u){u?(this.params.minPxPerSec=u,this.params.scrollParent=!0):(this.params.minPxPerSec=this.defaultParams.minPxPerSec,this.params.scrollParent=!1),this.drawBuffer(),this.drawer.progress(this.backend.getPlayedPercents()),this.drawer.recenter(this.getCurrentTime()/this.getDuration()),this.fireEvent("zoom",u)}},{key:"loadArrayBuffer",value:function(u){var _=this;this.decodeArrayBuffer(u,function(H){_.isDestroyed||_.loadDecodedBuffer(H)})}},{key:"loadDecodedBuffer",value:function(u){this.backend.load(u),this.drawBuffer(),this.isReady=!0,this.fireEvent("ready")}},{key:"loadBlob",value:function(u){var _=this,H=new FileReader;H.addEventListener("progress",function(V){return _.onProgress(V)}),H.addEventListener("load",function(V){return _.loadArrayBuffer(V.target.result)}),H.addEventListener("error",function(){return _.fireEvent("error","Error reading file")}),H.readAsArrayBuffer(u),this.empty()}},{key:"load",value:function(u,_,H,V){if(!u)throw new Error("url parameter cannot be empty");if(this.empty(),H){var F={"Preload is not 'auto', 'none' or 'metadata'":["auto","metadata","none"].indexOf(H)===-1,"Peaks are not provided":!_,"Backend is not of type 'MediaElement' or 'MediaElementWebAudio'":["MediaElement","MediaElementWebAudio"].indexOf(this.params.backend)===-1,"Url is not of type string":typeof u!="string"},G=Object.keys(F).filter(function(z){return F[z]});G.length&&(console.warn(`Preload parameter of wavesurfer.load will be ignored because:
|
|
53
|
+
*/(function(e,t){(function(n,a){e.exports=a()})(self,()=>(()=>{var r={"./src/drawer.canvasentry.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var h=$(l("./src/util/style.js")),p=$(l("./src/util/get-id.js"));function $(k){return k&&k.__esModule?k:{default:k}}function b(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function v(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function P(k,C,S){return C&&v(k.prototype,C),S&&v(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var A=function(){function k(){b(this,k),this.wave=null,this.waveCtx=null,this.progress=null,this.progressCtx=null,this.start=0,this.end=1,this.id=(0,p.default)(typeof this.constructor.name!="undefined"?this.constructor.name.toLowerCase()+"_":"canvasentry_"),this.canvasContextAttributes={}}return P(k,[{key:"initWave",value:function(S){this.wave=S,this.waveCtx=this.wave.getContext("2d",this.canvasContextAttributes)}},{key:"initProgress",value:function(S){this.progress=S,this.progressCtx=this.progress.getContext("2d",this.canvasContextAttributes)}},{key:"updateDimensions",value:function(S,O,g,D){this.start=this.wave.offsetLeft/O||0,this.end=this.start+S/O,this.wave.width=g,this.wave.height=D;var M={width:S+"px"};(0,h.default)(this.wave,M),this.hasProgressCanvas&&(this.progress.width=g,this.progress.height=D,(0,h.default)(this.progress,M))}},{key:"clearWave",value:function(){this.waveCtx.clearRect(0,0,this.waveCtx.canvas.width,this.waveCtx.canvas.height),this.hasProgressCanvas&&this.progressCtx.clearRect(0,0,this.progressCtx.canvas.width,this.progressCtx.canvas.height)}},{key:"setFillStyles",value:function(S,O){this.waveCtx.fillStyle=this.getFillStyle(this.waveCtx,S),this.hasProgressCanvas&&(this.progressCtx.fillStyle=this.getFillStyle(this.progressCtx,O))}},{key:"getFillStyle",value:function(S,O){if(typeof O=="string"||O instanceof CanvasGradient)return O;var g=S.createLinearGradient(0,0,0,S.canvas.height);return O.forEach(function(D,M){return g.addColorStop(M/O.length,D)}),g}},{key:"applyCanvasTransforms",value:function(S){S&&(this.waveCtx.setTransform(0,1,1,0,0,0),this.hasProgressCanvas&&this.progressCtx.setTransform(0,1,1,0,0,0))}},{key:"fillRects",value:function(S,O,g,D,M){this.fillRectToContext(this.waveCtx,S,O,g,D,M),this.hasProgressCanvas&&this.fillRectToContext(this.progressCtx,S,O,g,D,M)}},{key:"fillRectToContext",value:function(S,O,g,D,M,N){!S||(N?this.drawRoundedRect(S,O,g,D,M,N):S.fillRect(O,g,D,M))}},{key:"drawRoundedRect",value:function(S,O,g,D,M,N){M!==0&&(M<0&&(M*=-1,g-=M),S.beginPath(),S.moveTo(O+N,g),S.lineTo(O+D-N,g),S.quadraticCurveTo(O+D,g,O+D,g+N),S.lineTo(O+D,g+M-N),S.quadraticCurveTo(O+D,g+M,O+D-N,g+M),S.lineTo(O+N,g+M),S.quadraticCurveTo(O,g+M,O,g+M-N),S.lineTo(O,g+N),S.quadraticCurveTo(O,g,O+N,g),S.closePath(),S.fill())}},{key:"drawLines",value:function(S,O,g,D,M,N){this.drawLineToContext(this.waveCtx,S,O,g,D,M,N),this.hasProgressCanvas&&this.drawLineToContext(this.progressCtx,S,O,g,D,M,N)}},{key:"drawLineToContext",value:function(S,O,g,D,M,N,I){if(!!S){var R=O.length/2,B=Math.round(R*this.start),E=Math.round(R*this.end)+1,m=B,d=E,y=this.wave.width/(d-m-1),f=D+M,c=g/D;S.beginPath(),S.moveTo((m-B)*y,f),S.lineTo((m-B)*y,f-Math.round((O[2*m]||0)/c));var T,w,u;for(T=m;T<d;T++)w=O[2*T]||0,u=Math.round(w/c),S.lineTo((T-B)*y+this.halfPixel,f-u);var _=d-1;for(_;_>=m;_--)w=O[2*_+1]||0,u=Math.round(w/c),S.lineTo((_-B)*y+this.halfPixel,f-u);S.lineTo((m-B)*y,f-Math.round((O[2*m+1]||0)/c)),S.closePath(),S.fill()}}},{key:"destroy",value:function(){this.waveCtx=null,this.wave=null,this.progressCtx=null,this.progress=null}},{key:"getImage",value:function(S,O,g){var D=this;if(g==="blob")return new Promise(function(M){D.wave.toBlob(M,S,O)});if(g==="dataURL")return this.wave.toDataURL(S,O)}}]),k}();o.default=A,s.exports=o.default},"./src/drawer.js":(s,o,l)=>{function h(I){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},h(I)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function $(I){if(typeof WeakMap!="function")return null;var R=new WeakMap,B=new WeakMap;return($=function(m){return m?B:R})(I)}function b(I,R){if(!R&&I&&I.__esModule)return I;if(I===null||h(I)!=="object"&&typeof I!="function")return{default:I};var B=$(R);if(B&&B.has(I))return B.get(I);var E={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in I)if(d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)){var y=m?Object.getOwnPropertyDescriptor(I,d):null;y&&(y.get||y.set)?Object.defineProperty(E,d,y):E[d]=I[d]}return E.default=I,B&&B.set(I,E),E}function v(I,R){if(!(I instanceof R))throw new TypeError("Cannot call a class as a function")}function P(I,R){for(var B=0;B<R.length;B++){var E=R[B];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}function A(I,R,B){return R&&P(I.prototype,R),B&&P(I,B),Object.defineProperty(I,"prototype",{writable:!1}),I}function k(I,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(R&&R.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),R&&C(I,R)}function C(I,R){return C=Object.setPrototypeOf||function(E,m){return E.__proto__=m,E},C(I,R)}function S(I){var R=D();return function(){var E=M(I),m;if(R){var d=M(this).constructor;m=Reflect.construct(E,arguments,d)}else m=E.apply(this,arguments);return O(this,m)}}function O(I,R){if(R&&(h(R)==="object"||typeof R=="function"))return R;if(R!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(I)}function g(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(I){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},M(I)}var N=function(I){k(B,I);var R=S(B);function B(E,m){var d;return v(this,B),d=R.call(this),d.container=p.withOrientation(E,m.vertical),d.params=m,d.width=0,d.height=m.height*d.params.pixelRatio,d.lastPos=0,d.wrapper=null,d}return A(B,[{key:"style",value:function(m,d){return p.style(m,d)}},{key:"createWrapper",value:function(){this.wrapper=p.withOrientation(this.container.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",cursor:this.params.hideCursor?"none":"auto",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()}},{key:"handleEvent",value:function(m,d){!d&&m.preventDefault();var y=p.withOrientation(m.targetTouches?m.targetTouches[0]:m,this.params.vertical).clientX,f=this.wrapper.getBoundingClientRect(),c=this.width,T=this.getWidth(),w=this.getProgressPixels(f,y),u;return!this.params.fillParent&&c<T?u=w*(this.params.pixelRatio/c)||0:u=(w+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0,p.clamp(u,0,1)}},{key:"getProgressPixels",value:function(m,d){return this.params.rtl?m.right-d:d-m.left}},{key:"setupWrapperEvents",value:function(){var m=this;this.wrapper.addEventListener("click",function(d){var y=p.withOrientation(d,m.params.vertical),f=m.wrapper.offsetHeight-m.wrapper.clientHeight;if(f!==0){var c=m.wrapper.getBoundingClientRect();if(y.clientY>=c.bottom-f)return}m.params.interact&&m.fireEvent("click",d,m.handleEvent(d))}),this.wrapper.addEventListener("dblclick",function(d){m.params.interact&&m.fireEvent("dblclick",d,m.handleEvent(d))}),this.wrapper.addEventListener("scroll",function(d){return m.fireEvent("scroll",d)})}},{key:"drawPeaks",value:function(m,d,y,f){this.setWidth(d)||this.clearWave(),this.params.barWidth?this.drawBars(m,0,y,f):this.drawWave(m,0,y,f)}},{key:"resetScroll",value:function(){this.wrapper!==null&&(this.wrapper.scrollLeft=0)}},{key:"recenter",value:function(m){var d=this.wrapper.scrollWidth*m;this.recenterOnPosition(d,!0)}},{key:"recenterOnPosition",value:function(m,d){var y=this.wrapper.scrollLeft,f=~~(this.wrapper.clientWidth/2),c=this.wrapper.scrollWidth-this.wrapper.clientWidth,T=m-f,w=T-y;if(c!=0){if(!d&&-f<=w&&w<f){var u=this.params.autoCenterRate;u/=f,u*=c,w=Math.max(-u,Math.min(u,w)),T=y+w}T=Math.max(0,Math.min(c,T)),T!=y&&(this.wrapper.scrollLeft=T)}}},{key:"getScrollX",value:function(){var m=0;if(this.wrapper){var d=this.params.pixelRatio;if(m=Math.round(this.wrapper.scrollLeft*d),this.params.scrollParent){var y=~~(this.wrapper.scrollWidth*d-this.getWidth());m=Math.min(y,Math.max(0,m))}}return m}},{key:"getWidth",value:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)}},{key:"setWidth",value:function(m){if(this.width==m)return!1;if(this.width=m,this.params.fillParent||this.params.scrollParent)this.style(this.wrapper,{width:""});else{var d=~~(this.width/this.params.pixelRatio)+"px";this.style(this.wrapper,{width:d})}return this.updateSize(),!0}},{key:"setHeight",value:function(m){return m==this.height?!1:(this.height=m,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+"px"}),this.updateSize(),!0)}},{key:"progress",value:function(m){var d=1/this.params.pixelRatio,y=Math.round(m*this.width)*d;if(y<this.lastPos||y-this.lastPos>=d){if(this.lastPos=y,this.params.scrollParent&&this.params.autoCenter){var f=~~(this.wrapper.scrollWidth*m);this.recenterOnPosition(f,this.params.autoCenterImmediately)}this.updateProgress(y)}}},{key:"destroy",value:function(){this.unAll(),this.wrapper&&(this.wrapper.parentNode==this.container.domElement&&this.container.removeChild(this.wrapper.domElement),this.wrapper=null)}},{key:"updateCursor",value:function(){}},{key:"updateSize",value:function(){}},{key:"drawBars",value:function(m,d,y,f){}},{key:"drawWave",value:function(m,d,y,f){}},{key:"clearWave",value:function(){}},{key:"updateProgress",value:function(m){}}]),B}(p.Observer);o.default=N,s.exports=o.default},"./src/drawer.multicanvas.js":(s,o,l)=>{function h(E){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},h(E)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=A(l("./src/drawer.js")),$=P(l("./src/util/index.js")),b=A(l("./src/drawer.canvasentry.js"));function v(E){if(typeof WeakMap!="function")return null;var m=new WeakMap,d=new WeakMap;return(v=function(f){return f?d:m})(E)}function P(E,m){if(!m&&E&&E.__esModule)return E;if(E===null||h(E)!=="object"&&typeof E!="function")return{default:E};var d=v(m);if(d&&d.has(E))return d.get(E);var y={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in E)if(c!=="default"&&Object.prototype.hasOwnProperty.call(E,c)){var T=f?Object.getOwnPropertyDescriptor(E,c):null;T&&(T.get||T.set)?Object.defineProperty(y,c,T):y[c]=E[c]}return y.default=E,d&&d.set(E,y),y}function A(E){return E&&E.__esModule?E:{default:E}}function k(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function C(E,m){for(var d=0;d<m.length;d++){var y=m[d];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,y.key,y)}}function S(E,m,d){return m&&C(E.prototype,m),d&&C(E,d),Object.defineProperty(E,"prototype",{writable:!1}),E}function O(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),m&&g(E,m)}function g(E,m){return g=Object.setPrototypeOf||function(y,f){return y.__proto__=f,y},g(E,m)}function D(E){var m=I();return function(){var y=R(E),f;if(m){var c=R(this).constructor;f=Reflect.construct(y,arguments,c)}else f=y.apply(this,arguments);return M(this,f)}}function M(E,m){if(m&&(h(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(E)}function N(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(E){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},R(E)}var B=function(E){O(d,E);var m=D(d);function d(y,f){var c;return k(this,d),c=m.call(this,y,f),c.maxCanvasWidth=f.maxCanvasWidth,c.maxCanvasElementWidth=Math.round(f.maxCanvasWidth/f.pixelRatio),c.hasProgressCanvas=f.waveColor!=f.progressColor,c.halfPixel=.5/f.pixelRatio,c.canvases=[],c.progressWave=null,c.EntryClass=b.default,c.canvasContextAttributes=f.drawingContextAttributes,c.overlap=2*Math.ceil(f.pixelRatio/2),c.barRadius=f.barRadius||0,c.vertical=f.vertical,c}return S(d,[{key:"init",value:function(){this.createWrapper(),this.createElements()}},{key:"createElements",value:function(){this.progressWave=$.withOrientation(this.wrapper.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.progressWave,{position:"absolute",zIndex:3,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",pointerEvents:"none"}),this.addCanvas(),this.updateCursor()}},{key:"updateCursor",value:function(){this.style(this.progressWave,{borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})}},{key:"updateSize",value:function(){for(var f=this,c=Math.round(this.width/this.params.pixelRatio),T=Math.ceil(c/(this.maxCanvasElementWidth+this.overlap));this.canvases.length<T;)this.addCanvas();for(;this.canvases.length>T;)this.removeCanvas();var w=this.maxCanvasWidth+this.overlap,u=this.canvases.length-1;this.canvases.forEach(function(_,H){H==u&&(w=f.width-f.maxCanvasWidth*u),f.updateDimensions(_,w,f.height),_.clearWave()})}},{key:"addCanvas",value:function(){var f=new this.EntryClass;f.canvasContextAttributes=this.canvasContextAttributes,f.hasProgressCanvas=this.hasProgressCanvas,f.halfPixel=this.halfPixel;var c=this.maxCanvasElementWidth*this.canvases.length,T=$.withOrientation(this.wrapper.appendChild(document.createElement("canvas")),this.params.vertical);if(this.style(T,{position:"absolute",zIndex:2,left:c+"px",top:0,bottom:0,height:"100%",pointerEvents:"none"}),f.initWave(T),this.hasProgressCanvas){var w=$.withOrientation(this.progressWave.appendChild(document.createElement("canvas")),this.params.vertical);this.style(w,{position:"absolute",left:c+"px",top:0,bottom:0,height:"100%"}),f.initProgress(w)}this.canvases.push(f)}},{key:"removeCanvas",value:function(){var f=this.canvases[this.canvases.length-1];f.wave.parentElement.removeChild(f.wave.domElement),this.hasProgressCanvas&&f.progress.parentElement.removeChild(f.progress.domElement),f&&(f.destroy(),f=null),this.canvases.pop()}},{key:"updateDimensions",value:function(f,c,T){var w=Math.round(c/this.params.pixelRatio),u=Math.round(this.width/this.params.pixelRatio);f.updateDimensions(w,u,c,T),this.style(this.progressWave,{display:"block"})}},{key:"clearWave",value:function(){var f=this;$.frame(function(){f.canvases.forEach(function(c){return c.clearWave()})})()}},{key:"drawBars",value:function(f,c,T,w){var u=this;return this.prepareDraw(f,c,T,w,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(T!==void 0){var re=V?2:1,fe=z.length/re,ee=u.params.barWidth*u.params.pixelRatio,we=u.params.barGap===null?Math.max(u.params.pixelRatio,~~(ee/2)):Math.max(u.params.pixelRatio,u.params.barGap*u.params.pixelRatio),oe=ee+we,ve=fe/u.width,Ho=T,Fo=w,Xe=Ho;for(Xe;Xe<Fo;Xe+=oe){var cr=0,fr=Math.floor(Xe*ve)*re,Wo=Math.floor((Xe+oe)*ve)*re;do{var Gn=Math.abs(z[fr]);Gn>cr&&(cr=Gn),fr+=re}while(fr<Wo);var Tt=Math.round(cr/H*G);Tt==0&&u.params.barMinHeight&&(Tt=u.params.barMinHeight),u.fillRect(Xe+u.halfPixel,G-Tt+F,ee+u.halfPixel,Tt*2,u.barRadius,U)}}})}},{key:"drawWave",value:function(f,c,T,w){var u=this;return this.prepareDraw(f,c,T,w,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(!V){var re=[],fe=z.length,ee=0;for(ee;ee<fe;ee++)re[2*ee]=z[ee],re[2*ee+1]=-z[ee];z=re}T!==void 0&&u.drawLine(z,H,G,F,T,w,U),u.fillRect(0,G+F-u.halfPixel,u.width,u.halfPixel,u.barRadius,U)})}},{key:"drawLine",value:function(f,c,T,w,u,_,H){var V=this,F=this.params.splitChannelsOptions.channelColors[H]||{},G=F.waveColor,z=F.progressColor;this.canvases.forEach(function(U,re){V.setFillStyles(U,G,z),V.applyCanvasTransforms(U,V.params.vertical),U.drawLines(f,c,T,w,u,_)})}},{key:"fillRect",value:function(f,c,T,w,u,_){var H=Math.floor(f/this.maxCanvasWidth),V=Math.min(Math.ceil((f+T)/this.maxCanvasWidth)+1,this.canvases.length),F=H;for(F;F<V;F++){var G=this.canvases[F],z=F*this.maxCanvasWidth,U={x1:Math.max(f,F*this.maxCanvasWidth),y1:c,x2:Math.min(f+T,F*this.maxCanvasWidth+G.wave.width),y2:c+w};if(U.x1<U.x2){var re=this.params.splitChannelsOptions.channelColors[_]||{},fe=re.waveColor,ee=re.progressColor;this.setFillStyles(G,fe,ee),this.applyCanvasTransforms(G,this.params.vertical),G.fillRects(U.x1-z,U.y1,U.x2-U.x1,U.y2-U.y1,u)}}}},{key:"hideChannel",value:function(f){return this.params.splitChannels&&this.params.splitChannelsOptions.filterChannels.includes(f)}},{key:"prepareDraw",value:function(f,c,T,w,u,_,H){var V=this;return $.frame(function(){if(f[0]instanceof Array){var F=f;if(V.params.splitChannels){var G=F.filter(function(oe,ve){return!V.hideChannel(ve)});V.params.splitChannelsOptions.overlay||V.setHeight(Math.max(G.length,1)*V.params.height*V.params.pixelRatio);var z;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.relativeNormalization&&(z=$.max(F.map(function(oe){return $.absMax(oe)}))),F.forEach(function(oe,ve){return V.prepareDraw(oe,ve,T,w,u,G.indexOf(oe),z)})}f=F[0]}if(!V.hideChannel(c)){var U=1/V.params.barHeight;V.params.normalize&&(U=H===void 0?$.absMax(f):H);var re=[].some.call(f,function(oe){return oe<0}),fe=V.params.height*V.params.pixelRatio,ee=fe/2,we=fe*_||0;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.overlay&&(we=0),u({absmax:U,hasMinVals:re,height:fe,offsetY:we,halfH:ee,peaks:f,channelIndex:c})}})()}},{key:"setFillStyles",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.params.waveColor,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.params.progressColor;f.setFillStyles(c,T)}},{key:"applyCanvasTransforms",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;f.applyCanvasTransforms(c)}},{key:"getImage",value:function(f,c,T){if(T==="blob")return Promise.all(this.canvases.map(function(u){return u.getImage(f,c,T)}));if(T==="dataURL"){var w=this.canvases.map(function(u){return u.getImage(f,c,T)});return w.length>1?w:w[0]}}},{key:"updateProgress",value:function(f){this.style(this.progressWave,{width:f+"px"})}}]),d}(p.default);o.default=B,s.exports=o.default},"./src/mediaelement-webaudio.js":(s,o,l)=>{function h(R){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(R)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=$(l("./src/mediaelement.js"));function $(R){return R&&R.__esModule?R:{default:R}}function b(R,B){if(!(R instanceof B))throw new TypeError("Cannot call a class as a function")}function v(R,B){for(var E=0;E<B.length;E++){var m=B[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(R,m.key,m)}}function P(R,B,E){return B&&v(R.prototype,B),E&&v(R,E),Object.defineProperty(R,"prototype",{writable:!1}),R}function A(){return typeof Reflect!="undefined"&&Reflect.get?A=Reflect.get:A=function(B,E,m){var d=k(B,E);if(!!d){var y=Object.getOwnPropertyDescriptor(d,E);return y.get?y.get.call(arguments.length<3?B:m):y.value}},A.apply(this,arguments)}function k(R,B){for(;!Object.prototype.hasOwnProperty.call(R,B)&&(R=N(R),R!==null););return R}function C(R,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(B&&B.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),B&&S(R,B)}function S(R,B){return S=Object.setPrototypeOf||function(m,d){return m.__proto__=d,m},S(R,B)}function O(R){var B=M();return function(){var m=N(R),d;if(B){var y=N(this).constructor;d=Reflect.construct(m,arguments,y)}else d=m.apply(this,arguments);return g(this,d)}}function g(R,B){if(B&&(h(B)==="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(R)}function D(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function M(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(R){return N=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},N(R)}var I=function(R){C(E,R);var B=O(E);function E(m){var d;return b(this,E),d=B.call(this,m),d.params=m,d.sourceMediaElement=null,d}return P(E,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer(),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode()}},{key:"_load",value:function(d,y,f){A(N(E.prototype),"_load",this).call(this,d,y,f),this.createMediaElementSource(d)}},{key:"createMediaElementSource",value:function(d){this.sourceMediaElement=this.ac.createMediaElementSource(d),this.sourceMediaElement.connect(this.analyser)}},{key:"play",value:function(d,y){return this.resumeAudioContext(),A(N(E.prototype),"play",this).call(this,d,y)}},{key:"destroy",value:function(){A(N(E.prototype),"destroy",this).call(this),this.destroyWebAudio()}}]),E}(p.default);o.default=I,s.exports=o.default},"./src/mediaelement.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=P(l("./src/webaudio.js")),$=v(l("./src/util/index.js"));function b(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return(b=function(c){return c?y:d})(m)}function v(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=b(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var w=c?Object.getOwnPropertyDescriptor(m,T):null;w&&(w.get||w.set)?Object.defineProperty(f,T,w):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function P(m){return m&&m.__esModule?m:{default:m}}function A(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function k(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function C(m,d,y){return d&&k(m.prototype,d),y&&k(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function S(){return typeof Reflect!="undefined"&&Reflect.get?S=Reflect.get:S=function(d,y,f){var c=O(d,y);if(!!c){var T=Object.getOwnPropertyDescriptor(c,y);return T.get?T.get.call(arguments.length<3?d:f):T.value}},S.apply(this,arguments)}function O(m,d){for(;!Object.prototype.hasOwnProperty.call(m,d)&&(m=B(m),m!==null););return m}function g(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&D(m,d)}function D(m,d){return D=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},D(m,d)}function M(m){var d=R();return function(){var f=B(m),c;if(d){var T=B(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return N(this,c)}}function N(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I(m)}function I(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function R(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(m){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},B(m)}var E=function(m){g(y,m);var d=M(y);function y(f){var c;return A(this,y),c=d.call(this,f),c.params=f,c.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){},volume:0},c.mediaType=f.mediaType.toLowerCase(),c.elementPosition=f.elementPosition,c.peaks=null,c.playbackRate=1,c.volume=1,c.isMuted=!1,c.buffer=null,c.onPlayEnd=null,c.mediaListeners={},c}return C(y,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer()}},{key:"_setupMediaListeners",value:function(){var c=this;this.mediaListeners.error=function(){c.fireEvent("error","Error loading media element")},this.mediaListeners.canplay=function(){c.fireEvent("canplay")},this.mediaListeners.ended=function(){c.fireEvent("finish")},this.mediaListeners.play=function(){c.fireEvent("play")},this.mediaListeners.pause=function(){c.fireEvent("pause")},this.mediaListeners.seeked=function(T){c.fireEvent("seek")},this.mediaListeners.volumechange=function(T){c.isMuted=c.media.muted,c.isMuted?c.volume=0:c.volume=c.media.volume,c.fireEvent("volume")},Object.keys(this.mediaListeners).forEach(function(T){c.media.removeEventListener(T,c.mediaListeners[T]),c.media.addEventListener(T,c.mediaListeners[T])})}},{key:"createTimer",value:function(){var c=this,T=function w(){c.isPaused()||(c.fireEvent("audioprocess",c.getCurrentTime()),$.frame(w)())};this.on("play",T),this.on("pause",function(){c.fireEvent("audioprocess",c.getCurrentTime())})}},{key:"load",value:function(c,T,w,u){var _=document.createElement(this.mediaType);_.controls=this.params.mediaControls,_.autoplay=this.params.autoplay||!1,_.preload=u==null?"auto":u,_.src=c,_.style.width="100%";var H=T.querySelector(this.mediaType);H&&T.removeChild(H),T.appendChild(_),this._load(_,w,u)}},{key:"loadElt",value:function(c,T){c.controls=this.params.mediaControls,c.autoplay=this.params.autoplay||!1,this._load(c,T,c.preload)}},{key:"_load",value:function(c,T,w){if(!(c instanceof HTMLMediaElement)||typeof c.addEventListener=="undefined")throw new Error("media parameter is not a valid media element");typeof c.load=="function"&&!(T&&w=="none")&&c.load(),this.media=c,this._setupMediaListeners(),this.peaks=T,this.onPlayEnd=null,this.buffer=null,this.isMuted=c.muted,this.setPlaybackRate(this.playbackRate),this.setVolume(this.volume)}},{key:"isPaused",value:function(){return!this.media||this.media.paused}},{key:"getDuration",value:function(){if(this.explicitDuration)return this.explicitDuration;var c=(this.buffer||this.media).duration;return c>=1/0&&(c=this.media.seekable.end(0)),c}},{key:"getCurrentTime",value:function(){return this.media&&this.media.currentTime}},{key:"getPlayedPercents",value:function(){return this.getCurrentTime()/this.getDuration()||0}},{key:"getPlaybackRate",value:function(){return this.playbackRate||this.media.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.media.playbackRate=this.playbackRate}},{key:"seekTo",value:function(c){c!=null&&!isNaN(c)&&(this.media.currentTime=c),this.clearPlayEnd()}},{key:"play",value:function(c,T){this.seekTo(c);var w=this.media.play();return T&&this.setPlayEnd(T),w}},{key:"pause",value:function(){var c;return this.media&&(c=this.media.pause()),this.clearPlayEnd(),c}},{key:"setPlayEnd",value:function(c){var T=this;this.clearPlayEnd(),this._onPlayEnd=function(w){w>=c&&(T.pause(),T.seekTo(c))},this.on("audioprocess",this._onPlayEnd)}},{key:"clearPlayEnd",value:function(){this._onPlayEnd&&(this.un("audioprocess",this._onPlayEnd),this._onPlayEnd=null)}},{key:"getPeaks",value:function(c,T,w){return this.buffer?S(B(y.prototype),"getPeaks",this).call(this,c,T,w):this.peaks||[]}},{key:"setSinkId",value:function(c){return c?this.media.setSinkId?this.media.setSinkId(c):Promise.reject(new Error("setSinkId is not supported in your browser")):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"getVolume",value:function(){return this.volume}},{key:"setVolume",value:function(c){this.volume=c,this.media.volume!==this.volume&&(this.media.volume=this.volume)}},{key:"setMute",value:function(c){this.isMuted=this.media.muted=c}},{key:"destroy",value:function(){var c=this;this.pause(),this.unAll(),this.destroyed=!0,Object.keys(this.mediaListeners).forEach(function(T){c.media&&c.media.removeEventListener(T,c.mediaListeners[T])}),this.params.removeMediaElementOnDestroy&&this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}]),y}(p.default);o.default=E,s.exports=o.default},"./src/peakcache.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var P=0;P<v.length;P++){var A=v[P];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,P){return v&&h(b.prototype,v),P&&h(b,P),Object.defineProperty(b,"prototype",{writable:!1}),b}var $=function(){function b(){l(this,b),this.clearPeakCache()}return p(b,[{key:"clearPeakCache",value:function(){this.peakCacheRanges=[],this.peakCacheLength=-1}},{key:"addRangeToPeakCache",value:function(P,A,k){P!=this.peakCacheLength&&(this.clearPeakCache(),this.peakCacheLength=P);for(var C=[],S=0;S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<A;)S++;for(S%2==0&&C.push(A);S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<=k;)C.push(this.peakCacheRanges[S]),S++;S%2==0&&C.push(k),C=C.filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]}),this.peakCacheRanges=this.peakCacheRanges.concat(C),this.peakCacheRanges=this.peakCacheRanges.sort(function(g,D){return g-D}).filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]});var O=[];for(S=0;S<C.length;S+=2)O.push([C[S],C[S+1]]);return O}},{key:"getCacheRanges",value:function(){var P=[],A;for(A=0;A<this.peakCacheRanges.length;A+=2)P.push([this.peakCacheRanges[A],this.peakCacheRanges[A+1]]);return P}}]),b}();o.default=$,s.exports=o.default},"./src/util/absMax.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=b;var h=$(l("./src/util/max.js")),p=$(l("./src/util/min.js"));function $(v){return v&&v.__esModule?v:{default:v}}function b(v){var P=(0,h.default)(v),A=(0,p.default)(v);return-A>P?-A:P}s.exports=o.default},"./src/util/clamp.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p,$){return Math.min(Math.max(p,h),$)}s.exports=o.default},"./src/util/fetch.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=A;var h=p(l("./src/util/observer.js"));function p(k){return k&&k.__esModule?k:{default:k}}function $(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function b(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function v(k,C,S){return C&&b(k.prototype,C),S&&b(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var P=function(){function k(C,S,O){$(this,k),this.instance=C,this.instance._reader=O.body.getReader(),this.total=parseInt(S,10),this.loaded=0}return v(k,[{key:"start",value:function(S){var O=this,g=function D(){O.instance._reader.read().then(function(M){var N=M.done,I=M.value;if(N){O.total===0&&O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:!1}),S.close();return}O.loaded+=I.byteLength,O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:O.total!==0}),S.enqueue(I),D()}).catch(function(M){S.error(M)})};g()}}]),k}();function A(k){if(k){if(!k.url)throw new Error("fetch url missing")}else throw new Error("fetch options missing");var C=new h.default,S=new Headers,O=new Request(k.url);C.controller=new AbortController,k&&k.requestHeaders&&k.requestHeaders.forEach(function(M){S.append(M.key,M.value)});var g=k.responseType||"json",D={method:k.method||"GET",headers:S,mode:k.mode||"cors",credentials:k.credentials||"same-origin",cache:k.cache||"default",redirect:k.redirect||"follow",referrer:k.referrer||"client",signal:C.controller.signal};return fetch(O,D).then(function(M){C.response=M;var N=!0;M.body||(N=!1);var I=M.headers.get("content-length");return I===null&&(N=!1),N?(C.onProgress=function(R){C.fireEvent("progress",R)},new Response(new ReadableStream(new P(C,I,M)),D)):M}).then(function(M){var N;if(M.ok)switch(g){case"arraybuffer":return M.arrayBuffer();case"json":return M.json();case"blob":return M.blob();case"text":return M.text();default:N="Unknown responseType: "+g;break}throw N||(N="HTTP error status: "+M.status),new Error(N)}).then(function(M){C.fireEvent("success",M)}).catch(function(M){C.fireEvent("error",M)}),C.fetchRequest=O,C}s.exports=o.default},"./src/util/frame.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=$;var h=p(l("./src/util/request-animation-frame.js"));function p(b){return b&&b.__esModule?b:{default:b}}function $(b){return function(){for(var v=arguments.length,P=new Array(v),A=0;A<v;A++)P[A]=arguments[A];return(0,h.default)(function(){return b.apply(void 0,P)})}}s.exports=o.default},"./src/util/get-id.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){return h===void 0&&(h="wavesurfer_"),h+Math.random().toString(32).substring(2)}s.exports=o.default},"./src/util/index.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"Observer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(o,"absMax",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(o,"clamp",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"debounce",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(o,"fetchFile",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(o,"frame",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(o,"getId",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(o,"ignoreSilenceMode",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(o,"max",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(o,"min",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(o,"preventClick",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(o,"requestAnimationFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(o,"style",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(o,"withOrientation",{enumerable:!0,get:function(){return D.default}});var h=N(l("./src/util/get-id.js")),p=N(l("./src/util/max.js")),$=N(l("./src/util/min.js")),b=N(l("./src/util/absMax.js")),v=N(l("./src/util/observer.js")),P=N(l("./src/util/style.js")),A=N(l("./src/util/request-animation-frame.js")),k=N(l("./src/util/frame.js")),C=N(l("./node_modules/debounce/index.js")),S=N(l("./src/util/prevent-click.js")),O=N(l("./src/util/fetch.js")),g=N(l("./src/util/clamp.js")),D=N(l("./src/util/orientation.js")),M=N(l("./src/util/silence-mode.js"));function N(I){return I&&I.__esModule?I:{default:I}}},"./src/util/max.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=-1/0;return Object.keys(h).forEach(function($){h[$]>p&&(p=h[$])}),p}s.exports=o.default},"./src/util/min.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=Number(1/0);return Object.keys(h).forEach(function($){h[$]<p&&(p=h[$])}),p}s.exports=o.default},"./src/util/observer.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var P=0;P<v.length;P++){var A=v[P];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,P){return v&&h(b.prototype,v),P&&h(b,P),Object.defineProperty(b,"prototype",{writable:!1}),b}var $=function(){function b(){l(this,b),this._disabledEventEmissions=[],this.handlers=null}return p(b,[{key:"on",value:function(P,A){var k=this;this.handlers||(this.handlers={});var C=this.handlers[P];return C||(C=this.handlers[P]=[]),C.push(A),{name:P,callback:A,un:function(O,g){return k.un(O,g)}}}},{key:"un",value:function(P,A){if(!!this.handlers){var k=this.handlers[P],C;if(k)if(A)for(C=k.length-1;C>=0;C--)k[C]==A&&k.splice(C,1);else k.length=0}}},{key:"unAll",value:function(){this.handlers=null}},{key:"once",value:function(P,A){var k=this,C=function S(){for(var O=arguments.length,g=new Array(O),D=0;D<O;D++)g[D]=arguments[D];A.apply(k,g),setTimeout(function(){k.un(P,S)},0)};return this.on(P,C)}},{key:"setDisabledEventEmissions",value:function(P){this._disabledEventEmissions=P}},{key:"_isDisabledEventEmission",value:function(P){return this._disabledEventEmissions&&this._disabledEventEmissions.includes(P)}},{key:"fireEvent",value:function(P){for(var A=arguments.length,k=new Array(A>1?A-1:0),C=1;C<A;C++)k[C-1]=arguments[C];if(!(!this.handlers||this._isDisabledEventEmission(P))){var S=this.handlers[P];S&&S.forEach(function(O){O.apply(void 0,k)})}}}]),b}();o.default=$,s.exports=o.default},"./src/util/orientation.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=$;var l={width:"height",height:"width",overflowX:"overflowY",overflowY:"overflowX",clientWidth:"clientHeight",clientHeight:"clientWidth",clientX:"clientY",clientY:"clientX",scrollWidth:"scrollHeight",scrollLeft:"scrollTop",offsetLeft:"offsetTop",offsetTop:"offsetLeft",offsetHeight:"offsetWidth",offsetWidth:"offsetHeight",left:"top",right:"bottom",top:"left",bottom:"right",borderRightStyle:"borderBottomStyle",borderRightWidth:"borderBottomWidth",borderRightColor:"borderBottomColor"};function h(b,v){return Object.prototype.hasOwnProperty.call(l,b)&&v?l[b]:b}var p=Symbol("isProxy");function $(b,v){return b[p]?b:new Proxy(b,{get:function(A,k,C){if(k===p)return!0;if(k==="domElement")return A;if(k==="style")return $(A.style,v);if(k==="canvas")return $(A.canvas,v);if(k==="getBoundingClientRect")return function(){return $(A.getBoundingClientRect.apply(A,arguments),v)};if(k==="getContext")return function(){return $(A.getContext.apply(A,arguments),v)};var S=A[h(k,v)];return typeof S=="function"?S.bind(A):S},set:function(A,k,C){return A[h(k,v)]=C,!0}})}s.exports=o.default},"./src/util/prevent-click.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=h;function l(p){p.stopPropagation(),document.body.removeEventListener("click",l,!0)}function h(p){document.body.addEventListener("click",l,!0)}s.exports=o.default},"./src/util/request-animation-frame.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(h,p){return setTimeout(h,1e3/60)}).bind(window);o.default=l,s.exports=o.default},"./src/util/silence-mode.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(){var h="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",p=document.createElement("div");p.innerHTML='<audio x-webkit-airplay="deny"></audio>';var $=p.children.item(0);$.src=h,$.preload="auto",$.type="audio/mpeg",$.disableRemotePlayback=!0,$.play(),$.remove(),p.remove()}s.exports=o.default},"./src/util/style.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p){return Object.keys(p).forEach(function($){h.style[$]!==p[$]&&(h.style[$]=p[$])}),h}s.exports=o.default},"./src/wavesurfer.js":(s,o,l)=>{function h(f){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},h(f)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=S(l("./src/util/index.js")),$=k(l("./src/drawer.multicanvas.js")),b=k(l("./src/webaudio.js")),v=k(l("./src/mediaelement.js")),P=k(l("./src/peakcache.js")),A=k(l("./src/mediaelement-webaudio.js"));function k(f){return f&&f.__esModule?f:{default:f}}function C(f){if(typeof WeakMap!="function")return null;var c=new WeakMap,T=new WeakMap;return(C=function(u){return u?T:c})(f)}function S(f,c){if(!c&&f&&f.__esModule)return f;if(f===null||h(f)!=="object"&&typeof f!="function")return{default:f};var T=C(c);if(T&&T.has(f))return T.get(f);var w={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in f)if(_!=="default"&&Object.prototype.hasOwnProperty.call(f,_)){var H=u?Object.getOwnPropertyDescriptor(f,_):null;H&&(H.get||H.set)?Object.defineProperty(w,_,H):w[_]=f[_]}return w.default=f,T&&T.set(f,w),w}function O(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),c&&g(f,c)}function g(f,c){return g=Object.setPrototypeOf||function(w,u){return w.__proto__=u,w},g(f,c)}function D(f){var c=I();return function(){var w=R(f),u;if(c){var _=R(this).constructor;u=Reflect.construct(w,arguments,_)}else u=w.apply(this,arguments);return M(this,u)}}function M(f,c){if(c&&(h(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}function N(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(f){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},R(f)}function B(f,c,T){return c in f?Object.defineProperty(f,c,{value:T,enumerable:!0,configurable:!0,writable:!0}):f[c]=T,f}function E(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function m(f,c){for(var T=0;T<c.length;T++){var w=c[T];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,w.key,w)}}function d(f,c,T){return c&&m(f.prototype,c),T&&m(f,T),Object.defineProperty(f,"prototype",{writable:!1}),f}var y=function(f){O(T,f);var c=D(T);function T(w){var u;if(E(this,T),u=c.call(this),B(N(u),"defaultParams",{audioContext:null,audioScriptProcessor:null,audioRate:1,autoCenter:!0,autoCenterRate:5,autoCenterImmediately:!1,backend:"WebAudio",backgroundColor:null,barHeight:1,barRadius:0,barGap:null,barMinHeight:null,container:null,cursorColor:"#333",cursorWidth:1,dragSelection:!0,drawingContextAttributes:{desynchronized:!1},duration:null,fillParent:!0,forceDecode:!1,height:128,hideScrollbar:!1,hideCursor:!1,ignoreSilenceMode:!1,interact:!0,loopSelection:!0,maxCanvasWidth:4e3,mediaContainer:null,mediaControls:!1,mediaType:"audio",minPxPerSec:20,normalize:!1,partialRender:!1,pixelRatio:window.devicePixelRatio||screen.deviceXDPI/screen.logicalXDPI,plugins:[],progressColor:"#555",removeMediaElementOnDestroy:!0,renderer:$.default,responsive:!1,rtl:!1,scrollParent:!1,skipLength:2,splitChannels:!1,splitChannelsOptions:{overlay:!1,channelColors:{},filterChannels:[],relativeNormalization:!1},vertical:!1,waveColor:"#999",xhr:{}}),B(N(u),"backends",{MediaElement:v.default,WebAudio:b.default,MediaElementWebAudio:A.default}),B(N(u),"util",p),u.params=Object.assign({},u.defaultParams,w),u.params.splitChannelsOptions=Object.assign({},u.defaultParams.splitChannelsOptions,w.splitChannelsOptions),u.container=typeof w.container=="string"?document.querySelector(u.params.container):u.params.container,!u.container)throw new Error("Container element not found");if(u.params.mediaContainer==null?u.mediaContainer=u.container:typeof u.params.mediaContainer=="string"?u.mediaContainer=document.querySelector(u.params.mediaContainer):u.mediaContainer=u.params.mediaContainer,!u.mediaContainer)throw new Error("Media Container element not found");if(u.params.maxCanvasWidth<=1)throw new Error("maxCanvasWidth must be greater than 1");if(u.params.maxCanvasWidth%2==1)throw new Error("maxCanvasWidth must be an even number");if(u.params.rtl===!0&&(u.params.vertical===!0?p.style(u.container,{transform:"rotateX(180deg)"}):p.style(u.container,{transform:"rotateY(180deg)"})),u.params.backgroundColor&&u.setBackgroundColor(u.params.backgroundColor),u.savedVolume=0,u.isMuted=!1,u.tmpEvents=[],u.currentRequest=null,u.arraybuffer=null,u.drawer=null,u.backend=null,u.peakCache=null,typeof u.params.renderer!="function")throw new Error("Renderer parameter is invalid");u.Drawer=u.params.renderer,u.params.backend=="AudioElement"&&(u.params.backend="MediaElement"),(u.params.backend=="WebAudio"||u.params.backend==="MediaElementWebAudio")&&!b.default.prototype.supportsWebAudio.call(null)&&(u.params.backend="MediaElement"),u.Backend=u.backends[u.params.backend],u.initialisedPluginList={},u.isDestroyed=!1,u.isReady=!1;var _=0;return u._onResize=p.debounce(function(){u.drawer.wrapper&&_!=u.drawer.wrapper.clientWidth&&!u.params.scrollParent&&(_=u.drawer.wrapper.clientWidth,_&&u.drawer.fireEvent("redraw"))},typeof u.params.responsive=="number"?u.params.responsive:100),M(u,N(u))}return d(T,[{key:"init",value:function(){return this.registerPlugins(this.params.plugins),this.createDrawer(),this.createBackend(),this.createPeakCache(),this}},{key:"registerPlugins",value:function(u){var _=this;return u.forEach(function(H){return _.addPlugin(H)}),u.forEach(function(H){H.deferInit||_.initPlugin(H.name)}),this.fireEvent("plugins-registered",u),this}},{key:"getActivePlugins",value:function(){return this.initialisedPluginList}},{key:"addPlugin",value:function(u){var _=this;if(!u.name)throw new Error("Plugin does not have a name!");if(!u.instance)throw new Error("Plugin ".concat(u.name," does not have an instance property!"));u.staticProps&&Object.keys(u.staticProps).forEach(function(F){_[F]=u.staticProps[F]});var H=u.instance,V=Object.getOwnPropertyNames(p.Observer.prototype);return V.forEach(function(F){H.prototype[F]=p.Observer.prototype[F]}),this[u.name]=new H(u.params||{},this),this.fireEvent("plugin-added",u.name),this}},{key:"initPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet!"));return this.initialisedPluginList[u]&&this.destroyPlugin(u),this[u].init(),this.initialisedPluginList[u]=!0,this.fireEvent("plugin-initialised",u),this}},{key:"destroyPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet and cannot be destroyed!"));if(!this.initialisedPluginList[u])throw new Error("Plugin ".concat(u," is not active and cannot be destroyed!"));if(typeof this[u].destroy!="function")throw new Error("Plugin ".concat(u," does not have a destroy function!"));return this[u].destroy(),delete this.initialisedPluginList[u],this.fireEvent("plugin-destroyed",u),this}},{key:"destroyAllPlugins",value:function(){var u=this;Object.keys(this.initialisedPluginList).forEach(function(_){return u.destroyPlugin(_)})}},{key:"createDrawer",value:function(){var u=this;this.drawer=new this.Drawer(this.container,this.params),this.drawer.init(),this.fireEvent("drawer-created",this.drawer),this.params.responsive!==!1&&(window.addEventListener("resize",this._onResize,!0),window.addEventListener("orientationchange",this._onResize,!0)),this.drawer.on("redraw",function(){u.drawBuffer(),u.drawer.progress(u.backend.getPlayedPercents())}),this.drawer.on("click",function(_,H){setTimeout(function(){return u.seekTo(H)},0)}),this.drawer.on("scroll",function(_){u.params.partialRender&&u.drawBuffer(),u.fireEvent("scroll",_)})}},{key:"createBackend",value:function(){var u=this;this.backend&&this.backend.destroy(),this.backend=new this.Backend(this.params),this.backend.init(),this.fireEvent("backend-created",this.backend),this.backend.on("finish",function(){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("finish")}),this.backend.on("play",function(){return u.fireEvent("play")}),this.backend.on("pause",function(){return u.fireEvent("pause")}),this.backend.on("audioprocess",function(_){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("audioprocess",_)}),(this.params.backend==="MediaElement"||this.params.backend==="MediaElementWebAudio")&&(this.backend.on("seek",function(){u.drawer.progress(u.backend.getPlayedPercents())}),this.backend.on("volume",function(){var _=u.getVolume();u.fireEvent("volume",_),u.backend.isMuted!==u.isMuted&&(u.isMuted=u.backend.isMuted,u.fireEvent("mute",u.isMuted))}))}},{key:"createPeakCache",value:function(){this.params.partialRender&&(this.peakCache=new P.default)}},{key:"getDuration",value:function(){return this.backend.getDuration()}},{key:"getCurrentTime",value:function(){return this.backend.getCurrentTime()}},{key:"setCurrentTime",value:function(u){u>=this.getDuration()?this.seekTo(1):this.seekTo(u/this.getDuration())}},{key:"play",value:function(u,_){var H=this;return this.params.ignoreSilenceMode&&p.ignoreSilenceMode(),this.fireEvent("interaction",function(){return H.play(u,_)}),this.backend.play(u,_)}},{key:"setPlayEnd",value:function(u){this.backend.setPlayEnd(u)}},{key:"pause",value:function(){if(!this.backend.isPaused())return this.backend.pause()}},{key:"playPause",value:function(){return this.backend.isPaused()?this.play():this.pause()}},{key:"isPlaying",value:function(){return!this.backend.isPaused()}},{key:"skipBackward",value:function(u){this.skip(-u||-this.params.skipLength)}},{key:"skipForward",value:function(u){this.skip(u||this.params.skipLength)}},{key:"skip",value:function(u){var _=this.getDuration()||1,H=this.getCurrentTime()||0;H=Math.max(0,Math.min(_,H+(u||0))),this.seekAndCenter(H/_)}},{key:"seekAndCenter",value:function(u){this.seekTo(u),this.drawer.recenter(u)}},{key:"seekTo",value:function(u){var _=this;if(typeof u!="number"||!isFinite(u)||u<0||u>1)throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");this.fireEvent("interaction",function(){return _.seekTo(u)});var H=this.params.backend==="WebAudio",V=this.backend.isPaused();H&&!V&&this.backend.pause();var F=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(u*this.getDuration()),this.drawer.progress(u),H&&!V&&this.backend.play(),this.params.scrollParent=F,this.fireEvent("seek",u)}},{key:"stop",value:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)}},{key:"setSinkId",value:function(u){return this.backend.setSinkId(u)}},{key:"setVolume",value:function(u){this.backend.setVolume(u),this.fireEvent("volume",u)}},{key:"getVolume",value:function(){return this.backend.getVolume()}},{key:"setPlaybackRate",value:function(u){this.backend.setPlaybackRate(u)}},{key:"getPlaybackRate",value:function(){return this.backend.getPlaybackRate()}},{key:"toggleMute",value:function(){this.setMute(!this.isMuted)}},{key:"setMute",value:function(u){if(u===this.isMuted){this.fireEvent("mute",this.isMuted);return}this.backend.setMute?(this.backend.setMute(u),this.isMuted=u):u?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0,this.fireEvent("volume",0)):(this.backend.setVolume(this.savedVolume),this.isMuted=!1,this.fireEvent("volume",this.savedVolume)),this.fireEvent("mute",this.isMuted)}},{key:"getMute",value:function(){return this.isMuted}},{key:"getFilters",value:function(){return this.backend.filters||[]}},{key:"toggleScroll",value:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()}},{key:"toggleInteraction",value:function(){this.params.interact=!this.params.interact}},{key:"getWaveColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].waveColor:this.params.waveColor}},{key:"setWaveColor",value:function(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].waveColor=u:this.params.waveColor=u,this.drawBuffer()}},{key:"getProgressColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].progressColor:this.params.progressColor}},{key:"setProgressColor",value:function(u,_){this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].progressColor=u:this.params.progressColor=u,this.drawBuffer()}},{key:"getBackgroundColor",value:function(){return this.params.backgroundColor}},{key:"setBackgroundColor",value:function(u){this.params.backgroundColor=u,p.style(this.container,{background:this.params.backgroundColor})}},{key:"getCursorColor",value:function(){return this.params.cursorColor}},{key:"setCursorColor",value:function(u){this.params.cursorColor=u,this.drawer.updateCursor()}},{key:"getHeight",value:function(){return this.params.height}},{key:"setHeight",value:function(u){this.params.height=u,this.drawer.setHeight(u*this.params.pixelRatio),this.drawBuffer()}},{key:"setFilteredChannels",value:function(u){this.params.splitChannelsOptions.filterChannels=u,this.drawBuffer()}},{key:"drawBuffer",value:function(){var u=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),_=this.drawer.getWidth(),H=u,V=0,F=Math.max(V+_,H);this.params.fillParent&&(!this.params.scrollParent||u<_)&&(H=_,V=0,F=H);var G;if(this.params.partialRender){var z=this.peakCache.addRangeToPeakCache(H,V,F),U;for(U=0;U<z.length;U++)G=this.backend.getPeaks(H,z[U][0],z[U][1]),this.drawer.drawPeaks(G,H,z[U][0],z[U][1])}else G=this.backend.getPeaks(H,V,F),this.drawer.drawPeaks(G,H,V,F);this.fireEvent("redraw",G,H)}},{key:"zoom",value:function(u){u?(this.params.minPxPerSec=u,this.params.scrollParent=!0):(this.params.minPxPerSec=this.defaultParams.minPxPerSec,this.params.scrollParent=!1),this.drawBuffer(),this.drawer.progress(this.backend.getPlayedPercents()),this.drawer.recenter(this.getCurrentTime()/this.getDuration()),this.fireEvent("zoom",u)}},{key:"loadArrayBuffer",value:function(u){var _=this;this.decodeArrayBuffer(u,function(H){_.isDestroyed||_.loadDecodedBuffer(H)})}},{key:"loadDecodedBuffer",value:function(u){this.backend.load(u),this.drawBuffer(),this.isReady=!0,this.fireEvent("ready")}},{key:"loadBlob",value:function(u){var _=this,H=new FileReader;H.addEventListener("progress",function(V){return _.onProgress(V)}),H.addEventListener("load",function(V){return _.loadArrayBuffer(V.target.result)}),H.addEventListener("error",function(){return _.fireEvent("error","Error reading file")}),H.readAsArrayBuffer(u),this.empty()}},{key:"load",value:function(u,_,H,V){if(!u)throw new Error("url parameter cannot be empty");if(this.empty(),H){var F={"Preload is not 'auto', 'none' or 'metadata'":["auto","metadata","none"].indexOf(H)===-1,"Peaks are not provided":!_,"Backend is not of type 'MediaElement' or 'MediaElementWebAudio'":["MediaElement","MediaElementWebAudio"].indexOf(this.params.backend)===-1,"Url is not of type string":typeof u!="string"},G=Object.keys(F).filter(function(z){return F[z]});G.length&&(console.warn(`Preload parameter of wavesurfer.load will be ignored because:
|
|
152
54
|
- `+G.join(`
|
|
153
|
-
- `)),H=null)}switch(this.params.backend==="WebAudio"&&u instanceof HTMLMediaElement&&(u=u.src),this.params.backend){case"WebAudio":return this.loadBuffer(u,_,V);case"MediaElement":case"MediaElementWebAudio":return this.loadMediaElement(u,_,H,V)}}},{key:"loadBuffer",value:function(u,_,H){var V=this,F=function(z){return z&&V.tmpEvents.push(V.once("ready",z)),V.getArrayBuffer(u,function(U){return V.loadArrayBuffer(U)})};if(_)this.backend.setPeaks(_,H),this.drawBuffer(),this.fireEvent("waveform-ready"),this.tmpEvents.push(this.once("interaction",F));else return F()}},{key:"loadMediaElement",value:function(u,_,H,V){var F=this,G=u;if(typeof u=="string")this.backend.load(G,this.mediaContainer,_,H);else{var z=u;this.backend.loadElt(z,_),G=z.src}this.tmpEvents.push(this.backend.once("canplay",function(){F.backend.destroyed||(F.drawBuffer(),F.isReady=!0,F.fireEvent("ready"))}),this.backend.once("error",function(U){return F.fireEvent("error",U)})),_&&(this.backend.setPeaks(_,V),this.drawBuffer(),this.fireEvent("waveform-ready")),(!_||this.params.forceDecode)&&this.backend.supportsWebAudio()&&this.getArrayBuffer(G,function(U){F.decodeArrayBuffer(U,function(re){F.backend.buffer=re,F.backend.setPeaks(null),F.drawBuffer(),F.fireEvent("waveform-ready")})})}},{key:"decodeArrayBuffer",value:function(u,_){var H=this;this.isDestroyed||(this.arraybuffer=u,this.backend.decodeArrayBuffer(u,function(V){!H.isDestroyed&&H.arraybuffer==u&&(_(V),H.arraybuffer=null)},function(){return H.fireEvent("error","Error decoding audiobuffer")}))}},{key:"getArrayBuffer",value:function(u,_){var H=this,V=Object.assign({url:u,responseType:"arraybuffer"},this.params.xhr),F=p.fetchFile(V);return this.currentRequest=F,this.tmpEvents.push(F.on("progress",function(G){H.onProgress(G)}),F.on("success",function(G){_(G),H.currentRequest=null}),F.on("error",function(G){H.fireEvent("error",G),H.currentRequest=null})),F}},{key:"onProgress",value:function(u){var _;u.lengthComputable?_=u.loaded/u.total:_=u.loaded/(u.loaded+1e6),this.fireEvent("loading",Math.round(_*100),u.target)}},{key:"exportPCM",value:function(u,_,H,V,F){u=u||1024,V=V||0,_=_||1e4,H=H||!1;var G=this.backend.getPeaks(u,V,F),z=[].map.call(G,function(U){return Math.round(U*_)/_});return new Promise(function(U,re){if(!H){var fe=new Blob([JSON.stringify(z)],{type:"application/json;charset=utf-8"}),Z=URL.createObjectURL(fe);window.open(Z),URL.revokeObjectURL(Z)}U(z)})}},{key:"exportImage",value:function(u,_,H){return u||(u="image/png"),_||(_=1),H||(H="dataURL"),this.drawer.getImage(u,_,H)}},{key:"cancelAjax",value:function(){this.currentRequest&&this.currentRequest.controller&&(this.currentRequest._reader&&this.currentRequest._reader.cancel().catch(function(u){}),this.currentRequest.controller.abort(),this.currentRequest=null)}},{key:"clearTmpEvents",value:function(){this.tmpEvents.forEach(function(u){return u.un()})}},{key:"empty",value:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.isReady=!1,this.cancelAjax(),this.clearTmpEvents(),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)}},{key:"destroy",value:function(){this.destroyAllPlugins(),this.fireEvent("destroy"),this.cancelAjax(),this.clearTmpEvents(),this.unAll(),this.params.responsive!==!1&&(window.removeEventListener("resize",this._onResize,!0),window.removeEventListener("orientationchange",this._onResize,!0)),this.backend&&(this.backend.destroy(),this.backend=null),this.drawer&&this.drawer.destroy(),this.isDestroyed=!0,this.isReady=!1,this.arraybuffer=null}}],[{key:"create",value:function(u){var _=new T(u);return _.init()}}]),T}(p.Observer);o.default=y,B(y,"VERSION","6.2.0"),B(y,"util",p),s.exports=o.default},"./src/webaudio.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function w(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return(w=function(c){return c?y:d})(m)}function b(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=w(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var $=c?Object.getOwnPropertyDescriptor(m,T):null;$&&($.get||$.set)?Object.defineProperty(f,T,$):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function v(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function x(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function A(m,d,y){return d&&x(m.prototype,d),y&&x(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function k(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&C(m,d)}function C(m,d){return C=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},C(m,d)}function S(m){var d=D();return function(){var f=M(m),c;if(d){var T=M(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return O(this,c)}}function O(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(m)}function g(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(m){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},M(m)}function N(m,d,y){return d in m?Object.defineProperty(m,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[d]=y,m}var I="playing",R="paused",B="finished",E=function(m){k(y,m);var d=S(y);function y(f){var c,T,$;return v(this,y),$=d.call(this),N(g($),"audioContext",null),N(g($),"offlineAudioContext",null),N(g($),"stateBehaviors",(c={},N(c,I,{init:function(){this.addOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}}),N(c,R,{init:function(){this.removeOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition}}),N(c,B,{init:function(){this.removeOnAudioProcess(),this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}}),c)),$.params=f,$.ac=f.audioContext||($.supportsWebAudio()?$.getAudioContext():{}),$.lastPlay=$.ac.currentTime,$.startPosition=0,$.scheduledPause=null,$.states=(T={},N(T,I,Object.create($.stateBehaviors[I])),N(T,R,Object.create($.stateBehaviors[R])),N(T,B,Object.create($.stateBehaviors[B])),T),$.buffer=null,$.filters=[],$.gainNode=null,$.mergedPeaks=null,$.offlineAc=null,$.peaks=null,$.playbackRate=1,$.analyser=null,$.scriptNode=null,$.source=null,$.splitPeaks=[],$.state=null,$.explicitDuration=f.duration,$.sinkStreamDestination=null,$.sinkAudioElement=null,$.destroyed=!1,$}return A(y,[{key:"supportsWebAudio",value:function(){return!!(window.AudioContext||window.webkitAudioContext)}},{key:"getAudioContext",value:function(){return window.WaveSurferAudioContext||(window.WaveSurferAudioContext=new(window.AudioContext||window.webkitAudioContext)),window.WaveSurferAudioContext}},{key:"getOfflineAudioContext",value:function(c){return window.WaveSurferOfflineAudioContext||(window.WaveSurferOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,c)),window.WaveSurferOfflineAudioContext}},{key:"init",value:function(){this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setState(R),this.setPlaybackRate(this.params.audioRate),this.setLength(0)}},{key:"disconnectFilters",value:function(){this.filters&&(this.filters.forEach(function(c){c&&c.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))}},{key:"setState",value:function(c){this.state!==this.states[c]&&(this.state=this.states[c],this.state.init.call(this))}},{key:"setFilter",value:function(){for(var c=arguments.length,T=new Array(c),$=0;$<c;$++)T[$]=arguments[$];this.setFilters(T)}},{key:"setFilters",value:function(c){this.disconnectFilters(),c&&c.length&&(this.filters=c,this.analyser.disconnect(),c.reduce(function(T,$){return T.connect($),$},this.analyser).connect(this.gainNode))}},{key:"createScriptNode",value:function(){this.params.audioScriptProcessor?this.scriptNode=this.params.audioScriptProcessor:this.ac.createScriptProcessor?this.scriptNode=this.ac.createScriptProcessor(y.scriptBufferSize):this.scriptNode=this.ac.createJavaScriptNode(y.scriptBufferSize),this.scriptNode.connect(this.ac.destination)}},{key:"addOnAudioProcess",value:function(){var c=this;this.scriptNode.onaudioprocess=function(){var T=c.getCurrentTime();T>=c.getDuration()?(c.setState(B),c.fireEvent("pause")):T>=c.scheduledPause?c.pause():c.state===c.states[I]&&c.fireEvent("audioprocess",T)}}},{key:"removeOnAudioProcess",value:function(){this.scriptNode.onaudioprocess=null}},{key:"createAnalyserNode",value:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)}},{key:"createVolumeNode",value:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)}},{key:"setSinkId",value:function(c){return c?(this.sinkAudioElement||(this.sinkAudioElement=new window.Audio,this.sinkAudioElement.autoplay=!0),this.sinkAudioElement.setSinkId?(this.sinkStreamDestination||(this.sinkStreamDestination=this.ac.createMediaStreamDestination()),this.gainNode.disconnect(),this.gainNode.connect(this.sinkStreamDestination),this.sinkAudioElement.srcObject=this.sinkStreamDestination.stream,this.sinkAudioElement.setSinkId(c)):Promise.reject(new Error("setSinkId is not supported in your browser"))):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"setVolume",value:function(c){this.gainNode.gain.setValueAtTime(c,this.ac.currentTime)}},{key:"getVolume",value:function(){return this.gainNode.gain.value}},{key:"decodeArrayBuffer",value:function(c,T,$){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac&&this.ac.sampleRate?this.ac.sampleRate:44100)),"webkitAudioContext"in window?this.offlineAc.decodeAudioData(c,function(u){return T(u)},$):this.offlineAc.decodeAudioData(c).then(function(u){return T(u)}).catch(function(u){return $(u)})}},{key:"setPeaks",value:function(c,T){T!=null&&(this.explicitDuration=T),this.peaks=c}},{key:"setLength",value:function(c){if(!(this.mergedPeaks&&c==2*this.mergedPeaks.length-1+2)){this.splitPeaks=[],this.mergedPeaks=[];var T=this.buffer?this.buffer.numberOfChannels:1,$;for($=0;$<T;$++)this.splitPeaks[$]=[],this.splitPeaks[$][2*(c-1)]=0,this.splitPeaks[$][2*(c-1)+1]=0;this.mergedPeaks[2*(c-1)]=0,this.mergedPeaks[2*(c-1)+1]=0}}},{key:"getPeaks",value:function(c,T,$){if(this.peaks)return this.peaks;if(!this.buffer)return[];if(T=T||0,$=$||c-1,this.setLength(c),!this.buffer)return this.params.splitChannels?this.splitPeaks:this.mergedPeaks;if(!this.buffer.length){var u=this.createBuffer(1,4096,this.sampleRate);this.buffer=u.buffer}var _=this.buffer.length/c,H=~~(_/10)||1,V=this.buffer.numberOfChannels,F;for(F=0;F<V;F++){var G=this.splitPeaks[F],z=this.buffer.getChannelData(F),U=void 0;for(U=T;U<=$;U++){var re=~~(U*_),fe=~~(re+_),Z=z[re],we=Z,oe=void 0;for(oe=re;oe<fe;oe+=H){var ve=z[oe];ve>we&&(we=ve),ve<Z&&(Z=ve)}G[2*U]=we,G[2*U+1]=Z,(F==0||we>this.mergedPeaks[2*U])&&(this.mergedPeaks[2*U]=we),(F==0||Z<this.mergedPeaks[2*U+1])&&(this.mergedPeaks[2*U+1]=Z)}}return this.params.splitChannels?this.splitPeaks:this.mergedPeaks}},{key:"getPlayedPercents",value:function(){return this.state.getPlayedPercents.call(this)}},{key:"disconnectSource",value:function(){this.source&&this.source.disconnect()}},{key:"destroyWebAudio",value:function(){this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect(),this.params.closeAudioContext&&(typeof this.ac.close=="function"&&this.ac.state!="closed"&&this.ac.close(),this.ac=null,this.params.audioContext?this.params.audioContext=null:window.WaveSurferAudioContext=null,window.WaveSurferOfflineAudioContext=null),this.sinkStreamDestination&&(this.sinkAudioElement.pause(),this.sinkAudioElement.srcObject=null,this.sinkStreamDestination.disconnect(),this.sinkStreamDestination=null)}},{key:"destroy",value:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.destroyed=!0,this.destroyWebAudio()}},{key:"load",value:function(c){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=c,this.createSource()}},{key:"createSource",value:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.setPlaybackRate(this.playbackRate),this.source.buffer=this.buffer,this.source.connect(this.analyser)}},{key:"resumeAudioContext",value:function(){this.ac.state=="suspended"&&this.ac.resume&&this.ac.resume()}},{key:"isPaused",value:function(){return this.state!==this.states[I]}},{key:"getDuration",value:function(){return this.explicitDuration?this.explicitDuration:this.buffer?this.buffer.duration:0}},{key:"seekTo",value:function(c,T){if(!!this.buffer)return this.scheduledPause=null,c==null&&(c=this.getCurrentTime(),c>=this.getDuration()&&(c=0)),T==null&&(T=this.getDuration()),this.startPosition=c,this.lastPlay=this.ac.currentTime,this.state===this.states[B]&&this.setState(R),{start:c,end:T}}},{key:"getPlayedTime",value:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate}},{key:"play",value:function(c,T){if(!!this.buffer){this.createSource();var $=this.seekTo(c,T);c=$.start,T=$.end,this.scheduledPause=T,this.source.start(0,c),this.resumeAudioContext(),this.setState(I),this.fireEvent("play")}}},{key:"pause",value:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime();try{this.source&&this.source.stop(0)}catch{}this.setState(R),this.fireEvent("pause")}},{key:"getCurrentTime",value:function(){return this.state.getCurrentTime.call(this)}},{key:"getPlaybackRate",value:function(){return this.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.source&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.ac.currentTime)}},{key:"setPlayEnd",value:function(c){this.scheduledPause=c}}]),y}(p.Observer);o.default=E,N(E,"scriptBufferSize",256),s.exports=o.default},"./node_modules/debounce/index.js":s=>{function o(l,h,p){var w,b,v,x,A;h==null&&(h=100);function k(){var S=Date.now()-x;S<h&&S>=0?w=setTimeout(k,h-S):(w=null,p||(A=l.apply(v,b),v=b=null))}var C=function(){v=this,b=arguments,x=Date.now();var S=p&&!w;return w||(w=setTimeout(k,h)),S&&(A=l.apply(v,b),v=b=null),A};return C.clear=function(){w&&(clearTimeout(w),w=null)},C.flush=function(){w&&(A=l.apply(v,b),v=b=null,clearTimeout(w),w=null)},C}o.debounce=o,s.exports=o}},n={};function a(s){var o=n[s];if(o!==void 0)return o.exports;var l=n[s]={exports:{}};return r[s](l,l.exports,a),l.exports}var i=a("./src/wavesurfer.js");return i})())})(Ao);var yf=Xc(Ao.exports);const $f=()=>{const e=j(ue),{curAudioState:t,curIdx:r,playList:n,elementRefs:a}=j(ee),[i,s]=P.useState(!1),o=P.useCallback(()=>{if(!(a!=null&&a.waveformInst)||!a.trackCurTimeEl)return;const{trackCurTimeEl:b}=a,v=a.waveformInst.getCurrentTime();b.innerText=Hn(v)},[a]),[l,h]=P.useState();P.useEffect(()=>{!(a!=null&&a.waveformInst)||!n[r]||(l==null?void 0:l.src)!==n[r].src&&(h(n[r]),s(!1),a.waveformInst.load(n[r].src),a.waveformInst.on("ready",()=>{Fn(a,a.waveformInst.getDuration()),s(!0),a.waveformInst.on("seek",()=>o())}))},[n,r,a==null?void 0:a.waveformInst,l,a,o]),P.useEffect(()=>{!i||!(a!=null&&a.waveformInst)||(t.isPlaying?a.waveformInst.play():a.waveformInst.pause())},[i,t.isPlaying,a==null?void 0:a.waveformInst]);const[p,w]=P.useState(!1);return P.useEffect(()=>{if(!(a!=null&&a.waveformInst)||(a.waveformInst.on("finish",()=>w(!0)),!p))return;(()=>{var v,x;if(w(!1),t.repeatType==="ONE"){(v=a.waveformInst)==null||v.seekTo(0),(x=a.waveformInst)==null||x.play();return}e({type:"NEXT_AUDIO"})})()},[a==null?void 0:a.waveformInst,e,t.repeatType,p]),P.useEffect(()=>{if(!i)return;const b=setInterval(o,1e3);return t.isPlaying||clearInterval(b),()=>clearInterval(b)},[t.isPlaying,o,i]),P.useEffect(()=>{if(!(!(a!=null&&a.waveformInst)||!i)){if(t.muted){a.waveformInst.setVolume(0),a.waveformInst.setMute(!0);return}a.waveformInst.setVolume(t.volume)}},[t.volume,a==null?void 0:a.waveformInst,t.muted,i]),null},wf=()=>{const e=j(ue),{elementRefs:t}=j(ee),r=bf({progressColor:"--rm-audio-player-waveform-bar",waveColor:"--rm-audio-player-waveform-background"});return P.useEffect(()=>{if((t==null?void 0:t.waveformInst)||!r.current)return;const n=yf.create({barWidth:1,cursorWidth:2,container:"#rm-waveform",backend:"WebAudio",height:80,progressColor:`${r.current.progressColor}`,responsive:!0,waveColor:`${r.current.waveColor}`,cursorColor:"var(--rm-audio-player-waveform-cursor)"});e({type:"SET_ELEMENT_REFS",elementRefs:{waveformInst:n}})},[t==null?void 0:t.waveformInst,e,r.current]),$f(),null},Ef=()=>{const{curPlayId:e,playList:t,activeUI:r}=j(ee);return t.find(i=>i.id===e)&&t.length!==0?r.progress==="waveform"?L(wf,{}):L(gf,{}):null},At=ae.default.button`
|
|
55
|
+
- `)),H=null)}switch(this.params.backend==="WebAudio"&&u instanceof HTMLMediaElement&&(u=u.src),this.params.backend){case"WebAudio":return this.loadBuffer(u,_,V);case"MediaElement":case"MediaElementWebAudio":return this.loadMediaElement(u,_,H,V)}}},{key:"loadBuffer",value:function(u,_,H){var V=this,F=function(z){return z&&V.tmpEvents.push(V.once("ready",z)),V.getArrayBuffer(u,function(U){return V.loadArrayBuffer(U)})};if(_)this.backend.setPeaks(_,H),this.drawBuffer(),this.fireEvent("waveform-ready"),this.tmpEvents.push(this.once("interaction",F));else return F()}},{key:"loadMediaElement",value:function(u,_,H,V){var F=this,G=u;if(typeof u=="string")this.backend.load(G,this.mediaContainer,_,H);else{var z=u;this.backend.loadElt(z,_),G=z.src}this.tmpEvents.push(this.backend.once("canplay",function(){F.backend.destroyed||(F.drawBuffer(),F.isReady=!0,F.fireEvent("ready"))}),this.backend.once("error",function(U){return F.fireEvent("error",U)})),_&&(this.backend.setPeaks(_,V),this.drawBuffer(),this.fireEvent("waveform-ready")),(!_||this.params.forceDecode)&&this.backend.supportsWebAudio()&&this.getArrayBuffer(G,function(U){F.decodeArrayBuffer(U,function(re){F.backend.buffer=re,F.backend.setPeaks(null),F.drawBuffer(),F.fireEvent("waveform-ready")})})}},{key:"decodeArrayBuffer",value:function(u,_){var H=this;this.isDestroyed||(this.arraybuffer=u,this.backend.decodeArrayBuffer(u,function(V){!H.isDestroyed&&H.arraybuffer==u&&(_(V),H.arraybuffer=null)},function(){return H.fireEvent("error","Error decoding audiobuffer")}))}},{key:"getArrayBuffer",value:function(u,_){var H=this,V=Object.assign({url:u,responseType:"arraybuffer"},this.params.xhr),F=p.fetchFile(V);return this.currentRequest=F,this.tmpEvents.push(F.on("progress",function(G){H.onProgress(G)}),F.on("success",function(G){_(G),H.currentRequest=null}),F.on("error",function(G){H.fireEvent("error",G),H.currentRequest=null})),F}},{key:"onProgress",value:function(u){var _;u.lengthComputable?_=u.loaded/u.total:_=u.loaded/(u.loaded+1e6),this.fireEvent("loading",Math.round(_*100),u.target)}},{key:"exportPCM",value:function(u,_,H,V,F){u=u||1024,V=V||0,_=_||1e4,H=H||!1;var G=this.backend.getPeaks(u,V,F),z=[].map.call(G,function(U){return Math.round(U*_)/_});return new Promise(function(U,re){if(!H){var fe=new Blob([JSON.stringify(z)],{type:"application/json;charset=utf-8"}),ee=URL.createObjectURL(fe);window.open(ee),URL.revokeObjectURL(ee)}U(z)})}},{key:"exportImage",value:function(u,_,H){return u||(u="image/png"),_||(_=1),H||(H="dataURL"),this.drawer.getImage(u,_,H)}},{key:"cancelAjax",value:function(){this.currentRequest&&this.currentRequest.controller&&(this.currentRequest._reader&&this.currentRequest._reader.cancel().catch(function(u){}),this.currentRequest.controller.abort(),this.currentRequest=null)}},{key:"clearTmpEvents",value:function(){this.tmpEvents.forEach(function(u){return u.un()})}},{key:"empty",value:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.isReady=!1,this.cancelAjax(),this.clearTmpEvents(),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)}},{key:"destroy",value:function(){this.destroyAllPlugins(),this.fireEvent("destroy"),this.cancelAjax(),this.clearTmpEvents(),this.unAll(),this.params.responsive!==!1&&(window.removeEventListener("resize",this._onResize,!0),window.removeEventListener("orientationchange",this._onResize,!0)),this.backend&&(this.backend.destroy(),this.backend=null),this.drawer&&this.drawer.destroy(),this.isDestroyed=!0,this.isReady=!1,this.arraybuffer=null}}],[{key:"create",value:function(u){var _=new T(u);return _.init()}}]),T}(p.Observer);o.default=y,B(y,"VERSION","6.2.0"),B(y,"util",p),s.exports=o.default},"./src/webaudio.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function $(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return($=function(c){return c?y:d})(m)}function b(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=$(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var w=c?Object.getOwnPropertyDescriptor(m,T):null;w&&(w.get||w.set)?Object.defineProperty(f,T,w):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function v(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function P(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function A(m,d,y){return d&&P(m.prototype,d),y&&P(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function k(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&C(m,d)}function C(m,d){return C=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},C(m,d)}function S(m){var d=D();return function(){var f=M(m),c;if(d){var T=M(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return O(this,c)}}function O(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(m)}function g(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(m){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},M(m)}function N(m,d,y){return d in m?Object.defineProperty(m,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[d]=y,m}var I="playing",R="paused",B="finished",E=function(m){k(y,m);var d=S(y);function y(f){var c,T,w;return v(this,y),w=d.call(this),N(g(w),"audioContext",null),N(g(w),"offlineAudioContext",null),N(g(w),"stateBehaviors",(c={},N(c,I,{init:function(){this.addOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}}),N(c,R,{init:function(){this.removeOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition}}),N(c,B,{init:function(){this.removeOnAudioProcess(),this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}}),c)),w.params=f,w.ac=f.audioContext||(w.supportsWebAudio()?w.getAudioContext():{}),w.lastPlay=w.ac.currentTime,w.startPosition=0,w.scheduledPause=null,w.states=(T={},N(T,I,Object.create(w.stateBehaviors[I])),N(T,R,Object.create(w.stateBehaviors[R])),N(T,B,Object.create(w.stateBehaviors[B])),T),w.buffer=null,w.filters=[],w.gainNode=null,w.mergedPeaks=null,w.offlineAc=null,w.peaks=null,w.playbackRate=1,w.analyser=null,w.scriptNode=null,w.source=null,w.splitPeaks=[],w.state=null,w.explicitDuration=f.duration,w.sinkStreamDestination=null,w.sinkAudioElement=null,w.destroyed=!1,w}return A(y,[{key:"supportsWebAudio",value:function(){return!!(window.AudioContext||window.webkitAudioContext)}},{key:"getAudioContext",value:function(){return window.WaveSurferAudioContext||(window.WaveSurferAudioContext=new(window.AudioContext||window.webkitAudioContext)),window.WaveSurferAudioContext}},{key:"getOfflineAudioContext",value:function(c){return window.WaveSurferOfflineAudioContext||(window.WaveSurferOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,c)),window.WaveSurferOfflineAudioContext}},{key:"init",value:function(){this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setState(R),this.setPlaybackRate(this.params.audioRate),this.setLength(0)}},{key:"disconnectFilters",value:function(){this.filters&&(this.filters.forEach(function(c){c&&c.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))}},{key:"setState",value:function(c){this.state!==this.states[c]&&(this.state=this.states[c],this.state.init.call(this))}},{key:"setFilter",value:function(){for(var c=arguments.length,T=new Array(c),w=0;w<c;w++)T[w]=arguments[w];this.setFilters(T)}},{key:"setFilters",value:function(c){this.disconnectFilters(),c&&c.length&&(this.filters=c,this.analyser.disconnect(),c.reduce(function(T,w){return T.connect(w),w},this.analyser).connect(this.gainNode))}},{key:"createScriptNode",value:function(){this.params.audioScriptProcessor?this.scriptNode=this.params.audioScriptProcessor:this.ac.createScriptProcessor?this.scriptNode=this.ac.createScriptProcessor(y.scriptBufferSize):this.scriptNode=this.ac.createJavaScriptNode(y.scriptBufferSize),this.scriptNode.connect(this.ac.destination)}},{key:"addOnAudioProcess",value:function(){var c=this;this.scriptNode.onaudioprocess=function(){var T=c.getCurrentTime();T>=c.getDuration()?(c.setState(B),c.fireEvent("pause")):T>=c.scheduledPause?c.pause():c.state===c.states[I]&&c.fireEvent("audioprocess",T)}}},{key:"removeOnAudioProcess",value:function(){this.scriptNode.onaudioprocess=null}},{key:"createAnalyserNode",value:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)}},{key:"createVolumeNode",value:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)}},{key:"setSinkId",value:function(c){return c?(this.sinkAudioElement||(this.sinkAudioElement=new window.Audio,this.sinkAudioElement.autoplay=!0),this.sinkAudioElement.setSinkId?(this.sinkStreamDestination||(this.sinkStreamDestination=this.ac.createMediaStreamDestination()),this.gainNode.disconnect(),this.gainNode.connect(this.sinkStreamDestination),this.sinkAudioElement.srcObject=this.sinkStreamDestination.stream,this.sinkAudioElement.setSinkId(c)):Promise.reject(new Error("setSinkId is not supported in your browser"))):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"setVolume",value:function(c){this.gainNode.gain.setValueAtTime(c,this.ac.currentTime)}},{key:"getVolume",value:function(){return this.gainNode.gain.value}},{key:"decodeArrayBuffer",value:function(c,T,w){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac&&this.ac.sampleRate?this.ac.sampleRate:44100)),"webkitAudioContext"in window?this.offlineAc.decodeAudioData(c,function(u){return T(u)},w):this.offlineAc.decodeAudioData(c).then(function(u){return T(u)}).catch(function(u){return w(u)})}},{key:"setPeaks",value:function(c,T){T!=null&&(this.explicitDuration=T),this.peaks=c}},{key:"setLength",value:function(c){if(!(this.mergedPeaks&&c==2*this.mergedPeaks.length-1+2)){this.splitPeaks=[],this.mergedPeaks=[];var T=this.buffer?this.buffer.numberOfChannels:1,w;for(w=0;w<T;w++)this.splitPeaks[w]=[],this.splitPeaks[w][2*(c-1)]=0,this.splitPeaks[w][2*(c-1)+1]=0;this.mergedPeaks[2*(c-1)]=0,this.mergedPeaks[2*(c-1)+1]=0}}},{key:"getPeaks",value:function(c,T,w){if(this.peaks)return this.peaks;if(!this.buffer)return[];if(T=T||0,w=w||c-1,this.setLength(c),!this.buffer)return this.params.splitChannels?this.splitPeaks:this.mergedPeaks;if(!this.buffer.length){var u=this.createBuffer(1,4096,this.sampleRate);this.buffer=u.buffer}var _=this.buffer.length/c,H=~~(_/10)||1,V=this.buffer.numberOfChannels,F;for(F=0;F<V;F++){var G=this.splitPeaks[F],z=this.buffer.getChannelData(F),U=void 0;for(U=T;U<=w;U++){var re=~~(U*_),fe=~~(re+_),ee=z[re],we=ee,oe=void 0;for(oe=re;oe<fe;oe+=H){var ve=z[oe];ve>we&&(we=ve),ve<ee&&(ee=ve)}G[2*U]=we,G[2*U+1]=ee,(F==0||we>this.mergedPeaks[2*U])&&(this.mergedPeaks[2*U]=we),(F==0||ee<this.mergedPeaks[2*U+1])&&(this.mergedPeaks[2*U+1]=ee)}}return this.params.splitChannels?this.splitPeaks:this.mergedPeaks}},{key:"getPlayedPercents",value:function(){return this.state.getPlayedPercents.call(this)}},{key:"disconnectSource",value:function(){this.source&&this.source.disconnect()}},{key:"destroyWebAudio",value:function(){this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect(),this.params.closeAudioContext&&(typeof this.ac.close=="function"&&this.ac.state!="closed"&&this.ac.close(),this.ac=null,this.params.audioContext?this.params.audioContext=null:window.WaveSurferAudioContext=null,window.WaveSurferOfflineAudioContext=null),this.sinkStreamDestination&&(this.sinkAudioElement.pause(),this.sinkAudioElement.srcObject=null,this.sinkStreamDestination.disconnect(),this.sinkStreamDestination=null)}},{key:"destroy",value:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.destroyed=!0,this.destroyWebAudio()}},{key:"load",value:function(c){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=c,this.createSource()}},{key:"createSource",value:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.setPlaybackRate(this.playbackRate),this.source.buffer=this.buffer,this.source.connect(this.analyser)}},{key:"resumeAudioContext",value:function(){this.ac.state=="suspended"&&this.ac.resume&&this.ac.resume()}},{key:"isPaused",value:function(){return this.state!==this.states[I]}},{key:"getDuration",value:function(){return this.explicitDuration?this.explicitDuration:this.buffer?this.buffer.duration:0}},{key:"seekTo",value:function(c,T){if(!!this.buffer)return this.scheduledPause=null,c==null&&(c=this.getCurrentTime(),c>=this.getDuration()&&(c=0)),T==null&&(T=this.getDuration()),this.startPosition=c,this.lastPlay=this.ac.currentTime,this.state===this.states[B]&&this.setState(R),{start:c,end:T}}},{key:"getPlayedTime",value:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate}},{key:"play",value:function(c,T){if(!!this.buffer){this.createSource();var w=this.seekTo(c,T);c=w.start,T=w.end,this.scheduledPause=T,this.source.start(0,c),this.resumeAudioContext(),this.setState(I),this.fireEvent("play")}}},{key:"pause",value:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime();try{this.source&&this.source.stop(0)}catch{}this.setState(R),this.fireEvent("pause")}},{key:"getCurrentTime",value:function(){return this.state.getCurrentTime.call(this)}},{key:"getPlaybackRate",value:function(){return this.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.source&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.ac.currentTime)}},{key:"setPlayEnd",value:function(c){this.scheduledPause=c}}]),y}(p.Observer);o.default=E,N(E,"scriptBufferSize",256),s.exports=o.default},"./node_modules/debounce/index.js":s=>{function o(l,h,p){var $,b,v,P,A;h==null&&(h=100);function k(){var S=Date.now()-P;S<h&&S>=0?$=setTimeout(k,h-S):($=null,p||(A=l.apply(v,b),v=b=null))}var C=function(){v=this,b=arguments,P=Date.now();var S=p&&!$;return $||($=setTimeout(k,h)),S&&(A=l.apply(v,b),v=b=null),A};return C.clear=function(){$&&(clearTimeout($),$=null)},C.flush=function(){$&&(A=l.apply(v,b),v=b=null,clearTimeout($),$=null)},C}o.debounce=o,s.exports=o}},n={};function a(s){var o=n[s];if(o!==void 0)return o.exports;var l=n[s]={exports:{}};return r[s](l,l.exports,a),l.exports}var i=a("./src/wavesurfer.js");return i})())})(Ao);var yf=Xc(Ao.exports);const $f=()=>{const e=j(ue),{curAudioState:t,curIdx:r,playList:n,elementRefs:a}=j(Z),[i,s]=x.useState(!1),o=x.useCallback(()=>{if(!(a!=null&&a.waveformInst)||!a.trackCurTimeEl)return;const{trackCurTimeEl:b}=a,v=a.waveformInst.getCurrentTime();b.innerText=Hn(v)},[a]),[l,h]=x.useState();x.useEffect(()=>{!(a!=null&&a.waveformInst)||!n[r]||(l==null?void 0:l.src)!==n[r].src&&(h(n[r]),s(!1),a.waveformInst.load(n[r].src),a.waveformInst.on("ready",()=>{Fn(a,a.waveformInst.getDuration()),s(!0),a.waveformInst.on("seek",()=>o())}))},[n,r,a==null?void 0:a.waveformInst,l,a,o]),x.useEffect(()=>{!i||!(a!=null&&a.waveformInst)||(t.isPlaying?a.waveformInst.play():a.waveformInst.pause())},[i,t.isPlaying,a==null?void 0:a.waveformInst]);const[p,$]=x.useState(!1);return x.useEffect(()=>{if(!(a!=null&&a.waveformInst)||(a.waveformInst.on("finish",()=>$(!0)),!p))return;(()=>{var v,P;if($(!1),t.repeatType==="ONE"){(v=a.waveformInst)==null||v.seekTo(0),(P=a.waveformInst)==null||P.play();return}e({type:"NEXT_AUDIO"})})()},[a==null?void 0:a.waveformInst,e,t.repeatType,p]),x.useEffect(()=>{if(!i)return;const b=setInterval(o,1e3);return t.isPlaying||clearInterval(b),()=>clearInterval(b)},[t.isPlaying,o,i]),x.useEffect(()=>{if(!(!(a!=null&&a.waveformInst)||!i)){if(t.muted){a.waveformInst.setVolume(0),a.waveformInst.setMute(!0);return}a.waveformInst.setVolume(t.volume)}},[t.volume,a==null?void 0:a.waveformInst,t.muted,i]),null},wf=()=>{const e=j(ue),{elementRefs:t}=j(Z),r=bf({progressColor:"--rm-audio-player-waveform-bar",waveColor:"--rm-audio-player-waveform-background"});return x.useEffect(()=>{if((t==null?void 0:t.waveformInst)||!r.current)return;const n=yf.create({barWidth:1,cursorWidth:2,container:"#rm-waveform",backend:"WebAudio",height:80,progressColor:`${r.current.progressColor}`,responsive:!0,waveColor:`${r.current.waveColor}`,cursorColor:"var(--rm-audio-player-waveform-cursor)"});e({type:"SET_ELEMENT_REFS",elementRefs:{waveformInst:n}})},[t==null?void 0:t.waveformInst,e,r.current]),$f(),null},Ef=()=>{const{curPlayId:e,playList:t,activeUI:r}=j(Z);return t.find(i=>i.id===e)&&t.length!==0?r.progress==="waveform"?L(wf,{}):L(gf,{}):null},At=ae.default.button`
|
|
154
56
|
display: flex;
|
|
155
57
|
width: 20px;
|
|
156
58
|
height: 100%;
|
|
@@ -167,9 +69,9 @@ button{
|
|
|
167
69
|
opacity: 0.5;
|
|
168
70
|
transition: all 0.2s ease-out;
|
|
169
71
|
}
|
|
170
|
-
`;var To={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wa=W.default.createContext&&W.default.createContext(To),Ie=globalThis&&globalThis.__assign||function(){return Ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ie.apply(this,arguments)},
|
|
72
|
+
`;var To={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wa=W.default.createContext&&W.default.createContext(To),Ie=globalThis&&globalThis.__assign||function(){return Ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ie.apply(this,arguments)},xf=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Co(e){return e&&e.map(function(t,r){return W.default.createElement(t.tag,Ie({key:r},t.attr),Co(t.child))})}function me(e){return function(t){return W.default.createElement(Pf,Ie({attr:Ie({},e.attr)},t),Co(e.child))}}function Pf(e){var t=function(r){var n=e.attr,a=e.size,i=e.title,s=xf(e,["attr","size","title"]),o=a||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),W.default.createElement("svg",Ie({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:l,style:Ie(Ie({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&W.default.createElement("title",null,i),e.children)};return wa!==void 0?W.default.createElement(wa.Consumer,null,function(r){return t(r)}):t(To)}function Af(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"}}]})(e)}function Tf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"}}]})(e)}function Cf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 10h11v2H3zM3 6h11v2H3zM3 14h7v2H3zM16 13v8l6-4z"}}]})(e)}const de=({render:e,customIcon:t})=>L(ze,{children:t!=null?t:e}),Sf=ae.default(At)`
|
|
171
73
|
width: 35px;
|
|
172
|
-
`,kf=()=>{const{curAudioState:e,customIcons:t}=j(
|
|
74
|
+
`,kf=()=>{const{curAudioState:e,customIcons:t}=j(Z),r=j(ue),n=()=>r({type:"SET_PlAY_STATE"}),a=x.useMemo(()=>e.isPlaying?L(de,{render:L(Af,{}),customIcon:t==null?void 0:t.pause}):L(de,{render:L(Tf,{}),customIcon:t==null?void 0:t.play}),[e.isPlaying,t==null?void 0:t.pause,t==null?void 0:t.play]);return L(Sf,{onClick:n,className:"play-button",children:a})};function Of(e){return me({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"}},{tag:"path",attr:{d:"M7 8l4-3v6z"}},{tag:"path",attr:{d:"M5 5h2v6h-2v-6z"}}]})(e)}function Rf(e){return me({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c4.418 0 8 3.582 8 8s-3.582 8-8 8-8-3.582-8-8 3.582-8 8-8zM8 14.5c3.59 0 6.5-2.91 6.5-6.5s-2.91-6.5-6.5-6.5-6.5 2.91-6.5 6.5 2.91 6.5 6.5 6.5z"}},{tag:"path",attr:{d:"M9 8l-4-3v6z"}},{tag:"path",attr:{d:"M11 5h-2v6h2v-6z"}}]})(e)}const Ea=({type:e,visible:t})=>{const{customIcons:r}=j(Z),n=j(ue),a=()=>{e==="next"&&n({type:"NEXT_AUDIO"}),e==="prev"&&n({type:"PREV_AUDIO"})},i=x.useMemo(()=>e==="next"?L(de,{render:L(Rf,{}),customIcon:r==null?void 0:r.next}):e==="prev"?L(de,{render:L(Of,{}),customIcon:r==null?void 0:r.prev}):null,[r==null?void 0:r.next,r==null?void 0:r.prev,e]);return t?L(At,{onClick:a,className:"prev-n-next-button",children:i}):null};function _f(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 4l3 3l-3 3"}},{tag:"path",attr:{d:"M18 20l3 -3l-3 -3"}},{tag:"path",attr:{d:"M3 7h3a5 5 0 0 1 5 5a5 5 0 0 0 5 5h5"}},{tag:"path",attr:{d:"M21 7h-5a4.978 4.978 0 0 0 -2.998 .998m-4.002 8.003a4.984 4.984 0 0 1 -3 .999h-3"}}]})(e)}function Mf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3c0 -1.336 .873 -2.468 2.08 -2.856m3.92 -.144h10m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -.133 .886m-1.99 1.984a3 3 0 0 1 -.877 .13h-13m3 3l-3 -3l3 -3"}},{tag:"path",attr:{d:"M3 3l18 18"}}]})(e)}function Lf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"}},{tag:"path",attr:{d:"M11 11l1 -1v4"}}]})(e)}function If(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"}}]})(e)}function Nf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M15 8a5 5 0 0 1 0 8"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}}]})(e)}function xa(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}},{tag:"path",attr:{d:"M16 10l4 4m0 -4l-4 4"}}]})(e)}function Df(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M15 8a5 5 0 0 1 0 8"}},{tag:"path",attr:{d:"M17.7 5a9 9 0 0 1 0 14"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}}]})(e)}const Bf=()=>{const{curAudioState:e,customIcons:t}=j(Z),r=j(ue),n=x.useCallback(()=>{switch(e.repeatType){case"ALL":r({type:"SET_REPEAT_TYPE",repeatType:"ONE"});break;case"ONE":r({type:"SET_REPEAT_TYPE",repeatType:"NONE"});break;case"NONE":r({type:"SET_REPEAT_TYPE",repeatType:"SHUFFLE"});break;case"SHUFFLE":r({type:"SET_REPEAT_TYPE",repeatType:"ALL"});break}},[e.repeatType,r]),a=x.useMemo(()=>{switch(e.repeatType){case"ALL":return L(de,{render:L(If,{}),customIcon:t==null?void 0:t.repeatAll});case"ONE":return L(de,{render:L(Lf,{}),customIcon:t==null?void 0:t.repeatOne});case"NONE":return L(de,{render:L(Mf,{}),customIcon:t==null?void 0:t.repeatNone});case"SHUFFLE":return L(de,{render:L(_f,{}),customIcon:t==null?void 0:t.repeatShuffle})}},[e.repeatType,t==null?void 0:t.repeatAll,t==null?void 0:t.repeatNone,t==null?void 0:t.repeatOne,t==null?void 0:t.repeatShuffle]);return L(At,{onClick:n,className:"repeat-button",children:a})},Hf=({isOpen:e})=>{const{customIcons:t}=j(Z);return L(At,{children:L(de,{render:L(Cf,{size:"100%",color:e?"var(--rm-audio-player-sortable-list-button-active)":void 0}),customIcon:t==null?void 0:t.playList})})},So=x.forwardRef((e,t)=>{const{curAudioState:r,customIcons:n}=j(Z),a=j(ue),i=x.useCallback(()=>a({type:"SET_MUTED",muted:!r.muted}),[a,r.muted]),s=x.useMemo(()=>{const o={size:"100%"};if(r.muted)return L(de,{render:L(xa,{...o}),customIcon:n==null?void 0:n.volumeMuted});switch((h=>{if(h===0)return"mute";if(h<=.5)return"low";if(h>.5)return"high"})(r.volume)){case"mute":return L(de,{render:L(xa,{...o}),customIcon:n==null?void 0:n.volumeMuted});case"low":return L(de,{render:L(Nf,{...o}),customIcon:n==null?void 0:n.volumeHalf});case"high":return L(de,{render:L(Df,{...o}),customIcon:n==null?void 0:n.volumeFull});default:return null}},[r.muted,r.volume,n==null?void 0:n.volumeMuted,n==null?void 0:n.volumeFull,n==null?void 0:n.volumeHalf]);return L(At,{onClick:i,className:"volume-trigger-container",ref:t,children:s})});So.displayName="VolumeTriggerBtn";const Vn=x.createContext(null),ko=be.keyframes({"0%":{opacity:0,transform:"scale(0.95)"},"60%":{opacity:.75,transform:"scale(1.05)"},"100%":{opacity:1,transform:"scale(1)"}}),Oo=be.keyframes({"0%":{opacity:1,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(0.5)"}}),Un=({visible:e,name:t,leaveTime:r,enterTime:n,clearTime:a,onExited:i,onEntered:s,children:o})=>{const[l,h]=x.useState(""),[p,$]=x.useState(!1);return x.useLayoutEffect(()=>{const b=e?"enter":"leave",v=e?n:r;e&&!p&&$(!0),h(`${t}-${b}`);const P=setTimeout(()=>{h(`${t}-${b} ${t}-${b}-active`),b==="leave"?i==null||i():s==null||s(),clearTimeout(P)},v),A=setTimeout(()=>{e||(h(t),$(!1)),clearTimeout(A)},v+a);return()=>{clearTimeout(P),clearTimeout(A)}},[e,p]),p?x.cloneElement(o,{className:`${o.props.className} ${l}`}):null},Ro=(e,t)=>{x.useEffect(()=>{const r=n=>{const a=e.current,{target:i}=n;!n||!a||a.contains(i)||t(n)};return document.addEventListener("click",r),()=>document.removeEventListener("click",r)},[e,t])},vt=({outboundClickActive:e=!1,placement:t="bottom",children:r,isOpen:n,onOpenChange:a})=>{const i=x.useRef(null),[s,o]=W.default.Children.toArray(r),[l,h]=x.useState(!1);return Ro(i,()=>{!e||(h(!1),a&&a(!1))}),x.useLayoutEffect(()=>{n!==void 0&&h(n)},[n]),L(Ff,{className:"drawer-container",ref:i,children:L(Vn.Provider,{value:{isOpen:l,setIsOpen:h,onOpenChange:a},children:le(ze,{children:[t==="top"&&o,s,t==="bottom"&&o]})})})},Ff=ae.default.div`
|
|
173
75
|
position: relative;
|
|
174
76
|
min-width: 20px;
|
|
175
77
|
min-height: 20px;
|
|
@@ -192,15 +94,16 @@ button{
|
|
|
192
94
|
.drawer-content-wrapper-leave {
|
|
193
95
|
animation: ${Oo} 0.1s ease-in forwards;
|
|
194
96
|
}
|
|
195
|
-
`,Wf=({children:e,isWithAnimation:t=!0})=>{const{isOpen:r,setIsOpen:n}=j(Vn),a=()=>n(!1),i=()=>n(!0),s=
|
|
97
|
+
`,Wf=({children:e,isWithAnimation:t=!0})=>{const{isOpen:r,setIsOpen:n}=j(Vn),a=()=>n(!1),i=()=>n(!0),s=x.useMemo(()=>L("div",{className:"drawer-content-container",children:e}),[e]);return t?L(Un,{visible:r,name:"drawer-content-wrapper",enterTime:20,leaveTime:60,clearTime:300,onExited:a,onEntered:i,children:s}):s},Vf=({children:e})=>{const{isOpen:t,setIsOpen:r,onOpenChange:n}=j(Vn);return L("div",{className:"drawer-trigger-wrapper",onClick:()=>{r(!t),n&&n(!t)},children:e})};vt.Content=Wf;vt.Trigger=Vf;const cn=({children:e})=>L(Uf,{className:"sortable-list-container",children:e}),Uf=ae.default.ul`
|
|
196
98
|
ul,
|
|
197
99
|
li {
|
|
198
100
|
list-style-type: none;
|
|
199
101
|
}
|
|
200
102
|
cursor: pointer;
|
|
201
|
-
`;function Fe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function kr(e){return e&&e.__esModule?e.default:e}var ur={};Fe(ur,"repeat",()=>zf);Fe(ur,"minmax",()=>Xf);Fe(ur,"fitContent",()=>Kf);Fe(ur,"Grid",()=>_o);const jf={...er,autoFlow:["gridAutoFlow",ne],autoColumns:["gridAutoColumns",Ue],autoRows:["gridAutoRows",Ue],areas:["gridTemplateAreas",Yf],columns:["gridTemplateColumns",fn],rows:["gridTemplateRows",fn],gap:["gap",Y],rowGap:["rowGap",Y],columnGap:["columnGap",Y],justifyItems:["justifyItems",ne],justifyContent:["justifyContent",ne],alignItems:["alignItems",ne],alignContent:["alignContent",ne]};function Gf(e,t){let{children:r,...n}=e,{styleProps:a}=Ae(n,jf);a.style.display="grid";let i=De(t);return W.default.createElement("div",{...
|
|
202
|
-
`)}function Ue(e){return/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(e)?e:Y(e)}function fn(e){return Array.isArray(e)?e.map(Ue).join(" "):Ue(e)}const _o=
|
|
203
|
-
border: 2px solid transparent;
|
|
103
|
+
`;function Fe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function kr(e){return e&&e.__esModule?e.default:e}var ur={};Fe(ur,"repeat",()=>zf);Fe(ur,"minmax",()=>Xf);Fe(ur,"fitContent",()=>Kf);Fe(ur,"Grid",()=>_o);const jf={...er,autoFlow:["gridAutoFlow",ne],autoColumns:["gridAutoColumns",Ue],autoRows:["gridAutoRows",Ue],areas:["gridTemplateAreas",Yf],columns:["gridTemplateColumns",fn],rows:["gridTemplateRows",fn],gap:["gap",Y],rowGap:["rowGap",Y],columnGap:["columnGap",Y],justifyItems:["justifyItems",ne],justifyContent:["justifyContent",ne],alignItems:["alignItems",ne],alignContent:["alignContent",ne]};function Gf(e,t){let{children:r,...n}=e,{styleProps:a}=Ae(n,jf);a.style.display="grid";let i=De(t);return W.default.createElement("div",{...Pe(n),...a,ref:i},r)}function zf(e,t){return`repeat(${e}, ${fn(t)})`}function Xf(e,t){return`minmax(${Ue(e)}, ${Ue(t)})`}function Kf(e){return`fit-content(${Ue(e)})`}function Yf(e){return e.map(t=>`"${t}"`).join(`
|
|
104
|
+
`)}function Ue(e){return/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(e)?e:Y(e)}function fn(e){return Array.isArray(e)?e.map(Ue).join(" "):Ue(e)}const _o=x.forwardRef(Gf);var qf={};Fe(qf,"Flex",()=>jn);var tt={};Fe(tt,"flex-container",()=>dn,e=>dn=e);Fe(tt,"flex",()=>hn,e=>hn=e);Fe(tt,"flex-gap",()=>pn,e=>pn=e);var dn,hn,pn;dn="flex-container_e15493";hn="flex_e15493";pn="flex-gap_e15493";const Jf={direction:["flexDirection",ne],wrap:["flexWrap",Zf],justifyContent:["justifyContent",Or],alignItems:["alignItems",Or],alignContent:["alignContent",Or]};function Qf(e,t){let{children:r,...n}=e,a=_n(),i=(a==null?void 0:a.matchedBreakpoints)||["base"],{styleProps:s}=Ae(n),{styleProps:o}=Ae(n,Jf),l=De(t),h=at();if((e.gap||e.rowGap||e.columnGap)&&(h||!ed())){let $={...o.style,"--column-gap":e.columnGap!=null?We(e.columnGap,i):void 0,"--row-gap":e.rowGap!=null?We(e.rowGap,i):void 0,"--gap":e.gap!=null?We(e.gap,i):void 0};return W.default.createElement("div",{...Pe(n),...s,className:It(kr(tt),"flex-container",s.className),ref:l},W.default.createElement("div",{className:It(kr(tt),"flex","flex-gap"),style:$},r))}let p={...s.style,...o.style};return e.gap!=null&&(p.gap=We(e.gap,i)),e.columnGap!=null&&(p.columnGap=We(e.columnGap,i)),e.rowGap!=null&&(p.rowGap=We(e.rowGap,i)),W.default.createElement("div",{...Pe(n),className:It(kr(tt),"flex",s.className),style:p,ref:l},r)}function Or(e){return e==="start"?"flex-start":e==="end"?"flex-end":e}function Zf(e){return typeof e=="boolean"?e?"wrap":"nowrap":e}let Mt=null;function ed(){if(Mt!=null)return Mt;if(typeof document=="undefined")return!1;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),Mt=e.scrollHeight===1,e.parentNode.removeChild(e),Mt}const jn=x.forwardRef(Qf),td=({index:e,dragStartIdx:t,listData:r,draggable:n=!0,onDragStart:a,onDragOver:i,onDrop:s,onClick:o})=>({draggable:n,onDragStart:l=>{l.stopPropagation(),l.currentTarget.classList.add("dragstart"),a&&a(l)},onDragEnd:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragstart")},onDragEnter:l=>{l.stopPropagation(),l.currentTarget.classList.add("dragover")},onDragLeave:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragover")},onDragOver:l=>{l.preventDefault(),l.stopPropagation(),i&&i(l)},onDrop:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragover");const h=[...r],p=r[t];h.splice(t,1);const $=(t<e?[...h.slice(0,e),p,...h.slice(e,h.length)]:[...h.slice(0,e),p,...h.slice(e,h.length)]).map((b,v)=>({...b,index:v}));s&&s(l,$)},onClick:l=>{l.stopPropagation(),o&&o(l)}}),rd=e=>{const{children:t,...r}=e,n=td(r);return L(nd,{className:"list-item-root-container",...n,children:L(jn,{alignItems:"center",children:t})})},nd=ae.default.li`
|
|
105
|
+
border-top: 2px solid transparent;
|
|
106
|
+
border-bottom: 2px solid transparent;
|
|
204
107
|
transition: all 0.3s ease-in-out;
|
|
205
108
|
|
|
206
109
|
& * {
|
|
@@ -220,7 +123,7 @@ button{
|
|
|
220
123
|
Copyright (c) 2018 Jed Watson.
|
|
221
124
|
Licensed under the MIT License (MIT), see
|
|
222
125
|
http://jedwatson.github.io/classnames
|
|
223
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var o=r.apply(null,i);o&&n.push(o)}}else if(s==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&n.push(l);else n.push(i.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Mo);var ad=Mo.exports;const id=({data:e})=>{const{curPlayId:t,coverImgsCss:r}=j(
|
|
126
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var o=r.apply(null,i);o&&n.push(o)}}else if(s==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&n.push(l);else n.push(i.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Mo);var ad=Mo.exports;const id=({data:e})=>{const{curPlayId:t,coverImgsCss:r}=j(Z);return L(od,{className:ad("list-item-container",{curPlayed:t===e.id}),children:le("div",{className:"list-item-contents-wrapper",children:[L("div",{className:"album-cover-wrapper",children:L("img",{src:e.img,alt:"",style:r==null?void 0:r.listThumbnail})}),le("div",{className:"album-info-wrapper",children:[e.writer&&L("span",{className:"writer",children:e.writer}),e.name&&L("span",{className:"title",children:e.name}),e.description&&L("div",{className:"description",children:e.description})]})]})})},od=ae.default.div`
|
|
224
127
|
width: 100%;
|
|
225
128
|
height: 100%;
|
|
226
129
|
display: flex;
|
|
@@ -255,7 +158,7 @@ button{
|
|
|
255
158
|
overflow: hidden;
|
|
256
159
|
}
|
|
257
160
|
}
|
|
258
|
-
`,sd=({setIsOpen:e})=>{const{playList:t,activeUI:r}=j(
|
|
161
|
+
`,sd=({setIsOpen:e})=>{const{playList:t,activeUI:r}=j(Z),n=j(ue),[a,i]=x.useState(0),s=x.useCallback(o=>{n({type:"SET_CURRENT_INDEX",currentIndex:o,currentAudioId:t[o].id})},[n,t]);return{cssTransitionEventProps:{onExited:()=>e(!1),onEntered:()=>e(!0)},sortableItemEventProps:{draggable:r.playList!=="unSortable"||r.all,dragStartIdx:a,onDragStart:o=>i(o),onDrop:(o,l)=>n({type:"UPDATE_PLAY_LIST",playList:l}),onClick:o=>s(o)}}},ld=({isOpen:e,setIsOpen:t})=>{const{playList:r}=j(Z),{cssTransitionEventProps:n,sortableItemEventProps:a}=sd({setIsOpen:t}),{onClick:i,onDragStart:s,...o}=a;return r.length!==0?Pa.default.createPortal(L(Un,{visible:e,name:"playlist-content",enterTime:20,leaveTime:20,clearTime:300,...n,children:L(ud,{className:"play-list-container",children:L(cn,{children:r.map((l,h)=>L(cn.Item,{index:h,listData:r,onClick:()=>i(h),onDragStart:()=>s(h),...o,children:L(id,{data:l})},`sortable-item-${h}`))})})}),document.querySelector(".sortable-play-list")):L(ze,{})},ud=ae.default.div`
|
|
259
162
|
height: 20vh;
|
|
260
163
|
transition-property: max-height, opacity;
|
|
261
164
|
overflow-x: hidden;
|
|
@@ -281,7 +184,7 @@ button{
|
|
|
281
184
|
transition-duration: 0.25s;
|
|
282
185
|
transition-timing-function: 0.2s cubic-bezier(0.66, -0.41, 1, 1);
|
|
283
186
|
}
|
|
284
|
-
`,cd=()=>{const[e,t]=
|
|
187
|
+
`,cd=()=>{const[e,t]=x.useState(!1);return le(vt,{onOpenChange:t,children:[L(vt.Trigger,{children:L(Hf,{isOpen:e})}),L(vt.Content,{children:L(ld,{isOpen:e,setIsOpen:t})})]})},fd=()=>{const{elementRefs:e}=j(Z),[t,r]=x.useState(!1),n=x.useCallback(a=>{if(!(e!=null&&e.audioEl))return;const{clientX:i}=a,{clientWidth:s}=a.currentTarget,o=a.currentTarget.getBoundingClientRect(),p=(i-o.x)/s*e.audioEl.duration;e.audioEl.currentTime=p},[e==null?void 0:e.audioEl]);return{onMouseDown:()=>r(!0),onMouseUp:()=>r(!1),onMouseLeave:()=>r(!1),onMouseMove:t?n:void 0,onClick:n}},dd=()=>{const e=x.useRef(null),t=x.useRef(null),r=x.useRef(null),n=j(ue),a=fd();return x.useEffect(()=>{if(e.current&&t.current&&r.current){const i=e.current,s=t.current,o=r.current;n({type:"SET_ELEMENT_REFS",elementRefs:{progressBarEl:i,progressValueEl:s,progressHandleEl:o}})}},[r,e,t,n]),le(hd,{className:"bar-progress-wrapper",...a,children:[L("div",{className:"rm-player-progress-bar",ref:e,children:L("div",{className:"rm-player-progress",ref:t})}),L("div",{className:"rm-player-progress-handle",ref:r})]})},hd=ae.default.div`
|
|
285
188
|
display: flex;
|
|
286
189
|
width: 100%;
|
|
287
190
|
height: 18px;
|
|
@@ -332,7 +235,7 @@ button{
|
|
|
332
235
|
`,md=()=>L(pd,{className:"waveform-wrapper",children:L("div",{id:"rm-waveform"})}),vd=ae.default.div`
|
|
333
236
|
min-width: 200px;
|
|
334
237
|
padding: 0 10px;
|
|
335
|
-
`,gd=()=>{const{activeUI:e}=j(
|
|
238
|
+
`,gd=()=>{const{activeUI:e}=j(Z),t=x.useMemo(()=>e.progress==="waveform"?L(md,{}):L(dd,{}),[e.progress]);return L(vd,{className:"progress-container",children:t})},ge=_o,Lo=x.forwardRef(({children:e,visible:t=!0,...r},n)=>L(Wn,{justifySelf:"center",padding:t?"0 5px":void 0,ref:n,...r,children:t&&e}));Lo.displayName="GridItem";ge.Item=Lo;const bd=({placement:e})=>{const t=x.useRef(null),{curAudioState:r}=j(Z),n=j(ue),a=x.useCallback(i=>{i.stopPropagation(),i.preventDefault(),r.muted&&n({type:"SET_MUTED",muted:!1});const{value:s}=i.target,o=parseFloat(s);n({type:"SET_VOLUME",volume:o})},[r.muted,n]);return L(yd,{contentPlacement:e,volumeValue:r.volume*100,ref:t,className:"volume-content-container",children:L("div",{className:"volume-panel-wrapper",children:L("input",{className:"volume-slider-input",type:"range",style:{cursor:"pointer"},defaultValue:r.volume,onChange:a,min:"0",max:"1",step:"0.01"})})})},yd=ae.default.div`
|
|
336
239
|
${({contentPlacement:e,volumeValue:t})=>be.css`
|
|
337
240
|
--rm-audio-player-volume-value: ${t}%;
|
|
338
241
|
position: relative;
|
|
@@ -481,7 +384,7 @@ button{
|
|
|
481
384
|
}
|
|
482
385
|
}
|
|
483
386
|
`}
|
|
484
|
-
`,Io=
|
|
387
|
+
`,Io=x.createContext(null),No=({clickArea:e,triggerType:t,isOpen:r,setIsOpen:n,onOpenChange:a})=>{const i=x.useRef(),s=p=>{const $=()=>{clearTimeout(i.current),i.current=void 0},b=v=>{n(v),a&&a(v),$()};if($(),p){i.current=window.setTimeout(()=>b(!0),100);return}i.current=window.setTimeout(()=>b(!1),100)},o=p=>{t==="hover"&&s(p)};return{onClick:e==="content"?p=>{p.stopPropagation(),p.nativeEvent.stopImmediatePropagation()}:()=>{t==="click"&&(n(!r),a&&a(!r))},onKeyUp:()=>o(!0),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1)}},gt=({triggerType:e="click",outboundClickActive:t=!0,children:r,isOpen:n,placement:a="bottom",disabled:i=!1,onOpenChange:s})=>{const o=x.useRef(null),[l,h]=W.default.Children.toArray(r),[p,$]=x.useState(!1),b=No({setIsOpen:$,isOpen:p,triggerType:e,clickArea:"root"});return Ro(o,()=>t&&$(!1)),x.useLayoutEffect(()=>{n!==void 0&&$(n)},[n]),L($d,{className:"dropdown-container",ref:o,...b,children:L(Io.Provider,{value:{dropdownRef:o,placement:a,isOpen:p,setIsOpen:$,onOpenChange:s},children:le(ze,{children:[l,!i&&h]})})})},$d=ae.default.div`
|
|
485
388
|
position: relative;
|
|
486
389
|
display: flex;
|
|
487
390
|
align-items: center;
|
|
@@ -507,7 +410,7 @@ button{
|
|
|
507
410
|
.dropdown-content-wrapper-leave {
|
|
508
411
|
animation: ${Oo} 0.1s ease-in forwards;
|
|
509
412
|
}
|
|
510
|
-
`,wd=({children:e,isWithAnimation:t=!0,...r})=>{const{dropdownRef:n,placement:a,isOpen:i,setIsOpen:s}=j(Io),[o,l]=
|
|
413
|
+
`,wd=({children:e,isWithAnimation:t=!0,...r})=>{const{dropdownRef:n,placement:a,isOpen:i,setIsOpen:s}=j(Io),[o,l]=x.useState(),{onClick:h}=No({setIsOpen:s,isOpen:i,clickArea:"content"}),p=()=>s(!1),$=()=>s(!0);x.useEffect(()=>{n.current&&l({width:n.current.offsetWidth,height:n.current.offsetHeight})},[n.current]);const b=x.useMemo(()=>o?L(Ed,{...r,dropdownSize:o,placement:a,onClick:h,children:e}):null,[e,r,o,a,h]);return t?L(Un,{visible:i,name:"dropdown-content-wrapper",enterTime:20,leaveTime:60,clearTime:300,onExited:p,onEntered:$,children:b}):i?b:null},Ed=ae.default.div`
|
|
511
414
|
${({placement:e,dropdownSize:t})=>be.css`
|
|
512
415
|
position: absolute;
|
|
513
416
|
top: ${e==="bottom"?`${t.height}px`:void 0};
|
|
@@ -517,7 +420,7 @@ button{
|
|
|
517
420
|
left: ${e==="right"?`${t.width}px`:void 0};
|
|
518
421
|
right: ${e==="left"?`${t.width}px`:void 0};
|
|
519
422
|
`}
|
|
520
|
-
`,
|
|
423
|
+
`,xd=({children:e})=>L("div",{className:"dropdown-trigger-wrapper",children:e});gt.Content=wd;gt.Trigger=xd;const Pd=()=>{const e=x.useRef(null),{activeUI:{volumeSlider:t}}=j(Z),[r,n]=x.useState("bottom");return x.useEffect(()=>{e.current&&n((()=>e.current.getBoundingClientRect().top<window.innerHeight/2?"bottom":"top")())},[e.current]),le(gt,{placement:r,triggerType:"hover",disabled:!t,children:[L(gt.Trigger,{children:L(So,{ref:e})}),L(gt.Content,{children:L(bd,{placement:r})})]})},Ad=()=>{var r,n,a,i,s,o,l,h,p,$,b,v,P,A,k,C;const{interfacePlacement:e,activeUI:t}=j(Z);return le(ze,{children:[L(ge.Item,{gridArea:((r=e==null?void 0:e.itemCustomArea)==null?void 0:r.progress)||((n=e==null?void 0:e.templateArea)==null?void 0:n.progress)||pe.templateArea.progress,width:"100%",visible:Boolean(t.progress!==void 0?t.progress:t.all),children:L(gd,{})}),L(ge.Item,{gridArea:((a=e==null?void 0:e.itemCustomArea)==null?void 0:a.repeatType)||((i=e==null?void 0:e.templateArea)==null?void 0:i.repeatType)||pe.templateArea.repeatType,visible:Boolean((s=t.repeatType)!=null?s:t.all),children:L(Bf,{})}),L(ge.Item,{gridArea:((o=e==null?void 0:e.itemCustomArea)==null?void 0:o.playButton)||((l=e==null?void 0:e.templateArea)==null?void 0:l.playButton)||pe.templateArea.playButton,visible:Boolean((h=t.playButton)!=null?h:t.all),children:le(jn,{UNSAFE_className:"btn-wrapper",alignItems:"center",gap:"10px",children:[L(Ea,{type:"prev",visible:Boolean((p=t.prevNnext)!=null?p:t.all)}),L(kf,{}),L(Ea,{type:"next",visible:Boolean(($=t.prevNnext)!=null?$:t.all)})]})}),L(ge.Item,{gridArea:((b=e==null?void 0:e.itemCustomArea)==null?void 0:b.volume)||((v=e==null?void 0:e.templateArea)==null?void 0:v.volume)||pe.templateArea.volume,visible:Boolean((P=t.volume)!=null?P:t.all),children:L(Pd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.playList)||((k=e==null?void 0:e.templateArea)==null?void 0:k.playList)||pe.templateArea.playList,visible:Boolean((C=t.playList)!=null?C:t.all),children:L(cd,{})})]})},Td=ae.default.div`
|
|
521
424
|
display: flex;
|
|
522
425
|
align-items: center;
|
|
523
426
|
width: 100%;
|
|
@@ -526,7 +429,7 @@ button{
|
|
|
526
429
|
width: 50px;
|
|
527
430
|
height: 50px;
|
|
528
431
|
}
|
|
529
|
-
`,Cd=()=>{var n;const{playList:e,curIdx:t,coverImgsCss:r}=j(
|
|
432
|
+
`,Cd=()=>{var n;const{playList:e,curIdx:t,coverImgsCss:r}=j(Z);return L(Td,{className:"artwork-container",children:L("img",{src:(n=e[t])==null?void 0:n.img,alt:"",style:r==null?void 0:r.artwork})})},Sd=ae.default.div`
|
|
530
433
|
display: grid;
|
|
531
434
|
align-items: center;
|
|
532
435
|
row-gap: 5px;
|
|
@@ -537,18 +440,18 @@ button{
|
|
|
537
440
|
overflow: hidden;
|
|
538
441
|
}
|
|
539
442
|
.title {
|
|
540
|
-
font-size:
|
|
443
|
+
font-size: 16px;
|
|
541
444
|
}
|
|
542
445
|
.writer {
|
|
543
|
-
font-size:
|
|
446
|
+
font-size: 12px;
|
|
544
447
|
}
|
|
545
|
-
`,kd=()=>{const{playList:e,curIdx:t}=j(
|
|
448
|
+
`,kd=()=>{const{playList:e,curIdx:t}=j(Z),r=e[t];return L(Sd,{className:"track-info-container",children:r!=null&&r.customTrackInfo?r.customTrackInfo:le(ze,{children:[(r==null?void 0:r.name)&&L("span",{className:"title",children:r.name}),(r==null?void 0:r.writer)&&L("span",{className:"writer",children:r.writer})]})})},Od=()=>{const e=x.useRef(null),{activeUI:t}=j(Z),r=j(ue);return x.useEffect(()=>{if(e.current){const n=e.current;r({type:"SET_ELEMENT_REFS",elementRefs:{trackCurTimeEl:n}})}},[e.current,r]),L(_d,{type:t.trackTime,className:"track-time-current-container",children:L("span",{ref:e,className:"track-current-time",children:"00:00"})})},Rd=()=>{const e=x.useRef(null),{activeUI:t}=j(Z),r=j(ue);return x.useEffect(()=>{if(e.current){const n=e.current;r({type:"SET_ELEMENT_REFS",elementRefs:{trackDurationEl:n}})}},[e.current,r]),L(Md,{type:t.trackTime,className:"track-time-duration-container",children:L("span",{ref:e,className:"track-duration",children:"00:00"})})},Do=ae.default.div`
|
|
546
449
|
display: flex;
|
|
547
450
|
align-items: center;
|
|
548
451
|
justify-content: center;
|
|
549
452
|
min-height: 16px;
|
|
550
|
-
font-family: monospace;
|
|
551
|
-
font-size:
|
|
453
|
+
font-family: monospace !important;
|
|
454
|
+
font-size: 16px !important;
|
|
552
455
|
`,_d=ae.default(Do)`
|
|
553
456
|
${({type:e})=>be.css`
|
|
554
457
|
.track-current-time {
|
|
@@ -572,8 +475,15 @@ button{
|
|
|
572
475
|
}
|
|
573
476
|
`}
|
|
574
477
|
`}
|
|
575
|
-
`,Ld=()=>{var i,s,o,l,h,p
|
|
478
|
+
`,Ld=()=>{var i,s,o,l,h,p,$,b,v,P,A,k,C,S,O,g,D,M;const{interfacePlacement:e,playList:t,curIdx:r,activeUI:n}=j(Z),a=Boolean((h=(o=(i=t[r])==null?void 0:i.customTrackInfo)!=null?o:(s=t[r])==null?void 0:s.writer)!=null?h:(l=t[r])==null?void 0:l.name)&&Boolean((p=n.trackInfo)!=null?p:n.all);return le(ze,{children:[L(ge.Item,{gridArea:(($=e==null?void 0:e.itemCustomArea)==null?void 0:$.artwork)||((b=e==null?void 0:e.templateArea)==null?void 0:b.artwork)||pe.templateArea.artwork,visible:Boolean(((v=t[r])==null?void 0:v.img)&&((P=n.artwork)!=null?P:n.all)),children:L(Cd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.trackInfo)||((k=e==null?void 0:e.templateArea)==null?void 0:k.trackInfo)||pe.templateArea.trackInfo,visible:a,children:L(kd,{})}),L(ge.Item,{gridArea:((C=e==null?void 0:e.itemCustomArea)==null?void 0:C.trackTimeCurrent)||((S=e==null?void 0:e.templateArea)==null?void 0:S.trackTimeCurrent)||pe.templateArea.trackTimeCurrent,visible:Boolean((O=n.trackTime)!=null?O:n.all),children:L(Od,{})}),L(ge.Item,{gridArea:((g=e==null?void 0:e.itemCustomArea)==null?void 0:g.trackTimeDuration)||((D=e==null?void 0:e.templateArea)==null?void 0:D.trackTimeDuration)||pe.templateArea.trackTimeDuration,visible:Boolean((M=n.trackTime)!=null?M:n.all),children:L(Rd,{})})]})},Id=(e,t)=>{const r=e.all?Object.keys(pe.templateArea).filter(p=>(p==="trackTimeCurrent"||p==="trackTimeDuration")&&e.trackTime===!1?!1:e[p]!==void 0?e[p]:!0):Object.entries(e).filter(([,p])=>p).map(([p])=>p);(()=>{r.find(p=>p==="trackTime")&&(r.splice(r.indexOf("trackTime"),1),r.push("trackTimeCurrent"),r.push("trackTimeDuration"))})();const a={...pe.templateArea,...t},i=Object.entries(a).map(([p,$])=>{const[b,v]=$.split("-");return{key:p,row:Number(b.split("row")[1]),col:Number(v)}}).filter(({key:p})=>r.includes(p)).sort((p,$)=>p.col-$.col);let s=1;(()=>{for(let p=0;p<i.length;p++)s=Math.max(s,i[p].row)})();const l=new Array(s).fill("").map((p,$)=>{let b="";for(let v=0;v<i.length;v++)b+=` row${$+1}-${i[v].col}`,v===0&&(b=b.trim());return b}),h=new Array(s).fill("").map((p,$)=>{const b=window?window.innerWidth-100:1500;let v="";for(let P=0;P<i.length;P++){if(P===0&&(v=v.trim()),$===0&&i[P].key==="progress"){v+=" 1fr";continue}v+=` fit-content(${b}px)`}return v});return{gridAreas:l,gridColumns:h}},Nd=ae.default.div`
|
|
479
|
+
.interface-grid {
|
|
480
|
+
background: var(--rm-audio-player-interface-container);
|
|
481
|
+
}
|
|
576
482
|
.interface-grid {
|
|
577
483
|
padding: 0.5rem 10px;
|
|
578
484
|
}
|
|
579
|
-
|
|
485
|
+
.sortable-play-list {
|
|
486
|
+
background: var(--rm-audio-player-sortable-list);
|
|
487
|
+
box-shadow: -5px 2px 4px 0px rgb(0 0 0 / 4%) inset;
|
|
488
|
+
}
|
|
489
|
+
`,Dd=()=>{const{interfacePlacement:e,activeUI:t,playListPlacement:r}=j(Z),{gridAreas:n,gridColumns:a}=Id(t,e==null?void 0:e.templateArea);return le(Nd,{className:"interface-container",children:[r==="top"&&L("div",{className:"sortable-play-list"}),le(ge,{alignItems:"center",justifyContent:"center",areas:n,minHeight:"30px",columns:a,UNSAFE_className:"interface-grid",children:[L(Ld,{}),L(Ad,{})]}),r==="bottom"&&L("div",{className:"sortable-play-list"})]})},Bd=({playList:e,audioInitialState:t,placement:r={},activeUI:n,customIcons:a,coverImgsCss:i})=>{const s=j(ue);return x.useLayoutEffect(()=>{const{player:o,playList:l,interface:h}=r;s({type:"SET_PLACEMENTS",playerPlacement:o,playListPlacement:l,interfacePlacement:h})},[s,r]),x.useLayoutEffect(()=>{n&&s({type:"SET_ACTIVE_UI",activeUI:n})},[n,s]),x.useLayoutEffect(()=>{i&&s({type:"SET_COVER_IMGS_CSS",coverImgsCss:i})},[s,i]),x.useEffect(()=>{t&&s({type:"SET_INITIAL_AUDIO_STATE",audioInitialState:t})},[t,s]),x.useEffect(()=>{s({type:"UPDATE_PLAY_LIST",playList:e})},[s,e]),x.useEffect(()=>{a&&s({type:"SET_CUSTOM_ICONS",customIcons:a})},[a,s]),le(Wn,{id:"rm-audio-player",UNSAFE_className:"rm-audio-player-container",children:[L(Ef,{}),L(Dd,{})]})},Bo=({rootContainerProps:e,...t})=>L(rf,{children:le(ef,{rootContainerProps:e,children:[L(Bd,{...t}),L(nf,{})]})});exports.AudioPlayerWithProvider=Bo;exports.default=Bo;
|