1mpacto-react-ui 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/_screen.scss +10 -1
- package/dist/assets/_typography.scss +82 -1
- package/dist/assets/core.css +1 -1
- package/dist/assets/fontfamily.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.mjs +321 -303
- package/dist/package.json.d.ts +1 -1
- package/dist/src/components/Button/Button.config.d.ts +1 -1
- package/dist/src/components/ButtonIcon/ButtonIcon.config.d.ts +1 -1
- package/dist/src/components/NumberFormat/NumberFormat.d.ts +2 -1
- package/dist/src/components/NumberFormat/NumberFormat.stories.d.ts +21 -2
- package/dist/src/interfaces/components/Button/index.d.ts +1 -1
- package/dist/src/interfaces/components/ButtonIcon/index.d.ts +1 -1
- package/dist/src/interfaces/components/NumberFormat/index.d.ts +6 -5
- package/dist/src/utils/common.d.ts +3 -1
- package/dist/src/utils/formatBigNumber.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var yI=Object.defineProperty;var xI=(e,t,n)=>t in e?yI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>xI(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),I=require("react"),cu=require("react-dom");function Kx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=Kx(I),qx=Kx(cu);function Lr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ho(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Jx=6048e5,CI=864e5;let EI={};function Kd(){return EI}function go(e,t){var s,l,u,c;const n=Kd(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=Lr(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Zc(e){return go(e,{weekStartsOn:1})}function Qx(e){const t=Lr(e),n=t.getFullYear(),r=ho(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Zc(r),a=ho(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=Zc(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function a1(e){const t=Lr(e);return t.setHours(0,0,0,0),t}function o1(e){const t=Lr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function SI(e,t){const n=a1(e),r=a1(t),i=+n-o1(n),a=+r-o1(r);return Math.round((i-a)/CI)}function wI(e){const t=Qx(e),n=ho(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zc(n)}function II(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _I(e){if(!II(e)&&typeof e!="number")return!1;const t=Lr(e);return!isNaN(Number(t))}function DI(e){const t=Lr(e),n=ho(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const AI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},TI=(e,t,n)=>{let r;const i=AI[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Er(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$I={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kI={date:Er({formats:RI,defaultWidth:"full"}),time:Er({formats:BI,defaultWidth:"full"}),dateTime:Er({formats:$I,defaultWidth:"full"})},PI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FI=(e,t,n,r)=>PI[e];function Ut(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const NI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},LI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},VI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jI=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},WI={ordinalNumber:jI,era:Ut({values:NI,defaultWidth:"wide"}),quarter:Ut({values:MI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:LI,defaultWidth:"wide"}),day:Ut({values:OI,defaultWidth:"wide"}),dayPeriod:Ut({values:VI,defaultWidth:"wide",formattingValues:HI,defaultFormattingWidth:"wide"})};function Xt(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?GI(s,d=>d.test(o)):zI(s,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function zI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function GI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qd(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const UI=/^(\d+)(th|st|nd|rd)?/i,XI=/\d+/i,ZI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},YI={any:[/^b/i,/^(a|c)/i]},KI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qI={any:[/1/i,/2/i,/3/i,/4/i]},JI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},n_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},r_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i_={ordinalNumber:qd({matchPattern:UI,parsePattern:XI,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:ZI,defaultMatchWidth:"wide",parsePatterns:YI,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:KI,defaultMatchWidth:"wide",parsePatterns:qI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:JI,defaultMatchWidth:"wide",parsePatterns:QI,defaultParseWidth:"any"}),day:Xt({matchPatterns:e_,defaultMatchWidth:"wide",parsePatterns:t_,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:n_,defaultMatchWidth:"any",parsePatterns:r_,defaultParseWidth:"any"})},Yg={code:"en-US",formatDistance:TI,formatLong:kI,formatRelative:FI,localize:WI,match:i_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a_(e){const t=Lr(e);return SI(t,DI(t))+1}function o_(e){const t=Lr(e),n=+Zc(t)-+wI(t);return Math.round(n/Jx)+1}function eC(e,t){var c,d,h,f;const n=Lr(e),r=n.getFullYear(),i=Kd(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=ho(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=go(o,t),l=ho(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=go(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function s_(e,t){var s,l,u,c;const n=Kd(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=eC(e,t),a=ho(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),go(a,t)}function l_(e,t){const n=Lr(e),r=+go(n,t)-+s_(n,t);return Math.round(r/Jx)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Gi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return gt(i,t.length)}},Bo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},s1={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Gi.y(e,t)},Y:function(e,t,n,r){const i=eC(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return gt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):gt(a,t.length)},R:function(e,t){const n=Qx(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Gi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=l_(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):gt(i,t.length)},I:function(e,t,n){const r=o_(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Gi.d(e,t)},D:function(e,t,n){const r=a_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return gt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return gt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return gt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Bo.noon:r===0?i=Bo.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Bo.evening:r>=12?i=Bo.afternoon:r>=4?i=Bo.morning:i=Bo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Gi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Gi.s(e,t)},S:function(e,t){return Gi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return u1(r);case"XXXX":case"XX":return Va(r);case"XXXXX":case"XXX":default:return Va(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return u1(r);case"xxxx":case"xx":return Va(r);case"xxxxx":case"xxx":default:return Va(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+l1(r,":");case"OOOO":default:return"GMT"+Va(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+l1(r,":");case"zzzz":default:return"GMT"+Va(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return gt(r,t.length)},T:function(e,t,n){const r=e.getTime();return gt(r,t.length)}};function l1(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+gt(a,2)}function u1(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):Va(e,t)}function Va(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=gt(Math.trunc(r/60),2),a=gt(r%60,2);return n+i+t+a}const c1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},tC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},u_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return c1(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",c1(r,t)).replace("{{time}}",tC(i,t))},c_={p:tC,P:u_},d_=/^D+$/,f_=/^Y+$/,h_=["D","DD","YY","YYYY"];function g_(e){return d_.test(e)}function p_(e){return f_.test(e)}function m_(e,t,n){const r=b_(e,t,n);if(console.warn(r),h_.includes(e))throw new RangeError(r)}function b_(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const v_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x_=/^'([^]*?)'?$/,C_=/''/g,E_=/[a-zA-Z]/;function wl(e,t,n){var c,d,h,f,g,p,m,b;const r=Kd(),i=(n==null?void 0:n.locale)??r.locale??Yg,a=(n==null?void 0:n.firstWeekContainsDate)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((p=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((b=(m=r.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??0,s=Lr(e);if(!_I(s))throw new RangeError("Invalid time value");let l=t.match(y_).map(v=>{const x=v[0];if(x==="p"||x==="P"){const C=c_[x];return C(v,i.formatLong)}return v}).join("").match(v_).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const x=v[0];if(x==="'")return{isToken:!1,value:S_(v)};if(s1[x])return{isToken:!0,value:v};if(x.match(E_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const x=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&p_(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&g_(x))&&m_(x,t,String(e));const C=s1[x[0]];return C(s,x,i.localize,u)}).join("")}function S_(e){const t=e.match(x_);return t?t[1].replace(C_,"'"):e}function w_(e,t,n){const r=go(e,n),i=go(t,n);return+r==+i}const I_={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},__=(e,t,n)=>{let r;const i=I_[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},D_={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},A_={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},T_={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R_={date:Er({formats:D_,defaultWidth:"full"}),time:Er({formats:A_,defaultWidth:"full"}),dateTime:Er({formats:T_,defaultWidth:"full"})},B_={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},$_=(e,t,n,r)=>B_[e],k_={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},P_={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},F_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},N_={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},M_={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},L_={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},O_=(e,t)=>"ke-"+Number(e),V_={ordinalNumber:O_,era:Ut({values:k_,defaultWidth:"wide"}),quarter:Ut({values:P_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:F_,defaultWidth:"wide"}),day:Ut({values:N_,defaultWidth:"wide"}),dayPeriod:Ut({values:M_,defaultWidth:"wide",formattingValues:L_,defaultFormattingWidth:"wide"})},H_=/^ke-(\d+)?/i,j_=/\d+/i,W_={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},z_={any:[/^s/i,/^(m|e)/i]},G_={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},U_={any:[/1/i,/2/i,/3/i,/4/i]},X_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},Z_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Y_={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},K_={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},q_={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},J_={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},Q_={ordinalNumber:qd({matchPattern:H_,parsePattern:j_,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:W_,defaultMatchWidth:"wide",parsePatterns:z_,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:G_,defaultMatchWidth:"wide",parsePatterns:U_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:X_,defaultMatchWidth:"wide",parsePatterns:Z_,defaultParseWidth:"any"}),day:Xt({matchPatterns:Y_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:q_,defaultMatchWidth:"any",parsePatterns:J_,defaultParseWidth:"any"})},Yc={code:"id",formatDistance:__,formatLong:R_,formatRelative:$_,localize:V_,match:Q_,options:{weekStartsOn:1,firstWeekContainsDate:1}},eD={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},tD=(e,t,n)=>{let r;const i=eD[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"over "+r:r+" geleden":r},nD={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},rD={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},iD={full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aD={date:Er({formats:nD,defaultWidth:"full"}),time:Er({formats:rD,defaultWidth:"full"}),dateTime:Er({formats:iD,defaultWidth:"full"})},oD={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},sD=(e,t,n,r)=>oD[e],lD={narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},uD={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},cD={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},dD={narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},fD={narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},hD=(e,t)=>Number(e)+"e",gD={ordinalNumber:hD,era:Ut({values:lD,defaultWidth:"wide"}),quarter:Ut({values:uD,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:cD,defaultWidth:"wide"}),day:Ut({values:dD,defaultWidth:"wide"}),dayPeriod:Ut({values:fD,defaultWidth:"wide"})},pD=/^(\d+)e?/i,mD=/\d+/i,bD={narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},vD={any:[/^v/,/^n/]},yD={narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},xD={any:[/1/i,/2/i,/3/i,/4/i]},CD={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},ED={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},SD={narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},wD={narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},ID={any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},_D={any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},DD={ordinalNumber:qd({matchPattern:pD,parsePattern:mD,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:bD,defaultMatchWidth:"wide",parsePatterns:vD,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:yD,defaultMatchWidth:"wide",parsePatterns:xD,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:CD,defaultMatchWidth:"wide",parsePatterns:ED,defaultParseWidth:"any"}),day:Xt({matchPatterns:SD,defaultMatchWidth:"wide",parsePatterns:wD,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:ID,defaultMatchWidth:"any",parsePatterns:_D,defaultParseWidth:"any"})},nC={code:"nl",formatDistance:tD,formatLong:aD,formatRelative:sD,localize:gD,match:DD,options:{weekStartsOn:1,firstWeekContainsDate:4}},AD={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},TD=(e,t,n)=>{let r;const i=AD[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},RD={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},BD={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},$D={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},kD={date:Er({formats:RD,defaultWidth:"full"}),time:Er({formats:BD,defaultWidth:"full"}),dateTime:Er({formats:$D,defaultWidth:"full"})};function d1(e,t,n){const r="eeee p";return w_(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const PD={lastWeek:d1,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:d1,other:"PP p"},FD=(e,t,n,r)=>{const i=PD[e];return typeof i=="function"?i(t,n,r):i},ND={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},MD={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},LD={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},OD={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},VD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},HD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},jD=(e,t)=>{const n=Number(e);switch(t==null?void 0:t.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},WD={ordinalNumber:jD,era:Ut({values:ND,defaultWidth:"wide"}),quarter:Ut({values:MD,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:LD,defaultWidth:"wide"}),day:Ut({values:OD,defaultWidth:"wide"}),dayPeriod:Ut({values:VD,defaultWidth:"wide",formattingValues:HD,defaultFormattingWidth:"wide"})},zD=/^(第\s*)?\d+(日|时|分|秒)?/i,GD=/\d+/i,UD={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},XD={any:[/^(前)/i,/^(公元)/i]},ZD={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},YD={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},KD={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},qD={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},JD={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},QD={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},e6={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},t6={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},n6={ordinalNumber:qd({matchPattern:zD,parsePattern:GD,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:UD,defaultMatchWidth:"wide",parsePatterns:XD,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:ZD,defaultMatchWidth:"wide",parsePatterns:YD,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:KD,defaultMatchWidth:"wide",parsePatterns:qD,defaultParseWidth:"any"}),day:Xt({matchPatterns:JD,defaultMatchWidth:"wide",parsePatterns:QD,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:e6,defaultMatchWidth:"any",parsePatterns:t6,defaultParseWidth:"any"})},rC={code:"zh-CN",formatDistance:TD,formatLong:kD,formatRelative:FD,localize:WD,match:n6,options:{weekStartsOn:1,firstWeekContainsDate:4}};var r6=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Uf=Math.ceil,cr=Math.floor,Pn="[BigNumber Error] ",f1=Pn+"Number primitive has more than 15 significant digits: ",_r=1e14,Le=14,h1=9007199254740991,Xf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ui=1e7,Un=1e9;function iC(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,l=-7,u=21,c=-1e7,d=1e7,h=!1,f=1,g=0,p={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},m="0123456789abcdefghijklmnopqrstuvwxyz",b=!0;function v(y,S){var D,A,T,F,k,P,$,R,O=this;if(!(O instanceof v))return new v(y,S);if(S==null){if(y&&y._isBigNumber===!0){O.s=y.s,!y.c||y.e>d?O.c=O.e=null:y.e<c?O.c=[O.e=0]:(O.e=y.e,O.c=y.c.slice());return}if((P=typeof y=="number")&&y*0==0){if(O.s=1/y<0?(y=-y,-1):1,y===~~y){for(F=0,k=y;k>=10;k/=10,F++);F>d?O.c=O.e=null:(O.e=F,O.c=[y]);return}R=String(y)}else{if(!r6.test(R=String(y)))return r(O,R,P);O.s=R.charCodeAt(0)==45?(R=R.slice(1),-1):1}(F=R.indexOf("."))>-1&&(R=R.replace(".","")),(k=R.search(/e/i))>0?(F<0&&(F=k),F+=+R.slice(k+1),R=R.substring(0,k)):F<0&&(F=R.length)}else{if(Tt(S,2,m.length,"Base"),S==10&&b)return O=new v(y),w(O,o+O.e+1,s);if(R=String(y),P=typeof y=="number"){if(y*0!=0)return r(O,R,P,S);if(O.s=1/y<0?(R=R.slice(1),-1):1,v.DEBUG&&R.replace(/^0\.0*|\./,"").length>15)throw Error(f1+y)}else O.s=R.charCodeAt(0)===45?(R=R.slice(1),-1):1;for(D=m.slice(0,S),F=k=0,$=R.length;k<$;k++)if(D.indexOf(A=R.charAt(k))<0){if(A=="."){if(k>F){F=$;continue}}else if(!T&&(R==R.toUpperCase()&&(R=R.toLowerCase())||R==R.toLowerCase()&&(R=R.toUpperCase()))){T=!0,k=-1,F=0;continue}return r(O,String(y),P,S)}P=!1,R=n(R,S,10,O.s),(F=R.indexOf("."))>-1?R=R.replace(".",""):F=R.length}for(k=0;R.charCodeAt(k)===48;k++);for($=R.length;R.charCodeAt(--$)===48;);if(R=R.slice(k,++$)){if($-=k,P&&v.DEBUG&&$>15&&(y>h1||y!==cr(y)))throw Error(f1+O.s*y);if((F=F-k-1)>d)O.c=O.e=null;else if(F<c)O.c=[O.e=0];else{if(O.e=F,O.c=[],k=(F+1)%Le,F<0&&(k+=Le),k<$){for(k&&O.c.push(+R.slice(0,k)),$-=Le;k<$;)O.c.push(+R.slice(k,k+=Le));k=Le-(R=R.slice(k)).length}else k-=$;for(;k--;R+="0");O.c.push(+R)}}else O.c=[O.e=0]}v.clone=iC,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(y){var S,D;if(y!=null)if(typeof y=="object"){if(y.hasOwnProperty(S="DECIMAL_PLACES")&&(D=y[S],Tt(D,0,Un,S),o=D),y.hasOwnProperty(S="ROUNDING_MODE")&&(D=y[S],Tt(D,0,8,S),s=D),y.hasOwnProperty(S="EXPONENTIAL_AT")&&(D=y[S],D&&D.pop?(Tt(D[0],-1e9,0,S),Tt(D[1],0,Un,S),l=D[0],u=D[1]):(Tt(D,-1e9,Un,S),l=-(u=D<0?-D:D))),y.hasOwnProperty(S="RANGE"))if(D=y[S],D&&D.pop)Tt(D[0],-1e9,-1,S),Tt(D[1],1,Un,S),c=D[0],d=D[1];else if(Tt(D,-1e9,Un,S),D)c=-(d=D<0?-D:D);else throw Error(Pn+S+" cannot be zero: "+D);if(y.hasOwnProperty(S="CRYPTO"))if(D=y[S],D===!!D)if(D)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))h=D;else throw h=!D,Error(Pn+"crypto unavailable");else h=D;else throw Error(Pn+S+" not true or false: "+D);if(y.hasOwnProperty(S="MODULO_MODE")&&(D=y[S],Tt(D,0,9,S),f=D),y.hasOwnProperty(S="POW_PRECISION")&&(D=y[S],Tt(D,0,Un,S),g=D),y.hasOwnProperty(S="FORMAT"))if(D=y[S],typeof D=="object")p=D;else throw Error(Pn+S+" not an object: "+D);if(y.hasOwnProperty(S="ALPHABET"))if(D=y[S],typeof D=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(D))b=D.slice(0,10)=="0123456789",m=D;else throw Error(Pn+S+" invalid: "+D)}else throw Error(Pn+"Object expected: "+y);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,u],RANGE:[c,d],CRYPTO:h,MODULO_MODE:f,POW_PRECISION:g,FORMAT:p,ALPHABET:m}},v.isBigNumber=function(y){if(!y||y._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var S,D,A=y.c,T=y.e,F=y.s;e:if({}.toString.call(A)=="[object Array]"){if((F===1||F===-1)&&T>=-1e9&&T<=Un&&T===cr(T)){if(A[0]===0){if(T===0&&A.length===1)return!0;break e}if(S=(T+1)%Le,S<1&&(S+=Le),String(A[0]).length==S){for(S=0;S<A.length;S++)if(D=A[S],D<0||D>=_r||D!==cr(D))break e;if(D!==0)return!0}}}else if(A===null&&T===null&&(F===null||F===1||F===-1))return!0;throw Error(Pn+"Invalid BigNumber: "+y)},v.maximum=v.max=function(){return C(arguments,-1)},v.minimum=v.min=function(){return C(arguments,1)},v.random=function(){var y=9007199254740992,S=Math.random()*y&2097151?function(){return cr(Math.random()*y)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(D){var A,T,F,k,P,$=0,R=[],O=new v(a);if(D==null?D=o:Tt(D,0,Un),k=Uf(D/Le),h)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(k*=2));$<k;)P=A[$]*131072+(A[$+1]>>>11),P>=9e15?(T=crypto.getRandomValues(new Uint32Array(2)),A[$]=T[0],A[$+1]=T[1]):(R.push(P%1e14),$+=2);$=k/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(k*=7);$<k;)P=(A[$]&31)*281474976710656+A[$+1]*1099511627776+A[$+2]*4294967296+A[$+3]*16777216+(A[$+4]<<16)+(A[$+5]<<8)+A[$+6],P>=9e15?crypto.randomBytes(7).copy(A,$):(R.push(P%1e14),$+=7);$=k/7}else throw h=!1,Error(Pn+"crypto unavailable");if(!h)for(;$<k;)P=S(),P<9e15&&(R[$++]=P%1e14);for(k=R[--$],D%=Le,k&&D&&(P=Xf[Le-D],R[$]=cr(k/P)*P);R[$]===0;R.pop(),$--);if($<0)R=[F=0];else{for(F=-1;R[0]===0;R.splice(0,1),F-=Le);for($=1,P=R[0];P>=10;P/=10,$++);$<Le&&(F-=Le-$)}return O.e=F,O.c=R,O}}(),v.sum=function(){for(var y=1,S=arguments,D=new v(S[0]);y<S.length;)D=D.plus(S[y++]);return D},n=function(){var y="0123456789";function S(D,A,T,F){for(var k,P=[0],$,R=0,O=D.length;R<O;){for($=P.length;$--;P[$]*=A);for(P[0]+=F.indexOf(D.charAt(R++)),k=0;k<P.length;k++)P[k]>T-1&&(P[k+1]==null&&(P[k+1]=0),P[k+1]+=P[k]/T|0,P[k]%=T)}return P.reverse()}return function(D,A,T,F,k){var P,$,R,O,j,V,W,U,K=D.indexOf("."),ee=o,z=s;for(K>=0&&(O=g,g=0,D=D.replace(".",""),U=new v(A),V=U.pow(D.length-K),g=O,U.c=S(mi(sr(V.c),V.e,"0"),10,T,y),U.e=U.c.length),W=S(D,A,T,k?(P=m,y):(P=y,m)),R=O=W.length;W[--O]==0;W.pop());if(!W[0])return P.charAt(0);if(K<0?--R:(V.c=W,V.e=R,V.s=F,V=t(V,U,ee,z,T),W=V.c,j=V.r,R=V.e),$=R+ee+1,K=W[$],O=T/2,j=j||$<0||W[$+1]!=null,j=z<4?(K!=null||j)&&(z==0||z==(V.s<0?3:2)):K>O||K==O&&(z==4||j||z==6&&W[$-1]&1||z==(V.s<0?8:7)),$<1||!W[0])D=j?mi(P.charAt(1),-ee,P.charAt(0)):P.charAt(0);else{if(W.length=$,j)for(--T;++W[--$]>T;)W[$]=0,$||(++R,W=[1].concat(W));for(O=W.length;!W[--O];);for(K=0,D="";K<=O;D+=P.charAt(W[K++]));D=mi(D,R,P.charAt(0))}return D}}(),t=function(){function y(A,T,F){var k,P,$,R,O=0,j=A.length,V=T%Ui,W=T/Ui|0;for(A=A.slice();j--;)$=A[j]%Ui,R=A[j]/Ui|0,k=W*$+R*V,P=V*$+k%Ui*Ui+O,O=(P/F|0)+(k/Ui|0)+W*R,A[j]=P%F;return O&&(A=[O].concat(A)),A}function S(A,T,F,k){var P,$;if(F!=k)$=F>k?1:-1;else for(P=$=0;P<F;P++)if(A[P]!=T[P]){$=A[P]>T[P]?1:-1;break}return $}function D(A,T,F,k){for(var P=0;F--;)A[F]-=P,P=A[F]<T[F]?1:0,A[F]=P*k+A[F]-T[F];for(;!A[0]&&A.length>1;A.splice(0,1));}return function(A,T,F,k,P){var $,R,O,j,V,W,U,K,ee,z,H,X,te,ie,le,ce,Q,be=A.s==T.s?1:-1,Ce=A.c,Se=T.c;if(!Ce||!Ce[0]||!Se||!Se[0])return new v(!A.s||!T.s||(Ce?Se&&Ce[0]==Se[0]:!Se)?NaN:Ce&&Ce[0]==0||!Se?be*0:be/0);for(K=new v(be),ee=K.c=[],R=A.e-T.e,be=F+R+1,P||(P=_r,R=dr(A.e/Le)-dr(T.e/Le),be=be/Le|0),O=0;Se[O]==(Ce[O]||0);O++);if(Se[O]>(Ce[O]||0)&&R--,be<0)ee.push(1),j=!0;else{for(ie=Ce.length,ce=Se.length,O=0,be+=2,V=cr(P/(Se[0]+1)),V>1&&(Se=y(Se,V,P),Ce=y(Ce,V,P),ce=Se.length,ie=Ce.length),te=ce,z=Ce.slice(0,ce),H=z.length;H<ce;z[H++]=0);Q=Se.slice(),Q=[0].concat(Q),le=Se[0],Se[1]>=P/2&&le++;do{if(V=0,$=S(Se,z,ce,H),$<0){if(X=z[0],ce!=H&&(X=X*P+(z[1]||0)),V=cr(X/le),V>1)for(V>=P&&(V=P-1),W=y(Se,V,P),U=W.length,H=z.length;S(W,z,U,H)==1;)V--,D(W,ce<U?Q:Se,U,P),U=W.length,$=1;else V==0&&($=V=1),W=Se.slice(),U=W.length;if(U<H&&(W=[0].concat(W)),D(z,W,H,P),H=z.length,$==-1)for(;S(Se,z,ce,H)<1;)V++,D(z,ce<H?Q:Se,H,P),H=z.length}else $===0&&(V++,z=[0]);ee[O++]=V,z[0]?z[H++]=Ce[te]||0:(z=[Ce[te]],H=1)}while((te++<ie||z[0]!=null)&&be--);j=z[0]!=null,ee[0]||ee.splice(0,1)}if(P==_r){for(O=1,be=ee[0];be>=10;be/=10,O++);w(K,F+(K.e=O+R*Le-1)+1,k,j)}else K.e=R,K.r=+j;return K}}();function x(y,S,D,A){var T,F,k,P,$;if(D==null?D=s:Tt(D,0,8),!y.c)return y.toString();if(T=y.c[0],k=y.e,S==null)$=sr(y.c),$=A==1||A==2&&(k<=l||k>=u)?Ru($,k):mi($,k,"0");else if(y=w(new v(y),S,D),F=y.e,$=sr(y.c),P=$.length,A==1||A==2&&(S<=F||F<=l)){for(;P<S;$+="0",P++);$=Ru($,F)}else if(S-=k,$=mi($,F,"0"),F+1>P){if(--S>0)for($+=".";S--;$+="0");}else if(S+=F-P,S>0)for(F+1==P&&($+=".");S--;$+="0");return y.s<0&&T?"-"+$:$}function C(y,S){for(var D,A,T=1,F=new v(y[0]);T<y.length;T++)A=new v(y[T]),(!A.s||(D=$a(F,A))===S||D===0&&F.s===S)&&(F=A);return F}function E(y,S,D){for(var A=1,T=S.length;!S[--T];S.pop());for(T=S[0];T>=10;T/=10,A++);return(D=A+D*Le-1)>d?y.c=y.e=null:D<c?y.c=[y.e=0]:(y.e=D,y.c=S),y}r=function(){var y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,D=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,k,P,$){var R,O=P?k:k.replace(T,"");if(A.test(O))F.s=isNaN(O)?null:O<0?-1:1;else{if(!P&&(O=O.replace(y,function(j,V,W){return R=(W=W.toLowerCase())=="x"?16:W=="b"?2:8,!$||$==R?V:j}),$&&(R=$,O=O.replace(S,"$1").replace(D,"0.$1")),k!=O))return new v(O,R);if(v.DEBUG)throw Error(Pn+"Not a"+($?" base "+$:"")+" number: "+k);F.s=null}F.c=F.e=null}}();function w(y,S,D,A){var T,F,k,P,$,R,O,j=y.c,V=Xf;if(j){e:{for(T=1,P=j[0];P>=10;P/=10,T++);if(F=S-T,F<0)F+=Le,k=S,$=j[R=0],O=cr($/V[T-k-1]%10);else if(R=Uf((F+1)/Le),R>=j.length)if(A){for(;j.length<=R;j.push(0));$=O=0,T=1,F%=Le,k=F-Le+1}else break e;else{for($=P=j[R],T=1;P>=10;P/=10,T++);F%=Le,k=F-Le+T,O=k<0?0:cr($/V[T-k-1]%10)}if(A=A||S<0||j[R+1]!=null||(k<0?$:$%V[T-k-1]),A=D<4?(O||A)&&(D==0||D==(y.s<0?3:2)):O>5||O==5&&(D==4||A||D==6&&(F>0?k>0?$/V[T-k]:0:j[R-1])%10&1||D==(y.s<0?8:7)),S<1||!j[0])return j.length=0,A?(S-=y.e+1,j[0]=V[(Le-S%Le)%Le],y.e=-S||0):j[0]=y.e=0,y;if(F==0?(j.length=R,P=1,R--):(j.length=R+1,P=V[Le-F],j[R]=k>0?cr($/V[T-k]%V[k])*P:0),A)for(;;)if(R==0){for(F=1,k=j[0];k>=10;k/=10,F++);for(k=j[0]+=P,P=1;k>=10;k/=10,P++);F!=P&&(y.e++,j[0]==_r&&(j[0]=1));break}else{if(j[R]+=P,j[R]!=_r)break;j[R--]=0,P=1}for(F=j.length;j[--F]===0;j.pop());}y.e>d?y.c=y.e=null:y.e<c&&(y.c=[y.e=0])}return y}function B(y){var S,D=y.e;return D===null?y.toString():(S=sr(y.c),S=D<=l||D>=u?Ru(S,D):mi(S,D,"0"),y.s<0?"-"+S:S)}return i.absoluteValue=i.abs=function(){var y=new v(this);return y.s<0&&(y.s=1),y},i.comparedTo=function(y,S){return $a(this,new v(y,S))},i.decimalPlaces=i.dp=function(y,S){var D,A,T,F=this;if(y!=null)return Tt(y,0,Un),S==null?S=s:Tt(S,0,8),w(new v(F),y+F.e+1,S);if(!(D=F.c))return null;if(A=((T=D.length-1)-dr(this.e/Le))*Le,T=D[T])for(;T%10==0;T/=10,A--);return A<0&&(A=0),A},i.dividedBy=i.div=function(y,S){return t(this,new v(y,S),o,s)},i.dividedToIntegerBy=i.idiv=function(y,S){return t(this,new v(y,S),0,1)},i.exponentiatedBy=i.pow=function(y,S){var D,A,T,F,k,P,$,R,O,j=this;if(y=new v(y),y.c&&!y.isInteger())throw Error(Pn+"Exponent not an integer: "+B(y));if(S!=null&&(S=new v(S)),P=y.e>14,!j.c||!j.c[0]||j.c[0]==1&&!j.e&&j.c.length==1||!y.c||!y.c[0])return O=new v(Math.pow(+B(j),P?y.s*(2-Tu(y)):+B(y))),S?O.mod(S):O;if($=y.s<0,S){if(S.c?!S.c[0]:!S.s)return new v(NaN);A=!$&&j.isInteger()&&S.isInteger(),A&&(j=j.mod(S))}else{if(y.e>9&&(j.e>0||j.e<-1||(j.e==0?j.c[0]>1||P&&j.c[1]>=24e7:j.c[0]<8e13||P&&j.c[0]<=9999975e7)))return F=j.s<0&&Tu(y)?-0:0,j.e>-1&&(F=1/F),new v($?1/F:F);g&&(F=Uf(g/Le+2))}for(P?(D=new v(.5),$&&(y.s=1),R=Tu(y)):(T=Math.abs(+B(y)),R=T%2),O=new v(a);;){if(R){if(O=O.times(j),!O.c)break;F?O.c.length>F&&(O.c.length=F):A&&(O=O.mod(S))}if(T){if(T=cr(T/2),T===0)break;R=T%2}else if(y=y.times(D),w(y,y.e+1,1),y.e>14)R=Tu(y);else{if(T=+B(y),T===0)break;R=T%2}j=j.times(j),F?j.c&&j.c.length>F&&(j.c.length=F):A&&(j=j.mod(S))}return A?O:($&&(O=a.div(O)),S?O.mod(S):F?w(O,g,s,k):O)},i.integerValue=function(y){var S=new v(this);return y==null?y=s:Tt(y,0,8),w(S,S.e+1,y)},i.isEqualTo=i.eq=function(y,S){return $a(this,new v(y,S))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(y,S){return $a(this,new v(y,S))>0},i.isGreaterThanOrEqualTo=i.gte=function(y,S){return(S=$a(this,new v(y,S)))===1||S===0},i.isInteger=function(){return!!this.c&&dr(this.e/Le)>this.c.length-2},i.isLessThan=i.lt=function(y,S){return $a(this,new v(y,S))<0},i.isLessThanOrEqualTo=i.lte=function(y,S){return(S=$a(this,new v(y,S)))===-1||S===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(y,S){var D,A,T,F,k=this,P=k.s;if(y=new v(y,S),S=y.s,!P||!S)return new v(NaN);if(P!=S)return y.s=-S,k.plus(y);var $=k.e/Le,R=y.e/Le,O=k.c,j=y.c;if(!$||!R){if(!O||!j)return O?(y.s=-S,y):new v(j?k:NaN);if(!O[0]||!j[0])return j[0]?(y.s=-S,y):new v(O[0]?k:s==3?-0:0)}if($=dr($),R=dr(R),O=O.slice(),P=$-R){for((F=P<0)?(P=-P,T=O):(R=$,T=j),T.reverse(),S=P;S--;T.push(0));T.reverse()}else for(A=(F=(P=O.length)<(S=j.length))?P:S,P=S=0;S<A;S++)if(O[S]!=j[S]){F=O[S]<j[S];break}if(F&&(T=O,O=j,j=T,y.s=-y.s),S=(A=j.length)-(D=O.length),S>0)for(;S--;O[D++]=0);for(S=_r-1;A>P;){if(O[--A]<j[A]){for(D=A;D&&!O[--D];O[D]=S);--O[D],O[A]+=_r}O[A]-=j[A]}for(;O[0]==0;O.splice(0,1),--R);return O[0]?E(y,O,R):(y.s=s==3?-1:1,y.c=[y.e=0],y)},i.modulo=i.mod=function(y,S){var D,A,T=this;return y=new v(y,S),!T.c||!y.s||y.c&&!y.c[0]?new v(NaN):!y.c||T.c&&!T.c[0]?new v(T):(f==9?(A=y.s,y.s=1,D=t(T,y,0,3),y.s=A,D.s*=A):D=t(T,y,0,f),y=T.minus(D.times(y)),!y.c[0]&&f==1&&(y.s=T.s),y)},i.multipliedBy=i.times=function(y,S){var D,A,T,F,k,P,$,R,O,j,V,W,U,K,ee,z=this,H=z.c,X=(y=new v(y,S)).c;if(!H||!X||!H[0]||!X[0])return!z.s||!y.s||H&&!H[0]&&!X||X&&!X[0]&&!H?y.c=y.e=y.s=null:(y.s*=z.s,!H||!X?y.c=y.e=null:(y.c=[0],y.e=0)),y;for(A=dr(z.e/Le)+dr(y.e/Le),y.s*=z.s,$=H.length,j=X.length,$<j&&(U=H,H=X,X=U,T=$,$=j,j=T),T=$+j,U=[];T--;U.push(0));for(K=_r,ee=Ui,T=j;--T>=0;){for(D=0,V=X[T]%ee,W=X[T]/ee|0,k=$,F=T+k;F>T;)R=H[--k]%ee,O=H[k]/ee|0,P=W*R+O*V,R=V*R+P%ee*ee+U[F]+D,D=(R/K|0)+(P/ee|0)+W*O,U[F--]=R%K;U[F]=D}return D?++A:U.splice(0,1),E(y,U,A)},i.negated=function(){var y=new v(this);return y.s=-y.s||null,y},i.plus=function(y,S){var D,A=this,T=A.s;if(y=new v(y,S),S=y.s,!T||!S)return new v(NaN);if(T!=S)return y.s=-S,A.minus(y);var F=A.e/Le,k=y.e/Le,P=A.c,$=y.c;if(!F||!k){if(!P||!$)return new v(T/0);if(!P[0]||!$[0])return $[0]?y:new v(P[0]?A:T*0)}if(F=dr(F),k=dr(k),P=P.slice(),T=F-k){for(T>0?(k=F,D=$):(T=-T,D=P),D.reverse();T--;D.push(0));D.reverse()}for(T=P.length,S=$.length,T-S<0&&(D=$,$=P,P=D,S=T),T=0;S;)T=(P[--S]=P[S]+$[S]+T)/_r|0,P[S]=_r===P[S]?0:P[S]%_r;return T&&(P=[T].concat(P),++k),E(y,P,k)},i.precision=i.sd=function(y,S){var D,A,T,F=this;if(y!=null&&y!==!!y)return Tt(y,1,Un),S==null?S=s:Tt(S,0,8),w(new v(F),y,S);if(!(D=F.c))return null;if(T=D.length-1,A=T*Le+1,T=D[T]){for(;T%10==0;T/=10,A--);for(T=D[0];T>=10;T/=10,A++);}return y&&F.e+1>A&&(A=F.e+1),A},i.shiftedBy=function(y){return Tt(y,-9007199254740991,h1),this.times("1e"+y)},i.squareRoot=i.sqrt=function(){var y,S,D,A,T,F=this,k=F.c,P=F.s,$=F.e,R=o+4,O=new v("0.5");if(P!==1||!k||!k[0])return new v(!P||P<0&&(!k||k[0])?NaN:k?F:1/0);if(P=Math.sqrt(+B(F)),P==0||P==1/0?(S=sr(k),(S.length+$)%2==0&&(S+="0"),P=Math.sqrt(+S),$=dr(($+1)/2)-($<0||$%2),P==1/0?S="5e"+$:(S=P.toExponential(),S=S.slice(0,S.indexOf("e")+1)+$),D=new v(S)):D=new v(P+""),D.c[0]){for($=D.e,P=$+R,P<3&&(P=0);;)if(T=D,D=O.times(T.plus(t(F,T,R,1))),sr(T.c).slice(0,P)===(S=sr(D.c)).slice(0,P))if(D.e<$&&--P,S=S.slice(P-3,P+1),S=="9999"||!A&&S=="4999"){if(!A&&(w(T,T.e+o+2,0),T.times(T).eq(F))){D=T;break}R+=4,P+=4,A=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(w(D,D.e+o+2,1),y=!D.times(D).eq(F));break}}return w(D,D.e+o+1,s,y)},i.toExponential=function(y,S){return y!=null&&(Tt(y,0,Un),y++),x(this,y,S,1)},i.toFixed=function(y,S){return y!=null&&(Tt(y,0,Un),y=y+this.e+1),x(this,y,S)},i.toFormat=function(y,S,D){var A,T=this;if(D==null)y!=null&&S&&typeof S=="object"?(D=S,S=null):y&&typeof y=="object"?(D=y,y=S=null):D=p;else if(typeof D!="object")throw Error(Pn+"Argument not an object: "+D);if(A=T.toFixed(y,S),T.c){var F,k=A.split("."),P=+D.groupSize,$=+D.secondaryGroupSize,R=D.groupSeparator||"",O=k[0],j=k[1],V=T.s<0,W=V?O.slice(1):O,U=W.length;if($&&(F=P,P=$,$=F,U-=F),P>0&&U>0){for(F=U%P||P,O=W.substr(0,F);F<U;F+=P)O+=R+W.substr(F,P);$>0&&(O+=R+W.slice(F)),V&&(O="-"+O)}A=j?O+(D.decimalSeparator||"")+(($=+D.fractionGroupSize)?j.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(D.fractionGroupSeparator||"")):j):O}return(D.prefix||"")+A+(D.suffix||"")},i.toFraction=function(y){var S,D,A,T,F,k,P,$,R,O,j,V,W=this,U=W.c;if(y!=null&&(P=new v(y),!P.isInteger()&&(P.c||P.s!==1)||P.lt(a)))throw Error(Pn+"Argument "+(P.isInteger()?"out of range: ":"not an integer: ")+B(P));if(!U)return new v(W);for(S=new v(a),R=D=new v(a),A=$=new v(a),V=sr(U),F=S.e=V.length-W.e-1,S.c[0]=Xf[(k=F%Le)<0?Le+k:k],y=!y||P.comparedTo(S)>0?F>0?S:R:P,k=d,d=1/0,P=new v(V),$.c[0]=0;O=t(P,S,0,1),T=D.plus(O.times(A)),T.comparedTo(y)!=1;)D=A,A=T,R=$.plus(O.times(T=R)),$=T,S=P.minus(O.times(T=S)),P=T;return T=t(y.minus(D),A,0,1),$=$.plus(T.times(R)),D=D.plus(T.times(A)),$.s=R.s=W.s,F=F*2,j=t(R,A,F,s).minus(W).abs().comparedTo(t($,D,F,s).minus(W).abs())<1?[R,A]:[$,D],d=k,j},i.toNumber=function(){return+B(this)},i.toPrecision=function(y,S){return y!=null&&Tt(y,1,Un),x(this,y,S,2)},i.toString=function(y){var S,D=this,A=D.s,T=D.e;return T===null?A?(S="Infinity",A<0&&(S="-"+S)):S="NaN":(y==null?S=T<=l||T>=u?Ru(sr(D.c),T):mi(sr(D.c),T,"0"):y===10&&b?(D=w(new v(D),o+T+1,s),S=mi(sr(D.c),D.e,"0")):(Tt(y,2,m.length,"Base"),S=n(mi(sr(D.c),T,"0"),10,y,A,!0)),A<0&&D.c[0]&&(S="-"+S)),S},i.valueOf=i.toJSON=function(){return B(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,e!=null&&v.set(e),v}function dr(e){var t=e|0;return e>0||e===t?t:t-1}function sr(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=Le-t.length;n--;t="0"+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function $a(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(s=(l=i.length)<(u=a.length)?l:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return l==u?0:l>u^n?1:-1}function Tt(e,t,n,r){if(e<t||e>n||e!==cr(e))throw Error(Pn+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Tu(e){var t=e.c.length-1;return dr(e.e/Le)==t&&e.c[t]%2!=0}function Ru(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function mi(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Jd=iC();const aC={ROUNDING_MODE:Jd.ROUND_HALF_UP,EXPONENTIAL_AT:[-1e9,1e9]};let x0=!1;const i6=(e=aC)=>{x0||(Jd.config(e),x0=!0)},$t=(e,t)=>(x0||i6(),new Jd(e,t));var a6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s6(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ze={options:{usePureJavaScript:!1}},Kg={},l6=Kg,g1={};Kg.encode=function(e,t,n){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(n!==void 0&&typeof n!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=u6(e,t);else{var i=0,a=t.length,o=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var l=0,u=e[i];l<s.length;++l)u+=s[l]<<8,s[l]=u%a,u=u/a|0;for(;u>0;)s.push(u%a),u=u/a|0}for(i=0;e[i]===0&&i<e.length-1;++i)r+=o;for(i=s.length-1;i>=0;--i)r+=t[s[i]]}if(n){var c=new RegExp(".{1,"+n+"}","g");r=r.match(c).join(`\r
|
|
1
|
+
"use strict";var yI=Object.defineProperty;var xI=(e,t,n)=>t in e?yI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>xI(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),I=require("react"),cu=require("react-dom");function Kx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=Kx(I),qx=Kx(cu);function Lr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ho(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Jx=6048e5,CI=864e5;let EI={};function Kd(){return EI}function go(e,t){var s,l,u,c;const n=Kd(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=Lr(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Zc(e){return go(e,{weekStartsOn:1})}function Qx(e){const t=Lr(e),n=t.getFullYear(),r=ho(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Zc(r),a=ho(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=Zc(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function a1(e){const t=Lr(e);return t.setHours(0,0,0,0),t}function o1(e){const t=Lr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function SI(e,t){const n=a1(e),r=a1(t),i=+n-o1(n),a=+r-o1(r);return Math.round((i-a)/CI)}function wI(e){const t=Qx(e),n=ho(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zc(n)}function II(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _I(e){if(!II(e)&&typeof e!="number")return!1;const t=Lr(e);return!isNaN(Number(t))}function DI(e){const t=Lr(e),n=ho(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const AI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},TI=(e,t,n)=>{let r;const i=AI[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Er(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$I={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kI={date:Er({formats:RI,defaultWidth:"full"}),time:Er({formats:BI,defaultWidth:"full"}),dateTime:Er({formats:$I,defaultWidth:"full"})},PI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FI=(e,t,n,r)=>PI[e];function Ut(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const NI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},LI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},VI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jI=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},WI={ordinalNumber:jI,era:Ut({values:NI,defaultWidth:"wide"}),quarter:Ut({values:MI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:LI,defaultWidth:"wide"}),day:Ut({values:OI,defaultWidth:"wide"}),dayPeriod:Ut({values:VI,defaultWidth:"wide",formattingValues:HI,defaultFormattingWidth:"wide"})};function Xt(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?GI(s,d=>d.test(o)):zI(s,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function zI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function GI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qd(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const UI=/^(\d+)(th|st|nd|rd)?/i,XI=/\d+/i,ZI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},YI={any:[/^b/i,/^(a|c)/i]},KI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qI={any:[/1/i,/2/i,/3/i,/4/i]},JI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},n_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},r_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i_={ordinalNumber:qd({matchPattern:UI,parsePattern:XI,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:ZI,defaultMatchWidth:"wide",parsePatterns:YI,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:KI,defaultMatchWidth:"wide",parsePatterns:qI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:JI,defaultMatchWidth:"wide",parsePatterns:QI,defaultParseWidth:"any"}),day:Xt({matchPatterns:e_,defaultMatchWidth:"wide",parsePatterns:t_,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:n_,defaultMatchWidth:"any",parsePatterns:r_,defaultParseWidth:"any"})},Yg={code:"en-US",formatDistance:TI,formatLong:kI,formatRelative:FI,localize:WI,match:i_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a_(e){const t=Lr(e);return SI(t,DI(t))+1}function o_(e){const t=Lr(e),n=+Zc(t)-+wI(t);return Math.round(n/Jx)+1}function eC(e,t){var c,d,h,f;const n=Lr(e),r=n.getFullYear(),i=Kd(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=ho(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=go(o,t),l=ho(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=go(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function s_(e,t){var s,l,u,c;const n=Kd(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=eC(e,t),a=ho(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),go(a,t)}function l_(e,t){const n=Lr(e),r=+go(n,t)-+s_(n,t);return Math.round(r/Jx)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Gi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return gt(i,t.length)}},Bo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},s1={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Gi.y(e,t)},Y:function(e,t,n,r){const i=eC(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return gt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):gt(a,t.length)},R:function(e,t){const n=Qx(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Gi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=l_(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):gt(i,t.length)},I:function(e,t,n){const r=o_(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Gi.d(e,t)},D:function(e,t,n){const r=a_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return gt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return gt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return gt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Bo.noon:r===0?i=Bo.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Bo.evening:r>=12?i=Bo.afternoon:r>=4?i=Bo.morning:i=Bo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Gi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Gi.s(e,t)},S:function(e,t){return Gi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return u1(r);case"XXXX":case"XX":return Va(r);case"XXXXX":case"XXX":default:return Va(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return u1(r);case"xxxx":case"xx":return Va(r);case"xxxxx":case"xxx":default:return Va(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+l1(r,":");case"OOOO":default:return"GMT"+Va(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+l1(r,":");case"zzzz":default:return"GMT"+Va(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return gt(r,t.length)},T:function(e,t,n){const r=e.getTime();return gt(r,t.length)}};function l1(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+gt(a,2)}function u1(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):Va(e,t)}function Va(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=gt(Math.trunc(r/60),2),a=gt(r%60,2);return n+i+t+a}const c1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},tC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},u_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return c1(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",c1(r,t)).replace("{{time}}",tC(i,t))},c_={p:tC,P:u_},d_=/^D+$/,f_=/^Y+$/,h_=["D","DD","YY","YYYY"];function g_(e){return d_.test(e)}function p_(e){return f_.test(e)}function m_(e,t,n){const r=b_(e,t,n);if(console.warn(r),h_.includes(e))throw new RangeError(r)}function b_(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const v_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x_=/^'([^]*?)'?$/,C_=/''/g,E_=/[a-zA-Z]/;function wl(e,t,n){var c,d,h,f,g,p,m,b;const r=Kd(),i=(n==null?void 0:n.locale)??r.locale??Yg,a=(n==null?void 0:n.firstWeekContainsDate)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((p=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((b=(m=r.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??0,s=Lr(e);if(!_I(s))throw new RangeError("Invalid time value");let l=t.match(y_).map(v=>{const x=v[0];if(x==="p"||x==="P"){const C=c_[x];return C(v,i.formatLong)}return v}).join("").match(v_).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const x=v[0];if(x==="'")return{isToken:!1,value:S_(v)};if(s1[x])return{isToken:!0,value:v};if(x.match(E_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const x=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&p_(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&g_(x))&&m_(x,t,String(e));const C=s1[x[0]];return C(s,x,i.localize,u)}).join("")}function S_(e){const t=e.match(x_);return t?t[1].replace(C_,"'"):e}function w_(e,t,n){const r=go(e,n),i=go(t,n);return+r==+i}const I_={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},__=(e,t,n)=>{let r;const i=I_[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},D_={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},A_={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},T_={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R_={date:Er({formats:D_,defaultWidth:"full"}),time:Er({formats:A_,defaultWidth:"full"}),dateTime:Er({formats:T_,defaultWidth:"full"})},B_={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},$_=(e,t,n,r)=>B_[e],k_={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},P_={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},F_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},N_={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},M_={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},L_={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},O_=(e,t)=>"ke-"+Number(e),V_={ordinalNumber:O_,era:Ut({values:k_,defaultWidth:"wide"}),quarter:Ut({values:P_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:F_,defaultWidth:"wide"}),day:Ut({values:N_,defaultWidth:"wide"}),dayPeriod:Ut({values:M_,defaultWidth:"wide",formattingValues:L_,defaultFormattingWidth:"wide"})},H_=/^ke-(\d+)?/i,j_=/\d+/i,W_={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},z_={any:[/^s/i,/^(m|e)/i]},G_={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},U_={any:[/1/i,/2/i,/3/i,/4/i]},X_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},Z_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Y_={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},K_={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},q_={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},J_={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},Q_={ordinalNumber:qd({matchPattern:H_,parsePattern:j_,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:W_,defaultMatchWidth:"wide",parsePatterns:z_,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:G_,defaultMatchWidth:"wide",parsePatterns:U_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:X_,defaultMatchWidth:"wide",parsePatterns:Z_,defaultParseWidth:"any"}),day:Xt({matchPatterns:Y_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:q_,defaultMatchWidth:"any",parsePatterns:J_,defaultParseWidth:"any"})},Yc={code:"id",formatDistance:__,formatLong:R_,formatRelative:$_,localize:V_,match:Q_,options:{weekStartsOn:1,firstWeekContainsDate:1}},eD={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},tD=(e,t,n)=>{let r;const i=eD[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"over "+r:r+" geleden":r},nD={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},rD={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},iD={full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aD={date:Er({formats:nD,defaultWidth:"full"}),time:Er({formats:rD,defaultWidth:"full"}),dateTime:Er({formats:iD,defaultWidth:"full"})},oD={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},sD=(e,t,n,r)=>oD[e],lD={narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},uD={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},cD={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},dD={narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},fD={narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},hD=(e,t)=>Number(e)+"e",gD={ordinalNumber:hD,era:Ut({values:lD,defaultWidth:"wide"}),quarter:Ut({values:uD,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:cD,defaultWidth:"wide"}),day:Ut({values:dD,defaultWidth:"wide"}),dayPeriod:Ut({values:fD,defaultWidth:"wide"})},pD=/^(\d+)e?/i,mD=/\d+/i,bD={narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},vD={any:[/^v/,/^n/]},yD={narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},xD={any:[/1/i,/2/i,/3/i,/4/i]},CD={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},ED={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},SD={narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},wD={narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},ID={any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},_D={any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},DD={ordinalNumber:qd({matchPattern:pD,parsePattern:mD,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:bD,defaultMatchWidth:"wide",parsePatterns:vD,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:yD,defaultMatchWidth:"wide",parsePatterns:xD,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:CD,defaultMatchWidth:"wide",parsePatterns:ED,defaultParseWidth:"any"}),day:Xt({matchPatterns:SD,defaultMatchWidth:"wide",parsePatterns:wD,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:ID,defaultMatchWidth:"any",parsePatterns:_D,defaultParseWidth:"any"})},nC={code:"nl",formatDistance:tD,formatLong:aD,formatRelative:sD,localize:gD,match:DD,options:{weekStartsOn:1,firstWeekContainsDate:4}},AD={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},TD=(e,t,n)=>{let r;const i=AD[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},RD={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},BD={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},$D={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},kD={date:Er({formats:RD,defaultWidth:"full"}),time:Er({formats:BD,defaultWidth:"full"}),dateTime:Er({formats:$D,defaultWidth:"full"})};function d1(e,t,n){const r="eeee p";return w_(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const PD={lastWeek:d1,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:d1,other:"PP p"},FD=(e,t,n,r)=>{const i=PD[e];return typeof i=="function"?i(t,n,r):i},ND={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},MD={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},LD={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},OD={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},VD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},HD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},jD=(e,t)=>{const n=Number(e);switch(t==null?void 0:t.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},WD={ordinalNumber:jD,era:Ut({values:ND,defaultWidth:"wide"}),quarter:Ut({values:MD,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ut({values:LD,defaultWidth:"wide"}),day:Ut({values:OD,defaultWidth:"wide"}),dayPeriod:Ut({values:VD,defaultWidth:"wide",formattingValues:HD,defaultFormattingWidth:"wide"})},zD=/^(第\s*)?\d+(日|时|分|秒)?/i,GD=/\d+/i,UD={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},XD={any:[/^(前)/i,/^(公元)/i]},ZD={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},YD={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},KD={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},qD={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},JD={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},QD={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},e6={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},t6={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},n6={ordinalNumber:qd({matchPattern:zD,parsePattern:GD,valueCallback:e=>parseInt(e,10)}),era:Xt({matchPatterns:UD,defaultMatchWidth:"wide",parsePatterns:XD,defaultParseWidth:"any"}),quarter:Xt({matchPatterns:ZD,defaultMatchWidth:"wide",parsePatterns:YD,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xt({matchPatterns:KD,defaultMatchWidth:"wide",parsePatterns:qD,defaultParseWidth:"any"}),day:Xt({matchPatterns:JD,defaultMatchWidth:"wide",parsePatterns:QD,defaultParseWidth:"any"}),dayPeriod:Xt({matchPatterns:e6,defaultMatchWidth:"any",parsePatterns:t6,defaultParseWidth:"any"})},rC={code:"zh-CN",formatDistance:TD,formatLong:kD,formatRelative:FD,localize:WD,match:n6,options:{weekStartsOn:1,firstWeekContainsDate:4}};var r6=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Uf=Math.ceil,cr=Math.floor,Pn="[BigNumber Error] ",f1=Pn+"Number primitive has more than 15 significant digits: ",_r=1e14,Le=14,h1=9007199254740991,Xf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ui=1e7,Un=1e9;function iC(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,l=-7,u=21,c=-1e7,d=1e7,h=!1,f=1,g=0,p={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},m="0123456789abcdefghijklmnopqrstuvwxyz",b=!0;function v(y,S){var D,A,T,F,k,P,$,R,O=this;if(!(O instanceof v))return new v(y,S);if(S==null){if(y&&y._isBigNumber===!0){O.s=y.s,!y.c||y.e>d?O.c=O.e=null:y.e<c?O.c=[O.e=0]:(O.e=y.e,O.c=y.c.slice());return}if((P=typeof y=="number")&&y*0==0){if(O.s=1/y<0?(y=-y,-1):1,y===~~y){for(F=0,k=y;k>=10;k/=10,F++);F>d?O.c=O.e=null:(O.e=F,O.c=[y]);return}R=String(y)}else{if(!r6.test(R=String(y)))return r(O,R,P);O.s=R.charCodeAt(0)==45?(R=R.slice(1),-1):1}(F=R.indexOf("."))>-1&&(R=R.replace(".","")),(k=R.search(/e/i))>0?(F<0&&(F=k),F+=+R.slice(k+1),R=R.substring(0,k)):F<0&&(F=R.length)}else{if(Rt(S,2,m.length,"Base"),S==10&&b)return O=new v(y),w(O,o+O.e+1,s);if(R=String(y),P=typeof y=="number"){if(y*0!=0)return r(O,R,P,S);if(O.s=1/y<0?(R=R.slice(1),-1):1,v.DEBUG&&R.replace(/^0\.0*|\./,"").length>15)throw Error(f1+y)}else O.s=R.charCodeAt(0)===45?(R=R.slice(1),-1):1;for(D=m.slice(0,S),F=k=0,$=R.length;k<$;k++)if(D.indexOf(A=R.charAt(k))<0){if(A=="."){if(k>F){F=$;continue}}else if(!T&&(R==R.toUpperCase()&&(R=R.toLowerCase())||R==R.toLowerCase()&&(R=R.toUpperCase()))){T=!0,k=-1,F=0;continue}return r(O,String(y),P,S)}P=!1,R=n(R,S,10,O.s),(F=R.indexOf("."))>-1?R=R.replace(".",""):F=R.length}for(k=0;R.charCodeAt(k)===48;k++);for($=R.length;R.charCodeAt(--$)===48;);if(R=R.slice(k,++$)){if($-=k,P&&v.DEBUG&&$>15&&(y>h1||y!==cr(y)))throw Error(f1+O.s*y);if((F=F-k-1)>d)O.c=O.e=null;else if(F<c)O.c=[O.e=0];else{if(O.e=F,O.c=[],k=(F+1)%Le,F<0&&(k+=Le),k<$){for(k&&O.c.push(+R.slice(0,k)),$-=Le;k<$;)O.c.push(+R.slice(k,k+=Le));k=Le-(R=R.slice(k)).length}else k-=$;for(;k--;R+="0");O.c.push(+R)}}else O.c=[O.e=0]}v.clone=iC,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(y){var S,D;if(y!=null)if(typeof y=="object"){if(y.hasOwnProperty(S="DECIMAL_PLACES")&&(D=y[S],Rt(D,0,Un,S),o=D),y.hasOwnProperty(S="ROUNDING_MODE")&&(D=y[S],Rt(D,0,8,S),s=D),y.hasOwnProperty(S="EXPONENTIAL_AT")&&(D=y[S],D&&D.pop?(Rt(D[0],-1e9,0,S),Rt(D[1],0,Un,S),l=D[0],u=D[1]):(Rt(D,-1e9,Un,S),l=-(u=D<0?-D:D))),y.hasOwnProperty(S="RANGE"))if(D=y[S],D&&D.pop)Rt(D[0],-1e9,-1,S),Rt(D[1],1,Un,S),c=D[0],d=D[1];else if(Rt(D,-1e9,Un,S),D)c=-(d=D<0?-D:D);else throw Error(Pn+S+" cannot be zero: "+D);if(y.hasOwnProperty(S="CRYPTO"))if(D=y[S],D===!!D)if(D)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))h=D;else throw h=!D,Error(Pn+"crypto unavailable");else h=D;else throw Error(Pn+S+" not true or false: "+D);if(y.hasOwnProperty(S="MODULO_MODE")&&(D=y[S],Rt(D,0,9,S),f=D),y.hasOwnProperty(S="POW_PRECISION")&&(D=y[S],Rt(D,0,Un,S),g=D),y.hasOwnProperty(S="FORMAT"))if(D=y[S],typeof D=="object")p=D;else throw Error(Pn+S+" not an object: "+D);if(y.hasOwnProperty(S="ALPHABET"))if(D=y[S],typeof D=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(D))b=D.slice(0,10)=="0123456789",m=D;else throw Error(Pn+S+" invalid: "+D)}else throw Error(Pn+"Object expected: "+y);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,u],RANGE:[c,d],CRYPTO:h,MODULO_MODE:f,POW_PRECISION:g,FORMAT:p,ALPHABET:m}},v.isBigNumber=function(y){if(!y||y._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var S,D,A=y.c,T=y.e,F=y.s;e:if({}.toString.call(A)=="[object Array]"){if((F===1||F===-1)&&T>=-1e9&&T<=Un&&T===cr(T)){if(A[0]===0){if(T===0&&A.length===1)return!0;break e}if(S=(T+1)%Le,S<1&&(S+=Le),String(A[0]).length==S){for(S=0;S<A.length;S++)if(D=A[S],D<0||D>=_r||D!==cr(D))break e;if(D!==0)return!0}}}else if(A===null&&T===null&&(F===null||F===1||F===-1))return!0;throw Error(Pn+"Invalid BigNumber: "+y)},v.maximum=v.max=function(){return C(arguments,-1)},v.minimum=v.min=function(){return C(arguments,1)},v.random=function(){var y=9007199254740992,S=Math.random()*y&2097151?function(){return cr(Math.random()*y)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(D){var A,T,F,k,P,$=0,R=[],O=new v(a);if(D==null?D=o:Rt(D,0,Un),k=Uf(D/Le),h)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(k*=2));$<k;)P=A[$]*131072+(A[$+1]>>>11),P>=9e15?(T=crypto.getRandomValues(new Uint32Array(2)),A[$]=T[0],A[$+1]=T[1]):(R.push(P%1e14),$+=2);$=k/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(k*=7);$<k;)P=(A[$]&31)*281474976710656+A[$+1]*1099511627776+A[$+2]*4294967296+A[$+3]*16777216+(A[$+4]<<16)+(A[$+5]<<8)+A[$+6],P>=9e15?crypto.randomBytes(7).copy(A,$):(R.push(P%1e14),$+=7);$=k/7}else throw h=!1,Error(Pn+"crypto unavailable");if(!h)for(;$<k;)P=S(),P<9e15&&(R[$++]=P%1e14);for(k=R[--$],D%=Le,k&&D&&(P=Xf[Le-D],R[$]=cr(k/P)*P);R[$]===0;R.pop(),$--);if($<0)R=[F=0];else{for(F=-1;R[0]===0;R.splice(0,1),F-=Le);for($=1,P=R[0];P>=10;P/=10,$++);$<Le&&(F-=Le-$)}return O.e=F,O.c=R,O}}(),v.sum=function(){for(var y=1,S=arguments,D=new v(S[0]);y<S.length;)D=D.plus(S[y++]);return D},n=function(){var y="0123456789";function S(D,A,T,F){for(var k,P=[0],$,R=0,O=D.length;R<O;){for($=P.length;$--;P[$]*=A);for(P[0]+=F.indexOf(D.charAt(R++)),k=0;k<P.length;k++)P[k]>T-1&&(P[k+1]==null&&(P[k+1]=0),P[k+1]+=P[k]/T|0,P[k]%=T)}return P.reverse()}return function(D,A,T,F,k){var P,$,R,O,j,V,W,U,K=D.indexOf("."),ee=o,z=s;for(K>=0&&(O=g,g=0,D=D.replace(".",""),U=new v(A),V=U.pow(D.length-K),g=O,U.c=S(mi(sr(V.c),V.e,"0"),10,T,y),U.e=U.c.length),W=S(D,A,T,k?(P=m,y):(P=y,m)),R=O=W.length;W[--O]==0;W.pop());if(!W[0])return P.charAt(0);if(K<0?--R:(V.c=W,V.e=R,V.s=F,V=t(V,U,ee,z,T),W=V.c,j=V.r,R=V.e),$=R+ee+1,K=W[$],O=T/2,j=j||$<0||W[$+1]!=null,j=z<4?(K!=null||j)&&(z==0||z==(V.s<0?3:2)):K>O||K==O&&(z==4||j||z==6&&W[$-1]&1||z==(V.s<0?8:7)),$<1||!W[0])D=j?mi(P.charAt(1),-ee,P.charAt(0)):P.charAt(0);else{if(W.length=$,j)for(--T;++W[--$]>T;)W[$]=0,$||(++R,W=[1].concat(W));for(O=W.length;!W[--O];);for(K=0,D="";K<=O;D+=P.charAt(W[K++]));D=mi(D,R,P.charAt(0))}return D}}(),t=function(){function y(A,T,F){var k,P,$,R,O=0,j=A.length,V=T%Ui,W=T/Ui|0;for(A=A.slice();j--;)$=A[j]%Ui,R=A[j]/Ui|0,k=W*$+R*V,P=V*$+k%Ui*Ui+O,O=(P/F|0)+(k/Ui|0)+W*R,A[j]=P%F;return O&&(A=[O].concat(A)),A}function S(A,T,F,k){var P,$;if(F!=k)$=F>k?1:-1;else for(P=$=0;P<F;P++)if(A[P]!=T[P]){$=A[P]>T[P]?1:-1;break}return $}function D(A,T,F,k){for(var P=0;F--;)A[F]-=P,P=A[F]<T[F]?1:0,A[F]=P*k+A[F]-T[F];for(;!A[0]&&A.length>1;A.splice(0,1));}return function(A,T,F,k,P){var $,R,O,j,V,W,U,K,ee,z,H,X,te,ie,le,ce,Q,be=A.s==T.s?1:-1,Ce=A.c,Se=T.c;if(!Ce||!Ce[0]||!Se||!Se[0])return new v(!A.s||!T.s||(Ce?Se&&Ce[0]==Se[0]:!Se)?NaN:Ce&&Ce[0]==0||!Se?be*0:be/0);for(K=new v(be),ee=K.c=[],R=A.e-T.e,be=F+R+1,P||(P=_r,R=dr(A.e/Le)-dr(T.e/Le),be=be/Le|0),O=0;Se[O]==(Ce[O]||0);O++);if(Se[O]>(Ce[O]||0)&&R--,be<0)ee.push(1),j=!0;else{for(ie=Ce.length,ce=Se.length,O=0,be+=2,V=cr(P/(Se[0]+1)),V>1&&(Se=y(Se,V,P),Ce=y(Ce,V,P),ce=Se.length,ie=Ce.length),te=ce,z=Ce.slice(0,ce),H=z.length;H<ce;z[H++]=0);Q=Se.slice(),Q=[0].concat(Q),le=Se[0],Se[1]>=P/2&&le++;do{if(V=0,$=S(Se,z,ce,H),$<0){if(X=z[0],ce!=H&&(X=X*P+(z[1]||0)),V=cr(X/le),V>1)for(V>=P&&(V=P-1),W=y(Se,V,P),U=W.length,H=z.length;S(W,z,U,H)==1;)V--,D(W,ce<U?Q:Se,U,P),U=W.length,$=1;else V==0&&($=V=1),W=Se.slice(),U=W.length;if(U<H&&(W=[0].concat(W)),D(z,W,H,P),H=z.length,$==-1)for(;S(Se,z,ce,H)<1;)V++,D(z,ce<H?Q:Se,H,P),H=z.length}else $===0&&(V++,z=[0]);ee[O++]=V,z[0]?z[H++]=Ce[te]||0:(z=[Ce[te]],H=1)}while((te++<ie||z[0]!=null)&&be--);j=z[0]!=null,ee[0]||ee.splice(0,1)}if(P==_r){for(O=1,be=ee[0];be>=10;be/=10,O++);w(K,F+(K.e=O+R*Le-1)+1,k,j)}else K.e=R,K.r=+j;return K}}();function x(y,S,D,A){var T,F,k,P,$;if(D==null?D=s:Rt(D,0,8),!y.c)return y.toString();if(T=y.c[0],k=y.e,S==null)$=sr(y.c),$=A==1||A==2&&(k<=l||k>=u)?Ru($,k):mi($,k,"0");else if(y=w(new v(y),S,D),F=y.e,$=sr(y.c),P=$.length,A==1||A==2&&(S<=F||F<=l)){for(;P<S;$+="0",P++);$=Ru($,F)}else if(S-=k,$=mi($,F,"0"),F+1>P){if(--S>0)for($+=".";S--;$+="0");}else if(S+=F-P,S>0)for(F+1==P&&($+=".");S--;$+="0");return y.s<0&&T?"-"+$:$}function C(y,S){for(var D,A,T=1,F=new v(y[0]);T<y.length;T++)A=new v(y[T]),(!A.s||(D=$a(F,A))===S||D===0&&F.s===S)&&(F=A);return F}function E(y,S,D){for(var A=1,T=S.length;!S[--T];S.pop());for(T=S[0];T>=10;T/=10,A++);return(D=A+D*Le-1)>d?y.c=y.e=null:D<c?y.c=[y.e=0]:(y.e=D,y.c=S),y}r=function(){var y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,D=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,k,P,$){var R,O=P?k:k.replace(T,"");if(A.test(O))F.s=isNaN(O)?null:O<0?-1:1;else{if(!P&&(O=O.replace(y,function(j,V,W){return R=(W=W.toLowerCase())=="x"?16:W=="b"?2:8,!$||$==R?V:j}),$&&(R=$,O=O.replace(S,"$1").replace(D,"0.$1")),k!=O))return new v(O,R);if(v.DEBUG)throw Error(Pn+"Not a"+($?" base "+$:"")+" number: "+k);F.s=null}F.c=F.e=null}}();function w(y,S,D,A){var T,F,k,P,$,R,O,j=y.c,V=Xf;if(j){e:{for(T=1,P=j[0];P>=10;P/=10,T++);if(F=S-T,F<0)F+=Le,k=S,$=j[R=0],O=cr($/V[T-k-1]%10);else if(R=Uf((F+1)/Le),R>=j.length)if(A){for(;j.length<=R;j.push(0));$=O=0,T=1,F%=Le,k=F-Le+1}else break e;else{for($=P=j[R],T=1;P>=10;P/=10,T++);F%=Le,k=F-Le+T,O=k<0?0:cr($/V[T-k-1]%10)}if(A=A||S<0||j[R+1]!=null||(k<0?$:$%V[T-k-1]),A=D<4?(O||A)&&(D==0||D==(y.s<0?3:2)):O>5||O==5&&(D==4||A||D==6&&(F>0?k>0?$/V[T-k]:0:j[R-1])%10&1||D==(y.s<0?8:7)),S<1||!j[0])return j.length=0,A?(S-=y.e+1,j[0]=V[(Le-S%Le)%Le],y.e=-S||0):j[0]=y.e=0,y;if(F==0?(j.length=R,P=1,R--):(j.length=R+1,P=V[Le-F],j[R]=k>0?cr($/V[T-k]%V[k])*P:0),A)for(;;)if(R==0){for(F=1,k=j[0];k>=10;k/=10,F++);for(k=j[0]+=P,P=1;k>=10;k/=10,P++);F!=P&&(y.e++,j[0]==_r&&(j[0]=1));break}else{if(j[R]+=P,j[R]!=_r)break;j[R--]=0,P=1}for(F=j.length;j[--F]===0;j.pop());}y.e>d?y.c=y.e=null:y.e<c&&(y.c=[y.e=0])}return y}function B(y){var S,D=y.e;return D===null?y.toString():(S=sr(y.c),S=D<=l||D>=u?Ru(S,D):mi(S,D,"0"),y.s<0?"-"+S:S)}return i.absoluteValue=i.abs=function(){var y=new v(this);return y.s<0&&(y.s=1),y},i.comparedTo=function(y,S){return $a(this,new v(y,S))},i.decimalPlaces=i.dp=function(y,S){var D,A,T,F=this;if(y!=null)return Rt(y,0,Un),S==null?S=s:Rt(S,0,8),w(new v(F),y+F.e+1,S);if(!(D=F.c))return null;if(A=((T=D.length-1)-dr(this.e/Le))*Le,T=D[T])for(;T%10==0;T/=10,A--);return A<0&&(A=0),A},i.dividedBy=i.div=function(y,S){return t(this,new v(y,S),o,s)},i.dividedToIntegerBy=i.idiv=function(y,S){return t(this,new v(y,S),0,1)},i.exponentiatedBy=i.pow=function(y,S){var D,A,T,F,k,P,$,R,O,j=this;if(y=new v(y),y.c&&!y.isInteger())throw Error(Pn+"Exponent not an integer: "+B(y));if(S!=null&&(S=new v(S)),P=y.e>14,!j.c||!j.c[0]||j.c[0]==1&&!j.e&&j.c.length==1||!y.c||!y.c[0])return O=new v(Math.pow(+B(j),P?y.s*(2-Tu(y)):+B(y))),S?O.mod(S):O;if($=y.s<0,S){if(S.c?!S.c[0]:!S.s)return new v(NaN);A=!$&&j.isInteger()&&S.isInteger(),A&&(j=j.mod(S))}else{if(y.e>9&&(j.e>0||j.e<-1||(j.e==0?j.c[0]>1||P&&j.c[1]>=24e7:j.c[0]<8e13||P&&j.c[0]<=9999975e7)))return F=j.s<0&&Tu(y)?-0:0,j.e>-1&&(F=1/F),new v($?1/F:F);g&&(F=Uf(g/Le+2))}for(P?(D=new v(.5),$&&(y.s=1),R=Tu(y)):(T=Math.abs(+B(y)),R=T%2),O=new v(a);;){if(R){if(O=O.times(j),!O.c)break;F?O.c.length>F&&(O.c.length=F):A&&(O=O.mod(S))}if(T){if(T=cr(T/2),T===0)break;R=T%2}else if(y=y.times(D),w(y,y.e+1,1),y.e>14)R=Tu(y);else{if(T=+B(y),T===0)break;R=T%2}j=j.times(j),F?j.c&&j.c.length>F&&(j.c.length=F):A&&(j=j.mod(S))}return A?O:($&&(O=a.div(O)),S?O.mod(S):F?w(O,g,s,k):O)},i.integerValue=function(y){var S=new v(this);return y==null?y=s:Rt(y,0,8),w(S,S.e+1,y)},i.isEqualTo=i.eq=function(y,S){return $a(this,new v(y,S))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(y,S){return $a(this,new v(y,S))>0},i.isGreaterThanOrEqualTo=i.gte=function(y,S){return(S=$a(this,new v(y,S)))===1||S===0},i.isInteger=function(){return!!this.c&&dr(this.e/Le)>this.c.length-2},i.isLessThan=i.lt=function(y,S){return $a(this,new v(y,S))<0},i.isLessThanOrEqualTo=i.lte=function(y,S){return(S=$a(this,new v(y,S)))===-1||S===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(y,S){var D,A,T,F,k=this,P=k.s;if(y=new v(y,S),S=y.s,!P||!S)return new v(NaN);if(P!=S)return y.s=-S,k.plus(y);var $=k.e/Le,R=y.e/Le,O=k.c,j=y.c;if(!$||!R){if(!O||!j)return O?(y.s=-S,y):new v(j?k:NaN);if(!O[0]||!j[0])return j[0]?(y.s=-S,y):new v(O[0]?k:s==3?-0:0)}if($=dr($),R=dr(R),O=O.slice(),P=$-R){for((F=P<0)?(P=-P,T=O):(R=$,T=j),T.reverse(),S=P;S--;T.push(0));T.reverse()}else for(A=(F=(P=O.length)<(S=j.length))?P:S,P=S=0;S<A;S++)if(O[S]!=j[S]){F=O[S]<j[S];break}if(F&&(T=O,O=j,j=T,y.s=-y.s),S=(A=j.length)-(D=O.length),S>0)for(;S--;O[D++]=0);for(S=_r-1;A>P;){if(O[--A]<j[A]){for(D=A;D&&!O[--D];O[D]=S);--O[D],O[A]+=_r}O[A]-=j[A]}for(;O[0]==0;O.splice(0,1),--R);return O[0]?E(y,O,R):(y.s=s==3?-1:1,y.c=[y.e=0],y)},i.modulo=i.mod=function(y,S){var D,A,T=this;return y=new v(y,S),!T.c||!y.s||y.c&&!y.c[0]?new v(NaN):!y.c||T.c&&!T.c[0]?new v(T):(f==9?(A=y.s,y.s=1,D=t(T,y,0,3),y.s=A,D.s*=A):D=t(T,y,0,f),y=T.minus(D.times(y)),!y.c[0]&&f==1&&(y.s=T.s),y)},i.multipliedBy=i.times=function(y,S){var D,A,T,F,k,P,$,R,O,j,V,W,U,K,ee,z=this,H=z.c,X=(y=new v(y,S)).c;if(!H||!X||!H[0]||!X[0])return!z.s||!y.s||H&&!H[0]&&!X||X&&!X[0]&&!H?y.c=y.e=y.s=null:(y.s*=z.s,!H||!X?y.c=y.e=null:(y.c=[0],y.e=0)),y;for(A=dr(z.e/Le)+dr(y.e/Le),y.s*=z.s,$=H.length,j=X.length,$<j&&(U=H,H=X,X=U,T=$,$=j,j=T),T=$+j,U=[];T--;U.push(0));for(K=_r,ee=Ui,T=j;--T>=0;){for(D=0,V=X[T]%ee,W=X[T]/ee|0,k=$,F=T+k;F>T;)R=H[--k]%ee,O=H[k]/ee|0,P=W*R+O*V,R=V*R+P%ee*ee+U[F]+D,D=(R/K|0)+(P/ee|0)+W*O,U[F--]=R%K;U[F]=D}return D?++A:U.splice(0,1),E(y,U,A)},i.negated=function(){var y=new v(this);return y.s=-y.s||null,y},i.plus=function(y,S){var D,A=this,T=A.s;if(y=new v(y,S),S=y.s,!T||!S)return new v(NaN);if(T!=S)return y.s=-S,A.minus(y);var F=A.e/Le,k=y.e/Le,P=A.c,$=y.c;if(!F||!k){if(!P||!$)return new v(T/0);if(!P[0]||!$[0])return $[0]?y:new v(P[0]?A:T*0)}if(F=dr(F),k=dr(k),P=P.slice(),T=F-k){for(T>0?(k=F,D=$):(T=-T,D=P),D.reverse();T--;D.push(0));D.reverse()}for(T=P.length,S=$.length,T-S<0&&(D=$,$=P,P=D,S=T),T=0;S;)T=(P[--S]=P[S]+$[S]+T)/_r|0,P[S]=_r===P[S]?0:P[S]%_r;return T&&(P=[T].concat(P),++k),E(y,P,k)},i.precision=i.sd=function(y,S){var D,A,T,F=this;if(y!=null&&y!==!!y)return Rt(y,1,Un),S==null?S=s:Rt(S,0,8),w(new v(F),y,S);if(!(D=F.c))return null;if(T=D.length-1,A=T*Le+1,T=D[T]){for(;T%10==0;T/=10,A--);for(T=D[0];T>=10;T/=10,A++);}return y&&F.e+1>A&&(A=F.e+1),A},i.shiftedBy=function(y){return Rt(y,-9007199254740991,h1),this.times("1e"+y)},i.squareRoot=i.sqrt=function(){var y,S,D,A,T,F=this,k=F.c,P=F.s,$=F.e,R=o+4,O=new v("0.5");if(P!==1||!k||!k[0])return new v(!P||P<0&&(!k||k[0])?NaN:k?F:1/0);if(P=Math.sqrt(+B(F)),P==0||P==1/0?(S=sr(k),(S.length+$)%2==0&&(S+="0"),P=Math.sqrt(+S),$=dr(($+1)/2)-($<0||$%2),P==1/0?S="5e"+$:(S=P.toExponential(),S=S.slice(0,S.indexOf("e")+1)+$),D=new v(S)):D=new v(P+""),D.c[0]){for($=D.e,P=$+R,P<3&&(P=0);;)if(T=D,D=O.times(T.plus(t(F,T,R,1))),sr(T.c).slice(0,P)===(S=sr(D.c)).slice(0,P))if(D.e<$&&--P,S=S.slice(P-3,P+1),S=="9999"||!A&&S=="4999"){if(!A&&(w(T,T.e+o+2,0),T.times(T).eq(F))){D=T;break}R+=4,P+=4,A=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(w(D,D.e+o+2,1),y=!D.times(D).eq(F));break}}return w(D,D.e+o+1,s,y)},i.toExponential=function(y,S){return y!=null&&(Rt(y,0,Un),y++),x(this,y,S,1)},i.toFixed=function(y,S){return y!=null&&(Rt(y,0,Un),y=y+this.e+1),x(this,y,S)},i.toFormat=function(y,S,D){var A,T=this;if(D==null)y!=null&&S&&typeof S=="object"?(D=S,S=null):y&&typeof y=="object"?(D=y,y=S=null):D=p;else if(typeof D!="object")throw Error(Pn+"Argument not an object: "+D);if(A=T.toFixed(y,S),T.c){var F,k=A.split("."),P=+D.groupSize,$=+D.secondaryGroupSize,R=D.groupSeparator||"",O=k[0],j=k[1],V=T.s<0,W=V?O.slice(1):O,U=W.length;if($&&(F=P,P=$,$=F,U-=F),P>0&&U>0){for(F=U%P||P,O=W.substr(0,F);F<U;F+=P)O+=R+W.substr(F,P);$>0&&(O+=R+W.slice(F)),V&&(O="-"+O)}A=j?O+(D.decimalSeparator||"")+(($=+D.fractionGroupSize)?j.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(D.fractionGroupSeparator||"")):j):O}return(D.prefix||"")+A+(D.suffix||"")},i.toFraction=function(y){var S,D,A,T,F,k,P,$,R,O,j,V,W=this,U=W.c;if(y!=null&&(P=new v(y),!P.isInteger()&&(P.c||P.s!==1)||P.lt(a)))throw Error(Pn+"Argument "+(P.isInteger()?"out of range: ":"not an integer: ")+B(P));if(!U)return new v(W);for(S=new v(a),R=D=new v(a),A=$=new v(a),V=sr(U),F=S.e=V.length-W.e-1,S.c[0]=Xf[(k=F%Le)<0?Le+k:k],y=!y||P.comparedTo(S)>0?F>0?S:R:P,k=d,d=1/0,P=new v(V),$.c[0]=0;O=t(P,S,0,1),T=D.plus(O.times(A)),T.comparedTo(y)!=1;)D=A,A=T,R=$.plus(O.times(T=R)),$=T,S=P.minus(O.times(T=S)),P=T;return T=t(y.minus(D),A,0,1),$=$.plus(T.times(R)),D=D.plus(T.times(A)),$.s=R.s=W.s,F=F*2,j=t(R,A,F,s).minus(W).abs().comparedTo(t($,D,F,s).minus(W).abs())<1?[R,A]:[$,D],d=k,j},i.toNumber=function(){return+B(this)},i.toPrecision=function(y,S){return y!=null&&Rt(y,1,Un),x(this,y,S,2)},i.toString=function(y){var S,D=this,A=D.s,T=D.e;return T===null?A?(S="Infinity",A<0&&(S="-"+S)):S="NaN":(y==null?S=T<=l||T>=u?Ru(sr(D.c),T):mi(sr(D.c),T,"0"):y===10&&b?(D=w(new v(D),o+T+1,s),S=mi(sr(D.c),D.e,"0")):(Rt(y,2,m.length,"Base"),S=n(mi(sr(D.c),T,"0"),10,y,A,!0)),A<0&&D.c[0]&&(S="-"+S)),S},i.valueOf=i.toJSON=function(){return B(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,e!=null&&v.set(e),v}function dr(e){var t=e|0;return e>0||e===t?t:t-1}function sr(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=Le-t.length;n--;t="0"+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function $a(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(s=(l=i.length)<(u=a.length)?l:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return l==u?0:l>u^n?1:-1}function Rt(e,t,n,r){if(e<t||e>n||e!==cr(e))throw Error(Pn+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Tu(e){var t=e.c.length-1;return dr(e.e/Le)==t&&e.c[t]%2!=0}function Ru(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function mi(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Jd=iC();const aC={ROUNDING_MODE:Jd.ROUND_HALF_UP,EXPONENTIAL_AT:[-1e9,1e9]};let x0=!1;const i6=(e=aC)=>{x0||(Jd.config(e),x0=!0)},At=(e,t)=>(x0||i6(),new Jd(e,t));var a6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s6(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ze={options:{usePureJavaScript:!1}},Kg={},l6=Kg,g1={};Kg.encode=function(e,t,n){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(n!==void 0&&typeof n!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=u6(e,t);else{var i=0,a=t.length,o=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var l=0,u=e[i];l<s.length;++l)u+=s[l]<<8,s[l]=u%a,u=u/a|0;for(;u>0;)s.push(u%a),u=u/a|0}for(i=0;e[i]===0&&i<e.length-1;++i)r+=o;for(i=s.length-1;i>=0;--i)r+=t[s[i]]}if(n){var c=new RegExp(".{1,"+n+"}","g");r=r.match(c).join(`\r
|
|
2
2
|
`)}return r};Kg.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var n=g1[t];if(!n){n=g1[t]=[];for(var r=0;r<t.length;++r)n[t.charCodeAt(r)]=r}e=e.replace(/\s/g,"");for(var i=t.length,a=t.charAt(0),o=[0],r=0;r<e.length;r++){var s=n[e.charCodeAt(r)];if(s===void 0)return;for(var l=0,u=s;l<o.length;++l)u+=o[l]*i,o[l]=u&255,u>>=8;for(;u>0;)o.push(u&255),u>>=8}for(var c=0;e[c]===a&&c<e.length-1;++c)o.push(0);return typeof Buffer<"u"?Buffer.from(o.reverse()):new Uint8Array(o.reverse())};function u6(e,t){var n=0,r=t.length,i=t.charAt(0),a=[0];for(n=0;n<e.length();++n){for(var o=0,s=e.at(n);o<a.length;++o)s+=a[o]<<8,a[o]=s%r,s=s/r|0;for(;s>0;)a.push(s%r),s=s/r|0}var l="";for(n=0;e.at(n)===0&&n<e.length()-1;++n)l+=i;for(n=a.length-1;n>=0;--n)l+=t[a[n]];return l}var p1=ze,m1=l6,Y=p1.util=p1.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){Y.nextTick=process.nextTick,typeof setImmediate=="function"?Y.setImmediate=setImmediate:Y.setImmediate=Y.nextTick;return}if(typeof setImmediate=="function"){Y.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Y.nextTick=function(o){return setImmediate(o)};return}if(Y.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(s){if(s.source===window&&s.data===e){s.stopPropagation();var l=t.slice();t.length=0,l.forEach(function(u){u()})}};var e="forge.setImmediate",t=[];Y.setImmediate=function(s){t.push(s),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var n=Date.now(),r=!0,i=document.createElement("div"),t=[];new MutationObserver(function(){var s=t.slice();t.length=0,s.forEach(function(l){l()})}).observe(i,{attributes:!0});var a=Y.setImmediate;Y.setImmediate=function(s){Date.now()-n>15?(n=Date.now(),a(s)):(t.push(s),t.length===1&&i.setAttribute("a",r=!r))}}Y.nextTick=Y.setImmediate})();Y.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Y.globalScope=function(){return Y.isNodejs?a6:typeof self>"u"?window:self}();Y.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};Y.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};Y.isArrayBufferView=function(e){return e&&Y.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function du(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}Y.ByteBuffer=qg;function qg(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(Y.isArrayBuffer(e)||Y.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var n=0;n<t.length;++n)this.putByte(t[n])}}else(e instanceof qg||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}Y.ByteStringBuffer=qg;var c6=4096;Y.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>c6&&(this.data.substr(0,1),this._constructedStringLength=0)};Y.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Y.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Y.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};Y.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this};Y.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};Y.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(Y.encodeUtf8(e))};Y.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Y.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Y.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Y.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};Y.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};Y.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};Y.ByteStringBuffer.prototype.putInt=function(e,t){du(t);var n="";do t-=8,n+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(n)};Y.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};Y.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};Y.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};Y.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};Y.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};Y.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e};Y.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};Y.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};Y.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e};Y.ByteStringBuffer.prototype.getInt=function(e){du(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};Y.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t};Y.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};Y.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};Y.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};Y.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};Y.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Y.ByteStringBuffer.prototype.copy=function(){var e=Y.createBuffer(this.data);return e.read=this.read,e};Y.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};Y.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Y.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};Y.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var n=this.data.charCodeAt(t);n<16&&(e+="0"),e+=n.toString(16)}return e};Y.ByteStringBuffer.prototype.toString=function(){return Y.decodeUtf8(this.bytes())};function d6(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var n=Y.isArrayBuffer(e),r=Y.isArrayBufferView(e);if(n||r){n?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}Y.DataBuffer=d6;Y.DataBuffer.prototype.length=function(){return this.write-this.read};Y.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};Y.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(n),this.data=new DataView(r.buffer),this};Y.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};Y.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var n=0;n<t;++n)this.data.setUint8(e);return this};Y.DataBuffer.prototype.putBytes=function(e,t){if(Y.isArrayBufferView(e)){var n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=n.byteLength-n.byteOffset;this.accommodate(r);var i=new Uint8Array(this.data.buffer,this.write);return i.set(n),this.write+=r,this}if(Y.isArrayBuffer(e)){var n=new Uint8Array(e);this.accommodate(n.byteLength);var i=new Uint8Array(this.data.buffer);return i.set(n,this.write),this.write+=n.byteLength,this}if(e instanceof Y.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&Y.isArrayBufferView(e.data)){var n=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(n.byteLength);var i=new Uint8Array(e.data.byteLength,this.write);return i.set(n),this.write+=n.byteLength,this}if(e instanceof Y.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var a;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),a=new Uint8Array(this.data.buffer,this.write),this.write+=Y.binary.hex.decode(e,a,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),a=new Uint8Array(this.data.buffer,this.write),this.write+=Y.binary.base64.decode(e,a,this.write),this;if(t==="utf8"&&(e=Y.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),a=new Uint8Array(this.data.buffer,this.write),this.write+=Y.binary.raw.decode(a),this;if(t==="utf16")return this.accommodate(e.length*2),a=new Uint16Array(this.data.buffer,this.write),this.write+=Y.text.utf16.encode(a),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};Y.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};Y.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};Y.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};Y.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};Y.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};Y.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};Y.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};Y.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};Y.DataBuffer.prototype.putInt=function(e,t){du(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};Y.DataBuffer.prototype.putSignedInt=function(e,t){return du(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};Y.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};Y.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};Y.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};Y.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};Y.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};Y.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};Y.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};Y.DataBuffer.prototype.getInt=function(e){du(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};Y.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t};Y.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};Y.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};Y.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};Y.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};Y.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Y.DataBuffer.prototype.copy=function(){return new Y.DataBuffer(this)};Y.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};Y.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Y.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};Y.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var n=this.data.getUint8(t);n<16&&(e+="0"),e+=n.toString(16)}return e};Y.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return Y.binary.raw.encode(t);if(e==="hex")return Y.binary.hex.encode(t);if(e==="base64")return Y.binary.base64.encode(t);if(e==="utf8")return Y.text.utf8.decode(t);if(e==="utf16")return Y.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};Y.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=Y.encodeUtf8(e)),new Y.ByteBuffer(e)};Y.fillString=function(e,t){for(var n="";t>0;)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return n};Y.xorBytes=function(e,t,n){for(var r="",i="",a="",o=0,s=0;n>0;--n,++o)i=e.charCodeAt(o)^t.charCodeAt(o),s>=10&&(r+=a,a="",s=0),a+=String.fromCharCode(i),++s;return r+=a,r};Y.hexToBytes=function(e){var t="",n=0;for(e.length&!0&&(n=1,t+=String.fromCharCode(parseInt(e[0],16)));n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return t};Y.bytesToHex=function(e){return Y.createBuffer(e).toHex()};Y.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var ia="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",aa=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],oC="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Y.encode64=function(e,t){for(var n="",r="",i,a,o,s=0;s<e.length;)i=e.charCodeAt(s++),a=e.charCodeAt(s++),o=e.charCodeAt(s++),n+=ia.charAt(i>>2),n+=ia.charAt((i&3)<<4|a>>4),isNaN(a)?n+="==":(n+=ia.charAt((a&15)<<2|o>>6),n+=isNaN(o)?"=":ia.charAt(o&63)),t&&n.length>t&&(r+=n.substr(0,t)+`\r
|
|
3
3
|
`,n=n.substr(t));return r+=n,r};Y.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",n,r,i,a,o=0;o<e.length;)n=aa[e.charCodeAt(o++)-43],r=aa[e.charCodeAt(o++)-43],i=aa[e.charCodeAt(o++)-43],a=aa[e.charCodeAt(o++)-43],t+=String.fromCharCode(n<<2|r>>4),i!==64&&(t+=String.fromCharCode((r&15)<<4|i>>2),a!==64&&(t+=String.fromCharCode((i&3)<<6|a)));return t};Y.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};Y.decodeUtf8=function(e){return decodeURIComponent(escape(e))};Y.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:m1.encode,decode:m1.decode}};Y.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};Y.binary.raw.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var i=n,a=0;a<e.length;++a)r[i++]=e.charCodeAt(a);return t?i-n:r};Y.binary.hex.encode=Y.bytesToHex;Y.binary.hex.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),n=n||0;var i=0,a=n;for(e.length&1&&(i=1,r[a++]=parseInt(e[0],16));i<e.length;i+=2)r[a++]=parseInt(e.substr(i,2),16);return t?a-n:r};Y.binary.base64.encode=function(e,t){for(var n="",r="",i,a,o,s=0;s<e.byteLength;)i=e[s++],a=e[s++],o=e[s++],n+=ia.charAt(i>>2),n+=ia.charAt((i&3)<<4|a>>4),isNaN(a)?n+="==":(n+=ia.charAt((a&15)<<2|o>>6),n+=isNaN(o)?"=":ia.charAt(o&63)),t&&n.length>t&&(r+=n.substr(0,t)+`\r
|
|
4
4
|
`,n=n.substr(t));return r+=n,r};Y.binary.base64.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),n=n||0;for(var i,a,o,s,l=0,u=n;l<e.length;)i=aa[e.charCodeAt(l++)-43],a=aa[e.charCodeAt(l++)-43],o=aa[e.charCodeAt(l++)-43],s=aa[e.charCodeAt(l++)-43],r[u++]=i<<2|a>>4,o!==64&&(r[u++]=(a&15)<<4|o>>2,s!==64&&(r[u++]=(o&3)<<6|s));return t?u-n:r.subarray(0,u)};Y.binary.base58.encode=function(e,t){return Y.binary.baseN.encode(e,oC,t)};Y.binary.base58.decode=function(e,t){return Y.binary.baseN.decode(e,oC,t)};Y.text={utf8:{},utf16:{}};Y.text.utf8.encode=function(e,t,n){e=Y.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var i=n,a=0;a<e.length;++a)r[i++]=e.charCodeAt(a);return t?i-n:r};Y.text.utf8.decode=function(e){return Y.decodeUtf8(String.fromCharCode.apply(null,e))};Y.text.utf16.encode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length*2));var i=new Uint16Array(r.buffer);n=n||0;for(var a=n,o=n,s=0;s<e.length;++s)i[o++]=e.charCodeAt(s),a+=2;return t?a-n:r};Y.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};Y.deflate=function(e,t,n){if(t=Y.decode64(e.deflate(Y.encode64(t)).rval),n){var r=2,i=t.charCodeAt(1);i&32&&(r=6),t=t.substring(r,t.length-4)}return t};Y.inflate=function(e,t,n){var r=e.inflate(Y.encode64(t)).rval;return r===null?null:Y.decode64(r)};var Jg=function(e,t,n){if(!e)throw new Error("WebStorage not available.");var r;if(n===null?r=e.removeItem(t):(n=Y.encode64(JSON.stringify(n)),r=e.setItem(t,n)),typeof r<"u"&&r.rval!==!0){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}},Qg=function(e,t){if(!e)throw new Error("WebStorage not available.");var n=e.getItem(t);if(e.init)if(n.rval===null){if(n.error){var r=new Error(n.error.message);throw r.id=n.error.id,r.name=n.error.name,r}n=null}else n=n.rval;return n!==null&&(n=JSON.parse(Y.decode64(n))),n},f6=function(e,t,n,r){var i=Qg(e,t);i===null&&(i={}),i[n]=r,Jg(e,t,i)},h6=function(e,t,n){var r=Qg(e,t);return r!==null&&(r=n in r?r[n]:null),r},g6=function(e,t,n){var r=Qg(e,t);if(r!==null&&n in r){delete r[n];var i=!0;for(var a in r){i=!1;break}i&&(r=null),Jg(e,t,r)}},p6=function(e,t){Jg(e,t,null)},Qd=function(e,t,n){var r=null;typeof n>"u"&&(n=["web","flash"]);var i,a=!1,o=null;for(var s in n){i=n[s];try{if(i==="flash"||i==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),a=i==="flash"}(i==="web"||i==="both")&&(t[0]=localStorage,r=e.apply(this,t),a=!0)}catch(l){o=l}if(a)break}if(!a)throw o;return r};Y.setItem=function(e,t,n,r,i){Qd(f6,arguments,i)};Y.getItem=function(e,t,n,r){return Qd(h6,arguments,r)};Y.removeItem=function(e,t,n,r){Qd(g6,arguments,r)};Y.clearItems=function(e,t,n){Qd(p6,arguments,n)};Y.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};Y.format=function(e){for(var t=/%./g,n,r,i=0,a=[],o=0;n=t.exec(e);){r=e.substring(o,t.lastIndex-2),r.length>0&&a.push(r),o=t.lastIndex;var s=n[0][1];switch(s){case"s":case"o":i<arguments.length?a.push(arguments[i+++1]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(e.substring(o)),a.join("")};Y.formatNumber=function(e,t,n,r){var i=e,a=isNaN(t=Math.abs(t))?2:t,o=n===void 0?",":n,s=r===void 0?".":r,l=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",c=u.length>3?u.length%3:0;return l+(c?u.substr(0,c)+s:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+s)+(a?o+Math.abs(i-u).toFixed(a).slice(2):"")};Y.formatSize=function(e){return e>=1073741824?e=Y.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=Y.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=Y.formatNumber(e/1024,0)+" KiB":e=Y.formatNumber(e,0)+" bytes",e};Y.bytesFromIP=function(e){return e.indexOf(".")!==-1?Y.bytesFromIPv4(e):e.indexOf(":")!==-1?Y.bytesFromIPv6(e):null};Y.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=Y.createBuffer(),n=0;n<e.length;++n){var r=parseInt(e[n],10);if(isNaN(r))return null;t.putByte(r)}return t.getBytes()};Y.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(o){return o.length===0&&++t,!0});for(var n=(8-e.length+t)*2,r=Y.createBuffer(),i=0;i<8;++i){if(!e[i]||e[i].length===0){r.fillWithByte(0,n),n=0;continue}var a=Y.hexToBytes(e[i]);a.length<2&&r.putByte(0),r.putBytes(a)}return r.getBytes()};Y.bytesToIP=function(e){return e.length===4?Y.bytesToIPv4(e):e.length===16?Y.bytesToIPv6(e):null};Y.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t.join(".")};Y.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],n=[],r=0,i=0;i<e.length;i+=2){for(var a=Y.bytesToHex(e[i]+e[i+1]);a[0]==="0"&&a!=="0";)a=a.substr(1);if(a==="0"){var o=n[n.length-1],s=t.length;!o||s!==o.end+1?n.push({start:s,end:s}):(o.end=s,o.end-o.start>n[r].end-n[r].start&&(r=n.length-1))}t.push(a)}if(n.length>0){var l=n[r];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),l.start===0&&t.unshift(""),l.end===7&&t.push(""))}return t.join(":")};Y.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in Y&&!e.update)return t(null,Y.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Y.cores=navigator.hardwareConcurrency,t(null,Y.cores);if(typeof Worker>"u")return Y.cores=1,t(null,Y.cores);if(typeof Blob>"u")return Y.cores=2,t(null,Y.cores);var n=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(o){var s=Date.now(),l=s+4;self.postMessage({st:s,et:l})})}).toString(),")()"],{type:"application/javascript"}));r([],5,16);function r(o,s,l){if(s===0){var u=Math.floor(o.reduce(function(c,d){return c+d},0)/o.length);return Y.cores=Math.max(1,u),URL.revokeObjectURL(n),t(null,Y.cores)}i(l,function(c,d){o.push(a(l,d)),r(o,s-1,l)})}function i(o,s){for(var l=[],u=[],c=0;c<o;++c){var d=new Worker(n);d.addEventListener("message",function(h){if(u.push(h.data),u.length===o){for(var f=0;f<o;++f)l[f].terminate();s(null,u)}}),l.push(d)}for(var c=0;c<o;++c)l[c].postMessage(c)}function a(o,s){for(var l=[],u=0;u<o;++u)for(var c=s[u],d=l[u]=[],h=0;h<o;++h)if(u!==h){var f=s[h];(c.st>f.st&&c.st<f.et||f.st>c.st&&f.st<c.et)&&d.push(h)}return l.reduce(function(g,p){return Math.max(g,p.length)},0)}};var ln=ze;ln.cipher=ln.cipher||{};ln.cipher.algorithms=ln.cipher.algorithms||{};ln.cipher.createCipher=function(e,t){var n=e;if(typeof n=="string"&&(n=ln.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new ln.cipher.BlockCipher({algorithm:n,key:t,decrypt:!1})};ln.cipher.createDecipher=function(e,t){var n=e;if(typeof n=="string"&&(n=ln.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new ln.cipher.BlockCipher({algorithm:n,key:t,decrypt:!0})};ln.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),ln.cipher.algorithms[e]=t};ln.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in ln.cipher.algorithms?ln.cipher.algorithms[e]:null};var ep=ln.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};ep.prototype.start=function(e){e=e||{};var t={};for(var n in e)t[n]=e[n];t.decrypt=this._decrypt,this._finish=!1,this._input=ln.util.createBuffer(),this.output=e.output||ln.util.createBuffer(),this.mode.start(t)};ep.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};ep.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(n){return e(this.blockSize,n,!1)},this.mode.unpad=function(n){return e(this.blockSize,n,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))};var an=ze;an.cipher=an.cipher||{};var Ye=an.cipher.modes=an.cipher.modes||{};Ye.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ye.ecb.prototype.start=function(e){};Ye.ecb.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])};Ye.ecb.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])};Ye.ecb.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0};Ye.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};Ye.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ye.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=ef(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Ye.cbc.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock};Ye.cbc.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)};Ye.cbc.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0};Ye.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};Ye.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=an.util.createBuffer(),this._partialBytes=0};Ye.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ef(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ye.cfb.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);return}var a=(this.blockSize-r)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(a>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};Ye.cfb.prototype.decrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);return}var a=(this.blockSize-r)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};Ye.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=an.util.createBuffer(),this._partialBytes=0};Ye.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ef(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ye.ofb.prototype.encrypt=function(e,t,n){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];return}var a=(this.blockSize-r)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};Ye.ofb.prototype.decrypt=Ye.ofb.prototype.encrypt;Ye.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=an.util.createBuffer(),this._partialBytes=0};Ye.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ef(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ye.ctr.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var a=(this.blockSize-r)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}tf(this._inBlock)};Ye.ctr.prototype.decrypt=Ye.ctr.prototype.encrypt;Ye.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=an.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Ye.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=an.util.createBuffer(e.iv);this._cipherLength=0;var n;if("additionalData"in e?n=an.util.createBuffer(e.additionalData):n=an.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=an.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(C0(r*8)))}this._inBlock=this._j0.slice(0),tf(this._inBlock),this._partialBytes=0,n=an.util.createBuffer(n),this._aDataLength=C0(n.length()*8);var i=n.length()%this.blockSize;for(i&&n.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];n.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()])};Ye.gcm.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-r)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a<=0||n){if(n){var o=r%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(var i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),tf(this._inBlock)};Ye.gcm.prototype.decrypt=function(e,t,n){var r=e.length();if(r<this.blockSize&&!(n&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),tf(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize};Ye.gcm.prototype.afterFinish=function(e,t){var n=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=an.util.createBuffer();var r=this._aDataLength.concat(C0(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,r);var i=[];this.cipher.encrypt(this._j0,i);for(var a=0;a<this._ints;++a)this.tag.putInt32(this._s[a]^i[a]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(n=!1),n};Ye.gcm.prototype.multiply=function(e,t){for(var n=[0,0,0,0],r=t.slice(0),i=0;i<128;++i){var a=e[i/32|0]&1<<31-i%32;a&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),this.pow(r,r)}return n};Ye.gcm.prototype.pow=function(e,t){for(var n=e[3]&1,r=3;r>0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,n&&(t[0]^=this._R)};Ye.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],n=0;n<32;++n){var r=n/8|0,i=e[r]>>>(7-n%8)*4&15,a=this._m[n][i];t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3]}return t};Ye.gcm.prototype.ghash=function(e,t,n){return t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3],this.tableMultiply(t)};Ye.gcm.prototype.generateHashTable=function(e,t){for(var n=8/t,r=4*n,i=16*n,a=new Array(i),o=0;o<i;++o){var s=[0,0,0,0],l=o/r|0,u=(r-1-o%r)*t;s[l]=1<<t-1<<u,a[o]=this.generateSubHashTable(this.multiply(s,e),t)}return a};Ye.gcm.prototype.generateSubHashTable=function(e,t){var n=1<<t,r=n>>>1,i=new Array(n);i[r]=e.slice(0);for(var a=r>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a<r;){for(var o=1;o<a;++o){var s=i[a],l=i[o];i[a+o]=[s[0]^l[0],s[1]^l[1],s[2]^l[2],s[3]^l[3]]}a*=2}for(i[0]=[0,0,0,0],a=r+1;a<n;++a){var u=i[a^r];i[a]=[e[0]^u[0],e[1]^u[1],e[2]^u[2],e[3]^u[3]]}return i};function ef(e,t){if(typeof e=="string"&&(e=an.util.createBuffer(e)),an.util.isArray(e)&&e.length>4){var n=e;e=an.util.createBuffer();for(var r=0;r<n.length;++r)e.putByte(n[r])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!an.util.isArray(e)){for(var i=[],a=t/4,r=0;r<a;++r)i.push(e.getInt32());e=i}return e}function tf(e){e[e.length-1]=e[e.length-1]+1&4294967295}function C0(e){return[e/4294967296|0,e&4294967295]}var Ct=ze;Ct.aes=Ct.aes||{};Ct.aes.startEncrypting=function(e,t,n,r){var i=nf({key:e,output:n,decrypt:!1,mode:r});return i.start(t),i};Ct.aes.createEncryptionCipher=function(e,t){return nf({key:e,output:null,decrypt:!1,mode:t})};Ct.aes.startDecrypting=function(e,t,n,r){var i=nf({key:e,output:n,decrypt:!0,mode:r});return i.start(t),i};Ct.aes.createDecryptionCipher=function(e,t){return nf({key:e,output:null,decrypt:!0,mode:t})};Ct.aes.Algorithm=function(e,t){tp||lC();var n=this;n.name=e,n.mode=new t({blockSize:16,cipher:{encrypt:function(r,i){return S0(n._w,r,i,!1)},decrypt:function(r,i){return S0(n._w,r,i,!0)}}}),n._init=!1};Ct.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,n;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=Ct.util.createBuffer(t);else if(Ct.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){n=t,t=Ct.util.createBuffer();for(var r=0;r<n.length;++r)t.putByte(n[r])}if(!Ct.util.isArray(t)){n=t,t=[];var i=n.length();if(i===16||i===24||i===32){i=i>>>2;for(var r=0;r<i;++r)t.push(n.getInt32())}}if(!Ct.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var a=this.mode.name,o=["CFB","OFB","CTR","GCM"].indexOf(a)!==-1;this._w=uC(t,e.decrypt&&!o),this._init=!0}};Ct.aes._expandKey=function(e,t){return tp||lC(),uC(e,t)};Ct.aes._updateBlock=S0;_s("AES-ECB",Ct.cipher.modes.ecb);_s("AES-CBC",Ct.cipher.modes.cbc);_s("AES-CFB",Ct.cipher.modes.cfb);_s("AES-OFB",Ct.cipher.modes.ofb);_s("AES-CTR",Ct.cipher.modes.ctr);_s("AES-GCM",Ct.cipher.modes.gcm);function _s(e,t){var n=function(){return new Ct.aes.Algorithm(e,t)};Ct.cipher.registerAlgorithm(e,n)}var tp=!1,$o=4,In,E0,sC,qa,Rr;function lC(){tp=!0,sC=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;In=new Array(256),E0=new Array(256),qa=new Array(4),Rr=new Array(4);for(var t=0;t<4;++t)qa[t]=new Array(256),Rr[t]=new Array(256);for(var n=0,r=0,i,a,o,s,l,u,c,t=0;t<256;++t){s=r^r<<1^r<<2^r<<3^r<<4,s=s>>8^s&255^99,In[n]=s,E0[s]=n,l=e[s],i=e[n],a=e[i],o=e[a],u=l<<24^s<<16^s<<8^(s^l),c=(i^a^o)<<24^(n^o)<<16^(n^a^o)<<8^(n^i^o);for(var d=0;d<4;++d)qa[d][n]=u,Rr[d][s]=c,u=u<<24|u>>>8,c=c<<24|c>>>8;n===0?n=r=1:(n=i^e[e[e[i^o]]],r^=e[e[r]])}}function uC(e,t){for(var n=e.slice(0),r,i=1,a=n.length,o=a+6+1,s=$o*o,l=a;l<s;++l)r=n[l-1],l%a===0?(r=In[r>>>16&255]<<24^In[r>>>8&255]<<16^In[r&255]<<8^In[r>>>24]^sC[i]<<24,i++):a>6&&l%a===4&&(r=In[r>>>24]<<24^In[r>>>16&255]<<16^In[r>>>8&255]<<8^In[r&255]),n[l]=n[l-a]^r;if(t){var u,c=Rr[0],d=Rr[1],h=Rr[2],f=Rr[3],g=n.slice(0);s=n.length;for(var l=0,p=s-$o;l<s;l+=$o,p-=$o)if(l===0||l===s-$o)g[l]=n[p],g[l+1]=n[p+3],g[l+2]=n[p+2],g[l+3]=n[p+1];else for(var m=0;m<$o;++m)u=n[p+m],g[l+(3&-m)]=c[In[u>>>24]]^d[In[u>>>16&255]]^h[In[u>>>8&255]]^f[In[u&255]];n=g}return n}function S0(e,t,n,r){var i=e.length/4-1,a,o,s,l,u;r?(a=Rr[0],o=Rr[1],s=Rr[2],l=Rr[3],u=E0):(a=qa[0],o=qa[1],s=qa[2],l=qa[3],u=In);var c,d,h,f,g,p,m;c=t[0]^e[0],d=t[r?3:1]^e[1],h=t[2]^e[2],f=t[r?1:3]^e[3];for(var b=3,v=1;v<i;++v)g=a[c>>>24]^o[d>>>16&255]^s[h>>>8&255]^l[f&255]^e[++b],p=a[d>>>24]^o[h>>>16&255]^s[f>>>8&255]^l[c&255]^e[++b],m=a[h>>>24]^o[f>>>16&255]^s[c>>>8&255]^l[d&255]^e[++b],f=a[f>>>24]^o[c>>>16&255]^s[d>>>8&255]^l[h&255]^e[++b],c=g,d=p,h=m;n[0]=u[c>>>24]<<24^u[d>>>16&255]<<16^u[h>>>8&255]<<8^u[f&255]^e[++b],n[r?3:1]=u[d>>>24]<<24^u[h>>>16&255]<<16^u[f>>>8&255]<<8^u[c&255]^e[++b],n[2]=u[h>>>24]<<24^u[f>>>16&255]<<16^u[c>>>8&255]<<8^u[d&255]^e[++b],n[r?1:3]=u[f>>>24]<<24^u[c>>>16&255]<<16^u[d>>>8&255]<<8^u[h&255]^e[++b]}function nf(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="AES-"+t,r;e.decrypt?r=Ct.cipher.createDecipher(n,e.key):r=Ct.cipher.createCipher(n,e.key);var i=r.start;return r.start=function(a,o){var s=null;o instanceof Ct.util.ByteBuffer&&(s=o,o={}),o=o||{},o.output=s,o.iv=a,i.call(r,o)},r}var ul=ze;ul.pki=ul.pki||{};var w0=ul.pki.oids=ul.oids=ul.oids||{};function se(e,t){w0[e]=t,w0[t]=e}function dt(e,t){w0[e]=t}se("1.2.840.113549.1.1.1","rsaEncryption");se("1.2.840.113549.1.1.4","md5WithRSAEncryption");se("1.2.840.113549.1.1.5","sha1WithRSAEncryption");se("1.2.840.113549.1.1.7","RSAES-OAEP");se("1.2.840.113549.1.1.8","mgf1");se("1.2.840.113549.1.1.9","pSpecified");se("1.2.840.113549.1.1.10","RSASSA-PSS");se("1.2.840.113549.1.1.11","sha256WithRSAEncryption");se("1.2.840.113549.1.1.12","sha384WithRSAEncryption");se("1.2.840.113549.1.1.13","sha512WithRSAEncryption");se("1.3.101.112","EdDSA25519");se("1.2.840.10040.4.3","dsa-with-sha1");se("1.3.14.3.2.7","desCBC");se("1.3.14.3.2.26","sha1");se("1.3.14.3.2.29","sha1WithRSASignature");se("2.16.840.1.101.3.4.2.1","sha256");se("2.16.840.1.101.3.4.2.2","sha384");se("2.16.840.1.101.3.4.2.3","sha512");se("2.16.840.1.101.3.4.2.4","sha224");se("2.16.840.1.101.3.4.2.5","sha512-224");se("2.16.840.1.101.3.4.2.6","sha512-256");se("1.2.840.113549.2.2","md2");se("1.2.840.113549.2.5","md5");se("1.2.840.113549.1.7.1","data");se("1.2.840.113549.1.7.2","signedData");se("1.2.840.113549.1.7.3","envelopedData");se("1.2.840.113549.1.7.4","signedAndEnvelopedData");se("1.2.840.113549.1.7.5","digestedData");se("1.2.840.113549.1.7.6","encryptedData");se("1.2.840.113549.1.9.1","emailAddress");se("1.2.840.113549.1.9.2","unstructuredName");se("1.2.840.113549.1.9.3","contentType");se("1.2.840.113549.1.9.4","messageDigest");se("1.2.840.113549.1.9.5","signingTime");se("1.2.840.113549.1.9.6","counterSignature");se("1.2.840.113549.1.9.7","challengePassword");se("1.2.840.113549.1.9.8","unstructuredAddress");se("1.2.840.113549.1.9.14","extensionRequest");se("1.2.840.113549.1.9.20","friendlyName");se("1.2.840.113549.1.9.21","localKeyId");se("1.2.840.113549.1.9.22.1","x509Certificate");se("1.2.840.113549.1.12.10.1.1","keyBag");se("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");se("1.2.840.113549.1.12.10.1.3","certBag");se("1.2.840.113549.1.12.10.1.4","crlBag");se("1.2.840.113549.1.12.10.1.5","secretBag");se("1.2.840.113549.1.12.10.1.6","safeContentsBag");se("1.2.840.113549.1.5.13","pkcs5PBES2");se("1.2.840.113549.1.5.12","pkcs5PBKDF2");se("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");se("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");se("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");se("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");se("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");se("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");se("1.2.840.113549.2.7","hmacWithSHA1");se("1.2.840.113549.2.8","hmacWithSHA224");se("1.2.840.113549.2.9","hmacWithSHA256");se("1.2.840.113549.2.10","hmacWithSHA384");se("1.2.840.113549.2.11","hmacWithSHA512");se("1.2.840.113549.3.7","des-EDE3-CBC");se("2.16.840.1.101.3.4.1.2","aes128-CBC");se("2.16.840.1.101.3.4.1.22","aes192-CBC");se("2.16.840.1.101.3.4.1.42","aes256-CBC");se("2.5.4.3","commonName");se("2.5.4.4","surname");se("2.5.4.5","serialNumber");se("2.5.4.6","countryName");se("2.5.4.7","localityName");se("2.5.4.8","stateOrProvinceName");se("2.5.4.9","streetAddress");se("2.5.4.10","organizationName");se("2.5.4.11","organizationalUnitName");se("2.5.4.12","title");se("2.5.4.13","description");se("2.5.4.15","businessCategory");se("2.5.4.17","postalCode");se("2.5.4.42","givenName");se("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");se("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");se("2.16.840.1.113730.1.1","nsCertType");se("2.16.840.1.113730.1.13","nsComment");dt("2.5.29.1","authorityKeyIdentifier");dt("2.5.29.2","keyAttributes");dt("2.5.29.3","certificatePolicies");dt("2.5.29.4","keyUsageRestriction");dt("2.5.29.5","policyMapping");dt("2.5.29.6","subtreesConstraint");dt("2.5.29.7","subjectAltName");dt("2.5.29.8","issuerAltName");dt("2.5.29.9","subjectDirectoryAttributes");dt("2.5.29.10","basicConstraints");dt("2.5.29.11","nameConstraints");dt("2.5.29.12","policyConstraints");dt("2.5.29.13","basicConstraints");se("2.5.29.14","subjectKeyIdentifier");se("2.5.29.15","keyUsage");dt("2.5.29.16","privateKeyUsagePeriod");se("2.5.29.17","subjectAltName");se("2.5.29.18","issuerAltName");se("2.5.29.19","basicConstraints");dt("2.5.29.20","cRLNumber");dt("2.5.29.21","cRLReason");dt("2.5.29.22","expirationDate");dt("2.5.29.23","instructionCode");dt("2.5.29.24","invalidityDate");dt("2.5.29.25","cRLDistributionPoints");dt("2.5.29.26","issuingDistributionPoint");dt("2.5.29.27","deltaCRLIndicator");dt("2.5.29.28","issuingDistributionPoint");dt("2.5.29.29","certificateIssuer");dt("2.5.29.30","nameConstraints");se("2.5.29.31","cRLDistributionPoints");se("2.5.29.32","certificatePolicies");dt("2.5.29.33","policyMappings");dt("2.5.29.34","policyConstraints");se("2.5.29.35","authorityKeyIdentifier");dt("2.5.29.36","policyConstraints");se("2.5.29.37","extKeyUsage");dt("2.5.29.46","freshestCRL");dt("2.5.29.54","inhibitAnyPolicy");se("1.3.6.1.4.1.11129.2.4.2","timestampList");se("1.3.6.1.5.5.7.1.1","authorityInfoAccess");se("1.3.6.1.5.5.7.3.1","serverAuth");se("1.3.6.1.5.5.7.3.2","clientAuth");se("1.3.6.1.5.5.7.3.3","codeSigning");se("1.3.6.1.5.5.7.3.4","emailProtection");se("1.3.6.1.5.5.7.3.8","timeStamping");var wt=ze,ge=wt.asn1=wt.asn1||{};ge.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};ge.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};ge.create=function(e,t,n,r,i){if(wt.util.isArray(r)){for(var a=[],o=0;o<r.length;++o)r[o]!==void 0&&a.push(r[o]);r=a}var s={tagClass:e,type:t,constructed:n,composed:n||wt.util.isArray(r),value:r};return i&&"bitStringContents"in i&&(s.bitStringContents=i.bitStringContents,s.original=ge.copy(s)),s};ge.copy=function(e,t){var n;if(wt.util.isArray(e)){n=[];for(var r=0;r<e.length;++r)n.push(ge.copy(e[r],t));return n}return typeof e=="string"?e:(n={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:ge.copy(e.value,t)},t&&!t.excludeBitStringContents&&(n.bitStringContents=e.bitStringContents),n)};ge.equals=function(e,t,n){if(wt.util.isArray(e)){if(!wt.util.isArray(t)||e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!ge.equals(e[r],t[r]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var i=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&ge.equals(e.value,t.value);return n&&n.includeBitStringContents&&(i=i&&e.bitStringContents===t.bitStringContents),i};ge.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var n,r=t&128;return r?n=e.getInt((t&127)<<3):n=t,n}};function Ys(e,t,n){if(n>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=n,r}}var m6=function(e,t){var n=e.getByte();if(t--,n!==128){var r,i=n&128;if(!i)r=n;else{var a=n&127;Ys(e,t,a),r=e.getInt(a<<3)}if(r<0)throw new Error("Negative length: "+r);return r}};ge.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=wt.util.createBuffer(e));var n=e.length(),r=Ic(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var i=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw i.byteCount=n,i.remaining=e.length(),i}return r};function Ic(e,t,n,r){var i;Ys(e,t,2);var a=e.getByte();t--;var o=a&192,s=a&31;i=e.length();var l=m6(e,t);if(t-=i-e.length(),l!==void 0&&l>t){if(r.strict){var u=new Error("Too few bytes to read ASN.1 value.");throw u.available=e.length(),u.remaining=t,u.requested=l,u}l=t}var c,d,h=(a&32)===32;if(h)if(c=[],l===void 0)for(;;){if(Ys(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}i=e.length(),c.push(Ic(e,t,n+1,r)),t-=i-e.length()}else for(;l>0;)i=e.length(),c.push(Ic(e,l,n+1,r)),t-=i-e.length(),l-=i-e.length();if(c===void 0&&o===ge.Class.UNIVERSAL&&s===ge.Type.BITSTRING&&(d=e.bytes(l)),c===void 0&&r.decodeBitStrings&&o===ge.Class.UNIVERSAL&&s===ge.Type.BITSTRING&&l>1){var f=e.read,g=t,p=0;if(s===ge.Type.BITSTRING&&(Ys(e,t,1),p=e.getByte(),t--),p===0)try{i=e.length();var m={strict:!0,decodeBitStrings:!0},b=Ic(e,t,n+1,m),v=i-e.length();t-=v,s==ge.Type.BITSTRING&&v++;var x=b.tagClass;v===l&&(x===ge.Class.UNIVERSAL||x===ge.Class.CONTEXT_SPECIFIC)&&(c=[b])}catch{}c===void 0&&(e.read=f,t=g)}if(c===void 0){if(l===void 0){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");l=t}if(s===ge.Type.BMPSTRING)for(c="";l>0;l-=2)Ys(e,t,2),c+=String.fromCharCode(e.getInt16()),t-=2;else c=e.getBytes(l),t-=l}var C=d===void 0?null:{bitStringContents:d};return ge.create(o,s,h,c,C)}ge.toDer=function(e){var t=wt.util.createBuffer(),n=e.tagClass|e.type,r=wt.util.createBuffer(),i=!1;if("bitStringContents"in e&&(i=!0,e.original&&(i=ge.equals(e,e.original))),i)r.putBytes(e.bitStringContents);else if(e.composed){e.constructed?n|=32:r.putByte(0);for(var a=0;a<e.value.length;++a)e.value[a]!==void 0&&r.putBuffer(ge.toDer(e.value[a]))}else if(e.type===ge.Type.BMPSTRING)for(var a=0;a<e.value.length;++a)r.putInt16(e.value.charCodeAt(a));else e.type===ge.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&!(e.value.charCodeAt(1)&128)||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?r.putBytes(e.value.substr(1)):r.putBytes(e.value);if(t.putByte(n),r.length()<=127)t.putByte(r.length()&127);else{var o=r.length(),s="";do s+=String.fromCharCode(o&255),o=o>>>8;while(o>0);t.putByte(s.length|128);for(var a=s.length-1;a>=0;--a)t.putByte(s.charCodeAt(a))}return t.putBuffer(r),t};ge.oidToDer=function(e){var t=e.split("."),n=wt.util.createBuffer();n.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var r,i,a,o,s=2;s<t.length;++s){r=!0,i=[],a=parseInt(t[s],10);do o=a&127,a=a>>>7,r||(o|=128),i.push(o),r=!1;while(a>0);for(var l=i.length-1;l>=0;--l)n.putByte(i[l])}return n};ge.derToOid=function(e){var t;typeof e=="string"&&(e=wt.util.createBuffer(e));var n=e.getByte();t=Math.floor(n/40)+"."+n%40;for(var r=0;e.length()>0;)n=e.getByte(),r=r<<7,n&128?r+=n&127:(t+="."+(r+n),r=0);return t};ge.utcTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),a=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=0;if(e.length>11){var l=e.charAt(10),u=10;l!=="+"&&l!=="-"&&(s=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(n,r,i),t.setUTCHours(a,o,s,0),u&&(l=e.charAt(u),l==="+"||l==="-")){var c=parseInt(e.substr(u+1,2),10),d=parseInt(e.substr(u+4,2),10),h=c*60+d;h*=6e4,l==="+"?t.setTime(+t-h):t.setTime(+t+h)}return t};ge.generalizedTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),l=0,u=0,c=!1;e.charAt(e.length-1)==="Z"&&(c=!0);var d=e.length-5,h=e.charAt(d);if(h==="+"||h==="-"){var f=parseInt(e.substr(d+1,2),10),g=parseInt(e.substr(d+4,2),10);u=f*60+g,u*=6e4,h==="+"&&(u*=-1),c=!0}return e.charAt(14)==="."&&(l=parseFloat(e.substr(14),10)*1e3),c?(t.setUTCFullYear(n,r,i),t.setUTCHours(a,o,s,l),t.setTime(+t+u)):(t.setFullYear(n,r,i),t.setHours(a,o,s,l)),t};ge.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",n=[];n.push((""+e.getUTCFullYear()).substr(2)),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t};ge.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",n=[];n.push(""+e.getUTCFullYear()),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t};ge.integerToDer=function(e){var t=wt.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=e,n};ge.derToInteger=function(e){typeof e=="string"&&(e=wt.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};ge.validate=function(e,t,n,r){var i=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(i=!0,t.value&&wt.util.isArray(t.value))for(var a=0,o=0;i&&o<t.value.length;++o)i=t.value[o].optional||!1,e.value[a]&&(i=ge.validate(e.value[a],t.value[o],n,r),i?++a:t.value[o].optional&&(i=!0)),!i&&r&&r.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(i&&n&&(t.capture&&(n[t.capture]=e.value),t.captureAsn1&&(n[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(n[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e))if(e.bitStringContents.length<2)n[t.captureBitStringValue]="";else{var s=e.bitStringContents.charCodeAt(0);if(s!==0)throw new Error("captureBitStringValue only supported for zero unused bits");n[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else r&&r.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else r&&(e.tagClass!==t.tagClass&&r.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&r.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return i};var b1=/[^\\u0000-\\u00ff]/;ge.prettyPrint=function(e,t,n){var r="";t=t||0,n=n||2,t>0&&(r+=`
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
`,n};fC.decode=function(e){for(var t=[],n=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,r=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,i=/\r?\n/,a;a=n.exec(e),!!a;){var o=a[1];o==="NEW CERTIFICATE REQUEST"&&(o="CERTIFICATE REQUEST");var s={type:o,procType:null,contentDomain:null,dekInfo:null,headers:[],body:qc.util.decode64(a[3])};if(t.push(s),!!a[2]){for(var l=a[2].split(i),u=0;a&&u<l.length;){for(var c=l[u].replace(/\s+$/,""),d=u+1;d<l.length;++d){var h=l[d];if(!/\s/.test(h[0]))break;c+=h,u=d}if(a=c.match(r),a){for(var f={name:a[1],values:[]},g=a[2].split(","),p=0;p<g.length;++p)f.values.push(y6(g[p]));if(s.procType)if(!s.contentDomain&&f.name==="Content-Domain")s.contentDomain=g[0]||"";else if(!s.dekInfo&&f.name==="DEK-Info"){if(f.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');s.dekInfo={algorithm:g[0],parameters:g[1]||null}}else s.headers.push(f);else{if(f.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(f.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');s.procType={version:g[0],type:g[1]}}}++u}if(s.procType==="ENCRYPTED"&&!s.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function Bu(e){for(var t=e.name+": ",n=[],r=function(l,u){return" "+u},i=0;i<e.values.length;++i)n.push(e.values[i].replace(/^(\S+\r\n)/,r));t+=n.join(",")+`\r
|
|
12
12
|
`;for(var a=0,o=-1,i=0;i<t.length;++i,++a)if(a>65&&o!==-1){var s=t[o];s===","?(++o,t=t.substr(0,o)+`\r
|
|
13
13
|
`+t.substr(o)):t=t.substr(0,o)+`\r
|
|
14
|
-
`+s+t.substr(o+1),a=i-o-1,o=-1,++i}else(t[i]===" "||t[i]===" "||t[i]===",")&&(o=i);return t}function y6(e){return e.replace(/^\s+/,"")}var At=ze;At.des=At.des||{};At.des.startEncrypting=function(e,t,n,r){var i=rf({key:e,output:n,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i};At.des.createEncryptionCipher=function(e,t){return rf({key:e,output:null,decrypt:!1,mode:t})};At.des.startDecrypting=function(e,t,n,r){var i=rf({key:e,output:n,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i};At.des.createDecryptionCipher=function(e,t){return rf({key:e,output:null,decrypt:!0,mode:t})};At.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(r,i){return y1(n._keys,r,i,!1)},decrypt:function(r,i){return y1(n._keys,r,i,!0)}}}),n._init=!1};At.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=At.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=A6(t),this._init=!0}};hi("DES-ECB",At.cipher.modes.ecb);hi("DES-CBC",At.cipher.modes.cbc);hi("DES-CFB",At.cipher.modes.cfb);hi("DES-OFB",At.cipher.modes.ofb);hi("DES-CTR",At.cipher.modes.ctr);hi("3DES-ECB",At.cipher.modes.ecb);hi("3DES-CBC",At.cipher.modes.cbc);hi("3DES-CFB",At.cipher.modes.cfb);hi("3DES-OFB",At.cipher.modes.ofb);hi("3DES-CTR",At.cipher.modes.ctr);function hi(e,t){var n=function(){return new At.des.Algorithm(e,t)};At.cipher.registerAlgorithm(e,n)}var x6=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],C6=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],E6=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],S6=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],w6=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],I6=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],_6=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],D6=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function A6(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],f=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],g=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],p=e.length()>8?3:1,m=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,x,C=0;C<p;C++){var E=e.getInt32(),w=e.getInt32();x=(E>>>4^w)&252645135,w^=x,E^=x<<4,x=(w>>>-16^E)&65535,E^=x,w^=x<<-16,x=(E>>>2^w)&858993459,w^=x,E^=x<<2,x=(w>>>-16^E)&65535,E^=x,w^=x<<-16,x=(E>>>1^w)&1431655765,w^=x,E^=x<<1,x=(w>>>8^E)&16711935,E^=x,w^=x<<8,x=(E>>>1^w)&1431655765,w^=x,E^=x<<1,x=E<<8|w>>>20&240,E=w<<24|w<<8&16711680|w>>>8&65280|w>>>24&240,w=x;for(var B=0;B<b.length;++B){b[B]?(E=E<<2|E>>>26,w=w<<2|w>>>26):(E=E<<1|E>>>27,w=w<<1|w>>>27),E&=-15,w&=-15;var y=t[E>>>28]|n[E>>>24&15]|r[E>>>20&15]|i[E>>>16&15]|a[E>>>12&15]|o[E>>>8&15]|s[E>>>4&15],S=l[w>>>28]|u[w>>>24&15]|c[w>>>20&15]|d[w>>>16&15]|h[w>>>12&15]|f[w>>>8&15]|g[w>>>4&15];x=(S>>>16^y)&65535,m[v++]=y^x,m[v++]=S^x<<16}}return m}function y1(e,t,n,r){var i=e.length===32?3:9,a;i===3?a=r?[30,-2,-2]:[0,32,2]:a=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var o,s=t[0],l=t[1];o=(s>>>4^l)&252645135,l^=o,s^=o<<4,o=(s>>>16^l)&65535,l^=o,s^=o<<16,o=(l>>>2^s)&858993459,s^=o,l^=o<<2,o=(l>>>8^s)&16711935,s^=o,l^=o<<8,o=(s>>>1^l)&1431655765,l^=o,s^=o<<1,s=s<<1|s>>>31,l=l<<1|l>>>31;for(var u=0;u<i;u+=3){for(var c=a[u+1],d=a[u+2],h=a[u];h!=c;h+=d){var f=l^e[h],g=(l>>>4|l<<28)^e[h+1];o=s,s=l,l=o^(C6[f>>>24&63]|S6[f>>>16&63]|I6[f>>>8&63]|D6[f&63]|x6[g>>>24&63]|E6[g>>>16&63]|w6[g>>>8&63]|_6[g&63])}o=s,s=l,l=o}s=s>>>1|s<<31,l=l>>>1|l<<31,o=(s>>>1^l)&1431655765,l^=o,s^=o<<1,o=(l>>>8^s)&16711935,s^=o,l^=o<<8,o=(l>>>2^s)&858993459,s^=o,l^=o<<2,o=(s>>>16^l)&65535,l^=o,s^=o<<16,o=(s>>>4^l)&252645135,l^=o,s^=o<<4,n[0]=s,n[1]=l}function rf(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="DES-"+t,r;e.decrypt?r=At.cipher.createDecipher(n,e.key):r=At.cipher.createCipher(n,e.key);var i=r.start;return r.start=function(a,o){var s=null;o instanceof At.util.ByteBuffer&&(s=o,o={}),o=o||{},o.output=s,o.iv=a,i.call(r,o)},r}const T6={},R6=Object.freeze(Object.defineProperty({__proto__:null,default:T6},Symbol.toStringTag,{value:"Module"})),np=s6(R6);var _n=ze,B6=_n.pkcs5=_n.pkcs5||{},Si;_n.util.isNodejs&&!_n.options.usePureJavaScript&&(Si=np);_n.pbkdf2=B6.pbkdf2=function(e,t,n,r,i,a){if(typeof i=="function"&&(a=i,i=null),_n.util.isNodejs&&!_n.options.usePureJavaScript&&Si.pbkdf2&&(i===null||typeof i!="object")&&(Si.pbkdf2Sync.length>4||!i||i==="sha1"))return typeof i!="string"&&(i="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),a?Si.pbkdf2Sync.length===4?Si.pbkdf2(e,t,n,r,function(x,C){if(x)return a(x);a(null,C.toString("binary"))}):Si.pbkdf2(e,t,n,r,i,function(x,C){if(x)return a(x);a(null,C.toString("binary"))}):Si.pbkdf2Sync.length===4?Si.pbkdf2Sync(e,t,n,r).toString("binary"):Si.pbkdf2Sync(e,t,n,r,i).toString("binary");if((typeof i>"u"||i===null)&&(i="sha1"),typeof i=="string"){if(!(i in _n.md.algorithms))throw new Error("Unknown hash algorithm: "+i);i=_n.md[i].create()}var o=i.digestLength;if(r>4294967295*o){var s=new Error("Derived key is too long.");if(a)return a(s);throw s}var l=Math.ceil(r/o),u=r-(l-1)*o,c=_n.hmac.create();c.start(i,e);var d="",h,f,g;if(!a){for(var p=1;p<=l;++p){c.start(null,null),c.update(t),c.update(_n.util.int32ToBytes(p)),h=g=c.digest().getBytes();for(var m=2;m<=n;++m)c.start(null,null),c.update(g),f=c.digest().getBytes(),h=_n.util.xorBytes(h,f,o),g=f;d+=p<l?h:h.substr(0,u)}return d}var p=1,m;function b(){if(p>l)return a(null,d);c.start(null,null),c.update(t),c.update(_n.util.int32ToBytes(p)),h=g=c.digest().getBytes(),m=2,v()}function v(){if(m<=n)return c.start(null,null),c.update(g),f=c.digest().getBytes(),h=_n.util.xorBytes(h,f,o),g=f,++m,_n.util.setImmediate(v);d+=p<l?h:h.substr(0,u),++p,b()}b()};var ei=ze,hC=ei.sha256=ei.sha256||{};ei.md.sha256=ei.md.algorithms.sha256=hC;hC.create=function(){gC||$6();var e=null,t=ei.util.createBuffer(),n=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var i=r.messageLengthSize/4,a=0;a<i;++a)r.fullMessageLength.push(0);return t=ei.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},r},r.start(),r.update=function(i,a){a==="utf8"&&(i=ei.util.encodeUtf8(i));var o=i.length;r.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=r.fullMessageLength.length-1;s>=0;--s)r.fullMessageLength[s]+=o[1],o[1]=o[0]+(r.fullMessageLength[s]/4294967296>>>0),r.fullMessageLength[s]=r.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),x1(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var i=ei.util.createBuffer();i.putBytes(t.bytes());var a=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=a&r.blockLength-1;i.putBytes(_0.substr(0,r.blockLength-o));for(var s,l,u=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)s=r.fullMessageLength[c+1]*8,l=s/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=s>>>0;i.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};x1(d,n,i);var h=ei.util.createBuffer();return h.putInt32(d.h0),h.putInt32(d.h1),h.putInt32(d.h2),h.putInt32(d.h3),h.putInt32(d.h4),h.putInt32(d.h5),h.putInt32(d.h6),h.putInt32(d.h7),h},r};var _0=null,gC=!1,pC=null;function $6(){_0="",_0+=ei.util.fillString("\0",64),pC=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],gC=!0}function x1(e,t,n){for(var r,i,a,o,s,l,u,c,d,h,f,g,p,m,b,v=n.length();v>=64;){for(u=0;u<16;++u)t[u]=n.getInt32();for(;u<64;++u)r=t[u-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=t[u-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=r+t[u-7]+i+t[u-16]|0;for(c=e.h0,d=e.h1,h=e.h2,f=e.h3,g=e.h4,p=e.h5,m=e.h6,b=e.h7,u=0;u<64;++u)o=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),s=m^g&(p^m),a=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),l=c&d|h&(c^d),r=b+o+s+pC[u]+t[u],i=a+l,b=m,m=p,p=g,g=f+r>>>0,f=h,h=d,d=c,c=r+i>>>0;e.h0=e.h0+c|0,e.h1=e.h1+d|0,e.h2=e.h2+h|0,e.h3=e.h3+f|0,e.h4=e.h4+g|0,e.h5=e.h5+p|0,e.h6=e.h6+m|0,e.h7=e.h7+b|0,v-=64}}var Yr=ze,Dc=null;Yr.util.isNodejs&&!Yr.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Dc=np);var k6=Yr.prng=Yr.prng||{};k6.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},n=e.md,r=new Array(32),i=0;i<32;++i)r[i]=n.create();t.pools=r,t.pool=0,t.generate=function(u,c){if(!c)return t.generateSync(u);var d=t.plugin.cipher,h=t.plugin.increment,f=t.plugin.formatKey,g=t.plugin.formatSeed,p=Yr.util.createBuffer();t.key=null,m();function m(b){if(b)return c(b);if(p.length()>=u)return c(null,p.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Yr.util.nextTick(function(){a(m)});var v=d(t.key,t.seed);t.generated+=v.length,p.putBytes(v),t.key=f(d(t.key,h(t.seed))),t.seed=g(d(t.key,t.seed)),Yr.util.setImmediate(m)}},t.generateSync=function(u){var c=t.plugin.cipher,d=t.plugin.increment,h=t.plugin.formatKey,f=t.plugin.formatSeed;t.key=null;for(var g=Yr.util.createBuffer();g.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&o();var p=c(t.key,t.seed);t.generated+=p.length,g.putBytes(p),t.key=h(c(t.key,d(t.seed))),t.seed=f(c(t.key,t.seed))}return g.getBytes(u)};function a(u){if(t.pools[0].messageLength>=32)return s(),u();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(d,h){if(d)return u(d);t.collect(h),s(),u()})}function o(){if(t.pools[0].messageLength>=32)return s();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),s()}function s(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var c=1,d=0;d<32;++d)t.reseeds%c===0&&(u.update(t.pools[d].digest().getBytes()),t.pools[d].start()),c=c<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var h=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(h),t.generated=0}function l(u){var c=null,d=Yr.util.globalScope,h=d.crypto||d.msCrypto;h&&h.getRandomValues&&(c=function(E){return h.getRandomValues(E)});var f=Yr.util.createBuffer();if(c)for(;f.length()<u;){var g=Math.max(1,Math.min(u-f.length(),65536)/4),p=new Uint32Array(Math.floor(g));try{c(p);for(var m=0;m<p.length;++m)f.putInt32(p[m])}catch(E){if(!(typeof QuotaExceededError<"u"&&E instanceof QuotaExceededError))throw E}}if(f.length()<u)for(var b,v,x,C=Math.floor(Math.random()*65536);f.length()<u;){v=16807*(C&65535),b=16807*(C>>16),v+=(b&32767)<<16,v+=b>>15,v=(v&2147483647)+(v>>31),C=v&4294967295;for(var m=0;m<3;++m)x=C>>>(m<<3),x^=Math.floor(Math.random()*256),f.putByte(x&255)}return f.getBytes(u)}return Dc?(t.seedFile=function(u,c){Dc.randomBytes(u,function(d,h){if(d)return c(d);c(null,h.toString())})},t.seedFileSync=function(u){return Dc.randomBytes(u).toString()}):(t.seedFile=function(u,c){try{c(null,l(u))}catch(d){c(d)}},t.seedFileSync=l),t.collect=function(u){for(var c=u.length,d=0;d<c;++d)t.pools[t.pool].update(u.substr(d,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,c){for(var d="",h=0;h<c;h+=8)d+=String.fromCharCode(u>>h&255);t.collect(d)},t.registerWorker=function(u){if(u===self)t.seedFile=function(d,h){function f(g){var p=g.data;p.forge&&p.forge.prng&&(self.removeEventListener("message",f),h(p.forge.prng.err,p.forge.prng.bytes))}self.addEventListener("message",f),self.postMessage({forge:{prng:{needed:d}}})};else{var c=function(d){var h=d.data;h.forge&&h.forge.prng&&t.seedFile(h.forge.prng.needed,function(f,g){u.postMessage({forge:{prng:{err:f,bytes:g}}})})};u.addEventListener("message",c)}},t};var Qt=ze;(function(){if(Qt.random&&Qt.random.getBytes){Qt.random;return}(function(e){var t={},n=new Array(4),r=Qt.util.createBuffer();t.formatKey=function(d){var h=Qt.util.createBuffer(d);return d=new Array(4),d[0]=h.getInt32(),d[1]=h.getInt32(),d[2]=h.getInt32(),d[3]=h.getInt32(),Qt.aes._expandKey(d,!1)},t.formatSeed=function(d){var h=Qt.util.createBuffer(d);return d=new Array(4),d[0]=h.getInt32(),d[1]=h.getInt32(),d[2]=h.getInt32(),d[3]=h.getInt32(),d},t.cipher=function(d,h){return Qt.aes._updateBlock(d,h,n,!1),r.putInt32(n[0]),r.putInt32(n[1]),r.putInt32(n[2]),r.putInt32(n[3]),r.getBytes()},t.increment=function(d){return++d[3],d},t.md=Qt.md.sha256;function i(){var d=Qt.prng.create(t);return d.getBytes=function(h,f){return d.generate(h,f)},d.getBytesSync=function(h){return d.generate(h)},d}var a=i(),o=null,s=Qt.util.globalScope,l=s.crypto||s.msCrypto;if(l&&l.getRandomValues&&(o=function(d){return l.getRandomValues(d)}),Qt.options.usePureJavaScript||!Qt.util.isNodejs&&!o){if(a.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var c in navigator)try{typeof navigator[c]=="string"&&(u+=navigator[c])}catch{}a.collect(u),u=null}e&&(e().mousemove(function(d){a.collectInt(d.clientX,16),a.collectInt(d.clientY,16)}),e().keypress(function(d){a.collectInt(d.charCode,8)}))}if(!Qt.random)Qt.random=a;else for(var c in a)Qt.random[c]=a[c];Qt.random.createInstance=i,Qt.random})(typeof jQuery<"u"?jQuery:null)})();var Vn=ze,Zf=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],C1=[1,2,3,5],P6=function(e,t){return e<<t&65535|(e&65535)>>16-t},F6=function(e,t){return(e&65535)>>t|e<<16-t&65535};Vn.rc2=Vn.rc2||{};Vn.rc2.expandKey=function(e,t){typeof e=="string"&&(e=Vn.util.createBuffer(e)),t=t||128;var n=e,r=e.length(),i=t,a=Math.ceil(i/8),o=255>>(i&7),s;for(s=r;s<128;s++)n.putByte(Zf[n.at(s-1)+n.at(s-r)&255]);for(n.setAt(128-a,Zf[n.at(128-a)&o]),s=127-a;s>=0;s--)n.setAt(s,Zf[n.at(s+1)^n.at(s+a)]);return n};var mC=function(e,t,n){var r=!1,i=null,a=null,o=null,s,l,u,c,d=[];for(e=Vn.rc2.expandKey(e,t),u=0;u<64;u++)d.push(e.getInt16Le());n?(s=function(g){for(u=0;u<4;u++)g[u]+=d[c]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),g[u]=P6(g[u],C1[u]),c++},l=function(g){for(u=0;u<4;u++)g[u]+=d[g[(u+3)%4]&63]}):(s=function(g){for(u=3;u>=0;u--)g[u]=F6(g[u],C1[u]),g[u]-=d[c]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),c--},l=function(g){for(u=3;u>=0;u--)g[u]-=d[g[(u+3)%4]&63]});var h=function(g){var p=[];for(u=0;u<4;u++){var m=i.getInt16Le();o!==null&&(n?m^=o.getInt16Le():o.putInt16Le(m)),p.push(m&65535)}c=n?0:63;for(var b=0;b<g.length;b++)for(var v=0;v<g[b][0];v++)g[b][1](p);for(u=0;u<4;u++)o!==null&&(n?o.putInt16Le(p[u]):p[u]^=o.getInt16Le()),a.putInt16Le(p[u])},f=null;return f={start:function(g,p){g&&typeof g=="string"&&(g=Vn.util.createBuffer(g)),r=!1,i=Vn.util.createBuffer(),a=p||new Vn.util.createBuffer,o=g,f.output=a},update:function(g){for(r||i.putBuffer(g);i.length()>=8;)h([[5,s],[1,l],[6,s],[1,l],[5,s]])},finish:function(g){var p=!0;if(n)if(g)p=g(8,i,!n);else{var m=i.length()===8?8:8-i.length();i.fillWithByte(m,m)}if(p&&(r=!0,f.update()),!n&&(p=i.length()===0,p))if(g)p=g(8,a,!n);else{var b=a.length(),v=a.at(b-1);v>b?p=!1:a.truncate(v)}return p}},f};Vn.rc2.startEncrypting=function(e,t,n){var r=Vn.rc2.createEncryptionCipher(e,128);return r.start(t,n),r};Vn.rc2.createEncryptionCipher=function(e,t){return mC(e,t,!0)};Vn.rc2.startDecrypting=function(e,t,n){var r=Vn.rc2.createDecryptionCipher(e,128);return r.start(t,n),r};Vn.rc2.createDecryptionCipher=function(e,t){return mC(e,t,!1)};var D0=ze;D0.jsbn=D0.jsbn||{};var $i;function oe(e,t,n){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,n):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}D0.jsbn.BigInteger=oe;function it(){return new oe(null)}function N6(e,t,n,r,i,a){for(;--a>=0;){var o=t*this.data[e++]+n.data[r]+i;i=Math.floor(o/67108864),n.data[r++]=o&67108863}return i}function M6(e,t,n,r,i,a){for(var o=t&32767,s=t>>15;--a>=0;){var l=this.data[e]&32767,u=this.data[e++]>>15,c=s*l+u*o;l=o*l+((c&32767)<<15)+n.data[r]+(i&1073741823),i=(l>>>30)+(c>>>15)+s*u+(i>>>30),n.data[r++]=l&1073741823}return i}function E1(e,t,n,r,i,a){for(var o=t&16383,s=t>>14;--a>=0;){var l=this.data[e]&16383,u=this.data[e++]>>14,c=s*l+u*o;l=o*l+((c&16383)<<14)+n.data[r]+i,i=(l>>28)+(c>>14)+s*u,n.data[r++]=l&268435455}return i}typeof navigator>"u"?(oe.prototype.am=E1,$i=28):navigator.appName=="Microsoft Internet Explorer"?(oe.prototype.am=M6,$i=30):navigator.appName!="Netscape"?(oe.prototype.am=N6,$i=26):(oe.prototype.am=E1,$i=28);oe.prototype.DB=$i;oe.prototype.DM=(1<<$i)-1;oe.prototype.DV=1<<$i;var rp=52;oe.prototype.FV=Math.pow(2,rp);oe.prototype.F1=rp-$i;oe.prototype.F2=2*$i-rp;var L6="0123456789abcdefghijklmnopqrstuvwxyz",af=new Array,Ds,mr;Ds=48;for(mr=0;mr<=9;++mr)af[Ds++]=mr;Ds=97;for(mr=10;mr<36;++mr)af[Ds++]=mr;Ds=65;for(mr=10;mr<36;++mr)af[Ds++]=mr;function S1(e){return L6.charAt(e)}function bC(e,t){var n=af[e.charCodeAt(t)];return n??-1}function O6(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function V6(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function oa(e){var t=it();return t.fromInt(e),t}function H6(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,i=!1,a=0;--r>=0;){var o=n==8?e[r]&255:bC(e,r);if(o<0){e.charAt(r)=="-"&&(i=!0);continue}i=!1,a==0?this.data[this.t++]=o:a+n>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-a)-1)<<a,this.data[this.t++]=o>>this.DB-a):this.data[this.t-1]|=o<<a,a+=n,a>=this.DB&&(a-=this.DB)}n==8&&e[0]&128&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&oe.ZERO.subTo(this,this)}function j6(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function W6(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var n=(1<<t)-1,r,i=!1,a="",o=this.t,s=this.DB-o*this.DB%t;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=S1(r));o>=0;)s<t?(r=(this.data[o]&(1<<s)-1)<<t-s,r|=this.data[--o]>>(s+=this.DB-t)):(r=this.data[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=S1(r));return i?a:"0"}function z6(){var e=it();return oe.ZERO.subTo(this,e),e}function G6(){return this.s<0?this.negate():this}function U6(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this.data[n]-e.data[n])!=0)return t;return 0}function of(e){var t=1,n;return(n=e>>>16)!=0&&(e=n,t+=16),(n=e>>8)!=0&&(e=n,t+=8),(n=e>>4)!=0&&(e=n,t+=4),(n=e>>2)!=0&&(e=n,t+=2),(n=e>>1)!=0&&(e=n,t+=1),t}function X6(){return this.t<=0?0:this.DB*(this.t-1)+of(this.data[this.t-1]^this.s&this.DM)}function Z6(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s}function Y6(e,t){for(var n=e;n<this.t;++n)t.data[n-e]=this.data[n];t.t=Math.max(this.t-e,0),t.s=this.s}function K6(e,t){var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(e/this.DB),o=this.s<<n&this.DM,s;for(s=this.t-1;s>=0;--s)t.data[s+a+1]=this.data[s]>>r|o,o=(this.data[s]&i)<<n;for(s=a-1;s>=0;--s)t.data[s]=0;t.data[a]=o,t.t=this.t+a+1,t.s=this.s,t.clamp()}function q6(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB,i=this.DB-r,a=(1<<r)-1;t.data[0]=this.data[n]>>r;for(var o=n+1;o<this.t;++o)t.data[o-n-1]|=(this.data[o]&a)<<i,t.data[o-n]=this.data[o]>>r;r>0&&(t.data[this.t-n-1]|=(this.s&a)<<i),t.t=this.t-n,t.clamp()}function J6(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]-e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()}function Q6(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t.data[i]=0;for(i=0;i<r.t;++i)t.data[i+n.t]=n.am(0,r.data[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&oe.ZERO.subTo(t,t)}function eA(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e.data[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t.data[n],e,2*n,0,1);(e.data[n+t.t]+=t.am(n+1,2*t.data[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()}function tA(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t){t!=null&&t.fromInt(0),n!=null&&this.copyTo(n);return}n==null&&(n=it());var a=it(),o=this.s,s=e.s,l=this.DB-of(r.data[r.t-1]);l>0?(r.lShiftTo(l,a),i.lShiftTo(l,n)):(r.copyTo(a),i.copyTo(n));var u=a.t,c=a.data[u-1];if(c!=0){var d=c*(1<<this.F1)+(u>1?a.data[u-2]>>this.F2:0),h=this.FV/d,f=(1<<this.F1)/d,g=1<<this.F2,p=n.t,m=p-u,b=t??it();for(a.dlShiftTo(m,b),n.compareTo(b)>=0&&(n.data[n.t++]=1,n.subTo(b,n)),oe.ONE.dlShiftTo(u,b),b.subTo(a,a);a.t<u;)a.data[a.t++]=0;for(;--m>=0;){var v=n.data[--p]==c?this.DM:Math.floor(n.data[p]*h+(n.data[p-1]+g)*f);if((n.data[p]+=a.am(0,v,n,m,0,u))<v)for(a.dlShiftTo(m,b),n.subTo(b,n);n.data[p]<--v;)n.subTo(b,n)}t!=null&&(n.drShiftTo(u,t),o!=s&&oe.ZERO.subTo(t,t)),n.t=u,n.clamp(),l>0&&n.rShiftTo(l,n),o<0&&oe.ZERO.subTo(n,n)}}}function nA(e){var t=it();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(oe.ZERO)>0&&e.subTo(t,t),t}function Eo(e){this.m=e}function rA(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function iA(e){return e}function aA(e){e.divRemTo(this.m,null,e)}function oA(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function sA(e,t){e.squareTo(t),this.reduce(t)}Eo.prototype.convert=rA;Eo.prototype.revert=iA;Eo.prototype.reduce=aA;Eo.prototype.mulTo=oA;Eo.prototype.sqrTo=sA;function lA(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function So(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function uA(e){var t=it();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(oe.ZERO)>0&&this.m.subTo(t,t),t}function cA(e){var t=it();return e.copyTo(t),this.reduce(t),t}function dA(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=e.data[t]&32767,r=n*this.mpl+((n*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);e.data[n]>=e.DV;)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function fA(e,t){e.squareTo(t),this.reduce(t)}function hA(e,t,n){e.multiplyTo(t,n),this.reduce(n)}So.prototype.convert=uA;So.prototype.revert=cA;So.prototype.reduce=dA;So.prototype.mulTo=hA;So.prototype.sqrTo=fA;function gA(){return(this.t>0?this.data[0]&1:this.s)==0}function pA(e,t){if(e>4294967295||e<1)return oe.ONE;var n=it(),r=it(),i=t.convert(this),a=of(e)-1;for(i.copyTo(n);--a>=0;)if(t.sqrTo(n,r),(e&1<<a)>0)t.mulTo(r,i,n);else{var o=n;n=r,r=o}return t.revert(n)}function mA(e,t){var n;return e<256||t.isEven()?n=new Eo(t):n=new So(t),this.exp(e,n)}oe.prototype.copyTo=O6;oe.prototype.fromInt=V6;oe.prototype.fromString=H6;oe.prototype.clamp=j6;oe.prototype.dlShiftTo=Z6;oe.prototype.drShiftTo=Y6;oe.prototype.lShiftTo=K6;oe.prototype.rShiftTo=q6;oe.prototype.subTo=J6;oe.prototype.multiplyTo=Q6;oe.prototype.squareTo=eA;oe.prototype.divRemTo=tA;oe.prototype.invDigit=lA;oe.prototype.isEven=gA;oe.prototype.exp=pA;oe.prototype.toString=W6;oe.prototype.negate=z6;oe.prototype.abs=G6;oe.prototype.compareTo=U6;oe.prototype.bitLength=X6;oe.prototype.mod=nA;oe.prototype.modPowInt=mA;oe.ZERO=oa(0);oe.ONE=oa(1);function bA(){var e=it();return this.copyTo(e),e}function vA(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function yA(){return this.t==0?this.s:this.data[0]<<24>>24}function xA(){return this.t==0?this.s:this.data[0]<<16>>16}function CA(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function EA(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function SA(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=oa(n),i=it(),a=it(),o="";for(this.divRemTo(r,i,a);i.signum()>0;)o=(n+a.intValue()).toString(e).substr(1)+o,i.divRemTo(r,i,a);return a.intValue().toString(e)+o}function wA(e,t){this.fromInt(0),t==null&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,a=0,o=0,s=0;s<e.length;++s){var l=bC(e,s);if(l<0){e.charAt(s)=="-"&&this.signum()==0&&(i=!0);continue}o=t*o+l,++a>=n&&(this.dMultiply(r),this.dAddOffset(o,0),a=0,o=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(o,0)),i&&oe.ZERO.subTo(this,this)}function IA(e,t,n){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(oe.ONE.shiftLeft(e-1),ip,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(oe.ONE.shiftLeft(e-1),this);else{var r=new Array,i=e&7;r.length=(e>>3)+1,t.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}}function _A(){var e=this.t,t=new Array;t[0]=this.s;var n=this.DB-e*this.DB%8,r,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),r&128&&(r|=-256),i==0&&(this.s&128)!=(r&128)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t}function DA(e){return this.compareTo(e)==0}function AA(e){return this.compareTo(e)<0?this:e}function TA(e){return this.compareTo(e)>0?this:e}function RA(e,t,n){var r,i,a=Math.min(e.t,this.t);for(r=0;r<a;++r)n.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(i=e.s&this.DM,r=a;r<this.t;++r)n.data[r]=t(this.data[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<e.t;++r)n.data[r]=t(i,e.data[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function BA(e,t){return e&t}function $A(e){var t=it();return this.bitwiseTo(e,BA,t),t}function ip(e,t){return e|t}function kA(e){var t=it();return this.bitwiseTo(e,ip,t),t}function vC(e,t){return e^t}function PA(e){var t=it();return this.bitwiseTo(e,vC,t),t}function yC(e,t){return e&~t}function FA(e){var t=it();return this.bitwiseTo(e,yC,t),t}function NA(){for(var e=it(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function MA(e){var t=it();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function LA(e){var t=it();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function OA(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function VA(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+OA(this.data[e]);return this.s<0?this.t*this.DB:-1}function HA(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function jA(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=HA(this.data[n]^t);return e}function WA(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function zA(e,t){var n=oe.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function GA(e){return this.changeBit(e,ip)}function UA(e){return this.changeBit(e,yC)}function XA(e){return this.changeBit(e,vC)}function ZA(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]+e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()}function YA(e){var t=it();return this.addTo(e,t),t}function KA(e){var t=it();return this.subTo(e,t),t}function qA(e){var t=it();return this.multiplyTo(e,t),t}function JA(e){var t=it();return this.divRemTo(e,t,null),t}function QA(e){var t=it();return this.divRemTo(e,null,t),t}function eT(e){var t=it(),n=it();return this.divRemTo(e,t,n),new Array(t,n)}function tT(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function nT(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function fu(){}function xC(e){return e}function rT(e,t,n){e.multiplyTo(t,n)}function iT(e,t){e.squareTo(t)}fu.prototype.convert=xC;fu.prototype.revert=xC;fu.prototype.mulTo=rT;fu.prototype.sqrTo=iT;function aT(e){return this.exp(e,new fu)}function oT(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n.data[--r]=0;var i;for(i=n.t-this.t;r<i;++r)n.data[r+this.t]=this.am(0,e.data[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e.data[r],n,r,0,t-r);n.clamp()}function sT(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n.data[this.t+r-t]=this.am(t-r,e.data[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)}function As(e){this.r2=it(),this.q3=it(),oe.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function lT(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=it();return e.copyTo(t),this.reduce(t),t}function uT(e){return e}function cT(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function dT(e,t){e.squareTo(t),this.reduce(t)}function fT(e,t,n){e.multiplyTo(t,n),this.reduce(n)}As.prototype.convert=lT;As.prototype.revert=uT;As.prototype.reduce=cT;As.prototype.mulTo=fT;As.prototype.sqrTo=dT;function hT(e,t){var n=e.bitLength(),r,i=oa(1),a;if(n<=0)return i;n<18?r=1:n<48?r=3:n<144?r=4:n<768?r=5:r=6,n<8?a=new Eo(t):t.isEven()?a=new As(t):a=new So(t);var o=new Array,s=3,l=r-1,u=(1<<r)-1;if(o[1]=a.convert(this),r>1){var c=it();for(a.sqrTo(o[1],c);s<=u;)o[s]=it(),a.mulTo(c,o[s-2],o[s]),s+=2}var d=e.t-1,h,f=!0,g=it(),p;for(n=of(e.data[d])-1;d>=0;){for(n>=l?h=e.data[d]>>n-l&u:(h=(e.data[d]&(1<<n+1)-1)<<l-n,d>0&&(h|=e.data[d-1]>>this.DB+n-l)),s=r;!(h&1);)h>>=1,--s;if((n-=s)<0&&(n+=this.DB,--d),f)o[h].copyTo(i),f=!1;else{for(;s>1;)a.sqrTo(i,g),a.sqrTo(g,i),s-=2;s>0?a.sqrTo(i,g):(p=i,i=g,g=p),a.mulTo(g,o[h],i)}for(;d>=0&&!(e.data[d]&1<<n);)a.sqrTo(i,g),p=i,i=g,g=p,--n<0&&(n=this.DB-1,--d)}return a.revert(i)}function gT(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n}function pT(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(t==0)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n}function mT(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return oe.ZERO;for(var n=e.clone(),r=this.clone(),i=oa(1),a=oa(0),o=oa(0),s=oa(1);n.signum()!=0;){for(;n.isEven();)n.rShiftTo(1,n),t?((!i.isEven()||!a.isEven())&&(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);n.compareTo(r)>=0?(n.subTo(r,n),t&&i.subTo(o,i),a.subTo(s,a)):(r.subTo(n,r),t&&o.subTo(i,o),s.subTo(a,s))}if(r.compareTo(oe.ONE)!=0)return oe.ZERO;if(s.compareTo(e)>=0)return s.subtract(e);if(s.signum()<0)s.addTo(e,s);else return s;return s.signum()<0?s.add(e):s}var Dr=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],bT=(1<<26)/Dr[Dr.length-1];function vT(e){var t,n=this.abs();if(n.t==1&&n.data[0]<=Dr[Dr.length-1]){for(t=0;t<Dr.length;++t)if(n.data[0]==Dr[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<Dr.length;){for(var r=Dr[t],i=t+1;i<Dr.length&&r<bT;)r*=Dr[i++];for(r=n.modInt(r);t<i;)if(r%Dr[t++]==0)return!1}return n.millerRabin(e)}function yT(e){var t=this.subtract(oe.ONE),n=t.getLowestSetBit();if(n<=0)return!1;for(var r=t.shiftRight(n),i=xT(),a,o=0;o<e;++o){do a=new oe(this.bitLength(),i);while(a.compareTo(oe.ONE)<=0||a.compareTo(t)>=0);var s=a.modPow(r,this);if(s.compareTo(oe.ONE)!=0&&s.compareTo(t)!=0){for(var l=1;l++<n&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(oe.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0}function xT(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}oe.prototype.chunkSize=CA;oe.prototype.toRadix=SA;oe.prototype.fromRadix=wA;oe.prototype.fromNumber=IA;oe.prototype.bitwiseTo=RA;oe.prototype.changeBit=zA;oe.prototype.addTo=ZA;oe.prototype.dMultiply=tT;oe.prototype.dAddOffset=nT;oe.prototype.multiplyLowerTo=oT;oe.prototype.multiplyUpperTo=sT;oe.prototype.modInt=pT;oe.prototype.millerRabin=yT;oe.prototype.clone=bA;oe.prototype.intValue=vA;oe.prototype.byteValue=yA;oe.prototype.shortValue=xA;oe.prototype.signum=EA;oe.prototype.toByteArray=_A;oe.prototype.equals=DA;oe.prototype.min=AA;oe.prototype.max=TA;oe.prototype.and=$A;oe.prototype.or=kA;oe.prototype.xor=PA;oe.prototype.andNot=FA;oe.prototype.not=NA;oe.prototype.shiftLeft=MA;oe.prototype.shiftRight=LA;oe.prototype.getLowestSetBit=VA;oe.prototype.bitCount=jA;oe.prototype.testBit=WA;oe.prototype.setBit=GA;oe.prototype.clearBit=UA;oe.prototype.flipBit=XA;oe.prototype.add=YA;oe.prototype.subtract=KA;oe.prototype.multiply=qA;oe.prototype.divide=JA;oe.prototype.remainder=QA;oe.prototype.divideAndRemainder=eT;oe.prototype.modPow=hT;oe.prototype.modInverse=mT;oe.prototype.pow=aT;oe.prototype.gcd=gT;oe.prototype.isProbablePrime=vT;var ti=ze,CC=ti.sha1=ti.sha1||{};ti.md.sha1=ti.md.algorithms.sha1=CC;CC.create=function(){EC||CT();var e=null,t=ti.util.createBuffer(),n=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var i=r.messageLengthSize/4,a=0;a<i;++a)r.fullMessageLength.push(0);return t=ti.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},r},r.start(),r.update=function(i,a){a==="utf8"&&(i=ti.util.encodeUtf8(i));var o=i.length;r.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=r.fullMessageLength.length-1;s>=0;--s)r.fullMessageLength[s]+=o[1],o[1]=o[0]+(r.fullMessageLength[s]/4294967296>>>0),r.fullMessageLength[s]=r.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),w1(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var i=ti.util.createBuffer();i.putBytes(t.bytes());var a=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=a&r.blockLength-1;i.putBytes(A0.substr(0,r.blockLength-o));for(var s,l,u=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)s=r.fullMessageLength[c+1]*8,l=s/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=s>>>0;i.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};w1(d,n,i);var h=ti.util.createBuffer();return h.putInt32(d.h0),h.putInt32(d.h1),h.putInt32(d.h2),h.putInt32(d.h3),h.putInt32(d.h4),h},r};var A0=null,EC=!1;function CT(){A0="",A0+=ti.util.fillString("\0",64),EC=!0}function w1(e,t,n){for(var r,i,a,o,s,l,u,c,d=n.length();d>=64;){for(i=e.h0,a=e.h1,o=e.h2,s=e.h3,l=e.h4,c=0;c<16;++c)r=n.getInt32(),t[c]=r,u=s^a&(o^s),r=(i<<5|i>>>27)+u+l+1518500249+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<20;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,u=s^a&(o^s),r=(i<<5|i>>>27)+u+l+1518500249+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<32;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+1859775393+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<40;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+1859775393+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<60;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a&o|s&(a^o),r=(i<<5|i>>>27)+u+l+2400959708+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<80;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+3395469782+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+o|0,e.h3=e.h3+s|0,e.h4=e.h4+l|0,d-=64}}var ni=ze,SC=ni.pkcs1=ni.pkcs1||{};SC.encode_rsa_oaep=function(e,t,n){var r,i,a,o;typeof n=="string"?(r=n,i=arguments[3]||void 0,a=arguments[4]||void 0):n&&(r=n.label||void 0,i=n.seed||void 0,a=n.md||void 0,n.mgf1&&n.mgf1.md&&(o=n.mgf1.md)),a?a.start():a=ni.md.sha1.create(),o||(o=a);var s=Math.ceil(e.n.bitLength()/8),l=s-2*a.digestLength-2;if(t.length>l){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=l,u}r||(r=""),a.update(r,"raw");for(var c=a.digest(),d="",h=l-t.length,f=0;f<h;f++)d+="\0";var g=c.getBytes()+d+""+t;if(!i)i=ni.random.getBytes(a.digestLength);else if(i.length!==a.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=i.length,u.digestLength=a.digestLength,u}var p=Jc(i,s-a.digestLength-1,o),m=ni.util.xorBytes(g,p,g.length),b=Jc(m,a.digestLength,o),v=ni.util.xorBytes(i,b,i.length);return"\0"+v+m};SC.decode_rsa_oaep=function(e,t,n){var r,i,a;typeof n=="string"?(r=n,i=arguments[3]||void 0):n&&(r=n.label||void 0,i=n.md||void 0,n.mgf1&&n.mgf1.md&&(a=n.mgf1.md));var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var m=new Error("RSAES-OAEP encoded message length is invalid.");throw m.length=t.length,m.expectedLength=o,m}if(i===void 0?i=ni.md.sha1.create():i.start(),a||(a=i),o<2*i.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");r||(r=""),i.update(r,"raw");for(var s=i.digest().getBytes(),l=t.charAt(0),u=t.substring(1,i.digestLength+1),c=t.substring(1+i.digestLength),d=Jc(c,i.digestLength,a),h=ni.util.xorBytes(u,d,u.length),f=Jc(h,o-i.digestLength-1,a),g=ni.util.xorBytes(c,f,c.length),p=g.substring(0,i.digestLength),m=l!=="\0",b=0;b<i.digestLength;++b)m|=s.charAt(b)!==p.charAt(b);for(var v=1,x=i.digestLength,C=i.digestLength;C<g.length;C++){var E=g.charCodeAt(C),w=E&1^1,B=v?65534:0;m|=E&B,v=v&w,x+=v}if(m||g.charCodeAt(x)!==1)throw new Error("Invalid RSAES-OAEP padding.");return g.substring(x+1)};function Jc(e,t,n){n||(n=ni.md.sha1.create());for(var r="",i=Math.ceil(t/n.digestLength),a=0;a<i;++a){var o=String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255);n.start(),n.update(e+o),r+=n.digest().getBytes()}return r.substring(0,t)}var Xi=ze;(function(){if(Xi.prime){Xi.prime;return}var e=Xi.prime=Xi.prime||{},t=Xi.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var i=function(d,h){return d|h};e.generateProbablePrime=function(d,h,f){typeof h=="function"&&(f=h,h={}),h=h||{};var g=h.algorithm||"PRIMEINC";typeof g=="string"&&(g={name:g}),g.options=g.options||{};var p=h.prng||Xi.random,m={nextBytes:function(b){for(var v=p.getBytesSync(b.length),x=0;x<b.length;++x)b[x]=v.charCodeAt(x)}};if(g.name==="PRIMEINC")return a(d,m,g.options,f);throw new Error("Invalid prime generation algorithm: "+g.name)};function a(d,h,f,g){return"workers"in f?l(d,h,f,g):o(d,h,f,g)}function o(d,h,f,g){var p=u(d,h),m=0,b=c(p.bitLength());"millerRabinTests"in f&&(b=f.millerRabinTests);var v=10;"maxBlockTime"in f&&(v=f.maxBlockTime),s(p,d,h,m,b,v,g)}function s(d,h,f,g,p,m,b){var v=+new Date;do{if(d.bitLength()>h&&(d=u(h,f)),d.isProbablePrime(p))return b(null,d);d.dAddOffset(n[g++%8],0)}while(m<0||+new Date-v<m);Xi.util.setImmediate(function(){s(d,h,f,g,p,m,b)})}function l(d,h,f,g){if(typeof Worker>"u")return o(d,h,f,g);var p=u(d,h),m=f.workers,b=f.workLoad||100,v=b*30/8,x=f.workerScript||"forge/prime.worker.js";if(m===-1)return Xi.util.estimateCores(function(E,w){E&&(w=2),m=w-1,C()});C();function C(){m=Math.max(1,m);for(var E=[],w=0;w<m;++w)E[w]=new Worker(x);for(var w=0;w<m;++w)E[w].addEventListener("message",y);var B=!1;function y(S){if(!B){var D=S.data;if(D.found){for(var A=0;A<E.length;++A)E[A].terminate();return B=!0,g(null,new t(D.prime,16))}p.bitLength()>d&&(p=u(d,h));var T=p.toString(16);S.target.postMessage({hex:T,workLoad:b}),p.dAddOffset(v,0)}}}}function u(d,h){var f=new t(d,h),g=d-1;return f.testBit(g)||f.bitwiseTo(t.ONE.shiftLeft(g),i,f),f.dAddOffset(31-f.mod(r).byteValue(),0),f}function c(d){return d<=100?27:d<=150?18:d<=200?15:d<=250?12:d<=300?9:d<=350?8:d<=400?7:d<=500?6:d<=600?5:d<=800?4:d<=1250?3:2}})();var De=ze;if(typeof rt>"u")var rt=De.jsbn.BigInteger;var T0=De.util.isNodejs?np:null,q=De.asn1,br=De.util;De.pki=De.pki||{};De.pki.rsa=De.rsa=De.rsa||{};var Ve=De.pki,ET=[6,4,2,4,2,4,6,2],ST={name:"PrivateKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},wT={name:"RSAPrivateKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},IT={name:"RSAPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},_T=De.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},DT={name:"DigestInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:q.Class.UNIVERSAL,type:q.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:q.Class.UNIVERSAL,type:q.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},AT=function(e){var t;if(e.algorithm in Ve.oids)t=Ve.oids[e.algorithm];else{var n=new Error("Unknown message digest algorithm.");throw n.algorithm=e.algorithm,n}var r=q.oidToDer(t).getBytes(),i=q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[]),a=q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[]);a.value.push(q.create(q.Class.UNIVERSAL,q.Type.OID,!1,r)),a.value.push(q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,""));var o=q.create(q.Class.UNIVERSAL,q.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(o),q.toDer(i).getBytes()},wC=function(e,t,n){if(n)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(rt.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(rt.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new rt(De.util.bytesToHex(De.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(rt.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var i=e.mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);i.compareTo(a)<0;)i=i.add(t.p);var o=i.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return o=o.multiply(r.modInverse(t.n)).mod(t.n),o};Ve.rsa.encrypt=function(e,t,n){var r=n,i,a=Math.ceil(t.n.bitLength()/8);n!==!1&&n!==!0?(r=n===2,i=IC(e,t,n)):(i=De.util.createBuffer(),i.putBytes(e));for(var o=new rt(i.toHex(),16),s=wC(o,t,r),l=s.toString(16),u=De.util.createBuffer(),c=a-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(De.util.hexToBytes(l)),u.getBytes()};Ve.rsa.decrypt=function(e,t,n,r){var i=Math.ceil(t.n.bitLength()/8);if(e.length!==i){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=i,a}var o=new rt(De.util.createBuffer(e).toHex(),16);if(o.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var s=wC(o,t,n),l=s.toString(16),u=De.util.createBuffer(),c=i-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(De.util.hexToBytes(l)),r!==!1?Qc(u.getBytes(),t,n):u.getBytes()};Ve.rsa.createKeyPairGenerationState=function(e,t,n){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,n=n||{};var r=n.prng||De.random,i={nextBytes:function(s){for(var l=r.getBytesSync(s.length),u=0;u<s.length;++u)s[u]=l.charCodeAt(u)}},a=n.algorithm||"PRIMEINC",o;if(a==="PRIMEINC")o={algorithm:a,state:0,bits:e,rng:i,eInt:t||65537,e:new rt(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},o.e.fromInt(o.eInt);else throw new Error("Invalid key generation algorithm: "+a);return o};Ve.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var n=new rt(null);n.fromInt(30);for(var r=0,i=function(d,h){return d|h},a=+new Date,o,s=0;e.keys===null&&(t<=0||s<t);){if(e.state===0){var l=e.p===null?e.pBits:e.qBits,u=l-1;e.pqState===0?(e.num=new rt(l,e.rng),e.num.testBit(u)||e.num.bitwiseTo(rt.ONE.shiftLeft(u),i,e.num),e.num.dAddOffset(31-e.num.mod(n).byteValue(),0),r=0,++e.pqState):e.pqState===1?e.num.bitLength()>l?e.pqState=0:e.num.isProbablePrime(RT(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(ET[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(rt.ONE),e.q1=e.q.subtract(rt.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(rt.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var c=e.e.modInverse(e.phi);e.keys={privateKey:Ve.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Ve.rsa.setPublicKey(e.n,e.e)}}o=+new Date,s+=o-a,a=o}return e.keys!==null};Ve.rsa.generateKeyPair=function(e,t,n,r){if(arguments.length===1?typeof e=="object"?(n=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(n=t,t=void 0):(n=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof n=="function"&&(r=n,n=void 0):(r=n,n=t,t=void 0)),n=n||{},e===void 0&&(e=n.bits||2048),t===void 0&&(t=n.e||65537),!De.options.usePureJavaScript&&!n.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(I1("generateKeyPair"))return T0.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(s,l,u){if(s)return r(s);r(null,{privateKey:Ve.privateKeyFromPem(u),publicKey:Ve.publicKeyFromPem(l)})});if(_1("generateKey")&&_1("exportKey"))return br.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A1(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(s){return br.globalScope.crypto.subtle.exportKey("pkcs8",s.privateKey)}).then(void 0,function(s){r(s)}).then(function(s){if(s){var l=Ve.privateKeyFromAsn1(q.fromDer(De.util.createBuffer(s)));r(null,{privateKey:l,publicKey:Ve.setRsaPublicKey(l.n,l.e)})}});if(D1("generateKey")&&D1("exportKey")){var i=br.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A1(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);i.oncomplete=function(s){var l=s.target.result,u=br.globalScope.msCrypto.subtle.exportKey("pkcs8",l.privateKey);u.oncomplete=function(c){var d=c.target.result,h=Ve.privateKeyFromAsn1(q.fromDer(De.util.createBuffer(d)));r(null,{privateKey:h,publicKey:Ve.setRsaPublicKey(h.n,h.e)})},u.onerror=function(c){r(c)}},i.onerror=function(s){r(s)};return}}else if(I1("generateKeyPairSync")){var a=T0.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Ve.privateKeyFromPem(a.privateKey),publicKey:Ve.publicKeyFromPem(a.publicKey)}}}var o=Ve.rsa.createKeyPairGenerationState(e,t,n);if(!r)return Ve.rsa.stepKeyPairGenerationState(o,0),o.keys;TT(o,n,r)};Ve.setRsaPublicKey=Ve.rsa.setPublicKey=function(e,t){var n={n:e,e:t};return n.encrypt=function(r,i,a){if(typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSAES-PKCS1-V1_5"),i==="RSAES-PKCS1-V1_5")i={encode:function(s,l,u){return IC(s,l,2).getBytes()}};else if(i==="RSA-OAEP"||i==="RSAES-OAEP")i={encode:function(s,l){return De.pkcs1.encode_rsa_oaep(l,s,a)}};else if(["RAW","NONE","NULL",null].indexOf(i)!==-1)i={encode:function(s){return s}};else if(typeof i=="string")throw new Error('Unsupported encryption scheme: "'+i+'".');var o=i.encode(r,n,!0);return Ve.rsa.encrypt(o,n,!0)},n.verify=function(r,i,a,o){typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSASSA-PKCS1-V1_5"),o===void 0&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),a==="RSASSA-PKCS1-V1_5"?a={verify:function(l,u){u=Qc(u,n,!0);var c=q.fromDer(u,{parseAllBytes:o._parseAllDigestBytes}),d={},h=[];if(!q.validate(c,DT,d,h)){var f=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw f.errors=h,f}var g=q.derToOid(d.algorithmIdentifier);if(!(g===De.oids.md2||g===De.oids.md5||g===De.oids.sha1||g===De.oids.sha224||g===De.oids.sha256||g===De.oids.sha384||g===De.oids.sha512||g===De.oids["sha512-224"]||g===De.oids["sha512-256"])){var f=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw f.oid=g,f}if((g===De.oids.md2||g===De.oids.md5)&&!("parameters"in d))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return l===d.digest}}:(a==="NONE"||a==="NULL"||a===null)&&(a={verify:function(l,u){return u=Qc(u,n,!0),l===u}});var s=Ve.rsa.decrypt(i,n,!0,!1);return a.verify(r,s,n.n.bitLength())},n};Ve.setRsaPrivateKey=Ve.rsa.setPrivateKey=function(e,t,n,r,i,a,o,s){var l={n:e,e:t,d:n,p:r,q:i,dP:a,dQ:o,qInv:s};return l.decrypt=function(u,c,d){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var h=Ve.rsa.decrypt(u,l,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:Qc};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(f,g){return De.pkcs1.decode_rsa_oaep(g,f,d)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(f){return f}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(h,l,!1)},l.sign=function(u,c){var d=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:AT},d=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return u}},d=1);var h=c.encode(u,l.n.bitLength());return Ve.rsa.encrypt(h,l,d)},l};Ve.wrapRsaPrivateKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,q.integerToDer(0).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.OID,!1,q.oidToDer(Ve.oids.rsaEncryption).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,"")]),q.create(q.Class.UNIVERSAL,q.Type.OCTETSTRING,!1,q.toDer(e).getBytes())])};Ve.privateKeyFromAsn1=function(e){var t={},n=[];if(q.validate(e,ST,t,n)&&(e=q.fromDer(De.util.createBuffer(t.privateKey))),t={},n=[],!q.validate(e,wT,t,n)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=n,r}var i,a,o,s,l,u,c,d;return i=De.util.createBuffer(t.privateKeyModulus).toHex(),a=De.util.createBuffer(t.privateKeyPublicExponent).toHex(),o=De.util.createBuffer(t.privateKeyPrivateExponent).toHex(),s=De.util.createBuffer(t.privateKeyPrime1).toHex(),l=De.util.createBuffer(t.privateKeyPrime2).toHex(),u=De.util.createBuffer(t.privateKeyExponent1).toHex(),c=De.util.createBuffer(t.privateKeyExponent2).toHex(),d=De.util.createBuffer(t.privateKeyCoefficient).toHex(),Ve.setRsaPrivateKey(new rt(i,16),new rt(a,16),new rt(o,16),new rt(s,16),new rt(l,16),new rt(u,16),new rt(c,16),new rt(d,16))};Ve.privateKeyToAsn1=Ve.privateKeyToRSAPrivateKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,q.integerToDer(0).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.n)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.e)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.d)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.p)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.q)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.dP)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.dQ)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.qInv))])};Ve.publicKeyFromAsn1=function(e){var t={},n=[];if(q.validate(e,_T,t,n)){var r=q.derToOid(t.publicKeyOid);if(r!==Ve.oids.rsaEncryption){var i=new Error("Cannot read public key. Unknown OID.");throw i.oid=r,i}e=t.rsaPublicKey}if(n=[],!q.validate(e,IT,t,n)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=n,i}var a=De.util.createBuffer(t.publicKeyModulus).toHex(),o=De.util.createBuffer(t.publicKeyExponent).toHex();return Ve.setRsaPublicKey(new rt(a,16),new rt(o,16))};Ve.publicKeyToAsn1=Ve.publicKeyToSubjectPublicKeyInfo=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.OID,!1,q.oidToDer(Ve.oids.rsaEncryption).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,"")]),q.create(q.Class.UNIVERSAL,q.Type.BITSTRING,!1,[Ve.publicKeyToRSAPublicKey(e)])])};Ve.publicKeyToRSAPublicKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.n)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.e))])};function IC(e,t,n){var r=De.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=e.length,a.max=i-11,a}r.putByte(0),r.putByte(n);var o=i-3-e.length,s;if(n===0||n===1){s=n===0?0:255;for(var l=0;l<o;++l)r.putByte(s)}else for(;o>0;){for(var u=0,c=De.random.getBytes(o),l=0;l<o;++l)s=c.charCodeAt(l),s===0?++u:r.putByte(s);o=u}return r.putByte(0),r.putBytes(e),r}function Qc(e,t,n,r){var i=Math.ceil(t.n.bitLength()/8),a=De.util.createBuffer(e),o=a.getByte(),s=a.getByte();if(o!==0||n&&s!==0&&s!==1||!n&&s!=2||n&&s===0&&typeof r>"u")throw new Error("Encryption block is invalid.");var l=0;if(s===0){l=i-3-r;for(var u=0;u<l;++u)if(a.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(s===1)for(l=0;a.length()>1;){if(a.getByte()!==255){--a.read;break}++l}else if(s===2)for(l=0;a.length()>1;){if(a.getByte()===0){--a.read;break}++l}var c=a.getByte();if(c!==0||l!==i-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function TT(e,t,n){typeof t=="function"&&(n=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),i();function i(){a(e.pBits,function(s,l){if(s)return n(s);if(e.p=l,e.q!==null)return o(s,e.q);a(e.qBits,o)})}function a(s,l){De.prime.generateProbablePrime(s,r,l)}function o(s,l){if(s)return n(s);if(e.q=l,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)!==0){e.p=null,i();return}if(e.q.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)!==0){e.q=null,a(e.qBits,o);return}if(e.p1=e.p.subtract(rt.ONE),e.q1=e.q.subtract(rt.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(rt.ONE)!==0){e.p=e.q=null,i();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,a(e.qBits,o);return}var c=e.e.modInverse(e.phi);e.keys={privateKey:Ve.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Ve.rsa.setPublicKey(e.n,e.e)},n(null,e.keys)}}function jr(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=De.util.hexToBytes(t);return n.length>1&&(n.charCodeAt(0)===0&&!(n.charCodeAt(1)&128)||n.charCodeAt(0)===255&&(n.charCodeAt(1)&128)===128)?n.substr(1):n}function RT(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function I1(e){return De.util.isNodejs&&typeof T0[e]=="function"}function _1(e){return typeof br.globalScope<"u"&&typeof br.globalScope.crypto=="object"&&typeof br.globalScope.crypto.subtle=="object"&&typeof br.globalScope.crypto.subtle[e]=="function"}function D1(e){return typeof br.globalScope<"u"&&typeof br.globalScope.msCrypto=="object"&&typeof br.globalScope.msCrypto.subtle=="object"&&typeof br.globalScope.msCrypto.subtle[e]=="function"}function A1(e){for(var t=De.util.hexToBytes(e.toString(16)),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}var me=ze;if(typeof BT>"u")var BT=me.jsbn.BigInteger;var ne=me.asn1,je=me.pki=me.pki||{};je.pbe=me.pbe=me.pbe||{};var ka=je.oids,$T={name:"EncryptedPrivateKeyInfo",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},kT={name:"PBES2Algorithms",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},PT={name:"pkcs-12PbeParams",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,capture:"iterations"}]};je.encryptPrivateKeyInfo=function(e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||"aes128",n.prfAlgorithm=n.prfAlgorithm||"sha1";var r=me.random.getBytesSync(n.saltSize),i=n.count,a=ne.integerToDer(i),o,s,l;if(n.algorithm.indexOf("aes")===0||n.algorithm==="des"){var u,c,d;switch(n.algorithm){case"aes128":o=16,u=16,c=ka["aes128-CBC"],d=me.aes.createEncryptionCipher;break;case"aes192":o=24,u=16,c=ka["aes192-CBC"],d=me.aes.createEncryptionCipher;break;case"aes256":o=32,u=16,c=ka["aes256-CBC"],d=me.aes.createEncryptionCipher;break;case"des":o=8,u=8,c=ka.desCBC,d=me.des.createEncryptionCipher;break;default:var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=n.algorithm,h}var f="hmacWith"+n.prfAlgorithm.toUpperCase(),g=DC(f),p=me.pkcs5.pbkdf2(t,r,i,o,g),m=me.random.getBytesSync(u),b=d(p);b.start(m),b.update(ne.toDer(e)),b.finish(),l=b.output.getBytes();var v=FT(r,a,o,f);s=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka.pkcs5PBES2).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka.pkcs5PBKDF2).getBytes()),v]),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(c).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,m)])])])}else if(n.algorithm==="3des"){o=24;var x=new me.util.ByteBuffer(r),p=je.pbe.generatePkcs12Key(t,x,1,i,o),m=je.pbe.generatePkcs12Key(t,x,2,i,o),b=me.des.createEncryptionCipher(p);b.start(m),b.update(ne.toDer(e)),b.finish(),l=b.output.getBytes(),s=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,r),ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,a.getBytes())])])}else{var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=n.algorithm,h}var C=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[s,ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,l)]);return C};je.decryptPrivateKeyInfo=function(e,t){var n=null,r={},i=[];if(!ne.validate(e,$T,r,i)){var a=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var o=ne.derToOid(r.encryptionOid),s=je.pbe.getCipher(o,r.encryptionParams,t),l=me.util.createBuffer(r.encryptedData);return s.update(l),s.finish()&&(n=ne.fromDer(s.output)),n};je.encryptedPrivateKeyToPem=function(e,t){var n={type:"ENCRYPTED PRIVATE KEY",body:ne.toDer(e).getBytes()};return me.pem.encode(n,{maxline:t})};je.encryptedPrivateKeyFromPem=function(e){var t=me.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var n=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return ne.fromDer(t.body)};je.encryptRsaPrivateKey=function(e,t,n){if(n=n||{},!n.legacy){var r=je.wrapRsaPrivateKey(je.privateKeyToAsn1(e));return r=je.encryptPrivateKeyInfo(r,t,n),je.encryptedPrivateKeyToPem(r)}var i,a,o,s;switch(n.algorithm){case"aes128":i="AES-128-CBC",o=16,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"aes192":i="AES-192-CBC",o=24,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"aes256":i="AES-256-CBC",o=32,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"3des":i="DES-EDE3-CBC",o=24,a=me.random.getBytesSync(8),s=me.des.createEncryptionCipher;break;case"des":i="DES-CBC",o=8,a=me.random.getBytesSync(8),s=me.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+n.algorithm+'".');throw l.algorithm=n.algorithm,l}var u=me.pbe.opensslDeriveBytes(t,a.substr(0,8),o),c=s(u);c.start(a),c.update(ne.toDer(je.privateKeyToAsn1(e))),c.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:i,parameters:me.util.bytesToHex(a).toUpperCase()},body:c.output.getBytes()};return me.pem.encode(d)};je.decryptRsaPrivateKey=function(e,t){var n=null,r=me.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw i.headerType=i,i}if(r.procType&&r.procType.type==="ENCRYPTED"){var a,o;switch(r.dekInfo.algorithm){case"DES-CBC":a=8,o=me.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,o=me.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,o=me.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,o=me.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,o=me.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,o=function(d){return me.rc2.createDecryptionCipher(d,40)};break;case"RC2-64-CBC":a=8,o=function(d){return me.rc2.createDecryptionCipher(d,64)};break;case"RC2-128-CBC":a=16,o=function(d){return me.rc2.createDecryptionCipher(d,128)};break;default:var i=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw i.algorithm=r.dekInfo.algorithm,i}var s=me.util.hexToBytes(r.dekInfo.parameters),l=me.pbe.opensslDeriveBytes(t,s.substr(0,8),a),u=o(l);if(u.start(s),u.update(me.util.createBuffer(r.body)),u.finish())n=u.output.getBytes();else return n}else n=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?n=je.decryptPrivateKeyInfo(ne.fromDer(n),t):n=ne.fromDer(n),n!==null&&(n=je.privateKeyFromAsn1(n)),n};je.pbe.generatePkcs12Key=function(e,t,n,r,i,a){var o,s;if(typeof a>"u"||a===null){if(!("sha1"in me.md))throw new Error('"sha1" hash algorithm unavailable.');a=me.md.sha1.create()}var l=a.digestLength,u=a.blockLength,c=new me.util.ByteBuffer,d=new me.util.ByteBuffer;if(e!=null){for(s=0;s<e.length;s++)d.putInt16(e.charCodeAt(s));d.putInt16(0)}var h=d.length(),f=t.length(),g=new me.util.ByteBuffer;g.fillWithByte(n,u);var p=u*Math.ceil(f/u),m=new me.util.ByteBuffer;for(s=0;s<p;s++)m.putByte(t.at(s%f));var b=u*Math.ceil(h/u),v=new me.util.ByteBuffer;for(s=0;s<b;s++)v.putByte(d.at(s%h));var x=m;x.putBuffer(v);for(var C=Math.ceil(i/l),E=1;E<=C;E++){var w=new me.util.ByteBuffer;w.putBytes(g.bytes()),w.putBytes(x.bytes());for(var B=0;B<r;B++)a.start(),a.update(w.getBytes()),w=a.digest();var y=new me.util.ByteBuffer;for(s=0;s<u;s++)y.putByte(w.at(s%l));var S=Math.ceil(f/u)+Math.ceil(h/u),D=new me.util.ByteBuffer;for(o=0;o<S;o++){var A=new me.util.ByteBuffer(x.getBytes(u)),T=511;for(s=y.length()-1;s>=0;s--)T=T>>8,T+=y.at(s)+A.at(s),A.setAt(s,T&255);D.putBuffer(A)}x=D,c.putBuffer(w)}return c.truncate(c.length()-i),c};je.pbe.getCipher=function(e,t,n){switch(e){case je.oids.pkcs5PBES2:return je.pbe.getCipherForPBES2(e,t,n);case je.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case je.oids["pbewithSHAAnd40BitRC2-CBC"]:return je.pbe.getCipherForPKCS12PBE(e,t,n);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}};je.pbe.getCipherForPBES2=function(e,t,n){var r={},i=[];if(!ne.validate(t,kT,r,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}if(e=ne.derToOid(r.kdfOid),e!==je.oids.pkcs5PBKDF2){var a=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw a.oid=e,a.supportedOids=["pkcs5PBKDF2"],a}if(e=ne.derToOid(r.encOid),e!==je.oids["aes128-CBC"]&&e!==je.oids["aes192-CBC"]&&e!==je.oids["aes256-CBC"]&&e!==je.oids["des-EDE3-CBC"]&&e!==je.oids.desCBC){var a=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw a.oid=e,a.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],a}var o=r.kdfSalt,s=me.util.createBuffer(r.kdfIterationCount);s=s.getInt(s.length()<<3);var l,u;switch(je.oids[e]){case"aes128-CBC":l=16,u=me.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,u=me.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,u=me.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,u=me.des.createDecryptionCipher;break;case"desCBC":l=8,u=me.des.createDecryptionCipher;break}var c=_C(r.prfOid),d=me.pkcs5.pbkdf2(n,o,s,l,c),h=r.encIv,f=u(d);return f.start(h),f};je.pbe.getCipherForPKCS12PBE=function(e,t,n){var r={},i=[];if(!ne.validate(t,PT,r,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var o=me.util.createBuffer(r.salt),s=me.util.createBuffer(r.iterations);s=s.getInt(s.length()<<3);var l,u,c;switch(e){case je.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,u=8,c=me.des.startDecrypting;break;case je.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,u=8,c=function(p,m){var b=me.rc2.createDecryptionCipher(p,40);return b.start(m,null),b};break;default:var a=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw a.oid=e,a}var d=_C(r.prfOid),h=je.pbe.generatePkcs12Key(n,o,1,s,l,d);d.start();var f=je.pbe.generatePkcs12Key(n,o,2,s,u,d);return c(h,f)};je.pbe.opensslDeriveBytes=function(e,t,n,r){if(typeof r>"u"||r===null){if(!("md5"in me.md))throw new Error('"md5" hash algorithm unavailable.');r=me.md.md5.create()}t===null&&(t="");for(var i=[T1(r,e+t)],a=16,o=1;a<n;++o,a+=16)i.push(T1(r,i[o-1]+e+t));return i.join("").substr(0,n)};function T1(e,t){return e.start().update(t).digest().getBytes()}function _C(e){var t;if(!e)t="hmacWithSHA1";else if(t=je.oids[ne.derToOid(e)],!t){var n=new Error("Unsupported PRF OID.");throw n.oid=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}return DC(t)}function DC(e){var t=me.md;switch(e){case"hmacWithSHA224":t=me.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var n=new Error("Unsupported PRF algorithm.");throw n.algorithm=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function FT(e,t,n,r){var i=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,e),ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,t.getBytes())]);return r!=="hmacWithSHA1"&&i.value.push(ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,me.util.hexToBytes(n.toString(16))),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(je.oids[r]).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.NULL,!1,"")])),i}var cs=ze,pe=cs.asn1,Ts=cs.pkcs7asn1=cs.pkcs7asn1||{};cs.pkcs7=cs.pkcs7||{};cs.pkcs7.asn1=Ts;var AC={name:"ContentInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Ts.contentInfoValidator=AC;var TC={name:"EncryptedContentInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Ts.envelopedDataValidator={name:"EnvelopedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(TC)};Ts.encryptedDataValidator={name:"EncryptedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"}].concat(TC)};var NT={name:"SignerInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:pe.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Ts.signedDataValidator={name:"SignedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},AC,{name:"SignedData.Certificates",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:pe.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,capture:"signerInfos",optional:!0,value:[NT]}]};Ts.recipientInfoValidator={name:"RecipientInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var ao=ze;ao.mgf=ao.mgf||{};var MT=ao.mgf.mgf1=ao.mgf1=ao.mgf1||{};MT.create=function(e){var t={generate:function(n,r){for(var i=new ao.util.ByteBuffer,a=Math.ceil(r/e.digestLength),o=0;o<a;o++){var s=new ao.util.ByteBuffer;s.putInt32(o),e.start(),e.update(n+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}};return t};var ed=ze;ed.mgf=ed.mgf||{};ed.mgf.mgf1=ed.mgf1;var Ga=ze,LT=Ga.pss=Ga.pss||{};LT.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,n=e.mgf,r=t.digestLength,i=e.salt||null;typeof i=="string"&&(i=Ga.util.createBuffer(i));var a;if("saltLength"in e)a=e.saltLength;else if(i!==null)a=i.length();else throw new Error("Salt length not specified or specific salt not given.");if(i!==null&&i.length()!==a)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||Ga.random,s={};return s.encode=function(l,u){var c,d=u-1,h=Math.ceil(d/8),f=l.digest().getBytes();if(h<r+a+2)throw new Error("Message is too long to encrypt.");var g;i===null?g=o.getBytesSync(a):g=i.bytes();var p=new Ga.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(f),p.putBytes(g),t.start(),t.update(p.getBytes());var m=t.digest().getBytes(),b=new Ga.util.ByteBuffer;b.fillWithByte(0,h-a-r-2),b.putByte(1),b.putBytes(g);var v=b.getBytes(),x=h-r-1,C=n.generate(m,x),E="";for(c=0;c<x;c++)E+=String.fromCharCode(v.charCodeAt(c)^C.charCodeAt(c));var w=65280>>8*h-d&255;return E=String.fromCharCode(E.charCodeAt(0)&~w)+E.substr(1),E+m+"¼"},s.verify=function(l,u,c){var d,h=c-1,f=Math.ceil(h/8);if(u=u.substr(-f),f<r+a+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(f-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var g=f-r-1,p=u.substr(0,g),m=u.substr(g,r),b=65280>>8*f-h&255;if(p.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var v=n.generate(m,g),x="";for(d=0;d<g;d++)x+=String.fromCharCode(p.charCodeAt(d)^v.charCodeAt(d));x=String.fromCharCode(x.charCodeAt(0)&~b)+x.substr(1);var C=f-r-a-2;for(d=0;d<C;d++)if(x.charCodeAt(d)!==0)throw new Error("Leftmost octets not zero as expected");if(x.charCodeAt(C)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var E=x.substr(-a),w=new Ga.util.ByteBuffer;w.fillWithByte(0,8),w.putBytes(l),w.putBytes(E),t.start(),t.update(w.getBytes());var B=t.digest().getBytes();return m===B},s};var Ae=ze,N=Ae.asn1,de=Ae.pki=Ae.pki||{},nt=de.oids,Nt={};Nt.CN=nt.commonName;Nt.commonName="CN";Nt.C=nt.countryName;Nt.countryName="C";Nt.L=nt.localityName;Nt.localityName="L";Nt.ST=nt.stateOrProvinceName;Nt.stateOrProvinceName="ST";Nt.O=nt.organizationName;Nt.organizationName="O";Nt.OU=nt.organizationalUnitName;Nt.organizationalUnitName="OU";Nt.E=nt.emailAddress;Nt.emailAddress="E";var RC=Ae.pki.rsa.publicKeyValidator,OT={name:"Certificate",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:N.Class.UNIVERSAL,type:N.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:N.Class.UNIVERSAL,type:N.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:N.Class.UNIVERSAL,type:N.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:N.Class.UNIVERSAL,type:N.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},RC,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:N.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:N.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:N.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},VT={name:"rsapss",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:N.Class.UNIVERSAL,type:N.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:N.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:N.Class.UNIVERSAL,type:N.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:N.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:N.Class.UNIVERSAL,type:N.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:N.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:N.Class.UNIVERSAL,type:N.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},HT={name:"CertificationRequestInfo",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},RC,{name:"CertificationRequestInfo.attributes",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:N.Class.UNIVERSAL,type:N.Type.SET,constructed:!0}]}]}]},jT={name:"CertificationRequest",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[HT,{name:"CertificationRequest.signatureAlgorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};de.RDNAttributesAsArray=function(e,t){for(var n=[],r,i,a,o=0;o<e.value.length;++o){r=e.value[o];for(var s=0;s<r.value.length;++s)a={},i=r.value[s],a.type=N.derToOid(i.value[0].value),a.value=i.value[1].value,a.valueTagClass=i.value[1].type,a.type in nt&&(a.name=nt[a.type],a.name in Nt&&(a.shortName=Nt[a.name])),t&&(t.update(a.type),t.update(a.value)),n.push(a)}return n};de.CRIAttributesAsArray=function(e){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=N.derToOid(r.value[0].value),a=r.value[1].value,o=0;o<a.length;++o){var s={};if(s.type=i,s.value=a[o].value,s.valueTagClass=a[o].type,s.type in nt&&(s.name=nt[s.type],s.name in Nt&&(s.shortName=Nt[s.name])),s.type===nt.extensionRequest){s.extensions=[];for(var l=0;l<s.value.length;++l)s.extensions.push(de.certificateExtensionFromAsn1(s.value[l]))}t.push(s)}return t};function xa(e,t){typeof t=="string"&&(t={shortName:t});for(var n=null,r,i=0;n===null&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}var td=function(e,t,n){var r={};if(e!==nt["RSASSA-PSS"])return r;n&&(r={hash:{algorithmOid:nt.sha1},mgf:{algorithmOid:nt.mgf1,hash:{algorithmOid:nt.sha1}},saltLength:20});var i={},a=[];if(!N.validate(t,VT,i,a)){var o=new Error("Cannot read RSASSA-PSS parameter block.");throw o.errors=a,o}return i.hashOid!==void 0&&(r.hash=r.hash||{},r.hash.algorithmOid=N.derToOid(i.hashOid)),i.maskGenOid!==void 0&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=N.derToOid(i.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=N.derToOid(i.maskGenHashOid)),i.saltLength!==void 0&&(r.saltLength=i.saltLength.charCodeAt(0)),r},sf=function(e){switch(nt[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Ae.md.sha1.create();case"md5WithRSAEncryption":return Ae.md.md5.create();case"sha256WithRSAEncryption":return Ae.md.sha256.create();case"sha384WithRSAEncryption":return Ae.md.sha384.create();case"sha512WithRSAEncryption":return Ae.md.sha512.create();case"RSASSA-PSS":return Ae.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},BC=function(e){var t=e.certificate,n;switch(t.signatureOid){case nt.sha1WithRSAEncryption:case nt.sha1WithRSASignature:break;case nt["RSASSA-PSS"]:var r,i;if(r=nt[t.signatureParameters.mgf.hash.algorithmOid],r===void 0||Ae.md[r]===void 0){var a=new Error("Unsupported MGF hash function.");throw a.oid=t.signatureParameters.mgf.hash.algorithmOid,a.name=r,a}if(i=nt[t.signatureParameters.mgf.algorithmOid],i===void 0||Ae.mgf[i]===void 0){var a=new Error("Unsupported MGF function.");throw a.oid=t.signatureParameters.mgf.algorithmOid,a.name=i,a}if(i=Ae.mgf[i].create(Ae.md[r].create()),r=nt[t.signatureParameters.hash.algorithmOid],r===void 0||Ae.md[r]===void 0){var a=new Error("Unsupported RSASSA-PSS hash function.");throw a.oid=t.signatureParameters.hash.algorithmOid,a.name=r,a}n=Ae.pss.create(Ae.md[r].create(),i,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,n)};de.certificateFromPem=function(e,t,n){var r=Ae.pem.decode(e)[0];if(r.type!=="CERTIFICATE"&&r.type!=="X509 CERTIFICATE"&&r.type!=="TRUSTED CERTIFICATE"){var i=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw i.headerType=r.type,i}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var a=N.fromDer(r.body,n);return de.certificateFromAsn1(a,t)};de.certificateToPem=function(e,t){var n={type:"CERTIFICATE",body:N.toDer(de.certificateToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.publicKeyFromPem=function(e){var t=Ae.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var n=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var r=N.fromDer(t.body);return de.publicKeyFromAsn1(r)};de.publicKeyToPem=function(e,t){var n={type:"PUBLIC KEY",body:N.toDer(de.publicKeyToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.publicKeyToRSAPublicKeyPem=function(e,t){var n={type:"RSA PUBLIC KEY",body:N.toDer(de.publicKeyToRSAPublicKey(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||Ae.md.sha1.create(),r=t.type||"RSAPublicKey",i;switch(r){case"RSAPublicKey":i=N.toDer(de.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":i=N.toDer(de.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}n.start(),n.update(i);var a=n.digest();if(t.encoding==="hex"){var o=a.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return a.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return a};de.certificationRequestFromPem=function(e,t,n){var r=Ae.pem.decode(e)[0];if(r.type!=="CERTIFICATE REQUEST"){var i=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw i.headerType=r.type,i}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var a=N.fromDer(r.body,n);return de.certificationRequestFromAsn1(a,t)};de.certificationRequestToPem=function(e,t){var n={type:"CERTIFICATE REQUEST",body:N.toDer(de.certificationRequestToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return xa(e.issuer,t)},e.issuer.addField=function(t){vr([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return xa(e.subject,t)},e.subject.addField=function(t){vr([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,n){vr(t),e.subject.attributes=t,delete e.subject.uniqueId,n&&(e.subject.uniqueId=n),e.subject.hash=null},e.setIssuer=function(t,n){vr(t),e.issuer.attributes=t,delete e.issuer.uniqueId,n&&(e.issuer.uniqueId=n),e.issuer.hash=null},e.setExtensions=function(t){for(var n=0;n<t.length;++n)$C(t[n],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var n=null,r,i=0;n===null&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,n){e.md=n||Ae.md.sha1.create();var r=nt[e.md.algorithm+"WithRSAEncryption"];if(!r){var i=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=r,e.tbsCertificate=de.getTBSCertificate(e);var a=N.toDer(e.tbsCertificate);e.md.update(a.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var n=!1;if(!e.issued(t)){var r=t.issuer,i=e.subject,a=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw a.expectedIssuer=i.attributes,a.actualIssuer=r.attributes,a}var o=t.md;if(o===null){o=sf({signatureOid:t.signatureOid,type:"certificate"});var s=t.tbsCertificate||de.getTBSCertificate(t),l=N.toDer(s);o.update(l.getBytes())}return o!==null&&(n=BC({certificate:e,md:o,signature:t.signature})),n},e.isIssuer=function(t){var n=!1,r=e.issuer,i=t.subject;if(r.hash&&i.hash)n=r.hash===i.hash;else if(r.attributes.length===i.attributes.length){n=!0;for(var a,o,s=0;n&&s<r.attributes.length;++s)a=r.attributes[s],o=i.attributes[s],(a.type!==o.type||a.value!==o.value)&&(n=!1)}return n},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return de.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=nt.subjectKeyIdentifier,n=0;n<e.extensions.length;++n){var r=e.extensions[n];if(r.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return Ae.util.hexToBytes(r.subjectKeyIdentifier)===i}}return!1},e};de.certificateFromAsn1=function(e,t){var n={},r=[];if(!N.validate(e,OT,n,r)){var i=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw i.errors=r,i}var a=N.derToOid(n.publicKeyOid);if(a!==de.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=de.createCertificate();o.version=n.certVersion?n.certVersion.charCodeAt(0):0;var s=Ae.util.createBuffer(n.certSerialNumber);o.serialNumber=s.toHex(),o.signatureOid=Ae.asn1.derToOid(n.certSignatureOid),o.signatureParameters=td(o.signatureOid,n.certSignatureParams,!0),o.siginfo.algorithmOid=Ae.asn1.derToOid(n.certinfoSignatureOid),o.siginfo.parameters=td(o.siginfo.algorithmOid,n.certinfoSignatureParams,!1),o.signature=n.certSignature;var l=[];if(n.certValidity1UTCTime!==void 0&&l.push(N.utcTimeToDate(n.certValidity1UTCTime)),n.certValidity2GeneralizedTime!==void 0&&l.push(N.generalizedTimeToDate(n.certValidity2GeneralizedTime)),n.certValidity3UTCTime!==void 0&&l.push(N.utcTimeToDate(n.certValidity3UTCTime)),n.certValidity4GeneralizedTime!==void 0&&l.push(N.generalizedTimeToDate(n.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(o.validity.notBefore=l[0],o.validity.notAfter=l[1],o.tbsCertificate=n.tbsCertificate,t){o.md=sf({signatureOid:o.signatureOid,type:"certificate"});var u=N.toDer(o.tbsCertificate);o.md.update(u.getBytes())}var c=Ae.md.sha1.create(),d=N.toDer(n.certIssuer);c.update(d.getBytes()),o.issuer.getField=function(g){return xa(o.issuer,g)},o.issuer.addField=function(g){vr([g]),o.issuer.attributes.push(g)},o.issuer.attributes=de.RDNAttributesAsArray(n.certIssuer),n.certIssuerUniqueId&&(o.issuer.uniqueId=n.certIssuerUniqueId),o.issuer.hash=c.digest().toHex();var h=Ae.md.sha1.create(),f=N.toDer(n.certSubject);return h.update(f.getBytes()),o.subject.getField=function(g){return xa(o.subject,g)},o.subject.addField=function(g){vr([g]),o.subject.attributes.push(g)},o.subject.attributes=de.RDNAttributesAsArray(n.certSubject),n.certSubjectUniqueId&&(o.subject.uniqueId=n.certSubjectUniqueId),o.subject.hash=h.digest().toHex(),n.certExtensions?o.extensions=de.certificateExtensionsFromAsn1(n.certExtensions):o.extensions=[],o.publicKey=de.publicKeyFromAsn1(n.subjectPublicKeyInfo),o};de.certificateExtensionsFromAsn1=function(e){for(var t=[],n=0;n<e.value.length;++n)for(var r=e.value[n],i=0;i<r.value.length;++i)t.push(de.certificateExtensionFromAsn1(r.value[i]));return t};de.certificateExtensionFromAsn1=function(e){var t={};if(t.id=N.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===N.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in nt){if(t.name=nt[t.id],t.name==="keyUsage"){var n=N.fromDer(t.value),r=0,i=0;n.value.length>1&&(r=n.value.charCodeAt(1),i=n.value.length>2?n.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(i&128)===128}else if(t.name==="basicConstraints"){var n=N.fromDer(t.value);n.value.length>0&&n.value[0].type===N.Type.BOOLEAN?t.cA=n.value[0].value.charCodeAt(0)!==0:t.cA=!1;var a=null;n.value.length>0&&n.value[0].type===N.Type.INTEGER?a=n.value[0].value:n.value.length>1&&(a=n.value[1].value),a!==null&&(t.pathLenConstraint=N.derToInteger(a))}else if(t.name==="extKeyUsage")for(var n=N.fromDer(t.value),o=0;o<n.value.length;++o){var s=N.derToOid(n.value[o].value);s in nt?t[nt[s]]=!0:t[s]=!0}else if(t.name==="nsCertType"){var n=N.fromDer(t.value),r=0;n.value.length>1&&(r=n.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var l,n=N.fromDer(t.value),u=0;u<n.value.length;++u){l=n.value[u];var c={type:l.type,value:l.value};switch(t.altNames.push(c),l.type){case 1:case 2:case 6:break;case 7:c.ip=Ae.util.bytesToIP(l.value);break;case 8:c.oid=N.derToOid(l.value);break}}}else if(t.name==="subjectKeyIdentifier"){var n=N.fromDer(t.value);t.subjectKeyIdentifier=Ae.util.bytesToHex(n.value)}}return t};de.certificationRequestFromAsn1=function(e,t){var n={},r=[];if(!N.validate(e,jT,n,r)){var i=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw i.errors=r,i}var a=N.derToOid(n.publicKeyOid);if(a!==de.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=de.createCertificationRequest();if(o.version=n.csrVersion?n.csrVersion.charCodeAt(0):0,o.signatureOid=Ae.asn1.derToOid(n.csrSignatureOid),o.signatureParameters=td(o.signatureOid,n.csrSignatureParams,!0),o.siginfo.algorithmOid=Ae.asn1.derToOid(n.csrSignatureOid),o.siginfo.parameters=td(o.siginfo.algorithmOid,n.csrSignatureParams,!1),o.signature=n.csrSignature,o.certificationRequestInfo=n.certificationRequestInfo,t){o.md=sf({signatureOid:o.signatureOid,type:"certification request"});var s=N.toDer(o.certificationRequestInfo);o.md.update(s.getBytes())}var l=Ae.md.sha1.create();return o.subject.getField=function(u){return xa(o.subject,u)},o.subject.addField=function(u){vr([u]),o.subject.attributes.push(u)},o.subject.attributes=de.RDNAttributesAsArray(n.certificationRequestInfoSubject,l),o.subject.hash=l.digest().toHex(),o.publicKey=de.publicKeyFromAsn1(n.subjectPublicKeyInfo),o.getAttribute=function(u){return xa(o,u)},o.addAttribute=function(u){vr([u]),o.attributes.push(u)},o.attributes=de.CRIAttributesAsArray(n.certificationRequestInfoAttributes||[]),o};de.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return xa(e.subject,t)},e.subject.addField=function(t){vr([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return xa(e,t)},e.addAttribute=function(t){vr([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){vr(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){vr(t),e.attributes=t},e.sign=function(t,n){e.md=n||Ae.md.sha1.create();var r=nt[e.md.algorithm+"WithRSAEncryption"];if(!r){var i=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=r,e.certificationRequestInfo=de.getCertificationRequestInfo(e);var a=N.toDer(e.certificationRequestInfo);e.md.update(a.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,n=e.md;if(n===null){n=sf({signatureOid:e.signatureOid,type:"certification request"});var r=e.certificationRequestInfo||de.getCertificationRequestInfo(e),i=N.toDer(r);n.update(i.getBytes())}return n!==null&&(t=BC({certificate:e,md:n,signature:e.signature})),t},e};function ds(e){for(var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),n,r,i=e.attributes,a=0;a<i.length;++a){n=i[a];var o=n.value,s=N.Type.PRINTABLESTRING;"valueTagClass"in n&&(s=n.valueTagClass,s===N.Type.UTF8&&(o=Ae.util.encodeUtf8(o))),r=N.create(N.Class.UNIVERSAL,N.Type.SET,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(n.type).getBytes()),N.create(N.Class.UNIVERSAL,s,!1,o)])]),t.value.push(r)}return t}function vr(e){for(var t,n=0;n<e.length;++n){if(t=e[n],typeof t.name>"u"&&(t.type&&t.type in de.oids?t.name=de.oids[t.type]:t.shortName&&t.shortName in Nt&&(t.name=de.oids[Nt[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in de.oids)t.type=de.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in Nt&&(t.shortName=Nt[t.name]),t.type===nt.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=N.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var i=0;i<t.extensions.length;++i)t.value.push(de.certificateExtensionToAsn1($C(t.extensions[i])))}if(typeof t.value>"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function $C(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in de.oids&&(e.name=de.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in de.oids)e.id=de.oids[e.name];else{var n=new Error("Extension ID not specified.");throw n.extension=e,n}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,i=0,a=0;e.digitalSignature&&(i|=128,r=7),e.nonRepudiation&&(i|=64,r=6),e.keyEncipherment&&(i|=32,r=5),e.dataEncipherment&&(i|=16,r=4),e.keyAgreement&&(i|=8,r=3),e.keyCertSign&&(i|=4,r=2),e.cRLSign&&(i|=2,r=1),e.encipherOnly&&(i|=1,r=0),e.decipherOnly&&(a|=128,r=7);var o=String.fromCharCode(r);a!==0?o+=String.fromCharCode(i)+String.fromCharCode(a):i!==0&&(o+=String.fromCharCode(i)),e.value=N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,o)}else if(e.name==="basicConstraints")e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(N.create(N.Class.UNIVERSAL,N.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in e&&e.value.value.push(N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);var s=e.value.value;for(var l in e)e[l]===!0&&(l in nt?s.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(nt[l]).getBytes())):l.indexOf(".")!==-1&&s.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(l).getBytes())))}else if(e.name==="nsCertType"){var r=0,i=0;e.client&&(i|=128,r=7),e.server&&(i|=64,r=6),e.email&&(i|=32,r=5),e.objsign&&(i|=16,r=4),e.reserved&&(i|=8,r=3),e.sslCA&&(i|=4,r=2),e.emailCA&&(i|=2,r=1),e.objCA&&(i|=1,r=0);var o=String.fromCharCode(r);i!==0&&(o+=String.fromCharCode(i)),e.value=N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,o)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);for(var u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=Ae.util.bytesFromIP(u.ip),o===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else u.type===8&&(u.oid?o=N.oidToDer(N.oidToDer(u.oid)):o=N.oidToDer(o));e.value.value.push(N.create(N.Class.CONTEXT_SPECIFIC,u.type,!1,o))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=N.create(N.Class.UNIVERSAL,N.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=N.create(N.Class.UNIVERSAL,N.Type.OCTETSTRING,!1,d.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);var s=e.value.value;if(e.keyIdentifier){var h=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;s.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!1,h))}if(e.authorityCertIssuer){var f=[N.create(N.Class.CONTEXT_SPECIFIC,4,!0,[ds(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];s.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,f))}if(e.serialNumber){var g=Ae.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);s.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if(e.name==="cRLDistributionPoints"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);for(var s=e.value.value,p=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),m=N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[]),u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=Ae.util.bytesFromIP(u.ip),o===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else u.type===8&&(u.oid?o=N.oidToDer(N.oidToDer(u.oid)):o=N.oidToDer(o));m.value.push(N.create(N.Class.CONTEXT_SPECIFIC,u.type,!1,o))}p.value.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[m])),s.push(p)}if(typeof e.value>"u"){var n=new Error("Extension value not specified.");throw n.extension=e,n}return e}function ap(e,t){switch(e){case nt["RSASSA-PSS"]:var n=[];return t.hash.algorithmOid!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.hash.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.mgf.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.mgf.hash.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(t.saltLength).getBytes())])),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,n);default:return N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")}}function WT(e){var t=N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var n=e.attributes,r=0;r<n.length;++r){var i=n[r],a=i.value,o=N.Type.UTF8;"valueTagClass"in i&&(o=i.valueTagClass),o===N.Type.UTF8&&(a=Ae.util.encodeUtf8(a));var s=!1;"valueConstructed"in i&&(s=i.valueConstructed);var l=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(i.type).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.SET,!0,[N.create(N.Class.UNIVERSAL,o,s,a)])]);t.value.push(l)}return t}var zT=new Date("1950-01-01T00:00:00Z"),GT=new Date("2050-01-01T00:00:00Z");function R1(e){return e>=zT&&e<GT?N.create(N.Class.UNIVERSAL,N.Type.UTCTIME,!1,N.dateToUtcTime(e)):N.create(N.Class.UNIVERSAL,N.Type.GENERALIZEDTIME,!1,N.dateToGeneralizedTime(e))}de.getTBSCertificate=function(e){var t=R1(e.validity.notBefore),n=R1(e.validity.notAfter),r=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.version).getBytes())]),N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,Ae.util.hexToBytes(e.serialNumber)),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.siginfo.algorithmOid).getBytes()),ap(e.siginfo.algorithmOid,e.siginfo.parameters)]),ds(e.issuer),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,n]),ds(e.subject),de.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&r.value.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,[N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&r.value.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!0,[N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&r.value.push(de.certificateExtensionsToAsn1(e.extensions)),r};de.getCertificationRequestInfo=function(e){var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.version).getBytes()),ds(e.subject),de.publicKeyToAsn1(e.publicKey),WT(e)]);return t};de.distinguishedNameToAsn1=function(e){return ds(e)};de.certificateToAsn1=function(e){var t=e.tbsCertificate||de.getTBSCertificate(e);return N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.signatureOid).getBytes()),ap(e.signatureOid,e.signatureParameters)]),N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.signature)])};de.certificateExtensionsToAsn1=function(e){var t=N.create(N.Class.CONTEXT_SPECIFIC,3,!0,[]),n=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);t.value.push(n);for(var r=0;r<e.length;++r)n.value.push(de.certificateExtensionToAsn1(e[r]));return t};de.certificateExtensionToAsn1=function(e){var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);t.value.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.id).getBytes())),e.critical&&t.value.push(N.create(N.Class.UNIVERSAL,N.Type.BOOLEAN,!1,"ÿ"));var n=e.value;return typeof e.value!="string"&&(n=N.toDer(n).getBytes()),t.value.push(N.create(N.Class.UNIVERSAL,N.Type.OCTETSTRING,!1,n)),t};de.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||de.getCertificationRequestInfo(e);return N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.signatureOid).getBytes()),ap(e.signatureOid,e.signatureParameters)]),N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.signature)])};de.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(o){var s=n(o.issuer);return s},t.addCertificate=function(o){if(typeof o=="string"&&(o=Ae.pki.certificateFromPem(o)),r(o.subject),!t.hasCertificate(o))if(o.subject.hash in t.certs){var s=t.certs[o.subject.hash];Ae.util.isArray(s)||(s=[s]),s.push(o),t.certs[o.subject.hash]=s}else t.certs[o.subject.hash]=o},t.hasCertificate=function(o){typeof o=="string"&&(o=Ae.pki.certificateFromPem(o));var s=n(o.subject);if(!s)return!1;Ae.util.isArray(s)||(s=[s]);for(var l=N.toDer(de.certificateToAsn1(o)).getBytes(),u=0;u<s.length;++u){var c=N.toDer(de.certificateToAsn1(s[u])).getBytes();if(l===c)return!0}return!1},t.listAllCertificates=function(){var o=[];for(var s in t.certs)if(t.certs.hasOwnProperty(s)){var l=t.certs[s];if(!Ae.util.isArray(l))o.push(l);else for(var u=0;u<l.length;++u)o.push(l[u])}return o},t.removeCertificate=function(o){var s;if(typeof o=="string"&&(o=Ae.pki.certificateFromPem(o)),r(o.subject),!t.hasCertificate(o))return null;var l=n(o.subject);if(!Ae.util.isArray(l))return s=t.certs[o.subject.hash],delete t.certs[o.subject.hash],s;for(var u=N.toDer(de.certificateToAsn1(o)).getBytes(),c=0;c<l.length;++c){var d=N.toDer(de.certificateToAsn1(l[c])).getBytes();u===d&&(s=l[c],l.splice(c,1))}return l.length===0&&delete t.certs[o.subject.hash],s};function n(o){return r(o),t.certs[o.hash]||null}function r(o){if(!o.hash){var s=Ae.md.sha1.create();o.attributes=de.RDNAttributesAsArray(ds(o),s),o.hash=s.digest().toHex()}}if(e)for(var i=0;i<e.length;++i){var a=e[i];t.addCertificate(a)}return t};de.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};de.verifyCertificateChain=function(e,t,n){typeof n=="function"&&(n={verify:n}),n=n||{},t=t.slice(0);var r=t.slice(0),i=n.validityCheckDate;typeof i>"u"&&(i=new Date);var a=!0,o=null,s=0;do{var l=t.shift(),u=null,c=!1;if(i&&(i<l.validity.notBefore||i>l.validity.notAfter)&&(o={message:"Certificate is not valid yet or has expired.",error:de.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:i}),o===null){if(u=t[0]||e.getIssuer(l),u===null&&l.isIssuer(l)&&(c=!0,u=l),u){var d=u;Ae.util.isArray(d)||(d=[d]);for(var h=!1;!h&&d.length>0;){u=d.shift();try{h=u.verify(l)}catch{}}h||(o={message:"Certificate signature is invalid.",error:de.certificateError.bad_certificate})}o===null&&(!u||c)&&!e.hasCertificate(l)&&(o={message:"Certificate is not trusted.",error:de.certificateError.unknown_ca})}if(o===null&&u&&!l.isIssuer(u)&&(o={message:"Certificate issuer is invalid.",error:de.certificateError.bad_certificate}),o===null)for(var f={keyUsage:!0,basicConstraints:!0},g=0;o===null&&g<l.extensions.length;++g){var p=l.extensions[g];p.critical&&!(p.name in f)&&(o={message:"Certificate has an unsupported critical extension.",error:de.certificateError.unsupported_certificate})}if(o===null&&(!a||t.length===0&&(!u||c))){var m=l.getExtension("basicConstraints"),b=l.getExtension("keyUsage");if(b!==null&&(!b.keyCertSign||m===null)&&(o={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:de.certificateError.bad_certificate}),o===null&&m!==null&&!m.cA&&(o={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:de.certificateError.bad_certificate}),o===null&&b!==null&&"pathLenConstraint"in m){var v=s-1;v>m.pathLenConstraint&&(o={message:"Certificate basicConstraints pathLenConstraint violated.",error:de.certificateError.bad_certificate})}}var x=o===null?!0:o.error,C=n.verify?n.verify(x,s,r):x;if(C===!0)o=null;else throw x===!0&&(o={message:"The application rejected the certificate.",error:de.certificateError.bad_certificate}),(C||C===0)&&(typeof C=="object"&&!Ae.util.isArray(C)?(C.message&&(o.message=C.message),C.error&&(o.error=C.error)):typeof C=="string"&&(o.error=C)),o;a=!1,++s}while(t.length>0);return!0};var xt=ze,G=xt.asn1,Xe=xt.pki,Il=xt.pkcs12=xt.pkcs12||{},kC={name:"ContentInfo",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},UT={name:"PFX",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,capture:"version"},kC,{name:"PFX.macData",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:G.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},XT={name:"SafeBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},ZT={name:"Attribute",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,capture:"values"}]},YT={name:"CertBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:G.Class.UNIVERSAL,type:G.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Ns(e,t,n,r){for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].safeBags.length;o++){var s=e[a].safeBags[o];if(!(r!==void 0&&s.type!==r)){if(t===null){i.push(s);continue}s.attributes[t]!==void 0&&s.attributes[t].indexOf(n)>=0&&i.push(s)}}return i}Il.pkcs12FromAsn1=function(e,t,n){typeof t=="string"?(n=t,t=!0):t===void 0&&(t=!0);var r={},i=[];if(!G.validate(e,UT,r,i)){var a=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw a.errors=a,a}var o={version:r.version.charCodeAt(0),safeContents:[],getBags:function(m){var b={},v;return"localKeyId"in m?v=m.localKeyId:"localKeyIdHex"in m&&(v=xt.util.hexToBytes(m.localKeyIdHex)),v===void 0&&!("friendlyName"in m)&&"bagType"in m&&(b[m.bagType]=Ns(o.safeContents,null,null,m.bagType)),v!==void 0&&(b.localKeyId=Ns(o.safeContents,"localKeyId",v,m.bagType)),"friendlyName"in m&&(b.friendlyName=Ns(o.safeContents,"friendlyName",m.friendlyName,m.bagType)),b},getBagsByFriendlyName:function(m,b){return Ns(o.safeContents,"friendlyName",m,b)},getBagsByLocalKeyId:function(m,b){return Ns(o.safeContents,"localKeyId",m,b)}};if(r.version.charCodeAt(0)!==3){var a=new Error("PKCS#12 PFX of version other than 3 not supported.");throw a.version=r.version.charCodeAt(0),a}if(G.derToOid(r.contentType)!==Xe.oids.data){var a=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw a.oid=G.derToOid(r.contentType),a}var s=r.content.value[0];if(s.tagClass!==G.Class.UNIVERSAL||s.type!==G.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(s=op(s),r.mac){var l=null,u=0,c=G.derToOid(r.macAlgorithm);switch(c){case Xe.oids.sha1:l=xt.md.sha1.create(),u=20;break;case Xe.oids.sha256:l=xt.md.sha256.create(),u=32;break;case Xe.oids.sha384:l=xt.md.sha384.create(),u=48;break;case Xe.oids.sha512:l=xt.md.sha512.create(),u=64;break;case Xe.oids.md5:l=xt.md.md5.create(),u=16;break}if(l===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var d=new xt.util.ByteBuffer(r.macSalt),h="macIterations"in r?parseInt(xt.util.bytesToHex(r.macIterations),16):1,f=Il.generateKey(n,d,3,h,u,l),g=xt.hmac.create();g.start(l,f),g.update(s.value);var p=g.getMac();if(p.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return KT(o,s.value,t,n),o};function op(e){if(e.composed||e.constructed){for(var t=xt.util.createBuffer(),n=0;n<e.value.length;++n)t.putBytes(e.value[n].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function KT(e,t,n,r){if(t=G.fromDer(t,n),t.tagClass!==G.Class.UNIVERSAL||t.type!==G.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<t.value.length;i++){var a=t.value[i],o={},s=[];if(!G.validate(a,kC,o,s)){var l=new Error("Cannot read ContentInfo.");throw l.errors=s,l}var u={encrypted:!1},c=null,d=o.content.value[0];switch(G.derToOid(o.contentType)){case Xe.oids.data:if(d.tagClass!==G.Class.UNIVERSAL||d.type!==G.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=op(d).value;break;case Xe.oids.encryptedData:c=qT(d,r),u.encrypted=!0;break;default:var l=new Error("Unsupported PKCS#12 contentType.");throw l.contentType=G.derToOid(o.contentType),l}u.safeBags=JT(c,n,r),e.safeContents.push(u)}}function qT(e,t){var n={},r=[];if(!G.validate(e,xt.pkcs7.asn1.encryptedDataValidator,n,r)){var i=new Error("Cannot read EncryptedContentInfo.");throw i.errors=r,i}var a=G.derToOid(n.contentType);if(a!==Xe.oids.data){var i=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw i.oid=a,i}a=G.derToOid(n.encAlgorithm);var o=Xe.pbe.getCipher(a,n.encParameter,t),s=op(n.encryptedContentAsn1),l=xt.util.createBuffer(s.value);if(o.update(l),!o.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return o.output.getBytes()}function JT(e,t,n){if(!t&&e.length===0)return[];if(e=G.fromDer(e,t),e.tagClass!==G.Class.UNIVERSAL||e.type!==G.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var r=[],i=0;i<e.value.length;i++){var a=e.value[i],o={},s=[];if(!G.validate(a,XT,o,s)){var l=new Error("Cannot read SafeBag.");throw l.errors=s,l}var u={type:G.derToOid(o.bagId),attributes:QT(o.bagAttributes)};r.push(u);var c,d,h=o.bagValue.value[0];switch(u.type){case Xe.oids.pkcs8ShroudedKeyBag:if(h=Xe.decryptPrivateKeyInfo(h,n),h===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Xe.oids.keyBag:try{u.key=Xe.privateKeyFromAsn1(h)}catch{u.key=null,u.asn1=h}continue;case Xe.oids.certBag:c=YT,d=function(){if(G.derToOid(o.certId)!==Xe.oids.x509Certificate){var g=new Error("Unsupported certificate type, only X.509 supported.");throw g.oid=G.derToOid(o.certId),g}var p=G.fromDer(o.cert,t);try{u.cert=Xe.certificateFromAsn1(p,!0)}catch{u.cert=null,u.asn1=p}};break;default:var l=new Error("Unsupported PKCS#12 SafeBag type.");throw l.oid=u.type,l}if(c!==void 0&&!G.validate(h,c,o,s)){var l=new Error("Cannot read PKCS#12 "+c.name);throw l.errors=s,l}d()}return r}function QT(e){var t={};if(e!==void 0)for(var n=0;n<e.length;++n){var r={},i=[];if(!G.validate(e[n],ZT,r,i)){var a=new Error("Cannot read PKCS#12 BagAttribute.");throw a.errors=i,a}var o=G.derToOid(r.oid);if(Xe.oids[o]!==void 0){t[Xe.oids[o]]=[];for(var s=0;s<r.values.length;++s)t[Xe.oids[o]].push(r.values[s].value)}}return t}Il.toPkcs12Asn1=function(e,t,n,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||r.encAlgorithm||"aes128","useMac"in r||(r.useMac=!0),"localKeyId"in r||(r.localKeyId=null),"generateLocalKeyId"in r||(r.generateLocalKeyId=!0);var i=r.localKeyId,a;if(i!==null)i=xt.util.hexToBytes(i);else if(r.generateLocalKeyId)if(t){var o=xt.util.isArray(t)?t[0]:t;typeof o=="string"&&(o=Xe.certificateFromPem(o));var s=xt.md.sha1.create();s.update(G.toDer(Xe.certificateToAsn1(o)).getBytes()),i=s.digest().getBytes()}else i=xt.random.getBytes(20);var l=[];i!==null&&l.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.localKeyId).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,i)])])),"friendlyName"in r&&l.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.friendlyName).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.BMPSTRING,!1,r.friendlyName)])])),l.length>0&&(a=G.create(G.Class.UNIVERSAL,G.Type.SET,!0,l));var u=[],c=[];t!==null&&(xt.util.isArray(t)?c=t:c=[t]);for(var d=[],h=0;h<c.length;++h){t=c[h],typeof t=="string"&&(t=Xe.certificateFromPem(t));var f=h===0?a:void 0,g=Xe.certificateToAsn1(t),p=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.certBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.x509Certificate).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(g).getBytes())])])]),f]);d.push(p)}if(d.length>0){var m=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,d),b=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(m).getBytes())])]);u.push(b)}var v=null;if(e!==null){var x=Xe.wrapRsaPrivateKey(Xe.privateKeyToAsn1(e));n===null?v=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.keyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[x]),a]):v=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.pkcs8ShroudedKeyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[Xe.encryptPrivateKeyInfo(x,n,r)]),a]);var C=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[v]),E=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(C).getBytes())])]);u.push(E)}var w=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,u),B;if(r.useMac){var s=xt.md.sha1.create(),y=new xt.util.ByteBuffer(xt.random.getBytes(r.saltSize)),S=r.count,e=Il.generateKey(n,y,3,S,20),D=xt.hmac.create();D.start(s,e),D.update(G.toDer(w).getBytes());var A=D.getMac();B=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.sha1).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.NULL,!1,"")]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,A.getBytes())]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,y.getBytes()),G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(S).getBytes())])}return G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(3).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(w).getBytes())])]),B])};Il.generateKey=xt.pbe.generatePkcs12Key;var Ca=ze,sp=Ca.asn1,fs=Ca.pki=Ca.pki||{};fs.pemToDer=function(e){var t=Ca.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Ca.util.createBuffer(t.body)};fs.privateKeyFromPem=function(e){var t=Ca.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=sp.fromDer(t.body);return fs.privateKeyFromAsn1(r)};fs.privateKeyToPem=function(e,t){var n={type:"RSA PRIVATE KEY",body:sp.toDer(fs.privateKeyToAsn1(e)).getBytes()};return Ca.pem.encode(n,{maxline:t})};fs.privateKeyInfoToPem=function(e,t){var n={type:"PRIVATE KEY",body:sp.toDer(e).getBytes()};return Ca.pem.encode(n,{maxline:t})};var ae=ze,lf=function(e,t,n,r){var i=ae.util.createBuffer(),a=e.length>>1,o=a+(e.length&1),s=e.substr(0,o),l=e.substr(a,o),u=ae.util.createBuffer(),c=ae.hmac.create();n=t+n;var d=Math.ceil(r/16),h=Math.ceil(r/20);c.start("MD5",s);var f=ae.util.createBuffer();u.putBytes(n);for(var g=0;g<d;++g)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+n),f.putBuffer(c.digest());c.start("SHA1",l);var p=ae.util.createBuffer();u.clear(),u.putBytes(n);for(var g=0;g<h;++g)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+n),p.putBuffer(c.digest());return i.putBytes(ae.util.xorBytes(f.getBytes(),p.getBytes(),r)),i},eR=function(e,t,n){var r=ae.hmac.create();r.start("SHA1",e);var i=ae.util.createBuffer();return i.putInt32(t[0]),i.putInt32(t[1]),i.putByte(n.type),i.putByte(n.version.major),i.putByte(n.version.minor),i.putInt16(n.length),i.putBytes(n.fragment.bytes()),r.update(i.getBytes()),r.digest().getBytes()},tR=function(e,t,n){var r=!1;try{var i=e.deflate(t.fragment.getBytes());t.fragment=ae.util.createBuffer(i),t.length=i.length,r=!0}catch{}return r},nR=function(e,t,n){var r=!1;try{var i=e.inflate(t.fragment.getBytes());t.fragment=ae.util.createBuffer(i),t.length=i.length,r=!0}catch{}return r},Yn=function(e,t){var n=0;switch(t){case 1:n=e.getByte();break;case 2:n=e.getInt16();break;case 3:n=e.getInt24();break;case 4:n=e.getInt32();break}return ae.util.createBuffer(e.getBytes(n))},gr=function(e,t,n){e.putInt(n.length(),t<<3),e.putBuffer(n)},L={};L.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};L.SupportedVersions=[L.Versions.TLS_1_1,L.Versions.TLS_1_0];L.Version=L.SupportedVersions[0];L.MaxFragment=15360;L.ConnectionEnd={server:0,client:1};L.PRFAlgorithm={tls_prf_sha256:0};L.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};L.CipherType={stream:0,block:1,aead:2};L.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};L.CompressionMethod={none:0,deflate:1};L.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};L.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};L.Alert={};L.Alert.Level={warning:1,fatal:2};L.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};L.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};L.CipherSuites={};L.getCipherSuite=function(e){var t=null;for(var n in L.CipherSuites){var r=L.CipherSuites[n];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t};L.handleUnexpected=function(e,t){var n=!e.open&&e.entity===L.ConnectionEnd.client;n||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}})};L.handleHelloRequest=function(e,t,n){!e.handshaking&&e.handshakes>0&&(L.queue(e,L.createAlert(e,{level:L.Alert.Level.warning,description:L.Alert.Description.no_renegotiation})),L.flush(e)),e.process()};L.parseHelloMessage=function(e,t,n){var r=null,i=e.entity===L.ConnectionEnd.client;if(n<38)e.error(e,{message:i?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});else{var a=t.fragment,o=a.length();if(r={version:{major:a.getByte(),minor:a.getByte()},random:ae.util.createBuffer(a.getBytes(32)),session_id:Yn(a,1),extensions:[]},i?(r.cipher_suite=a.getBytes(2),r.compression_method=a.getByte()):(r.cipher_suites=Yn(a,2),r.compression_methods=Yn(a,1)),o=n-(o-a.length()),o>0){for(var s=Yn(a,2);s.length()>0;)r.extensions.push({type:[s.getByte(),s.getByte()],data:Yn(s,2)});if(!i)for(var l=0;l<r.extensions.length;++l){var u=r.extensions[l];if(u.type[0]===0&&u.type[1]===0)for(var c=Yn(u.data,2);c.length()>0;){var d=c.getByte();if(d!==0)break;e.session.extensions.server_name.serverNameList.push(Yn(c,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}});if(i)e.session.cipherSuite=L.getCipherSuite(r.cipher_suite);else for(var h=ae.util.createBuffer(r.cipher_suites.bytes());h.length()>0&&(e.session.cipherSuite=L.getCipherSuite(h.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure},cipherSuite:ae.util.bytesToHex(r.cipher_suite)});i?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=L.CompressionMethod.none}return r};L.createSecurityParameters=function(e,t){var n=e.entity===L.ConnectionEnd.client,r=t.random.bytes(),i=n?e.session.sp.client_random:r,a=n?r:L.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:L.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}};L.handleServerHello=function(e,t,n){var r=L.parseHelloMessage(e,t,n);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}});e.session.version=e.version;var i=r.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=PC,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=iR,e.session.resuming=!1,L.createSecurityParameters(e,r)),e.session.id=i,e.process()}};L.handleClientHello=function(e,t,n){var r=L.parseHelloMessage(e,t,n);if(!e.fail){var i=r.session_id.bytes(),a=null;if(e.sessionCache&&(a=e.sessionCache.getSession(i),a===null?i="":(a.version.major!==r.version.major||a.version.minor>r.version.minor)&&(a=null,i="")),i.length===0&&(i=ae.random.getBytes(32)),e.session.id=i,e.session.clientHelloVersion=r.version,e.session.sp={},a)e.version=e.session.version=a.version,e.session.sp=a.sp;else{for(var o,s=1;s<L.SupportedVersions.length&&(o=L.SupportedVersions[s],!(o.minor<=r.version.minor));++s);e.version={major:o.major,minor:o.minor},e.session.version=e.version}a!==null?(e.expect=lp,e.session.resuming=!0,e.session.sp.client_random=r.random.bytes()):(e.expect=e.verifyClient!==!1?dR:R0,e.session.resuming=!1,L.createSecurityParameters(e,r)),e.open=!0,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerHello(e)})),e.session.resuming?(L.queue(e,L.createRecord(e,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),e.state.pending=L.createConnectionState(e),e.state.current.write=e.state.pending.write,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createFinished(e)}))):(L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificate(e)})),e.fail||(L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerKeyExchange(e)})),e.verifyClient!==!1&&L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificateRequest(e)})),L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerHelloDone(e)})))),L.flush(e),e.process()}};L.handleCertificate=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_list:Yn(r,3)},a,o,s=[];try{for(;i.certificate_list.length()>0;)a=Yn(i.certificate_list,3),o=ae.asn1.fromDer(a),a=ae.pki.certificateFromAsn1(o,!0),s.push(a)}catch(u){return e.error(e,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var l=e.entity===L.ConnectionEnd.client;(l||e.verifyClient===!0)&&s.length===0?e.error(e,{message:l?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}}):s.length===0?e.expect=l?B1:R0:(l?e.session.serverCertificate=s[0]:e.session.clientCertificate=s[0],L.verifyCertificateChain(e,s)&&(e.expect=l?B1:R0)),e.process()};L.handleServerKeyExchange=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});e.expect=aR,e.process()};L.handleClientKeyExchange=function(e,t,n){if(n<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});var r=t.fragment,i={enc_pre_master_secret:Yn(r,2).getBytes()},a=null;if(e.getPrivateKey)try{a=e.getPrivateKey(e,e.session.serverCertificate),a=ae.pki.privateKeyFromPem(a)}catch(l){e.error(e,{message:"Could not get private key.",cause:l,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(a===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});try{var o=e.session.sp;o.pre_master_secret=a.decrypt(i.enc_pre_master_secret);var s=e.session.clientHelloVersion;if(s.major!==o.pre_master_secret.charCodeAt(0)||s.minor!==o.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{o.pre_master_secret=ae.random.getBytes(48)}e.expect=lp,e.session.clientCertificate!==null&&(e.expect=fR),e.process()};L.handleCertificateRequest=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_types:Yn(r,1),certificate_authorities:Yn(r,2)};e.session.certificateRequest=i,e.expect=oR,e.process()};L.handleCertificateVerify=function(e,t,n){if(n<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var i=r.bytes();r.read+=4;var a={signature:Yn(r,2).getBytes()},o=ae.util.createBuffer();o.putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest()),o=o.getBytes();try{var s=e.session.clientCertificate;if(!s.publicKey.verify(o,a.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(i),e.session.sha1.update(i)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure}})}e.expect=lp,e.process()};L.handleServerHelloDone=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.insufficient_security}},i=0,a=e.verify(e,r.alert.description,i,[]);if(a!==!0)return(a||a===0)&&(typeof a=="object"&&!ae.util.isArray(a)?(a.message&&(r.message=a.message),a.alert&&(r.alert.description=a.alert)):typeof a=="number"&&(r.alert.description=a)),e.error(e,r)}e.session.certificateRequest!==null&&(t=L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificate(e)}),L.queue(e,t)),t=L.createRecord(e,{type:L.ContentType.handshake,data:L.createClientKeyExchange(e)}),L.queue(e,t),e.expect=uR;var o=function(s,l){s.session.certificateRequest!==null&&s.session.clientCertificate!==null&&L.queue(s,L.createRecord(s,{type:L.ContentType.handshake,data:L.createCertificateVerify(s,l)})),L.queue(s,L.createRecord(s,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),s.state.pending=L.createConnectionState(s),s.state.current.write=s.state.pending.write,L.queue(s,L.createRecord(s,{type:L.ContentType.handshake,data:L.createFinished(s)})),s.expect=PC,L.flush(s),s.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return o(e,null);L.getClientSignature(e,o)};L.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var n=e.entity===L.ConnectionEnd.client;(e.session.resuming&&n||!e.session.resuming&&!n)&&(e.state.pending=L.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&n||e.session.resuming&&!n)&&(e.state.pending=null),e.expect=n?sR:hR,e.process()};L.handleFinished=function(e,t,n){var r=t.fragment;r.read-=4;var i=r.bytes();r.read+=4;var a=t.fragment.getBytes();r=ae.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var o=e.entity===L.ConnectionEnd.client,s=o?"server finished":"client finished",l=e.session.sp,u=12,c=lf;if(r=c(l.master_secret,s,r.getBytes(),u),r.getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decrypt_error}});e.session.md5.update(i),e.session.sha1.update(i),(e.session.resuming&&o||!e.session.resuming&&!o)&&(L.queue(e,L.createRecord(e,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createFinished(e)}))),e.expect=o?lR:gR,e.handshaking=!1,++e.handshakes,e.peerCertificate=o?e.session.serverCertificate:e.session.clientCertificate,L.flush(e),e.isConnected=!0,e.connected(e),e.process()};L.handleAlert=function(e,t){var n=t.fragment,r={level:n.getByte(),description:n.getByte()},i;switch(r.description){case L.Alert.Description.close_notify:i="Connection closed.";break;case L.Alert.Description.unexpected_message:i="Unexpected message.";break;case L.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case L.Alert.Description.decryption_failed:i="Decryption failed.";break;case L.Alert.Description.record_overflow:i="Record overflow.";break;case L.Alert.Description.decompression_failure:i="Decompression failed.";break;case L.Alert.Description.handshake_failure:i="Handshake failure.";break;case L.Alert.Description.bad_certificate:i="Bad certificate.";break;case L.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case L.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case L.Alert.Description.certificate_expired:i="Certificate expired.";break;case L.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case L.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case L.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case L.Alert.Description.access_denied:i="Access denied.";break;case L.Alert.Description.decode_error:i="Decode error.";break;case L.Alert.Description.decrypt_error:i="Decrypt error.";break;case L.Alert.Description.export_restriction:i="Export restriction.";break;case L.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case L.Alert.Description.insufficient_security:i="Insufficient security.";break;case L.Alert.Description.internal_error:i="Internal error.";break;case L.Alert.Description.user_canceled:i="User canceled.";break;case L.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error.";break}if(r.description===L.Alert.Description.close_notify)return e.close();e.error(e,{message:i,send:!1,origin:e.entity===L.ConnectionEnd.client?"server":"client",alert:r}),e.process()};L.handleHandshake=function(e,t){var n=t.fragment,r=n.getByte(),i=n.getInt24();if(i>n.length())return e.fragmented=t,t.fragment=ae.util.createBuffer(),n.read-=4,e.process();e.fragmented=null,n.read-=4;var a=n.bytes(i+4);n.read+=4,r in nd[e.entity][e.expect]?(e.entity===L.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:ae.md.md5.create(),sha1:ae.md.sha1.create()}),r!==L.HandshakeType.hello_request&&r!==L.HandshakeType.certificate_verify&&r!==L.HandshakeType.finished&&(e.session.md5.update(a),e.session.sha1.update(a)),nd[e.entity][e.expect][r](e,t,i)):L.handleUnexpected(e,t)};L.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};L.handleHeartbeat=function(e,t){var n=t.fragment,r=n.getByte(),i=n.getInt16(),a=n.getBytes(i);if(r===L.HeartbeatMessageType.heartbeat_request){if(e.handshaking||i>a.length)return e.process();L.queue(e,L.createRecord(e,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_response,a)})),L.flush(e)}else if(r===L.HeartbeatMessageType.heartbeat_response){if(a!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,ae.util.createBuffer(a))}e.process()};var rR=0,iR=1,B1=2,aR=3,oR=4,PC=5,sR=6,lR=7,uR=8,cR=0,dR=1,R0=2,fR=3,lp=4,hR=5,gR=6,M=L.handleUnexpected,FC=L.handleChangeCipherSpec,dn=L.handleAlert,Dn=L.handleHandshake,NC=L.handleApplicationData,fn=L.handleHeartbeat,up=[];up[L.ConnectionEnd.client]=[[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[FC,dn,M,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,NC,fn],[M,dn,Dn,M,fn]];up[L.ConnectionEnd.server]=[[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[FC,dn,M,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,NC,fn],[M,dn,Dn,M,fn]];var Zi=L.handleHelloRequest,pR=L.handleServerHello,MC=L.handleCertificate,$1=L.handleServerKeyExchange,Yf=L.handleCertificateRequest,$u=L.handleServerHelloDone,LC=L.handleFinished,nd=[];nd[L.ConnectionEnd.client]=[[M,M,pR,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,MC,$1,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,$1,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,LC],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M]];var mR=L.handleClientHello,bR=L.handleClientKeyExchange,vR=L.handleCertificateVerify;nd[L.ConnectionEnd.server]=[[M,mR,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,MC,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,bR,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,vR,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,LC],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M]];L.generateKeys=function(e,t){var n=lf,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=n(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var i=2*t.mac_key_length+2*t.enc_key_length,a=e.version.major===L.Versions.TLS_1_0.major&&e.version.minor===L.Versions.TLS_1_0.minor;a&&(i+=2*t.fixed_iv_length);var o=n(t.master_secret,"key expansion",r,i),s={client_write_MAC_key:o.getBytes(t.mac_key_length),server_write_MAC_key:o.getBytes(t.mac_key_length),client_write_key:o.getBytes(t.enc_key_length),server_write_key:o.getBytes(t.enc_key_length)};return a&&(s.client_write_IV=o.getBytes(t.fixed_iv_length),s.server_write_IV=o.getBytes(t.fixed_iv_length)),s};L.createConnectionState=function(e){var t=e.entity===L.ConnectionEnd.client,n=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(o){return!0},compressionState:null,compressFunction:function(o){return!0},updateSequenceNumber:function(){a.sequenceNumber[1]===4294967295?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},r={read:n(),write:n()};if(r.read.update=function(a,o){return r.read.cipherFunction(o,r.read)?r.read.compressFunction(a,o,r.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decompression_failure}}):a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_record_mac}}),!a.fail},r.write.update=function(a,o){return r.write.compressFunction(a,o,r.write)?r.write.cipherFunction(o,r.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}),!a.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=L.generateKeys(e,i),r.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,r.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,i),i.compression_algorithm){case L.CompressionMethod.none:break;case L.CompressionMethod.deflate:r.read.compressFunction=nR,r.write.compressFunction=tR;break;default:throw new Error("Unsupported compression algorithm.")}}return r};L.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,n=ae.util.createBuffer();return n.putInt32(t),n.putBytes(ae.random.getBytes(28)),n};L.createRecord=function(e,t){if(!t.data)return null;var n={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return n};L.createAlert=function(e,t){var n=ae.util.createBuffer();return n.putByte(t.level),n.putByte(t.description),L.createRecord(e,{type:L.ContentType.alert,data:n})};L.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=ae.util.createBuffer(),n=0;n<e.cipherSuites.length;++n){var r=e.cipherSuites[n];t.putByte(r.id[0]),t.putByte(r.id[1])}var i=t.length(),a=ae.util.createBuffer();a.putByte(L.CompressionMethod.none);var o=a.length(),s=ae.util.createBuffer();if(e.virtualHost){var l=ae.util.createBuffer();l.putByte(0),l.putByte(0);var u=ae.util.createBuffer();u.putByte(0),gr(u,2,ae.util.createBuffer(e.virtualHost));var c=ae.util.createBuffer();gr(c,2,u),gr(l,2,c),s.putBuffer(l)}var d=s.length();d>0&&(d+=2);var h=e.session.id,f=h.length+1+2+4+28+2+i+1+o+d,g=ae.util.createBuffer();return g.putByte(L.HandshakeType.client_hello),g.putInt24(f),g.putByte(e.version.major),g.putByte(e.version.minor),g.putBytes(e.session.sp.client_random),gr(g,1,ae.util.createBuffer(h)),gr(g,2,t),gr(g,1,a),d>0&&gr(g,2,s),g};L.createServerHello=function(e){var t=e.session.id,n=t.length+1+2+4+28+2+1,r=ae.util.createBuffer();return r.putByte(L.HandshakeType.server_hello),r.putInt24(n),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),gr(r,1,ae.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r};L.createCertificate=function(e){var t=e.entity===L.ConnectionEnd.client,n=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,n=e.getCertificate(e,r)}var i=ae.util.createBuffer();if(n!==null)try{ae.util.isArray(n)||(n=[n]);for(var a=null,o=0;o<n.length;++o){var s=ae.pem.decode(n[o])[0];if(s.type!=="CERTIFICATE"&&s.type!=="X509 CERTIFICATE"&&s.type!=="TRUSTED CERTIFICATE"){var l=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw l.headerType=s.type,l}if(s.procType&&s.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=ae.util.createBuffer(s.body);a===null&&(a=ae.asn1.fromDer(u.bytes(),!1));var c=ae.util.createBuffer();gr(c,3,u),i.putBuffer(c)}n=ae.pki.certificateFromAsn1(a),t?e.session.clientCertificate=n:e.session.serverCertificate=n}catch(f){return e.error(e,{message:"Could not send certificate list.",cause:f,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var d=3+i.length(),h=ae.util.createBuffer();return h.putByte(L.HandshakeType.certificate),h.putInt24(d),gr(h,3,i),h};L.createClientKeyExchange=function(e){var t=ae.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(ae.random.getBytes(46));var n=e.session.sp;n.pre_master_secret=t.getBytes();var r=e.session.serverCertificate.publicKey;t=r.encrypt(n.pre_master_secret);var i=t.length+2,a=ae.util.createBuffer();return a.putByte(L.HandshakeType.client_key_exchange),a.putInt24(i),a.putInt16(t.length),a.putBytes(t),a};L.createServerKeyExchange=function(e){var t=ae.util.createBuffer();return t};L.getClientSignature=function(e,t){var n=ae.util.createBuffer();n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest()),n=n.getBytes(),e.getSignature=e.getSignature||function(r,i,a){var o=null;if(r.getPrivateKey)try{o=r.getPrivateKey(r,r.session.clientCertificate),o=ae.pki.privateKeyFromPem(o)}catch(s){r.error(r,{message:"Could not get private key.",cause:s,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}o===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}):i=o.sign(i,null),a(r,i)},e.getSignature(e,n,t)};L.createCertificateVerify=function(e,t){var n=t.length+2,r=ae.util.createBuffer();return r.putByte(L.HandshakeType.certificate_verify),r.putInt24(n),r.putInt16(t.length),r.putBytes(t),r};L.createCertificateRequest=function(e){var t=ae.util.createBuffer();t.putByte(1);var n=ae.util.createBuffer();for(var r in e.caStore.certs){var i=e.caStore.certs[r],a=ae.pki.distinguishedNameToAsn1(i.subject),o=ae.asn1.toDer(a);n.putInt16(o.length()),n.putBuffer(o)}var s=1+t.length()+2+n.length(),l=ae.util.createBuffer();return l.putByte(L.HandshakeType.certificate_request),l.putInt24(s),gr(l,1,t),gr(l,2,n),l};L.createServerHelloDone=function(e){var t=ae.util.createBuffer();return t.putByte(L.HandshakeType.server_hello_done),t.putInt24(0),t};L.createChangeCipherSpec=function(){var e=ae.util.createBuffer();return e.putByte(1),e};L.createFinished=function(e){var t=ae.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var n=e.entity===L.ConnectionEnd.client,r=e.session.sp,i=12,a=lf,o=n?"client finished":"server finished";t=a(r.master_secret,o,t.getBytes(),i);var s=ae.util.createBuffer();return s.putByte(L.HandshakeType.finished),s.putInt24(t.length()),s.putBuffer(t),s};L.createHeartbeat=function(e,t,n){typeof n>"u"&&(n=t.length);var r=ae.util.createBuffer();r.putByte(e),r.putInt16(n),r.putBytes(t);var i=r.length(),a=Math.max(16,i-n-3);return r.putBytes(ae.random.getBytes(a)),r};L.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===L.ContentType.handshake||t.type===L.ContentType.alert||t.type===L.ContentType.change_cipher_spec))){if(t.type===L.ContentType.handshake){var n=t.fragment.bytes();e.session.md5.update(n),e.session.sha1.update(n),n=null}var r;if(t.fragment.length()<=L.MaxFragment)r=[t];else{r=[];for(var i=t.fragment.bytes();i.length>L.MaxFragment;)r.push(L.createRecord(e,{type:t.type,data:ae.util.createBuffer(i.slice(0,L.MaxFragment))})),i=i.slice(L.MaxFragment);i.length>0&&r.push(L.createRecord(e,{type:t.type,data:ae.util.createBuffer(i)}))}for(var a=0;a<r.length&&!e.fail;++a){var o=r[a],s=e.state.current.write;s.update(e,o)&&e.records.push(o)}}};L.flush=function(e){for(var t=0;t<e.records.length;++t){var n=e.records[t];e.tlsData.putByte(n.type),e.tlsData.putByte(n.version.major),e.tlsData.putByte(n.version.minor),e.tlsData.putInt16(n.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var Kf=function(e){switch(e){case!0:return!0;case ae.pki.certificateError.bad_certificate:return L.Alert.Description.bad_certificate;case ae.pki.certificateError.unsupported_certificate:return L.Alert.Description.unsupported_certificate;case ae.pki.certificateError.certificate_revoked:return L.Alert.Description.certificate_revoked;case ae.pki.certificateError.certificate_expired:return L.Alert.Description.certificate_expired;case ae.pki.certificateError.certificate_unknown:return L.Alert.Description.certificate_unknown;case ae.pki.certificateError.unknown_ca:return L.Alert.Description.unknown_ca;default:return L.Alert.Description.bad_certificate}},yR=function(e){switch(e){case!0:return!0;case L.Alert.Description.bad_certificate:return ae.pki.certificateError.bad_certificate;case L.Alert.Description.unsupported_certificate:return ae.pki.certificateError.unsupported_certificate;case L.Alert.Description.certificate_revoked:return ae.pki.certificateError.certificate_revoked;case L.Alert.Description.certificate_expired:return ae.pki.certificateError.certificate_expired;case L.Alert.Description.certificate_unknown:return ae.pki.certificateError.certificate_unknown;case L.Alert.Description.unknown_ca:return ae.pki.certificateError.unknown_ca;default:return ae.pki.certificateError.bad_certificate}};L.verifyCertificateChain=function(e,t){try{var n={};for(var r in e.verifyOptions)n[r]=e.verifyOptions[r];n.verify=function(a,o,s){var l=Kf(a),u=e.verify(e,a,o,s);if(u!==!0){if(typeof u=="object"&&!ae.util.isArray(u)){var c=new Error("The application rejected the certificate.");throw c.send=!0,c.alert={level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate},u.message&&(c.message=u.message),u.alert&&(c.alert.description=u.alert),c}u!==a&&(u=yR(u))}return u},ae.pki.verifyCertificateChain(e.caStore,t,n)}catch(a){var i=a;(typeof i!="object"||ae.util.isArray(i))&&(i={send:!0,alert:{level:L.Alert.Level.fatal,description:Kf(a)}}),"send"in i||(i.send=!0),"alert"in i||(i.alert={level:L.Alert.Level.fatal,description:Kf(i.error)}),e.error(e,i)}return!e.fail};L.createSessionCache=function(e,t){var n=null;if(e&&e.getSession&&e.setSession&&e.order)n=e;else{n={},n.cache=e||{},n.capacity=Math.max(t||100,1),n.order=[];for(var r in e)n.order.length<=t?n.order.push(r):delete e[r];n.getSession=function(i){var a=null,o=null;if(i?o=ae.util.bytesToHex(i):n.order.length>0&&(o=n.order[0]),o!==null&&o in n.cache){a=n.cache[o],delete n.cache[o];for(var s in n.order)if(n.order[s]===o){n.order.splice(s,1);break}}return a},n.setSession=function(i,a){if(n.order.length===n.capacity){var o=n.order.shift();delete n.cache[o]}var o=ae.util.bytesToHex(i);n.order.push(o),n.cache[o]=a}}return n};L.createConnection=function(e){var t=null;e.caStore?ae.util.isArray(e.caStore)?t=ae.pki.createCaStore(e.caStore):t=e.caStore:t=ae.pki.createCaStore();var n=e.cipherSuites||null;if(n===null){n=[];for(var r in L.CipherSuites)n.push(L.CipherSuites[r])}var i=e.server?L.ConnectionEnd.server:L.ConnectionEnd.client,a=e.sessionCache?L.createSessionCache(e.sessionCache):null,o={version:{major:L.Version.major,minor:L.Version.minor},entity:i,sessionId:e.sessionId,caStore:t,sessionCache:a,cipherSuites:n,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,d,h,f){return d},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:ae.util.createBuffer(),tlsData:ae.util.createBuffer(),data:ae.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,d){d.origin=d.origin||(c.entity===L.ConnectionEnd.client?"client":"server"),d.send&&(L.queue(c,L.createAlert(c,d.alert)),L.flush(c));var h=d.fatal!==!1;h&&(c.fail=!0),e.error(c,d),h&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};o.reset=function(c){o.version={major:L.Version.major,minor:L.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=o.entity===L.ConnectionEnd.client?rR:cR,o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(c||typeof c>"u"),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=L.createConnectionState(o)},o.reset();var s=function(c,d){var h=d.type-L.ContentType.change_cipher_spec,f=up[c.entity][c.expect];h in f?f[h](c,d):L.handleUnexpected(c,d)},l=function(c){var d=0,h=c.input,f=h.length();if(f<5)d=5-f;else{c.record={type:h.getByte(),version:{major:h.getByte(),minor:h.getByte()},length:h.getInt16(),fragment:ae.util.createBuffer(),ready:!1};var g=c.record.version.major===c.version.major;g&&c.session&&c.session.version&&(g=c.record.version.minor===c.version.minor),g||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}})}return d},u=function(c){var d=0,h=c.input,f=h.length();if(f<c.record.length)d=c.record.length-f;else{c.record.fragment.putBytes(h.getBytes(c.record.length)),h.compact();var g=c.state.current.read;g.update(c,c.record)&&(c.fragmented!==null&&(c.fragmented.type===c.record.type?(c.fragmented.fragment.putBuffer(c.record.fragment),c.record=c.fragmented):c.error(c,{message:"Invalid fragmented record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}})),c.record.ready=!0)}return d};return o.handshake=function(c){if(o.entity!==L.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&o.handshakes===0&&(o.fail=!1),o.handshaking=!0,c=c||"";var d=null;c.length>0&&(o.sessionCache&&(d=o.sessionCache.getSession(c)),d===null&&(c="")),c.length===0&&o.sessionCache&&(d=o.sessionCache.getSession(),d!==null&&(c=d.id)),o.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:ae.md.md5.create(),sha1:ae.md.sha1.create()},d&&(o.version=d.version,o.session.sp=d.sp),o.session.sp.client_random=L.createRandom().getBytes(),o.open=!0,L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createClientHello(o)})),L.flush(o)}},o.process=function(c){var d=0;return c&&o.input.putBytes(c),o.fail||(o.record!==null&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),o.record===null&&(d=l(o)),!o.fail&&o.record!==null&&!o.record.ready&&(d=u(o)),!o.fail&&o.record!==null&&o.record.ready&&s(o,o.record)),d},o.prepare=function(c){return L.queue(o,L.createRecord(o,{type:L.ContentType.application_data,data:ae.util.createBuffer(c)})),L.flush(o)},o.prepareHeartbeatRequest=function(c,d){return c instanceof ae.util.ByteBuffer&&(c=c.bytes()),typeof d>"u"&&(d=c.length),o.expectedHeartbeatPayload=c,L.queue(o,L.createRecord(o,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_request,c,d)})),L.flush(o)},o.close=function(c){if(!o.fail&&o.sessionCache&&o.session){var d={id:o.session.id,version:o.session.version,sp:o.session.sp};d.sp.keys=null,o.sessionCache.setSession(d.id,d)}o.open&&(o.open=!1,o.input.clear(),(o.isConnected||o.handshaking)&&(o.isConnected=o.handshaking=!1,L.queue(o,L.createAlert(o,{level:L.Alert.Level.warning,description:L.Alert.Description.close_notify})),L.flush(o)),o.closed(o)),o.reset(c)},o};ae.tls=ae.tls||{};for(var qf in L)typeof L[qf]!="function"&&(ae.tls[qf]=L[qf]);ae.tls.prf_tls1=lf;ae.tls.hmac_sha1=eR;ae.tls.createSessionCache=L.createSessionCache;ae.tls.createConnection=L.createConnection;var pa=ze,yr=pa.tls;yr.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=yr.BulkCipherAlgorithm.aes,e.cipher_type=yr.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=yr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:OC};yr.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=yr.BulkCipherAlgorithm.aes,e.cipher_type=yr.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=yr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:OC};function OC(e,t,n){var r=t.entity===pa.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:pa.cipher.createDecipher("AES-CBC",r?n.keys.server_write_key:n.keys.client_write_key),iv:r?n.keys.server_write_IV:n.keys.client_write_IV},e.write.cipherState={init:!1,cipher:pa.cipher.createCipher("AES-CBC",r?n.keys.client_write_key:n.keys.server_write_key),iv:r?n.keys.client_write_IV:n.keys.server_write_IV},e.read.cipherFunction=SR,e.write.cipherFunction=xR,e.read.macLength=e.write.macLength=n.mac_length,e.read.macFunction=e.write.macFunction=yr.hmac_sha1}function xR(e,t){var n=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var i;e.version.minor===yr.Versions.TLS_1_0.minor?i=t.cipherState.init?null:t.cipherState.iv:i=pa.random.getBytesSync(16),t.cipherState.init=!0;var a=t.cipherState.cipher;return a.start({iv:i}),e.version.minor>=yr.Versions.TLS_1_1.minor&&a.output.putBytes(i),a.update(e.fragment),a.finish(CR)&&(e.fragment=a.output,e.length=e.fragment.length(),n=!0),n}function CR(e,t,n){if(!n){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function ER(e,t,n){var r=!0;if(n){for(var i=t.length(),a=t.last(),o=i-1-a;o<i-1;++o)r=r&&t.at(o)==a;r&&t.truncate(a+1)}return r}function SR(e,t){var n=!1,r;e.version.minor===yr.Versions.TLS_1_0.minor?r=t.cipherState.init?null:t.cipherState.iv:r=e.fragment.getBytes(16),t.cipherState.init=!0;var i=t.cipherState.cipher;i.start({iv:r}),i.update(e.fragment),n=i.finish(ER);var a=t.macLength,o=pa.random.getBytesSync(a),s=i.output.length();s>=a?(e.fragment=i.output.getBytes(s-a),o=i.output.getBytes(a)):e.fragment=i.output.getBytes(),e.fragment=pa.util.createBuffer(e.fragment),e.length=e.fragment.length();var l=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),n=wR(t.macKey,o,l)&&n,n}function wR(e,t,n){var r=pa.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(n),n=r.digest().getBytes(),t===n}var It=ze,hu=It.sha512=It.sha512||{};It.md.sha512=It.md.algorithms.sha512=hu;var VC=It.sha384=It.sha512.sha384=It.sha512.sha384||{};VC.create=function(){return hu.create("SHA-384")};It.md.sha384=It.md.algorithms.sha384=VC;It.sha512.sha256=It.sha512.sha256||{create:function(){return hu.create("SHA-512/256")}};It.md["sha512/256"]=It.md.algorithms["sha512/256"]=It.sha512.sha256;It.sha512.sha224=It.sha512.sha224||{create:function(){return hu.create("SHA-512/224")}};It.md["sha512/224"]=It.md.algorithms["sha512/224"]=It.sha512.sha224;hu.create=function(e){if(HC||IR(),typeof e>"u"&&(e="SHA-512"),!(e in Ua))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Ua[e],n=null,r=It.util.createBuffer(),i=new Array(80),a=0;a<80;++a)i[a]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var s={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return s.start=function(){s.messageLength=0,s.fullMessageLength=s.messageLength128=[];for(var l=s.messageLengthSize/4,u=0;u<l;++u)s.fullMessageLength.push(0);r=It.util.createBuffer(),n=new Array(t.length);for(var u=0;u<t.length;++u)n[u]=t[u].slice(0);return s},s.start(),s.update=function(l,u){u==="utf8"&&(l=It.util.encodeUtf8(l));var c=l.length;s.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var d=s.fullMessageLength.length-1;d>=0;--d)s.fullMessageLength[d]+=c[1],c[1]=c[0]+(s.fullMessageLength[d]/4294967296>>>0),s.fullMessageLength[d]=s.fullMessageLength[d]>>>0,c[0]=c[1]/4294967296>>>0;return r.putBytes(l),k1(n,i,r),(r.read>2048||r.length()===0)&&r.compact(),s},s.digest=function(){var l=It.util.createBuffer();l.putBytes(r.bytes());var u=s.fullMessageLength[s.fullMessageLength.length-1]+s.messageLengthSize,c=u&s.blockLength-1;l.putBytes(B0.substr(0,s.blockLength-c));for(var d,h,f=s.fullMessageLength[0]*8,g=0;g<s.fullMessageLength.length-1;++g)d=s.fullMessageLength[g+1]*8,h=d/4294967296>>>0,f+=h,l.putInt32(f>>>0),f=d>>>0;l.putInt32(f);for(var p=new Array(n.length),g=0;g<n.length;++g)p[g]=n[g].slice(0);k1(p,i,l);var m=It.util.createBuffer(),b;e==="SHA-512"?b=p.length:e==="SHA-384"?b=p.length-2:b=p.length-4;for(var g=0;g<b;++g)m.putInt32(p[g][0]),(g!==b-1||e!=="SHA-512/224")&&m.putInt32(p[g][1]);return m},s};var B0=null,HC=!1,$0=null,Ua=null;function IR(){B0="",B0+=It.util.fillString("\0",128),$0=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Ua={},Ua["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Ua["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Ua["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Ua["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],HC=!0}function k1(e,t,n){for(var r,i,a,o,s,l,u,c,d,h,f,g,p,m,b,v,x,C,E,w,B,y,S,D,A,T,F,k,P,$,R,O,j,V,W,U=n.length();U>=128;){for(P=0;P<16;++P)t[P][0]=n.getInt32()>>>0,t[P][1]=n.getInt32()>>>0;for(;P<80;++P)O=t[P-2],$=O[0],R=O[1],r=(($>>>19|R<<13)^(R>>>29|$<<3)^$>>>6)>>>0,i=(($<<13|R>>>19)^(R<<3|$>>>29)^($<<26|R>>>6))>>>0,V=t[P-15],$=V[0],R=V[1],a=(($>>>1|R<<31)^($>>>8|R<<24)^$>>>7)>>>0,o=(($<<31|R>>>1)^($<<24|R>>>8)^($<<25|R>>>7))>>>0,j=t[P-7],W=t[P-16],R=i+j[1]+o+W[1],t[P][0]=r+j[0]+a+W[0]+(R/4294967296>>>0)>>>0,t[P][1]=R>>>0;for(p=e[0][0],m=e[0][1],b=e[1][0],v=e[1][1],x=e[2][0],C=e[2][1],E=e[3][0],w=e[3][1],B=e[4][0],y=e[4][1],S=e[5][0],D=e[5][1],A=e[6][0],T=e[6][1],F=e[7][0],k=e[7][1],P=0;P<80;++P)u=((B>>>14|y<<18)^(B>>>18|y<<14)^(y>>>9|B<<23))>>>0,c=((B<<18|y>>>14)^(B<<14|y>>>18)^(y<<23|B>>>9))>>>0,d=(A^B&(S^A))>>>0,h=(T^y&(D^T))>>>0,s=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,l=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,f=(p&b|x&(p^b))>>>0,g=(m&v|C&(m^v))>>>0,R=k+c+h+$0[P][1]+t[P][1],r=F+u+d+$0[P][0]+t[P][0]+(R/4294967296>>>0)>>>0,i=R>>>0,R=l+g,a=s+f+(R/4294967296>>>0)>>>0,o=R>>>0,F=A,k=T,A=S,T=D,S=B,D=y,R=w+i,B=E+r+(R/4294967296>>>0)>>>0,y=R>>>0,E=x,w=C,x=b,C=v,b=p,v=m,R=i+o,p=r+a+(R/4294967296>>>0)>>>0,m=R>>>0;R=e[0][1]+m,e[0][0]=e[0][0]+p+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+v,e[1][0]=e[1][0]+b+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+C,e[2][0]=e[2][0]+x+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+w,e[3][0]=e[3][0]+E+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+y,e[4][0]=e[4][0]+B+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+D,e[5][0]=e[5][0]+S+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+T,e[6][0]=e[6][0]+A+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+k,e[7][0]=e[7][0]+F+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,U-=128}}var cp={},_R=ze,tn=_R.asn1;cp.privateKeyValidator={name:"PrivateKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:tn.Class.UNIVERSAL,type:tn.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};cp.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:tn.Class.UNIVERSAL,type:tn.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]};var gn=ze,jC=cp,DR=jC.publicKeyValidator,AR=jC.privateKeyValidator;if(typeof TR>"u")var TR=gn.jsbn.BigInteger;var k0=gn.util.ByteBuffer,Hn=typeof Buffer>"u"?Uint8Array:Buffer;gn.pki=gn.pki||{};gn.pki.ed25519=gn.ed25519=gn.ed25519||{};var Ze=gn.ed25519;Ze.constants={};Ze.constants.PUBLIC_KEY_BYTE_LENGTH=32;Ze.constants.PRIVATE_KEY_BYTE_LENGTH=64;Ze.constants.SEED_BYTE_LENGTH=32;Ze.constants.SIGN_BYTE_LENGTH=64;Ze.constants.HASH_BYTE_LENGTH=64;Ze.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=gn.random.getBytesSync(Ze.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==Ze.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Ze.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=Li({message:t,encoding:"binary"});for(var n=new Hn(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),r=new Hn(Ze.constants.PRIVATE_KEY_BYTE_LENGTH),i=0;i<32;++i)r[i]=t[i];return kR(n,r),{publicKey:n,privateKey:r}};Ze.privateKeyFromAsn1=function(e){var t={},n=[],r=gn.asn1.validate(e,AR,t,n);if(!r){var i=new Error("Invalid Key.");throw i.errors=n,i}var a=gn.asn1.derToOid(t.privateKeyOid),o=gn.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var s=t.privateKey,l=Li({message:gn.asn1.fromDer(s).value,encoding:"binary"});return{privateKeyBytes:l}};Ze.publicKeyFromAsn1=function(e){var t={},n=[],r=gn.asn1.validate(e,DR,t,n);if(!r){var i=new Error("Invalid Key.");throw i.errors=n,i}var a=gn.asn1.derToOid(t.publicKeyOid),o=gn.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var s=t.ed25519PublicKey;if(s.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Li({message:s,encoding:"binary"})};Ze.publicKeyFromPrivateKey=function(e){e=e||{};var t=Li({message:e.privateKey,encoding:"binary"});if(t.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);for(var n=new Hn(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r<n.length;++r)n[r]=t[32+r];return n};Ze.sign=function(e){e=e||{};var t=Li(e),n=Li({message:e.privateKey,encoding:"binary"});if(n.length===Ze.constants.SEED_BYTE_LENGTH){var r=Ze.generateKeyPair({seed:n});n=r.privateKey}else if(n.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.SEED_BYTE_LENGTH+" or "+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length);PR(i,t,t.length,n);for(var a=new Hn(Ze.constants.SIGN_BYTE_LENGTH),o=0;o<a.length;++o)a[o]=i[o];return a};Ze.verify=function(e){e=e||{};var t=Li(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var n=Li({message:e.signature,encoding:"binary"});if(n.length!==Ze.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Ze.constants.SIGN_BYTE_LENGTH);var r=Li({message:e.publicKey,encoding:"binary"});if(r.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Ze.constants.PUBLIC_KEY_BYTE_LENGTH);var i=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length),a=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length),o;for(o=0;o<Ze.constants.SIGN_BYTE_LENGTH;++o)i[o]=n[o];for(o=0;o<t.length;++o)i[o+Ze.constants.SIGN_BYTE_LENGTH]=t[o];return FR(a,i,i.length,r)>=0};function Li(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Hn)return t;var n=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),n="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,n);t=new k0(t,n)}else if(!(t instanceof k0))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new Hn(t.length()),i=0;i<r.length;++i)r[i]=t.at(i);return r}var P0=ke(),rd=ke([1]),RR=ke([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),BR=ke([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),P1=ke([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),F1=ke([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Jf=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),$R=ke([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function cl(e,t){var n=gn.md.sha512.create(),r=new k0(e);n.update(r.getBytes(t),"binary");var i=n.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(i,"binary");for(var a=new Hn(Ze.constants.HASH_BYTE_LENGTH),o=0;o<64;++o)a[o]=i.charCodeAt(o);return a}function kR(e,t){var n=[ke(),ke(),ke(),ke()],r,i=cl(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,fp(n,i),dp(e,n),r=0;r<32;++r)t[r+32]=e[r];return 0}function PR(e,t,n,r){var i,a,o=new Float64Array(64),s=[ke(),ke(),ke(),ke()],l=cl(r,32);l[0]&=248,l[31]&=127,l[31]|=64;var u=n+64;for(i=0;i<n;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=l[32+i];var c=cl(e.subarray(32),n+32);for(F0(c),fp(s,c),dp(e,s),i=32;i<64;++i)e[i]=r[i];var d=cl(e,n+64);for(F0(d),i=32;i<64;++i)o[i]=0;for(i=0;i<32;++i)o[i]=c[i];for(i=0;i<32;++i)for(a=0;a<32;a++)o[i+a]+=d[i]*l[a];return WC(e.subarray(32),o),u}function FR(e,t,n,r){var i,a,o=new Hn(32),s=[ke(),ke(),ke(),ke()],l=[ke(),ke(),ke(),ke()];if(a=-1,n<64||NR(l,r))return-1;for(i=0;i<n;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=r[i];var u=cl(e,n);if(F0(u),UC(s,l,u),fp(l,t.subarray(32)),N0(s,l),dp(o,s),n-=64,zC(t,0,o,0)){for(i=0;i<n;++i)e[i]=0;return-1}for(i=0;i<n;++i)e[i]=t[i+64];return a=n,a}function WC(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*Jf[i-(r-32)],n=t[i]+128>>8,t[i]-=n*256;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;++i)t[i]+=n-(t[31]>>4)*Jf[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=n*Jf[i];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function F0(e){for(var t=new Float64Array(64),n=0;n<64;++n)t[n]=e[n],e[n]=0;WC(e,t)}function N0(e,t){var n=ke(),r=ke(),i=ke(),a=ke(),o=ke(),s=ke(),l=ke(),u=ke(),c=ke();Yo(n,e[1],e[0]),Yo(c,t[1],t[0]),vt(n,n,c),Go(r,e[0],e[1]),Go(c,t[0],t[1]),vt(r,r,c),vt(i,e[3],t[3]),vt(i,i,BR),vt(a,e[2],t[2]),Go(a,a,a),Yo(o,r,n),Yo(s,a,i),Go(l,a,i),Go(u,r,n),vt(e[0],o,s),vt(e[1],u,l),vt(e[2],l,s),vt(e[3],o,u)}function N1(e,t,n){for(var r=0;r<4;++r)XC(e[r],t[r],n)}function dp(e,t){var n=ke(),r=ke(),i=ke();VR(i,t[2]),vt(n,t[0],i),vt(r,t[1],i),id(e,r),e[31]^=GC(n)<<7}function id(e,t){var n,r,i,a=ke(),o=ke();for(n=0;n<16;++n)o[n]=t[n];for(Qf(o),Qf(o),Qf(o),r=0;r<2;++r){for(a[0]=o[0]-65517,n=1;n<15;++n)a[n]=o[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,XC(o,a,1-i)}for(n=0;n<16;n++)e[2*n]=o[n]&255,e[2*n+1]=o[n]>>8}function NR(e,t){var n=ke(),r=ke(),i=ke(),a=ke(),o=ke(),s=ke(),l=ke();return sa(e[2],rd),MR(e[1],t),Xa(i,e[1]),vt(a,i,RR),Yo(i,i,e[2]),Go(a,e[2],a),Xa(o,a),Xa(s,o),vt(l,s,o),vt(n,l,i),vt(n,n,a),LR(n,n),vt(n,n,i),vt(n,n,a),vt(n,n,a),vt(e[0],n,a),Xa(r,e[0]),vt(r,r,a),M1(r,i)&&vt(e[0],e[0],$R),Xa(r,e[0]),vt(r,r,a),M1(r,i)?-1:(GC(e[0])===t[31]>>7&&Yo(e[0],P0,e[0]),vt(e[3],e[0],e[1]),0)}function MR(e,t){var n;for(n=0;n<16;++n)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function LR(e,t){var n=ke(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)Xa(n,n),r!==1&&vt(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function M1(e,t){var n=new Hn(32),r=new Hn(32);return id(n,e),id(r,t),zC(n,0,r,0)}function zC(e,t,n,r){return OR(e,t,n,r,32)}function OR(e,t,n,r,i){var a,o=0;for(a=0;a<i;++a)o|=e[t+a]^n[r+a];return(1&o-1>>>8)-1}function GC(e){var t=new Hn(32);return id(t,e),t[0]&1}function UC(e,t,n){var r,i;for(sa(e[0],P0),sa(e[1],rd),sa(e[2],rd),sa(e[3],P0),i=255;i>=0;--i)r=n[i/8|0]>>(i&7)&1,N1(e,t,r),N0(t,e),N0(e,e),N1(e,t,r)}function fp(e,t){var n=[ke(),ke(),ke(),ke()];sa(n[0],P1),sa(n[1],F1),sa(n[2],rd),vt(n[3],P1,F1),UC(e,n,t)}function sa(e,t){var n;for(n=0;n<16;n++)e[n]=t[n]|0}function VR(e,t){var n=ke(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)Xa(n,n),r!==2&&r!==4&&vt(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function Qf(e){var t,n,r=1;for(t=0;t<16;++t)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-r*65536;e[0]+=r-1+37*(r-1)}function XC(e,t,n){for(var r,i=~(n-1),a=0;a<16;++a)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function ke(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;++t)n[t]=e[t];return n}function Go(e,t,n){for(var r=0;r<16;++r)e[r]=t[r]+n[r]}function Yo(e,t,n){for(var r=0;r<16;++r)e[r]=t[r]-n[r]}function Xa(e,t){vt(e,t,t)}function vt(e,t,n){var r,i,a=0,o=0,s=0,l=0,u=0,c=0,d=0,h=0,f=0,g=0,p=0,m=0,b=0,v=0,x=0,C=0,E=0,w=0,B=0,y=0,S=0,D=0,A=0,T=0,F=0,k=0,P=0,$=0,R=0,O=0,j=0,V=n[0],W=n[1],U=n[2],K=n[3],ee=n[4],z=n[5],H=n[6],X=n[7],te=n[8],ie=n[9],le=n[10],ce=n[11],Q=n[12],be=n[13],Ce=n[14],Se=n[15];r=t[0],a+=r*V,o+=r*W,s+=r*U,l+=r*K,u+=r*ee,c+=r*z,d+=r*H,h+=r*X,f+=r*te,g+=r*ie,p+=r*le,m+=r*ce,b+=r*Q,v+=r*be,x+=r*Ce,C+=r*Se,r=t[1],o+=r*V,s+=r*W,l+=r*U,u+=r*K,c+=r*ee,d+=r*z,h+=r*H,f+=r*X,g+=r*te,p+=r*ie,m+=r*le,b+=r*ce,v+=r*Q,x+=r*be,C+=r*Ce,E+=r*Se,r=t[2],s+=r*V,l+=r*W,u+=r*U,c+=r*K,d+=r*ee,h+=r*z,f+=r*H,g+=r*X,p+=r*te,m+=r*ie,b+=r*le,v+=r*ce,x+=r*Q,C+=r*be,E+=r*Ce,w+=r*Se,r=t[3],l+=r*V,u+=r*W,c+=r*U,d+=r*K,h+=r*ee,f+=r*z,g+=r*H,p+=r*X,m+=r*te,b+=r*ie,v+=r*le,x+=r*ce,C+=r*Q,E+=r*be,w+=r*Ce,B+=r*Se,r=t[4],u+=r*V,c+=r*W,d+=r*U,h+=r*K,f+=r*ee,g+=r*z,p+=r*H,m+=r*X,b+=r*te,v+=r*ie,x+=r*le,C+=r*ce,E+=r*Q,w+=r*be,B+=r*Ce,y+=r*Se,r=t[5],c+=r*V,d+=r*W,h+=r*U,f+=r*K,g+=r*ee,p+=r*z,m+=r*H,b+=r*X,v+=r*te,x+=r*ie,C+=r*le,E+=r*ce,w+=r*Q,B+=r*be,y+=r*Ce,S+=r*Se,r=t[6],d+=r*V,h+=r*W,f+=r*U,g+=r*K,p+=r*ee,m+=r*z,b+=r*H,v+=r*X,x+=r*te,C+=r*ie,E+=r*le,w+=r*ce,B+=r*Q,y+=r*be,S+=r*Ce,D+=r*Se,r=t[7],h+=r*V,f+=r*W,g+=r*U,p+=r*K,m+=r*ee,b+=r*z,v+=r*H,x+=r*X,C+=r*te,E+=r*ie,w+=r*le,B+=r*ce,y+=r*Q,S+=r*be,D+=r*Ce,A+=r*Se,r=t[8],f+=r*V,g+=r*W,p+=r*U,m+=r*K,b+=r*ee,v+=r*z,x+=r*H,C+=r*X,E+=r*te,w+=r*ie,B+=r*le,y+=r*ce,S+=r*Q,D+=r*be,A+=r*Ce,T+=r*Se,r=t[9],g+=r*V,p+=r*W,m+=r*U,b+=r*K,v+=r*ee,x+=r*z,C+=r*H,E+=r*X,w+=r*te,B+=r*ie,y+=r*le,S+=r*ce,D+=r*Q,A+=r*be,T+=r*Ce,F+=r*Se,r=t[10],p+=r*V,m+=r*W,b+=r*U,v+=r*K,x+=r*ee,C+=r*z,E+=r*H,w+=r*X,B+=r*te,y+=r*ie,S+=r*le,D+=r*ce,A+=r*Q,T+=r*be,F+=r*Ce,k+=r*Se,r=t[11],m+=r*V,b+=r*W,v+=r*U,x+=r*K,C+=r*ee,E+=r*z,w+=r*H,B+=r*X,y+=r*te,S+=r*ie,D+=r*le,A+=r*ce,T+=r*Q,F+=r*be,k+=r*Ce,P+=r*Se,r=t[12],b+=r*V,v+=r*W,x+=r*U,C+=r*K,E+=r*ee,w+=r*z,B+=r*H,y+=r*X,S+=r*te,D+=r*ie,A+=r*le,T+=r*ce,F+=r*Q,k+=r*be,P+=r*Ce,$+=r*Se,r=t[13],v+=r*V,x+=r*W,C+=r*U,E+=r*K,w+=r*ee,B+=r*z,y+=r*H,S+=r*X,D+=r*te,A+=r*ie,T+=r*le,F+=r*ce,k+=r*Q,P+=r*be,$+=r*Ce,R+=r*Se,r=t[14],x+=r*V,C+=r*W,E+=r*U,w+=r*K,B+=r*ee,y+=r*z,S+=r*H,D+=r*X,A+=r*te,T+=r*ie,F+=r*le,k+=r*ce,P+=r*Q,$+=r*be,R+=r*Ce,O+=r*Se,r=t[15],C+=r*V,E+=r*W,w+=r*U,B+=r*K,y+=r*ee,S+=r*z,D+=r*H,A+=r*X,T+=r*te,F+=r*ie,k+=r*le,P+=r*ce,$+=r*Q,R+=r*be,O+=r*Ce,j+=r*Se,a+=38*E,o+=38*w,s+=38*B,l+=38*y,u+=38*S,c+=38*D,d+=38*A,h+=38*T,f+=38*F,g+=38*k,p+=38*P,m+=38*$,b+=38*R,v+=38*O,x+=38*j,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-i*65536,r=o+i+65535,i=Math.floor(r/65536),o=r-i*65536,r=s+i+65535,i=Math.floor(r/65536),s=r-i*65536,r=l+i+65535,i=Math.floor(r/65536),l=r-i*65536,r=u+i+65535,i=Math.floor(r/65536),u=r-i*65536,r=c+i+65535,i=Math.floor(r/65536),c=r-i*65536,r=d+i+65535,i=Math.floor(r/65536),d=r-i*65536,r=h+i+65535,i=Math.floor(r/65536),h=r-i*65536,r=f+i+65535,i=Math.floor(r/65536),f=r-i*65536,r=g+i+65535,i=Math.floor(r/65536),g=r-i*65536,r=p+i+65535,i=Math.floor(r/65536),p=r-i*65536,r=m+i+65535,i=Math.floor(r/65536),m=r-i*65536,r=b+i+65535,i=Math.floor(r/65536),b=r-i*65536,r=v+i+65535,i=Math.floor(r/65536),v=r-i*65536,r=x+i+65535,i=Math.floor(r/65536),x=r-i*65536,r=C+i+65535,i=Math.floor(r/65536),C=r-i*65536,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-i*65536,r=o+i+65535,i=Math.floor(r/65536),o=r-i*65536,r=s+i+65535,i=Math.floor(r/65536),s=r-i*65536,r=l+i+65535,i=Math.floor(r/65536),l=r-i*65536,r=u+i+65535,i=Math.floor(r/65536),u=r-i*65536,r=c+i+65535,i=Math.floor(r/65536),c=r-i*65536,r=d+i+65535,i=Math.floor(r/65536),d=r-i*65536,r=h+i+65535,i=Math.floor(r/65536),h=r-i*65536,r=f+i+65535,i=Math.floor(r/65536),f=r-i*65536,r=g+i+65535,i=Math.floor(r/65536),g=r-i*65536,r=p+i+65535,i=Math.floor(r/65536),p=r-i*65536,r=m+i+65535,i=Math.floor(r/65536),m=r-i*65536,r=b+i+65535,i=Math.floor(r/65536),b=r-i*65536,r=v+i+65535,i=Math.floor(r/65536),v=r-i*65536,r=x+i+65535,i=Math.floor(r/65536),x=r-i*65536,r=C+i+65535,i=Math.floor(r/65536),C=r-i*65536,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=l,e[4]=u,e[5]=c,e[6]=d,e[7]=h,e[8]=f,e[9]=g,e[10]=p,e[11]=m,e[12]=b,e[13]=v,e[14]=x,e[15]=C}var qn=ze;qn.kem=qn.kem||{};var L1=qn.jsbn.BigInteger;qn.kem.rsa={};qn.kem.rsa.create=function(e,t){t=t||{};var n=t.prng||qn.random,r={};return r.encrypt=function(i,a){var o=Math.ceil(i.n.bitLength()/8),s;do s=new L1(qn.util.bytesToHex(n.getBytesSync(o)),16).mod(i.n);while(s.compareTo(L1.ONE)<=0);s=qn.util.hexToBytes(s.toString(16));var l=o-s.length;l>0&&(s=qn.util.fillString("\0",l)+s);var u=i.encrypt(s,"NONE"),c=e.generate(s,a);return{encapsulation:u,key:c}},r.decrypt=function(i,a,o){var s=i.decrypt(a,"NONE");return e.generate(s,o)},r};qn.kem.kdf1=function(e,t){ZC(this,e,0,t||e.digestLength)};qn.kem.kdf2=function(e,t){ZC(this,e,1,t||e.digestLength)};function ZC(e,t,n,r){e.generate=function(i,a){for(var o=new qn.util.ByteBuffer,s=Math.ceil(a/r)+n,l=new qn.util.ByteBuffer,u=n;u<s;++u){l.putInt32(u),t.start(),t.update(i+l.getBytes());var c=t.digest();o.putBytes(c.getBytes(r))}return o.truncate(o.length()-a),o.getBytes()}}var qe=ze;qe.log=qe.log||{};qe.log.levels=["none","error","warning","info","debug","verbose","max"];var ad={},M0=[],dl=null;qe.log.LEVEL_LOCKED=2;qe.log.NO_LEVEL_CHECK=4;qe.log.INTERPOLATE=8;for(var la=0;la<qe.log.levels.length;++la){var O1=qe.log.levels[la];ad[O1]={index:la,name:O1.toUpperCase()}}qe.log.logMessage=function(e){for(var t=ad[e.level].index,n=0;n<M0.length;++n){var r=M0[n];if(r.flags&qe.log.NO_LEVEL_CHECK)r.f(e);else{var i=ad[r.level].index;t<=i&&r.f(r,e)}}};qe.log.prepareStandard=function(e){"standard"in e||(e.standard=ad[e.level].name+" ["+e.category+"] "+e.message)};qe.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=qe.util.format.apply(this,t)}};qe.log.prepareStandardFull=function(e){"standardFull"in e||(qe.log.prepareStandard(e),e.standardFull=e.standard)};for(var V1=["error","warning","info","debug","verbose"],la=0;la<V1.length;++la)(function(t){qe.log[t]=function(n,r){var i=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:t,category:n,message:r,arguments:i};qe.log.logMessage(a)}})(V1[la]);qe.log.makeLogger=function(e){var t={flags:0,f:e};return qe.log.setLevel(t,"none"),t};qe.log.setLevel=function(e,t){var n=!1;if(e&&!(e.flags&qe.log.LEVEL_LOCKED))for(var r=0;r<qe.log.levels.length;++r){var i=qe.log.levels[r];if(t==i){e.level=t,n=!0;break}}return n};qe.log.lock=function(e,t){typeof t>"u"||t?e.flags|=qe.log.LEVEL_LOCKED:e.flags&=~qe.log.LEVEL_LOCKED};qe.log.addLogger=function(e){M0.push(e)};if(typeof console<"u"&&"log"in console){var Ms;if(console.error&&console.warn&&console.info&&console.debug){var HR={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},hp=function(e,t){qe.log.prepareStandard(t);var n=HR[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),n.apply(console,r)};Ms=qe.log.makeLogger(hp)}else{var hp=function(t,n){qe.log.prepareStandardFull(n),console.log(n.standardFull)};Ms=qe.log.makeLogger(hp)}qe.log.setLevel(Ms,"debug"),qe.log.addLogger(Ms),dl=Ms}else console={log:function(){}};if(dl!==null&&typeof window<"u"&&window.location){var ku=new URL(window.location.href).searchParams;if(ku.has("console.level")&&qe.log.setLevel(dl,ku.get("console.level").slice(-1)[0]),ku.has("console.lock")){var jR=ku.get("console.lock").slice(-1)[0];jR=="true"&&qe.log.lock(dl)}}qe.log.consoleLogger=dl;var he=ze,Z=he.asn1,An=he.pkcs7=he.pkcs7||{};An.messageFromPem=function(e){var t=he.pem.decode(e)[0];if(t.type!=="PKCS7"){var n=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=Z.fromDer(t.body);return An.messageFromAsn1(r)};An.messageToPem=function(e,t){var n={type:"PKCS7",body:Z.toDer(e.toAsn1()).getBytes()};return he.pem.encode(n,{maxline:t})};An.messageFromAsn1=function(e){var t={},n=[];if(!Z.validate(e,An.asn1.contentInfoValidator,t,n)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=n,r}var i=Z.derToOid(t.contentType),a;switch(i){case he.pki.oids.envelopedData:a=An.createEnvelopedData();break;case he.pki.oids.encryptedData:a=An.createEncryptedData();break;case he.pki.oids.signedData:a=An.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+i+" is not (yet) supported.")}return a.fromAsn1(t.content.value[0]),a};An.createSignedData=function(){var e=null;return e={type:he.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(gp(e,r,An.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var i=e.rawCapture.certificates.value,a=0;a<i.length;++a)e.certificates.push(he.pki.certificateFromAsn1(i[a]))},toAsn1:function(){e.contentInfo||e.sign();for(var r=[],i=0;i<e.certificates.length;++i)r.push(he.pki.certificateToAsn1(e.certificates[i]));var a=[],o=Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return r.length>0&&o.value[0].value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,r)),a.length>0&&o.value[0].value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,1,!0,a)),o.value[0].value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,e.signerInfos)),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),o])},addSigner:function(r){var i=r.issuer,a=r.serialNumber;if(r.certificate){var o=r.certificate;typeof o=="string"&&(o=he.pki.certificateFromPem(o)),i=o.issuer.attributes,a=o.serialNumber}var s=r.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof s=="string"&&(s=he.pki.privateKeyFromPem(s));var l=r.digestAlgorithm||he.pki.oids.sha1;switch(l){case he.pki.oids.sha1:case he.pki.oids.sha256:case he.pki.oids.sha384:case he.pki.oids.sha512:case he.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+l)}var u=r.authenticatedAttributes||[];if(u.length>0){for(var c=!1,d=!1,h=0;h<u.length;++h){var f=u[h];if(!c&&f.type===he.pki.oids.contentType){if(c=!0,d)break;continue}if(!d&&f.type===he.pki.oids.messageDigest){if(d=!0,c)break;continue}}if(!c||!d)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:s,version:1,issuer:i,serialNumber:a,digestAlgorithm:l,signatureAlgorithm:he.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(r){if(r=r||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(he.pki.oids.data).getBytes())]),"content"in e)){var i;e.content instanceof he.util.ByteBuffer?i=e.content.bytes():typeof e.content=="string"&&(i=he.util.encodeUtf8(e.content)),r.detached?e.detachedContent=Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,i):e.contentInfo.value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,i)]))}if(e.signers.length!==0){var a=t();n(a)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(r){typeof r=="string"&&(r=he.pki.certificateFromPem(r)),e.certificates.push(r)},addCertificateRevokationList:function(r){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var r={},i=0;i<e.signers.length;++i){var a=e.signers[i],o=a.digestAlgorithm;o in r||(r[o]=he.md[he.pki.oids[o]].create()),a.authenticatedAttributes.length===0?a.md=r[o]:a.md=he.md[he.pki.oids[o]].create()}e.digestAlgorithmIdentifiers=[];for(var o in r)e.digestAlgorithmIdentifiers.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(o).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")]));return r}function n(r){var i;if(e.detachedContent?i=e.detachedContent:(i=e.contentInfo.value[1],i=i.value[0]),!i)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=Z.derToOid(e.contentInfo.value[0].value),o=Z.toDer(i);o.getByte(),Z.getBerValueLength(o),o=o.getBytes();for(var s in r)r[s].start().update(o);for(var l=new Date,u=0;u<e.signers.length;++u){var c=e.signers[u];if(c.authenticatedAttributes.length===0){if(a!==he.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[]),h=0;h<c.authenticatedAttributes.length;++h){var f=c.authenticatedAttributes[h];f.type===he.pki.oids.messageDigest?f.value=r[c.digestAlgorithm].digest():f.type===he.pki.oids.signingTime&&(f.value||(f.value=l)),d.value.push(L0(f)),c.authenticatedAttributesAsn1.value.push(L0(f))}o=Z.toDer(d).getBytes(),c.md.start().update(o)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=ZR(e.signers)}};An.createEncryptedData=function(){var e=null;return e={type:he.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:he.pki.oids["aes256-CBC"]},fromAsn1:function(t){gp(e,t,An.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),YC(e)}},e};An.createEnvelopedData=function(){var e=null;return e={type:he.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:he.pki.oids["aes256-CBC"]},fromAsn1:function(t){var n=gp(e,t,An.asn1.envelopedDataValidator);e.recipients=GR(n.recipientInfos.value)},toAsn1:function(){return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,UR(e.recipients)),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,YR(e.encryptedContent))])])])},findRecipient:function(t){for(var n=t.issuer.attributes,r=0;r<e.recipients.length;++r){var i=e.recipients[r],a=i.issuer;if(i.serialNumber===t.serialNumber&&a.length===n.length){for(var o=!0,s=0;s<n.length;++s)if(a[s].type!==n[s].type||a[s].value!==n[s].value){o=!1;break}if(o)return i}}return null},decrypt:function(t,n){if(e.encryptedContent.key===void 0&&t!==void 0&&n!==void 0)switch(t.encryptedContent.algorithm){case he.pki.oids.rsaEncryption:case he.pki.oids.desCBC:var r=n.decrypt(t.encryptedContent.content);e.encryptedContent.key=he.util.createBuffer(r);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}YC(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:he.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,n){if(e.encryptedContent.content===void 0){n=n||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var r,i,a;switch(n){case he.pki.oids["aes128-CBC"]:r=16,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["aes192-CBC"]:r=24,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["aes256-CBC"]:r=32,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["des-EDE3-CBC"]:r=24,i=8,a=he.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+n)}if(t===void 0)t=he.util.createBuffer(he.random.getBytes(r));else if(t.length()!=r)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+r+".");e.encryptedContent.algorithm=n,e.encryptedContent.key=t,e.encryptedContent.parameter=he.util.createBuffer(he.random.getBytes(i));var o=a(t);if(o.start(e.encryptedContent.parameter.copy()),o.update(e.content),!o.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=o.output}for(var s=0;s<e.recipients.length;++s){var l=e.recipients[s];if(l.encryptedContent.content===void 0)switch(l.encryptedContent.algorithm){case he.pki.oids.rsaEncryption:l.encryptedContent.content=l.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+l.encryptedContent.algorithm)}}}},e};function WR(e){var t={},n=[];if(!Z.validate(e,An.asn1.recipientInfoValidator,t,n)){var r=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw r.errors=n,r}return{version:t.version.charCodeAt(0),issuer:he.pki.RDNAttributesAsArray(t.issuer),serialNumber:he.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:Z.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function zR(e){return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[he.pki.distinguishedNameToAsn1({attributes:e.issuer}),Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,he.util.hexToBytes(e.serialNumber))]),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.encryptedContent.algorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")]),Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function GR(e){for(var t=[],n=0;n<e.length;++n)t.push(WR(e[n]));return t}function UR(e){for(var t=[],n=0;n<e.length;++n)t.push(zR(e[n]));return t}function XR(e){var t=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[he.pki.distinguishedNameToAsn1({attributes:e.issuer}),Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,he.util.hexToBytes(e.serialNumber))]),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.digestAlgorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.signatureAlgorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")])),t.value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var n=Z.create(Z.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r<e.unauthenticatedAttributes.length;++r){var i=e.unauthenticatedAttributes[r];n.values.push(L0(i))}t.value.push(n)}return t}function ZR(e){for(var t=[],n=0;n<e.length;++n)t.push(XR(e[n]));return t}function L0(e){var t;if(e.type===he.pki.oids.contentType)t=Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.value).getBytes());else if(e.type===he.pki.oids.messageDigest)t=Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===he.pki.oids.signingTime){var n=new Date("1950-01-01T00:00:00Z"),r=new Date("2050-01-01T00:00:00Z"),i=e.value;if(typeof i=="string"){var a=Date.parse(i);isNaN(a)?i.length===13?i=Z.utcTimeToDate(i):i=Z.generalizedTimeToDate(i):i=new Date(a)}i>=n&&i<r?t=Z.create(Z.Class.UNIVERSAL,Z.Type.UTCTIME,!1,Z.dateToUtcTime(i)):t=Z.create(Z.Class.UNIVERSAL,Z.Type.GENERALIZEDTIME,!1,Z.dateToGeneralizedTime(i))}return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[t])])}function YR(e){return[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(he.pki.oids.data).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.algorithm).getBytes()),e.parameter?Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.content.getBytes())])]}function gp(e,t,n){var r={},i=[];if(!Z.validate(t,n,r,i)){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw a.errors=a,a}var o=Z.derToOid(r.contentType);if(o!==he.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(r.encryptedContent){var s="";if(he.util.isArray(r.encryptedContent))for(var l=0;l<r.encryptedContent.length;++l){if(r.encryptedContent[l].type!==Z.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=r.encryptedContent[l].value}else s=r.encryptedContent;e.encryptedContent={algorithm:Z.derToOid(r.encAlgorithm),parameter:he.util.createBuffer(r.encParameter.value),content:he.util.createBuffer(s)}}if(r.content){var s="";if(he.util.isArray(r.content))for(var l=0;l<r.content.length;++l){if(r.content[l].type!==Z.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=r.content[l].value}else s=r.content;e.content=he.util.createBuffer(s)}return e.version=r.version.charCodeAt(0),e.rawCapture=r,r}function YC(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case he.pki.oids["aes128-CBC"]:case he.pki.oids["aes192-CBC"]:case he.pki.oids["aes256-CBC"]:t=he.aes.createDecryptionCipher(e.encryptedContent.key);break;case he.pki.oids.desCBC:case he.pki.oids["des-EDE3-CBC"]:t=he.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var Wt=ze,uf=Wt.ssh=Wt.ssh||{};uf.privateKeyToPutty=function(e,t,n){n=n||"",t=t||"";var r="ssh-rsa",i=t===""?"none":"aes256-cbc",a="PuTTY-User-Key-File-2: "+r+`\r
|
|
14
|
+
`+s+t.substr(o+1),a=i-o-1,o=-1,++i}else(t[i]===" "||t[i]===" "||t[i]===",")&&(o=i);return t}function y6(e){return e.replace(/^\s+/,"")}var Tt=ze;Tt.des=Tt.des||{};Tt.des.startEncrypting=function(e,t,n,r){var i=rf({key:e,output:n,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i};Tt.des.createEncryptionCipher=function(e,t){return rf({key:e,output:null,decrypt:!1,mode:t})};Tt.des.startDecrypting=function(e,t,n,r){var i=rf({key:e,output:n,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i};Tt.des.createDecryptionCipher=function(e,t){return rf({key:e,output:null,decrypt:!0,mode:t})};Tt.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(r,i){return y1(n._keys,r,i,!1)},decrypt:function(r,i){return y1(n._keys,r,i,!0)}}}),n._init=!1};Tt.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Tt.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=A6(t),this._init=!0}};hi("DES-ECB",Tt.cipher.modes.ecb);hi("DES-CBC",Tt.cipher.modes.cbc);hi("DES-CFB",Tt.cipher.modes.cfb);hi("DES-OFB",Tt.cipher.modes.ofb);hi("DES-CTR",Tt.cipher.modes.ctr);hi("3DES-ECB",Tt.cipher.modes.ecb);hi("3DES-CBC",Tt.cipher.modes.cbc);hi("3DES-CFB",Tt.cipher.modes.cfb);hi("3DES-OFB",Tt.cipher.modes.ofb);hi("3DES-CTR",Tt.cipher.modes.ctr);function hi(e,t){var n=function(){return new Tt.des.Algorithm(e,t)};Tt.cipher.registerAlgorithm(e,n)}var x6=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],C6=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],E6=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],S6=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],w6=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],I6=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],_6=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],D6=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function A6(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],f=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],g=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],p=e.length()>8?3:1,m=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,x,C=0;C<p;C++){var E=e.getInt32(),w=e.getInt32();x=(E>>>4^w)&252645135,w^=x,E^=x<<4,x=(w>>>-16^E)&65535,E^=x,w^=x<<-16,x=(E>>>2^w)&858993459,w^=x,E^=x<<2,x=(w>>>-16^E)&65535,E^=x,w^=x<<-16,x=(E>>>1^w)&1431655765,w^=x,E^=x<<1,x=(w>>>8^E)&16711935,E^=x,w^=x<<8,x=(E>>>1^w)&1431655765,w^=x,E^=x<<1,x=E<<8|w>>>20&240,E=w<<24|w<<8&16711680|w>>>8&65280|w>>>24&240,w=x;for(var B=0;B<b.length;++B){b[B]?(E=E<<2|E>>>26,w=w<<2|w>>>26):(E=E<<1|E>>>27,w=w<<1|w>>>27),E&=-15,w&=-15;var y=t[E>>>28]|n[E>>>24&15]|r[E>>>20&15]|i[E>>>16&15]|a[E>>>12&15]|o[E>>>8&15]|s[E>>>4&15],S=l[w>>>28]|u[w>>>24&15]|c[w>>>20&15]|d[w>>>16&15]|h[w>>>12&15]|f[w>>>8&15]|g[w>>>4&15];x=(S>>>16^y)&65535,m[v++]=y^x,m[v++]=S^x<<16}}return m}function y1(e,t,n,r){var i=e.length===32?3:9,a;i===3?a=r?[30,-2,-2]:[0,32,2]:a=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var o,s=t[0],l=t[1];o=(s>>>4^l)&252645135,l^=o,s^=o<<4,o=(s>>>16^l)&65535,l^=o,s^=o<<16,o=(l>>>2^s)&858993459,s^=o,l^=o<<2,o=(l>>>8^s)&16711935,s^=o,l^=o<<8,o=(s>>>1^l)&1431655765,l^=o,s^=o<<1,s=s<<1|s>>>31,l=l<<1|l>>>31;for(var u=0;u<i;u+=3){for(var c=a[u+1],d=a[u+2],h=a[u];h!=c;h+=d){var f=l^e[h],g=(l>>>4|l<<28)^e[h+1];o=s,s=l,l=o^(C6[f>>>24&63]|S6[f>>>16&63]|I6[f>>>8&63]|D6[f&63]|x6[g>>>24&63]|E6[g>>>16&63]|w6[g>>>8&63]|_6[g&63])}o=s,s=l,l=o}s=s>>>1|s<<31,l=l>>>1|l<<31,o=(s>>>1^l)&1431655765,l^=o,s^=o<<1,o=(l>>>8^s)&16711935,s^=o,l^=o<<8,o=(l>>>2^s)&858993459,s^=o,l^=o<<2,o=(s>>>16^l)&65535,l^=o,s^=o<<16,o=(s>>>4^l)&252645135,l^=o,s^=o<<4,n[0]=s,n[1]=l}function rf(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="DES-"+t,r;e.decrypt?r=Tt.cipher.createDecipher(n,e.key):r=Tt.cipher.createCipher(n,e.key);var i=r.start;return r.start=function(a,o){var s=null;o instanceof Tt.util.ByteBuffer&&(s=o,o={}),o=o||{},o.output=s,o.iv=a,i.call(r,o)},r}const T6={},R6=Object.freeze(Object.defineProperty({__proto__:null,default:T6},Symbol.toStringTag,{value:"Module"})),np=s6(R6);var _n=ze,B6=_n.pkcs5=_n.pkcs5||{},Si;_n.util.isNodejs&&!_n.options.usePureJavaScript&&(Si=np);_n.pbkdf2=B6.pbkdf2=function(e,t,n,r,i,a){if(typeof i=="function"&&(a=i,i=null),_n.util.isNodejs&&!_n.options.usePureJavaScript&&Si.pbkdf2&&(i===null||typeof i!="object")&&(Si.pbkdf2Sync.length>4||!i||i==="sha1"))return typeof i!="string"&&(i="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),a?Si.pbkdf2Sync.length===4?Si.pbkdf2(e,t,n,r,function(x,C){if(x)return a(x);a(null,C.toString("binary"))}):Si.pbkdf2(e,t,n,r,i,function(x,C){if(x)return a(x);a(null,C.toString("binary"))}):Si.pbkdf2Sync.length===4?Si.pbkdf2Sync(e,t,n,r).toString("binary"):Si.pbkdf2Sync(e,t,n,r,i).toString("binary");if((typeof i>"u"||i===null)&&(i="sha1"),typeof i=="string"){if(!(i in _n.md.algorithms))throw new Error("Unknown hash algorithm: "+i);i=_n.md[i].create()}var o=i.digestLength;if(r>4294967295*o){var s=new Error("Derived key is too long.");if(a)return a(s);throw s}var l=Math.ceil(r/o),u=r-(l-1)*o,c=_n.hmac.create();c.start(i,e);var d="",h,f,g;if(!a){for(var p=1;p<=l;++p){c.start(null,null),c.update(t),c.update(_n.util.int32ToBytes(p)),h=g=c.digest().getBytes();for(var m=2;m<=n;++m)c.start(null,null),c.update(g),f=c.digest().getBytes(),h=_n.util.xorBytes(h,f,o),g=f;d+=p<l?h:h.substr(0,u)}return d}var p=1,m;function b(){if(p>l)return a(null,d);c.start(null,null),c.update(t),c.update(_n.util.int32ToBytes(p)),h=g=c.digest().getBytes(),m=2,v()}function v(){if(m<=n)return c.start(null,null),c.update(g),f=c.digest().getBytes(),h=_n.util.xorBytes(h,f,o),g=f,++m,_n.util.setImmediate(v);d+=p<l?h:h.substr(0,u),++p,b()}b()};var ei=ze,hC=ei.sha256=ei.sha256||{};ei.md.sha256=ei.md.algorithms.sha256=hC;hC.create=function(){gC||$6();var e=null,t=ei.util.createBuffer(),n=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var i=r.messageLengthSize/4,a=0;a<i;++a)r.fullMessageLength.push(0);return t=ei.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},r},r.start(),r.update=function(i,a){a==="utf8"&&(i=ei.util.encodeUtf8(i));var o=i.length;r.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=r.fullMessageLength.length-1;s>=0;--s)r.fullMessageLength[s]+=o[1],o[1]=o[0]+(r.fullMessageLength[s]/4294967296>>>0),r.fullMessageLength[s]=r.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),x1(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var i=ei.util.createBuffer();i.putBytes(t.bytes());var a=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=a&r.blockLength-1;i.putBytes(_0.substr(0,r.blockLength-o));for(var s,l,u=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)s=r.fullMessageLength[c+1]*8,l=s/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=s>>>0;i.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};x1(d,n,i);var h=ei.util.createBuffer();return h.putInt32(d.h0),h.putInt32(d.h1),h.putInt32(d.h2),h.putInt32(d.h3),h.putInt32(d.h4),h.putInt32(d.h5),h.putInt32(d.h6),h.putInt32(d.h7),h},r};var _0=null,gC=!1,pC=null;function $6(){_0="",_0+=ei.util.fillString("\0",64),pC=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],gC=!0}function x1(e,t,n){for(var r,i,a,o,s,l,u,c,d,h,f,g,p,m,b,v=n.length();v>=64;){for(u=0;u<16;++u)t[u]=n.getInt32();for(;u<64;++u)r=t[u-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=t[u-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=r+t[u-7]+i+t[u-16]|0;for(c=e.h0,d=e.h1,h=e.h2,f=e.h3,g=e.h4,p=e.h5,m=e.h6,b=e.h7,u=0;u<64;++u)o=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),s=m^g&(p^m),a=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),l=c&d|h&(c^d),r=b+o+s+pC[u]+t[u],i=a+l,b=m,m=p,p=g,g=f+r>>>0,f=h,h=d,d=c,c=r+i>>>0;e.h0=e.h0+c|0,e.h1=e.h1+d|0,e.h2=e.h2+h|0,e.h3=e.h3+f|0,e.h4=e.h4+g|0,e.h5=e.h5+p|0,e.h6=e.h6+m|0,e.h7=e.h7+b|0,v-=64}}var Yr=ze,Dc=null;Yr.util.isNodejs&&!Yr.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Dc=np);var k6=Yr.prng=Yr.prng||{};k6.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},n=e.md,r=new Array(32),i=0;i<32;++i)r[i]=n.create();t.pools=r,t.pool=0,t.generate=function(u,c){if(!c)return t.generateSync(u);var d=t.plugin.cipher,h=t.plugin.increment,f=t.plugin.formatKey,g=t.plugin.formatSeed,p=Yr.util.createBuffer();t.key=null,m();function m(b){if(b)return c(b);if(p.length()>=u)return c(null,p.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Yr.util.nextTick(function(){a(m)});var v=d(t.key,t.seed);t.generated+=v.length,p.putBytes(v),t.key=f(d(t.key,h(t.seed))),t.seed=g(d(t.key,t.seed)),Yr.util.setImmediate(m)}},t.generateSync=function(u){var c=t.plugin.cipher,d=t.plugin.increment,h=t.plugin.formatKey,f=t.plugin.formatSeed;t.key=null;for(var g=Yr.util.createBuffer();g.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&o();var p=c(t.key,t.seed);t.generated+=p.length,g.putBytes(p),t.key=h(c(t.key,d(t.seed))),t.seed=f(c(t.key,t.seed))}return g.getBytes(u)};function a(u){if(t.pools[0].messageLength>=32)return s(),u();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(d,h){if(d)return u(d);t.collect(h),s(),u()})}function o(){if(t.pools[0].messageLength>=32)return s();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),s()}function s(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var c=1,d=0;d<32;++d)t.reseeds%c===0&&(u.update(t.pools[d].digest().getBytes()),t.pools[d].start()),c=c<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var h=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(h),t.generated=0}function l(u){var c=null,d=Yr.util.globalScope,h=d.crypto||d.msCrypto;h&&h.getRandomValues&&(c=function(E){return h.getRandomValues(E)});var f=Yr.util.createBuffer();if(c)for(;f.length()<u;){var g=Math.max(1,Math.min(u-f.length(),65536)/4),p=new Uint32Array(Math.floor(g));try{c(p);for(var m=0;m<p.length;++m)f.putInt32(p[m])}catch(E){if(!(typeof QuotaExceededError<"u"&&E instanceof QuotaExceededError))throw E}}if(f.length()<u)for(var b,v,x,C=Math.floor(Math.random()*65536);f.length()<u;){v=16807*(C&65535),b=16807*(C>>16),v+=(b&32767)<<16,v+=b>>15,v=(v&2147483647)+(v>>31),C=v&4294967295;for(var m=0;m<3;++m)x=C>>>(m<<3),x^=Math.floor(Math.random()*256),f.putByte(x&255)}return f.getBytes(u)}return Dc?(t.seedFile=function(u,c){Dc.randomBytes(u,function(d,h){if(d)return c(d);c(null,h.toString())})},t.seedFileSync=function(u){return Dc.randomBytes(u).toString()}):(t.seedFile=function(u,c){try{c(null,l(u))}catch(d){c(d)}},t.seedFileSync=l),t.collect=function(u){for(var c=u.length,d=0;d<c;++d)t.pools[t.pool].update(u.substr(d,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,c){for(var d="",h=0;h<c;h+=8)d+=String.fromCharCode(u>>h&255);t.collect(d)},t.registerWorker=function(u){if(u===self)t.seedFile=function(d,h){function f(g){var p=g.data;p.forge&&p.forge.prng&&(self.removeEventListener("message",f),h(p.forge.prng.err,p.forge.prng.bytes))}self.addEventListener("message",f),self.postMessage({forge:{prng:{needed:d}}})};else{var c=function(d){var h=d.data;h.forge&&h.forge.prng&&t.seedFile(h.forge.prng.needed,function(f,g){u.postMessage({forge:{prng:{err:f,bytes:g}}})})};u.addEventListener("message",c)}},t};var Qt=ze;(function(){if(Qt.random&&Qt.random.getBytes){Qt.random;return}(function(e){var t={},n=new Array(4),r=Qt.util.createBuffer();t.formatKey=function(d){var h=Qt.util.createBuffer(d);return d=new Array(4),d[0]=h.getInt32(),d[1]=h.getInt32(),d[2]=h.getInt32(),d[3]=h.getInt32(),Qt.aes._expandKey(d,!1)},t.formatSeed=function(d){var h=Qt.util.createBuffer(d);return d=new Array(4),d[0]=h.getInt32(),d[1]=h.getInt32(),d[2]=h.getInt32(),d[3]=h.getInt32(),d},t.cipher=function(d,h){return Qt.aes._updateBlock(d,h,n,!1),r.putInt32(n[0]),r.putInt32(n[1]),r.putInt32(n[2]),r.putInt32(n[3]),r.getBytes()},t.increment=function(d){return++d[3],d},t.md=Qt.md.sha256;function i(){var d=Qt.prng.create(t);return d.getBytes=function(h,f){return d.generate(h,f)},d.getBytesSync=function(h){return d.generate(h)},d}var a=i(),o=null,s=Qt.util.globalScope,l=s.crypto||s.msCrypto;if(l&&l.getRandomValues&&(o=function(d){return l.getRandomValues(d)}),Qt.options.usePureJavaScript||!Qt.util.isNodejs&&!o){if(a.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var c in navigator)try{typeof navigator[c]=="string"&&(u+=navigator[c])}catch{}a.collect(u),u=null}e&&(e().mousemove(function(d){a.collectInt(d.clientX,16),a.collectInt(d.clientY,16)}),e().keypress(function(d){a.collectInt(d.charCode,8)}))}if(!Qt.random)Qt.random=a;else for(var c in a)Qt.random[c]=a[c];Qt.random.createInstance=i,Qt.random})(typeof jQuery<"u"?jQuery:null)})();var Vn=ze,Zf=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],C1=[1,2,3,5],P6=function(e,t){return e<<t&65535|(e&65535)>>16-t},F6=function(e,t){return(e&65535)>>t|e<<16-t&65535};Vn.rc2=Vn.rc2||{};Vn.rc2.expandKey=function(e,t){typeof e=="string"&&(e=Vn.util.createBuffer(e)),t=t||128;var n=e,r=e.length(),i=t,a=Math.ceil(i/8),o=255>>(i&7),s;for(s=r;s<128;s++)n.putByte(Zf[n.at(s-1)+n.at(s-r)&255]);for(n.setAt(128-a,Zf[n.at(128-a)&o]),s=127-a;s>=0;s--)n.setAt(s,Zf[n.at(s+1)^n.at(s+a)]);return n};var mC=function(e,t,n){var r=!1,i=null,a=null,o=null,s,l,u,c,d=[];for(e=Vn.rc2.expandKey(e,t),u=0;u<64;u++)d.push(e.getInt16Le());n?(s=function(g){for(u=0;u<4;u++)g[u]+=d[c]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),g[u]=P6(g[u],C1[u]),c++},l=function(g){for(u=0;u<4;u++)g[u]+=d[g[(u+3)%4]&63]}):(s=function(g){for(u=3;u>=0;u--)g[u]=F6(g[u],C1[u]),g[u]-=d[c]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),c--},l=function(g){for(u=3;u>=0;u--)g[u]-=d[g[(u+3)%4]&63]});var h=function(g){var p=[];for(u=0;u<4;u++){var m=i.getInt16Le();o!==null&&(n?m^=o.getInt16Le():o.putInt16Le(m)),p.push(m&65535)}c=n?0:63;for(var b=0;b<g.length;b++)for(var v=0;v<g[b][0];v++)g[b][1](p);for(u=0;u<4;u++)o!==null&&(n?o.putInt16Le(p[u]):p[u]^=o.getInt16Le()),a.putInt16Le(p[u])},f=null;return f={start:function(g,p){g&&typeof g=="string"&&(g=Vn.util.createBuffer(g)),r=!1,i=Vn.util.createBuffer(),a=p||new Vn.util.createBuffer,o=g,f.output=a},update:function(g){for(r||i.putBuffer(g);i.length()>=8;)h([[5,s],[1,l],[6,s],[1,l],[5,s]])},finish:function(g){var p=!0;if(n)if(g)p=g(8,i,!n);else{var m=i.length()===8?8:8-i.length();i.fillWithByte(m,m)}if(p&&(r=!0,f.update()),!n&&(p=i.length()===0,p))if(g)p=g(8,a,!n);else{var b=a.length(),v=a.at(b-1);v>b?p=!1:a.truncate(v)}return p}},f};Vn.rc2.startEncrypting=function(e,t,n){var r=Vn.rc2.createEncryptionCipher(e,128);return r.start(t,n),r};Vn.rc2.createEncryptionCipher=function(e,t){return mC(e,t,!0)};Vn.rc2.startDecrypting=function(e,t,n){var r=Vn.rc2.createDecryptionCipher(e,128);return r.start(t,n),r};Vn.rc2.createDecryptionCipher=function(e,t){return mC(e,t,!1)};var D0=ze;D0.jsbn=D0.jsbn||{};var $i;function oe(e,t,n){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,n):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}D0.jsbn.BigInteger=oe;function it(){return new oe(null)}function N6(e,t,n,r,i,a){for(;--a>=0;){var o=t*this.data[e++]+n.data[r]+i;i=Math.floor(o/67108864),n.data[r++]=o&67108863}return i}function M6(e,t,n,r,i,a){for(var o=t&32767,s=t>>15;--a>=0;){var l=this.data[e]&32767,u=this.data[e++]>>15,c=s*l+u*o;l=o*l+((c&32767)<<15)+n.data[r]+(i&1073741823),i=(l>>>30)+(c>>>15)+s*u+(i>>>30),n.data[r++]=l&1073741823}return i}function E1(e,t,n,r,i,a){for(var o=t&16383,s=t>>14;--a>=0;){var l=this.data[e]&16383,u=this.data[e++]>>14,c=s*l+u*o;l=o*l+((c&16383)<<14)+n.data[r]+i,i=(l>>28)+(c>>14)+s*u,n.data[r++]=l&268435455}return i}typeof navigator>"u"?(oe.prototype.am=E1,$i=28):navigator.appName=="Microsoft Internet Explorer"?(oe.prototype.am=M6,$i=30):navigator.appName!="Netscape"?(oe.prototype.am=N6,$i=26):(oe.prototype.am=E1,$i=28);oe.prototype.DB=$i;oe.prototype.DM=(1<<$i)-1;oe.prototype.DV=1<<$i;var rp=52;oe.prototype.FV=Math.pow(2,rp);oe.prototype.F1=rp-$i;oe.prototype.F2=2*$i-rp;var L6="0123456789abcdefghijklmnopqrstuvwxyz",af=new Array,Ds,mr;Ds=48;for(mr=0;mr<=9;++mr)af[Ds++]=mr;Ds=97;for(mr=10;mr<36;++mr)af[Ds++]=mr;Ds=65;for(mr=10;mr<36;++mr)af[Ds++]=mr;function S1(e){return L6.charAt(e)}function bC(e,t){var n=af[e.charCodeAt(t)];return n??-1}function O6(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function V6(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function oa(e){var t=it();return t.fromInt(e),t}function H6(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,i=!1,a=0;--r>=0;){var o=n==8?e[r]&255:bC(e,r);if(o<0){e.charAt(r)=="-"&&(i=!0);continue}i=!1,a==0?this.data[this.t++]=o:a+n>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-a)-1)<<a,this.data[this.t++]=o>>this.DB-a):this.data[this.t-1]|=o<<a,a+=n,a>=this.DB&&(a-=this.DB)}n==8&&e[0]&128&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&oe.ZERO.subTo(this,this)}function j6(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function W6(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var n=(1<<t)-1,r,i=!1,a="",o=this.t,s=this.DB-o*this.DB%t;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=S1(r));o>=0;)s<t?(r=(this.data[o]&(1<<s)-1)<<t-s,r|=this.data[--o]>>(s+=this.DB-t)):(r=this.data[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=S1(r));return i?a:"0"}function z6(){var e=it();return oe.ZERO.subTo(this,e),e}function G6(){return this.s<0?this.negate():this}function U6(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this.data[n]-e.data[n])!=0)return t;return 0}function of(e){var t=1,n;return(n=e>>>16)!=0&&(e=n,t+=16),(n=e>>8)!=0&&(e=n,t+=8),(n=e>>4)!=0&&(e=n,t+=4),(n=e>>2)!=0&&(e=n,t+=2),(n=e>>1)!=0&&(e=n,t+=1),t}function X6(){return this.t<=0?0:this.DB*(this.t-1)+of(this.data[this.t-1]^this.s&this.DM)}function Z6(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s}function Y6(e,t){for(var n=e;n<this.t;++n)t.data[n-e]=this.data[n];t.t=Math.max(this.t-e,0),t.s=this.s}function K6(e,t){var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(e/this.DB),o=this.s<<n&this.DM,s;for(s=this.t-1;s>=0;--s)t.data[s+a+1]=this.data[s]>>r|o,o=(this.data[s]&i)<<n;for(s=a-1;s>=0;--s)t.data[s]=0;t.data[a]=o,t.t=this.t+a+1,t.s=this.s,t.clamp()}function q6(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB,i=this.DB-r,a=(1<<r)-1;t.data[0]=this.data[n]>>r;for(var o=n+1;o<this.t;++o)t.data[o-n-1]|=(this.data[o]&a)<<i,t.data[o-n]=this.data[o]>>r;r>0&&(t.data[this.t-n-1]|=(this.s&a)<<i),t.t=this.t-n,t.clamp()}function J6(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]-e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()}function Q6(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t.data[i]=0;for(i=0;i<r.t;++i)t.data[i+n.t]=n.am(0,r.data[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&oe.ZERO.subTo(t,t)}function eA(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e.data[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t.data[n],e,2*n,0,1);(e.data[n+t.t]+=t.am(n+1,2*t.data[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()}function tA(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t){t!=null&&t.fromInt(0),n!=null&&this.copyTo(n);return}n==null&&(n=it());var a=it(),o=this.s,s=e.s,l=this.DB-of(r.data[r.t-1]);l>0?(r.lShiftTo(l,a),i.lShiftTo(l,n)):(r.copyTo(a),i.copyTo(n));var u=a.t,c=a.data[u-1];if(c!=0){var d=c*(1<<this.F1)+(u>1?a.data[u-2]>>this.F2:0),h=this.FV/d,f=(1<<this.F1)/d,g=1<<this.F2,p=n.t,m=p-u,b=t??it();for(a.dlShiftTo(m,b),n.compareTo(b)>=0&&(n.data[n.t++]=1,n.subTo(b,n)),oe.ONE.dlShiftTo(u,b),b.subTo(a,a);a.t<u;)a.data[a.t++]=0;for(;--m>=0;){var v=n.data[--p]==c?this.DM:Math.floor(n.data[p]*h+(n.data[p-1]+g)*f);if((n.data[p]+=a.am(0,v,n,m,0,u))<v)for(a.dlShiftTo(m,b),n.subTo(b,n);n.data[p]<--v;)n.subTo(b,n)}t!=null&&(n.drShiftTo(u,t),o!=s&&oe.ZERO.subTo(t,t)),n.t=u,n.clamp(),l>0&&n.rShiftTo(l,n),o<0&&oe.ZERO.subTo(n,n)}}}function nA(e){var t=it();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(oe.ZERO)>0&&e.subTo(t,t),t}function Eo(e){this.m=e}function rA(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function iA(e){return e}function aA(e){e.divRemTo(this.m,null,e)}function oA(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function sA(e,t){e.squareTo(t),this.reduce(t)}Eo.prototype.convert=rA;Eo.prototype.revert=iA;Eo.prototype.reduce=aA;Eo.prototype.mulTo=oA;Eo.prototype.sqrTo=sA;function lA(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function So(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function uA(e){var t=it();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(oe.ZERO)>0&&this.m.subTo(t,t),t}function cA(e){var t=it();return e.copyTo(t),this.reduce(t),t}function dA(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=e.data[t]&32767,r=n*this.mpl+((n*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);e.data[n]>=e.DV;)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function fA(e,t){e.squareTo(t),this.reduce(t)}function hA(e,t,n){e.multiplyTo(t,n),this.reduce(n)}So.prototype.convert=uA;So.prototype.revert=cA;So.prototype.reduce=dA;So.prototype.mulTo=hA;So.prototype.sqrTo=fA;function gA(){return(this.t>0?this.data[0]&1:this.s)==0}function pA(e,t){if(e>4294967295||e<1)return oe.ONE;var n=it(),r=it(),i=t.convert(this),a=of(e)-1;for(i.copyTo(n);--a>=0;)if(t.sqrTo(n,r),(e&1<<a)>0)t.mulTo(r,i,n);else{var o=n;n=r,r=o}return t.revert(n)}function mA(e,t){var n;return e<256||t.isEven()?n=new Eo(t):n=new So(t),this.exp(e,n)}oe.prototype.copyTo=O6;oe.prototype.fromInt=V6;oe.prototype.fromString=H6;oe.prototype.clamp=j6;oe.prototype.dlShiftTo=Z6;oe.prototype.drShiftTo=Y6;oe.prototype.lShiftTo=K6;oe.prototype.rShiftTo=q6;oe.prototype.subTo=J6;oe.prototype.multiplyTo=Q6;oe.prototype.squareTo=eA;oe.prototype.divRemTo=tA;oe.prototype.invDigit=lA;oe.prototype.isEven=gA;oe.prototype.exp=pA;oe.prototype.toString=W6;oe.prototype.negate=z6;oe.prototype.abs=G6;oe.prototype.compareTo=U6;oe.prototype.bitLength=X6;oe.prototype.mod=nA;oe.prototype.modPowInt=mA;oe.ZERO=oa(0);oe.ONE=oa(1);function bA(){var e=it();return this.copyTo(e),e}function vA(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function yA(){return this.t==0?this.s:this.data[0]<<24>>24}function xA(){return this.t==0?this.s:this.data[0]<<16>>16}function CA(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function EA(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function SA(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=oa(n),i=it(),a=it(),o="";for(this.divRemTo(r,i,a);i.signum()>0;)o=(n+a.intValue()).toString(e).substr(1)+o,i.divRemTo(r,i,a);return a.intValue().toString(e)+o}function wA(e,t){this.fromInt(0),t==null&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,a=0,o=0,s=0;s<e.length;++s){var l=bC(e,s);if(l<0){e.charAt(s)=="-"&&this.signum()==0&&(i=!0);continue}o=t*o+l,++a>=n&&(this.dMultiply(r),this.dAddOffset(o,0),a=0,o=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(o,0)),i&&oe.ZERO.subTo(this,this)}function IA(e,t,n){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(oe.ONE.shiftLeft(e-1),ip,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(oe.ONE.shiftLeft(e-1),this);else{var r=new Array,i=e&7;r.length=(e>>3)+1,t.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}}function _A(){var e=this.t,t=new Array;t[0]=this.s;var n=this.DB-e*this.DB%8,r,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),r&128&&(r|=-256),i==0&&(this.s&128)!=(r&128)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t}function DA(e){return this.compareTo(e)==0}function AA(e){return this.compareTo(e)<0?this:e}function TA(e){return this.compareTo(e)>0?this:e}function RA(e,t,n){var r,i,a=Math.min(e.t,this.t);for(r=0;r<a;++r)n.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(i=e.s&this.DM,r=a;r<this.t;++r)n.data[r]=t(this.data[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<e.t;++r)n.data[r]=t(i,e.data[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function BA(e,t){return e&t}function $A(e){var t=it();return this.bitwiseTo(e,BA,t),t}function ip(e,t){return e|t}function kA(e){var t=it();return this.bitwiseTo(e,ip,t),t}function vC(e,t){return e^t}function PA(e){var t=it();return this.bitwiseTo(e,vC,t),t}function yC(e,t){return e&~t}function FA(e){var t=it();return this.bitwiseTo(e,yC,t),t}function NA(){for(var e=it(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function MA(e){var t=it();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function LA(e){var t=it();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function OA(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function VA(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+OA(this.data[e]);return this.s<0?this.t*this.DB:-1}function HA(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function jA(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=HA(this.data[n]^t);return e}function WA(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function zA(e,t){var n=oe.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function GA(e){return this.changeBit(e,ip)}function UA(e){return this.changeBit(e,yC)}function XA(e){return this.changeBit(e,vC)}function ZA(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]+e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()}function YA(e){var t=it();return this.addTo(e,t),t}function KA(e){var t=it();return this.subTo(e,t),t}function qA(e){var t=it();return this.multiplyTo(e,t),t}function JA(e){var t=it();return this.divRemTo(e,t,null),t}function QA(e){var t=it();return this.divRemTo(e,null,t),t}function eT(e){var t=it(),n=it();return this.divRemTo(e,t,n),new Array(t,n)}function tT(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function nT(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function fu(){}function xC(e){return e}function rT(e,t,n){e.multiplyTo(t,n)}function iT(e,t){e.squareTo(t)}fu.prototype.convert=xC;fu.prototype.revert=xC;fu.prototype.mulTo=rT;fu.prototype.sqrTo=iT;function aT(e){return this.exp(e,new fu)}function oT(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n.data[--r]=0;var i;for(i=n.t-this.t;r<i;++r)n.data[r+this.t]=this.am(0,e.data[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e.data[r],n,r,0,t-r);n.clamp()}function sT(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n.data[this.t+r-t]=this.am(t-r,e.data[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)}function As(e){this.r2=it(),this.q3=it(),oe.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function lT(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=it();return e.copyTo(t),this.reduce(t),t}function uT(e){return e}function cT(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function dT(e,t){e.squareTo(t),this.reduce(t)}function fT(e,t,n){e.multiplyTo(t,n),this.reduce(n)}As.prototype.convert=lT;As.prototype.revert=uT;As.prototype.reduce=cT;As.prototype.mulTo=fT;As.prototype.sqrTo=dT;function hT(e,t){var n=e.bitLength(),r,i=oa(1),a;if(n<=0)return i;n<18?r=1:n<48?r=3:n<144?r=4:n<768?r=5:r=6,n<8?a=new Eo(t):t.isEven()?a=new As(t):a=new So(t);var o=new Array,s=3,l=r-1,u=(1<<r)-1;if(o[1]=a.convert(this),r>1){var c=it();for(a.sqrTo(o[1],c);s<=u;)o[s]=it(),a.mulTo(c,o[s-2],o[s]),s+=2}var d=e.t-1,h,f=!0,g=it(),p;for(n=of(e.data[d])-1;d>=0;){for(n>=l?h=e.data[d]>>n-l&u:(h=(e.data[d]&(1<<n+1)-1)<<l-n,d>0&&(h|=e.data[d-1]>>this.DB+n-l)),s=r;!(h&1);)h>>=1,--s;if((n-=s)<0&&(n+=this.DB,--d),f)o[h].copyTo(i),f=!1;else{for(;s>1;)a.sqrTo(i,g),a.sqrTo(g,i),s-=2;s>0?a.sqrTo(i,g):(p=i,i=g,g=p),a.mulTo(g,o[h],i)}for(;d>=0&&!(e.data[d]&1<<n);)a.sqrTo(i,g),p=i,i=g,g=p,--n<0&&(n=this.DB-1,--d)}return a.revert(i)}function gT(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n}function pT(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(t==0)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n}function mT(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return oe.ZERO;for(var n=e.clone(),r=this.clone(),i=oa(1),a=oa(0),o=oa(0),s=oa(1);n.signum()!=0;){for(;n.isEven();)n.rShiftTo(1,n),t?((!i.isEven()||!a.isEven())&&(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);n.compareTo(r)>=0?(n.subTo(r,n),t&&i.subTo(o,i),a.subTo(s,a)):(r.subTo(n,r),t&&o.subTo(i,o),s.subTo(a,s))}if(r.compareTo(oe.ONE)!=0)return oe.ZERO;if(s.compareTo(e)>=0)return s.subtract(e);if(s.signum()<0)s.addTo(e,s);else return s;return s.signum()<0?s.add(e):s}var Dr=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],bT=(1<<26)/Dr[Dr.length-1];function vT(e){var t,n=this.abs();if(n.t==1&&n.data[0]<=Dr[Dr.length-1]){for(t=0;t<Dr.length;++t)if(n.data[0]==Dr[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<Dr.length;){for(var r=Dr[t],i=t+1;i<Dr.length&&r<bT;)r*=Dr[i++];for(r=n.modInt(r);t<i;)if(r%Dr[t++]==0)return!1}return n.millerRabin(e)}function yT(e){var t=this.subtract(oe.ONE),n=t.getLowestSetBit();if(n<=0)return!1;for(var r=t.shiftRight(n),i=xT(),a,o=0;o<e;++o){do a=new oe(this.bitLength(),i);while(a.compareTo(oe.ONE)<=0||a.compareTo(t)>=0);var s=a.modPow(r,this);if(s.compareTo(oe.ONE)!=0&&s.compareTo(t)!=0){for(var l=1;l++<n&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(oe.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0}function xT(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}oe.prototype.chunkSize=CA;oe.prototype.toRadix=SA;oe.prototype.fromRadix=wA;oe.prototype.fromNumber=IA;oe.prototype.bitwiseTo=RA;oe.prototype.changeBit=zA;oe.prototype.addTo=ZA;oe.prototype.dMultiply=tT;oe.prototype.dAddOffset=nT;oe.prototype.multiplyLowerTo=oT;oe.prototype.multiplyUpperTo=sT;oe.prototype.modInt=pT;oe.prototype.millerRabin=yT;oe.prototype.clone=bA;oe.prototype.intValue=vA;oe.prototype.byteValue=yA;oe.prototype.shortValue=xA;oe.prototype.signum=EA;oe.prototype.toByteArray=_A;oe.prototype.equals=DA;oe.prototype.min=AA;oe.prototype.max=TA;oe.prototype.and=$A;oe.prototype.or=kA;oe.prototype.xor=PA;oe.prototype.andNot=FA;oe.prototype.not=NA;oe.prototype.shiftLeft=MA;oe.prototype.shiftRight=LA;oe.prototype.getLowestSetBit=VA;oe.prototype.bitCount=jA;oe.prototype.testBit=WA;oe.prototype.setBit=GA;oe.prototype.clearBit=UA;oe.prototype.flipBit=XA;oe.prototype.add=YA;oe.prototype.subtract=KA;oe.prototype.multiply=qA;oe.prototype.divide=JA;oe.prototype.remainder=QA;oe.prototype.divideAndRemainder=eT;oe.prototype.modPow=hT;oe.prototype.modInverse=mT;oe.prototype.pow=aT;oe.prototype.gcd=gT;oe.prototype.isProbablePrime=vT;var ti=ze,CC=ti.sha1=ti.sha1||{};ti.md.sha1=ti.md.algorithms.sha1=CC;CC.create=function(){EC||CT();var e=null,t=ti.util.createBuffer(),n=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var i=r.messageLengthSize/4,a=0;a<i;++a)r.fullMessageLength.push(0);return t=ti.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},r},r.start(),r.update=function(i,a){a==="utf8"&&(i=ti.util.encodeUtf8(i));var o=i.length;r.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=r.fullMessageLength.length-1;s>=0;--s)r.fullMessageLength[s]+=o[1],o[1]=o[0]+(r.fullMessageLength[s]/4294967296>>>0),r.fullMessageLength[s]=r.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),w1(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var i=ti.util.createBuffer();i.putBytes(t.bytes());var a=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=a&r.blockLength-1;i.putBytes(A0.substr(0,r.blockLength-o));for(var s,l,u=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)s=r.fullMessageLength[c+1]*8,l=s/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=s>>>0;i.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};w1(d,n,i);var h=ti.util.createBuffer();return h.putInt32(d.h0),h.putInt32(d.h1),h.putInt32(d.h2),h.putInt32(d.h3),h.putInt32(d.h4),h},r};var A0=null,EC=!1;function CT(){A0="",A0+=ti.util.fillString("\0",64),EC=!0}function w1(e,t,n){for(var r,i,a,o,s,l,u,c,d=n.length();d>=64;){for(i=e.h0,a=e.h1,o=e.h2,s=e.h3,l=e.h4,c=0;c<16;++c)r=n.getInt32(),t[c]=r,u=s^a&(o^s),r=(i<<5|i>>>27)+u+l+1518500249+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<20;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,u=s^a&(o^s),r=(i<<5|i>>>27)+u+l+1518500249+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<32;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+1859775393+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<40;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+1859775393+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<60;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a&o|s&(a^o),r=(i<<5|i>>>27)+u+l+2400959708+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;for(;c<80;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,u=a^o^s,r=(i<<5|i>>>27)+u+l+3395469782+r,l=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+o|0,e.h3=e.h3+s|0,e.h4=e.h4+l|0,d-=64}}var ni=ze,SC=ni.pkcs1=ni.pkcs1||{};SC.encode_rsa_oaep=function(e,t,n){var r,i,a,o;typeof n=="string"?(r=n,i=arguments[3]||void 0,a=arguments[4]||void 0):n&&(r=n.label||void 0,i=n.seed||void 0,a=n.md||void 0,n.mgf1&&n.mgf1.md&&(o=n.mgf1.md)),a?a.start():a=ni.md.sha1.create(),o||(o=a);var s=Math.ceil(e.n.bitLength()/8),l=s-2*a.digestLength-2;if(t.length>l){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=l,u}r||(r=""),a.update(r,"raw");for(var c=a.digest(),d="",h=l-t.length,f=0;f<h;f++)d+="\0";var g=c.getBytes()+d+""+t;if(!i)i=ni.random.getBytes(a.digestLength);else if(i.length!==a.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=i.length,u.digestLength=a.digestLength,u}var p=Jc(i,s-a.digestLength-1,o),m=ni.util.xorBytes(g,p,g.length),b=Jc(m,a.digestLength,o),v=ni.util.xorBytes(i,b,i.length);return"\0"+v+m};SC.decode_rsa_oaep=function(e,t,n){var r,i,a;typeof n=="string"?(r=n,i=arguments[3]||void 0):n&&(r=n.label||void 0,i=n.md||void 0,n.mgf1&&n.mgf1.md&&(a=n.mgf1.md));var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var m=new Error("RSAES-OAEP encoded message length is invalid.");throw m.length=t.length,m.expectedLength=o,m}if(i===void 0?i=ni.md.sha1.create():i.start(),a||(a=i),o<2*i.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");r||(r=""),i.update(r,"raw");for(var s=i.digest().getBytes(),l=t.charAt(0),u=t.substring(1,i.digestLength+1),c=t.substring(1+i.digestLength),d=Jc(c,i.digestLength,a),h=ni.util.xorBytes(u,d,u.length),f=Jc(h,o-i.digestLength-1,a),g=ni.util.xorBytes(c,f,c.length),p=g.substring(0,i.digestLength),m=l!=="\0",b=0;b<i.digestLength;++b)m|=s.charAt(b)!==p.charAt(b);for(var v=1,x=i.digestLength,C=i.digestLength;C<g.length;C++){var E=g.charCodeAt(C),w=E&1^1,B=v?65534:0;m|=E&B,v=v&w,x+=v}if(m||g.charCodeAt(x)!==1)throw new Error("Invalid RSAES-OAEP padding.");return g.substring(x+1)};function Jc(e,t,n){n||(n=ni.md.sha1.create());for(var r="",i=Math.ceil(t/n.digestLength),a=0;a<i;++a){var o=String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255);n.start(),n.update(e+o),r+=n.digest().getBytes()}return r.substring(0,t)}var Xi=ze;(function(){if(Xi.prime){Xi.prime;return}var e=Xi.prime=Xi.prime||{},t=Xi.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var i=function(d,h){return d|h};e.generateProbablePrime=function(d,h,f){typeof h=="function"&&(f=h,h={}),h=h||{};var g=h.algorithm||"PRIMEINC";typeof g=="string"&&(g={name:g}),g.options=g.options||{};var p=h.prng||Xi.random,m={nextBytes:function(b){for(var v=p.getBytesSync(b.length),x=0;x<b.length;++x)b[x]=v.charCodeAt(x)}};if(g.name==="PRIMEINC")return a(d,m,g.options,f);throw new Error("Invalid prime generation algorithm: "+g.name)};function a(d,h,f,g){return"workers"in f?l(d,h,f,g):o(d,h,f,g)}function o(d,h,f,g){var p=u(d,h),m=0,b=c(p.bitLength());"millerRabinTests"in f&&(b=f.millerRabinTests);var v=10;"maxBlockTime"in f&&(v=f.maxBlockTime),s(p,d,h,m,b,v,g)}function s(d,h,f,g,p,m,b){var v=+new Date;do{if(d.bitLength()>h&&(d=u(h,f)),d.isProbablePrime(p))return b(null,d);d.dAddOffset(n[g++%8],0)}while(m<0||+new Date-v<m);Xi.util.setImmediate(function(){s(d,h,f,g,p,m,b)})}function l(d,h,f,g){if(typeof Worker>"u")return o(d,h,f,g);var p=u(d,h),m=f.workers,b=f.workLoad||100,v=b*30/8,x=f.workerScript||"forge/prime.worker.js";if(m===-1)return Xi.util.estimateCores(function(E,w){E&&(w=2),m=w-1,C()});C();function C(){m=Math.max(1,m);for(var E=[],w=0;w<m;++w)E[w]=new Worker(x);for(var w=0;w<m;++w)E[w].addEventListener("message",y);var B=!1;function y(S){if(!B){var D=S.data;if(D.found){for(var A=0;A<E.length;++A)E[A].terminate();return B=!0,g(null,new t(D.prime,16))}p.bitLength()>d&&(p=u(d,h));var T=p.toString(16);S.target.postMessage({hex:T,workLoad:b}),p.dAddOffset(v,0)}}}}function u(d,h){var f=new t(d,h),g=d-1;return f.testBit(g)||f.bitwiseTo(t.ONE.shiftLeft(g),i,f),f.dAddOffset(31-f.mod(r).byteValue(),0),f}function c(d){return d<=100?27:d<=150?18:d<=200?15:d<=250?12:d<=300?9:d<=350?8:d<=400?7:d<=500?6:d<=600?5:d<=800?4:d<=1250?3:2}})();var De=ze;if(typeof rt>"u")var rt=De.jsbn.BigInteger;var T0=De.util.isNodejs?np:null,q=De.asn1,br=De.util;De.pki=De.pki||{};De.pki.rsa=De.rsa=De.rsa||{};var Ve=De.pki,ET=[6,4,2,4,2,4,6,2],ST={name:"PrivateKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},wT={name:"RSAPrivateKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},IT={name:"RSAPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:q.Class.UNIVERSAL,type:q.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},_T=De.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},DT={name:"DigestInfo",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:q.Class.UNIVERSAL,type:q.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:q.Class.UNIVERSAL,type:q.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:q.Class.UNIVERSAL,type:q.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:q.Class.UNIVERSAL,type:q.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},AT=function(e){var t;if(e.algorithm in Ve.oids)t=Ve.oids[e.algorithm];else{var n=new Error("Unknown message digest algorithm.");throw n.algorithm=e.algorithm,n}var r=q.oidToDer(t).getBytes(),i=q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[]),a=q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[]);a.value.push(q.create(q.Class.UNIVERSAL,q.Type.OID,!1,r)),a.value.push(q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,""));var o=q.create(q.Class.UNIVERSAL,q.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(o),q.toDer(i).getBytes()},wC=function(e,t,n){if(n)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(rt.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(rt.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new rt(De.util.bytesToHex(De.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(rt.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var i=e.mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);i.compareTo(a)<0;)i=i.add(t.p);var o=i.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return o=o.multiply(r.modInverse(t.n)).mod(t.n),o};Ve.rsa.encrypt=function(e,t,n){var r=n,i,a=Math.ceil(t.n.bitLength()/8);n!==!1&&n!==!0?(r=n===2,i=IC(e,t,n)):(i=De.util.createBuffer(),i.putBytes(e));for(var o=new rt(i.toHex(),16),s=wC(o,t,r),l=s.toString(16),u=De.util.createBuffer(),c=a-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(De.util.hexToBytes(l)),u.getBytes()};Ve.rsa.decrypt=function(e,t,n,r){var i=Math.ceil(t.n.bitLength()/8);if(e.length!==i){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=i,a}var o=new rt(De.util.createBuffer(e).toHex(),16);if(o.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var s=wC(o,t,n),l=s.toString(16),u=De.util.createBuffer(),c=i-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(De.util.hexToBytes(l)),r!==!1?Qc(u.getBytes(),t,n):u.getBytes()};Ve.rsa.createKeyPairGenerationState=function(e,t,n){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,n=n||{};var r=n.prng||De.random,i={nextBytes:function(s){for(var l=r.getBytesSync(s.length),u=0;u<s.length;++u)s[u]=l.charCodeAt(u)}},a=n.algorithm||"PRIMEINC",o;if(a==="PRIMEINC")o={algorithm:a,state:0,bits:e,rng:i,eInt:t||65537,e:new rt(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},o.e.fromInt(o.eInt);else throw new Error("Invalid key generation algorithm: "+a);return o};Ve.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var n=new rt(null);n.fromInt(30);for(var r=0,i=function(d,h){return d|h},a=+new Date,o,s=0;e.keys===null&&(t<=0||s<t);){if(e.state===0){var l=e.p===null?e.pBits:e.qBits,u=l-1;e.pqState===0?(e.num=new rt(l,e.rng),e.num.testBit(u)||e.num.bitwiseTo(rt.ONE.shiftLeft(u),i,e.num),e.num.dAddOffset(31-e.num.mod(n).byteValue(),0),r=0,++e.pqState):e.pqState===1?e.num.bitLength()>l?e.pqState=0:e.num.isProbablePrime(RT(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(ET[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(rt.ONE),e.q1=e.q.subtract(rt.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(rt.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var c=e.e.modInverse(e.phi);e.keys={privateKey:Ve.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Ve.rsa.setPublicKey(e.n,e.e)}}o=+new Date,s+=o-a,a=o}return e.keys!==null};Ve.rsa.generateKeyPair=function(e,t,n,r){if(arguments.length===1?typeof e=="object"?(n=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(n=t,t=void 0):(n=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof n=="function"&&(r=n,n=void 0):(r=n,n=t,t=void 0)),n=n||{},e===void 0&&(e=n.bits||2048),t===void 0&&(t=n.e||65537),!De.options.usePureJavaScript&&!n.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(I1("generateKeyPair"))return T0.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(s,l,u){if(s)return r(s);r(null,{privateKey:Ve.privateKeyFromPem(u),publicKey:Ve.publicKeyFromPem(l)})});if(_1("generateKey")&&_1("exportKey"))return br.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A1(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(s){return br.globalScope.crypto.subtle.exportKey("pkcs8",s.privateKey)}).then(void 0,function(s){r(s)}).then(function(s){if(s){var l=Ve.privateKeyFromAsn1(q.fromDer(De.util.createBuffer(s)));r(null,{privateKey:l,publicKey:Ve.setRsaPublicKey(l.n,l.e)})}});if(D1("generateKey")&&D1("exportKey")){var i=br.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A1(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);i.oncomplete=function(s){var l=s.target.result,u=br.globalScope.msCrypto.subtle.exportKey("pkcs8",l.privateKey);u.oncomplete=function(c){var d=c.target.result,h=Ve.privateKeyFromAsn1(q.fromDer(De.util.createBuffer(d)));r(null,{privateKey:h,publicKey:Ve.setRsaPublicKey(h.n,h.e)})},u.onerror=function(c){r(c)}},i.onerror=function(s){r(s)};return}}else if(I1("generateKeyPairSync")){var a=T0.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Ve.privateKeyFromPem(a.privateKey),publicKey:Ve.publicKeyFromPem(a.publicKey)}}}var o=Ve.rsa.createKeyPairGenerationState(e,t,n);if(!r)return Ve.rsa.stepKeyPairGenerationState(o,0),o.keys;TT(o,n,r)};Ve.setRsaPublicKey=Ve.rsa.setPublicKey=function(e,t){var n={n:e,e:t};return n.encrypt=function(r,i,a){if(typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSAES-PKCS1-V1_5"),i==="RSAES-PKCS1-V1_5")i={encode:function(s,l,u){return IC(s,l,2).getBytes()}};else if(i==="RSA-OAEP"||i==="RSAES-OAEP")i={encode:function(s,l){return De.pkcs1.encode_rsa_oaep(l,s,a)}};else if(["RAW","NONE","NULL",null].indexOf(i)!==-1)i={encode:function(s){return s}};else if(typeof i=="string")throw new Error('Unsupported encryption scheme: "'+i+'".');var o=i.encode(r,n,!0);return Ve.rsa.encrypt(o,n,!0)},n.verify=function(r,i,a,o){typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSASSA-PKCS1-V1_5"),o===void 0&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),a==="RSASSA-PKCS1-V1_5"?a={verify:function(l,u){u=Qc(u,n,!0);var c=q.fromDer(u,{parseAllBytes:o._parseAllDigestBytes}),d={},h=[];if(!q.validate(c,DT,d,h)){var f=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw f.errors=h,f}var g=q.derToOid(d.algorithmIdentifier);if(!(g===De.oids.md2||g===De.oids.md5||g===De.oids.sha1||g===De.oids.sha224||g===De.oids.sha256||g===De.oids.sha384||g===De.oids.sha512||g===De.oids["sha512-224"]||g===De.oids["sha512-256"])){var f=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw f.oid=g,f}if((g===De.oids.md2||g===De.oids.md5)&&!("parameters"in d))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return l===d.digest}}:(a==="NONE"||a==="NULL"||a===null)&&(a={verify:function(l,u){return u=Qc(u,n,!0),l===u}});var s=Ve.rsa.decrypt(i,n,!0,!1);return a.verify(r,s,n.n.bitLength())},n};Ve.setRsaPrivateKey=Ve.rsa.setPrivateKey=function(e,t,n,r,i,a,o,s){var l={n:e,e:t,d:n,p:r,q:i,dP:a,dQ:o,qInv:s};return l.decrypt=function(u,c,d){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var h=Ve.rsa.decrypt(u,l,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:Qc};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(f,g){return De.pkcs1.decode_rsa_oaep(g,f,d)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(f){return f}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(h,l,!1)},l.sign=function(u,c){var d=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:AT},d=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return u}},d=1);var h=c.encode(u,l.n.bitLength());return Ve.rsa.encrypt(h,l,d)},l};Ve.wrapRsaPrivateKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,q.integerToDer(0).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.OID,!1,q.oidToDer(Ve.oids.rsaEncryption).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,"")]),q.create(q.Class.UNIVERSAL,q.Type.OCTETSTRING,!1,q.toDer(e).getBytes())])};Ve.privateKeyFromAsn1=function(e){var t={},n=[];if(q.validate(e,ST,t,n)&&(e=q.fromDer(De.util.createBuffer(t.privateKey))),t={},n=[],!q.validate(e,wT,t,n)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=n,r}var i,a,o,s,l,u,c,d;return i=De.util.createBuffer(t.privateKeyModulus).toHex(),a=De.util.createBuffer(t.privateKeyPublicExponent).toHex(),o=De.util.createBuffer(t.privateKeyPrivateExponent).toHex(),s=De.util.createBuffer(t.privateKeyPrime1).toHex(),l=De.util.createBuffer(t.privateKeyPrime2).toHex(),u=De.util.createBuffer(t.privateKeyExponent1).toHex(),c=De.util.createBuffer(t.privateKeyExponent2).toHex(),d=De.util.createBuffer(t.privateKeyCoefficient).toHex(),Ve.setRsaPrivateKey(new rt(i,16),new rt(a,16),new rt(o,16),new rt(s,16),new rt(l,16),new rt(u,16),new rt(c,16),new rt(d,16))};Ve.privateKeyToAsn1=Ve.privateKeyToRSAPrivateKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,q.integerToDer(0).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.n)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.e)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.d)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.p)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.q)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.dP)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.dQ)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.qInv))])};Ve.publicKeyFromAsn1=function(e){var t={},n=[];if(q.validate(e,_T,t,n)){var r=q.derToOid(t.publicKeyOid);if(r!==Ve.oids.rsaEncryption){var i=new Error("Cannot read public key. Unknown OID.");throw i.oid=r,i}e=t.rsaPublicKey}if(n=[],!q.validate(e,IT,t,n)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=n,i}var a=De.util.createBuffer(t.publicKeyModulus).toHex(),o=De.util.createBuffer(t.publicKeyExponent).toHex();return Ve.setRsaPublicKey(new rt(a,16),new rt(o,16))};Ve.publicKeyToAsn1=Ve.publicKeyToSubjectPublicKeyInfo=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.OID,!1,q.oidToDer(Ve.oids.rsaEncryption).getBytes()),q.create(q.Class.UNIVERSAL,q.Type.NULL,!1,"")]),q.create(q.Class.UNIVERSAL,q.Type.BITSTRING,!1,[Ve.publicKeyToRSAPublicKey(e)])])};Ve.publicKeyToRSAPublicKey=function(e){return q.create(q.Class.UNIVERSAL,q.Type.SEQUENCE,!0,[q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.n)),q.create(q.Class.UNIVERSAL,q.Type.INTEGER,!1,jr(e.e))])};function IC(e,t,n){var r=De.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=e.length,a.max=i-11,a}r.putByte(0),r.putByte(n);var o=i-3-e.length,s;if(n===0||n===1){s=n===0?0:255;for(var l=0;l<o;++l)r.putByte(s)}else for(;o>0;){for(var u=0,c=De.random.getBytes(o),l=0;l<o;++l)s=c.charCodeAt(l),s===0?++u:r.putByte(s);o=u}return r.putByte(0),r.putBytes(e),r}function Qc(e,t,n,r){var i=Math.ceil(t.n.bitLength()/8),a=De.util.createBuffer(e),o=a.getByte(),s=a.getByte();if(o!==0||n&&s!==0&&s!==1||!n&&s!=2||n&&s===0&&typeof r>"u")throw new Error("Encryption block is invalid.");var l=0;if(s===0){l=i-3-r;for(var u=0;u<l;++u)if(a.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(s===1)for(l=0;a.length()>1;){if(a.getByte()!==255){--a.read;break}++l}else if(s===2)for(l=0;a.length()>1;){if(a.getByte()===0){--a.read;break}++l}var c=a.getByte();if(c!==0||l!==i-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function TT(e,t,n){typeof t=="function"&&(n=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),i();function i(){a(e.pBits,function(s,l){if(s)return n(s);if(e.p=l,e.q!==null)return o(s,e.q);a(e.qBits,o)})}function a(s,l){De.prime.generateProbablePrime(s,r,l)}function o(s,l){if(s)return n(s);if(e.q=l,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)!==0){e.p=null,i();return}if(e.q.subtract(rt.ONE).gcd(e.e).compareTo(rt.ONE)!==0){e.q=null,a(e.qBits,o);return}if(e.p1=e.p.subtract(rt.ONE),e.q1=e.q.subtract(rt.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(rt.ONE)!==0){e.p=e.q=null,i();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,a(e.qBits,o);return}var c=e.e.modInverse(e.phi);e.keys={privateKey:Ve.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Ve.rsa.setPublicKey(e.n,e.e)},n(null,e.keys)}}function jr(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=De.util.hexToBytes(t);return n.length>1&&(n.charCodeAt(0)===0&&!(n.charCodeAt(1)&128)||n.charCodeAt(0)===255&&(n.charCodeAt(1)&128)===128)?n.substr(1):n}function RT(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function I1(e){return De.util.isNodejs&&typeof T0[e]=="function"}function _1(e){return typeof br.globalScope<"u"&&typeof br.globalScope.crypto=="object"&&typeof br.globalScope.crypto.subtle=="object"&&typeof br.globalScope.crypto.subtle[e]=="function"}function D1(e){return typeof br.globalScope<"u"&&typeof br.globalScope.msCrypto=="object"&&typeof br.globalScope.msCrypto.subtle=="object"&&typeof br.globalScope.msCrypto.subtle[e]=="function"}function A1(e){for(var t=De.util.hexToBytes(e.toString(16)),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}var me=ze;if(typeof BT>"u")var BT=me.jsbn.BigInteger;var ne=me.asn1,je=me.pki=me.pki||{};je.pbe=me.pbe=me.pbe||{};var ka=je.oids,$T={name:"EncryptedPrivateKeyInfo",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},kT={name:"PBES2Algorithms",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},PT={name:"pkcs-12PbeParams",tagClass:ne.Class.UNIVERSAL,type:ne.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:ne.Class.UNIVERSAL,type:ne.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:ne.Class.UNIVERSAL,type:ne.Type.INTEGER,constructed:!1,capture:"iterations"}]};je.encryptPrivateKeyInfo=function(e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||"aes128",n.prfAlgorithm=n.prfAlgorithm||"sha1";var r=me.random.getBytesSync(n.saltSize),i=n.count,a=ne.integerToDer(i),o,s,l;if(n.algorithm.indexOf("aes")===0||n.algorithm==="des"){var u,c,d;switch(n.algorithm){case"aes128":o=16,u=16,c=ka["aes128-CBC"],d=me.aes.createEncryptionCipher;break;case"aes192":o=24,u=16,c=ka["aes192-CBC"],d=me.aes.createEncryptionCipher;break;case"aes256":o=32,u=16,c=ka["aes256-CBC"],d=me.aes.createEncryptionCipher;break;case"des":o=8,u=8,c=ka.desCBC,d=me.des.createEncryptionCipher;break;default:var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=n.algorithm,h}var f="hmacWith"+n.prfAlgorithm.toUpperCase(),g=DC(f),p=me.pkcs5.pbkdf2(t,r,i,o,g),m=me.random.getBytesSync(u),b=d(p);b.start(m),b.update(ne.toDer(e)),b.finish(),l=b.output.getBytes();var v=FT(r,a,o,f);s=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka.pkcs5PBES2).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka.pkcs5PBKDF2).getBytes()),v]),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(c).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,m)])])])}else if(n.algorithm==="3des"){o=24;var x=new me.util.ByteBuffer(r),p=je.pbe.generatePkcs12Key(t,x,1,i,o),m=je.pbe.generatePkcs12Key(t,x,2,i,o),b=me.des.createEncryptionCipher(p);b.start(m),b.update(ne.toDer(e)),b.finish(),l=b.output.getBytes(),s=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(ka["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,r),ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,a.getBytes())])])}else{var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=n.algorithm,h}var C=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[s,ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,l)]);return C};je.decryptPrivateKeyInfo=function(e,t){var n=null,r={},i=[];if(!ne.validate(e,$T,r,i)){var a=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var o=ne.derToOid(r.encryptionOid),s=je.pbe.getCipher(o,r.encryptionParams,t),l=me.util.createBuffer(r.encryptedData);return s.update(l),s.finish()&&(n=ne.fromDer(s.output)),n};je.encryptedPrivateKeyToPem=function(e,t){var n={type:"ENCRYPTED PRIVATE KEY",body:ne.toDer(e).getBytes()};return me.pem.encode(n,{maxline:t})};je.encryptedPrivateKeyFromPem=function(e){var t=me.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var n=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return ne.fromDer(t.body)};je.encryptRsaPrivateKey=function(e,t,n){if(n=n||{},!n.legacy){var r=je.wrapRsaPrivateKey(je.privateKeyToAsn1(e));return r=je.encryptPrivateKeyInfo(r,t,n),je.encryptedPrivateKeyToPem(r)}var i,a,o,s;switch(n.algorithm){case"aes128":i="AES-128-CBC",o=16,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"aes192":i="AES-192-CBC",o=24,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"aes256":i="AES-256-CBC",o=32,a=me.random.getBytesSync(16),s=me.aes.createEncryptionCipher;break;case"3des":i="DES-EDE3-CBC",o=24,a=me.random.getBytesSync(8),s=me.des.createEncryptionCipher;break;case"des":i="DES-CBC",o=8,a=me.random.getBytesSync(8),s=me.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+n.algorithm+'".');throw l.algorithm=n.algorithm,l}var u=me.pbe.opensslDeriveBytes(t,a.substr(0,8),o),c=s(u);c.start(a),c.update(ne.toDer(je.privateKeyToAsn1(e))),c.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:i,parameters:me.util.bytesToHex(a).toUpperCase()},body:c.output.getBytes()};return me.pem.encode(d)};je.decryptRsaPrivateKey=function(e,t){var n=null,r=me.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw i.headerType=i,i}if(r.procType&&r.procType.type==="ENCRYPTED"){var a,o;switch(r.dekInfo.algorithm){case"DES-CBC":a=8,o=me.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,o=me.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,o=me.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,o=me.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,o=me.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,o=function(d){return me.rc2.createDecryptionCipher(d,40)};break;case"RC2-64-CBC":a=8,o=function(d){return me.rc2.createDecryptionCipher(d,64)};break;case"RC2-128-CBC":a=16,o=function(d){return me.rc2.createDecryptionCipher(d,128)};break;default:var i=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw i.algorithm=r.dekInfo.algorithm,i}var s=me.util.hexToBytes(r.dekInfo.parameters),l=me.pbe.opensslDeriveBytes(t,s.substr(0,8),a),u=o(l);if(u.start(s),u.update(me.util.createBuffer(r.body)),u.finish())n=u.output.getBytes();else return n}else n=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?n=je.decryptPrivateKeyInfo(ne.fromDer(n),t):n=ne.fromDer(n),n!==null&&(n=je.privateKeyFromAsn1(n)),n};je.pbe.generatePkcs12Key=function(e,t,n,r,i,a){var o,s;if(typeof a>"u"||a===null){if(!("sha1"in me.md))throw new Error('"sha1" hash algorithm unavailable.');a=me.md.sha1.create()}var l=a.digestLength,u=a.blockLength,c=new me.util.ByteBuffer,d=new me.util.ByteBuffer;if(e!=null){for(s=0;s<e.length;s++)d.putInt16(e.charCodeAt(s));d.putInt16(0)}var h=d.length(),f=t.length(),g=new me.util.ByteBuffer;g.fillWithByte(n,u);var p=u*Math.ceil(f/u),m=new me.util.ByteBuffer;for(s=0;s<p;s++)m.putByte(t.at(s%f));var b=u*Math.ceil(h/u),v=new me.util.ByteBuffer;for(s=0;s<b;s++)v.putByte(d.at(s%h));var x=m;x.putBuffer(v);for(var C=Math.ceil(i/l),E=1;E<=C;E++){var w=new me.util.ByteBuffer;w.putBytes(g.bytes()),w.putBytes(x.bytes());for(var B=0;B<r;B++)a.start(),a.update(w.getBytes()),w=a.digest();var y=new me.util.ByteBuffer;for(s=0;s<u;s++)y.putByte(w.at(s%l));var S=Math.ceil(f/u)+Math.ceil(h/u),D=new me.util.ByteBuffer;for(o=0;o<S;o++){var A=new me.util.ByteBuffer(x.getBytes(u)),T=511;for(s=y.length()-1;s>=0;s--)T=T>>8,T+=y.at(s)+A.at(s),A.setAt(s,T&255);D.putBuffer(A)}x=D,c.putBuffer(w)}return c.truncate(c.length()-i),c};je.pbe.getCipher=function(e,t,n){switch(e){case je.oids.pkcs5PBES2:return je.pbe.getCipherForPBES2(e,t,n);case je.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case je.oids["pbewithSHAAnd40BitRC2-CBC"]:return je.pbe.getCipherForPKCS12PBE(e,t,n);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}};je.pbe.getCipherForPBES2=function(e,t,n){var r={},i=[];if(!ne.validate(t,kT,r,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}if(e=ne.derToOid(r.kdfOid),e!==je.oids.pkcs5PBKDF2){var a=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw a.oid=e,a.supportedOids=["pkcs5PBKDF2"],a}if(e=ne.derToOid(r.encOid),e!==je.oids["aes128-CBC"]&&e!==je.oids["aes192-CBC"]&&e!==je.oids["aes256-CBC"]&&e!==je.oids["des-EDE3-CBC"]&&e!==je.oids.desCBC){var a=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw a.oid=e,a.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],a}var o=r.kdfSalt,s=me.util.createBuffer(r.kdfIterationCount);s=s.getInt(s.length()<<3);var l,u;switch(je.oids[e]){case"aes128-CBC":l=16,u=me.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,u=me.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,u=me.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,u=me.des.createDecryptionCipher;break;case"desCBC":l=8,u=me.des.createDecryptionCipher;break}var c=_C(r.prfOid),d=me.pkcs5.pbkdf2(n,o,s,l,c),h=r.encIv,f=u(d);return f.start(h),f};je.pbe.getCipherForPKCS12PBE=function(e,t,n){var r={},i=[];if(!ne.validate(t,PT,r,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var o=me.util.createBuffer(r.salt),s=me.util.createBuffer(r.iterations);s=s.getInt(s.length()<<3);var l,u,c;switch(e){case je.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,u=8,c=me.des.startDecrypting;break;case je.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,u=8,c=function(p,m){var b=me.rc2.createDecryptionCipher(p,40);return b.start(m,null),b};break;default:var a=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw a.oid=e,a}var d=_C(r.prfOid),h=je.pbe.generatePkcs12Key(n,o,1,s,l,d);d.start();var f=je.pbe.generatePkcs12Key(n,o,2,s,u,d);return c(h,f)};je.pbe.opensslDeriveBytes=function(e,t,n,r){if(typeof r>"u"||r===null){if(!("md5"in me.md))throw new Error('"md5" hash algorithm unavailable.');r=me.md.md5.create()}t===null&&(t="");for(var i=[T1(r,e+t)],a=16,o=1;a<n;++o,a+=16)i.push(T1(r,i[o-1]+e+t));return i.join("").substr(0,n)};function T1(e,t){return e.start().update(t).digest().getBytes()}function _C(e){var t;if(!e)t="hmacWithSHA1";else if(t=je.oids[ne.derToOid(e)],!t){var n=new Error("Unsupported PRF OID.");throw n.oid=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}return DC(t)}function DC(e){var t=me.md;switch(e){case"hmacWithSHA224":t=me.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var n=new Error("Unsupported PRF algorithm.");throw n.algorithm=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function FT(e,t,n,r){var i=ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OCTETSTRING,!1,e),ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,t.getBytes())]);return r!=="hmacWithSHA1"&&i.value.push(ne.create(ne.Class.UNIVERSAL,ne.Type.INTEGER,!1,me.util.hexToBytes(n.toString(16))),ne.create(ne.Class.UNIVERSAL,ne.Type.SEQUENCE,!0,[ne.create(ne.Class.UNIVERSAL,ne.Type.OID,!1,ne.oidToDer(je.oids[r]).getBytes()),ne.create(ne.Class.UNIVERSAL,ne.Type.NULL,!1,"")])),i}var cs=ze,pe=cs.asn1,Ts=cs.pkcs7asn1=cs.pkcs7asn1||{};cs.pkcs7=cs.pkcs7||{};cs.pkcs7.asn1=Ts;var AC={name:"ContentInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Ts.contentInfoValidator=AC;var TC={name:"EncryptedContentInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Ts.envelopedDataValidator={name:"EnvelopedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(TC)};Ts.encryptedDataValidator={name:"EncryptedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"}].concat(TC)};var NT={name:"SignerInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:pe.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Ts.signedDataValidator={name:"SignedData",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},AC,{name:"SignedData.Certificates",tagClass:pe.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:pe.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SET,capture:"signerInfos",optional:!0,value:[NT]}]};Ts.recipientInfoValidator={name:"RecipientInfo",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:pe.Class.UNIVERSAL,type:pe.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:pe.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:pe.Class.UNIVERSAL,type:pe.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var ao=ze;ao.mgf=ao.mgf||{};var MT=ao.mgf.mgf1=ao.mgf1=ao.mgf1||{};MT.create=function(e){var t={generate:function(n,r){for(var i=new ao.util.ByteBuffer,a=Math.ceil(r/e.digestLength),o=0;o<a;o++){var s=new ao.util.ByteBuffer;s.putInt32(o),e.start(),e.update(n+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}};return t};var ed=ze;ed.mgf=ed.mgf||{};ed.mgf.mgf1=ed.mgf1;var Ga=ze,LT=Ga.pss=Ga.pss||{};LT.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,n=e.mgf,r=t.digestLength,i=e.salt||null;typeof i=="string"&&(i=Ga.util.createBuffer(i));var a;if("saltLength"in e)a=e.saltLength;else if(i!==null)a=i.length();else throw new Error("Salt length not specified or specific salt not given.");if(i!==null&&i.length()!==a)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||Ga.random,s={};return s.encode=function(l,u){var c,d=u-1,h=Math.ceil(d/8),f=l.digest().getBytes();if(h<r+a+2)throw new Error("Message is too long to encrypt.");var g;i===null?g=o.getBytesSync(a):g=i.bytes();var p=new Ga.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(f),p.putBytes(g),t.start(),t.update(p.getBytes());var m=t.digest().getBytes(),b=new Ga.util.ByteBuffer;b.fillWithByte(0,h-a-r-2),b.putByte(1),b.putBytes(g);var v=b.getBytes(),x=h-r-1,C=n.generate(m,x),E="";for(c=0;c<x;c++)E+=String.fromCharCode(v.charCodeAt(c)^C.charCodeAt(c));var w=65280>>8*h-d&255;return E=String.fromCharCode(E.charCodeAt(0)&~w)+E.substr(1),E+m+"¼"},s.verify=function(l,u,c){var d,h=c-1,f=Math.ceil(h/8);if(u=u.substr(-f),f<r+a+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(f-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var g=f-r-1,p=u.substr(0,g),m=u.substr(g,r),b=65280>>8*f-h&255;if(p.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var v=n.generate(m,g),x="";for(d=0;d<g;d++)x+=String.fromCharCode(p.charCodeAt(d)^v.charCodeAt(d));x=String.fromCharCode(x.charCodeAt(0)&~b)+x.substr(1);var C=f-r-a-2;for(d=0;d<C;d++)if(x.charCodeAt(d)!==0)throw new Error("Leftmost octets not zero as expected");if(x.charCodeAt(C)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var E=x.substr(-a),w=new Ga.util.ByteBuffer;w.fillWithByte(0,8),w.putBytes(l),w.putBytes(E),t.start(),t.update(w.getBytes());var B=t.digest().getBytes();return m===B},s};var Ae=ze,N=Ae.asn1,de=Ae.pki=Ae.pki||{},nt=de.oids,Nt={};Nt.CN=nt.commonName;Nt.commonName="CN";Nt.C=nt.countryName;Nt.countryName="C";Nt.L=nt.localityName;Nt.localityName="L";Nt.ST=nt.stateOrProvinceName;Nt.stateOrProvinceName="ST";Nt.O=nt.organizationName;Nt.organizationName="O";Nt.OU=nt.organizationalUnitName;Nt.organizationalUnitName="OU";Nt.E=nt.emailAddress;Nt.emailAddress="E";var RC=Ae.pki.rsa.publicKeyValidator,OT={name:"Certificate",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:N.Class.UNIVERSAL,type:N.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:N.Class.UNIVERSAL,type:N.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:N.Class.UNIVERSAL,type:N.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:N.Class.UNIVERSAL,type:N.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},RC,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:N.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:N.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:N.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},VT={name:"rsapss",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:N.Class.UNIVERSAL,type:N.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:N.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:N.Class.UNIVERSAL,type:N.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:N.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:N.Class.UNIVERSAL,type:N.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:N.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:N.Class.UNIVERSAL,type:N.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},HT={name:"CertificationRequestInfo",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:N.Class.UNIVERSAL,type:N.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},RC,{name:"CertificationRequestInfo.attributes",tagClass:N.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:N.Class.UNIVERSAL,type:N.Type.SET,constructed:!0}]}]}]},jT={name:"CertificationRequest",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[HT,{name:"CertificationRequest.signatureAlgorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:N.Class.UNIVERSAL,type:N.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:N.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:N.Class.UNIVERSAL,type:N.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};de.RDNAttributesAsArray=function(e,t){for(var n=[],r,i,a,o=0;o<e.value.length;++o){r=e.value[o];for(var s=0;s<r.value.length;++s)a={},i=r.value[s],a.type=N.derToOid(i.value[0].value),a.value=i.value[1].value,a.valueTagClass=i.value[1].type,a.type in nt&&(a.name=nt[a.type],a.name in Nt&&(a.shortName=Nt[a.name])),t&&(t.update(a.type),t.update(a.value)),n.push(a)}return n};de.CRIAttributesAsArray=function(e){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=N.derToOid(r.value[0].value),a=r.value[1].value,o=0;o<a.length;++o){var s={};if(s.type=i,s.value=a[o].value,s.valueTagClass=a[o].type,s.type in nt&&(s.name=nt[s.type],s.name in Nt&&(s.shortName=Nt[s.name])),s.type===nt.extensionRequest){s.extensions=[];for(var l=0;l<s.value.length;++l)s.extensions.push(de.certificateExtensionFromAsn1(s.value[l]))}t.push(s)}return t};function xa(e,t){typeof t=="string"&&(t={shortName:t});for(var n=null,r,i=0;n===null&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}var td=function(e,t,n){var r={};if(e!==nt["RSASSA-PSS"])return r;n&&(r={hash:{algorithmOid:nt.sha1},mgf:{algorithmOid:nt.mgf1,hash:{algorithmOid:nt.sha1}},saltLength:20});var i={},a=[];if(!N.validate(t,VT,i,a)){var o=new Error("Cannot read RSASSA-PSS parameter block.");throw o.errors=a,o}return i.hashOid!==void 0&&(r.hash=r.hash||{},r.hash.algorithmOid=N.derToOid(i.hashOid)),i.maskGenOid!==void 0&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=N.derToOid(i.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=N.derToOid(i.maskGenHashOid)),i.saltLength!==void 0&&(r.saltLength=i.saltLength.charCodeAt(0)),r},sf=function(e){switch(nt[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Ae.md.sha1.create();case"md5WithRSAEncryption":return Ae.md.md5.create();case"sha256WithRSAEncryption":return Ae.md.sha256.create();case"sha384WithRSAEncryption":return Ae.md.sha384.create();case"sha512WithRSAEncryption":return Ae.md.sha512.create();case"RSASSA-PSS":return Ae.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},BC=function(e){var t=e.certificate,n;switch(t.signatureOid){case nt.sha1WithRSAEncryption:case nt.sha1WithRSASignature:break;case nt["RSASSA-PSS"]:var r,i;if(r=nt[t.signatureParameters.mgf.hash.algorithmOid],r===void 0||Ae.md[r]===void 0){var a=new Error("Unsupported MGF hash function.");throw a.oid=t.signatureParameters.mgf.hash.algorithmOid,a.name=r,a}if(i=nt[t.signatureParameters.mgf.algorithmOid],i===void 0||Ae.mgf[i]===void 0){var a=new Error("Unsupported MGF function.");throw a.oid=t.signatureParameters.mgf.algorithmOid,a.name=i,a}if(i=Ae.mgf[i].create(Ae.md[r].create()),r=nt[t.signatureParameters.hash.algorithmOid],r===void 0||Ae.md[r]===void 0){var a=new Error("Unsupported RSASSA-PSS hash function.");throw a.oid=t.signatureParameters.hash.algorithmOid,a.name=r,a}n=Ae.pss.create(Ae.md[r].create(),i,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,n)};de.certificateFromPem=function(e,t,n){var r=Ae.pem.decode(e)[0];if(r.type!=="CERTIFICATE"&&r.type!=="X509 CERTIFICATE"&&r.type!=="TRUSTED CERTIFICATE"){var i=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw i.headerType=r.type,i}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var a=N.fromDer(r.body,n);return de.certificateFromAsn1(a,t)};de.certificateToPem=function(e,t){var n={type:"CERTIFICATE",body:N.toDer(de.certificateToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.publicKeyFromPem=function(e){var t=Ae.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var n=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var r=N.fromDer(t.body);return de.publicKeyFromAsn1(r)};de.publicKeyToPem=function(e,t){var n={type:"PUBLIC KEY",body:N.toDer(de.publicKeyToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.publicKeyToRSAPublicKeyPem=function(e,t){var n={type:"RSA PUBLIC KEY",body:N.toDer(de.publicKeyToRSAPublicKey(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||Ae.md.sha1.create(),r=t.type||"RSAPublicKey",i;switch(r){case"RSAPublicKey":i=N.toDer(de.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":i=N.toDer(de.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}n.start(),n.update(i);var a=n.digest();if(t.encoding==="hex"){var o=a.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return a.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return a};de.certificationRequestFromPem=function(e,t,n){var r=Ae.pem.decode(e)[0];if(r.type!=="CERTIFICATE REQUEST"){var i=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw i.headerType=r.type,i}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var a=N.fromDer(r.body,n);return de.certificationRequestFromAsn1(a,t)};de.certificationRequestToPem=function(e,t){var n={type:"CERTIFICATE REQUEST",body:N.toDer(de.certificationRequestToAsn1(e)).getBytes()};return Ae.pem.encode(n,{maxline:t})};de.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return xa(e.issuer,t)},e.issuer.addField=function(t){vr([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return xa(e.subject,t)},e.subject.addField=function(t){vr([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,n){vr(t),e.subject.attributes=t,delete e.subject.uniqueId,n&&(e.subject.uniqueId=n),e.subject.hash=null},e.setIssuer=function(t,n){vr(t),e.issuer.attributes=t,delete e.issuer.uniqueId,n&&(e.issuer.uniqueId=n),e.issuer.hash=null},e.setExtensions=function(t){for(var n=0;n<t.length;++n)$C(t[n],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var n=null,r,i=0;n===null&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,n){e.md=n||Ae.md.sha1.create();var r=nt[e.md.algorithm+"WithRSAEncryption"];if(!r){var i=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=r,e.tbsCertificate=de.getTBSCertificate(e);var a=N.toDer(e.tbsCertificate);e.md.update(a.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var n=!1;if(!e.issued(t)){var r=t.issuer,i=e.subject,a=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw a.expectedIssuer=i.attributes,a.actualIssuer=r.attributes,a}var o=t.md;if(o===null){o=sf({signatureOid:t.signatureOid,type:"certificate"});var s=t.tbsCertificate||de.getTBSCertificate(t),l=N.toDer(s);o.update(l.getBytes())}return o!==null&&(n=BC({certificate:e,md:o,signature:t.signature})),n},e.isIssuer=function(t){var n=!1,r=e.issuer,i=t.subject;if(r.hash&&i.hash)n=r.hash===i.hash;else if(r.attributes.length===i.attributes.length){n=!0;for(var a,o,s=0;n&&s<r.attributes.length;++s)a=r.attributes[s],o=i.attributes[s],(a.type!==o.type||a.value!==o.value)&&(n=!1)}return n},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return de.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=nt.subjectKeyIdentifier,n=0;n<e.extensions.length;++n){var r=e.extensions[n];if(r.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return Ae.util.hexToBytes(r.subjectKeyIdentifier)===i}}return!1},e};de.certificateFromAsn1=function(e,t){var n={},r=[];if(!N.validate(e,OT,n,r)){var i=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw i.errors=r,i}var a=N.derToOid(n.publicKeyOid);if(a!==de.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=de.createCertificate();o.version=n.certVersion?n.certVersion.charCodeAt(0):0;var s=Ae.util.createBuffer(n.certSerialNumber);o.serialNumber=s.toHex(),o.signatureOid=Ae.asn1.derToOid(n.certSignatureOid),o.signatureParameters=td(o.signatureOid,n.certSignatureParams,!0),o.siginfo.algorithmOid=Ae.asn1.derToOid(n.certinfoSignatureOid),o.siginfo.parameters=td(o.siginfo.algorithmOid,n.certinfoSignatureParams,!1),o.signature=n.certSignature;var l=[];if(n.certValidity1UTCTime!==void 0&&l.push(N.utcTimeToDate(n.certValidity1UTCTime)),n.certValidity2GeneralizedTime!==void 0&&l.push(N.generalizedTimeToDate(n.certValidity2GeneralizedTime)),n.certValidity3UTCTime!==void 0&&l.push(N.utcTimeToDate(n.certValidity3UTCTime)),n.certValidity4GeneralizedTime!==void 0&&l.push(N.generalizedTimeToDate(n.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(o.validity.notBefore=l[0],o.validity.notAfter=l[1],o.tbsCertificate=n.tbsCertificate,t){o.md=sf({signatureOid:o.signatureOid,type:"certificate"});var u=N.toDer(o.tbsCertificate);o.md.update(u.getBytes())}var c=Ae.md.sha1.create(),d=N.toDer(n.certIssuer);c.update(d.getBytes()),o.issuer.getField=function(g){return xa(o.issuer,g)},o.issuer.addField=function(g){vr([g]),o.issuer.attributes.push(g)},o.issuer.attributes=de.RDNAttributesAsArray(n.certIssuer),n.certIssuerUniqueId&&(o.issuer.uniqueId=n.certIssuerUniqueId),o.issuer.hash=c.digest().toHex();var h=Ae.md.sha1.create(),f=N.toDer(n.certSubject);return h.update(f.getBytes()),o.subject.getField=function(g){return xa(o.subject,g)},o.subject.addField=function(g){vr([g]),o.subject.attributes.push(g)},o.subject.attributes=de.RDNAttributesAsArray(n.certSubject),n.certSubjectUniqueId&&(o.subject.uniqueId=n.certSubjectUniqueId),o.subject.hash=h.digest().toHex(),n.certExtensions?o.extensions=de.certificateExtensionsFromAsn1(n.certExtensions):o.extensions=[],o.publicKey=de.publicKeyFromAsn1(n.subjectPublicKeyInfo),o};de.certificateExtensionsFromAsn1=function(e){for(var t=[],n=0;n<e.value.length;++n)for(var r=e.value[n],i=0;i<r.value.length;++i)t.push(de.certificateExtensionFromAsn1(r.value[i]));return t};de.certificateExtensionFromAsn1=function(e){var t={};if(t.id=N.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===N.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in nt){if(t.name=nt[t.id],t.name==="keyUsage"){var n=N.fromDer(t.value),r=0,i=0;n.value.length>1&&(r=n.value.charCodeAt(1),i=n.value.length>2?n.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(i&128)===128}else if(t.name==="basicConstraints"){var n=N.fromDer(t.value);n.value.length>0&&n.value[0].type===N.Type.BOOLEAN?t.cA=n.value[0].value.charCodeAt(0)!==0:t.cA=!1;var a=null;n.value.length>0&&n.value[0].type===N.Type.INTEGER?a=n.value[0].value:n.value.length>1&&(a=n.value[1].value),a!==null&&(t.pathLenConstraint=N.derToInteger(a))}else if(t.name==="extKeyUsage")for(var n=N.fromDer(t.value),o=0;o<n.value.length;++o){var s=N.derToOid(n.value[o].value);s in nt?t[nt[s]]=!0:t[s]=!0}else if(t.name==="nsCertType"){var n=N.fromDer(t.value),r=0;n.value.length>1&&(r=n.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var l,n=N.fromDer(t.value),u=0;u<n.value.length;++u){l=n.value[u];var c={type:l.type,value:l.value};switch(t.altNames.push(c),l.type){case 1:case 2:case 6:break;case 7:c.ip=Ae.util.bytesToIP(l.value);break;case 8:c.oid=N.derToOid(l.value);break}}}else if(t.name==="subjectKeyIdentifier"){var n=N.fromDer(t.value);t.subjectKeyIdentifier=Ae.util.bytesToHex(n.value)}}return t};de.certificationRequestFromAsn1=function(e,t){var n={},r=[];if(!N.validate(e,jT,n,r)){var i=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw i.errors=r,i}var a=N.derToOid(n.publicKeyOid);if(a!==de.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=de.createCertificationRequest();if(o.version=n.csrVersion?n.csrVersion.charCodeAt(0):0,o.signatureOid=Ae.asn1.derToOid(n.csrSignatureOid),o.signatureParameters=td(o.signatureOid,n.csrSignatureParams,!0),o.siginfo.algorithmOid=Ae.asn1.derToOid(n.csrSignatureOid),o.siginfo.parameters=td(o.siginfo.algorithmOid,n.csrSignatureParams,!1),o.signature=n.csrSignature,o.certificationRequestInfo=n.certificationRequestInfo,t){o.md=sf({signatureOid:o.signatureOid,type:"certification request"});var s=N.toDer(o.certificationRequestInfo);o.md.update(s.getBytes())}var l=Ae.md.sha1.create();return o.subject.getField=function(u){return xa(o.subject,u)},o.subject.addField=function(u){vr([u]),o.subject.attributes.push(u)},o.subject.attributes=de.RDNAttributesAsArray(n.certificationRequestInfoSubject,l),o.subject.hash=l.digest().toHex(),o.publicKey=de.publicKeyFromAsn1(n.subjectPublicKeyInfo),o.getAttribute=function(u){return xa(o,u)},o.addAttribute=function(u){vr([u]),o.attributes.push(u)},o.attributes=de.CRIAttributesAsArray(n.certificationRequestInfoAttributes||[]),o};de.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return xa(e.subject,t)},e.subject.addField=function(t){vr([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return xa(e,t)},e.addAttribute=function(t){vr([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){vr(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){vr(t),e.attributes=t},e.sign=function(t,n){e.md=n||Ae.md.sha1.create();var r=nt[e.md.algorithm+"WithRSAEncryption"];if(!r){var i=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=r,e.certificationRequestInfo=de.getCertificationRequestInfo(e);var a=N.toDer(e.certificationRequestInfo);e.md.update(a.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,n=e.md;if(n===null){n=sf({signatureOid:e.signatureOid,type:"certification request"});var r=e.certificationRequestInfo||de.getCertificationRequestInfo(e),i=N.toDer(r);n.update(i.getBytes())}return n!==null&&(t=BC({certificate:e,md:n,signature:e.signature})),t},e};function ds(e){for(var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),n,r,i=e.attributes,a=0;a<i.length;++a){n=i[a];var o=n.value,s=N.Type.PRINTABLESTRING;"valueTagClass"in n&&(s=n.valueTagClass,s===N.Type.UTF8&&(o=Ae.util.encodeUtf8(o))),r=N.create(N.Class.UNIVERSAL,N.Type.SET,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(n.type).getBytes()),N.create(N.Class.UNIVERSAL,s,!1,o)])]),t.value.push(r)}return t}function vr(e){for(var t,n=0;n<e.length;++n){if(t=e[n],typeof t.name>"u"&&(t.type&&t.type in de.oids?t.name=de.oids[t.type]:t.shortName&&t.shortName in Nt&&(t.name=de.oids[Nt[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in de.oids)t.type=de.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in Nt&&(t.shortName=Nt[t.name]),t.type===nt.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=N.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var i=0;i<t.extensions.length;++i)t.value.push(de.certificateExtensionToAsn1($C(t.extensions[i])))}if(typeof t.value>"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function $C(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in de.oids&&(e.name=de.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in de.oids)e.id=de.oids[e.name];else{var n=new Error("Extension ID not specified.");throw n.extension=e,n}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,i=0,a=0;e.digitalSignature&&(i|=128,r=7),e.nonRepudiation&&(i|=64,r=6),e.keyEncipherment&&(i|=32,r=5),e.dataEncipherment&&(i|=16,r=4),e.keyAgreement&&(i|=8,r=3),e.keyCertSign&&(i|=4,r=2),e.cRLSign&&(i|=2,r=1),e.encipherOnly&&(i|=1,r=0),e.decipherOnly&&(a|=128,r=7);var o=String.fromCharCode(r);a!==0?o+=String.fromCharCode(i)+String.fromCharCode(a):i!==0&&(o+=String.fromCharCode(i)),e.value=N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,o)}else if(e.name==="basicConstraints")e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(N.create(N.Class.UNIVERSAL,N.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in e&&e.value.value.push(N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);var s=e.value.value;for(var l in e)e[l]===!0&&(l in nt?s.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(nt[l]).getBytes())):l.indexOf(".")!==-1&&s.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(l).getBytes())))}else if(e.name==="nsCertType"){var r=0,i=0;e.client&&(i|=128,r=7),e.server&&(i|=64,r=6),e.email&&(i|=32,r=5),e.objsign&&(i|=16,r=4),e.reserved&&(i|=8,r=3),e.sslCA&&(i|=4,r=2),e.emailCA&&(i|=2,r=1),e.objCA&&(i|=1,r=0);var o=String.fromCharCode(r);i!==0&&(o+=String.fromCharCode(i)),e.value=N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,o)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);for(var u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=Ae.util.bytesFromIP(u.ip),o===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else u.type===8&&(u.oid?o=N.oidToDer(N.oidToDer(u.oid)):o=N.oidToDer(o));e.value.value.push(N.create(N.Class.CONTEXT_SPECIFIC,u.type,!1,o))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=N.create(N.Class.UNIVERSAL,N.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=N.create(N.Class.UNIVERSAL,N.Type.OCTETSTRING,!1,d.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);var s=e.value.value;if(e.keyIdentifier){var h=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;s.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!1,h))}if(e.authorityCertIssuer){var f=[N.create(N.Class.CONTEXT_SPECIFIC,4,!0,[ds(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];s.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,f))}if(e.serialNumber){var g=Ae.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);s.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if(e.name==="cRLDistributionPoints"){e.value=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);for(var s=e.value.value,p=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]),m=N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[]),u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=Ae.util.bytesFromIP(u.ip),o===null){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else u.type===8&&(u.oid?o=N.oidToDer(N.oidToDer(u.oid)):o=N.oidToDer(o));m.value.push(N.create(N.Class.CONTEXT_SPECIFIC,u.type,!1,o))}p.value.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[m])),s.push(p)}if(typeof e.value>"u"){var n=new Error("Extension value not specified.");throw n.extension=e,n}return e}function ap(e,t){switch(e){case nt["RSASSA-PSS"]:var n=[];return t.hash.algorithmOid!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.hash.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,[N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.mgf.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(t.mgf.hash.algorithmOid).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&n.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(t.saltLength).getBytes())])),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,n);default:return N.create(N.Class.UNIVERSAL,N.Type.NULL,!1,"")}}function WT(e){var t=N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var n=e.attributes,r=0;r<n.length;++r){var i=n[r],a=i.value,o=N.Type.UTF8;"valueTagClass"in i&&(o=i.valueTagClass),o===N.Type.UTF8&&(a=Ae.util.encodeUtf8(a));var s=!1;"valueConstructed"in i&&(s=i.valueConstructed);var l=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(i.type).getBytes()),N.create(N.Class.UNIVERSAL,N.Type.SET,!0,[N.create(N.Class.UNIVERSAL,o,s,a)])]);t.value.push(l)}return t}var zT=new Date("1950-01-01T00:00:00Z"),GT=new Date("2050-01-01T00:00:00Z");function R1(e){return e>=zT&&e<GT?N.create(N.Class.UNIVERSAL,N.Type.UTCTIME,!1,N.dateToUtcTime(e)):N.create(N.Class.UNIVERSAL,N.Type.GENERALIZEDTIME,!1,N.dateToGeneralizedTime(e))}de.getTBSCertificate=function(e){var t=R1(e.validity.notBefore),n=R1(e.validity.notAfter),r=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.CONTEXT_SPECIFIC,0,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.version).getBytes())]),N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,Ae.util.hexToBytes(e.serialNumber)),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.siginfo.algorithmOid).getBytes()),ap(e.siginfo.algorithmOid,e.siginfo.parameters)]),ds(e.issuer),N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,n]),ds(e.subject),de.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&r.value.push(N.create(N.Class.CONTEXT_SPECIFIC,1,!0,[N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&r.value.push(N.create(N.Class.CONTEXT_SPECIFIC,2,!0,[N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&r.value.push(de.certificateExtensionsToAsn1(e.extensions)),r};de.getCertificationRequestInfo=function(e){var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.INTEGER,!1,N.integerToDer(e.version).getBytes()),ds(e.subject),de.publicKeyToAsn1(e.publicKey),WT(e)]);return t};de.distinguishedNameToAsn1=function(e){return ds(e)};de.certificateToAsn1=function(e){var t=e.tbsCertificate||de.getTBSCertificate(e);return N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.signatureOid).getBytes()),ap(e.signatureOid,e.signatureParameters)]),N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.signature)])};de.certificateExtensionsToAsn1=function(e){var t=N.create(N.Class.CONTEXT_SPECIFIC,3,!0,[]),n=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);t.value.push(n);for(var r=0;r<e.length;++r)n.value.push(de.certificateExtensionToAsn1(e[r]));return t};de.certificateExtensionToAsn1=function(e){var t=N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[]);t.value.push(N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.id).getBytes())),e.critical&&t.value.push(N.create(N.Class.UNIVERSAL,N.Type.BOOLEAN,!1,"ÿ"));var n=e.value;return typeof e.value!="string"&&(n=N.toDer(n).getBytes()),t.value.push(N.create(N.Class.UNIVERSAL,N.Type.OCTETSTRING,!1,n)),t};de.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||de.getCertificationRequestInfo(e);return N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[t,N.create(N.Class.UNIVERSAL,N.Type.SEQUENCE,!0,[N.create(N.Class.UNIVERSAL,N.Type.OID,!1,N.oidToDer(e.signatureOid).getBytes()),ap(e.signatureOid,e.signatureParameters)]),N.create(N.Class.UNIVERSAL,N.Type.BITSTRING,!1,"\0"+e.signature)])};de.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(o){var s=n(o.issuer);return s},t.addCertificate=function(o){if(typeof o=="string"&&(o=Ae.pki.certificateFromPem(o)),r(o.subject),!t.hasCertificate(o))if(o.subject.hash in t.certs){var s=t.certs[o.subject.hash];Ae.util.isArray(s)||(s=[s]),s.push(o),t.certs[o.subject.hash]=s}else t.certs[o.subject.hash]=o},t.hasCertificate=function(o){typeof o=="string"&&(o=Ae.pki.certificateFromPem(o));var s=n(o.subject);if(!s)return!1;Ae.util.isArray(s)||(s=[s]);for(var l=N.toDer(de.certificateToAsn1(o)).getBytes(),u=0;u<s.length;++u){var c=N.toDer(de.certificateToAsn1(s[u])).getBytes();if(l===c)return!0}return!1},t.listAllCertificates=function(){var o=[];for(var s in t.certs)if(t.certs.hasOwnProperty(s)){var l=t.certs[s];if(!Ae.util.isArray(l))o.push(l);else for(var u=0;u<l.length;++u)o.push(l[u])}return o},t.removeCertificate=function(o){var s;if(typeof o=="string"&&(o=Ae.pki.certificateFromPem(o)),r(o.subject),!t.hasCertificate(o))return null;var l=n(o.subject);if(!Ae.util.isArray(l))return s=t.certs[o.subject.hash],delete t.certs[o.subject.hash],s;for(var u=N.toDer(de.certificateToAsn1(o)).getBytes(),c=0;c<l.length;++c){var d=N.toDer(de.certificateToAsn1(l[c])).getBytes();u===d&&(s=l[c],l.splice(c,1))}return l.length===0&&delete t.certs[o.subject.hash],s};function n(o){return r(o),t.certs[o.hash]||null}function r(o){if(!o.hash){var s=Ae.md.sha1.create();o.attributes=de.RDNAttributesAsArray(ds(o),s),o.hash=s.digest().toHex()}}if(e)for(var i=0;i<e.length;++i){var a=e[i];t.addCertificate(a)}return t};de.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};de.verifyCertificateChain=function(e,t,n){typeof n=="function"&&(n={verify:n}),n=n||{},t=t.slice(0);var r=t.slice(0),i=n.validityCheckDate;typeof i>"u"&&(i=new Date);var a=!0,o=null,s=0;do{var l=t.shift(),u=null,c=!1;if(i&&(i<l.validity.notBefore||i>l.validity.notAfter)&&(o={message:"Certificate is not valid yet or has expired.",error:de.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:i}),o===null){if(u=t[0]||e.getIssuer(l),u===null&&l.isIssuer(l)&&(c=!0,u=l),u){var d=u;Ae.util.isArray(d)||(d=[d]);for(var h=!1;!h&&d.length>0;){u=d.shift();try{h=u.verify(l)}catch{}}h||(o={message:"Certificate signature is invalid.",error:de.certificateError.bad_certificate})}o===null&&(!u||c)&&!e.hasCertificate(l)&&(o={message:"Certificate is not trusted.",error:de.certificateError.unknown_ca})}if(o===null&&u&&!l.isIssuer(u)&&(o={message:"Certificate issuer is invalid.",error:de.certificateError.bad_certificate}),o===null)for(var f={keyUsage:!0,basicConstraints:!0},g=0;o===null&&g<l.extensions.length;++g){var p=l.extensions[g];p.critical&&!(p.name in f)&&(o={message:"Certificate has an unsupported critical extension.",error:de.certificateError.unsupported_certificate})}if(o===null&&(!a||t.length===0&&(!u||c))){var m=l.getExtension("basicConstraints"),b=l.getExtension("keyUsage");if(b!==null&&(!b.keyCertSign||m===null)&&(o={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:de.certificateError.bad_certificate}),o===null&&m!==null&&!m.cA&&(o={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:de.certificateError.bad_certificate}),o===null&&b!==null&&"pathLenConstraint"in m){var v=s-1;v>m.pathLenConstraint&&(o={message:"Certificate basicConstraints pathLenConstraint violated.",error:de.certificateError.bad_certificate})}}var x=o===null?!0:o.error,C=n.verify?n.verify(x,s,r):x;if(C===!0)o=null;else throw x===!0&&(o={message:"The application rejected the certificate.",error:de.certificateError.bad_certificate}),(C||C===0)&&(typeof C=="object"&&!Ae.util.isArray(C)?(C.message&&(o.message=C.message),C.error&&(o.error=C.error)):typeof C=="string"&&(o.error=C)),o;a=!1,++s}while(t.length>0);return!0};var xt=ze,G=xt.asn1,Xe=xt.pki,Il=xt.pkcs12=xt.pkcs12||{},kC={name:"ContentInfo",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},UT={name:"PFX",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,capture:"version"},kC,{name:"PFX.macData",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:G.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},XT={name:"SafeBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},ZT={name:"Attribute",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,capture:"values"}]},YT={name:"CertBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:G.Class.UNIVERSAL,type:G.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Ns(e,t,n,r){for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].safeBags.length;o++){var s=e[a].safeBags[o];if(!(r!==void 0&&s.type!==r)){if(t===null){i.push(s);continue}s.attributes[t]!==void 0&&s.attributes[t].indexOf(n)>=0&&i.push(s)}}return i}Il.pkcs12FromAsn1=function(e,t,n){typeof t=="string"?(n=t,t=!0):t===void 0&&(t=!0);var r={},i=[];if(!G.validate(e,UT,r,i)){var a=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw a.errors=a,a}var o={version:r.version.charCodeAt(0),safeContents:[],getBags:function(m){var b={},v;return"localKeyId"in m?v=m.localKeyId:"localKeyIdHex"in m&&(v=xt.util.hexToBytes(m.localKeyIdHex)),v===void 0&&!("friendlyName"in m)&&"bagType"in m&&(b[m.bagType]=Ns(o.safeContents,null,null,m.bagType)),v!==void 0&&(b.localKeyId=Ns(o.safeContents,"localKeyId",v,m.bagType)),"friendlyName"in m&&(b.friendlyName=Ns(o.safeContents,"friendlyName",m.friendlyName,m.bagType)),b},getBagsByFriendlyName:function(m,b){return Ns(o.safeContents,"friendlyName",m,b)},getBagsByLocalKeyId:function(m,b){return Ns(o.safeContents,"localKeyId",m,b)}};if(r.version.charCodeAt(0)!==3){var a=new Error("PKCS#12 PFX of version other than 3 not supported.");throw a.version=r.version.charCodeAt(0),a}if(G.derToOid(r.contentType)!==Xe.oids.data){var a=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw a.oid=G.derToOid(r.contentType),a}var s=r.content.value[0];if(s.tagClass!==G.Class.UNIVERSAL||s.type!==G.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(s=op(s),r.mac){var l=null,u=0,c=G.derToOid(r.macAlgorithm);switch(c){case Xe.oids.sha1:l=xt.md.sha1.create(),u=20;break;case Xe.oids.sha256:l=xt.md.sha256.create(),u=32;break;case Xe.oids.sha384:l=xt.md.sha384.create(),u=48;break;case Xe.oids.sha512:l=xt.md.sha512.create(),u=64;break;case Xe.oids.md5:l=xt.md.md5.create(),u=16;break}if(l===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var d=new xt.util.ByteBuffer(r.macSalt),h="macIterations"in r?parseInt(xt.util.bytesToHex(r.macIterations),16):1,f=Il.generateKey(n,d,3,h,u,l),g=xt.hmac.create();g.start(l,f),g.update(s.value);var p=g.getMac();if(p.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return KT(o,s.value,t,n),o};function op(e){if(e.composed||e.constructed){for(var t=xt.util.createBuffer(),n=0;n<e.value.length;++n)t.putBytes(e.value[n].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function KT(e,t,n,r){if(t=G.fromDer(t,n),t.tagClass!==G.Class.UNIVERSAL||t.type!==G.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<t.value.length;i++){var a=t.value[i],o={},s=[];if(!G.validate(a,kC,o,s)){var l=new Error("Cannot read ContentInfo.");throw l.errors=s,l}var u={encrypted:!1},c=null,d=o.content.value[0];switch(G.derToOid(o.contentType)){case Xe.oids.data:if(d.tagClass!==G.Class.UNIVERSAL||d.type!==G.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=op(d).value;break;case Xe.oids.encryptedData:c=qT(d,r),u.encrypted=!0;break;default:var l=new Error("Unsupported PKCS#12 contentType.");throw l.contentType=G.derToOid(o.contentType),l}u.safeBags=JT(c,n,r),e.safeContents.push(u)}}function qT(e,t){var n={},r=[];if(!G.validate(e,xt.pkcs7.asn1.encryptedDataValidator,n,r)){var i=new Error("Cannot read EncryptedContentInfo.");throw i.errors=r,i}var a=G.derToOid(n.contentType);if(a!==Xe.oids.data){var i=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw i.oid=a,i}a=G.derToOid(n.encAlgorithm);var o=Xe.pbe.getCipher(a,n.encParameter,t),s=op(n.encryptedContentAsn1),l=xt.util.createBuffer(s.value);if(o.update(l),!o.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return o.output.getBytes()}function JT(e,t,n){if(!t&&e.length===0)return[];if(e=G.fromDer(e,t),e.tagClass!==G.Class.UNIVERSAL||e.type!==G.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var r=[],i=0;i<e.value.length;i++){var a=e.value[i],o={},s=[];if(!G.validate(a,XT,o,s)){var l=new Error("Cannot read SafeBag.");throw l.errors=s,l}var u={type:G.derToOid(o.bagId),attributes:QT(o.bagAttributes)};r.push(u);var c,d,h=o.bagValue.value[0];switch(u.type){case Xe.oids.pkcs8ShroudedKeyBag:if(h=Xe.decryptPrivateKeyInfo(h,n),h===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Xe.oids.keyBag:try{u.key=Xe.privateKeyFromAsn1(h)}catch{u.key=null,u.asn1=h}continue;case Xe.oids.certBag:c=YT,d=function(){if(G.derToOid(o.certId)!==Xe.oids.x509Certificate){var g=new Error("Unsupported certificate type, only X.509 supported.");throw g.oid=G.derToOid(o.certId),g}var p=G.fromDer(o.cert,t);try{u.cert=Xe.certificateFromAsn1(p,!0)}catch{u.cert=null,u.asn1=p}};break;default:var l=new Error("Unsupported PKCS#12 SafeBag type.");throw l.oid=u.type,l}if(c!==void 0&&!G.validate(h,c,o,s)){var l=new Error("Cannot read PKCS#12 "+c.name);throw l.errors=s,l}d()}return r}function QT(e){var t={};if(e!==void 0)for(var n=0;n<e.length;++n){var r={},i=[];if(!G.validate(e[n],ZT,r,i)){var a=new Error("Cannot read PKCS#12 BagAttribute.");throw a.errors=i,a}var o=G.derToOid(r.oid);if(Xe.oids[o]!==void 0){t[Xe.oids[o]]=[];for(var s=0;s<r.values.length;++s)t[Xe.oids[o]].push(r.values[s].value)}}return t}Il.toPkcs12Asn1=function(e,t,n,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||r.encAlgorithm||"aes128","useMac"in r||(r.useMac=!0),"localKeyId"in r||(r.localKeyId=null),"generateLocalKeyId"in r||(r.generateLocalKeyId=!0);var i=r.localKeyId,a;if(i!==null)i=xt.util.hexToBytes(i);else if(r.generateLocalKeyId)if(t){var o=xt.util.isArray(t)?t[0]:t;typeof o=="string"&&(o=Xe.certificateFromPem(o));var s=xt.md.sha1.create();s.update(G.toDer(Xe.certificateToAsn1(o)).getBytes()),i=s.digest().getBytes()}else i=xt.random.getBytes(20);var l=[];i!==null&&l.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.localKeyId).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,i)])])),"friendlyName"in r&&l.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.friendlyName).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.BMPSTRING,!1,r.friendlyName)])])),l.length>0&&(a=G.create(G.Class.UNIVERSAL,G.Type.SET,!0,l));var u=[],c=[];t!==null&&(xt.util.isArray(t)?c=t:c=[t]);for(var d=[],h=0;h<c.length;++h){t=c[h],typeof t=="string"&&(t=Xe.certificateFromPem(t));var f=h===0?a:void 0,g=Xe.certificateToAsn1(t),p=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.certBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.x509Certificate).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(g).getBytes())])])]),f]);d.push(p)}if(d.length>0){var m=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,d),b=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(m).getBytes())])]);u.push(b)}var v=null;if(e!==null){var x=Xe.wrapRsaPrivateKey(Xe.privateKeyToAsn1(e));n===null?v=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.keyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[x]),a]):v=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.pkcs8ShroudedKeyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[Xe.encryptPrivateKeyInfo(x,n,r)]),a]);var C=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[v]),E=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(C).getBytes())])]);u.push(E)}var w=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,u),B;if(r.useMac){var s=xt.md.sha1.create(),y=new xt.util.ByteBuffer(xt.random.getBytes(r.saltSize)),S=r.count,e=Il.generateKey(n,y,3,S,20),D=xt.hmac.create();D.start(s,e),D.update(G.toDer(w).getBytes());var A=D.getMac();B=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.sha1).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.NULL,!1,"")]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,A.getBytes())]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,y.getBytes()),G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(S).getBytes())])}return G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(3).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(Xe.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(w).getBytes())])]),B])};Il.generateKey=xt.pbe.generatePkcs12Key;var Ca=ze,sp=Ca.asn1,fs=Ca.pki=Ca.pki||{};fs.pemToDer=function(e){var t=Ca.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Ca.util.createBuffer(t.body)};fs.privateKeyFromPem=function(e){var t=Ca.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=sp.fromDer(t.body);return fs.privateKeyFromAsn1(r)};fs.privateKeyToPem=function(e,t){var n={type:"RSA PRIVATE KEY",body:sp.toDer(fs.privateKeyToAsn1(e)).getBytes()};return Ca.pem.encode(n,{maxline:t})};fs.privateKeyInfoToPem=function(e,t){var n={type:"PRIVATE KEY",body:sp.toDer(e).getBytes()};return Ca.pem.encode(n,{maxline:t})};var ae=ze,lf=function(e,t,n,r){var i=ae.util.createBuffer(),a=e.length>>1,o=a+(e.length&1),s=e.substr(0,o),l=e.substr(a,o),u=ae.util.createBuffer(),c=ae.hmac.create();n=t+n;var d=Math.ceil(r/16),h=Math.ceil(r/20);c.start("MD5",s);var f=ae.util.createBuffer();u.putBytes(n);for(var g=0;g<d;++g)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+n),f.putBuffer(c.digest());c.start("SHA1",l);var p=ae.util.createBuffer();u.clear(),u.putBytes(n);for(var g=0;g<h;++g)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+n),p.putBuffer(c.digest());return i.putBytes(ae.util.xorBytes(f.getBytes(),p.getBytes(),r)),i},eR=function(e,t,n){var r=ae.hmac.create();r.start("SHA1",e);var i=ae.util.createBuffer();return i.putInt32(t[0]),i.putInt32(t[1]),i.putByte(n.type),i.putByte(n.version.major),i.putByte(n.version.minor),i.putInt16(n.length),i.putBytes(n.fragment.bytes()),r.update(i.getBytes()),r.digest().getBytes()},tR=function(e,t,n){var r=!1;try{var i=e.deflate(t.fragment.getBytes());t.fragment=ae.util.createBuffer(i),t.length=i.length,r=!0}catch{}return r},nR=function(e,t,n){var r=!1;try{var i=e.inflate(t.fragment.getBytes());t.fragment=ae.util.createBuffer(i),t.length=i.length,r=!0}catch{}return r},Yn=function(e,t){var n=0;switch(t){case 1:n=e.getByte();break;case 2:n=e.getInt16();break;case 3:n=e.getInt24();break;case 4:n=e.getInt32();break}return ae.util.createBuffer(e.getBytes(n))},gr=function(e,t,n){e.putInt(n.length(),t<<3),e.putBuffer(n)},L={};L.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};L.SupportedVersions=[L.Versions.TLS_1_1,L.Versions.TLS_1_0];L.Version=L.SupportedVersions[0];L.MaxFragment=15360;L.ConnectionEnd={server:0,client:1};L.PRFAlgorithm={tls_prf_sha256:0};L.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};L.CipherType={stream:0,block:1,aead:2};L.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};L.CompressionMethod={none:0,deflate:1};L.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};L.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};L.Alert={};L.Alert.Level={warning:1,fatal:2};L.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};L.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};L.CipherSuites={};L.getCipherSuite=function(e){var t=null;for(var n in L.CipherSuites){var r=L.CipherSuites[n];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t};L.handleUnexpected=function(e,t){var n=!e.open&&e.entity===L.ConnectionEnd.client;n||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}})};L.handleHelloRequest=function(e,t,n){!e.handshaking&&e.handshakes>0&&(L.queue(e,L.createAlert(e,{level:L.Alert.Level.warning,description:L.Alert.Description.no_renegotiation})),L.flush(e)),e.process()};L.parseHelloMessage=function(e,t,n){var r=null,i=e.entity===L.ConnectionEnd.client;if(n<38)e.error(e,{message:i?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});else{var a=t.fragment,o=a.length();if(r={version:{major:a.getByte(),minor:a.getByte()},random:ae.util.createBuffer(a.getBytes(32)),session_id:Yn(a,1),extensions:[]},i?(r.cipher_suite=a.getBytes(2),r.compression_method=a.getByte()):(r.cipher_suites=Yn(a,2),r.compression_methods=Yn(a,1)),o=n-(o-a.length()),o>0){for(var s=Yn(a,2);s.length()>0;)r.extensions.push({type:[s.getByte(),s.getByte()],data:Yn(s,2)});if(!i)for(var l=0;l<r.extensions.length;++l){var u=r.extensions[l];if(u.type[0]===0&&u.type[1]===0)for(var c=Yn(u.data,2);c.length()>0;){var d=c.getByte();if(d!==0)break;e.session.extensions.server_name.serverNameList.push(Yn(c,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}});if(i)e.session.cipherSuite=L.getCipherSuite(r.cipher_suite);else for(var h=ae.util.createBuffer(r.cipher_suites.bytes());h.length()>0&&(e.session.cipherSuite=L.getCipherSuite(h.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure},cipherSuite:ae.util.bytesToHex(r.cipher_suite)});i?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=L.CompressionMethod.none}return r};L.createSecurityParameters=function(e,t){var n=e.entity===L.ConnectionEnd.client,r=t.random.bytes(),i=n?e.session.sp.client_random:r,a=n?r:L.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:L.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}};L.handleServerHello=function(e,t,n){var r=L.parseHelloMessage(e,t,n);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}});e.session.version=e.version;var i=r.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=PC,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=iR,e.session.resuming=!1,L.createSecurityParameters(e,r)),e.session.id=i,e.process()}};L.handleClientHello=function(e,t,n){var r=L.parseHelloMessage(e,t,n);if(!e.fail){var i=r.session_id.bytes(),a=null;if(e.sessionCache&&(a=e.sessionCache.getSession(i),a===null?i="":(a.version.major!==r.version.major||a.version.minor>r.version.minor)&&(a=null,i="")),i.length===0&&(i=ae.random.getBytes(32)),e.session.id=i,e.session.clientHelloVersion=r.version,e.session.sp={},a)e.version=e.session.version=a.version,e.session.sp=a.sp;else{for(var o,s=1;s<L.SupportedVersions.length&&(o=L.SupportedVersions[s],!(o.minor<=r.version.minor));++s);e.version={major:o.major,minor:o.minor},e.session.version=e.version}a!==null?(e.expect=lp,e.session.resuming=!0,e.session.sp.client_random=r.random.bytes()):(e.expect=e.verifyClient!==!1?dR:R0,e.session.resuming=!1,L.createSecurityParameters(e,r)),e.open=!0,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerHello(e)})),e.session.resuming?(L.queue(e,L.createRecord(e,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),e.state.pending=L.createConnectionState(e),e.state.current.write=e.state.pending.write,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createFinished(e)}))):(L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificate(e)})),e.fail||(L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerKeyExchange(e)})),e.verifyClient!==!1&&L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificateRequest(e)})),L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createServerHelloDone(e)})))),L.flush(e),e.process()}};L.handleCertificate=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_list:Yn(r,3)},a,o,s=[];try{for(;i.certificate_list.length()>0;)a=Yn(i.certificate_list,3),o=ae.asn1.fromDer(a),a=ae.pki.certificateFromAsn1(o,!0),s.push(a)}catch(u){return e.error(e,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var l=e.entity===L.ConnectionEnd.client;(l||e.verifyClient===!0)&&s.length===0?e.error(e,{message:l?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}}):s.length===0?e.expect=l?B1:R0:(l?e.session.serverCertificate=s[0]:e.session.clientCertificate=s[0],L.verifyCertificateChain(e,s)&&(e.expect=l?B1:R0)),e.process()};L.handleServerKeyExchange=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});e.expect=aR,e.process()};L.handleClientKeyExchange=function(e,t,n){if(n<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});var r=t.fragment,i={enc_pre_master_secret:Yn(r,2).getBytes()},a=null;if(e.getPrivateKey)try{a=e.getPrivateKey(e,e.session.serverCertificate),a=ae.pki.privateKeyFromPem(a)}catch(l){e.error(e,{message:"Could not get private key.",cause:l,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(a===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});try{var o=e.session.sp;o.pre_master_secret=a.decrypt(i.enc_pre_master_secret);var s=e.session.clientHelloVersion;if(s.major!==o.pre_master_secret.charCodeAt(0)||s.minor!==o.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{o.pre_master_secret=ae.random.getBytes(48)}e.expect=lp,e.session.clientCertificate!==null&&(e.expect=fR),e.process()};L.handleCertificateRequest=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_types:Yn(r,1),certificate_authorities:Yn(r,2)};e.session.certificateRequest=i,e.expect=oR,e.process()};L.handleCertificateVerify=function(e,t,n){if(n<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var i=r.bytes();r.read+=4;var a={signature:Yn(r,2).getBytes()},o=ae.util.createBuffer();o.putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest()),o=o.getBytes();try{var s=e.session.clientCertificate;if(!s.publicKey.verify(o,a.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(i),e.session.sha1.update(i)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure}})}e.expect=lp,e.process()};L.handleServerHelloDone=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.insufficient_security}},i=0,a=e.verify(e,r.alert.description,i,[]);if(a!==!0)return(a||a===0)&&(typeof a=="object"&&!ae.util.isArray(a)?(a.message&&(r.message=a.message),a.alert&&(r.alert.description=a.alert)):typeof a=="number"&&(r.alert.description=a)),e.error(e,r)}e.session.certificateRequest!==null&&(t=L.createRecord(e,{type:L.ContentType.handshake,data:L.createCertificate(e)}),L.queue(e,t)),t=L.createRecord(e,{type:L.ContentType.handshake,data:L.createClientKeyExchange(e)}),L.queue(e,t),e.expect=uR;var o=function(s,l){s.session.certificateRequest!==null&&s.session.clientCertificate!==null&&L.queue(s,L.createRecord(s,{type:L.ContentType.handshake,data:L.createCertificateVerify(s,l)})),L.queue(s,L.createRecord(s,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),s.state.pending=L.createConnectionState(s),s.state.current.write=s.state.pending.write,L.queue(s,L.createRecord(s,{type:L.ContentType.handshake,data:L.createFinished(s)})),s.expect=PC,L.flush(s),s.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return o(e,null);L.getClientSignature(e,o)};L.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var n=e.entity===L.ConnectionEnd.client;(e.session.resuming&&n||!e.session.resuming&&!n)&&(e.state.pending=L.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&n||e.session.resuming&&!n)&&(e.state.pending=null),e.expect=n?sR:hR,e.process()};L.handleFinished=function(e,t,n){var r=t.fragment;r.read-=4;var i=r.bytes();r.read+=4;var a=t.fragment.getBytes();r=ae.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var o=e.entity===L.ConnectionEnd.client,s=o?"server finished":"client finished",l=e.session.sp,u=12,c=lf;if(r=c(l.master_secret,s,r.getBytes(),u),r.getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decrypt_error}});e.session.md5.update(i),e.session.sha1.update(i),(e.session.resuming&&o||!e.session.resuming&&!o)&&(L.queue(e,L.createRecord(e,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,L.queue(e,L.createRecord(e,{type:L.ContentType.handshake,data:L.createFinished(e)}))),e.expect=o?lR:gR,e.handshaking=!1,++e.handshakes,e.peerCertificate=o?e.session.serverCertificate:e.session.clientCertificate,L.flush(e),e.isConnected=!0,e.connected(e),e.process()};L.handleAlert=function(e,t){var n=t.fragment,r={level:n.getByte(),description:n.getByte()},i;switch(r.description){case L.Alert.Description.close_notify:i="Connection closed.";break;case L.Alert.Description.unexpected_message:i="Unexpected message.";break;case L.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case L.Alert.Description.decryption_failed:i="Decryption failed.";break;case L.Alert.Description.record_overflow:i="Record overflow.";break;case L.Alert.Description.decompression_failure:i="Decompression failed.";break;case L.Alert.Description.handshake_failure:i="Handshake failure.";break;case L.Alert.Description.bad_certificate:i="Bad certificate.";break;case L.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case L.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case L.Alert.Description.certificate_expired:i="Certificate expired.";break;case L.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case L.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case L.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case L.Alert.Description.access_denied:i="Access denied.";break;case L.Alert.Description.decode_error:i="Decode error.";break;case L.Alert.Description.decrypt_error:i="Decrypt error.";break;case L.Alert.Description.export_restriction:i="Export restriction.";break;case L.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case L.Alert.Description.insufficient_security:i="Insufficient security.";break;case L.Alert.Description.internal_error:i="Internal error.";break;case L.Alert.Description.user_canceled:i="User canceled.";break;case L.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error.";break}if(r.description===L.Alert.Description.close_notify)return e.close();e.error(e,{message:i,send:!1,origin:e.entity===L.ConnectionEnd.client?"server":"client",alert:r}),e.process()};L.handleHandshake=function(e,t){var n=t.fragment,r=n.getByte(),i=n.getInt24();if(i>n.length())return e.fragmented=t,t.fragment=ae.util.createBuffer(),n.read-=4,e.process();e.fragmented=null,n.read-=4;var a=n.bytes(i+4);n.read+=4,r in nd[e.entity][e.expect]?(e.entity===L.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:ae.md.md5.create(),sha1:ae.md.sha1.create()}),r!==L.HandshakeType.hello_request&&r!==L.HandshakeType.certificate_verify&&r!==L.HandshakeType.finished&&(e.session.md5.update(a),e.session.sha1.update(a)),nd[e.entity][e.expect][r](e,t,i)):L.handleUnexpected(e,t)};L.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};L.handleHeartbeat=function(e,t){var n=t.fragment,r=n.getByte(),i=n.getInt16(),a=n.getBytes(i);if(r===L.HeartbeatMessageType.heartbeat_request){if(e.handshaking||i>a.length)return e.process();L.queue(e,L.createRecord(e,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_response,a)})),L.flush(e)}else if(r===L.HeartbeatMessageType.heartbeat_response){if(a!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,ae.util.createBuffer(a))}e.process()};var rR=0,iR=1,B1=2,aR=3,oR=4,PC=5,sR=6,lR=7,uR=8,cR=0,dR=1,R0=2,fR=3,lp=4,hR=5,gR=6,M=L.handleUnexpected,FC=L.handleChangeCipherSpec,dn=L.handleAlert,Dn=L.handleHandshake,NC=L.handleApplicationData,fn=L.handleHeartbeat,up=[];up[L.ConnectionEnd.client]=[[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[FC,dn,M,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,NC,fn],[M,dn,Dn,M,fn]];up[L.ConnectionEnd.server]=[[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,M,fn],[FC,dn,M,M,fn],[M,dn,Dn,M,fn],[M,dn,Dn,NC,fn],[M,dn,Dn,M,fn]];var Zi=L.handleHelloRequest,pR=L.handleServerHello,MC=L.handleCertificate,$1=L.handleServerKeyExchange,Yf=L.handleCertificateRequest,$u=L.handleServerHelloDone,LC=L.handleFinished,nd=[];nd[L.ConnectionEnd.client]=[[M,M,pR,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,MC,$1,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,$1,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,Yf,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,$u,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,LC],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[Zi,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M]];var mR=L.handleClientHello,bR=L.handleClientKeyExchange,vR=L.handleCertificateVerify;nd[L.ConnectionEnd.server]=[[M,mR,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,MC,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,bR,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,vR,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,LC],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M]];L.generateKeys=function(e,t){var n=lf,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=n(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var i=2*t.mac_key_length+2*t.enc_key_length,a=e.version.major===L.Versions.TLS_1_0.major&&e.version.minor===L.Versions.TLS_1_0.minor;a&&(i+=2*t.fixed_iv_length);var o=n(t.master_secret,"key expansion",r,i),s={client_write_MAC_key:o.getBytes(t.mac_key_length),server_write_MAC_key:o.getBytes(t.mac_key_length),client_write_key:o.getBytes(t.enc_key_length),server_write_key:o.getBytes(t.enc_key_length)};return a&&(s.client_write_IV=o.getBytes(t.fixed_iv_length),s.server_write_IV=o.getBytes(t.fixed_iv_length)),s};L.createConnectionState=function(e){var t=e.entity===L.ConnectionEnd.client,n=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(o){return!0},compressionState:null,compressFunction:function(o){return!0},updateSequenceNumber:function(){a.sequenceNumber[1]===4294967295?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},r={read:n(),write:n()};if(r.read.update=function(a,o){return r.read.cipherFunction(o,r.read)?r.read.compressFunction(a,o,r.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decompression_failure}}):a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_record_mac}}),!a.fail},r.write.update=function(a,o){return r.write.compressFunction(a,o,r.write)?r.write.cipherFunction(o,r.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}),!a.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=L.generateKeys(e,i),r.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,r.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,i),i.compression_algorithm){case L.CompressionMethod.none:break;case L.CompressionMethod.deflate:r.read.compressFunction=nR,r.write.compressFunction=tR;break;default:throw new Error("Unsupported compression algorithm.")}}return r};L.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,n=ae.util.createBuffer();return n.putInt32(t),n.putBytes(ae.random.getBytes(28)),n};L.createRecord=function(e,t){if(!t.data)return null;var n={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return n};L.createAlert=function(e,t){var n=ae.util.createBuffer();return n.putByte(t.level),n.putByte(t.description),L.createRecord(e,{type:L.ContentType.alert,data:n})};L.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=ae.util.createBuffer(),n=0;n<e.cipherSuites.length;++n){var r=e.cipherSuites[n];t.putByte(r.id[0]),t.putByte(r.id[1])}var i=t.length(),a=ae.util.createBuffer();a.putByte(L.CompressionMethod.none);var o=a.length(),s=ae.util.createBuffer();if(e.virtualHost){var l=ae.util.createBuffer();l.putByte(0),l.putByte(0);var u=ae.util.createBuffer();u.putByte(0),gr(u,2,ae.util.createBuffer(e.virtualHost));var c=ae.util.createBuffer();gr(c,2,u),gr(l,2,c),s.putBuffer(l)}var d=s.length();d>0&&(d+=2);var h=e.session.id,f=h.length+1+2+4+28+2+i+1+o+d,g=ae.util.createBuffer();return g.putByte(L.HandshakeType.client_hello),g.putInt24(f),g.putByte(e.version.major),g.putByte(e.version.minor),g.putBytes(e.session.sp.client_random),gr(g,1,ae.util.createBuffer(h)),gr(g,2,t),gr(g,1,a),d>0&&gr(g,2,s),g};L.createServerHello=function(e){var t=e.session.id,n=t.length+1+2+4+28+2+1,r=ae.util.createBuffer();return r.putByte(L.HandshakeType.server_hello),r.putInt24(n),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),gr(r,1,ae.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r};L.createCertificate=function(e){var t=e.entity===L.ConnectionEnd.client,n=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,n=e.getCertificate(e,r)}var i=ae.util.createBuffer();if(n!==null)try{ae.util.isArray(n)||(n=[n]);for(var a=null,o=0;o<n.length;++o){var s=ae.pem.decode(n[o])[0];if(s.type!=="CERTIFICATE"&&s.type!=="X509 CERTIFICATE"&&s.type!=="TRUSTED CERTIFICATE"){var l=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw l.headerType=s.type,l}if(s.procType&&s.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=ae.util.createBuffer(s.body);a===null&&(a=ae.asn1.fromDer(u.bytes(),!1));var c=ae.util.createBuffer();gr(c,3,u),i.putBuffer(c)}n=ae.pki.certificateFromAsn1(a),t?e.session.clientCertificate=n:e.session.serverCertificate=n}catch(f){return e.error(e,{message:"Could not send certificate list.",cause:f,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var d=3+i.length(),h=ae.util.createBuffer();return h.putByte(L.HandshakeType.certificate),h.putInt24(d),gr(h,3,i),h};L.createClientKeyExchange=function(e){var t=ae.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(ae.random.getBytes(46));var n=e.session.sp;n.pre_master_secret=t.getBytes();var r=e.session.serverCertificate.publicKey;t=r.encrypt(n.pre_master_secret);var i=t.length+2,a=ae.util.createBuffer();return a.putByte(L.HandshakeType.client_key_exchange),a.putInt24(i),a.putInt16(t.length),a.putBytes(t),a};L.createServerKeyExchange=function(e){var t=ae.util.createBuffer();return t};L.getClientSignature=function(e,t){var n=ae.util.createBuffer();n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest()),n=n.getBytes(),e.getSignature=e.getSignature||function(r,i,a){var o=null;if(r.getPrivateKey)try{o=r.getPrivateKey(r,r.session.clientCertificate),o=ae.pki.privateKeyFromPem(o)}catch(s){r.error(r,{message:"Could not get private key.",cause:s,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}o===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}}):i=o.sign(i,null),a(r,i)},e.getSignature(e,n,t)};L.createCertificateVerify=function(e,t){var n=t.length+2,r=ae.util.createBuffer();return r.putByte(L.HandshakeType.certificate_verify),r.putInt24(n),r.putInt16(t.length),r.putBytes(t),r};L.createCertificateRequest=function(e){var t=ae.util.createBuffer();t.putByte(1);var n=ae.util.createBuffer();for(var r in e.caStore.certs){var i=e.caStore.certs[r],a=ae.pki.distinguishedNameToAsn1(i.subject),o=ae.asn1.toDer(a);n.putInt16(o.length()),n.putBuffer(o)}var s=1+t.length()+2+n.length(),l=ae.util.createBuffer();return l.putByte(L.HandshakeType.certificate_request),l.putInt24(s),gr(l,1,t),gr(l,2,n),l};L.createServerHelloDone=function(e){var t=ae.util.createBuffer();return t.putByte(L.HandshakeType.server_hello_done),t.putInt24(0),t};L.createChangeCipherSpec=function(){var e=ae.util.createBuffer();return e.putByte(1),e};L.createFinished=function(e){var t=ae.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var n=e.entity===L.ConnectionEnd.client,r=e.session.sp,i=12,a=lf,o=n?"client finished":"server finished";t=a(r.master_secret,o,t.getBytes(),i);var s=ae.util.createBuffer();return s.putByte(L.HandshakeType.finished),s.putInt24(t.length()),s.putBuffer(t),s};L.createHeartbeat=function(e,t,n){typeof n>"u"&&(n=t.length);var r=ae.util.createBuffer();r.putByte(e),r.putInt16(n),r.putBytes(t);var i=r.length(),a=Math.max(16,i-n-3);return r.putBytes(ae.random.getBytes(a)),r};L.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===L.ContentType.handshake||t.type===L.ContentType.alert||t.type===L.ContentType.change_cipher_spec))){if(t.type===L.ContentType.handshake){var n=t.fragment.bytes();e.session.md5.update(n),e.session.sha1.update(n),n=null}var r;if(t.fragment.length()<=L.MaxFragment)r=[t];else{r=[];for(var i=t.fragment.bytes();i.length>L.MaxFragment;)r.push(L.createRecord(e,{type:t.type,data:ae.util.createBuffer(i.slice(0,L.MaxFragment))})),i=i.slice(L.MaxFragment);i.length>0&&r.push(L.createRecord(e,{type:t.type,data:ae.util.createBuffer(i)}))}for(var a=0;a<r.length&&!e.fail;++a){var o=r[a],s=e.state.current.write;s.update(e,o)&&e.records.push(o)}}};L.flush=function(e){for(var t=0;t<e.records.length;++t){var n=e.records[t];e.tlsData.putByte(n.type),e.tlsData.putByte(n.version.major),e.tlsData.putByte(n.version.minor),e.tlsData.putInt16(n.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var Kf=function(e){switch(e){case!0:return!0;case ae.pki.certificateError.bad_certificate:return L.Alert.Description.bad_certificate;case ae.pki.certificateError.unsupported_certificate:return L.Alert.Description.unsupported_certificate;case ae.pki.certificateError.certificate_revoked:return L.Alert.Description.certificate_revoked;case ae.pki.certificateError.certificate_expired:return L.Alert.Description.certificate_expired;case ae.pki.certificateError.certificate_unknown:return L.Alert.Description.certificate_unknown;case ae.pki.certificateError.unknown_ca:return L.Alert.Description.unknown_ca;default:return L.Alert.Description.bad_certificate}},yR=function(e){switch(e){case!0:return!0;case L.Alert.Description.bad_certificate:return ae.pki.certificateError.bad_certificate;case L.Alert.Description.unsupported_certificate:return ae.pki.certificateError.unsupported_certificate;case L.Alert.Description.certificate_revoked:return ae.pki.certificateError.certificate_revoked;case L.Alert.Description.certificate_expired:return ae.pki.certificateError.certificate_expired;case L.Alert.Description.certificate_unknown:return ae.pki.certificateError.certificate_unknown;case L.Alert.Description.unknown_ca:return ae.pki.certificateError.unknown_ca;default:return ae.pki.certificateError.bad_certificate}};L.verifyCertificateChain=function(e,t){try{var n={};for(var r in e.verifyOptions)n[r]=e.verifyOptions[r];n.verify=function(a,o,s){var l=Kf(a),u=e.verify(e,a,o,s);if(u!==!0){if(typeof u=="object"&&!ae.util.isArray(u)){var c=new Error("The application rejected the certificate.");throw c.send=!0,c.alert={level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate},u.message&&(c.message=u.message),u.alert&&(c.alert.description=u.alert),c}u!==a&&(u=yR(u))}return u},ae.pki.verifyCertificateChain(e.caStore,t,n)}catch(a){var i=a;(typeof i!="object"||ae.util.isArray(i))&&(i={send:!0,alert:{level:L.Alert.Level.fatal,description:Kf(a)}}),"send"in i||(i.send=!0),"alert"in i||(i.alert={level:L.Alert.Level.fatal,description:Kf(i.error)}),e.error(e,i)}return!e.fail};L.createSessionCache=function(e,t){var n=null;if(e&&e.getSession&&e.setSession&&e.order)n=e;else{n={},n.cache=e||{},n.capacity=Math.max(t||100,1),n.order=[];for(var r in e)n.order.length<=t?n.order.push(r):delete e[r];n.getSession=function(i){var a=null,o=null;if(i?o=ae.util.bytesToHex(i):n.order.length>0&&(o=n.order[0]),o!==null&&o in n.cache){a=n.cache[o],delete n.cache[o];for(var s in n.order)if(n.order[s]===o){n.order.splice(s,1);break}}return a},n.setSession=function(i,a){if(n.order.length===n.capacity){var o=n.order.shift();delete n.cache[o]}var o=ae.util.bytesToHex(i);n.order.push(o),n.cache[o]=a}}return n};L.createConnection=function(e){var t=null;e.caStore?ae.util.isArray(e.caStore)?t=ae.pki.createCaStore(e.caStore):t=e.caStore:t=ae.pki.createCaStore();var n=e.cipherSuites||null;if(n===null){n=[];for(var r in L.CipherSuites)n.push(L.CipherSuites[r])}var i=e.server?L.ConnectionEnd.server:L.ConnectionEnd.client,a=e.sessionCache?L.createSessionCache(e.sessionCache):null,o={version:{major:L.Version.major,minor:L.Version.minor},entity:i,sessionId:e.sessionId,caStore:t,sessionCache:a,cipherSuites:n,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,d,h,f){return d},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:ae.util.createBuffer(),tlsData:ae.util.createBuffer(),data:ae.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,d){d.origin=d.origin||(c.entity===L.ConnectionEnd.client?"client":"server"),d.send&&(L.queue(c,L.createAlert(c,d.alert)),L.flush(c));var h=d.fatal!==!1;h&&(c.fail=!0),e.error(c,d),h&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};o.reset=function(c){o.version={major:L.Version.major,minor:L.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=o.entity===L.ConnectionEnd.client?rR:cR,o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(c||typeof c>"u"),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=L.createConnectionState(o)},o.reset();var s=function(c,d){var h=d.type-L.ContentType.change_cipher_spec,f=up[c.entity][c.expect];h in f?f[h](c,d):L.handleUnexpected(c,d)},l=function(c){var d=0,h=c.input,f=h.length();if(f<5)d=5-f;else{c.record={type:h.getByte(),version:{major:h.getByte(),minor:h.getByte()},length:h.getInt16(),fragment:ae.util.createBuffer(),ready:!1};var g=c.record.version.major===c.version.major;g&&c.session&&c.session.version&&(g=c.record.version.minor===c.version.minor),g||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}})}return d},u=function(c){var d=0,h=c.input,f=h.length();if(f<c.record.length)d=c.record.length-f;else{c.record.fragment.putBytes(h.getBytes(c.record.length)),h.compact();var g=c.state.current.read;g.update(c,c.record)&&(c.fragmented!==null&&(c.fragmented.type===c.record.type?(c.fragmented.fragment.putBuffer(c.record.fragment),c.record=c.fragmented):c.error(c,{message:"Invalid fragmented record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}})),c.record.ready=!0)}return d};return o.handshake=function(c){if(o.entity!==L.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&o.handshakes===0&&(o.fail=!1),o.handshaking=!0,c=c||"";var d=null;c.length>0&&(o.sessionCache&&(d=o.sessionCache.getSession(c)),d===null&&(c="")),c.length===0&&o.sessionCache&&(d=o.sessionCache.getSession(),d!==null&&(c=d.id)),o.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:ae.md.md5.create(),sha1:ae.md.sha1.create()},d&&(o.version=d.version,o.session.sp=d.sp),o.session.sp.client_random=L.createRandom().getBytes(),o.open=!0,L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createClientHello(o)})),L.flush(o)}},o.process=function(c){var d=0;return c&&o.input.putBytes(c),o.fail||(o.record!==null&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),o.record===null&&(d=l(o)),!o.fail&&o.record!==null&&!o.record.ready&&(d=u(o)),!o.fail&&o.record!==null&&o.record.ready&&s(o,o.record)),d},o.prepare=function(c){return L.queue(o,L.createRecord(o,{type:L.ContentType.application_data,data:ae.util.createBuffer(c)})),L.flush(o)},o.prepareHeartbeatRequest=function(c,d){return c instanceof ae.util.ByteBuffer&&(c=c.bytes()),typeof d>"u"&&(d=c.length),o.expectedHeartbeatPayload=c,L.queue(o,L.createRecord(o,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_request,c,d)})),L.flush(o)},o.close=function(c){if(!o.fail&&o.sessionCache&&o.session){var d={id:o.session.id,version:o.session.version,sp:o.session.sp};d.sp.keys=null,o.sessionCache.setSession(d.id,d)}o.open&&(o.open=!1,o.input.clear(),(o.isConnected||o.handshaking)&&(o.isConnected=o.handshaking=!1,L.queue(o,L.createAlert(o,{level:L.Alert.Level.warning,description:L.Alert.Description.close_notify})),L.flush(o)),o.closed(o)),o.reset(c)},o};ae.tls=ae.tls||{};for(var qf in L)typeof L[qf]!="function"&&(ae.tls[qf]=L[qf]);ae.tls.prf_tls1=lf;ae.tls.hmac_sha1=eR;ae.tls.createSessionCache=L.createSessionCache;ae.tls.createConnection=L.createConnection;var pa=ze,yr=pa.tls;yr.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=yr.BulkCipherAlgorithm.aes,e.cipher_type=yr.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=yr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:OC};yr.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=yr.BulkCipherAlgorithm.aes,e.cipher_type=yr.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=yr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:OC};function OC(e,t,n){var r=t.entity===pa.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:pa.cipher.createDecipher("AES-CBC",r?n.keys.server_write_key:n.keys.client_write_key),iv:r?n.keys.server_write_IV:n.keys.client_write_IV},e.write.cipherState={init:!1,cipher:pa.cipher.createCipher("AES-CBC",r?n.keys.client_write_key:n.keys.server_write_key),iv:r?n.keys.client_write_IV:n.keys.server_write_IV},e.read.cipherFunction=SR,e.write.cipherFunction=xR,e.read.macLength=e.write.macLength=n.mac_length,e.read.macFunction=e.write.macFunction=yr.hmac_sha1}function xR(e,t){var n=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var i;e.version.minor===yr.Versions.TLS_1_0.minor?i=t.cipherState.init?null:t.cipherState.iv:i=pa.random.getBytesSync(16),t.cipherState.init=!0;var a=t.cipherState.cipher;return a.start({iv:i}),e.version.minor>=yr.Versions.TLS_1_1.minor&&a.output.putBytes(i),a.update(e.fragment),a.finish(CR)&&(e.fragment=a.output,e.length=e.fragment.length(),n=!0),n}function CR(e,t,n){if(!n){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function ER(e,t,n){var r=!0;if(n){for(var i=t.length(),a=t.last(),o=i-1-a;o<i-1;++o)r=r&&t.at(o)==a;r&&t.truncate(a+1)}return r}function SR(e,t){var n=!1,r;e.version.minor===yr.Versions.TLS_1_0.minor?r=t.cipherState.init?null:t.cipherState.iv:r=e.fragment.getBytes(16),t.cipherState.init=!0;var i=t.cipherState.cipher;i.start({iv:r}),i.update(e.fragment),n=i.finish(ER);var a=t.macLength,o=pa.random.getBytesSync(a),s=i.output.length();s>=a?(e.fragment=i.output.getBytes(s-a),o=i.output.getBytes(a)):e.fragment=i.output.getBytes(),e.fragment=pa.util.createBuffer(e.fragment),e.length=e.fragment.length();var l=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),n=wR(t.macKey,o,l)&&n,n}function wR(e,t,n){var r=pa.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(n),n=r.digest().getBytes(),t===n}var It=ze,hu=It.sha512=It.sha512||{};It.md.sha512=It.md.algorithms.sha512=hu;var VC=It.sha384=It.sha512.sha384=It.sha512.sha384||{};VC.create=function(){return hu.create("SHA-384")};It.md.sha384=It.md.algorithms.sha384=VC;It.sha512.sha256=It.sha512.sha256||{create:function(){return hu.create("SHA-512/256")}};It.md["sha512/256"]=It.md.algorithms["sha512/256"]=It.sha512.sha256;It.sha512.sha224=It.sha512.sha224||{create:function(){return hu.create("SHA-512/224")}};It.md["sha512/224"]=It.md.algorithms["sha512/224"]=It.sha512.sha224;hu.create=function(e){if(HC||IR(),typeof e>"u"&&(e="SHA-512"),!(e in Ua))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Ua[e],n=null,r=It.util.createBuffer(),i=new Array(80),a=0;a<80;++a)i[a]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var s={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return s.start=function(){s.messageLength=0,s.fullMessageLength=s.messageLength128=[];for(var l=s.messageLengthSize/4,u=0;u<l;++u)s.fullMessageLength.push(0);r=It.util.createBuffer(),n=new Array(t.length);for(var u=0;u<t.length;++u)n[u]=t[u].slice(0);return s},s.start(),s.update=function(l,u){u==="utf8"&&(l=It.util.encodeUtf8(l));var c=l.length;s.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var d=s.fullMessageLength.length-1;d>=0;--d)s.fullMessageLength[d]+=c[1],c[1]=c[0]+(s.fullMessageLength[d]/4294967296>>>0),s.fullMessageLength[d]=s.fullMessageLength[d]>>>0,c[0]=c[1]/4294967296>>>0;return r.putBytes(l),k1(n,i,r),(r.read>2048||r.length()===0)&&r.compact(),s},s.digest=function(){var l=It.util.createBuffer();l.putBytes(r.bytes());var u=s.fullMessageLength[s.fullMessageLength.length-1]+s.messageLengthSize,c=u&s.blockLength-1;l.putBytes(B0.substr(0,s.blockLength-c));for(var d,h,f=s.fullMessageLength[0]*8,g=0;g<s.fullMessageLength.length-1;++g)d=s.fullMessageLength[g+1]*8,h=d/4294967296>>>0,f+=h,l.putInt32(f>>>0),f=d>>>0;l.putInt32(f);for(var p=new Array(n.length),g=0;g<n.length;++g)p[g]=n[g].slice(0);k1(p,i,l);var m=It.util.createBuffer(),b;e==="SHA-512"?b=p.length:e==="SHA-384"?b=p.length-2:b=p.length-4;for(var g=0;g<b;++g)m.putInt32(p[g][0]),(g!==b-1||e!=="SHA-512/224")&&m.putInt32(p[g][1]);return m},s};var B0=null,HC=!1,$0=null,Ua=null;function IR(){B0="",B0+=It.util.fillString("\0",128),$0=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Ua={},Ua["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Ua["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Ua["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Ua["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],HC=!0}function k1(e,t,n){for(var r,i,a,o,s,l,u,c,d,h,f,g,p,m,b,v,x,C,E,w,B,y,S,D,A,T,F,k,P,$,R,O,j,V,W,U=n.length();U>=128;){for(P=0;P<16;++P)t[P][0]=n.getInt32()>>>0,t[P][1]=n.getInt32()>>>0;for(;P<80;++P)O=t[P-2],$=O[0],R=O[1],r=(($>>>19|R<<13)^(R>>>29|$<<3)^$>>>6)>>>0,i=(($<<13|R>>>19)^(R<<3|$>>>29)^($<<26|R>>>6))>>>0,V=t[P-15],$=V[0],R=V[1],a=(($>>>1|R<<31)^($>>>8|R<<24)^$>>>7)>>>0,o=(($<<31|R>>>1)^($<<24|R>>>8)^($<<25|R>>>7))>>>0,j=t[P-7],W=t[P-16],R=i+j[1]+o+W[1],t[P][0]=r+j[0]+a+W[0]+(R/4294967296>>>0)>>>0,t[P][1]=R>>>0;for(p=e[0][0],m=e[0][1],b=e[1][0],v=e[1][1],x=e[2][0],C=e[2][1],E=e[3][0],w=e[3][1],B=e[4][0],y=e[4][1],S=e[5][0],D=e[5][1],A=e[6][0],T=e[6][1],F=e[7][0],k=e[7][1],P=0;P<80;++P)u=((B>>>14|y<<18)^(B>>>18|y<<14)^(y>>>9|B<<23))>>>0,c=((B<<18|y>>>14)^(B<<14|y>>>18)^(y<<23|B>>>9))>>>0,d=(A^B&(S^A))>>>0,h=(T^y&(D^T))>>>0,s=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,l=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,f=(p&b|x&(p^b))>>>0,g=(m&v|C&(m^v))>>>0,R=k+c+h+$0[P][1]+t[P][1],r=F+u+d+$0[P][0]+t[P][0]+(R/4294967296>>>0)>>>0,i=R>>>0,R=l+g,a=s+f+(R/4294967296>>>0)>>>0,o=R>>>0,F=A,k=T,A=S,T=D,S=B,D=y,R=w+i,B=E+r+(R/4294967296>>>0)>>>0,y=R>>>0,E=x,w=C,x=b,C=v,b=p,v=m,R=i+o,p=r+a+(R/4294967296>>>0)>>>0,m=R>>>0;R=e[0][1]+m,e[0][0]=e[0][0]+p+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+v,e[1][0]=e[1][0]+b+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+C,e[2][0]=e[2][0]+x+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+w,e[3][0]=e[3][0]+E+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+y,e[4][0]=e[4][0]+B+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+D,e[5][0]=e[5][0]+S+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+T,e[6][0]=e[6][0]+A+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+k,e[7][0]=e[7][0]+F+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,U-=128}}var cp={},_R=ze,tn=_R.asn1;cp.privateKeyValidator={name:"PrivateKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:tn.Class.UNIVERSAL,type:tn.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};cp.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:tn.Class.UNIVERSAL,type:tn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:tn.Class.UNIVERSAL,type:tn.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:tn.Class.UNIVERSAL,type:tn.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]};var gn=ze,jC=cp,DR=jC.publicKeyValidator,AR=jC.privateKeyValidator;if(typeof TR>"u")var TR=gn.jsbn.BigInteger;var k0=gn.util.ByteBuffer,Hn=typeof Buffer>"u"?Uint8Array:Buffer;gn.pki=gn.pki||{};gn.pki.ed25519=gn.ed25519=gn.ed25519||{};var Ze=gn.ed25519;Ze.constants={};Ze.constants.PUBLIC_KEY_BYTE_LENGTH=32;Ze.constants.PRIVATE_KEY_BYTE_LENGTH=64;Ze.constants.SEED_BYTE_LENGTH=32;Ze.constants.SIGN_BYTE_LENGTH=64;Ze.constants.HASH_BYTE_LENGTH=64;Ze.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=gn.random.getBytesSync(Ze.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==Ze.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Ze.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=Li({message:t,encoding:"binary"});for(var n=new Hn(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),r=new Hn(Ze.constants.PRIVATE_KEY_BYTE_LENGTH),i=0;i<32;++i)r[i]=t[i];return kR(n,r),{publicKey:n,privateKey:r}};Ze.privateKeyFromAsn1=function(e){var t={},n=[],r=gn.asn1.validate(e,AR,t,n);if(!r){var i=new Error("Invalid Key.");throw i.errors=n,i}var a=gn.asn1.derToOid(t.privateKeyOid),o=gn.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var s=t.privateKey,l=Li({message:gn.asn1.fromDer(s).value,encoding:"binary"});return{privateKeyBytes:l}};Ze.publicKeyFromAsn1=function(e){var t={},n=[],r=gn.asn1.validate(e,DR,t,n);if(!r){var i=new Error("Invalid Key.");throw i.errors=n,i}var a=gn.asn1.derToOid(t.publicKeyOid),o=gn.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var s=t.ed25519PublicKey;if(s.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Li({message:s,encoding:"binary"})};Ze.publicKeyFromPrivateKey=function(e){e=e||{};var t=Li({message:e.privateKey,encoding:"binary"});if(t.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);for(var n=new Hn(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r<n.length;++r)n[r]=t[32+r];return n};Ze.sign=function(e){e=e||{};var t=Li(e),n=Li({message:e.privateKey,encoding:"binary"});if(n.length===Ze.constants.SEED_BYTE_LENGTH){var r=Ze.generateKeyPair({seed:n});n=r.privateKey}else if(n.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.SEED_BYTE_LENGTH+" or "+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length);PR(i,t,t.length,n);for(var a=new Hn(Ze.constants.SIGN_BYTE_LENGTH),o=0;o<a.length;++o)a[o]=i[o];return a};Ze.verify=function(e){e=e||{};var t=Li(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var n=Li({message:e.signature,encoding:"binary"});if(n.length!==Ze.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Ze.constants.SIGN_BYTE_LENGTH);var r=Li({message:e.publicKey,encoding:"binary"});if(r.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Ze.constants.PUBLIC_KEY_BYTE_LENGTH);var i=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length),a=new Hn(Ze.constants.SIGN_BYTE_LENGTH+t.length),o;for(o=0;o<Ze.constants.SIGN_BYTE_LENGTH;++o)i[o]=n[o];for(o=0;o<t.length;++o)i[o+Ze.constants.SIGN_BYTE_LENGTH]=t[o];return FR(a,i,i.length,r)>=0};function Li(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Hn)return t;var n=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),n="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,n);t=new k0(t,n)}else if(!(t instanceof k0))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new Hn(t.length()),i=0;i<r.length;++i)r[i]=t.at(i);return r}var P0=ke(),rd=ke([1]),RR=ke([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),BR=ke([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),P1=ke([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),F1=ke([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Jf=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),$R=ke([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function cl(e,t){var n=gn.md.sha512.create(),r=new k0(e);n.update(r.getBytes(t),"binary");var i=n.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(i,"binary");for(var a=new Hn(Ze.constants.HASH_BYTE_LENGTH),o=0;o<64;++o)a[o]=i.charCodeAt(o);return a}function kR(e,t){var n=[ke(),ke(),ke(),ke()],r,i=cl(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,fp(n,i),dp(e,n),r=0;r<32;++r)t[r+32]=e[r];return 0}function PR(e,t,n,r){var i,a,o=new Float64Array(64),s=[ke(),ke(),ke(),ke()],l=cl(r,32);l[0]&=248,l[31]&=127,l[31]|=64;var u=n+64;for(i=0;i<n;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=l[32+i];var c=cl(e.subarray(32),n+32);for(F0(c),fp(s,c),dp(e,s),i=32;i<64;++i)e[i]=r[i];var d=cl(e,n+64);for(F0(d),i=32;i<64;++i)o[i]=0;for(i=0;i<32;++i)o[i]=c[i];for(i=0;i<32;++i)for(a=0;a<32;a++)o[i+a]+=d[i]*l[a];return WC(e.subarray(32),o),u}function FR(e,t,n,r){var i,a,o=new Hn(32),s=[ke(),ke(),ke(),ke()],l=[ke(),ke(),ke(),ke()];if(a=-1,n<64||NR(l,r))return-1;for(i=0;i<n;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=r[i];var u=cl(e,n);if(F0(u),UC(s,l,u),fp(l,t.subarray(32)),N0(s,l),dp(o,s),n-=64,zC(t,0,o,0)){for(i=0;i<n;++i)e[i]=0;return-1}for(i=0;i<n;++i)e[i]=t[i+64];return a=n,a}function WC(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*Jf[i-(r-32)],n=t[i]+128>>8,t[i]-=n*256;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;++i)t[i]+=n-(t[31]>>4)*Jf[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=n*Jf[i];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function F0(e){for(var t=new Float64Array(64),n=0;n<64;++n)t[n]=e[n],e[n]=0;WC(e,t)}function N0(e,t){var n=ke(),r=ke(),i=ke(),a=ke(),o=ke(),s=ke(),l=ke(),u=ke(),c=ke();Yo(n,e[1],e[0]),Yo(c,t[1],t[0]),vt(n,n,c),Go(r,e[0],e[1]),Go(c,t[0],t[1]),vt(r,r,c),vt(i,e[3],t[3]),vt(i,i,BR),vt(a,e[2],t[2]),Go(a,a,a),Yo(o,r,n),Yo(s,a,i),Go(l,a,i),Go(u,r,n),vt(e[0],o,s),vt(e[1],u,l),vt(e[2],l,s),vt(e[3],o,u)}function N1(e,t,n){for(var r=0;r<4;++r)XC(e[r],t[r],n)}function dp(e,t){var n=ke(),r=ke(),i=ke();VR(i,t[2]),vt(n,t[0],i),vt(r,t[1],i),id(e,r),e[31]^=GC(n)<<7}function id(e,t){var n,r,i,a=ke(),o=ke();for(n=0;n<16;++n)o[n]=t[n];for(Qf(o),Qf(o),Qf(o),r=0;r<2;++r){for(a[0]=o[0]-65517,n=1;n<15;++n)a[n]=o[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,XC(o,a,1-i)}for(n=0;n<16;n++)e[2*n]=o[n]&255,e[2*n+1]=o[n]>>8}function NR(e,t){var n=ke(),r=ke(),i=ke(),a=ke(),o=ke(),s=ke(),l=ke();return sa(e[2],rd),MR(e[1],t),Xa(i,e[1]),vt(a,i,RR),Yo(i,i,e[2]),Go(a,e[2],a),Xa(o,a),Xa(s,o),vt(l,s,o),vt(n,l,i),vt(n,n,a),LR(n,n),vt(n,n,i),vt(n,n,a),vt(n,n,a),vt(e[0],n,a),Xa(r,e[0]),vt(r,r,a),M1(r,i)&&vt(e[0],e[0],$R),Xa(r,e[0]),vt(r,r,a),M1(r,i)?-1:(GC(e[0])===t[31]>>7&&Yo(e[0],P0,e[0]),vt(e[3],e[0],e[1]),0)}function MR(e,t){var n;for(n=0;n<16;++n)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function LR(e,t){var n=ke(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)Xa(n,n),r!==1&&vt(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function M1(e,t){var n=new Hn(32),r=new Hn(32);return id(n,e),id(r,t),zC(n,0,r,0)}function zC(e,t,n,r){return OR(e,t,n,r,32)}function OR(e,t,n,r,i){var a,o=0;for(a=0;a<i;++a)o|=e[t+a]^n[r+a];return(1&o-1>>>8)-1}function GC(e){var t=new Hn(32);return id(t,e),t[0]&1}function UC(e,t,n){var r,i;for(sa(e[0],P0),sa(e[1],rd),sa(e[2],rd),sa(e[3],P0),i=255;i>=0;--i)r=n[i/8|0]>>(i&7)&1,N1(e,t,r),N0(t,e),N0(e,e),N1(e,t,r)}function fp(e,t){var n=[ke(),ke(),ke(),ke()];sa(n[0],P1),sa(n[1],F1),sa(n[2],rd),vt(n[3],P1,F1),UC(e,n,t)}function sa(e,t){var n;for(n=0;n<16;n++)e[n]=t[n]|0}function VR(e,t){var n=ke(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)Xa(n,n),r!==2&&r!==4&&vt(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function Qf(e){var t,n,r=1;for(t=0;t<16;++t)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-r*65536;e[0]+=r-1+37*(r-1)}function XC(e,t,n){for(var r,i=~(n-1),a=0;a<16;++a)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function ke(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;++t)n[t]=e[t];return n}function Go(e,t,n){for(var r=0;r<16;++r)e[r]=t[r]+n[r]}function Yo(e,t,n){for(var r=0;r<16;++r)e[r]=t[r]-n[r]}function Xa(e,t){vt(e,t,t)}function vt(e,t,n){var r,i,a=0,o=0,s=0,l=0,u=0,c=0,d=0,h=0,f=0,g=0,p=0,m=0,b=0,v=0,x=0,C=0,E=0,w=0,B=0,y=0,S=0,D=0,A=0,T=0,F=0,k=0,P=0,$=0,R=0,O=0,j=0,V=n[0],W=n[1],U=n[2],K=n[3],ee=n[4],z=n[5],H=n[6],X=n[7],te=n[8],ie=n[9],le=n[10],ce=n[11],Q=n[12],be=n[13],Ce=n[14],Se=n[15];r=t[0],a+=r*V,o+=r*W,s+=r*U,l+=r*K,u+=r*ee,c+=r*z,d+=r*H,h+=r*X,f+=r*te,g+=r*ie,p+=r*le,m+=r*ce,b+=r*Q,v+=r*be,x+=r*Ce,C+=r*Se,r=t[1],o+=r*V,s+=r*W,l+=r*U,u+=r*K,c+=r*ee,d+=r*z,h+=r*H,f+=r*X,g+=r*te,p+=r*ie,m+=r*le,b+=r*ce,v+=r*Q,x+=r*be,C+=r*Ce,E+=r*Se,r=t[2],s+=r*V,l+=r*W,u+=r*U,c+=r*K,d+=r*ee,h+=r*z,f+=r*H,g+=r*X,p+=r*te,m+=r*ie,b+=r*le,v+=r*ce,x+=r*Q,C+=r*be,E+=r*Ce,w+=r*Se,r=t[3],l+=r*V,u+=r*W,c+=r*U,d+=r*K,h+=r*ee,f+=r*z,g+=r*H,p+=r*X,m+=r*te,b+=r*ie,v+=r*le,x+=r*ce,C+=r*Q,E+=r*be,w+=r*Ce,B+=r*Se,r=t[4],u+=r*V,c+=r*W,d+=r*U,h+=r*K,f+=r*ee,g+=r*z,p+=r*H,m+=r*X,b+=r*te,v+=r*ie,x+=r*le,C+=r*ce,E+=r*Q,w+=r*be,B+=r*Ce,y+=r*Se,r=t[5],c+=r*V,d+=r*W,h+=r*U,f+=r*K,g+=r*ee,p+=r*z,m+=r*H,b+=r*X,v+=r*te,x+=r*ie,C+=r*le,E+=r*ce,w+=r*Q,B+=r*be,y+=r*Ce,S+=r*Se,r=t[6],d+=r*V,h+=r*W,f+=r*U,g+=r*K,p+=r*ee,m+=r*z,b+=r*H,v+=r*X,x+=r*te,C+=r*ie,E+=r*le,w+=r*ce,B+=r*Q,y+=r*be,S+=r*Ce,D+=r*Se,r=t[7],h+=r*V,f+=r*W,g+=r*U,p+=r*K,m+=r*ee,b+=r*z,v+=r*H,x+=r*X,C+=r*te,E+=r*ie,w+=r*le,B+=r*ce,y+=r*Q,S+=r*be,D+=r*Ce,A+=r*Se,r=t[8],f+=r*V,g+=r*W,p+=r*U,m+=r*K,b+=r*ee,v+=r*z,x+=r*H,C+=r*X,E+=r*te,w+=r*ie,B+=r*le,y+=r*ce,S+=r*Q,D+=r*be,A+=r*Ce,T+=r*Se,r=t[9],g+=r*V,p+=r*W,m+=r*U,b+=r*K,v+=r*ee,x+=r*z,C+=r*H,E+=r*X,w+=r*te,B+=r*ie,y+=r*le,S+=r*ce,D+=r*Q,A+=r*be,T+=r*Ce,F+=r*Se,r=t[10],p+=r*V,m+=r*W,b+=r*U,v+=r*K,x+=r*ee,C+=r*z,E+=r*H,w+=r*X,B+=r*te,y+=r*ie,S+=r*le,D+=r*ce,A+=r*Q,T+=r*be,F+=r*Ce,k+=r*Se,r=t[11],m+=r*V,b+=r*W,v+=r*U,x+=r*K,C+=r*ee,E+=r*z,w+=r*H,B+=r*X,y+=r*te,S+=r*ie,D+=r*le,A+=r*ce,T+=r*Q,F+=r*be,k+=r*Ce,P+=r*Se,r=t[12],b+=r*V,v+=r*W,x+=r*U,C+=r*K,E+=r*ee,w+=r*z,B+=r*H,y+=r*X,S+=r*te,D+=r*ie,A+=r*le,T+=r*ce,F+=r*Q,k+=r*be,P+=r*Ce,$+=r*Se,r=t[13],v+=r*V,x+=r*W,C+=r*U,E+=r*K,w+=r*ee,B+=r*z,y+=r*H,S+=r*X,D+=r*te,A+=r*ie,T+=r*le,F+=r*ce,k+=r*Q,P+=r*be,$+=r*Ce,R+=r*Se,r=t[14],x+=r*V,C+=r*W,E+=r*U,w+=r*K,B+=r*ee,y+=r*z,S+=r*H,D+=r*X,A+=r*te,T+=r*ie,F+=r*le,k+=r*ce,P+=r*Q,$+=r*be,R+=r*Ce,O+=r*Se,r=t[15],C+=r*V,E+=r*W,w+=r*U,B+=r*K,y+=r*ee,S+=r*z,D+=r*H,A+=r*X,T+=r*te,F+=r*ie,k+=r*le,P+=r*ce,$+=r*Q,R+=r*be,O+=r*Ce,j+=r*Se,a+=38*E,o+=38*w,s+=38*B,l+=38*y,u+=38*S,c+=38*D,d+=38*A,h+=38*T,f+=38*F,g+=38*k,p+=38*P,m+=38*$,b+=38*R,v+=38*O,x+=38*j,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-i*65536,r=o+i+65535,i=Math.floor(r/65536),o=r-i*65536,r=s+i+65535,i=Math.floor(r/65536),s=r-i*65536,r=l+i+65535,i=Math.floor(r/65536),l=r-i*65536,r=u+i+65535,i=Math.floor(r/65536),u=r-i*65536,r=c+i+65535,i=Math.floor(r/65536),c=r-i*65536,r=d+i+65535,i=Math.floor(r/65536),d=r-i*65536,r=h+i+65535,i=Math.floor(r/65536),h=r-i*65536,r=f+i+65535,i=Math.floor(r/65536),f=r-i*65536,r=g+i+65535,i=Math.floor(r/65536),g=r-i*65536,r=p+i+65535,i=Math.floor(r/65536),p=r-i*65536,r=m+i+65535,i=Math.floor(r/65536),m=r-i*65536,r=b+i+65535,i=Math.floor(r/65536),b=r-i*65536,r=v+i+65535,i=Math.floor(r/65536),v=r-i*65536,r=x+i+65535,i=Math.floor(r/65536),x=r-i*65536,r=C+i+65535,i=Math.floor(r/65536),C=r-i*65536,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-i*65536,r=o+i+65535,i=Math.floor(r/65536),o=r-i*65536,r=s+i+65535,i=Math.floor(r/65536),s=r-i*65536,r=l+i+65535,i=Math.floor(r/65536),l=r-i*65536,r=u+i+65535,i=Math.floor(r/65536),u=r-i*65536,r=c+i+65535,i=Math.floor(r/65536),c=r-i*65536,r=d+i+65535,i=Math.floor(r/65536),d=r-i*65536,r=h+i+65535,i=Math.floor(r/65536),h=r-i*65536,r=f+i+65535,i=Math.floor(r/65536),f=r-i*65536,r=g+i+65535,i=Math.floor(r/65536),g=r-i*65536,r=p+i+65535,i=Math.floor(r/65536),p=r-i*65536,r=m+i+65535,i=Math.floor(r/65536),m=r-i*65536,r=b+i+65535,i=Math.floor(r/65536),b=r-i*65536,r=v+i+65535,i=Math.floor(r/65536),v=r-i*65536,r=x+i+65535,i=Math.floor(r/65536),x=r-i*65536,r=C+i+65535,i=Math.floor(r/65536),C=r-i*65536,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=l,e[4]=u,e[5]=c,e[6]=d,e[7]=h,e[8]=f,e[9]=g,e[10]=p,e[11]=m,e[12]=b,e[13]=v,e[14]=x,e[15]=C}var qn=ze;qn.kem=qn.kem||{};var L1=qn.jsbn.BigInteger;qn.kem.rsa={};qn.kem.rsa.create=function(e,t){t=t||{};var n=t.prng||qn.random,r={};return r.encrypt=function(i,a){var o=Math.ceil(i.n.bitLength()/8),s;do s=new L1(qn.util.bytesToHex(n.getBytesSync(o)),16).mod(i.n);while(s.compareTo(L1.ONE)<=0);s=qn.util.hexToBytes(s.toString(16));var l=o-s.length;l>0&&(s=qn.util.fillString("\0",l)+s);var u=i.encrypt(s,"NONE"),c=e.generate(s,a);return{encapsulation:u,key:c}},r.decrypt=function(i,a,o){var s=i.decrypt(a,"NONE");return e.generate(s,o)},r};qn.kem.kdf1=function(e,t){ZC(this,e,0,t||e.digestLength)};qn.kem.kdf2=function(e,t){ZC(this,e,1,t||e.digestLength)};function ZC(e,t,n,r){e.generate=function(i,a){for(var o=new qn.util.ByteBuffer,s=Math.ceil(a/r)+n,l=new qn.util.ByteBuffer,u=n;u<s;++u){l.putInt32(u),t.start(),t.update(i+l.getBytes());var c=t.digest();o.putBytes(c.getBytes(r))}return o.truncate(o.length()-a),o.getBytes()}}var qe=ze;qe.log=qe.log||{};qe.log.levels=["none","error","warning","info","debug","verbose","max"];var ad={},M0=[],dl=null;qe.log.LEVEL_LOCKED=2;qe.log.NO_LEVEL_CHECK=4;qe.log.INTERPOLATE=8;for(var la=0;la<qe.log.levels.length;++la){var O1=qe.log.levels[la];ad[O1]={index:la,name:O1.toUpperCase()}}qe.log.logMessage=function(e){for(var t=ad[e.level].index,n=0;n<M0.length;++n){var r=M0[n];if(r.flags&qe.log.NO_LEVEL_CHECK)r.f(e);else{var i=ad[r.level].index;t<=i&&r.f(r,e)}}};qe.log.prepareStandard=function(e){"standard"in e||(e.standard=ad[e.level].name+" ["+e.category+"] "+e.message)};qe.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=qe.util.format.apply(this,t)}};qe.log.prepareStandardFull=function(e){"standardFull"in e||(qe.log.prepareStandard(e),e.standardFull=e.standard)};for(var V1=["error","warning","info","debug","verbose"],la=0;la<V1.length;++la)(function(t){qe.log[t]=function(n,r){var i=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:t,category:n,message:r,arguments:i};qe.log.logMessage(a)}})(V1[la]);qe.log.makeLogger=function(e){var t={flags:0,f:e};return qe.log.setLevel(t,"none"),t};qe.log.setLevel=function(e,t){var n=!1;if(e&&!(e.flags&qe.log.LEVEL_LOCKED))for(var r=0;r<qe.log.levels.length;++r){var i=qe.log.levels[r];if(t==i){e.level=t,n=!0;break}}return n};qe.log.lock=function(e,t){typeof t>"u"||t?e.flags|=qe.log.LEVEL_LOCKED:e.flags&=~qe.log.LEVEL_LOCKED};qe.log.addLogger=function(e){M0.push(e)};if(typeof console<"u"&&"log"in console){var Ms;if(console.error&&console.warn&&console.info&&console.debug){var HR={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},hp=function(e,t){qe.log.prepareStandard(t);var n=HR[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),n.apply(console,r)};Ms=qe.log.makeLogger(hp)}else{var hp=function(t,n){qe.log.prepareStandardFull(n),console.log(n.standardFull)};Ms=qe.log.makeLogger(hp)}qe.log.setLevel(Ms,"debug"),qe.log.addLogger(Ms),dl=Ms}else console={log:function(){}};if(dl!==null&&typeof window<"u"&&window.location){var ku=new URL(window.location.href).searchParams;if(ku.has("console.level")&&qe.log.setLevel(dl,ku.get("console.level").slice(-1)[0]),ku.has("console.lock")){var jR=ku.get("console.lock").slice(-1)[0];jR=="true"&&qe.log.lock(dl)}}qe.log.consoleLogger=dl;var he=ze,Z=he.asn1,An=he.pkcs7=he.pkcs7||{};An.messageFromPem=function(e){var t=he.pem.decode(e)[0];if(t.type!=="PKCS7"){var n=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=Z.fromDer(t.body);return An.messageFromAsn1(r)};An.messageToPem=function(e,t){var n={type:"PKCS7",body:Z.toDer(e.toAsn1()).getBytes()};return he.pem.encode(n,{maxline:t})};An.messageFromAsn1=function(e){var t={},n=[];if(!Z.validate(e,An.asn1.contentInfoValidator,t,n)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=n,r}var i=Z.derToOid(t.contentType),a;switch(i){case he.pki.oids.envelopedData:a=An.createEnvelopedData();break;case he.pki.oids.encryptedData:a=An.createEncryptedData();break;case he.pki.oids.signedData:a=An.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+i+" is not (yet) supported.")}return a.fromAsn1(t.content.value[0]),a};An.createSignedData=function(){var e=null;return e={type:he.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(gp(e,r,An.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var i=e.rawCapture.certificates.value,a=0;a<i.length;++a)e.certificates.push(he.pki.certificateFromAsn1(i[a]))},toAsn1:function(){e.contentInfo||e.sign();for(var r=[],i=0;i<e.certificates.length;++i)r.push(he.pki.certificateToAsn1(e.certificates[i]));var a=[],o=Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return r.length>0&&o.value[0].value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,r)),a.length>0&&o.value[0].value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,1,!0,a)),o.value[0].value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,e.signerInfos)),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),o])},addSigner:function(r){var i=r.issuer,a=r.serialNumber;if(r.certificate){var o=r.certificate;typeof o=="string"&&(o=he.pki.certificateFromPem(o)),i=o.issuer.attributes,a=o.serialNumber}var s=r.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof s=="string"&&(s=he.pki.privateKeyFromPem(s));var l=r.digestAlgorithm||he.pki.oids.sha1;switch(l){case he.pki.oids.sha1:case he.pki.oids.sha256:case he.pki.oids.sha384:case he.pki.oids.sha512:case he.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+l)}var u=r.authenticatedAttributes||[];if(u.length>0){for(var c=!1,d=!1,h=0;h<u.length;++h){var f=u[h];if(!c&&f.type===he.pki.oids.contentType){if(c=!0,d)break;continue}if(!d&&f.type===he.pki.oids.messageDigest){if(d=!0,c)break;continue}}if(!c||!d)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:s,version:1,issuer:i,serialNumber:a,digestAlgorithm:l,signatureAlgorithm:he.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(r){if(r=r||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(he.pki.oids.data).getBytes())]),"content"in e)){var i;e.content instanceof he.util.ByteBuffer?i=e.content.bytes():typeof e.content=="string"&&(i=he.util.encodeUtf8(e.content)),r.detached?e.detachedContent=Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,i):e.contentInfo.value.push(Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,i)]))}if(e.signers.length!==0){var a=t();n(a)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(r){typeof r=="string"&&(r=he.pki.certificateFromPem(r)),e.certificates.push(r)},addCertificateRevokationList:function(r){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var r={},i=0;i<e.signers.length;++i){var a=e.signers[i],o=a.digestAlgorithm;o in r||(r[o]=he.md[he.pki.oids[o]].create()),a.authenticatedAttributes.length===0?a.md=r[o]:a.md=he.md[he.pki.oids[o]].create()}e.digestAlgorithmIdentifiers=[];for(var o in r)e.digestAlgorithmIdentifiers.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(o).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")]));return r}function n(r){var i;if(e.detachedContent?i=e.detachedContent:(i=e.contentInfo.value[1],i=i.value[0]),!i)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=Z.derToOid(e.contentInfo.value[0].value),o=Z.toDer(i);o.getByte(),Z.getBerValueLength(o),o=o.getBytes();for(var s in r)r[s].start().update(o);for(var l=new Date,u=0;u<e.signers.length;++u){var c=e.signers[u];if(c.authenticatedAttributes.length===0){if(a!==he.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[]),h=0;h<c.authenticatedAttributes.length;++h){var f=c.authenticatedAttributes[h];f.type===he.pki.oids.messageDigest?f.value=r[c.digestAlgorithm].digest():f.type===he.pki.oids.signingTime&&(f.value||(f.value=l)),d.value.push(L0(f)),c.authenticatedAttributesAsn1.value.push(L0(f))}o=Z.toDer(d).getBytes(),c.md.start().update(o)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=ZR(e.signers)}};An.createEncryptedData=function(){var e=null;return e={type:he.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:he.pki.oids["aes256-CBC"]},fromAsn1:function(t){gp(e,t,An.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),YC(e)}},e};An.createEnvelopedData=function(){var e=null;return e={type:he.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:he.pki.oids["aes256-CBC"]},fromAsn1:function(t){var n=gp(e,t,An.asn1.envelopedDataValidator);e.recipients=GR(n.recipientInfos.value)},toAsn1:function(){return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,UR(e.recipients)),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,YR(e.encryptedContent))])])])},findRecipient:function(t){for(var n=t.issuer.attributes,r=0;r<e.recipients.length;++r){var i=e.recipients[r],a=i.issuer;if(i.serialNumber===t.serialNumber&&a.length===n.length){for(var o=!0,s=0;s<n.length;++s)if(a[s].type!==n[s].type||a[s].value!==n[s].value){o=!1;break}if(o)return i}}return null},decrypt:function(t,n){if(e.encryptedContent.key===void 0&&t!==void 0&&n!==void 0)switch(t.encryptedContent.algorithm){case he.pki.oids.rsaEncryption:case he.pki.oids.desCBC:var r=n.decrypt(t.encryptedContent.content);e.encryptedContent.key=he.util.createBuffer(r);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}YC(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:he.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,n){if(e.encryptedContent.content===void 0){n=n||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var r,i,a;switch(n){case he.pki.oids["aes128-CBC"]:r=16,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["aes192-CBC"]:r=24,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["aes256-CBC"]:r=32,i=16,a=he.aes.createEncryptionCipher;break;case he.pki.oids["des-EDE3-CBC"]:r=24,i=8,a=he.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+n)}if(t===void 0)t=he.util.createBuffer(he.random.getBytes(r));else if(t.length()!=r)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+r+".");e.encryptedContent.algorithm=n,e.encryptedContent.key=t,e.encryptedContent.parameter=he.util.createBuffer(he.random.getBytes(i));var o=a(t);if(o.start(e.encryptedContent.parameter.copy()),o.update(e.content),!o.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=o.output}for(var s=0;s<e.recipients.length;++s){var l=e.recipients[s];if(l.encryptedContent.content===void 0)switch(l.encryptedContent.algorithm){case he.pki.oids.rsaEncryption:l.encryptedContent.content=l.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+l.encryptedContent.algorithm)}}}},e};function WR(e){var t={},n=[];if(!Z.validate(e,An.asn1.recipientInfoValidator,t,n)){var r=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw r.errors=n,r}return{version:t.version.charCodeAt(0),issuer:he.pki.RDNAttributesAsArray(t.issuer),serialNumber:he.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:Z.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function zR(e){return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[he.pki.distinguishedNameToAsn1({attributes:e.issuer}),Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,he.util.hexToBytes(e.serialNumber))]),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.encryptedContent.algorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")]),Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function GR(e){for(var t=[],n=0;n<e.length;++n)t.push(WR(e[n]));return t}function UR(e){for(var t=[],n=0;n<e.length;++n)t.push(zR(e[n]));return t}function XR(e){var t=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(e.version).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[he.pki.distinguishedNameToAsn1({attributes:e.issuer}),Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,he.util.hexToBytes(e.serialNumber))]),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.digestAlgorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.signatureAlgorithm).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")])),t.value.push(Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var n=Z.create(Z.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r<e.unauthenticatedAttributes.length;++r){var i=e.unauthenticatedAttributes[r];n.values.push(L0(i))}t.value.push(n)}return t}function ZR(e){for(var t=[],n=0;n<e.length;++n)t.push(XR(e[n]));return t}function L0(e){var t;if(e.type===he.pki.oids.contentType)t=Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.value).getBytes());else if(e.type===he.pki.oids.messageDigest)t=Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===he.pki.oids.signingTime){var n=new Date("1950-01-01T00:00:00Z"),r=new Date("2050-01-01T00:00:00Z"),i=e.value;if(typeof i=="string"){var a=Date.parse(i);isNaN(a)?i.length===13?i=Z.utcTimeToDate(i):i=Z.generalizedTimeToDate(i):i=new Date(a)}i>=n&&i<r?t=Z.create(Z.Class.UNIVERSAL,Z.Type.UTCTIME,!1,Z.dateToUtcTime(i)):t=Z.create(Z.Class.UNIVERSAL,Z.Type.GENERALIZEDTIME,!1,Z.dateToGeneralizedTime(i))}return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.type).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[t])])}function YR(e){return[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(he.pki.oids.data).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(e.algorithm).getBytes()),e.parameter?Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,e.content.getBytes())])]}function gp(e,t,n){var r={},i=[];if(!Z.validate(t,n,r,i)){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw a.errors=a,a}var o=Z.derToOid(r.contentType);if(o!==he.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(r.encryptedContent){var s="";if(he.util.isArray(r.encryptedContent))for(var l=0;l<r.encryptedContent.length;++l){if(r.encryptedContent[l].type!==Z.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=r.encryptedContent[l].value}else s=r.encryptedContent;e.encryptedContent={algorithm:Z.derToOid(r.encAlgorithm),parameter:he.util.createBuffer(r.encParameter.value),content:he.util.createBuffer(s)}}if(r.content){var s="";if(he.util.isArray(r.content))for(var l=0;l<r.content.length;++l){if(r.content[l].type!==Z.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=r.content[l].value}else s=r.content;e.content=he.util.createBuffer(s)}return e.version=r.version.charCodeAt(0),e.rawCapture=r,r}function YC(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case he.pki.oids["aes128-CBC"]:case he.pki.oids["aes192-CBC"]:case he.pki.oids["aes256-CBC"]:t=he.aes.createDecryptionCipher(e.encryptedContent.key);break;case he.pki.oids.desCBC:case he.pki.oids["des-EDE3-CBC"]:t=he.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var Wt=ze,uf=Wt.ssh=Wt.ssh||{};uf.privateKeyToPutty=function(e,t,n){n=n||"",t=t||"";var r="ssh-rsa",i=t===""?"none":"aes256-cbc",a="PuTTY-User-Key-File-2: "+r+`\r
|
|
15
15
|
`;a+="Encryption: "+i+`\r
|
|
16
16
|
`,a+="Comment: "+n+`\r
|
|
17
17
|
`;var o=Wt.util.createBuffer();Ko(o,r),Kr(o,e.e),Kr(o,e.n);var s=Wt.util.encode64(o.bytes(),64),l=Math.floor(s.length/66)+1;a+="Public-Lines: "+l+`\r
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
Private-Lines: `+l+`\r
|
|
20
20
|
`,a+=c;var m=Pu("putty-private-key-file-mac-key",t),b=Wt.util.createBuffer();Ko(b,r),Ko(b,i),Ko(b,n),b.putInt32(o.length()),b.putBuffer(o),b.putInt32(u.length()),b.putBuffer(u);var v=Wt.hmac.create();return v.start("sha1",m),v.update(b.bytes()),a+=`\r
|
|
21
21
|
Private-MAC: `+v.digest().toHex()+`\r
|
|
22
|
-
`,a};uf.publicKeyToOpenSSH=function(e,t){var n="ssh-rsa";t=t||"";var r=Wt.util.createBuffer();return Ko(r,n),Kr(r,e.e),Kr(r,e.n),n+" "+Wt.util.encode64(r.bytes())+" "+t};uf.privateKeyToOpenSSH=function(e,t){return t?Wt.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Wt.pki.privateKeyToPem(e)};uf.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||Wt.md.md5.create(),r="ssh-rsa",i=Wt.util.createBuffer();Ko(i,r),Kr(i,e.e),Kr(i,e.n),n.start(),n.update(i.getBytes());var a=n.digest();if(t.encoding==="hex"){var o=a.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return a.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return a};function Kr(e,t){var n=t.toString(16);n[0]>="8"&&(n="00"+n);var r=Wt.util.hexToBytes(n);e.putInt32(r.length),e.putBytes(r)}function Ko(e,t){e.putInt32(t.length),e.putString(t)}function Pu(){for(var e=Wt.md.sha1.create(),t=arguments.length,n=0;n<t;++n)e.update(arguments[n]);return e.digest()}var KR=ze;const Pa=o6(KR),ci=e=>{try{return $t(e).isFinite()}catch{return!1}},KC=e=>{if(typeof e=="number"&&Number.isFinite(e))return!0;if(typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e))){const t=Number(e);return Number.isFinite(t)}return!1};function cf(e,t){const{decimals:n=2,instance:r=!1}=t||{};ci(e)||(e="0");const i=$t(e).toFixed(n);return r?$t(i):i}const pp=(e,t=2)=>{let n=parseFloat(KC(e)?e:0);return n=(+(Math.round(n+"e"+t)+"e-"+t)).toFixed(t),n=Number(n),n};function Ji(e,t="currency",n){const{minimumFractionDigits:r=0,locale:i="id-ID",currency:a="IDR",withSpace:o=!1}=n||{},s=new Intl.NumberFormat(i,{style:t,currency:a,minimumFractionDigits:r}).format(pp(e,r>0?r:2));return o?s:s.replace(/\s/g,"")}const qo=(e,t,n,r)=>{const i={"id-ID":Yc,"zh-CN":rC,"en-US":Yg,"nl-BE":nC};let a=n??"-";return e&&!isNaN(new Date(e).getTime())&&(a=wl(e,t??"dd/MM/yyyy",{locale:i[r??"id-ID"]})),a},qR=(e,t,n,r,i,a)=>{const o={"id-ID":Yc,"zh-CN":rC,"en-US":Yg,"nl-NL":nC};if(e&&!isNaN(new Date(e).getTime())){const s=wl(e,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});if(t&&!isNaN(new Date(t).getTime())){const l=wl(t,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});return s===l?s:`${s}${r??"-"}${l}`}return s}return i??"-"},qC=(e,t)=>e.reduce((n,r)=>{const i=String(r[t]);return n[i]||(n[i]=[]),n[i].push(r),n},{}),JR=({value:e,keyDate:t="date",keyFormat:n="formatDate",format:r="dd/MM/yyyy"})=>{const i=e.map(a=>({...a,[n]:qo(a[t],r)}));return qC(i,n)},QR=e=>(Object.keys(e).forEach(t=>{["",null,void 0,[],{}].includes(e[t])&&delete e[t]}),e),eB=(e,t)=>{var h,f;const n=/^-?\d+[0-9.,]*$/,r=/([.])(?=.*\1)/,i=/([,])(?=.*\1)/,a=((h=e.split(",")[0])==null?void 0:h.trim())||"",o=((f=e.split(",")[1])==null?void 0:f.trim())||"",s=!r.test(a)&&(a==="-"||n.test(a)||!a),l=!r.test(o)&&(o==="-"||n.test(o)||!o),u=(g,p,m)=>{let b=g;const v=g.split(".")[0];return isNaN(parseFloat(v.split(".")[0]))||(parseFloat(v.split(".")[0])<=p?b=`${p}`:parseFloat(v)>=m&&(b=`${m}`)),b},c=u(a,(t==null?void 0:t.latMin)??-85,(t==null?void 0:t.latMax)??85),d=u(o,(t==null?void 0:t.longMin)??-180,(t==null?void 0:t.longMax)??180);return{latitude:c,longitude:d,latlong:`${c}${e.includes(",")?","+d:""}`,isValid:!i.test(e)&&s&&l}},H1=(e,t)=>e?Object.fromEntries(Object.entries(t).filter(([r])=>r.startsWith(e))):t,mp=(e,t)=>e.map(n=>n[t]).join(","),bp=(e,t)=>e.map(n=>n[t]),tB=(e,t)=>Array.isArray(e)?e==null?void 0:e.map((n,r,i)=>typeof t=="function"?t(n,r,i):n):[],nB=(e,t,n,r,i)=>Array.isArray(e)?{[t]:e==null?void 0:e.map((a,o,s)=>typeof n=="function"?n(a,o,s):a),[`${t}-val-be`]:a=>r==="array-of-object-to-array"?bp(a,i):mp(a,i)}:{[t]:"",[`${t}-val-be`]:()=>""};function vp(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!vp(e[i],t[i]))return!1;return!0}function rB(e,t={maxTime:"hour"}){const{maxTime:n="hour"}=t,r=l=>l<10?`0${l}`:l;let i=r(0),a=r(0);const o=r(Math.floor(e%3600/60)),s=r(Math.floor(e%60));return n==="hour"?a=r(Math.floor(e/3600)):n==="day"&&(i=r(Math.floor(e/(3600*24))),a=r(Math.floor(e%(3600*24)/3600))),{day:i,hour:a,minute:o,second:s}}function fl(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _l(e,...t){if(!t.length)return e;const n=t.shift();if(fl(e)&&fl(n))for(const r in n)fl(n[r])?(e[r]||Object.assign(e,{[r]:{}}),_l(e[r],n[r])):Object.assign(e,{[r]:n[r]});return _l(e,...t)}function od(e,t){const n=t.match(/[^.[\]]+/g);if(!n||n.length===0)return;const r=(i,a)=>{if(typeof i!="object"||i===null||a.length===0)return;const o=i,s=a[0],l=a.slice(1);if(l.length===0){delete o[s];return}const u=o[s];if(s==="*"&&Array.isArray(o)){for(const c of o)r(c,l);return}r(u,l)};r(e,n)}function iB(e,t){if(!e||!t)return e;if(Array.isArray(t))for(const n of t)od(e,n);else od(e,t);return e}function JC(e,t){const n=JSON.parse(JSON.stringify(e));if(Array.isArray(t))for(const r of t)od(n,r);else od(n,t);return n}function aB(e,t,n={}){const r=n.arrayMergeStrategy||"combine",i=(n.keepKeys||[]).map(s=>s.match(/[^.[\]]+/g)||[]),a=s=>i.some(l=>l.length!==s.length?!1:l.every((u,c)=>u===s[c]));function o(s,l,u){if(u.length>0&&a(u))return s;if(Array.isArray(l)&&Array.isArray(s)){if(r==="overwrite")return[...l];const c=r==="sync"?l.length:Math.max(s.length,l.length),d=new Array(c);for(let h=0;h<c;h++){const f=[...u,String(h)],g=s[h],p=l[h];if(h>=l.length){d[h]=g;continue}if(h>=s.length){d[h]=p;continue}d[h]=o(g,p,f)}return d}if(fl(l)&&fl(s)){const c={...s};return Object.keys(l).forEach(d=>{const h=[...u,d],f=l[d],g=s[d];c[d]=o(g,f,h)}),c}return l===void 0?s:l}return o(e,t,[])}const oB=e=>pp(e||0),sB=e=>cf(e||0),lB=e=>isNaN(e)?void 0:e,df=e=>{const t=e.toString().split(""),n=t[1]!=="0"?`,${t[1]}`:"";let[r]=e.toString().split(".");return r=r.replaceAll("-",""),r.length>=15?`${+r.substring(0,3)} T`:r.length===14?`${+r.substring(0,2)} T`:r.length===13?`${+r.substring(0,1)}${n} T`:r.length===12?`${+r.substring(0,3)} M`:r.length===11?`${+r.substring(0,2)} M`:r.length===10?`${+r.substring(0,1)}${n} M`:r.length===9?`${+r.substring(0,3)} JT`:r.length===8?`${+r.substring(0,2)} JT`:r.length===7?`${+r.substring(0,1)}${n} JT`:r.length===6?`${+r.substring(0,3)} RB`:r.length===5?`${+r.substring(0,2)} RB`:r.length===4?`${+r.substring(0,1)}${n} RB`:r.length<=3?+r?`${+r}`:0:null};function O0(e){if(typeof e!="string")throw new Error("Input harus berupa string");const t=e.split(".");if(t.length===1)return{filename:e,extension:""};const n="."+t[t.length-1];return{filename:t.slice(0,-1).join("."),extension:n}}const uB=e=>(new DOMParser().parseFromString(e||"","text/html").body.textContent??"").toString();function cB(e,t){const n=typeof e=="string"?e:JSON.stringify(e),r=Pa.util.decode64(t.replace(/\s+/g,"")),i=Pa.util.decode64(r),a=Pa.asn1.fromDer(i),s=Pa.pki.publicKeyFromAsn1(a).encrypt(n,"RSA-OAEP",{md:Pa.md.sha256.create(),mgf1:{md:Pa.md.sha1.create()}});return Pa.util.encode64(s)}function dB(e,t={}){const{locale:n,currency:r,minimumFractionDigits:i,maximumFractionDigits:a=2,withSpace:o,currencyDisplay:s}=t,l=cf(e,{decimals:a}),[u,c=""]=l.split("."),d=u.replace(/\B(?=(\d{3})+(?!\d))/g,".");let h=c.slice(0,a);i===void 0?h=h.replace(/0+$/,""):h&&i>0&&(h=h.padEnd(i,"0"));let f=h?`${d},${h}`:d;if(!n||!r)return f;const p={"id-ID":{symbol:"Rp",code:"IDR",name:"Rupiah",negativePosition:"start"},"en-US":{symbol:"$",code:"USD",name:"US Dollar",negativePosition:"middle"},"ja-JP":{symbol:"¥",code:"JPY",name:"Yen",negativePosition:"middle"}}[n]||{symbol:"",code:r,name:r},m={symbol:p.symbol,code:p.code,name:p.name}[s||"symbol"],b=f.includes("-");return f=p.negativePosition==="start"?f.replace("-",""):f,o?`${p.negativePosition==="start"&&b?"-":""}${m} ${f}`:`${p.negativePosition==="start"&&b?"-":""}${m}${f}`}function fB(e){if(!ci(e))return"0";const t=typeof e=="number"?$t(e).toString():e;if(!t.includes("."))return t;const[n,r]=t.split("."),i=r.replace(/0+$/,"");return i?`${n}.${i}`:n}/*! js-cookie v3.0.5 | MIT */function Fu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var hB={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function V0(e,t){function n(i,a,o){if(!(typeof document>"u")){o=Fu({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,o[l]!==!0&&(s+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var l=a[s].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(o[c]=e.read(u,c),i===c)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,a){n(i,"",Fu({},a,{expires:-1}))},withAttributes:function(i){return V0(this.converter,Fu({},this.attributes,i))},withConverter:function(i){return V0(Fu({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Or=V0(hB,{path:"/"});const gB={setItem(e,t,n={},r=3e3){const a={...{path:"/",expires:365},...n};parseInt(Or.get(`${e}_count`)??"0",10)&&this.removeItem(e,n);const s=Math.ceil(t.length/r);for(let l=0;l<s;l++){const u=t.slice(l*r,(l+1)*r);Or.set(`${e}_${l}`,u,a)}Or.set(`${e}_count`,s.toString(),a)},getItem(e){const t=parseInt(Or.get(`${e}_count`)??"0",10);if(!t)return null;let n="";for(let r=0;r<t;r++){const i=Or.get(`${e}_${r}`);if(!i)return null;n+=i}return n},removeItem(e,t={}){const n=parseInt(Or.get(`${e}_count`)??"0",10),r={path:"/",...t};if(!isNaN(n)){for(let i=0;i<n;i++)Or.remove(`${e}_${i}`,r);Or.remove(`${e}_count`,r)}},clear(e={}){const t={path:"/",...e},n=Or.get();Object.keys(n).forEach(r=>Or.remove(r,t))}};function QC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=QC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ki(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QC(e))&&(r&&(r+=" "),r+=t);return r}const Dl=e=>typeof e=="number"&&!isNaN(e),oo=e=>typeof e=="string",Qn=e=>typeof e=="function",Ac=e=>oo(e)||Qn(e)?e:null,H0=e=>I.isValidElement(e)||oo(e)||Qn(e)||Dl(e);function pB(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function ff(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:d,isIn:h,playToast:f}=o;const g=r?`${t}--${l}`:t,p=r?`${n}--${l}`:n,m=I.useRef(0);return I.useLayoutEffect(()=>{const b=d.current,v=g.split(" "),x=C=>{C.target===d.current&&(f(),b.removeEventListener("animationend",x),b.removeEventListener("animationcancel",x),m.current===0&&C.type!=="animationcancel"&&b.classList.remove(...v))};b.classList.add(...v),b.addEventListener("animationend",x),b.addEventListener("animationcancel",x)},[]),I.useEffect(()=>{const b=d.current,v=()=>{b.removeEventListener("animationend",v),i?pB(b,c,a):c()};h||(u?v():(m.current=1,b.className+=` ${p}`,b.addEventListener("animationend",v)))},[h]),I.createElement(I.Fragment,null,s)}}function j1(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Tn=new Map;let Al=[];const j0=new Set,mB=e=>j0.forEach(t=>t(e)),e4=()=>Tn.size>0;function t4(e,t){var n;if(t)return!((n=Tn.get(t))==null||!n.isToastActive(e));let r=!1;return Tn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function n4(e,t){H0(e)&&(e4()||Al.push({content:e,options:t}),Tn.forEach(n=>{n.buildToast(e,t)}))}function W1(e,t){Tn.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function bB(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(a){const o=a.containerId||1;return{subscribe(s){const l=function(c,d,h){let f=1,g=0,p=[],m=[],b=[],v=d;const x=new Map,C=new Set,E=()=>{b=Array.from(x.values()),C.forEach(y=>y())},w=y=>{m=y==null?[]:m.filter(S=>S!==y),E()},B=y=>{const{toastId:S,onOpen:D,updateId:A,children:T}=y.props,F=A==null;y.staleId&&x.delete(y.staleId),x.set(S,y),m=[...m,y.props.toastId].filter(k=>k!==y.staleId),E(),h(j1(y,F?"added":"updated")),F&&Qn(D)&&D(I.isValidElement(T)&&T.props)};return{id:c,props:v,observe:y=>(C.add(y),()=>C.delete(y)),toggle:(y,S)=>{x.forEach(D=>{S!=null&&S!==D.props.toastId||Qn(D.toggle)&&D.toggle(y)})},removeToast:w,toasts:x,clearQueue:()=>{g-=p.length,p=[]},buildToast:(y,S)=>{if((U=>{let{containerId:K,toastId:ee,updateId:z}=U;const H=K?K!==c:c!==1,X=x.has(ee)&&z==null;return H||X})(S))return;const{toastId:D,updateId:A,data:T,staleId:F,delay:k}=S,P=()=>{w(D)},$=A==null;$&&g++;const R={...v,style:v.toastStyle,key:f++,...Object.fromEntries(Object.entries(S).filter(U=>{let[K,ee]=U;return ee!=null})),toastId:D,updateId:A,data:T,closeToast:P,isIn:!1,className:Ac(S.className||v.toastClassName),bodyClassName:Ac(S.bodyClassName||v.bodyClassName),progressClassName:Ac(S.progressClassName||v.progressClassName),autoClose:!S.isLoading&&(O=S.autoClose,j=v.autoClose,O===!1||Dl(O)&&O>0?O:j),deleteToast(){const U=x.get(D),{onClose:K,children:ee}=U.props;Qn(K)&&K(I.isValidElement(ee)&&ee.props),h(j1(U,"removed")),x.delete(D),g--,g<0&&(g=0),p.length>0?B(p.shift()):E()}};var O,j;R.closeButton=v.closeButton,S.closeButton===!1||H0(S.closeButton)?R.closeButton=S.closeButton:S.closeButton===!0&&(R.closeButton=!H0(v.closeButton)||v.closeButton);let V=y;I.isValidElement(y)&&!oo(y.type)?V=I.cloneElement(y,{closeToast:P,toastProps:R,data:T}):Qn(y)&&(V=y({closeToast:P,toastProps:R,data:T}));const W={content:V,props:R,staleId:F};v.limit&&v.limit>0&&g>v.limit&&$?p.push(W):Dl(k)?setTimeout(()=>{B(W)},k):B(W)},setProps(y){v=y},setToggle:(y,S)=>{x.get(y).toggle=S},isToastActive:y=>m.some(S=>S===y),getSnapshot:()=>v.newestOnTop?b.reverse():b}}(o,a,mB);Tn.set(o,l);const u=l.observe(s);return Al.forEach(c=>n4(c.content,c.options)),Al=[],()=>{u(),Tn.delete(o)}},setProps(s){var l;(l=Tn.get(o))==null||l.setProps(s)},getSnapshot(){var s;return(s=Tn.get(o))==null?void 0:s.getSnapshot()}}}(e)).current;r(e);const i=I.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!i)return[];const o=new Map;return i.forEach(s=>{const{position:l}=s.props;o.has(l)||o.set(l,[]),o.get(l).push(s)}),Array.from(o,s=>a(s[0],s[1]))},isToastActive:t4,count:i==null?void 0:i.length}}function vB(e){const[t,n]=I.useState(!1),[r,i]=I.useState(!1),a=I.useRef(null),o=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:d}=e;var h,f;function g(){n(!0)}function p(){n(!1)}function m(x){const C=a.current;o.canDrag&&C&&(o.didMove=!0,t&&p(),o.delta=e.draggableDirection==="x"?x.clientX-o.start:x.clientY-o.start,o.start!==x.clientX&&(o.canCloseOnClick=!1),C.style.transform=`translate3d(${e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function b(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",b);const x=a.current;if(o.canDrag&&o.didMove&&x){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(f=Tn.get((h={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||f.setToggle(h.id,h.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",g),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){o.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",b);const C=a.current;o.canCloseOnClick=!0,o.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(o.start=x.clientX,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=x.clientY,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:C,bottom:E,left:w,right:B}=a.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=w&&x.clientX<=B&&x.clientY>=C&&x.clientY<=E?p():g()}};return s&&l&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=g)),d&&(v.onClick=x=>{c&&c(x),o.canCloseOnClick&&u()}),{playToast:g,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:v}}function yB(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:a,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:d,theme:h}=e;const f=a||l&&u===0,g={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(g.transform=`scaleX(${u})`);const p=ki("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=Qn(o)?o({rtl:c,type:i,defaultClassName:p}):ki(p,o),b={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{d&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${h} Toastify__progress-bar--${i}`}),I.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:m,style:g,...b}))}let xB=1;const r4=()=>""+xB++;function CB(e){return e&&(oo(e.toastId)||Dl(e.toastId))?e.toastId:r4()}function hl(e,t){return n4(e,t),t.toastId}function sd(e,t){return{...t,type:t&&t.type||e,toastId:CB(t)}}function Nu(e){return(t,n)=>hl(t,sd(e,n))}function ft(e,t){return hl(e,sd("default",t))}ft.loading=(e,t)=>hl(e,sd("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ft.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=oo(i)?ft.loading(i,n):ft.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,d,h)=>{if(d==null)return void ft.dismiss(r);const f={type:c,...s,...n,data:h},g=oo(d)?{render:d}:d;return r?ft.update(r,{...f,...g}):ft(g.render,{...f,...g}),h},u=Qn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",a,c)),u},ft.success=Nu("success"),ft.info=Nu("info"),ft.error=Nu("error"),ft.warning=Nu("warning"),ft.warn=ft.warning,ft.dark=(e,t)=>hl(e,sd("default",{theme:"dark",...t})),ft.dismiss=function(e){(function(t){var n;if(e4()){if(t==null||oo(n=t)||Dl(n))Tn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Tn.get(t.containerId);r?r.removeToast(t.id):Tn.forEach(i=>{i.removeToast(t.id)})}}else Al=Al.filter(r=>t!=null&&r.options.toastId!==t)})(e)},ft.clearWaitingQueue=function(e){e===void 0&&(e={}),Tn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ft.isActive=t4,ft.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var a;let{containerId:o}=i;return(a=Tn.get(o||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:r4()};a.toastId!==e&&(a.staleId=e);const o=a.render||i;delete a.render,hl(o,a)}},ft.done=e=>{ft.update(e,{progress:1})},ft.onChange=function(e){return j0.add(e),()=>{j0.delete(e)}},ft.play=e=>W1(!0,e),ft.pause=e=>W1(!1,e);const EB=typeof window<"u"?I.useLayoutEffect:I.useEffect,Mu=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},eh={info:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return I.createElement("div",{className:"Toastify__spinner"})}},SB=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:a}=vB(e),{closeButton:o,children:s,autoClose:l,onClick:u,type:c,hideProgressBar:d,closeToast:h,transition:f,position:g,className:p,style:m,bodyClassName:b,bodyStyle:v,progressClassName:x,progressStyle:C,updateId:E,role:w,progress:B,rtl:y,toastId:S,deleteToast:D,isIn:A,isLoading:T,closeOnClick:F,theme:k}=e,P=ki("Toastify__toast",`Toastify__toast-theme--${k}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":y},{"Toastify__toast--close-on-click":F}),$=Qn(p)?p({rtl:y,position:g,type:c,defaultClassName:P}):ki(P,p),R=function(W){let{theme:U,type:K,isLoading:ee,icon:z}=W,H=null;const X={theme:U,type:K};return z===!1||(Qn(z)?H=z({...X,isLoading:ee}):I.isValidElement(z)?H=I.cloneElement(z,X):ee?H=eh.spinner():(te=>te in eh)(K)&&(H=eh[K](X))),H}(e),O=!!B||!l,j={closeToast:h,type:c,theme:k};let V=null;return o===!1||(V=Qn(o)?o(j):I.isValidElement(o)?I.cloneElement(o,j):function(W){let{closeToast:U,theme:K,ariaLabel:ee="close"}=W;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${K}`,type:"button",onClick:z=>{z.stopPropagation(),U(z)},"aria-label":ee},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(j)),I.createElement(f,{isIn:A,done:D,position:g,preventExitTransition:n,nodeRef:r,playToast:a},I.createElement("div",{id:S,onClick:u,"data-in":A,className:$,...i,style:m,ref:r},I.createElement("div",{...A&&{role:w},className:Qn(b)?b({type:c}):ki("Toastify__toast-body",b),style:v},R!=null&&I.createElement("div",{className:ki("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!T})},R),I.createElement("div",null,s)),V,I.createElement(yB,{...E&&!O?{key:`pb-${E}`}:{},rtl:y,theme:k,delay:l,isRunning:t,isIn:A,closeToast:h,hide:d,type:c,style:C,className:x,controlledProgress:O,progress:B||0})))},hf=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},wB=ff(hf("bounce",!0));ff(hf("slide",!0));ff(hf("zoom"));ff(hf("flip"));const IB={position:"top-right",transition:wB,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function _B(e){let t={...IB,...e};const n=e.stacked,[r,i]=I.useState(!0),a=I.useRef(null),{getToastToRender:o,isToastActive:s,count:l}=bB(t),{className:u,style:c,rtl:d,containerId:h}=t;function f(p){const m=ki("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":d});return Qn(u)?u({position:p,rtl:d,defaultClassName:m}):ki(m,Ac(u))}function g(){n&&(i(!0),ft.play())}return EB(()=>{if(n){var p;const m=a.current.querySelectorAll('[data-in="true"]'),b=12,v=(p=t.position)==null?void 0:p.includes("top");let x=0,C=0;Array.from(m).reverse().forEach((E,w)=>{const B=E;B.classList.add("Toastify__toast--stacked"),w>0&&(B.dataset.collapsed=`${r}`),B.dataset.pos||(B.dataset.pos=v?"top":"bot");const y=x*(r?.2:1)+(r?0:b*w);B.style.setProperty("--y",`${v?y:-1*y}px`),B.style.setProperty("--g",`${b}`),B.style.setProperty("--s",""+(1-(r?C:0))),x+=B.offsetHeight,C+=.025})}},[r,l,n]),I.createElement("div",{ref:a,className:"Toastify",id:h,onMouseEnter:()=>{n&&(i(!1),ft.pause())},onMouseLeave:g},o((p,m)=>{const b=m.length?{...c}:{...c,pointerEvents:"none"};return I.createElement("div",{className:f(p),style:b,key:`container-${p}`},m.map(v=>{let{content:x,props:C}=v;return I.createElement(SB,{...C,stacked:n,collapseAll:g,isIn:s(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},x)}))}))}const Xn={"alert-body":"_alert-body_1qmvx_115","text-header":"_text-header_1qmvx_241","alert-info-filled":"_alert-info-filled_1qmvx_469","alert-warning-filled":"_alert-warning-filled_1qmvx_469","alert-error-filled":"_alert-error-filled_1qmvx_469","alert-success-filled":"_alert-success-filled_1qmvx_469","alert-info-outlined":"_alert-info-outlined_1qmvx_469","alert-warning-outlined":"_alert-warning-outlined_1qmvx_469","alert-error-outlined":"_alert-error-outlined_1qmvx_469","alert-success-outlined":"_alert-success-outlined_1qmvx_469"},DB=(e,t,n)=>{const r=(n==null?void 0:n.variant)??"outline",i={position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,bodyClassName:Xn["alert-body"]},a={icon:{solid:{success:_.jsx(TB,{}),warning:_.jsx(PB,{}),error:_.jsx($B,{}),info:_.jsx(BB,{})},outline:{success:_.jsx(AB,{}),warning:_.jsx(kB,{}),error:_.jsx(RB,{}),info:_.jsx(FB,{})}},variant:{solid:{success:Xn["alert-success-filled"],error:Xn["alert-error-filled"],warning:Xn["alert-warning-filled"],info:Xn["alert-info-filled"]},outline:{success:Xn["alert-success-outlined"],error:Xn["alert-error-outlined"],warning:Xn["alert-warning-outlined"],info:Xn["alert-info-outlined"]}}};return t==="error"?ft.error(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Error"}),e]}),{icon:a.icon[r].error,className:a.variant[r].error,...i,...n}):t==="info"?ft.info(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Info"}),e]}),{icon:a.icon[r].info,className:a.variant[r].info,...i,...n}):t==="warning"?ft.warning(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Warning"}),e]}),{icon:a.icon[r].warning,className:a.variant[r].warning,...i,...n}):ft(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Success"}),e]}),{icon:a.icon[r].success,className:a.variant[r].success,...i,...n})},AB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"check-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.5C12.1217 18.5 14.1566 17.6571 15.6569 16.1569C17.1571 14.6566 18 12.6217 18 10.5C18 8.37827 17.1571 6.34344 15.6569 4.84315C14.1566 3.34285 12.1217 2.5 10 2.5C7.87827 2.5 5.84344 3.34285 4.34315 4.84315C2.84285 6.34344 2 8.37827 2 10.5C2 12.6217 2.84285 14.6566 4.34315 16.1569C5.84344 17.6571 7.87827 18.5 10 18.5ZM13.707 9.207C13.8892 9.0184 13.99 8.7658 13.9877 8.5036C13.9854 8.2414 13.8802 7.99059 13.6948 7.80518C13.5094 7.61977 13.2586 7.5146 12.9964 7.51233C12.7342 7.51005 12.4816 7.61084 12.293 7.793L9 11.086L7.707 9.793C7.5184 9.61084 7.2658 9.51005 7.0036 9.51233C6.7414 9.5146 6.49059 9.61977 6.30518 9.80518C6.11977 9.99059 6.0146 10.2414 6.01233 10.5036C6.01005 10.7658 6.11084 11.0184 6.293 11.207L8.293 13.207C8.48053 13.3945 8.73484 13.4998 9 13.4998C9.26516 13.4998 9.51947 13.3945 9.707 13.207L13.707 9.207Z",fill:"#388E3C"})})}),TB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"circle",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M9 12L11 14L15 10",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),RB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"exclamation-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 14.5C11 14.7652 10.8946 15.0196 10.7071 15.2071C10.5196 15.3946 10.2652 15.5 10 15.5C9.73478 15.5 9.48043 15.3946 9.29289 15.2071C9.10536 15.0196 9 14.7652 9 14.5C9 14.2348 9.10536 13.9804 9.29289 13.7929C9.48043 13.6054 9.73478 13.5 10 13.5C10.2652 13.5 10.5196 13.6054 10.7071 13.7929C10.8946 13.9804 11 14.2348 11 14.5ZM10 5.5C9.73478 5.5 9.48043 5.60536 9.29289 5.79289C9.10536 5.98043 9 6.23478 9 6.5V10.5C9 10.7652 9.10536 11.0196 9.29289 11.2071C9.48043 11.3946 9.73478 11.5 10 11.5C10.2652 11.5 10.5196 11.3946 10.7071 11.2071C10.8946 11.0196 11 10.7652 11 10.5V6.5C11 6.23478 10.8946 5.98043 10.7071 5.79289C10.5196 5.60536 10.2652 5.5 10 5.5Z",fill:"#F44336"})})}),BB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),$B=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),kB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"exclamation",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M8.25697 3.59898C9.02197 2.23898 10.979 2.23898 11.743 3.59898L17.323 13.519C18.073 14.853 17.11 16.499 15.581 16.499H4.41997C2.88997 16.499 1.92697 14.853 2.67697 13.519L8.25697 3.59898ZM11 13.5C11 13.7652 10.8946 14.0196 10.7071 14.2071C10.5195 14.3946 10.2652 14.5 9.99997 14.5C9.73475 14.5 9.4804 14.3946 9.29286 14.2071C9.10533 14.0196 8.99997 13.7652 8.99997 13.5C8.99997 13.2348 9.10533 12.9804 9.29286 12.7929C9.4804 12.6053 9.73475 12.5 9.99997 12.5C10.2652 12.5 10.5195 12.6053 10.7071 12.7929C10.8946 12.9804 11 13.2348 11 13.5ZM9.99997 5.49998C9.73475 5.49998 9.4804 5.60534 9.29286 5.79287C9.10533 5.98041 8.99997 6.23476 8.99997 6.49998V9.49998C8.99997 9.7652 9.10533 10.0195 9.29286 10.2071C9.4804 10.3946 9.73475 10.5 9.99997 10.5C10.2652 10.5 10.5195 10.3946 10.7071 10.2071C10.8946 10.0195 11 9.7652 11 9.49998V6.49998C11 6.23476 10.8946 5.98041 10.7071 5.79287C10.5195 5.60534 10.2652 5.49998 9.99997 5.49998Z",fill:"#F9A825"})})}),PB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 15V15.01M12 9V11V9Z",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M5 19H19C19.3263 18.9977 19.6471 18.9156 19.9344 18.7609C20.2217 18.6061 20.4667 18.3835 20.6482 18.1123C20.8297 17.841 20.942 17.5296 20.9754 17.205C21.0089 16.8804 20.9624 16.5525 20.84 16.25L13.74 4.00002C13.567 3.68741 13.3135 3.42685 13.0058 3.2454C12.698 3.06396 12.3473 2.96826 11.99 2.96826C11.6327 2.96826 11.282 3.06396 10.9742 3.2454C10.6665 3.42685 10.413 3.68741 10.24 4.00002L3.14 16.25C3.01994 16.5456 2.97233 16.8656 3.00115 17.1833C3.02997 17.501 3.13437 17.8073 3.30565 18.0764C3.47693 18.3456 3.71011 18.5698 3.98573 18.7305C4.26134 18.8912 4.57139 18.9836 4.89 19",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),FB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"information-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 6.5C11 6.76522 10.8946 7.01957 10.7071 7.20711C10.5196 7.39464 10.2652 7.5 10 7.5C9.73478 7.5 9.48043 7.39464 9.29289 7.20711C9.10536 7.01957 9 6.76522 9 6.5C9 6.23478 9.10536 5.98043 9.29289 5.79289C9.48043 5.60536 9.73478 5.5 10 5.5C10.2652 5.5 10.5196 5.60536 10.7071 5.79289C10.8946 5.98043 11 6.23478 11 6.5ZM9 9.5C8.73478 9.5 8.48043 9.60536 8.29289 9.79289C8.10536 9.98043 8 10.2348 8 10.5C8 10.7652 8.10536 11.0196 8.29289 11.2071C8.48043 11.3946 8.73478 11.5 9 11.5V14.5C9 14.7652 9.10536 15.0196 9.29289 15.2071C9.48043 15.3946 9.73478 15.5 10 15.5H11C11.2652 15.5 11.5196 15.3946 11.7071 15.2071C11.8946 15.0196 12 14.7652 12 14.5C12 14.2348 11.8946 13.9804 11.7071 13.7929C11.5196 13.6054 11.2652 13.5 11 13.5V10.5C11 10.2348 10.8946 9.98043 10.7071 9.79289C10.5196 9.60536 10.2652 9.5 10 9.5H9Z",fill:"#0288D1"})})}),gu=e=>typeof e=="string"||typeof e=="number"||typeof e=="bigint"?cf(e):"";function NB(e,t){return{name:"minBig",message:t||`Value must be greater than or equal to ${e}`,test(n){return n=gu(n),ci(n)?$t(n).gte($t(e))?!0:this.createError({message:t||`Value must be greater than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function MB(e,t){return{name:"maxBig",message:t||`Value must be less than or equal to ${e}`,test(n){return n=gu(n),ci(n)?$t(n).lte($t(e))?!0:this.createError({message:t||`Value must be less than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function LB(e,t){return{name:"moreThanBig",message:t||`Value must be greater than ${e}`,test(n){return n=gu(n),ci(n)?$t(n).gt($t(e))?!0:this.createError({message:t||`Value must be greater than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function OB(e,t){return{name:"lessThanBig",message:t||`Value must be less than ${e}`,test(n){return n=gu(n),ci(n)?$t(n).lt($t(e))?!0:this.createError({message:t||`Value must be less than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function VB(e,t,n){return{name:"betweenBig",message:n||`Value must be between ${e} and ${t}`,test(r){if(r=gu(r),!ci(r))return this.createError({message:n||"Invalid BigNumber value"});const i=$t(r),a=$t(e),o=$t(t);return i.lt(a)||i.gt(o)?this.createError({message:n||`Value must be between ${e} and ${t}`}):!0}}}function yp(e){return HB.test(e)}const HB=/^-?[0-9]+$/;function jB(e){return WB.test(e)}const WB=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function i4(e,t){const n=Number.parseFloat(e),r=String(n),i=z1(e),a=z1(r);return!!(i===a||(t==null?void 0:t.approx)===!0&&!yp(e)&&a.length>=14&&i.startsWith(a.substring(0,14)))}let qs=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function zB(e){if(i4(e,{approx:!1}))return;if(yp(e))return qs.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?qs.underflow:qs.truncate_float:qs.overflow}function z1(e){return e.replace(GB,"").replace(XB,"").replace(ZB,"").replace(UB,"")}const GB=/[eE][+-]?\d+$/,UB=/^-?(0*)?/,XB=/\./,ZB=/0+$/;class YB{constructor(t){xe(this,"isLosslessNumber",!0);if(!jB(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=zB(this.value);if(t===void 0||t===qs.truncate_float)return Number.parseFloat(this.value);if(yp(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function KB(e){return e&&typeof e=="object"&&e.isLosslessNumber===!0||!1}function qB(e){return new YB(e)}function JB(e,t){return xp({"":e},"",e,t)}function xp(e,t,n,r){return Array.isArray(n)?r.call(e,t,e9(n,r)):n&&typeof n=="object"&&!KB(n)?r.call(e,t,QB(n,r)):r.call(e,t,n)}function QB(e,t){for(const n of Object.keys(e)){const r=xp(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function e9(e,t){for(let n=0;n<e.length;n++)e[n]=xp(e,String(n),e[n],t);return e}function t9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qB,r=0;const i=s();return g(i),m(),t?JB(i,t):i;function a(){if(e.charCodeAt(r)===s9){r++,u();const k={};let P=!0;for(;r<e.length&&e.charCodeAt(r)!==U1;){P?P=!1:(h(),u());const $=r,R=c();if(R===void 0){x();return}u(),f();const O=s();if(O===void 0){S();return}Object.prototype.hasOwnProperty.call(k,R)&&!W0(O,k[R])&&C(R,$+1),k[R]=O}return e.charCodeAt(r)!==U1&&E(),r++,k}}function o(){if(e.charCodeAt(r)===l9){r++,u();const k=[];let P=!0;for(;r<e.length&&e.charCodeAt(r)!==X1;){P?P=!1:h();const $=s();p($),k.push($)}return e.charCodeAt(r)!==X1&&w(),r++,k}}function s(){u();const k=c()??d()??a()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),k}function l(k,P){if(e.slice(r,r+k.length)===k)return r+=k.length,P}function u(){for(;n9(e.charCodeAt(r));)r++}function c(){if(e.charCodeAt(r)===th){r++;let k="";for(;r<e.length&&e.charCodeAt(r)!==th;){if(e.charCodeAt(r)===o9){const P=e[r+1],$=a9[P];$!==void 0?(k+=$,r++):P==="u"?Lu(e.charCodeAt(r+2))&&Lu(e.charCodeAt(r+3))&&Lu(e.charCodeAt(r+4))&&Lu(e.charCodeAt(r+5))?(k+=String.fromCharCode(Number.parseInt(e.slice(r+2,r+6),16)),r+=5):D(r):y(r)}else i9(e.charCodeAt(r))?k+=e[r]:B(e[r]);r++}return v(),r++,k}}function d(){const k=r;if(e.charCodeAt(r)===Z1&&(r++,b(k)),e.charCodeAt(r)===Cp)r++;else if(r9(e.charCodeAt(r)))for(r++;Ou(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===m9)for(r++,b(k);Ou(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===C9||e.charCodeAt(r)===x9)for(r++,(e.charCodeAt(r)===Z1||e.charCodeAt(r)===h9)&&r++,b(k);Ou(e.charCodeAt(r));)r++;if(r>k)return n(e.slice(k,r))}function h(){if(e.charCodeAt(r)!==p9)throw new SyntaxError(`Comma ',' expected after value ${F()}`);r++}function f(){if(e.charCodeAt(r)!==b9)throw new SyntaxError(`Colon ':' expected after property name ${F()}`);r++}function g(k){if(k===void 0)throw new SyntaxError(`JSON value expected ${F()}`)}function p(k){if(k===void 0)throw new SyntaxError(`Array item expected ${F()}`)}function m(){if(r<e.length)throw new SyntaxError(`Expected end of input ${F()}`)}function b(k){if(!Ou(e.charCodeAt(r))){const P=e.slice(k,r);throw new SyntaxError(`Invalid number '${P}', expecting a digit ${F()}`)}}function v(){if(e.charCodeAt(r)!==th)throw new SyntaxError(`End of string '"' expected ${F()}`)}function x(){throw new SyntaxError(`Quoted object key expected ${F()}`)}function C(k,P){throw new SyntaxError(`Duplicate key '${k}' encountered at position ${P}`)}function E(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${F()}`)}function w(){throw new SyntaxError(`Array item or end of array ']' expected ${F()}`)}function B(k){throw new SyntaxError(`Invalid character '${k}' ${A()}`)}function y(k){const P=e.slice(k,k+2);throw new SyntaxError(`Invalid escape character '${P}' ${A()}`)}function S(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(k){const P=e.slice(k,k+6);throw new SyntaxError(`Invalid unicode character '${P}' ${A()}`)}function A(){return`at position ${r}`}function T(){return r<e.length?`but got '${e[r]}'`:"but reached end of input"}function F(){return`${T()} ${A()}`}}function n9(e){return e===u9||e===c9||e===d9||e===f9}function Lu(e){return e>=Cp&&e<=Ep||e>=v9&&e<=E9||e>=y9&&e<=S9}function Ou(e){return e>=Cp&&e<=Ep}function r9(e){return e>=g9&&e<=Ep}function i9(e){return e>=32&&e<=1114111}function W0(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>W0(n,t[r])):G1(e)&&G1(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>W0(e[r],t[r])):!1}function G1(e){return typeof e=="object"&&e!==null}const a9={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
23
|
-
`,r:"\r",t:" "},o9=92,s9=123,U1=125,l9=91,X1=93,u9=32,c9=10,d9=9,f9=13,th=34,h9=43,Z1=45,Cp=48,g9=49,Ep=57,p9=44,m9=46,b9=58,v9=65,y9=97,x9=69,C9=101,E9=70,S9=102;function z0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(z0);const t={};for(const[n,r]of Object.entries(e))typeof r=="number"||typeof r=="string"?typeof r=="number"&&!Number.isSafeInteger(r)||typeof r=="string"&&/^-?\d+(?:\.\d+)?$/.test(r)?t[n]=$t(r).toString():t[n]=r:typeof r=="object"?t[n]=z0(r):t[n]=r;return t}return e}function G0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(G0);if(e instanceof $t)return e.toString();const t={};for(const[n,r]of Object.entries(e))t[n]=G0(r);return t}return e}const w9=e=>t9(e,null,n=>typeof n=="number"&&!Number.isSafeInteger(n)||typeof n=="string"&&/^-?\d+(?:\.\d+)?$/.test(n)?i4(n)?parseFloat(n):$t(n).toString():n),a4={transparent:"transparent",black:"#212121",white:"#FFFFFF","primary-50":"#E3F2FD","primary-100":"#BBDEFB","primary-200":"#90CAF9","primary-300":"#64B5F6","primary-400":"#42A5F5","primary-500":"#2196F3","primary-600":"#1E88E5","primary-700":"#1976D2","primary-800":"#1565C0","primary-900":"#0D47A1","blue-gray-50":"#ECEFF1","blue-gray-100":"#CFD8DC","blue-gray-200":"#B0BEC5","blue-gray-300":"#90A4AE","blue-gray-400":"#78909C","blue-gray-500":"#607D8B","blue-gray-600":"#546E7A","blue-gray-700":"#455A64","blue-gray-800":"#37474F","blue-gray-900":"#263238","gray-50":"#FAFAFA","gray-100":"#F5F5F5","gray-200":"#EEEEEE","gray-300":"#E0E0E0","gray-400":"#BDBDBD","gray-500":"#9E9E9E","gray-600":"#757575","gray-700":"#616161","gray-800":"#424242","gray-900":"#212121","brown-50":"#EFEBE9","brown-100":"#D7CCC8","brown-200":"#BCAAA4","brown-300":"#A1887F","brown-400":"#8D6E63","brown-500":"#795548","brown-600":"#6D4C41","brown-700":"#5D4037","brown-800":"#4E342E","brown-900":"#3E2723","deep-orange-50":"#FBE9E7","deep-orange-100":"#FFCCBC","deep-orange-200":"#FFAB91","deep-orange-300":"#FF8A65","deep-orange-400":"#FF7043","deep-orange-500":"#FF5722","deep-orange-600":"#F4511E","deep-orange-700":"#E64A19","deep-orange-800":"#D84315","deep-orange-900":"#BF360C","orange-50":"#FFF3E0","orange-100":"#FFE0B2","orange-200":"#FFCC80","orange-300":"#FFB74D","orange-400":"#FFA726","orange-500":"#FF9800","orange-600":"#FB8C00","orange-700":"#F57C00","orange-800":"#EF6C00","orange-900":"#E65100","amber-50":"#FFF8E1","amber-100":"#FFECB3","amber-200":"#FFE082","amber-300":"#FFD54F","amber-400":"#FFCA28","amber-500":"#FFC107","amber-600":"#FFB300","amber-700":"#FFA000","amber-800":"#FF8F00","amber-900":"#FF6F00","yellow-50":"#FFFDE7","yellow-100":"#FFF9C4","yellow-200":"#FFF59D","yellow-300":"#FFF176","yellow-400":"#FFEE58","yellow-500":"#FFEB3B","yellow-600":"#FDD835","yellow-700":"#FBC02D","yellow-800":"#F9A825","yellow-900":"#F57F17","lime-50":"#F9FBE7","lime-100":"#F0F4C3","lime-200":"#E6EE9C","lime-300":"#DCE775","lime-400":"#D4E157","lime-500":"#CDDC39","lime-600":"#C0CA33","lime-700":"#AFB42B","lime-800":"#9E9D24","lime-900":"#827717","light-green-50":"#F1F8E9","light-green-100":"#DCEDC8","light-green-200":"#C5E1A5","light-green-300":"#AED581","light-green-400":"#9CCC65","light-green-500":"#8BC34A","light-green-600":"#7CB342","light-green-700":"#689F38","light-green-800":"#558B2F","light-green-900":"#33691E","green-50":"#E8F5E9","green-100":"#C8E6C9","green-200":"#A5D6A7","green-300":"#81C784","green-400":"#66BB6A","green-500":"#4CAF50","green-600":"#43A047","green-700":"#388E3C","green-800":"#2E7D32","green-900":"#1B5E20","teal-50":"#E0F2F1","teal-100":"#B2DFDB","teal-200":"#80CBC4","teal-300":"#4DB6AC","teal-400":"#26A69A","teal-500":"#009688","teal-600":"#00897B","teal-700":"#00796B","teal-800":"#00695C","teal-900":"#004D40","cyan-50":"#E0F7FA","cyan-100":"#B2EBF2","cyan-200":"#80DEEA","cyan-300":"#4DD0E1","cyan-400":"#26C6DA","cyan-500":"#00BCD4","cyan-600":"#00ACC1","cyan-700":"#0097A7","cyan-800":"#00838F","cyan-900":"#006064","light-blue-50":"#E1F5FE","light-blue-100":"#B3E5FC","light-blue-200":"#81D4FA","light-blue-300":"#4FC3F7","light-blue-400":"#29B6F6","light-blue-500":"#03A9F4","light-blue-600":"#039BE5","light-blue-700":"#0288D1","light-blue-800":"#0277BD","light-blue-900":"#01579B","blue-50":"#E3F2FD","blue-100":"#BBDEFB","blue-200":"#90CAF9","blue-300":"#64B5F6","blue-400":"#42A5F5","blue-500":"#2196F3","blue-600":"#1E88E5","blue-700":"#1976D2","blue-800":"#1565C0","blue-900":"#0D47A1","indigo-50":"#E8EAF6","indigo-100":"#C5CAE9","indigo-200":"#9FA8DA","indigo-300":"#7986CB","indigo-400":"#5C6BC0","indigo-500":"#3F51B5","indigo-600":"#3949AB","indigo-700":"#303F9F","indigo-800":"#283593","indigo-900":"#1A237E","deep-purple-50":"#EDE7F6","deep-purple-100":"#D1C4E9","deep-purple-200":"#B39DDB","deep-purple-300":"#9575CD","deep-purple-400":"#7E57C2","deep-purple-500":"#673AB7","deep-purple-600":"#5E35B1","deep-purple-700":"#512DA8","deep-purple-800":"#4527A0","deep-purple-900":"#311B92","purple-50":"#F3E5F5","purple-100":"#E1BEE7","purple-200":"#CE93D8","purple-300":"#BA68C8","purple-400":"#AB47BC","purple-500":"#9C27B0","purple-600":"#8E24AA","purple-700":"#7B1FA2","purple-800":"#6A1B9A","purple-900":"#4A148C","pink-50":"#FCE4EC","pink-100":"#F8BBD0","pink-200":"#F48FB1","pink-300":"#F06292","pink-400":"#EC407A","pink-500":"#E91E63","pink-600":"#D81B60","pink-700":"#C2185B","pink-800":"#AD1457","pink-900":"#880E4F","red-50":"#FFEBEE","red-100":"#FFCDD2","red-200":"#EF9A9A","red-300":"#E57373","red-400":"#EF5350","red-500":"#F44336","red-600":"#E53935","red-700":"#D32F2F","red-800":"#C62828","red-900":"#B71C1C","payhere-brand-base":"#102A4D","payhere-brand-10":"#CFD4DB","payhere-brand-20":"#AFB8C4","payhere-brand-30":"#8794A6","payhere-brand-40":"#607188","payhere-brand-50":"#384E6B","payhere-brand-60":"#0D2340","laba-black":"#212529","laba-white":"#FFFFFF","laba-blue-10":"#0163C8","laba-blue-08":"#006DFF","laba-blue-06":"#2899FF","laba-blue-05":"#73A4D6","laba-blue-02":"#DBECFF","laba-blue-01":"#F0F7FF","laba-green-10":"#038C67","laba-green-08":"#04BA27","laba-green-06":"#78D798","laba-green-05":"#ABF3CC","laba-green-02":"#CAEEE5","laba-green-01":"#DFF6F6","laba-grey-10":"#898989","laba-grey-08":"#AEAEAE","laba-grey-06":"#D6D6D6","laba-grey-05":"#EEEEEE","laba-grey-02":"#F2F2F2","laba-grey-01":"#FDFDFD","laba-orange-10":"#C05000","laba-orange-08":"#FF7200","laba-orange-06":"#FF9300","laba-orange-05":"#FFBD78","laba-orange-02":"#FFDDBB","laba-orange-01":"#FFF5EB","laba-red-10":"#9E101F","laba-red-08":"#ED0019","laba-red-06":"#FB004E","laba-red-05":"#FF5378","laba-red-02":"#FFAEBF","laba-red-01":"#FFEBEF","lpd-primary-50":"#CEDBFE","lpd-primary-100":"#B6CAFE","lpd-primary-200":"#9DB8FE","lpd-primary-300":"#6C94FD","lpd-primary-400":"#3B71FD","lpd-primary-500":"#0A4DFC","lpd-primary-600":"#083ECA","lpd-primary-700":"#062E97","lpd-primary-800":"#041F65","lpd-primary-900":"#03174C","lpd-secondary-50":"#FEF5CE","lpd-secondary-100":"#FEEFB5","lpd-secondary-200":"#FDEA9D","lpd-secondary-300":"#FDE06B","lpd-secondary-400":"#FCD53A","lpd-secondary-500":"#FBCB09","lpd-secondary-600":"#C9A207","lpd-secondary-700":"#977A05","lpd-secondary-800":"#645104","lpd-secondary-900":"#4B3D03","bill-primary-50":"#EAF0FE","bill-primary-100":"#D5E1FD","bill-primary-200":"#ABC3FB","bill-primary-300":"#81A4F9","bill-primary-400":"#5786F7","bill-primary-500":"#2D68F5","bill-primary-600":"#2453C4","bill-primary-700":"#1B3E93","bill-primary-800":"#122A62","bill-primary-900":"#091531","bill-secondary-50":"#F0FEFD","bill-secondary-100":"#E2FCFA","bill-secondary-200":"#C5F9F5","bill-secondary-300":"#A8F7F1","bill-secondary-400":"#8BF4EC","bill-secondary-500":"#6EF1E7","bill-secondary-600":"#59CBC2","bill-secondary-700":"#44A59D","bill-secondary-800":"#2F7E79","bill-secondary-900":"#1A5854"},o4={"payhere-h1":["60px",{lineHeight:"72px",fontWeight:700}],"payhere-h2":["48px",{lineHeight:"58px",fontWeight:700}],"payhere-h3":["40px",{lineHeight:"48px",fontWeight:700}],"payhere-h4":["30px",{lineHeight:"38px",fontWeight:700}],"payhere-h5":["28px",{lineHeight:"40px",fontWeight:600}],"payhere-h6":["24px",{lineHeight:"30px",fontWeight:600}],"payhere-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"payhere-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"payhere-body-ls":["18px",{lineHeight:"26px",fontWeight:600}],"payhere-body-lb":["18px",{lineHeight:"26px",fontWeight:700}],"payhere-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"payhere-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"payhere-body-ms":["16px",{lineHeight:"24px",fontWeight:600}],"payhere-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"payhere-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"payhere-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"payhere-label-sb":["15px",{lineHeight:"26px",fontWeight:600}],"payhere-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"payhere-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"payhere-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"payhere-body-smb":["14px",{lineHeight:"22px",fontWeight:600}],"payhere-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"payhere-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"payhere-body-esm":["12px",{lineHeight:"20px",fontWeight:500}],"payhere-body-esmb":["12px",{lineHeight:"20px",fontWeight:600}],"payhere-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},s4={"laba-title-lb":["36px",{lineHeight:"44px",fontWeight:700}],"laba-title-ls":["36px",{lineHeight:"44px",fontWeight:600}],"laba-title-lr":["36px",{lineHeight:"44px",fontWeight:400}],"laba-title-mb":["32px",{lineHeight:"40px",fontWeight:700}],"laba-title-ms":["32px",{lineHeight:"40px",fontWeight:600}],"laba-title-mr":["32px",{lineHeight:"40px",fontWeight:400}],"laba-h1":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-b":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-sb":["24px",{lineHeight:"30px",fontWeight:600}],"laba-h1-r":["24px",{lineHeight:"30px",fontWeight:400}],"laba-h2":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-b":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-sb":["18px",{lineHeight:"26px",fontWeight:600}],"laba-h2-r":["18px",{lineHeight:"26px",fontWeight:400}],"laba-base-rb":["16px",{lineHeight:"24px",fontWeight:700}],"laba-base-rs":["16px",{lineHeight:"24px",fontWeight:600}],"laba-base-rr":["16px",{lineHeight:"24px",fontWeight:400}],"laba-base-sb":["14px",{lineHeight:"20px",fontWeight:700}],"laba-base-ss":["14px",{lineHeight:"20px",fontWeight:600}],"laba-base-sr":["14px",{lineHeight:"20px",fontWeight:400}],"laba-subtitle-rb":["12px",{lineHeight:"16px",fontWeight:700}],"laba-subtitle-rs":["12px",{lineHeight:"16px",fontWeight:600}],"laba-subtitle-rr":["12px",{lineHeight:"16px",fontWeight:400}],"laba-subtitle-sb":["10px",{lineHeight:"12px",fontWeight:700}],"laba-subtitle-ss":["10px",{lineHeight:"12px",fontWeight:600}],"laba-subtitle-sr":["10px",{lineHeight:"12px",fontWeight:400}]},I9={"bill-h1":["60px",{lineHeight:"72px",fontWeight:700}],"bill-h2":["48px",{lineHeight:"58px",fontWeight:700}],"bill-h3":["40px",{lineHeight:"58px",fontWeight:700}],"bill-h4":["30px",{lineHeight:"38px",fontWeight:700}],"bill-h5":["28px",{lineHeight:"40px",fontWeight:600}],"bill-h6":["24px",{lineHeight:"30px",fontWeight:600}],"bill-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"bill-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"bill-body-lsm":["18px",{lineHeight:"26px",fontWeight:600}],"bill-body-blb":["18px",{lineHeight:"26px",fontWeight:700}],"bill-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"bill-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"bill-body-msm":["16px",{lineHeight:"24px",fontWeight:600}],"bill-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"bill-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"bill-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"bill-label-sm":["15px",{lineHeight:"26px",fontWeight:600}],"bill-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"bill-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"bill-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"bill-body-ssm":["14px",{lineHeight:"22px",fontWeight:600}],"bill-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"bill-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"bill-body-ems":["12px",{lineHeight:"20px",fontWeight:500}],"bill-body-essm":["12px",{lineHeight:"20px",fontWeight:600}],"bill-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},_9={...o4,...s4,...I9},D9={"sm-default":"640px",sm:"576px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},U0={"sm-default":640,sm:576,md:768,lg:1024,xl:1280,"2xl":1536},A9=()=>_.jsx("div",{className:"1ru-w-full 1ru-bg-red-900",children:"index"}),T9="_loading_e63gb_482",Re={"button-l":"_button-l_e63gb_67","button-m":"_button-m_e63gb_67","button-s":"_button-s_e63gb_115","button-xs":"_button-xs_e63gb_115","button-large":"_button-large_e63gb_241","button-reguler":"_button-reguler_e63gb_241","button-small":"_button-small_e63gb_259","button-extra-small":"_button-extra-small_e63gb_259","button-bill-l":"_button-bill-l_e63gb_379","button-bill-m":"_button-bill-m_e63gb_379","button-bill-s":"_button-bill-s_e63gb_427","button-bill-xs":"_button-bill-xs_e63gb_427","button-bill-xxs":"_button-bill-xxs_e63gb_427",loading:T9,"filled-bill-secondary-800_bg-white":"_filled-bill-secondary-800_bg-white_e63gb_497","filled-bill-blue-gray-500_bg-blue-gray-50":"_filled-bill-blue-gray-500_bg-blue-gray-50_e63gb_497","nude-laba-red-05":"_nude-laba-red-05_e63gb_497","nude-laba-red-08":"_nude-laba-red-08_e63gb_497","nude-laba-red-10":"_nude-laba-red-10_e63gb_497","nude-gray-500":"_nude-gray-500_e63gb_497","nude-green-700":"_nude-green-700_e63gb_497","nude-red-700":"_nude-red-700_e63gb_497","nude-laba-blue-10":"_nude-laba-blue-10_e63gb_497","ghost-blue-gray-100-bg_white-text_blue-gray-400":"_ghost-blue-gray-100-bg_white-text_blue-gray-400_e63gb_497","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_e63gb_497","ghost-laba-green-10":"_ghost-laba-green-10_e63gb_497","ghost-laba-blue-01":"_ghost-laba-blue-01_e63gb_497","ghost-laba-blue-05":"_ghost-laba-blue-05_e63gb_497","ghost-green-700":"_ghost-green-700_e63gb_497","ghost-red-700":"_ghost-red-700_e63gb_497","ghost-laba-blue-10":"_ghost-laba-blue-10_e63gb_497","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_e63gb_497","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_e63gb_497","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_e63gb_497","primary-laba-blue-10":"_primary-laba-blue-10_e63gb_497","primary-bill-red-700":"_primary-bill-red-700_e63gb_497","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_e63gb_497","secondary-bill-secondary-800":"_secondary-bill-secondary-800_e63gb_497","primary-bill-primary-600":"_primary-bill-primary-600_e63gb_497","tertiary-black":"_tertiary-black_e63gb_497","tertiary-gray-500":"_tertiary-gray-500_e63gb_497","tertiary-red-600":"_tertiary-red-600_e63gb_497","tertiary-red-300":"_tertiary-red-300_e63gb_497","tertiary-blue-700":"_tertiary-blue-700_e63gb_497","secondary-green-600":"_secondary-green-600_e63gb_497","secondary-red-700":"_secondary-red-700_e63gb_497","secondary-red-600":"_secondary-red-600_e63gb_497","secondary-blue-700":"_secondary-blue-700_e63gb_497","primary-red-700":"_primary-red-700_e63gb_497","primary-blue-700":"_primary-blue-700_e63gb_497","icon-loading":"_icon-loading_e63gb_647"},nh={size:{large:Re["button-large"],reguler:Re["button-reguler"],small:Re["button-small"],"extra-small":Re["button-extra-small"],l:Re["button-l"],m:Re["button-m"],s:Re["button-s"],xs:Re["button-xs"],"bill-l":Re["button-bill-l"],"bill-m":Re["button-bill-m"],"bill-s":Re["button-bill-s"],"bill-xs":Re["button-bill-xs"],"bill-xxs":Re["button-bill-xxs"]},loadingSize:{large:"1ru-size-6",reguler:"1ru-size-5",small:"1ru-size-5","extra-small":"1ru-size-5",l:"1ru-size-6",m:"1ru-size-5",s:"1ru-size-5",xs:"1ru-size-5","bill-l":"1ru-size-6","bill-m":"1ru-size-5","bill-s":"1ru-size-5","bill-xs":"1ru-size-5","bill-xxs":"1ru-size-5"},variants:{"primary-laba-blue-10":Re["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Re["primary-red-700-dsb_laba-grey-06"],"primary-green-700":Re["primary-green-700"],"ghost-laba-blue-10":Re["ghost-laba-blue-10"],"ghost-red-700":Re["ghost-red-700"],"ghost-green-700":Re["ghost-green-700"],"ghost-laba-green-10":Re["ghost-laba-green-10"],"nude-laba-blue-10":Re["nude-laba-blue-10"],"nude-red-700":Re["nude-red-700"],"nude-green-700":Re["nude-green-700"],"nude-gray-500":Re["nude-gray-500"],"primary-blue-700":Re["primary-blue-700"],"secondary-blue-700":Re["secondary-blue-700"],"tertiary-blue-700":Re["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Re["ghost-blue-gray-100-bg_white"],"ghost-blue-gray-100-bg_white-text_blue-gray-400":Re["ghost-blue-gray-100-bg_white-text_blue-gray-400"],"ghost-laba-blue-05":Re["ghost-laba-blue-05"],"secondary-red-600":Re["secondary-red-600"],"tertiary-red-300":Re["tertiary-red-300"],"tertiary-gray-500":Re["tertiary-gray-500"],"tertiary-red-600":Re["tertiary-red-600"],"tertiary-black":Re["tertiary-black"],"secondary-green-600":Re["secondary-green-600"],"nude-laba-red-10":Re["nude-laba-red-10"],"nude-laba-red-05":Re["nude-laba-red-05"],"primary-red-700":Re["primary-red-700"],"nude-laba-red-08":Re["nude-laba-red-08"],"ghost-laba-blue-01":Re["ghost-laba-blue-01"],"filled-laba-white_laba-blue-10":Re["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Re["filled-laba-white_laba-red-05"],"secondary-red-700":Re["secondary-red-700"],"primary-bill-primary-600":Re["primary-bill-primary-600"],"secondary-bill-secondary-800":Re["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Re["tertiary-bill-secondary-800"],"primary-bill-red-700":Re["primary-bill-red-700"],"filled-bill-blue-gray-500_bg-blue-gray-50":Re["filled-bill-blue-gray-500_bg-blue-gray-50"],"filled-bill-secondary-800_bg-white":Re["filled-bill-secondary-800_bg-white"]}},R9=({className:e=""})=>_.jsx("svg",{className:`${Re["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:_.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
22
|
+
`,a};uf.publicKeyToOpenSSH=function(e,t){var n="ssh-rsa";t=t||"";var r=Wt.util.createBuffer();return Ko(r,n),Kr(r,e.e),Kr(r,e.n),n+" "+Wt.util.encode64(r.bytes())+" "+t};uf.privateKeyToOpenSSH=function(e,t){return t?Wt.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Wt.pki.privateKeyToPem(e)};uf.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||Wt.md.md5.create(),r="ssh-rsa",i=Wt.util.createBuffer();Ko(i,r),Kr(i,e.e),Kr(i,e.n),n.start(),n.update(i.getBytes());var a=n.digest();if(t.encoding==="hex"){var o=a.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return a.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return a};function Kr(e,t){var n=t.toString(16);n[0]>="8"&&(n="00"+n);var r=Wt.util.hexToBytes(n);e.putInt32(r.length),e.putBytes(r)}function Ko(e,t){e.putInt32(t.length),e.putString(t)}function Pu(){for(var e=Wt.md.sha1.create(),t=arguments.length,n=0;n<t;++n)e.update(arguments[n]);return e.digest()}var KR=ze;const Pa=o6(KR),ci=e=>{try{return At(e).isFinite()}catch{return!1}},KC=e=>{if(typeof e=="number"&&Number.isFinite(e))return!0;if(typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e))){const t=Number(e);return Number.isFinite(t)}return!1};function cf(e,t){const{minimumFractionDigits:n,instance:r=!1,ignoreFractionLimit:i=!1}=t||{};let{maximumFractionDigits:a=2}=t||{};ci(e)||(e="0"),!i&&n!==void 0&&n>a&&(a=n);let o="";if(i?o=At(e).toString():o=At(e).toFixed(a),o.includes(".")&&!i){const[s,l]=o.split(".");let u=l.replace(/0+$/,"");n!==void 0&&n>=0&&(u=u.padEnd(n,"0")),o=u?`${s}.${u}`:s}return r?At(o):o}const pp=(e,t=2)=>{let n=parseFloat(KC(e)?e:0);return n=(+(Math.round(n+"e"+t)+"e-"+t)).toFixed(t),n=Number(n),n};function Ji(e,t="currency",n){const{minimumFractionDigits:r=0,locale:i="id-ID",currency:a="IDR",withSpace:o=!1}=n||{},s=new Intl.NumberFormat(i,{style:t,currency:a,minimumFractionDigits:r}).format(pp(e,r>0?r:2));return o?s:s.replace(/\s/g,"")}const qo=(e,t,n,r)=>{const i={"id-ID":Yc,"zh-CN":rC,"en-US":Yg,"nl-BE":nC};let a=n??"-";return e&&!isNaN(new Date(e).getTime())&&(a=wl(e,t??"dd/MM/yyyy",{locale:i[r??"id-ID"]})),a},qR=(e,t,n,r,i,a)=>{const o={"id-ID":Yc,"zh-CN":rC,"en-US":Yg,"nl-NL":nC};if(e&&!isNaN(new Date(e).getTime())){const s=wl(e,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});if(t&&!isNaN(new Date(t).getTime())){const l=wl(t,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});return s===l?s:`${s}${r??"-"}${l}`}return s}return i??"-"},qC=(e,t)=>e.reduce((n,r)=>{const i=String(r[t]);return n[i]||(n[i]=[]),n[i].push(r),n},{}),JR=({value:e,keyDate:t="date",keyFormat:n="formatDate",format:r="dd/MM/yyyy"})=>{const i=e.map(a=>({...a,[n]:qo(a[t],r)}));return qC(i,n)},QR=e=>(Object.keys(e).forEach(t=>{["",null,void 0,[],{}].includes(e[t])&&delete e[t]}),e),eB=(e,t)=>{var h,f;const n=/^-?\d+[0-9.,]*$/,r=/([.])(?=.*\1)/,i=/([,])(?=.*\1)/,a=((h=e.split(",")[0])==null?void 0:h.trim())||"",o=((f=e.split(",")[1])==null?void 0:f.trim())||"",s=!r.test(a)&&(a==="-"||n.test(a)||!a),l=!r.test(o)&&(o==="-"||n.test(o)||!o),u=(g,p,m)=>{let b=g;const v=g.split(".")[0];return isNaN(parseFloat(v.split(".")[0]))||(parseFloat(v.split(".")[0])<=p?b=`${p}`:parseFloat(v)>=m&&(b=`${m}`)),b},c=u(a,(t==null?void 0:t.latMin)??-85,(t==null?void 0:t.latMax)??85),d=u(o,(t==null?void 0:t.longMin)??-180,(t==null?void 0:t.longMax)??180);return{latitude:c,longitude:d,latlong:`${c}${e.includes(",")?","+d:""}`,isValid:!i.test(e)&&s&&l}},H1=(e,t)=>e?Object.fromEntries(Object.entries(t).filter(([r])=>r.startsWith(e))):t,mp=(e,t)=>e.map(n=>n[t]).join(","),bp=(e,t)=>e.map(n=>n[t]),tB=(e,t)=>Array.isArray(e)?e==null?void 0:e.map((n,r,i)=>typeof t=="function"?t(n,r,i):n):[],nB=(e,t,n,r,i)=>Array.isArray(e)?{[t]:e==null?void 0:e.map((a,o,s)=>typeof n=="function"?n(a,o,s):a),[`${t}-val-be`]:a=>r==="array-of-object-to-array"?bp(a,i):mp(a,i)}:{[t]:"",[`${t}-val-be`]:()=>""};function vp(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!vp(e[i],t[i]))return!1;return!0}function rB(e,t={maxTime:"hour"}){const{maxTime:n="hour"}=t,r=l=>l<10?`0${l}`:l;let i=r(0),a=r(0);const o=r(Math.floor(e%3600/60)),s=r(Math.floor(e%60));return n==="hour"?a=r(Math.floor(e/3600)):n==="day"&&(i=r(Math.floor(e/(3600*24))),a=r(Math.floor(e%(3600*24)/3600))),{day:i,hour:a,minute:o,second:s}}function fl(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _l(e,...t){if(!t.length)return e;const n=t.shift();if(fl(e)&&fl(n))for(const r in n)fl(n[r])?(e[r]||Object.assign(e,{[r]:{}}),_l(e[r],n[r])):Object.assign(e,{[r]:n[r]});return _l(e,...t)}function od(e,t){const n=t.match(/[^.[\]]+/g);if(!n||n.length===0)return;const r=(i,a)=>{if(typeof i!="object"||i===null||a.length===0)return;const o=i,s=a[0],l=a.slice(1);if(l.length===0){delete o[s];return}const u=o[s];if(s==="*"&&Array.isArray(o)){for(const c of o)r(c,l);return}r(u,l)};r(e,n)}function iB(e,t){if(!e||!t)return e;if(Array.isArray(t))for(const n of t)od(e,n);else od(e,t);return e}function JC(e,t){const n=JSON.parse(JSON.stringify(e));if(Array.isArray(t))for(const r of t)od(n,r);else od(n,t);return n}function aB(e,t,n={}){const r=n.arrayMergeStrategy||"combine",i=(n.keepKeys||[]).map(s=>s.match(/[^.[\]]+/g)||[]),a=s=>i.some(l=>l.length!==s.length?!1:l.every((u,c)=>u===s[c]));function o(s,l,u){if(u.length>0&&a(u))return s;if(Array.isArray(l)&&Array.isArray(s)){if(r==="overwrite")return[...l];const c=r==="sync"?l.length:Math.max(s.length,l.length),d=new Array(c);for(let h=0;h<c;h++){const f=[...u,String(h)],g=s[h],p=l[h];if(h>=l.length){d[h]=g;continue}if(h>=s.length){d[h]=p;continue}d[h]=o(g,p,f)}return d}if(fl(l)&&fl(s)){const c={...s};return Object.keys(l).forEach(d=>{const h=[...u,d],f=l[d],g=s[d];c[d]=o(g,f,h)}),c}return l===void 0?s:l}return o(e,t,[])}const oB=e=>pp(e||0),sB=e=>cf(e||0),lB=e=>isNaN(e)?void 0:e,df=e=>{const t=e.toString().split(""),n=t[1]!=="0"?`,${t[1]}`:"";let[r]=e.toString().split(".");return r=r.replaceAll("-",""),r.length>=15?`${+r.substring(0,3)} T`:r.length===14?`${+r.substring(0,2)} T`:r.length===13?`${+r.substring(0,1)}${n} T`:r.length===12?`${+r.substring(0,3)} M`:r.length===11?`${+r.substring(0,2)} M`:r.length===10?`${+r.substring(0,1)}${n} M`:r.length===9?`${+r.substring(0,3)} JT`:r.length===8?`${+r.substring(0,2)} JT`:r.length===7?`${+r.substring(0,1)}${n} JT`:r.length===6?`${+r.substring(0,3)} RB`:r.length===5?`${+r.substring(0,2)} RB`:r.length===4?`${+r.substring(0,1)}${n} RB`:r.length<=3?+r?`${+r}`:0:null};function O0(e){if(typeof e!="string")throw new Error("Input harus berupa string");const t=e.split(".");if(t.length===1)return{filename:e,extension:""};const n="."+t[t.length-1];return{filename:t.slice(0,-1).join("."),extension:n}}const uB=e=>(new DOMParser().parseFromString(e||"","text/html").body.textContent??"").toString();function cB(e,t){const n=typeof e=="string"?e:JSON.stringify(e),r=Pa.util.decode64(t.replace(/\s+/g,"")),i=Pa.util.decode64(r),a=Pa.asn1.fromDer(i),s=Pa.pki.publicKeyFromAsn1(a).encrypt(n,"RSA-OAEP",{md:Pa.md.sha256.create(),mgf1:{md:Pa.md.sha1.create()}});return Pa.util.encode64(s)}function dB(e,t={}){const{locale:n,currency:r,minimumFractionDigits:i,withSpace:a,currencyDisplay:o,ignoreFractionLimit:s=!1}=t;let{maximumFractionDigits:l=2}=t;!s&&i!==void 0&&i>l&&(l=i);const u=cf(e,{maximumFractionDigits:l,ignoreFractionLimit:s}),[c,d=""]=u.split("."),h=c.replace(/\B(?=(\d{3})+(?!\d))/g,".");let f="";s?f=d:f=d.slice(0,l),s||(i===void 0?f=f.replace(/0+$/,""):f&&i>0&&(f=f.padEnd(i,"0")));let g=f?`${h},${f}`:h;if(!n||!r)return g;const m={"id-ID":{symbol:"Rp",code:"IDR",name:"Rupiah",negativePosition:"start"},"en-US":{symbol:"$",code:"USD",name:"US Dollar",negativePosition:"middle"},"ja-JP":{symbol:"¥",code:"JPY",name:"Yen",negativePosition:"middle"}}[n]||{symbol:"",code:r,name:r},b={symbol:m.symbol,code:m.code,name:m.name}[o||"symbol"],v=g.includes("-");return g=m.negativePosition==="start"?g.replace("-",""):g,a?`${m.negativePosition==="start"&&v?"-":""}${b} ${g}`:`${m.negativePosition==="start"&&v?"-":""}${b}${g}`}function fB(e){if(!ci(e))return"0";const t=typeof e=="number"?At(e).toString():e;if(!t.includes("."))return t;const[n,r]=t.split("."),i=r.replace(/0+$/,"");return i?`${n}.${i}`:n}/*! js-cookie v3.0.5 | MIT */function Fu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var hB={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function V0(e,t){function n(i,a,o){if(!(typeof document>"u")){o=Fu({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,o[l]!==!0&&(s+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var l=a[s].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(o[c]=e.read(u,c),i===c)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,a){n(i,"",Fu({},a,{expires:-1}))},withAttributes:function(i){return V0(this.converter,Fu({},this.attributes,i))},withConverter:function(i){return V0(Fu({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Or=V0(hB,{path:"/"});const gB={setItem(e,t,n={},r=3e3){const a={...{path:"/",expires:365},...n};parseInt(Or.get(`${e}_count`)??"0",10)&&this.removeItem(e,n);const s=Math.ceil(t.length/r);for(let l=0;l<s;l++){const u=t.slice(l*r,(l+1)*r);Or.set(`${e}_${l}`,u,a)}Or.set(`${e}_count`,s.toString(),a)},getItem(e){const t=parseInt(Or.get(`${e}_count`)??"0",10);if(!t)return null;let n="";for(let r=0;r<t;r++){const i=Or.get(`${e}_${r}`);if(!i)return null;n+=i}return n},removeItem(e,t={}){const n=parseInt(Or.get(`${e}_count`)??"0",10),r={path:"/",...t};if(!isNaN(n)){for(let i=0;i<n;i++)Or.remove(`${e}_${i}`,r);Or.remove(`${e}_count`,r)}},clear(e={}){const t={path:"/",...e},n=Or.get();Object.keys(n).forEach(r=>Or.remove(r,t))}};function QC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=QC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ki(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QC(e))&&(r&&(r+=" "),r+=t);return r}const Dl=e=>typeof e=="number"&&!isNaN(e),oo=e=>typeof e=="string",Qn=e=>typeof e=="function",Ac=e=>oo(e)||Qn(e)?e:null,H0=e=>I.isValidElement(e)||oo(e)||Qn(e)||Dl(e);function pB(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function ff(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:d,isIn:h,playToast:f}=o;const g=r?`${t}--${l}`:t,p=r?`${n}--${l}`:n,m=I.useRef(0);return I.useLayoutEffect(()=>{const b=d.current,v=g.split(" "),x=C=>{C.target===d.current&&(f(),b.removeEventListener("animationend",x),b.removeEventListener("animationcancel",x),m.current===0&&C.type!=="animationcancel"&&b.classList.remove(...v))};b.classList.add(...v),b.addEventListener("animationend",x),b.addEventListener("animationcancel",x)},[]),I.useEffect(()=>{const b=d.current,v=()=>{b.removeEventListener("animationend",v),i?pB(b,c,a):c()};h||(u?v():(m.current=1,b.className+=` ${p}`,b.addEventListener("animationend",v)))},[h]),I.createElement(I.Fragment,null,s)}}function j1(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Tn=new Map;let Al=[];const j0=new Set,mB=e=>j0.forEach(t=>t(e)),e4=()=>Tn.size>0;function t4(e,t){var n;if(t)return!((n=Tn.get(t))==null||!n.isToastActive(e));let r=!1;return Tn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function n4(e,t){H0(e)&&(e4()||Al.push({content:e,options:t}),Tn.forEach(n=>{n.buildToast(e,t)}))}function W1(e,t){Tn.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function bB(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(a){const o=a.containerId||1;return{subscribe(s){const l=function(c,d,h){let f=1,g=0,p=[],m=[],b=[],v=d;const x=new Map,C=new Set,E=()=>{b=Array.from(x.values()),C.forEach(y=>y())},w=y=>{m=y==null?[]:m.filter(S=>S!==y),E()},B=y=>{const{toastId:S,onOpen:D,updateId:A,children:T}=y.props,F=A==null;y.staleId&&x.delete(y.staleId),x.set(S,y),m=[...m,y.props.toastId].filter(k=>k!==y.staleId),E(),h(j1(y,F?"added":"updated")),F&&Qn(D)&&D(I.isValidElement(T)&&T.props)};return{id:c,props:v,observe:y=>(C.add(y),()=>C.delete(y)),toggle:(y,S)=>{x.forEach(D=>{S!=null&&S!==D.props.toastId||Qn(D.toggle)&&D.toggle(y)})},removeToast:w,toasts:x,clearQueue:()=>{g-=p.length,p=[]},buildToast:(y,S)=>{if((U=>{let{containerId:K,toastId:ee,updateId:z}=U;const H=K?K!==c:c!==1,X=x.has(ee)&&z==null;return H||X})(S))return;const{toastId:D,updateId:A,data:T,staleId:F,delay:k}=S,P=()=>{w(D)},$=A==null;$&&g++;const R={...v,style:v.toastStyle,key:f++,...Object.fromEntries(Object.entries(S).filter(U=>{let[K,ee]=U;return ee!=null})),toastId:D,updateId:A,data:T,closeToast:P,isIn:!1,className:Ac(S.className||v.toastClassName),bodyClassName:Ac(S.bodyClassName||v.bodyClassName),progressClassName:Ac(S.progressClassName||v.progressClassName),autoClose:!S.isLoading&&(O=S.autoClose,j=v.autoClose,O===!1||Dl(O)&&O>0?O:j),deleteToast(){const U=x.get(D),{onClose:K,children:ee}=U.props;Qn(K)&&K(I.isValidElement(ee)&&ee.props),h(j1(U,"removed")),x.delete(D),g--,g<0&&(g=0),p.length>0?B(p.shift()):E()}};var O,j;R.closeButton=v.closeButton,S.closeButton===!1||H0(S.closeButton)?R.closeButton=S.closeButton:S.closeButton===!0&&(R.closeButton=!H0(v.closeButton)||v.closeButton);let V=y;I.isValidElement(y)&&!oo(y.type)?V=I.cloneElement(y,{closeToast:P,toastProps:R,data:T}):Qn(y)&&(V=y({closeToast:P,toastProps:R,data:T}));const W={content:V,props:R,staleId:F};v.limit&&v.limit>0&&g>v.limit&&$?p.push(W):Dl(k)?setTimeout(()=>{B(W)},k):B(W)},setProps(y){v=y},setToggle:(y,S)=>{x.get(y).toggle=S},isToastActive:y=>m.some(S=>S===y),getSnapshot:()=>v.newestOnTop?b.reverse():b}}(o,a,mB);Tn.set(o,l);const u=l.observe(s);return Al.forEach(c=>n4(c.content,c.options)),Al=[],()=>{u(),Tn.delete(o)}},setProps(s){var l;(l=Tn.get(o))==null||l.setProps(s)},getSnapshot(){var s;return(s=Tn.get(o))==null?void 0:s.getSnapshot()}}}(e)).current;r(e);const i=I.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!i)return[];const o=new Map;return i.forEach(s=>{const{position:l}=s.props;o.has(l)||o.set(l,[]),o.get(l).push(s)}),Array.from(o,s=>a(s[0],s[1]))},isToastActive:t4,count:i==null?void 0:i.length}}function vB(e){const[t,n]=I.useState(!1),[r,i]=I.useState(!1),a=I.useRef(null),o=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:d}=e;var h,f;function g(){n(!0)}function p(){n(!1)}function m(x){const C=a.current;o.canDrag&&C&&(o.didMove=!0,t&&p(),o.delta=e.draggableDirection==="x"?x.clientX-o.start:x.clientY-o.start,o.start!==x.clientX&&(o.canCloseOnClick=!1),C.style.transform=`translate3d(${e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function b(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",b);const x=a.current;if(o.canDrag&&o.didMove&&x){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(f=Tn.get((h={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||f.setToggle(h.id,h.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",g),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){o.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",b);const C=a.current;o.canCloseOnClick=!0,o.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(o.start=x.clientX,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=x.clientY,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:C,bottom:E,left:w,right:B}=a.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=w&&x.clientX<=B&&x.clientY>=C&&x.clientY<=E?p():g()}};return s&&l&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=g)),d&&(v.onClick=x=>{c&&c(x),o.canCloseOnClick&&u()}),{playToast:g,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:v}}function yB(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:a,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:d,theme:h}=e;const f=a||l&&u===0,g={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(g.transform=`scaleX(${u})`);const p=ki("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=Qn(o)?o({rtl:c,type:i,defaultClassName:p}):ki(p,o),b={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{d&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${h} Toastify__progress-bar--${i}`}),I.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:m,style:g,...b}))}let xB=1;const r4=()=>""+xB++;function CB(e){return e&&(oo(e.toastId)||Dl(e.toastId))?e.toastId:r4()}function hl(e,t){return n4(e,t),t.toastId}function sd(e,t){return{...t,type:t&&t.type||e,toastId:CB(t)}}function Nu(e){return(t,n)=>hl(t,sd(e,n))}function ft(e,t){return hl(e,sd("default",t))}ft.loading=(e,t)=>hl(e,sd("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ft.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=oo(i)?ft.loading(i,n):ft.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,d,h)=>{if(d==null)return void ft.dismiss(r);const f={type:c,...s,...n,data:h},g=oo(d)?{render:d}:d;return r?ft.update(r,{...f,...g}):ft(g.render,{...f,...g}),h},u=Qn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",a,c)),u},ft.success=Nu("success"),ft.info=Nu("info"),ft.error=Nu("error"),ft.warning=Nu("warning"),ft.warn=ft.warning,ft.dark=(e,t)=>hl(e,sd("default",{theme:"dark",...t})),ft.dismiss=function(e){(function(t){var n;if(e4()){if(t==null||oo(n=t)||Dl(n))Tn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Tn.get(t.containerId);r?r.removeToast(t.id):Tn.forEach(i=>{i.removeToast(t.id)})}}else Al=Al.filter(r=>t!=null&&r.options.toastId!==t)})(e)},ft.clearWaitingQueue=function(e){e===void 0&&(e={}),Tn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ft.isActive=t4,ft.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var a;let{containerId:o}=i;return(a=Tn.get(o||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:r4()};a.toastId!==e&&(a.staleId=e);const o=a.render||i;delete a.render,hl(o,a)}},ft.done=e=>{ft.update(e,{progress:1})},ft.onChange=function(e){return j0.add(e),()=>{j0.delete(e)}},ft.play=e=>W1(!0,e),ft.pause=e=>W1(!1,e);const EB=typeof window<"u"?I.useLayoutEffect:I.useEffect,Mu=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},eh={info:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return I.createElement(Mu,{...e},I.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return I.createElement("div",{className:"Toastify__spinner"})}},SB=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:a}=vB(e),{closeButton:o,children:s,autoClose:l,onClick:u,type:c,hideProgressBar:d,closeToast:h,transition:f,position:g,className:p,style:m,bodyClassName:b,bodyStyle:v,progressClassName:x,progressStyle:C,updateId:E,role:w,progress:B,rtl:y,toastId:S,deleteToast:D,isIn:A,isLoading:T,closeOnClick:F,theme:k}=e,P=ki("Toastify__toast",`Toastify__toast-theme--${k}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":y},{"Toastify__toast--close-on-click":F}),$=Qn(p)?p({rtl:y,position:g,type:c,defaultClassName:P}):ki(P,p),R=function(W){let{theme:U,type:K,isLoading:ee,icon:z}=W,H=null;const X={theme:U,type:K};return z===!1||(Qn(z)?H=z({...X,isLoading:ee}):I.isValidElement(z)?H=I.cloneElement(z,X):ee?H=eh.spinner():(te=>te in eh)(K)&&(H=eh[K](X))),H}(e),O=!!B||!l,j={closeToast:h,type:c,theme:k};let V=null;return o===!1||(V=Qn(o)?o(j):I.isValidElement(o)?I.cloneElement(o,j):function(W){let{closeToast:U,theme:K,ariaLabel:ee="close"}=W;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${K}`,type:"button",onClick:z=>{z.stopPropagation(),U(z)},"aria-label":ee},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(j)),I.createElement(f,{isIn:A,done:D,position:g,preventExitTransition:n,nodeRef:r,playToast:a},I.createElement("div",{id:S,onClick:u,"data-in":A,className:$,...i,style:m,ref:r},I.createElement("div",{...A&&{role:w},className:Qn(b)?b({type:c}):ki("Toastify__toast-body",b),style:v},R!=null&&I.createElement("div",{className:ki("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!T})},R),I.createElement("div",null,s)),V,I.createElement(yB,{...E&&!O?{key:`pb-${E}`}:{},rtl:y,theme:k,delay:l,isRunning:t,isIn:A,closeToast:h,hide:d,type:c,style:C,className:x,controlledProgress:O,progress:B||0})))},hf=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},wB=ff(hf("bounce",!0));ff(hf("slide",!0));ff(hf("zoom"));ff(hf("flip"));const IB={position:"top-right",transition:wB,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function _B(e){let t={...IB,...e};const n=e.stacked,[r,i]=I.useState(!0),a=I.useRef(null),{getToastToRender:o,isToastActive:s,count:l}=bB(t),{className:u,style:c,rtl:d,containerId:h}=t;function f(p){const m=ki("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":d});return Qn(u)?u({position:p,rtl:d,defaultClassName:m}):ki(m,Ac(u))}function g(){n&&(i(!0),ft.play())}return EB(()=>{if(n){var p;const m=a.current.querySelectorAll('[data-in="true"]'),b=12,v=(p=t.position)==null?void 0:p.includes("top");let x=0,C=0;Array.from(m).reverse().forEach((E,w)=>{const B=E;B.classList.add("Toastify__toast--stacked"),w>0&&(B.dataset.collapsed=`${r}`),B.dataset.pos||(B.dataset.pos=v?"top":"bot");const y=x*(r?.2:1)+(r?0:b*w);B.style.setProperty("--y",`${v?y:-1*y}px`),B.style.setProperty("--g",`${b}`),B.style.setProperty("--s",""+(1-(r?C:0))),x+=B.offsetHeight,C+=.025})}},[r,l,n]),I.createElement("div",{ref:a,className:"Toastify",id:h,onMouseEnter:()=>{n&&(i(!1),ft.pause())},onMouseLeave:g},o((p,m)=>{const b=m.length?{...c}:{...c,pointerEvents:"none"};return I.createElement("div",{className:f(p),style:b,key:`container-${p}`},m.map(v=>{let{content:x,props:C}=v;return I.createElement(SB,{...C,stacked:n,collapseAll:g,isIn:s(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},x)}))}))}const Xn={"alert-body":"_alert-body_1qmvx_115","text-header":"_text-header_1qmvx_241","alert-info-filled":"_alert-info-filled_1qmvx_469","alert-warning-filled":"_alert-warning-filled_1qmvx_469","alert-error-filled":"_alert-error-filled_1qmvx_469","alert-success-filled":"_alert-success-filled_1qmvx_469","alert-info-outlined":"_alert-info-outlined_1qmvx_469","alert-warning-outlined":"_alert-warning-outlined_1qmvx_469","alert-error-outlined":"_alert-error-outlined_1qmvx_469","alert-success-outlined":"_alert-success-outlined_1qmvx_469"},DB=(e,t,n)=>{const r=(n==null?void 0:n.variant)??"outline",i={position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,bodyClassName:Xn["alert-body"]},a={icon:{solid:{success:_.jsx(TB,{}),warning:_.jsx(PB,{}),error:_.jsx($B,{}),info:_.jsx(BB,{})},outline:{success:_.jsx(AB,{}),warning:_.jsx(kB,{}),error:_.jsx(RB,{}),info:_.jsx(FB,{})}},variant:{solid:{success:Xn["alert-success-filled"],error:Xn["alert-error-filled"],warning:Xn["alert-warning-filled"],info:Xn["alert-info-filled"]},outline:{success:Xn["alert-success-outlined"],error:Xn["alert-error-outlined"],warning:Xn["alert-warning-outlined"],info:Xn["alert-info-outlined"]}}};return t==="error"?ft.error(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Error"}),e]}),{icon:a.icon[r].error,className:a.variant[r].error,...i,...n}):t==="info"?ft.info(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Info"}),e]}),{icon:a.icon[r].info,className:a.variant[r].info,...i,...n}):t==="warning"?ft.warning(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Warning"}),e]}),{icon:a.icon[r].warning,className:a.variant[r].warning,...i,...n}):ft(_.jsxs("div",{children:[["solid"].includes(r)&&_.jsx("p",{className:Xn["text-header"],children:"Success"}),e]}),{icon:a.icon[r].success,className:a.variant[r].success,...i,...n})},AB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"check-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.5C12.1217 18.5 14.1566 17.6571 15.6569 16.1569C17.1571 14.6566 18 12.6217 18 10.5C18 8.37827 17.1571 6.34344 15.6569 4.84315C14.1566 3.34285 12.1217 2.5 10 2.5C7.87827 2.5 5.84344 3.34285 4.34315 4.84315C2.84285 6.34344 2 8.37827 2 10.5C2 12.6217 2.84285 14.6566 4.34315 16.1569C5.84344 17.6571 7.87827 18.5 10 18.5ZM13.707 9.207C13.8892 9.0184 13.99 8.7658 13.9877 8.5036C13.9854 8.2414 13.8802 7.99059 13.6948 7.80518C13.5094 7.61977 13.2586 7.5146 12.9964 7.51233C12.7342 7.51005 12.4816 7.61084 12.293 7.793L9 11.086L7.707 9.793C7.5184 9.61084 7.2658 9.51005 7.0036 9.51233C6.7414 9.5146 6.49059 9.61977 6.30518 9.80518C6.11977 9.99059 6.0146 10.2414 6.01233 10.5036C6.01005 10.7658 6.11084 11.0184 6.293 11.207L8.293 13.207C8.48053 13.3945 8.73484 13.4998 9 13.4998C9.26516 13.4998 9.51947 13.3945 9.707 13.207L13.707 9.207Z",fill:"#388E3C"})})}),TB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"circle",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M9 12L11 14L15 10",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),RB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"exclamation-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 14.5C11 14.7652 10.8946 15.0196 10.7071 15.2071C10.5196 15.3946 10.2652 15.5 10 15.5C9.73478 15.5 9.48043 15.3946 9.29289 15.2071C9.10536 15.0196 9 14.7652 9 14.5C9 14.2348 9.10536 13.9804 9.29289 13.7929C9.48043 13.6054 9.73478 13.5 10 13.5C10.2652 13.5 10.5196 13.6054 10.7071 13.7929C10.8946 13.9804 11 14.2348 11 14.5ZM10 5.5C9.73478 5.5 9.48043 5.60536 9.29289 5.79289C9.10536 5.98043 9 6.23478 9 6.5V10.5C9 10.7652 9.10536 11.0196 9.29289 11.2071C9.48043 11.3946 9.73478 11.5 10 11.5C10.2652 11.5 10.5196 11.3946 10.7071 11.2071C10.8946 11.0196 11 10.7652 11 10.5V6.5C11 6.23478 10.8946 5.98043 10.7071 5.79289C10.5196 5.60536 10.2652 5.5 10 5.5Z",fill:"#F44336"})})}),BB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),$B=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),kB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"exclamation",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M8.25697 3.59898C9.02197 2.23898 10.979 2.23898 11.743 3.59898L17.323 13.519C18.073 14.853 17.11 16.499 15.581 16.499H4.41997C2.88997 16.499 1.92697 14.853 2.67697 13.519L8.25697 3.59898ZM11 13.5C11 13.7652 10.8946 14.0196 10.7071 14.2071C10.5195 14.3946 10.2652 14.5 9.99997 14.5C9.73475 14.5 9.4804 14.3946 9.29286 14.2071C9.10533 14.0196 8.99997 13.7652 8.99997 13.5C8.99997 13.2348 9.10533 12.9804 9.29286 12.7929C9.4804 12.6053 9.73475 12.5 9.99997 12.5C10.2652 12.5 10.5195 12.6053 10.7071 12.7929C10.8946 12.9804 11 13.2348 11 13.5ZM9.99997 5.49998C9.73475 5.49998 9.4804 5.60534 9.29286 5.79287C9.10533 5.98041 8.99997 6.23476 8.99997 6.49998V9.49998C8.99997 9.7652 9.10533 10.0195 9.29286 10.2071C9.4804 10.3946 9.73475 10.5 9.99997 10.5C10.2652 10.5 10.5195 10.3946 10.7071 10.2071C10.8946 10.0195 11 9.7652 11 9.49998V6.49998C11 6.23476 10.8946 5.98041 10.7071 5.79287C10.5195 5.60534 10.2652 5.49998 9.99997 5.49998Z",fill:"#F9A825"})})}),PB=()=>_.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-6 1ru-w-6",children:_.jsxs("g",{id:"alert",children:[_.jsx("path",{id:"Vector",d:"M12 15V15.01M12 9V11V9Z",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{id:"Vector_2",d:"M5 19H19C19.3263 18.9977 19.6471 18.9156 19.9344 18.7609C20.2217 18.6061 20.4667 18.3835 20.6482 18.1123C20.8297 17.841 20.942 17.5296 20.9754 17.205C21.0089 16.8804 20.9624 16.5525 20.84 16.25L13.74 4.00002C13.567 3.68741 13.3135 3.42685 13.0058 3.2454C12.698 3.06396 12.3473 2.96826 11.99 2.96826C11.6327 2.96826 11.282 3.06396 10.9742 3.2454C10.6665 3.42685 10.413 3.68741 10.24 4.00002L3.14 16.25C3.01994 16.5456 2.97233 16.8656 3.00115 17.1833C3.02997 17.501 3.13437 17.8073 3.30565 18.0764C3.47693 18.3456 3.71011 18.5698 3.98573 18.7305C4.26134 18.8912 4.57139 18.9836 4.89 19",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),FB=()=>_.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"1ru-h-5 1ru-w-5",children:_.jsx("g",{id:"information-circle",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 6.5C11 6.76522 10.8946 7.01957 10.7071 7.20711C10.5196 7.39464 10.2652 7.5 10 7.5C9.73478 7.5 9.48043 7.39464 9.29289 7.20711C9.10536 7.01957 9 6.76522 9 6.5C9 6.23478 9.10536 5.98043 9.29289 5.79289C9.48043 5.60536 9.73478 5.5 10 5.5C10.2652 5.5 10.5196 5.60536 10.7071 5.79289C10.8946 5.98043 11 6.23478 11 6.5ZM9 9.5C8.73478 9.5 8.48043 9.60536 8.29289 9.79289C8.10536 9.98043 8 10.2348 8 10.5C8 10.7652 8.10536 11.0196 8.29289 11.2071C8.48043 11.3946 8.73478 11.5 9 11.5V14.5C9 14.7652 9.10536 15.0196 9.29289 15.2071C9.48043 15.3946 9.73478 15.5 10 15.5H11C11.2652 15.5 11.5196 15.3946 11.7071 15.2071C11.8946 15.0196 12 14.7652 12 14.5C12 14.2348 11.8946 13.9804 11.7071 13.7929C11.5196 13.6054 11.2652 13.5 11 13.5V10.5C11 10.2348 10.8946 9.98043 10.7071 9.79289C10.5196 9.60536 10.2652 9.5 10 9.5H9Z",fill:"#0288D1"})})}),gu=e=>typeof e=="string"||typeof e=="number"||typeof e=="bigint"?cf(e):"";function NB(e,t){return{name:"minBig",message:t||`Value must be greater than or equal to ${e}`,test(n){return n=gu(n),ci(n)?At(n).gte(At(e))?!0:this.createError({message:t||`Value must be greater than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function MB(e,t){return{name:"maxBig",message:t||`Value must be less than or equal to ${e}`,test(n){return n=gu(n),ci(n)?At(n).lte(At(e))?!0:this.createError({message:t||`Value must be less than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function LB(e,t){return{name:"moreThanBig",message:t||`Value must be greater than ${e}`,test(n){return n=gu(n),ci(n)?At(n).gt(At(e))?!0:this.createError({message:t||`Value must be greater than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function OB(e,t){return{name:"lessThanBig",message:t||`Value must be less than ${e}`,test(n){return n=gu(n),ci(n)?At(n).lt(At(e))?!0:this.createError({message:t||`Value must be less than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function VB(e,t,n){return{name:"betweenBig",message:n||`Value must be between ${e} and ${t}`,test(r){if(r=gu(r),!ci(r))return this.createError({message:n||"Invalid BigNumber value"});const i=At(r),a=At(e),o=At(t);return i.lt(a)||i.gt(o)?this.createError({message:n||`Value must be between ${e} and ${t}`}):!0}}}function yp(e){return HB.test(e)}const HB=/^-?[0-9]+$/;function jB(e){return WB.test(e)}const WB=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function i4(e,t){const n=Number.parseFloat(e),r=String(n),i=z1(e),a=z1(r);return!!(i===a||(t==null?void 0:t.approx)===!0&&!yp(e)&&a.length>=14&&i.startsWith(a.substring(0,14)))}let qs=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function zB(e){if(i4(e,{approx:!1}))return;if(yp(e))return qs.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?qs.underflow:qs.truncate_float:qs.overflow}function z1(e){return e.replace(GB,"").replace(XB,"").replace(ZB,"").replace(UB,"")}const GB=/[eE][+-]?\d+$/,UB=/^-?(0*)?/,XB=/\./,ZB=/0+$/;class YB{constructor(t){xe(this,"isLosslessNumber",!0);if(!jB(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=zB(this.value);if(t===void 0||t===qs.truncate_float)return Number.parseFloat(this.value);if(yp(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function KB(e){return e&&typeof e=="object"&&e.isLosslessNumber===!0||!1}function qB(e){return new YB(e)}function JB(e,t){return xp({"":e},"",e,t)}function xp(e,t,n,r){return Array.isArray(n)?r.call(e,t,e9(n,r)):n&&typeof n=="object"&&!KB(n)?r.call(e,t,QB(n,r)):r.call(e,t,n)}function QB(e,t){for(const n of Object.keys(e)){const r=xp(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function e9(e,t){for(let n=0;n<e.length;n++)e[n]=xp(e,String(n),e[n],t);return e}function t9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qB,r=0;const i=s();return g(i),m(),t?JB(i,t):i;function a(){if(e.charCodeAt(r)===s9){r++,u();const k={};let P=!0;for(;r<e.length&&e.charCodeAt(r)!==U1;){P?P=!1:(h(),u());const $=r,R=c();if(R===void 0){x();return}u(),f();const O=s();if(O===void 0){S();return}Object.prototype.hasOwnProperty.call(k,R)&&!W0(O,k[R])&&C(R,$+1),k[R]=O}return e.charCodeAt(r)!==U1&&E(),r++,k}}function o(){if(e.charCodeAt(r)===l9){r++,u();const k=[];let P=!0;for(;r<e.length&&e.charCodeAt(r)!==X1;){P?P=!1:h();const $=s();p($),k.push($)}return e.charCodeAt(r)!==X1&&w(),r++,k}}function s(){u();const k=c()??d()??a()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),k}function l(k,P){if(e.slice(r,r+k.length)===k)return r+=k.length,P}function u(){for(;n9(e.charCodeAt(r));)r++}function c(){if(e.charCodeAt(r)===th){r++;let k="";for(;r<e.length&&e.charCodeAt(r)!==th;){if(e.charCodeAt(r)===o9){const P=e[r+1],$=a9[P];$!==void 0?(k+=$,r++):P==="u"?Lu(e.charCodeAt(r+2))&&Lu(e.charCodeAt(r+3))&&Lu(e.charCodeAt(r+4))&&Lu(e.charCodeAt(r+5))?(k+=String.fromCharCode(Number.parseInt(e.slice(r+2,r+6),16)),r+=5):D(r):y(r)}else i9(e.charCodeAt(r))?k+=e[r]:B(e[r]);r++}return v(),r++,k}}function d(){const k=r;if(e.charCodeAt(r)===Z1&&(r++,b(k)),e.charCodeAt(r)===Cp)r++;else if(r9(e.charCodeAt(r)))for(r++;Ou(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===m9)for(r++,b(k);Ou(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===C9||e.charCodeAt(r)===x9)for(r++,(e.charCodeAt(r)===Z1||e.charCodeAt(r)===h9)&&r++,b(k);Ou(e.charCodeAt(r));)r++;if(r>k)return n(e.slice(k,r))}function h(){if(e.charCodeAt(r)!==p9)throw new SyntaxError(`Comma ',' expected after value ${F()}`);r++}function f(){if(e.charCodeAt(r)!==b9)throw new SyntaxError(`Colon ':' expected after property name ${F()}`);r++}function g(k){if(k===void 0)throw new SyntaxError(`JSON value expected ${F()}`)}function p(k){if(k===void 0)throw new SyntaxError(`Array item expected ${F()}`)}function m(){if(r<e.length)throw new SyntaxError(`Expected end of input ${F()}`)}function b(k){if(!Ou(e.charCodeAt(r))){const P=e.slice(k,r);throw new SyntaxError(`Invalid number '${P}', expecting a digit ${F()}`)}}function v(){if(e.charCodeAt(r)!==th)throw new SyntaxError(`End of string '"' expected ${F()}`)}function x(){throw new SyntaxError(`Quoted object key expected ${F()}`)}function C(k,P){throw new SyntaxError(`Duplicate key '${k}' encountered at position ${P}`)}function E(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${F()}`)}function w(){throw new SyntaxError(`Array item or end of array ']' expected ${F()}`)}function B(k){throw new SyntaxError(`Invalid character '${k}' ${A()}`)}function y(k){const P=e.slice(k,k+2);throw new SyntaxError(`Invalid escape character '${P}' ${A()}`)}function S(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(k){const P=e.slice(k,k+6);throw new SyntaxError(`Invalid unicode character '${P}' ${A()}`)}function A(){return`at position ${r}`}function T(){return r<e.length?`but got '${e[r]}'`:"but reached end of input"}function F(){return`${T()} ${A()}`}}function n9(e){return e===u9||e===c9||e===d9||e===f9}function Lu(e){return e>=Cp&&e<=Ep||e>=v9&&e<=E9||e>=y9&&e<=S9}function Ou(e){return e>=Cp&&e<=Ep}function r9(e){return e>=g9&&e<=Ep}function i9(e){return e>=32&&e<=1114111}function W0(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>W0(n,t[r])):G1(e)&&G1(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>W0(e[r],t[r])):!1}function G1(e){return typeof e=="object"&&e!==null}const a9={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
23
|
+
`,r:"\r",t:" "},o9=92,s9=123,U1=125,l9=91,X1=93,u9=32,c9=10,d9=9,f9=13,th=34,h9=43,Z1=45,Cp=48,g9=49,Ep=57,p9=44,m9=46,b9=58,v9=65,y9=97,x9=69,C9=101,E9=70,S9=102;function z0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(z0);const t={};for(const[n,r]of Object.entries(e))typeof r=="number"||typeof r=="string"?typeof r=="number"&&!Number.isSafeInteger(r)||typeof r=="string"&&/^-?\d+(?:\.\d+)?$/.test(r)?t[n]=At(r).toString():t[n]=r:typeof r=="object"?t[n]=z0(r):t[n]=r;return t}return e}function G0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(G0);if(e instanceof At)return e.toString();const t={};for(const[n,r]of Object.entries(e))t[n]=G0(r);return t}return e}const w9=e=>t9(e,null,n=>typeof n=="number"&&!Number.isSafeInteger(n)||typeof n=="string"&&/^-?\d+(?:\.\d+)?$/.test(n)?i4(n)?parseFloat(n):At(n).toString():n),a4={transparent:"transparent",black:"#212121",white:"#FFFFFF","primary-50":"#E3F2FD","primary-100":"#BBDEFB","primary-200":"#90CAF9","primary-300":"#64B5F6","primary-400":"#42A5F5","primary-500":"#2196F3","primary-600":"#1E88E5","primary-700":"#1976D2","primary-800":"#1565C0","primary-900":"#0D47A1","blue-gray-50":"#ECEFF1","blue-gray-100":"#CFD8DC","blue-gray-200":"#B0BEC5","blue-gray-300":"#90A4AE","blue-gray-400":"#78909C","blue-gray-500":"#607D8B","blue-gray-600":"#546E7A","blue-gray-700":"#455A64","blue-gray-800":"#37474F","blue-gray-900":"#263238","gray-50":"#FAFAFA","gray-100":"#F5F5F5","gray-200":"#EEEEEE","gray-300":"#E0E0E0","gray-400":"#BDBDBD","gray-500":"#9E9E9E","gray-600":"#757575","gray-700":"#616161","gray-800":"#424242","gray-900":"#212121","brown-50":"#EFEBE9","brown-100":"#D7CCC8","brown-200":"#BCAAA4","brown-300":"#A1887F","brown-400":"#8D6E63","brown-500":"#795548","brown-600":"#6D4C41","brown-700":"#5D4037","brown-800":"#4E342E","brown-900":"#3E2723","deep-orange-50":"#FBE9E7","deep-orange-100":"#FFCCBC","deep-orange-200":"#FFAB91","deep-orange-300":"#FF8A65","deep-orange-400":"#FF7043","deep-orange-500":"#FF5722","deep-orange-600":"#F4511E","deep-orange-700":"#E64A19","deep-orange-800":"#D84315","deep-orange-900":"#BF360C","orange-50":"#FFF3E0","orange-100":"#FFE0B2","orange-200":"#FFCC80","orange-300":"#FFB74D","orange-400":"#FFA726","orange-500":"#FF9800","orange-600":"#FB8C00","orange-700":"#F57C00","orange-800":"#EF6C00","orange-900":"#E65100","amber-50":"#FFF8E1","amber-100":"#FFECB3","amber-200":"#FFE082","amber-300":"#FFD54F","amber-400":"#FFCA28","amber-500":"#FFC107","amber-600":"#FFB300","amber-700":"#FFA000","amber-800":"#FF8F00","amber-900":"#FF6F00","yellow-50":"#FFFDE7","yellow-100":"#FFF9C4","yellow-200":"#FFF59D","yellow-300":"#FFF176","yellow-400":"#FFEE58","yellow-500":"#FFEB3B","yellow-600":"#FDD835","yellow-700":"#FBC02D","yellow-800":"#F9A825","yellow-900":"#F57F17","lime-50":"#F9FBE7","lime-100":"#F0F4C3","lime-200":"#E6EE9C","lime-300":"#DCE775","lime-400":"#D4E157","lime-500":"#CDDC39","lime-600":"#C0CA33","lime-700":"#AFB42B","lime-800":"#9E9D24","lime-900":"#827717","light-green-50":"#F1F8E9","light-green-100":"#DCEDC8","light-green-200":"#C5E1A5","light-green-300":"#AED581","light-green-400":"#9CCC65","light-green-500":"#8BC34A","light-green-600":"#7CB342","light-green-700":"#689F38","light-green-800":"#558B2F","light-green-900":"#33691E","green-50":"#E8F5E9","green-100":"#C8E6C9","green-200":"#A5D6A7","green-300":"#81C784","green-400":"#66BB6A","green-500":"#4CAF50","green-600":"#43A047","green-700":"#388E3C","green-800":"#2E7D32","green-900":"#1B5E20","teal-50":"#E0F2F1","teal-100":"#B2DFDB","teal-200":"#80CBC4","teal-300":"#4DB6AC","teal-400":"#26A69A","teal-500":"#009688","teal-600":"#00897B","teal-700":"#00796B","teal-800":"#00695C","teal-900":"#004D40","cyan-50":"#E0F7FA","cyan-100":"#B2EBF2","cyan-200":"#80DEEA","cyan-300":"#4DD0E1","cyan-400":"#26C6DA","cyan-500":"#00BCD4","cyan-600":"#00ACC1","cyan-700":"#0097A7","cyan-800":"#00838F","cyan-900":"#006064","light-blue-50":"#E1F5FE","light-blue-100":"#B3E5FC","light-blue-200":"#81D4FA","light-blue-300":"#4FC3F7","light-blue-400":"#29B6F6","light-blue-500":"#03A9F4","light-blue-600":"#039BE5","light-blue-700":"#0288D1","light-blue-800":"#0277BD","light-blue-900":"#01579B","blue-50":"#E3F2FD","blue-100":"#BBDEFB","blue-200":"#90CAF9","blue-300":"#64B5F6","blue-400":"#42A5F5","blue-500":"#2196F3","blue-600":"#1E88E5","blue-700":"#1976D2","blue-800":"#1565C0","blue-900":"#0D47A1","indigo-50":"#E8EAF6","indigo-100":"#C5CAE9","indigo-200":"#9FA8DA","indigo-300":"#7986CB","indigo-400":"#5C6BC0","indigo-500":"#3F51B5","indigo-600":"#3949AB","indigo-700":"#303F9F","indigo-800":"#283593","indigo-900":"#1A237E","deep-purple-50":"#EDE7F6","deep-purple-100":"#D1C4E9","deep-purple-200":"#B39DDB","deep-purple-300":"#9575CD","deep-purple-400":"#7E57C2","deep-purple-500":"#673AB7","deep-purple-600":"#5E35B1","deep-purple-700":"#512DA8","deep-purple-800":"#4527A0","deep-purple-900":"#311B92","purple-50":"#F3E5F5","purple-100":"#E1BEE7","purple-200":"#CE93D8","purple-300":"#BA68C8","purple-400":"#AB47BC","purple-500":"#9C27B0","purple-600":"#8E24AA","purple-700":"#7B1FA2","purple-800":"#6A1B9A","purple-900":"#4A148C","pink-50":"#FCE4EC","pink-100":"#F8BBD0","pink-200":"#F48FB1","pink-300":"#F06292","pink-400":"#EC407A","pink-500":"#E91E63","pink-600":"#D81B60","pink-700":"#C2185B","pink-800":"#AD1457","pink-900":"#880E4F","red-50":"#FFEBEE","red-100":"#FFCDD2","red-200":"#EF9A9A","red-300":"#E57373","red-400":"#EF5350","red-500":"#F44336","red-600":"#E53935","red-700":"#D32F2F","red-800":"#C62828","red-900":"#B71C1C","payhere-brand-base":"#102A4D","payhere-brand-10":"#CFD4DB","payhere-brand-20":"#AFB8C4","payhere-brand-30":"#8794A6","payhere-brand-40":"#607188","payhere-brand-50":"#384E6B","payhere-brand-60":"#0D2340","laba-black":"#212529","laba-white":"#FFFFFF","laba-blue-10":"#0163C8","laba-blue-08":"#006DFF","laba-blue-06":"#2899FF","laba-blue-05":"#73A4D6","laba-blue-02":"#DBECFF","laba-blue-01":"#F0F7FF","laba-green-10":"#038C67","laba-green-08":"#04BA27","laba-green-06":"#78D798","laba-green-05":"#ABF3CC","laba-green-02":"#CAEEE5","laba-green-01":"#DFF6F6","laba-grey-10":"#898989","laba-grey-08":"#AEAEAE","laba-grey-06":"#D6D6D6","laba-grey-05":"#EEEEEE","laba-grey-02":"#F2F2F2","laba-grey-01":"#FDFDFD","laba-orange-10":"#C05000","laba-orange-08":"#FF7200","laba-orange-06":"#FF9300","laba-orange-05":"#FFBD78","laba-orange-02":"#FFDDBB","laba-orange-01":"#FFF5EB","laba-red-10":"#9E101F","laba-red-08":"#ED0019","laba-red-06":"#FB004E","laba-red-05":"#FF5378","laba-red-02":"#FFAEBF","laba-red-01":"#FFEBEF","lpd-primary-50":"#CEDBFE","lpd-primary-100":"#B6CAFE","lpd-primary-200":"#9DB8FE","lpd-primary-300":"#6C94FD","lpd-primary-400":"#3B71FD","lpd-primary-500":"#0A4DFC","lpd-primary-600":"#083ECA","lpd-primary-700":"#062E97","lpd-primary-800":"#041F65","lpd-primary-900":"#03174C","lpd-secondary-50":"#FEF5CE","lpd-secondary-100":"#FEEFB5","lpd-secondary-200":"#FDEA9D","lpd-secondary-300":"#FDE06B","lpd-secondary-400":"#FCD53A","lpd-secondary-500":"#FBCB09","lpd-secondary-600":"#C9A207","lpd-secondary-700":"#977A05","lpd-secondary-800":"#645104","lpd-secondary-900":"#4B3D03","bill-primary-50":"#EAF0FE","bill-primary-100":"#D5E1FD","bill-primary-200":"#ABC3FB","bill-primary-300":"#81A4F9","bill-primary-400":"#5786F7","bill-primary-500":"#2D68F5","bill-primary-600":"#2453C4","bill-primary-700":"#1B3E93","bill-primary-800":"#122A62","bill-primary-900":"#091531","bill-secondary-50":"#F0FEFD","bill-secondary-100":"#E2FCFA","bill-secondary-200":"#C5F9F5","bill-secondary-300":"#A8F7F1","bill-secondary-400":"#8BF4EC","bill-secondary-500":"#6EF1E7","bill-secondary-600":"#59CBC2","bill-secondary-700":"#44A59D","bill-secondary-800":"#2F7E79","bill-secondary-900":"#1A5854"},o4={"payhere-h1":["60px",{lineHeight:"72px",fontWeight:700}],"payhere-h2":["48px",{lineHeight:"58px",fontWeight:700}],"payhere-h3":["40px",{lineHeight:"48px",fontWeight:700}],"payhere-h4":["30px",{lineHeight:"38px",fontWeight:700}],"payhere-h5":["28px",{lineHeight:"40px",fontWeight:600}],"payhere-h6":["24px",{lineHeight:"30px",fontWeight:600}],"payhere-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"payhere-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"payhere-body-ls":["18px",{lineHeight:"26px",fontWeight:600}],"payhere-body-lb":["18px",{lineHeight:"26px",fontWeight:700}],"payhere-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"payhere-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"payhere-body-ms":["16px",{lineHeight:"24px",fontWeight:600}],"payhere-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"payhere-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"payhere-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"payhere-label-sb":["15px",{lineHeight:"26px",fontWeight:600}],"payhere-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"payhere-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"payhere-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"payhere-body-smb":["14px",{lineHeight:"22px",fontWeight:600}],"payhere-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"payhere-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"payhere-body-esm":["12px",{lineHeight:"20px",fontWeight:500}],"payhere-body-esmb":["12px",{lineHeight:"20px",fontWeight:600}],"payhere-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},s4={"laba-title-lb":["36px",{lineHeight:"44px",fontWeight:700}],"laba-title-ls":["36px",{lineHeight:"44px",fontWeight:600}],"laba-title-lr":["36px",{lineHeight:"44px",fontWeight:400}],"laba-title-mb":["32px",{lineHeight:"40px",fontWeight:700}],"laba-title-ms":["32px",{lineHeight:"40px",fontWeight:600}],"laba-title-mr":["32px",{lineHeight:"40px",fontWeight:400}],"laba-h1":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-b":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-sb":["24px",{lineHeight:"30px",fontWeight:600}],"laba-h1-r":["24px",{lineHeight:"30px",fontWeight:400}],"laba-h2":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-b":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-sb":["18px",{lineHeight:"26px",fontWeight:600}],"laba-h2-r":["18px",{lineHeight:"26px",fontWeight:400}],"laba-base-rb":["16px",{lineHeight:"24px",fontWeight:700}],"laba-base-rs":["16px",{lineHeight:"24px",fontWeight:600}],"laba-base-rr":["16px",{lineHeight:"24px",fontWeight:400}],"laba-base-sb":["14px",{lineHeight:"20px",fontWeight:700}],"laba-base-ss":["14px",{lineHeight:"20px",fontWeight:600}],"laba-base-sr":["14px",{lineHeight:"20px",fontWeight:400}],"laba-subtitle-rb":["12px",{lineHeight:"16px",fontWeight:700}],"laba-subtitle-rs":["12px",{lineHeight:"16px",fontWeight:600}],"laba-subtitle-rr":["12px",{lineHeight:"16px",fontWeight:400}],"laba-subtitle-sb":["10px",{lineHeight:"12px",fontWeight:700}],"laba-subtitle-ss":["10px",{lineHeight:"12px",fontWeight:600}],"laba-subtitle-sr":["10px",{lineHeight:"12px",fontWeight:400}]},I9={"bill-h1":["60px",{lineHeight:"72px",fontWeight:700}],"bill-h2":["48px",{lineHeight:"58px",fontWeight:700}],"bill-h3":["40px",{lineHeight:"58px",fontWeight:700}],"bill-h4":["30px",{lineHeight:"38px",fontWeight:700}],"bill-h5":["28px",{lineHeight:"40px",fontWeight:600}],"bill-h6":["24px",{lineHeight:"30px",fontWeight:600}],"bill-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"bill-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"bill-body-lsm":["18px",{lineHeight:"26px",fontWeight:600}],"bill-body-blb":["18px",{lineHeight:"26px",fontWeight:700}],"bill-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"bill-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"bill-body-msm":["16px",{lineHeight:"24px",fontWeight:600}],"bill-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"bill-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"bill-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"bill-label-sm":["15px",{lineHeight:"26px",fontWeight:600}],"bill-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"bill-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"bill-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"bill-body-ssm":["14px",{lineHeight:"22px",fontWeight:600}],"bill-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"bill-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"bill-body-ems":["12px",{lineHeight:"20px",fontWeight:500}],"bill-body-essm":["12px",{lineHeight:"20px",fontWeight:600}],"bill-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},_9={...o4,...s4,...I9},D9={"sm-default":"640px",sm:"576px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},U0={"sm-default":640,sm:576,md:768,lg:1024,xl:1280,"2xl":1536},A9=()=>_.jsx("div",{className:"1ru-w-full 1ru-bg-red-900",children:"index"}),T9="_loading_e63gb_482",Re={"button-l":"_button-l_e63gb_67","button-m":"_button-m_e63gb_67","button-s":"_button-s_e63gb_115","button-xs":"_button-xs_e63gb_115","button-large":"_button-large_e63gb_241","button-reguler":"_button-reguler_e63gb_241","button-small":"_button-small_e63gb_259","button-extra-small":"_button-extra-small_e63gb_259","button-bill-l":"_button-bill-l_e63gb_379","button-bill-m":"_button-bill-m_e63gb_379","button-bill-s":"_button-bill-s_e63gb_427","button-bill-xs":"_button-bill-xs_e63gb_427","button-bill-xxs":"_button-bill-xxs_e63gb_427",loading:T9,"filled-bill-secondary-800_bg-white":"_filled-bill-secondary-800_bg-white_e63gb_497","filled-bill-blue-gray-500_bg-blue-gray-50":"_filled-bill-blue-gray-500_bg-blue-gray-50_e63gb_497","nude-laba-red-05":"_nude-laba-red-05_e63gb_497","nude-laba-red-08":"_nude-laba-red-08_e63gb_497","nude-laba-red-10":"_nude-laba-red-10_e63gb_497","nude-gray-500":"_nude-gray-500_e63gb_497","nude-green-700":"_nude-green-700_e63gb_497","nude-red-700":"_nude-red-700_e63gb_497","nude-laba-blue-10":"_nude-laba-blue-10_e63gb_497","ghost-blue-gray-100-bg_white-text_blue-gray-400":"_ghost-blue-gray-100-bg_white-text_blue-gray-400_e63gb_497","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_e63gb_497","ghost-laba-green-10":"_ghost-laba-green-10_e63gb_497","ghost-laba-blue-01":"_ghost-laba-blue-01_e63gb_497","ghost-laba-blue-05":"_ghost-laba-blue-05_e63gb_497","ghost-green-700":"_ghost-green-700_e63gb_497","ghost-red-700":"_ghost-red-700_e63gb_497","ghost-laba-blue-10":"_ghost-laba-blue-10_e63gb_497","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_e63gb_497","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_e63gb_497","primary-green-700-dsb_laba-grey-06":"_primary-green-700-dsb_laba-grey-06_e63gb_497","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_e63gb_497","primary-laba-blue-10":"_primary-laba-blue-10_e63gb_497","primary-bill-red-700":"_primary-bill-red-700_e63gb_497","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_e63gb_497","secondary-bill-secondary-800":"_secondary-bill-secondary-800_e63gb_497","primary-bill-primary-600":"_primary-bill-primary-600_e63gb_497","tertiary-black":"_tertiary-black_e63gb_497","tertiary-gray-500":"_tertiary-gray-500_e63gb_497","tertiary-red-600":"_tertiary-red-600_e63gb_497","tertiary-red-300":"_tertiary-red-300_e63gb_497","tertiary-blue-700":"_tertiary-blue-700_e63gb_497","secondary-green-600":"_secondary-green-600_e63gb_497","secondary-red-700":"_secondary-red-700_e63gb_497","secondary-red-600":"_secondary-red-600_e63gb_497","secondary-blue-700":"_secondary-blue-700_e63gb_497","primary-red-700":"_primary-red-700_e63gb_497","primary-blue-700":"_primary-blue-700_e63gb_497","icon-loading":"_icon-loading_e63gb_647"},nh={size:{large:Re["button-large"],reguler:Re["button-reguler"],small:Re["button-small"],"extra-small":Re["button-extra-small"],l:Re["button-l"],m:Re["button-m"],s:Re["button-s"],xs:Re["button-xs"],"bill-l":Re["button-bill-l"],"bill-m":Re["button-bill-m"],"bill-s":Re["button-bill-s"],"bill-xs":Re["button-bill-xs"],"bill-xxs":Re["button-bill-xxs"]},loadingSize:{large:"1ru-size-6",reguler:"1ru-size-5",small:"1ru-size-5","extra-small":"1ru-size-5",l:"1ru-size-6",m:"1ru-size-5",s:"1ru-size-5",xs:"1ru-size-5","bill-l":"1ru-size-6","bill-m":"1ru-size-5","bill-s":"1ru-size-5","bill-xs":"1ru-size-5","bill-xxs":"1ru-size-5"},variants:{"primary-laba-blue-10":Re["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Re["primary-red-700-dsb_laba-grey-06"],"primary-green-700-dsb_laba-grey-06":Re["primary-green-700-dsb_laba-grey-06"],"ghost-laba-blue-10":Re["ghost-laba-blue-10"],"ghost-red-700":Re["ghost-red-700"],"ghost-green-700":Re["ghost-green-700"],"ghost-laba-green-10":Re["ghost-laba-green-10"],"nude-laba-blue-10":Re["nude-laba-blue-10"],"nude-red-700":Re["nude-red-700"],"nude-green-700":Re["nude-green-700"],"nude-gray-500":Re["nude-gray-500"],"primary-blue-700":Re["primary-blue-700"],"secondary-blue-700":Re["secondary-blue-700"],"tertiary-blue-700":Re["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Re["ghost-blue-gray-100-bg_white"],"ghost-blue-gray-100-bg_white-text_blue-gray-400":Re["ghost-blue-gray-100-bg_white-text_blue-gray-400"],"ghost-laba-blue-05":Re["ghost-laba-blue-05"],"secondary-red-600":Re["secondary-red-600"],"tertiary-red-300":Re["tertiary-red-300"],"tertiary-gray-500":Re["tertiary-gray-500"],"tertiary-red-600":Re["tertiary-red-600"],"tertiary-black":Re["tertiary-black"],"secondary-green-600":Re["secondary-green-600"],"nude-laba-red-10":Re["nude-laba-red-10"],"nude-laba-red-05":Re["nude-laba-red-05"],"primary-red-700":Re["primary-red-700"],"nude-laba-red-08":Re["nude-laba-red-08"],"ghost-laba-blue-01":Re["ghost-laba-blue-01"],"filled-laba-white_laba-blue-10":Re["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Re["filled-laba-white_laba-red-05"],"secondary-red-700":Re["secondary-red-700"],"primary-bill-primary-600":Re["primary-bill-primary-600"],"secondary-bill-secondary-800":Re["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Re["tertiary-bill-secondary-800"],"primary-bill-red-700":Re["primary-bill-red-700"],"filled-bill-blue-gray-500_bg-blue-gray-50":Re["filled-bill-blue-gray-500_bg-blue-gray-50"],"filled-bill-secondary-800_bg-white":Re["filled-bill-secondary-800_bg-white"]}},R9=({className:e=""})=>_.jsx("svg",{className:`${Re["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:_.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
24
24
|
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629 \r
|
|
25
25
|
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861 \r
|
|
26
26
|
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514 \r
|
|
@@ -63,7 +63,7 @@ Private-MAC: `+v.digest().toHex()+`\r
|
|
|
63
63
|
* LICENSE.md file in the root directory of this source tree.
|
|
64
64
|
*
|
|
65
65
|
* @license MIT
|
|
66
|
-
*/function ms(e,t){return e?bk(e)?J.createElement(e,t):e:null}function bk(e){return vk(e)||typeof e=="function"||yk(e)}function vk(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function yk(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function xk(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=J.useState(()=>({current:c2(t)})),[r,i]=J.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}const Ck=Object.freeze(Object.defineProperty({__proto__:null,ColumnFaceting:O4,ColumnFiltering:Z4,ColumnGrouping:Y4,ColumnOrdering:q4,ColumnPinning:J4,ColumnSizing:Q4,ColumnVisibility:t2,GlobalFaceting:n2,GlobalFiltering:r2,Headers:L4,RowExpanding:i2,RowPagination:a2,RowPinning:o2,RowSelection:s2,RowSorting:u2,_getVisibleLeafColumns:ts,aggregationFns:Rc,buildHeaderGroups:Js,createCell:N4,createColumn:M4,createColumnHelper:H8,createRow:bu,createTable:c2,defaultColumnSizing:Qs,expandRows:Fp,filterFns:Xr,flattenBy:$p,flexRender:ms,functionalUpdate:Pi,getCoreRowModel:ak,getExpandedRowModel:ok,getFacetedMinMaxValues:sk,getFacetedRowModel:ck,getFacetedUniqueValues:dk,getFilteredRowModel:fk,getGroupedRowModel:hk,getMemoOptions:Ie,getPaginationRowModel:pk,getSortedRowModel:mk,isFunction:mu,isNumberArray:F4,isRowSelected:vf,isSubRowSelected:bd,makeStateUpdater:Wn,memo:we,noop:j8,orderColumns:K4,passiveEventSupported:e2,reSplitAlphaNumeric:vd,selectRowsFn:Bc,shouldAutoRemoveFilter:q0,sortingFns:Uo,useReactTable:xk},Symbol.toStringTag,{value:"Module"})),yf=0,Ta=1,Bs=2,f2=4;function kl(e,t){return n=>e(t(n))}function Ek(e,t){return t(e)}function h2(e,t){return n=>e(t,n)}function yb(e,t){return()=>e(t)}function xf(e,t){return t(e),e}function Dt(...e){return e}function Sk(e){e()}function xb(e){return()=>e}function wk(...e){return()=>{e.map(Sk)}}function Np(e){return e!==void 0}function wo(){}function mt(e,t){return e(Ta,t)}function We(e,t){e(yf,t)}function Mp(e){e(Bs)}function xn(e){return e(f2)}function _e(e,t){return mt(e,h2(t,yf))}function di(e,t){const n=e(Ta,r=>{n(),t(r)});return n}function tt(){const e=[];return(t,n)=>{switch(t){case Bs:e.splice(0,e.length);return;case Ta:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case yf:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function fe(e){let t=e;const n=tt();return(r,i)=>{switch(r){case Ta:i(t);break;case yf:t=i;break;case f2:return t}return n(r,i)}}function Ik(e){let t,n;const r=()=>t&&t();return function(i,a){switch(i){case Ta:return a?n===a?void 0:(r(),n=a,t=mt(e,a),t):(r(),wo);case Bs:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function tr(e){return xf(tt(),t=>_e(e,t))}function Cn(e,t){return xf(fe(t),n=>_e(e,n))}function _k(...e){return t=>e.reduceRight(Ek,t)}function ue(e,...t){const n=_k(...t);return(r,i)=>{switch(r){case Ta:return mt(e,n(i));case Bs:Mp(e);return}}}function g2(e,t){return e===t}function _t(e=g2){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Fe(e){return t=>n=>{e(n)&&t(n)}}function ve(e){return t=>kl(t,e)}function qr(e){return t=>()=>t(e)}function ri(e,t){return n=>r=>n(t=e(t,r))}function bs(e){return t=>n=>{e>0?e--:t(n)}}function ua(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Cb(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ge(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);mt(a,l=>{const u=n;n=n|s,t[o]=l,u!==i&&n===i&&r&&(r(),r=null)})}),a=>o=>{const s=()=>a([o].concat(t));n===i?s():r=s}}function Eb(...e){return function(t,n){switch(t){case Ta:return wk(...e.map(r=>mt(r,n)));case Bs:return;default:throw new Error(`unrecognized action ${t}`)}}}function Me(e,t=g2){return ue(e,_t(t))}function sn(...e){const t=tt(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);mt(a,l=>{n[o]=l,r=r|s,r===i&&We(t,n)})}),function(a,o){switch(a){case Ta:return r===i&&o(n),mt(t,o);case Bs:return Mp(t);default:throw new Error(`unrecognized action ${a}`)}}}function lt(e,t=[],{singleton:n}={singleton:!0}){return{id:Dk(),constructor:e,dependencies:t,singleton:n}}const Dk=()=>Symbol();function Ak(e){const t=new Map,n=({id:r,constructor:i,dependencies:a,singleton:o})=>{if(o&&t.has(r))return t.get(r);const s=i(a.map(l=>n(l)));return o&&t.set(r,s),s};return n(e)}function Tk(e,t){const n={},r={};let i=0;const a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(const o in t)r.hasOwnProperty(o)||(n[o]=t[o]);return n}const zu=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Lp(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=I.createContext({});function l(b,v){b.propsReady&&We(b.propsReady,!1);for(const x of r){const C=b[t.required[x]];We(C,v[x])}for(const x of i)if(x in v){const C=b[t.optional[x]];We(C,v[x])}b.propsReady&&We(b.propsReady,!0)}function u(b){return a.reduce((v,x)=>(v[x]=C=>{const E=b[t.methods[x]];We(E,C)},v),{})}function c(b){return o.reduce((v,x)=>(v[x]=Ik(b[t.events[x]]),v),{})}const d=I.forwardRef((b,v)=>{const{children:x,...C}=b,[E]=I.useState(()=>xf(Ak(e),B=>l(B,C))),[w]=I.useState(yb(c,E));return zu(()=>{for(const B of o)B in C&&mt(w[B],C[B]);return()=>{Object.values(w).map(Mp)}},[C,w,E]),zu(()=>{l(E,C)}),I.useImperativeHandle(v,xb(u(E))),I.createElement(s.Provider,{value:E},n?I.createElement(n,Tk([...r,...i,...o],C),x):x)}),h=b=>I.useCallback(h2(We,I.useContext(s)[b]),[b]),f=b=>{const x=I.useContext(s)[b],C=I.useCallback(E=>mt(x,E),[x]);return I.useSyncExternalStore(C,()=>xn(x),()=>xn(x))},g=b=>{const x=I.useContext(s)[b],[C,E]=I.useState(yb(xn,x));return zu(()=>mt(x,w=>{w!==C&&E(xb(w))}),[x,C]),C},p=I.version.startsWith("18")?f:g;return{Component:d,usePublisher:h,useEmitterValue:p,useEmitter:(b,v)=>{const C=I.useContext(s)[b];zu(()=>mt(C,v),[v,C])}}}const Rk=typeof document<"u"?I.useLayoutEffect:I.useEffect,Bk=Rk;var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const $k={0:"debug",1:"log",2:"warn",3:"error"},kk=()=>typeof globalThis>"u"?window:globalThis,Ra=lt(()=>{const e=fe(3);return{log:fe((n,r,i=1)=>{var a;const o=(a=kk().VIRTUOSO_LOG_LEVEL)!=null?a:xn(e);i>=o&&console[$k[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Op(e,t=!0){const n=I.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=I.useMemo(()=>new ResizeObserver(a=>{requestAnimationFrame(()=>{const o=a[0].target;o.offsetParent!==null&&e(o)})}),[e]);r=a=>{a&&t?(i.observe(a),n.current=a):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function fi(e,t=!0){return Op(e,t).callbackRef}function p2(e,t,n,r,i,a,o){const s=I.useCallback(l=>{const u=Pk(l.children,t,"offsetHeight",i);let c=l.parentElement;for(;!c.dataset.virtuosoScroller;)c=c.parentElement;const d=c.lastElementChild.dataset.viewportType==="window",h=o?o.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:c.scrollTop,f=o?o.scrollHeight:d?document.documentElement.scrollHeight:c.scrollHeight,g=o?o.offsetHeight:d?window.innerHeight:c.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:g}),a==null||a(Fk("row-gap",getComputedStyle(l).rowGap,i)),u!==null&&e(u)},[e,t,i,a,o,r]);return Op(s,n)}function Pk(e,t,n,r){const i=e.length;if(i===0)return null;const a=[];for(let o=0;o<i;o++){const s=e.item(o);if(!s||s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),u=parseFloat(s.dataset.knownSize),c=t(s,n);if(c===0&&r("Zero-sized element, this should not happen",{child:s},nr.ERROR),c===u)continue;const d=a[a.length-1];a.length===0||d.size!==c||d.endIndex!==l-1?a.push({startIndex:l,endIndex:l,size:c}):a[a.length-1].endIndex++}return a}function Fk(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function Fr(e,t){return Math.round(e.getBoundingClientRect()[t])}function m2(e,t){return Math.abs(e-t)<1.01}function b2(e,t,n,r=wo,i){const a=I.useRef(null),o=I.useRef(null),s=I.useRef(null),l=I.useCallback(d=>{const h=d.target,f=h===window||h===document,g=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,p=f?document.documentElement.scrollHeight:h.scrollHeight,m=f?window.innerHeight:h.offsetHeight,b=()=>{e({scrollTop:Math.max(g,0),scrollHeight:p,viewportHeight:m})};d.suppressFlushSync?b():cu.flushSync(b),o.current!==null&&(g===o.current||g<=0||g===p-m)&&(o.current=null,t(!0),s.current&&(clearTimeout(s.current),s.current=null))},[e,t]);I.useEffect(()=>{const d=i||a.current;return r(i||a.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[a,l,n,r,i]);function u(d){const h=a.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let g,p,m;h===window?(p=Math.max(Fr(document.documentElement,"height"),document.documentElement.scrollHeight),g=window.innerHeight,m=document.documentElement.scrollTop):(p=h.scrollHeight,g=Fr(h,"height"),m=h.scrollTop);const b=p-g;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),m2(g,p)||d.top===m){e({scrollTop:m,scrollHeight:p,viewportHeight:g}),f&&t(!0);return}f?(o.current=d.top,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,o.current=null,t(!0)},1e3)):o.current=null,h.scrollTo(d)}function c(d){a.current.scrollBy(d)}return{scrollerRef:a,scrollByCallback:c,scrollToCallback:u}}const $n=lt(()=>{const e=tt(),t=tt(),n=fe(0),r=tt(),i=fe(0),a=tt(),o=tt(),s=fe(0),l=fe(0),u=fe(0),c=fe(0),d=tt(),h=tt(),f=fe(!1);return _e(ue(e,ve(({scrollTop:g})=>g)),t),_e(ue(e,ve(({scrollHeight:g})=>g)),o),_e(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:a,headerHeight:s,fixedHeaderHeight:l,fixedFooterHeight:u,footerHeight:c,scrollHeight:o,smoothScrollTargetReached:r,scrollTo:d,scrollBy:h,statefulScrollTop:i,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Pl={lvl:0};function v2(e,t,n,r=Pl,i=Pl){return{k:e,v:t,lvl:n,l:r,r:i}}function yt(e){return e===Pl}function ns(){return Pl}function tg(e,t){if(yt(e))return Pl;const{k:n,l:r,r:i}=e;if(t===n){if(yt(r))return i;if(yt(i))return r;{const[a,o]=y2(r);return $c(qt(e,{k:a,v:o,l:x2(r)}))}}else return t<n?$c(qt(e,{l:tg(r,t)})):$c(qt(e,{r:tg(i,t)}))}function Fl(e,t){if(!yt(e))return t===e.k?e.v:t<e.k?Fl(e.l,t):Fl(e.r,t)}function Nr(e,t,n="k"){if(yt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Nr(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Nr(e.l,t,n)}function Jn(e,t,n){return yt(e)?v2(t,n,1):t===e.k?qt(e,{k:t,v:n}):t<e.k?Sb(qt(e,{l:Jn(e.l,t,n)})):Sb(qt(e,{r:Jn(e.r,t,n)}))}function ng(e,t,n){if(yt(e))return[];const{k:r,v:i,l:a,r:o}=e;let s=[];return r>t&&(s=s.concat(ng(a,t,n))),r>=t&&r<=n&&s.push({k:r,v:i}),r<=n&&(s=s.concat(ng(o,t,n))),s}function Qa(e){return yt(e)?[]:[...Qa(e.l),{k:e.k,v:e.v},...Qa(e.r)]}function y2(e){return yt(e.r)?[e.k,e.v]:y2(e.r)}function x2(e){return yt(e.r)?e.l:$c(qt(e,{r:x2(e.r)}))}function qt(e,t){return v2(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function gh(e){return yt(e)||e.lvl>e.r.lvl}function Sb(e){return rg(E2(e))}function $c(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(gh(t))return E2(qt(e,{lvl:r-1}));if(!yt(t)&&!yt(t.r))return qt(t.r,{l:qt(t,{r:t.r.l}),r:qt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(gh(e))return rg(qt(e,{lvl:r-1}));if(!yt(n)&&!yt(n.l)){const i=n.l,a=gh(i)?n.lvl-1:n.lvl;return qt(i,{l:qt(e,{r:i.l,lvl:r-1}),r:rg(qt(n,{l:i.r,lvl:a})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Cf(e,t,n){if(yt(e))return[];const r=Nr(e,t)[0];return Nk(ng(e,r,n))}function C2(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const a=[];for(let o=1;o<n;o++){const{index:s,value:l}=t(e[o]);a.push({start:r,end:s-1,value:i}),r=s,i=l}return a.push({start:r,end:1/0,value:i}),a}function Nk(e){return C2(e,({k:t,v:n})=>({index:t,value:n}))}function rg(e){const{r:t,lvl:n}=e;return!yt(t)&&!yt(t.r)&&t.lvl===n&&t.r.lvl===n?qt(t,{l:qt(e,{r:t.l}),lvl:n+1}):e}function E2(e){const{l:t}=e;return!yt(t)&&t.lvl===e.lvl?qt(t,{r:qt(e,{l:t.r})}):e}function yd(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function S2(e,t,n){return e[yd(e,t,n)]}function Mk(e,t,n,r){const i=yd(e,t,r),a=yd(e,n,r,i);return e.slice(i,a+1)}const Vp=lt(()=>({recalcInProgress:fe(!1)}),[],{singleton:!0});function Lk(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function wb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Ok(e,t){let n=yt(e)?0:1/0;for(const r of t){const{size:i,startIndex:a,endIndex:o}=r;if(n=Math.min(n,a),yt(e)){e=Jn(e,0,i);continue}const s=Cf(e,a-1,o+1);if(s.some(Lk(r)))continue;let l=!1,u=!1;for(const{start:c,end:d,value:h}of s)l?(o>=c||i===h)&&(e=tg(e,c)):(u=h!==i,l=!0),d>o&&o>=c&&h!==i&&(e=Jn(e,o+1,h));u&&(e=Jn(e,a,i))}return[e,n]}function Vk(){return{offsetTree:[],sizeTree:ns(),groupOffsetTree:ns(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Hp({index:e},t){return t===e?0:t<e?-1:1}function Hk({offset:e},t){return t===e?0:t<e?-1:1}function jk(e){return{index:e.index,value:e}}function Wk(e,t,n,r=0){return r>0&&(t=Math.max(t,S2(e,r,Hp).offset)),C2(Mk(e,t,n,Hk),jk)}function ig(e,t,n,r){let i=e,a=0,o=0,s=0,l=0;if(t!==0){l=yd(i,t-1,Hp),s=i[l].offset;const c=Nr(n,t-1);a=c[0],o=c[1],i.length&&i[l].size===Nr(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:c}of Cf(n,t,1/0)){const d=u-a,h=d*o+s+d*r;i.push({offset:h,size:c,index:u}),a=u,s=h,o=c}return{offsetTree:i,lastIndex:a,lastOffset:s,lastSize:o}}function zk(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,s=0;if(n.length>0&&yt(a)&&t.length===2){const h=t[0].size,f=t[1].size;o=n.reduce((g,p)=>Jn(Jn(g,p,h),p+1,f),o)}else[o,s]=Ok(o,t);if(o===a)return e;const{offsetTree:l,lastIndex:u,lastSize:c,lastOffset:d}=ig(e.offsetTree,s,o,i);return{sizeTree:o,offsetTree:l,lastIndex:u,lastOffset:d,lastSize:c,groupOffsetTree:n.reduce((h,f)=>Jn(h,f,Nl(f,l,i)),ns()),groupIndices:n}}function Nl(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:a}=S2(t,e,Hp),o=e-i,s=a*o+(o-1)*n+r;return s>0?s+n:s}function Gk(e){return typeof e.groupIndex<"u"}function w2(e,t,n){if(Gk(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=I2(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function I2(e,t){if(!Ef(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ef(e){return!yt(e.groupOffsetTree)}function Uk(e){return Qa(e).map(({k:t,v:n},r,i)=>{const a=i[r+1],o=a?a.k-1:1/0;return{startIndex:t,endIndex:o,size:n}})}const Xk={offsetHeight:"height",offsetWidth:"width"},pi=lt(([{log:e},{recalcInProgress:t}])=>{const n=tt(),r=tt(),i=Cn(r,0),a=tt(),o=tt(),s=fe(0),l=fe([]),u=fe(void 0),c=fe(void 0),d=fe((E,w)=>Fr(E,Xk[w])),h=fe(void 0),f=fe(0),g=Vk(),p=Cn(ue(n,Ge(l,e,f),ri(zk,g),_t()),g),m=Cn(ue(l,_t(),ri((E,w)=>({prev:E.current,current:w}),{prev:[],current:[]}),ve(({prev:E})=>E)),[]);_e(ue(l,Fe(E=>E.length>0),Ge(p,f),ve(([E,w,B])=>{const y=E.reduce((S,D,A)=>Jn(S,D,Nl(D,w.offsetTree,B)||A),ns());return{...w,groupIndices:E,groupOffsetTree:y}})),p),_e(ue(r,Ge(p),Fe(([E,{lastIndex:w}])=>E<w),ve(([E,{lastIndex:w,lastSize:B}])=>[{startIndex:E,endIndex:w,size:B}])),n),_e(u,c);const b=Cn(ue(u,ve(E=>E===void 0)),!0);_e(ue(c,Fe(E=>E!==void 0&&yt(xn(p).sizeTree)),ve(E=>[{startIndex:0,endIndex:0,size:E}])),n);const v=tr(ue(n,Ge(p),ri(({sizes:E},[w,B])=>({changed:B!==E,sizes:B}),{changed:!1,sizes:g}),ve(E=>E.changed)));mt(ue(s,ri((E,w)=>({diff:E.prev-w,prev:w}),{diff:0,prev:0}),ve(E=>E.diff)),E=>{const{groupIndices:w}=xn(p);if(E>0)We(t,!0),We(a,E+wb(E,w));else if(E<0){const B=xn(m);B.length>0&&(E-=wb(-E,B)),We(o,E)}}),mt(ue(s,Ge(e)),([E,w])=>{E<0&&w("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},nr.ERROR)});const x=tr(a);_e(ue(a,Ge(p),ve(([E,w])=>{const B=w.groupIndices.length>0,y=[],S=w.lastSize;if(B){const D=Fl(w.sizeTree,0);let A=0,T=0;for(;A<E;){const P=w.groupIndices[T],$=w.groupIndices.length===T+1?1/0:w.groupIndices[T+1]-P-1;y.push({startIndex:P,endIndex:P,size:D}),y.push({startIndex:P+1,endIndex:P+1+$-1,size:S}),T++,A+=$+1}const F=Qa(w.sizeTree);return A!==E&&F.shift(),F.reduce((P,{k:$,v:R})=>{let O=P.ranges;return P.prevSize!==0&&(O=[...P.ranges,{startIndex:P.prevIndex,endIndex:$+E-1,size:P.prevSize}]),{ranges:O,prevIndex:$+E,prevSize:R}},{ranges:y,prevIndex:E,prevSize:0}).ranges}return Qa(w.sizeTree).reduce((D,{k:A,v:T})=>({ranges:[...D.ranges,{startIndex:D.prevIndex,endIndex:A+E-1,size:D.prevSize}],prevIndex:A+E,prevSize:T}),{ranges:[],prevIndex:0,prevSize:S}).ranges})),n);const C=tr(ue(o,Ge(p,f),ve(([E,{offsetTree:w},B])=>{const y=-E;return Nl(y,w,B)})));return _e(ue(o,Ge(p,f),ve(([E,w,B])=>{if(w.groupIndices.length>0){if(yt(w.sizeTree))return w;let S=ns();const D=xn(m);let A=0,T=0,F=0;for(;A<-E;){F=D[T];const P=D[T+1]-F-1;T++,A+=P+1}if(S=Qa(w.sizeTree).reduce((P,{k:$,v:R})=>Jn(P,Math.max(0,$+E),R),S),A!==-E){const P=Fl(w.sizeTree,F);S=Jn(S,0,P);const $=Nr(w.sizeTree,-E+1)[1];S=Jn(S,1,$)}return{...w,sizeTree:S,...ig(w.offsetTree,0,S,B)}}else{const S=Qa(w.sizeTree).reduce((D,{k:A,v:T})=>Jn(D,Math.max(0,A+E),T),ns());return{...w,sizeTree:S,...ig(w.offsetTree,0,S,B)}}})),p),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:c,fixedItemSize:u,unshiftWith:a,shiftWith:o,shiftWithOffset:C,beforeUnshiftWith:x,firstItemIndex:s,gap:f,sizes:p,listRefresh:v,statefulTotalCount:i,trackItemSizes:b,itemSize:d}},Dt(Ra,Vp),{singleton:!0}),Zk=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function _2(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Zk)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const vu=lt(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:a,scrollTo:o,smoothScrollTargetReached:s,headerHeight:l,footerHeight:u,fixedHeaderHeight:c,fixedFooterHeight:d},{log:h}])=>{const f=tt(),g=tt(),p=fe(0);let m=null,b=null,v=null;function x(){m&&(m(),m=null),v&&(v(),v=null),b&&(clearTimeout(b),b=null),We(i,!1)}return _e(ue(f,Ge(e,a,t,p,l,u,h),Ge(r,c,d),ve(([[C,E,w,B,y,S,D,A],T,F,k])=>{const P=_2(C),{align:$,behavior:R,offset:O}=P,j=B-1,V=w2(P,E,j);let W=Nl(V,E.offsetTree,T)+S;$==="end"?(W+=F+Nr(E.sizeTree,V)[1]-w+k,V===j&&(W+=D)):$==="center"?W+=(F+Nr(E.sizeTree,V)[1]-w+k)/2:W-=y,O&&(W+=O);const U=K=>{x(),K?(A("retrying to scroll to",{location:C},nr.DEBUG),We(f,C)):(We(g,!0),A("list did not change, scroll successful",{},nr.DEBUG))};if(x(),R==="smooth"){let K=!1;v=mt(n,ee=>{K=K||ee}),m=di(s,()=>{U(K)})}else m=di(ue(n,Yk(150)),U);return b=setTimeout(()=>{x()},1200),We(i,!0),A("scrolling from index to",{index:V,top:W,behavior:R},nr.DEBUG),{top:W,behavior:R}})),o),{scrollToIndex:f,scrollTargetReached:g,topListHeight:p}},Dt(pi,$n,Ra),{singleton:!0});function Yk(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ml="up",ml="down",Kk="none",qk={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Jk=0,yu=lt(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:a}])=>{const o=fe(!1),s=fe(!0),l=tt(),u=tt(),c=fe(4),d=fe(Jk),h=Cn(ue(Eb(ue(Me(t),bs(1),qr(!0)),ue(Me(t),bs(1),qr(!1),Cb(100))),_t()),!1),f=Cn(ue(Eb(ue(a,qr(!0)),ue(a,qr(!1),Cb(200))),_t()),!1);_e(ue(sn(Me(t),Me(d)),ve(([v,x])=>v<=x),_t()),s),_e(ue(s,ua(50)),u);const g=tr(ue(sn(e,Me(n),Me(r),Me(i),Me(c)),ri((v,[{scrollTop:x,scrollHeight:C},E,w,B,y])=>{const S=x+E-C>-y,D={viewportHeight:E,scrollTop:x,scrollHeight:C};if(S){let T,F;return x>v.state.scrollTop?(T="SCROLLED_DOWN",F=v.state.scrollTop-x):(T="SIZE_DECREASED",F=v.state.scrollTop-x||v.scrollTopDelta),{atBottom:!0,state:D,atBottomBecause:T,scrollTopDelta:F}}let A;return D.scrollHeight>v.state.scrollHeight?A="SIZE_INCREASED":E<v.state.viewportHeight?A="VIEWPORT_HEIGHT_DECREASING":x<v.state.scrollTop?A="SCROLLING_UPWARDS":A="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:A,state:D}},qk),_t((v,x)=>v&&v.atBottom===x.atBottom))),p=Cn(ue(e,ri((v,{scrollTop:x,scrollHeight:C,viewportHeight:E})=>{if(m2(v.scrollHeight,C))return{scrollTop:x,scrollHeight:C,jump:0,changed:!1};{const w=C-(x+E)<1;return v.scrollTop!==x&&w?{scrollHeight:C,scrollTop:x,jump:v.scrollTop-x,changed:!0}:{scrollHeight:C,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Fe(v=>v.changed),ve(v=>v.jump)),0);_e(ue(g,ve(v=>v.atBottom)),o),_e(ue(o,ua(50)),l);const m=fe(ml);_e(ue(e,ve(({scrollTop:v})=>v),_t(),ri((v,x)=>xn(f)?{direction:v.direction,prevScrollTop:x}:{direction:x<v.prevScrollTop?Ml:ml,prevScrollTop:x},{direction:ml,prevScrollTop:0}),ve(v=>v.direction)),m),_e(ue(e,ua(50),qr(Kk)),m);const b=fe(0);return _e(ue(h,Fe(v=>!v),qr(0)),b),_e(ue(t,ua(100),Ge(h),Fe(([v,x])=>!!x),ri(([v,x],[C])=>[x,C],[0,0]),ve(([v,x])=>x-v)),b),{isScrolling:h,isAtTop:s,isAtBottom:o,atBottomState:g,atTopStateChange:u,atBottomStateChange:l,scrollDirection:m,atBottomThreshold:c,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:p}},Dt($n)),Ba=lt(([{log:e}])=>{const t=fe(!1),n=tr(ue(t,Fe(r=>r),_t()));return mt(t,r=>{r&&xn(e)("props updated",{},nr.DEBUG)}),{propsReady:t,didMount:n}},Dt(Ra),{singleton:!0});function jp(e,t){e==0?t():requestAnimationFrame(()=>jp(e-1,t))}function Wp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const xu=lt(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i,scrollTargetReached:a},{didMount:o}])=>{const s=fe(!0),l=fe(0),u=fe(!0);return _e(ue(o,Ge(l),Fe(([c,d])=>!!d),qr(!1)),s),_e(ue(o,Ge(l),Fe(([c,d])=>!!d),qr(!1)),u),mt(ue(sn(t,o),Ge(s,e,n,u),Fe(([[,c],d,{sizeTree:h},f,g])=>c&&(!yt(h)||Np(f))&&!d&&!g),Ge(l)),([,c])=>{di(a,()=>{We(u,!0)}),jp(4,()=>{di(r,()=>{We(s,!0)}),We(i,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l,initialItemFinalLocationReached:u}},Dt(pi,$n,vu,Ba),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const Qk=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),e7=lt(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:a},{propsReady:o,didMount:s},{log:l},{scrollingInProgress:u}])=>{const c=fe(!1),d=tt();let h=null;function f(p){We(i,{index:"LAST",align:"end",behavior:p})}mt(ue(sn(ue(Me(e),bs(1)),s),Ge(Me(c),n,a,u),ve(([[p,m],b,v,x,C])=>{let E=m&&x,w="auto";return E&&(w=Qk(b,v||C),E=E&&!!w),{totalCount:p,shouldFollow:E,followOutputBehavior:w}}),Fe(({shouldFollow:p})=>p)),({totalCount:p,followOutputBehavior:m})=>{h&&(h(),h=null),h=di(t,()=>{xn(l)("following output to ",{totalCount:p},nr.DEBUG),f(m),h=null})});function g(p){const m=di(r,b=>{p&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(xn(l)("scrolling to bottom due to increased size",{},nr.DEBUG),f("auto"))});setTimeout(m,100)}return mt(ue(sn(Me(c),e,o),Fe(([p,,m])=>p&&m),ri(({value:p},[,m])=>({refreshed:p===m,value:m}),{refreshed:!1,value:0}),Fe(({refreshed:p})=>p),Ge(c,e)),([,p])=>{xn(a)&&g(p!==!1)}),mt(d,()=>{g(xn(c)!==!1)}),mt(sn(Me(c),r),([p,m])=>{p&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:c,autoscrollToBottom:d}},Dt(pi,yu,vu,xu,Ba,Ra,$n));function t7(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const D2=lt(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const a=tt(),o=tt(),s=tr(ue(a,ve(t7)));return _e(ue(s,ve(l=>l.totalCount)),e),_e(ue(s,ve(l=>l.groupIndices)),t),_e(ue(sn(r,n,i),Fe(([l,u])=>Ef(u)),ve(([l,u,c])=>Nr(u.groupOffsetTree,Math.max(l-c,0),"v")[0]),_t(),ve(l=>[l])),o),{groupCounts:a,topItemsIndexes:o}},Dt(pi,$n));function Ll(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function A2(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const xd="top",Cd="bottom",_b="none";function Db(e,t,n){return typeof e=="number"?n===Ml&&t===xd||n===ml&&t===Cd?e:0:n===Ml?t===xd?e.main:e.reverse:t===Cd?e.main:e.reverse}function Ab(e,t){return typeof e=="number"?e:e[t]||0}const zp=lt(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const a=tt(),o=fe(0),s=fe(0),l=fe(0),u=Cn(ue(sn(Me(e),Me(t),Me(r),Me(a,Ll),Me(l),Me(o),Me(i),Me(n),Me(s)),ve(([c,d,h,[f,g],p,m,b,v,x])=>{const C=c-v,E=m+b,w=Math.max(h-C,0);let B=_b;const y=Ab(x,xd),S=Ab(x,Cd);return f-=v,f+=h+b,g+=h+b,g-=v,f>c+E-y&&(B=Ml),g<c-w+d+S&&(B=ml),B!==_b?[Math.max(C-h-Db(p,xd,B)-y,0),C-w-b+d+Db(p,Cd,B)+S]:null}),Fe(c=>c!=null),_t(Ll)),[0,0]);return{listBoundary:a,overscan:l,topListHeight:o,increaseViewportBy:s,visibleRange:u}},Dt($n),{singleton:!0});function n7(e,t,n){if(Ef(t)){const r=I2(e,t);return[{index:Nr(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const ph={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Tb(e,t,n){if(e.length===0)return[];if(!Ef(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,a=[],o=Cf(t.groupOffsetTree,r,i);let s,l=0;for(const u of e){(!s||s.end<u.index)&&(s=o.shift(),l=t.groupIndices.indexOf(s.start));let c;u.index===s.start?c={type:"group",index:l}:c={index:u.index-(l+1)+n,groupIndex:l},a.push({...c,size:u.size,offset:u.offset,originalIndex:u.index,data:u.data})}return a}function kc(e,t,n,r,i,a){const{lastSize:o,lastOffset:s,lastIndex:l}=i;let u=0,c=0;if(e.length>0){u=e[0].offset;const p=e[e.length-1];c=p.offset+p.size}const d=n-l,h=s+d*o+(d-1)*r,f=u,g=h-c;return{items:Tb(e,i,a),topItems:Tb(t,i,a),topListHeight:t.reduce((p,m)=>m.size+p,0),offsetTop:u,offsetBottom:g,top:f,bottom:c,totalCount:n,firstItemIndex:a}}function T2(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(const c of n.groupIndices){if(c-o>=e)break;o++}const s=e+o,l=Wp(t,s),u=Array.from({length:s}).map((c,d)=>({index:d+l,size:0,offset:0,data:a[d+l]}));return kc(u,[],s,i,n,r)}const Io=lt(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},a,{visibleRange:o,listBoundary:s,topListHeight:l},{scrolledToInitialItem:u,initialTopMostItemIndex:c},{topListHeight:d},h,{didMount:f},{recalcInProgress:g}])=>{const p=fe([]),m=fe(0),b=tt();_e(a.topItemsIndexes,p);const v=Cn(ue(sn(f,g,Me(o,Ll),Me(t),Me(e),Me(c),u,Me(p),Me(r),Me(i),n),Fe(([w,B,,y,,,,,,,S])=>{const D=S&&S.length!==y;return w&&!B&&!D}),ve(([,,[w,B],y,S,D,A,T,F,k,P])=>{const $=S,{sizeTree:R,offsetTree:O}=$,j=xn(m);if(y===0)return{...ph,totalCount:y};if(w===0&&B===0)return j===0?{...ph,totalCount:y}:T2(j,D,S,F,k,P||[]);if(yt(R))return j>0?null:kc(n7(Wp(D,y),$,P),[],y,k,$,F);const V=[];if(T.length>0){const z=T[0],H=T[T.length-1];let X=0;for(const te of Cf(R,z,H)){const ie=te.value,le=Math.max(te.start,z),ce=Math.min(te.end,H);for(let Q=le;Q<=ce;Q++)V.push({index:Q,size:ie,offset:X,data:P&&P[Q]}),X+=ie}}if(!A)return kc([],V,y,k,$,F);const W=T.length>0?T[T.length-1]+1:0,U=Wk(O,w,B,W);if(U.length===0)return null;const K=y-1,ee=xf([],z=>{for(const H of U){const X=H.value;let te=X.offset,ie=H.start;const le=X.size;if(X.offset<w){ie+=Math.floor((w-X.offset+k)/(le+k));const Q=ie-H.start;te+=Q*le+Q*k}ie<W&&(te+=(W-ie)*le,ie=W);const ce=Math.min(H.end,K);for(let Q=ie;Q<=ce&&!(te>=B);Q++)z.push({index:Q,size:le,offset:te,data:P&&P[Q]}),te+=le+k}});return kc(ee,V,y,k,$,F)}),Fe(w=>w!==null),_t()),ph);_e(ue(n,Fe(Np),ve(w=>w==null?void 0:w.length)),t),_e(ue(v,ve(w=>w.topListHeight)),d),_e(d,l),_e(ue(v,ve(w=>[w.top,w.bottom])),s),_e(ue(v,ve(w=>w.items)),b);const x=tr(ue(v,Fe(({items:w})=>w.length>0),Ge(t,n),Fe(([{items:w},B])=>w[w.length-1].originalIndex===B-1),ve(([,w,B])=>[w-1,B]),_t(Ll),ve(([w])=>w))),C=tr(ue(v,ua(200),Fe(({items:w,topItems:B})=>w.length>0&&w[0].originalIndex===B.length),ve(({items:w})=>w[0].index),_t())),E=tr(ue(v,Fe(({items:w})=>w.length>0),ve(({items:w})=>{let B=0,y=w.length-1;for(;w[B].type==="group"&&B<y;)B++;for(;w[y].type==="group"&&y>B;)y--;return{startIndex:w[B].index,endIndex:w[y].index}}),_t(A2)));return{listState:v,topItemsIndexes:p,endReached:x,startReached:C,rangeChanged:E,itemsRendered:b,initialItemCount:m,...h}},Dt(pi,D2,zp,xu,vu,yu,Ba,Vp),{singleton:!0}),r7=lt(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(_e(ue(s,Ge(a),Fe(([,l])=>l!==0),Ge(i,e,t,r,n),ve(([[,l],u,c,d,h,f=[]])=>T2(l,u,c,d,h,f))),o),{}),Dt(pi,xu,Io,Ba),{singleton:!0}),R2=lt(([{scrollVelocity:e}])=>{const t=fe(!1),n=tt(),r=fe(!1);return _e(ue(e,Ge(r,t,n),Fe(([i,a])=>!!a),ve(([i,a,o,s])=>{const{exit:l,enter:u}=a;if(o){if(l(i,s))return!1}else if(u(i,s))return!0;return o}),_t()),t),mt(ue(sn(t,e,n),Ge(r)),([[i,a,o],s])=>i&&s&&s.change&&s.change(a,o)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Dt(yu),{singleton:!0}),i7=lt(([{topItemsIndexes:e}])=>{const t=fe(0);return _e(ue(t,Fe(n=>n>0),ve(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},Dt(Io)),B2=lt(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const a=tt(),o=Cn(ue(sn(e,r,t,n,i),ve(([s,l,u,c,d])=>s+l+u+c+d.offsetBottom+d.bottom)),0);return _e(Me(o),a),{totalListHeight:o,totalListHeightChanged:a}},Dt($n,Io),{singleton:!0});function $2(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const a7=$2(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),o7=lt(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:a,scrollDirection:o,lastJumpDueToItemResize:s},{listState:l},{beforeUnshiftWith:u,shiftWithOffset:c,sizes:d,gap:h},{log:f},{recalcInProgress:g}])=>{const p=tr(ue(l,Ge(s),ri(([,b,v,x],[{items:C,totalCount:E,bottom:w,offsetBottom:B},y])=>{const S=w+B;let D=0;return v===E&&b.length>0&&C.length>0&&(C[0].originalIndex===0&&b[0].originalIndex===0||(D=S-x,D!==0&&(D+=y))),[D,C,E,S]},[0,[],0,0]),Fe(([b])=>b!==0),Ge(t,o,r,a,f,g),Fe(([,b,v,x,,,C])=>!C&&!x&&b!==0&&v===Ml),ve(([[b],,,,,v])=>(v("Upward scrolling compensation",{amount:b},nr.DEBUG),b))));function m(b){b>0?(We(e,{top:-b,behavior:"auto"}),We(n,0)):(We(n,0),We(e,{top:-b,behavior:"auto"}))}return mt(ue(p,Ge(n,i)),([b,v,x])=>{x&&a7()?We(n,v-b):m(-b)}),mt(ue(sn(Cn(i,!1),n,g),Fe(([b,v,x])=>!b&&!x&&v!==0),ve(([b,v])=>v),ua(1)),m),_e(ue(c,ve(b=>({top:-b}))),e),mt(ue(u,Ge(d,h),ve(([b,{lastSize:v,groupIndices:x,sizeTree:C},E])=>{function w(B){return B*(v+E)}if(x.length===0)return w(b);{let B=0;const y=Fl(C,0);let S=0,D=0;for(;S<b;){S++,B+=y;let A=x.length===D+1?1/0:x[D+1]-x[D]-1;S+A>b&&(B-=y,A=b-S+1),S+=A,B+=w(A),D++}return B}})),b=>{We(n,b),requestAnimationFrame(()=>{We(e,{top:b}),requestAnimationFrame(()=>{We(n,0),We(g,!1)})})}),{deviation:n}},Dt($n,yu,Io,pi,Ra,Vp)),s7=lt(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=fe(0);return mt(ue(e,Ge(r),Fe(([,i])=>i!==0),ve(([,i])=>({top:i}))),i=>{di(ue(n,bs(1),Fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{We(t,i)})})}),{initialScrollTop:r}},Dt(Ba,$n,Io),{singleton:!0}),l7=lt(([{viewportHeight:e},{totalListHeight:t}])=>{const n=fe(!1),r=Cn(ue(sn(n,e,t),Fe(([i])=>i),ve(([,i,a])=>Math.max(0,i-a)),ua(0),_t()),0);return{alignToBottom:n,paddingTopAddition:r}},Dt($n,B2),{singleton:!0}),Gp=lt(([{scrollTo:e,scrollContainerState:t}])=>{const n=tt(),r=tt(),i=tt(),a=fe(!1),o=fe(void 0);return _e(ue(sn(n,r),ve(([{viewportHeight:s,scrollTop:l,scrollHeight:u},{offsetTop:c}])=>({scrollTop:Math.max(0,l-c),scrollHeight:u,viewportHeight:s}))),t),_e(ue(e,Ge(r),ve(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{useWindowScroll:a,customScrollParent:o,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},Dt($n)),u7=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:a,...o}})=>e<n?{...o,behavior:i,align:a??"start"}:t>r?{...o,behavior:i,align:a??"end"}:null,c7=lt(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:a,fixedHeaderHeight:o,fixedFooterHeight:s,scrollingInProgress:l},{scrollToIndex:u}])=>{const c=tt();return _e(ue(c,Ge(e,i,t,a,o,s,r),Ge(n),ve(([[d,h,f,g,p,m,b,v],x])=>{const{done:C,behavior:E,align:w,calculateViewLocation:B=u7,...y}=d,S=w2(d,h,g-1),D=Nl(S,h.offsetTree,x)+p+m,A=D+Nr(h.sizeTree,S)[1],T=v+m,F=v+f-b,k=B({itemTop:D,itemBottom:A,viewportTop:T,viewportBottom:F,locationParams:{behavior:E,align:w,...y}});return k?C&&di(ue(l,Fe(P=>P===!1),bs(xn(l)?1:2)),C):C&&C(),k}),Fe(d=>d!==null)),u),{scrollIntoView:c}},Dt(pi,$n,vu,Io,Ra),{singleton:!0}),d7=lt(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:a,windowScrollContainerState:o,windowViewportRect:s}])=>{const l=tt(),u=fe(void 0),c=fe(null),d=fe(null);return _e(o,c),_e(s,d),mt(ue(l,Ge(e,n,a,c,d)),([h,f,g,p,m,b])=>{const v=Uk(f.sizeTree);p&&m!==null&&b!==null&&(g=m.scrollTop-b.offsetTop),h({ranges:v,scrollTop:g})}),_e(ue(u,Fe(Np),ve(f7)),r),_e(ue(i,Ge(u),Fe(([,h])=>h!==void 0),_t(),ve(([,h])=>h.ranges)),t),{getState:l,restoreStateFrom:u}},Dt(pi,$n,xu,Ba,Gp));function f7(e){return{offset:e.scrollTop,index:0,align:"start"}}const h7=lt(([e,t,n,r,i,a,o,s,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...l,...u}),Dt(zp,r7,Ba,R2,B2,s7,l7,Gp,c7,Ra)),k2=lt(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:a,data:o,firstItemIndex:s,groupIndices:l,statefulTotalCount:u,gap:c,sizes:d},{initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:g},p,m,b,{listState:v,topItemsIndexes:x,...C},{scrollToIndex:E},w,{topItemCount:B},{groupCounts:y},S])=>(_e(C.rangeChanged,S.scrollSeekRangeChanged),_e(ue(S.windowViewportRect,ve(D=>D.visibleHeight)),p.viewportHeight),{totalCount:e,data:o,firstItemIndex:s,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:g,topItemsIndexes:x,topItemCount:B,groupCounts:y,fixedItemHeight:n,defaultItemHeight:r,gap:c,...b,statefulTotalCount:u,listState:v,scrollToIndex:E,trackItemSizes:i,itemSize:a,groupIndices:l,...C,...S,...p,sizes:d,...m}),Dt(pi,xu,$n,d7,e7,Io,vu,o7,i7,D2,h7)),mh="-webkit-sticky",Rb="sticky",P2=$2(()=>{if(typeof document>"u")return Rb;const e=document.createElement("div");return e.style.position=mh,e.style.position===mh?mh:Rb});function Up(e,t){const n=I.useRef(null),r=I.useCallback(s=>{if(s===null||!s.offsetParent)return;const l=s.getBoundingClientRect(),u=l.width;let c,d;if(t){const h=t.getBoundingClientRect(),f=l.top-h.top;c=h.height-Math.max(0,f),d=f+t.scrollTop}else c=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:c,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:i,ref:a}=Op(r),o=I.useCallback(()=>{r(a.current)},[r,a]);return I.useEffect(()=>{if(t){t.addEventListener("scroll",o);const s=new ResizeObserver(()=>{requestAnimationFrame(o)});return s.observe(t),()=>{t.removeEventListener("scroll",o),s.unobserve(t)}}else return window.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[o,t]),i}const Sf=I.createContext(void 0),F2=I.createContext(void 0);function Xp(e){return e}const g7=lt(()=>{const e=fe(l=>`Item ${l}`),t=fe(null),n=fe(l=>`Group ${l}`),r=fe({}),i=fe(Xp),a=fe("div"),o=fe(wo),s=(l,u=null)=>Cn(ue(r,ve(c=>c[l]),_t()),u);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:a,scrollerRef:o,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),p7=lt(([e,t])=>({...e,...t}),Dt(k2,g7)),m7=({height:e})=>I.createElement("div",{style:{height:e}}),b7={position:P2(),zIndex:1,overflowAnchor:"none"},v7={overflowAnchor:"none"},Bb=I.memo(function({showTopList:t=!1}){const n=Ke("listState"),r=xr("sizeRanges"),i=Ke("useWindowScroll"),a=Ke("customScrollParent"),o=xr("windowScrollContainerState"),s=xr("scrollContainerState"),l=a||i?o:s,u=Ke("itemContent"),c=Ke("context"),d=Ke("groupContent"),h=Ke("trackItemSizes"),f=Ke("itemSize"),g=Ke("log"),p=xr("gap"),{callbackRef:m}=p2(r,f,h,t?wo:l,g,p,a),[b,v]=I.useState(0);Kp("deviation",k=>{b!==k&&v(k)});const x=Ke("EmptyPlaceholder"),C=Ke("ScrollSeekPlaceholder")||m7,E=Ke("ListComponent"),w=Ke("ItemComponent"),B=Ke("GroupComponent"),y=Ke("computeItemKey"),S=Ke("isSeeking"),D=Ke("groupIndices").length>0,A=Ke("alignToBottom"),T=Ke("initialItemFinalLocationReached"),F=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:A?"auto":0,...T?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?I.createElement(x,Ft(x,c)):I.createElement(E,{...Ft(E,c),ref:m,style:F,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const P=k.originalIndex,$=y(P+n.firstItemIndex,k.data,c);return S?I.createElement(C,{...Ft(C,c),key:$,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?I.createElement(B,{...Ft(B,c),key:$,"data-index":P,"data-known-size":k.size,"data-item-index":k.index,style:b7},d(k.index,c)):I.createElement(w,{...Ft(w,c),...N2(w,k.data),key:$,"data-index":P,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:v7},D?u(k.index,k.groupIndex,k.data,c):u(k.index,k.data,c))}))}),y7={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$s=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),x7={width:"100%",position:P2(),top:0,zIndex:1};function Ft(e,t){if(typeof e!="string")return{context:t}}function N2(e,t){return{item:typeof e=="string"?void 0:t}}const C7=I.memo(function(){const t=Ke("HeaderComponent"),n=xr("headerHeight"),r=Ke("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Ke("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),E7=I.memo(function(){const t=Ke("FooterComponent"),n=xr("footerHeight"),r=Ke("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Ke("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null});function Zp({usePublisher:e,useEmitter:t,useEmitterValue:n}){return I.memo(function({style:a,children:o,...s}){const l=e("scrollContainerState"),u=n("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=n("scrollerRef"),h=n("context"),{scrollerRef:f,scrollByCallback:g,scrollToCallback:p}=b2(l,c,u,d);return t("scrollTo",p),t("scrollBy",g),I.createElement(u,{ref:f,style:{...y7,...a},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...s,...Ft(u,h)},o)})}function Yp({usePublisher:e,useEmitter:t,useEmitterValue:n}){return I.memo(function({style:a,children:o,...s}){const l=e("windowScrollContainerState"),u=n("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=n("totalListHeight"),h=n("deviation"),f=n("customScrollParent"),g=n("context"),{scrollerRef:p,scrollByCallback:m,scrollToCallback:b}=b2(l,c,u,wo,f);return Bk(()=>(p.current=f||window,()=>{p.current=null}),[p,f]),t("windowScrollTo",b),t("scrollBy",m),I.createElement(u,{style:{position:"relative",...a,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...s,...Ft(u,g)},o)})}const S7=({children:e})=>{const t=I.useContext(Sf),n=xr("viewportHeight"),r=xr("fixedItemHeight"),i=Ke("alignToBottom"),a=fi(kl(n,o=>Fr(o,"height")));return I.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),I.createElement("div",{style:$s(i),ref:a,"data-viewport-type":"element"},e)},w7=({children:e})=>{const t=I.useContext(Sf),n=xr("windowViewportRect"),r=xr("fixedItemHeight"),i=Ke("customScrollParent"),a=Up(n,i),o=Ke("alignToBottom");return I.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(o),"data-viewport-type":"window"},e)},I7=({children:e})=>{const t=Ke("TopItemListComponent")||"div",n=Ke("headerHeight"),r={...x7,marginTop:`${n}px`},i=Ke("context");return I.createElement(t,{style:r,...Ft(t,i)},e)},_7=I.memo(function(t){const n=Ke("useWindowScroll"),r=Ke("topItemsIndexes").length>0,i=Ke("customScrollParent"),a=i||n?T7:A7,o=i||n?w7:S7;return I.createElement(a,{...t},r&&I.createElement(I7,null,I.createElement(Bb,{showTopList:!0})),I.createElement(o,null,I.createElement(C7,null),I.createElement(Bb,null),I.createElement(E7,null)))}),{Component:D7,usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}=Lp(p7,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_7),A7=Zp({usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}),T7=Yp({usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}),R7=D7,$b={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},B7={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:kb,ceil:Pb,floor:Ed,min:bh,max:bl}=Math;function $7(e){return{...B7,items:e}}function Fb(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const a=n===null?null:n[i+e];return{index:i+e,data:a}})}function k7(e,t){return e&&e.column===t.column&&e.row===t.row}function Gu(e,t){return e&&e.width===t.width&&e.height===t.height}const P7=lt(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:a,scrollTo:o,smoothScrollTargetReached:s,scrollContainerState:l,footerHeight:u,headerHeight:c},d,h,{propsReady:f,didMount:g},{windowViewportRect:p,useWindowScroll:m,customScrollParent:b,windowScrollContainerState:v,windowScrollTo:x},C])=>{const E=fe(0),w=fe(0),B=fe($b),y=fe({height:0,width:0}),S=fe({height:0,width:0}),D=tt(),A=tt(),T=fe(0),F=fe(null),k=fe({row:0,column:0}),P=tt(),$=tt(),R=fe(!1),O=fe(0),j=fe(!0),V=fe(!1);mt(ue(g,Ge(O),Fe(([H,X])=>!!X)),()=>{We(j,!1),We(w,0)}),mt(ue(sn(g,j,S,y,O,V),Fe(([H,X,te,ie,,le])=>H&&!X&&te.height!==0&&ie.height!==0&&!le)),([,,,,H])=>{We(V,!0),jp(1,()=>{We(D,H)}),di(ue(r),()=>{We(n,[0,0]),We(j,!0)})}),_e(ue($,Fe(H=>H!=null&&H.scrollTop>0),qr(0)),w),mt(ue(g,Ge($),Fe(([,H])=>H!=null)),([,H])=>{H&&(We(y,H.viewport),We(S,H==null?void 0:H.item),We(k,H.gap),H.scrollTop>0&&(We(R,!0),di(ue(r,bs(1)),X=>{We(R,!1)}),We(o,{top:H.scrollTop})))}),_e(ue(y,ve(({height:H})=>H)),i),_e(ue(sn(Me(y,Gu),Me(S,Gu),Me(k,(H,X)=>H&&H.column===X.column&&H.row===X.row),Me(r)),ve(([H,X,te,ie])=>({viewport:H,item:X,gap:te,scrollTop:ie}))),P),_e(ue(sn(Me(E),t,Me(k,k7),Me(S,Gu),Me(y,Gu),Me(F),Me(w),Me(R),Me(j),Me(O)),Fe(([,,,,,,,H])=>!H),ve(([H,[X,te],ie,le,ce,Q,be,,Ce,Se])=>{const{row:un,column:ye}=ie,{height:Ee,width:He}=le,{width:bt}=ce;if(be===0&&(H===0||bt===0))return $b;if(He===0){const Gf=Wp(Se,H),vI=Gf===0?Math.max(be-1,0):Gf;return $7(Fb(Gf,vI,Q))}const Yt=M2(bt,He,ye);let at,Qe;Ce?X===0&&te===0&&be>0?(at=0,Qe=be-1):(at=Yt*Ed((X+un)/(Ee+un)),Qe=Yt*Pb((te+un)/(Ee+un))-1,Qe=bh(H-1,bl(Qe,Yt-1)),at=bh(Qe,bl(0,at))):(at=0,Qe=-1);const or=Fb(at,Qe,Q),{top:wr,bottom:Ir}=Nb(ce,ie,le,or),Ro=Pb(H/Yt),bI=Ro*Ee+(Ro-1)*un-Ir;return{items:or,offsetTop:wr,offsetBottom:bI,top:wr,bottom:Ir,itemHeight:Ee,itemWidth:He}})),B),_e(ue(F,Fe(H=>H!==null),ve(H=>H.length)),E),_e(ue(sn(y,S,B,k),Fe(([H,X,{items:te}])=>te.length>0&&X.height!==0&&H.height!==0),ve(([H,X,{items:te},ie])=>{const{top:le,bottom:ce}=Nb(H,ie,X,te);return[le,ce]}),_t(Ll)),n);const W=fe(!1);_e(ue(r,Ge(W),ve(([H,X])=>X||H!==0)),W);const U=tr(ue(Me(B),Fe(({items:H})=>H.length>0),Ge(E,W),Fe(([{items:H},X,te])=>te&&H[H.length-1].index===X-1),ve(([,H])=>H-1),_t())),K=tr(ue(Me(B),Fe(({items:H})=>H.length>0&&H[0].index===0),qr(0),_t())),ee=tr(ue(Me(B),Ge(R),Fe(([{items:H},X])=>H.length>0&&!X),ve(([{items:H}])=>({startIndex:H[0].index,endIndex:H[H.length-1].index})),_t(A2),ua(0)));_e(ee,h.scrollSeekRangeChanged),_e(ue(D,Ge(y,S,E,k),ve(([H,X,te,ie,le])=>{const ce=_2(H),{align:Q,behavior:be,offset:Ce}=ce;let Se=ce.index;Se==="LAST"&&(Se=ie-1),Se=bl(0,Se,bh(ie-1,Se));let un=ag(X,le,te,Se);return Q==="end"?un=kb(un-X.height+te.height):Q==="center"&&(un=kb(un-X.height/2+te.height/2)),Ce&&(un+=Ce),{top:un,behavior:be}})),o);const z=Cn(ue(B,ve(H=>H.offsetBottom+H.bottom)),0);return _e(ue(p,ve(H=>({width:H.visibleWidth,height:H.visibleHeight}))),y),{data:F,totalCount:E,viewportDimensions:y,itemDimensions:S,scrollTop:r,scrollHeight:A,overscan:e,scrollBy:a,scrollTo:o,scrollToIndex:D,smoothScrollTargetReached:s,windowViewportRect:p,windowScrollTo:x,useWindowScroll:m,customScrollParent:b,windowScrollContainerState:v,deviation:T,scrollContainerState:l,footerHeight:u,headerHeight:c,initialItemCount:w,gap:k,restoreStateFrom:$,...h,initialTopMostItemIndex:O,gridState:B,totalListHeight:z,...d,startReached:K,endReached:U,rangeChanged:ee,stateChanged:P,propsReady:f,stateRestoreInProgress:R,...C}},Dt(zp,$n,yu,R2,Ba,Gp,Ra));function Nb(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const a=ag(e,t,n,r[0].index),o=ag(e,t,n,r[r.length-1].index)+i;return{top:a,bottom:o}}function ag(e,t,n,r){const i=M2(e.width,n.width,t.column),a=Ed(r/i),o=a*n.height+bl(0,a-1)*t.row;return o>0?o+t.row:o}function M2(e,t,n){return bl(1,Ed((e+n)/(Ed(t)+n)))}const F7=lt(()=>{const e=fe(u=>`Item ${u}`),t=fe({}),n=fe(null),r=fe("virtuoso-grid-item"),i=fe("virtuoso-grid-list"),a=fe(Xp),o=fe("div"),s=fe(wo),l=(u,c=null)=>Cn(ue(t,ve(d=>d[u]),_t()),c);return{context:n,itemContent:e,components:t,computeItemKey:a,itemClassName:r,listClassName:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),N7=lt(([e,t])=>({...e,...t}),Dt(P7,F7)),M7=I.memo(function(){const t=Bt("gridState"),n=Bt("listClassName"),r=Bt("itemClassName"),i=Bt("itemContent"),a=Bt("computeItemKey"),o=Bt("isSeeking"),s=kr("scrollHeight"),l=Bt("ItemComponent"),u=Bt("ListComponent"),c=Bt("ScrollSeekPlaceholder"),d=Bt("context"),h=kr("itemDimensions"),f=kr("gap"),g=Bt("log"),p=Bt("stateRestoreInProgress"),m=fi(b=>{const v=b.parentElement.parentElement.scrollHeight;s(v);const x=b.firstChild;if(x){const{width:C,height:E}=x.getBoundingClientRect();h({width:C,height:E})}f({row:Mb("row-gap",getComputedStyle(b).rowGap,g),column:Mb("column-gap",getComputedStyle(b).columnGap,g)})});return p?null:I.createElement(u,{ref:m,className:n,...Ft(u,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const v=a(b.index,b.data,d);return o?I.createElement(c,{key:v,...Ft(c,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):I.createElement(l,{...Ft(l,d),className:r,"data-index":b.index,key:v},i(b.index,b.data,d))}))}),L7=I.memo(function(){const t=Bt("HeaderComponent"),n=kr("headerHeight"),r=Bt("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Bt("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),O7=I.memo(function(){const t=Bt("FooterComponent"),n=kr("footerHeight"),r=Bt("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Bt("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),V7=({children:e})=>{const t=I.useContext(F2),n=kr("itemDimensions"),r=kr("viewportDimensions"),i=fi(a=>{r(a.getBoundingClientRect())});return I.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),I.createElement("div",{style:$s(!1),ref:i},e)},H7=({children:e})=>{const t=I.useContext(F2),n=kr("windowViewportRect"),r=kr("itemDimensions"),i=Bt("customScrollParent"),a=Up(n,i);return I.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(!1)},e)},j7=I.memo(function({...t}){const n=Bt("useWindowScroll"),r=Bt("customScrollParent"),i=r||n?z7:W7,a=r||n?H7:V7;return I.createElement(i,{...t},I.createElement(a,null,I.createElement(L7,null),I.createElement(M7,null),I.createElement(O7,null)))}),{usePublisher:kr,useEmitterValue:Bt,useEmitter:L2}=Lp(N7,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},j7),W7=Zp({usePublisher:kr,useEmitterValue:Bt,useEmitter:L2}),z7=Yp({usePublisher:kr,useEmitterValue:Bt,useEmitter:L2});function Mb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}const G7=lt(()=>{const e=fe(l=>I.createElement("td",null,"Item $",l)),t=fe(null),n=fe(null),r=fe(null),i=fe({}),a=fe(Xp),o=fe(wo),s=(l,u=null)=>Cn(ue(i,ve(c=>c[l]),_t()),u);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:i,computeItemKey:a,scrollerRef:o,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableFooterComponent:s("TableFoot","tfoot"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),FillerRow:s("FillerRow")}}),U7=lt(([e,t])=>({...e,...t}),Dt(k2,G7)),X7=({height:e})=>I.createElement("tr",null,I.createElement("td",{style:{height:e}})),Z7=({height:e})=>I.createElement("tr",null,I.createElement("td",{style:{height:e,padding:0,border:0}})),Y7={overflowAnchor:"none"},K7=I.memo(function(){const t=ht("listState"),n=Pr("sizeRanges"),r=ht("useWindowScroll"),i=ht("customScrollParent"),a=Pr("windowScrollContainerState"),o=Pr("scrollContainerState"),s=i||r?a:o,l=ht("itemContent"),u=ht("trackItemSizes"),c=ht("itemSize"),d=ht("log"),{callbackRef:h,ref:f}=p2(n,c,u,s,d,void 0,i),[g,p]=I.useState(0);qp("deviation",$=>{g!==$&&(f.current.style.marginTop=`${$}px`,p($))});const m=ht("EmptyPlaceholder"),b=ht("ScrollSeekPlaceholder")||X7,v=ht("FillerRow")||Z7,x=ht("TableBodyComponent"),C=ht("TableRowComponent"),E=ht("computeItemKey"),w=ht("isSeeking"),B=ht("paddingTopAddition"),y=ht("firstItemIndex"),S=ht("statefulTotalCount"),D=ht("context");if(S===0&&m)return I.createElement(m,Ft(m,D));const A=t.offsetTop+B+g,T=t.offsetBottom,F=A>0?I.createElement(v,{height:A,key:"padding-top",context:D}):null,k=T>0?I.createElement(v,{height:T,key:"padding-bottom",context:D}):null,P=t.items.map($=>{const R=$.originalIndex,O=E(R+y,$.data,D);return w?I.createElement(b,{...Ft(b,D),key:O,index:$.index,height:$.size,type:$.type||"item"}):I.createElement(C,{...Ft(C,D),...N2(C,$.data),key:O,"data-index":R,"data-known-size":$.size,"data-item-index":$.index,style:Y7},l($.index,$.data,D))});return I.createElement(x,{ref:h,"data-testid":"virtuoso-item-list",...Ft(x,D)},[F,...P,k])}),q7=({children:e})=>{const t=I.useContext(Sf),n=Pr("viewportHeight"),r=Pr("fixedItemHeight"),i=fi(kl(n,a=>Fr(a,"height")));return I.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),I.createElement("div",{style:$s(!1),ref:i,"data-viewport-type":"element"},e)},J7=({children:e})=>{const t=I.useContext(Sf),n=Pr("windowViewportRect"),r=Pr("fixedItemHeight"),i=ht("customScrollParent"),a=Up(n,i);return I.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(!1),"data-viewport-type":"window"},e)},Q7=I.memo(function(t){const n=ht("useWindowScroll"),r=ht("customScrollParent"),i=Pr("fixedHeaderHeight"),a=Pr("fixedFooterHeight"),o=ht("fixedHeaderContent"),s=ht("fixedFooterContent"),l=ht("context"),u=fi(kl(i,v=>Fr(v,"height"))),c=fi(kl(a,v=>Fr(v,"height"))),d=r||n?nP:tP,h=r||n?J7:q7,f=ht("TableComponent"),g=ht("TableHeadComponent"),p=ht("TableFooterComponent"),m=o?I.createElement(g,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:u,...Ft(g,l)},o()):null,b=s?I.createElement(p,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:c,...Ft(p,l)},s()):null;return I.createElement(d,{...t},I.createElement(h,null,I.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...Ft(f,l)},[m,I.createElement(K7,{key:"TableBody"}),b])))}),{Component:eP,usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}=Lp(U7,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Q7),tP=Zp({usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}),nP=Yp({usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}),rP=eP,iP=({children:e,...t})=>_.jsx(_.Fragment,{children:e(t)}),aP=({children:e,...t})=>_.jsx(_.Fragment,{children:I.isValidElement(e)&&_.jsx(_.Fragment,{children:I.cloneElement(e,t)})}),Jp=I.forwardRef((e,t)=>{const{classNameContainer:n="",computeItemKey:r=()=>"",itemSize:i=()=>0,totalCount:a=0,typeHight:o="min-max",minHeightItem:s=0,maxHeightTable:l=0,minLengthItem:u=0,fixedHeaderContent:c,itemContent:d,typeCalculateItemSize:h="manual",itemSizeNames:f=[],overscan:g=null,component:p={},idContainer:m="",triggerCalCulateContainer:b="",accumulationHeight:v=0,delayTriggerCalculateHeight:x=0,increaseViewportBy:C=()=>0,context:E={},endReached:w,increaseTotalCount:B=1}=e,[y,S]=I.useState(0),D=()=>{if(o==="min-max"){const F=(a+B)*s;return{height:a>u?l:y>F?y:F}}return o==="container"?{height:y}:{}},A=F=>{var $;const k=F.getAttribute("data-index");let P=(($=F.getBoundingClientRect())==null?void 0:$.height)||0;return f==null||f.forEach(R=>{var O,j;P+=((j=(O=document.querySelector(`[${R}="${k}"]`))==null?void 0:O.getBoundingClientRect())==null?void 0:j.height)??0}),P},T=()=>{var F;if(m&&o==="container"){const k=((F=document==null?void 0:document.getElementById(m))==null?void 0:F.offsetHeight)??0;S(k-v)}};return I.useEffect(()=>{const F=setTimeout(T,x);return window==null||window.addEventListener("resize",T),window==null||window.addEventListener("load",T),()=>{clearTimeout(F),window==null||window.removeEventListener("resize",T),window==null||window.removeEventListener("load",T)}},[o,b]),_.jsx("div",{className:`1ru-w-full ${n}`,children:_.jsx(rP,{context:E,ref:t,overscan:typeof g=="function"?g(o==="container"?y:l):o==="container"?y:l,totalListHeightChanged:F=>o==="min-max"?S(F):null,style:D(),totalCount:a,computeItemKey:r,itemSize:I.useCallback(F=>h==="manual"?i(F):A(F),[]),components:{TableRow:aP,...p},fixedHeaderContent:c,itemContent:(...F)=>d(iP,...F),endReached:w,increaseViewportBy:C(o==="container"?y:l)})})});Jp.displayName="TableVirtualization";const oP="_sorting_1a30n_536",en={"payhere-reguler":"_payhere-reguler_1a30n_109","laba-reguler":"_laba-reguler_1a30n_259","laba-rounded-md-extra-small":"_laba-rounded-md-extra-small_1a30n_259","laba-small_body-small":"_laba-small_body-small_1a30n_295","laba-small":"_laba-small_1a30n_295","bill-reguler":"_bill-reguler_1a30n_421","pointer-laba":"_pointer-laba_1a30n_489","pointer-payhere":"_pointer-payhere_1a30n_494","pointer-bill":"_pointer-bill_1a30n_499","resize-menu":"_resize-menu_1a30n_504",sorting:oP,"laba-grey-02":"_laba-grey-02_1a30n_557","laba-blue-01_border-transparent":"_laba-blue-01_border-transparent_1a30n_566"};function sP(e,t=null){const[n,r]=I.useState(!1);return I.useEffect(()=>{let i=null,a=null;const o=()=>{const s=i instanceof HTMLElement?i.getBoundingClientRect().width:window.innerWidth,l=window.matchMedia(e.replace("WIDTH",s.toString()));r(l.matches)};if(t){if(i=document.getElementById(t),!i)return;a=new ResizeObserver(o),a.observe(i)}else i=window,window.addEventListener("resize",o);return o(),()=>{a?a.disconnect():window.removeEventListener("resize",o)}},[e,t]),n}const vh=e=>{const t=e.getTime()-Date.now();return Math.max(Math.floor(t/1e3),0)},lP=e=>{const t=I.useMemo(()=>{const f=new Date(e.date);return e.adjustTimesTime&&f.setHours(f.getHours()-e.adjustTimesTime),f},[e.date,e.adjustTimesTime]),[n,r]=I.useState(t),[i,a]=I.useState(()=>vh(n)),[o,s]=I.useState(e.running??!1),[l,u]=I.useState(()=>e==null?void 0:e.callbackDone);return I.useEffect(()=>{let f;return o&&i>0&&(f=setInterval(()=>{const g=vh(n);a(g),g<=0&&(s(!1),f&&clearInterval(f),typeof l=="function"&&l())},e.intervalMs)),()=>{f&&clearInterval(f)}},[o,n,e.intervalMs,l,i]),{count:i,isRunning:o,startCountdown:()=>{!o&&i>0&&s(!0)},stopCountdown:()=>{s(!1)},resetCountdown:f=>{let g;f instanceof Date?g=f:typeof f=="number"?g=new Date(Date.now()+f*1e3):g=t,r(g);const p=vh(g);a(p),p<=0&&s(!1)},setCallbackDone:f=>u(()=>f)}};function O2(e,t=0){const n=I.useRef({promise:null,resolve:null,reject:null,timeout:null});return I.useCallback((...i)=>(n.current.timeout&&clearTimeout(n.current.timeout),n.current.promise||(n.current.promise=new Promise((a,o)=>{n.current.resolve=a,n.current.reject=o})),n.current.timeout=setTimeout(()=>{e(...i).then(a=>{n.current.resolve&&n.current.resolve(a)}).catch(a=>{n.current.reject&&n.current.reject(a)}).finally(()=>{n.current.promise=null,n.current.resolve=null,n.current.reject=null,n.current.timeout=null})},t),n.current.promise),[e,t])}const wf=typeof window<"u"?I.useLayoutEffect:I.useEffect,uP=(e,t)=>{const[n,r]=I.useState({width:0,height:0}),[i,a]=I.useState({width:0,height:0,top:0,left:0,bottom:0,right:0,x:0,y:0}),o=I.useRef(null);return wf(()=>{const s=()=>{r({width:window.innerWidth,height:window.innerHeight})},l=d=>{for(const h of d){const{width:f,height:g,top:p,left:m,bottom:b,right:v,x,y:C}=h.contentRect;a({width:f,height:g,top:p,left:m,bottom:b,right:v,x,y:C})}};let u=null;t?u=document.querySelector(t):o.current&&(u=o.current);const c=new ResizeObserver(l);return u&&c.observe(u),window.addEventListener("resize",s),s(),()=>{u&&c.unobserve(u),window.removeEventListener("resize",s)}},[t,...e??[]]),{ref:o,windowSize:n,contentRect:i}};function cP(e){const[t,n]=I.useState(e),r=I.useRef(t);return I.useEffect(()=>{r.current=t},[t]),[t,n,r]}function dP(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${JSON.stringify(t)}' to ref '${JSON.stringify(e)}'`)}}}function fP(...e){return t=>{e.forEach(n=>{dP(n,t)})}}function If(...e){return I.useMemo(()=>fP(...e),e)}function Ol(e){const t=I.useRef(e);return vp(e,t.current)||(t.current=e),t.current}function ba(e,t){const n=t.map(Ol);I.useEffect(e,n)}function hP({ref:e,handlerMain:t,eventListener:n="mousedown",useEffectDependency:r=[]}){I.useEffect(()=>{function i(a){t(e,a)}return document.addEventListener(n,i),()=>{document.removeEventListener(n,i)}},[e,t,n,...r])}const gP=({containerRef:e,children:t,columnCount:n,gapX:r,gapY:i,direction:a="masonry-ltr",debounceRecalculate:o=500,durationAnimation:s=500,enableAnimation:l=!1})=>{const u=I.useCallback(()=>{const d=e.current;if(!d)return;const h=Array.from(d.children);if(h.length===0){d.style.height="0px";return}const f=Array(n).fill(0),g=d.offsetWidth;if(g===0)return;const p=(g-(n-1)*r)/n,m=a.includes("rtl"),b=a.includes("top-down");h.forEach((x,C)=>{x.style.width=`${p}px`,x.style.position="absolute",l&&(x.style.transition=`top ${s}ms ease, left ${s}ms ease`);let E;if(b)E=C%n;else{const y=Math.min(...f);E=f.indexOf(y)}const w=f[E];let B;m?B=g-(p*(E+1)+r*E):B=E*(p+r),x.style.top=`${w}px`,x.style.left=`${B}px`,f[E]+=x.offsetHeight+i});const v=Math.max(...f);d.style.height=`${v-i}px`},[e,n,r,a,i]),c=O2(async()=>{u()},o);return I.useLayoutEffect(()=>{u()},[t,u]),I.useEffect(()=>(window.addEventListener("load",u),window.addEventListener("resize",c),()=>{window.removeEventListener("load",u),window.removeEventListener("resize",c)}),[t,c,u]),{recalculateLayout:u}},pP=({id:e,numInputs:t,onComplete:n,disableFocusOnEdit:r=!1,blurOnComplete:i=!1,disableOnComplete:a=!1})=>{const[o,s]=I.useState(()=>Array(t).fill("")),l=I.useRef([]),[u]=I.useState(()=>`otp-${Math.random().toString(36).slice(2,9)}`),c=e||u;I.useEffect(()=>{l.current=l.current.slice(0,t)},[t]);const d=I.useCallback((v,x)=>{var D,A;const C=v.target.value,E=C.length>1?C.slice(-1):C,w=o[x]!=="",B=[...o];B[x]=E,s(B);const y=B.join(""),S=!B.slice(0,t).includes("");E!==""&&x<t-1&&(r&&w&&S||(D=l.current[x+1])==null||D.focus()),S&&(typeof n=="function"&&n(y),i&&((A=l.current[x])==null||A.blur()))},[o,t,n,r,i]),h=I.useCallback((v,x)=>{var C,E,w,B,y;switch(v.key){case"Backspace":if(o[x]===""&&x>0){v.preventDefault();const S=[...o];S[x-1]="",s(S),(C=l.current[x-1])==null||C.focus()}break;case"ArrowLeft":x>0&&(v.preventDefault(),(E=l.current[x-1])==null||E.focus());break;case"ArrowRight":x<t-1&&(v.preventDefault(),(w=l.current[x+1])==null||w.focus());break;case"Home":v.preventDefault(),(B=l.current[0])==null||B.focus();break;case"End":v.preventDefault(),(y=l.current[t-1])==null||y.focus();break}},[o,t]),f=I.useCallback((v,x)=>{var D,A;v.preventDefault();const C=v.clipboardData.getData("text").trim();if(!C)return;const E=[...o];let w=x;for(const T of C){if(w>=t)break;E[w]=T,w++}s(E);const B=E.join(""),y=!E.includes(""),S=Math.min(w,t-1);(D=l.current[S])==null||D.focus(),y&&(typeof n=="function"&&n(B),i&&((A=l.current[S])==null||A.blur()))},[o,t,n,i]),g=v=>{v.target.select()},p=()=>{var v;s(Array(t).fill("")),(v=l.current[0])==null||v.focus()},m=v=>{if(v<0||v>=t)throw new Error(`useOtpInput: index ${v} is out of bounds for numInputs ${t}.`);const x=o.join("").length===t;return{id:`${c}-${v}`,"aria-label":`OTP digit ${v+1} of ${t}`,ref:C=>{l.current[v]=C},value:o[v],onChange:C=>d(C,v),onKeyDown:C=>h(C,v),onPaste:C=>f(C,v),onFocus:g,disabled:a&&x,type:"text",inputMode:"numeric",autoComplete:"one-time-code"}};return{getInputProps:m,getInputData:v=>({...JC(m(v),["onChange","onKeyDown","onPaste","onFocus","aria-label","autoComplete"]),isOtpFilled:o[v]!==""}),otpValues:o,otpString:o.join(""),clearOtp:p,isOtpComplete:o.join("").length===t}},Fo={"sub-mobile-payhere-reguler":"_sub-mobile-payhere-reguler_elvgc_115"},lr="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6673%2011.3333L8.00065%2014M8.00065%2014L5.33398%2011.3333M8.00065%2014V2'%20stroke='%23CFD8DC'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",cn=()=>({kind:{"payhere-reguler":en["payhere-reguler"],"laba-reguler":en["laba-reguler"],"laba-small":en["laba-small"],"laba-rounded-md-extra-small":en["laba-rounded-md-extra-small"],"laba-small_body-small":en["laba-small_body-small"],"bill-reguler":en["bill-reguler"]},subMobile:{"payhere-reguler":Fo["sub-mobile-payhere-reguler"],"laba-reguler":Fo["sub-mobile-laba-reguler"],"laba-small":Fo["sub-mobile-laba-small"],"laba-rounded-md-extra-small":Fo["sub-mobile-laba-rounded-md-extra-small"],"laba-small_body-small":Fo["sub-mobile-laba-small_body-small"],"bill-reguler":Fo["sub-mobile-bill-reguler"]},pointer:{"payhere-reguler":en["pointer-payhere"],"laba-reguler":en["pointer-laba"],"laba-small":en["pointer-laba"],"laba-rounded-md-extra-small":en["pointer-laba"],"laba-small_body-small":en["pointer-laba"],"bill-reguler":en["pointer-bill"]},utility:{"table-scroll-top":""},sortingIcon:{"payhere-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"bill-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-rounded-md-extra-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-small_body-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})}},variant:{"laba-grey-02":en["laba-grey-02"],"laba-blue-01_border-transparent":en["laba-blue-01_border-transparent"]}});Object.keys(cn().kind);Object.keys(cn().variant);const mP=(e,t)=>{var r,i;let n={};return e&&(n={position:"sticky",top:0,zIndex:2}),(r=t.column.columnDef.meta)!=null&&r.styleTh&&(n={...n,...(i=t.column.columnDef.meta)==null?void 0:i.styleTh(t.column.columnDef)}),n},Sd=(e,t=!1)=>{const n=e.getIsPinned(),r=n==="left"&&e.getIsLastColumn("left"),i=n==="right"&&e.getIsFirstColumn("right");return n?{boxShadow:r?"-4px 0 4px -4px gray inset":i?"4px 0 4px -4px gray inset":void 0,left:n==="left"?`${e.getStart("left")}px`:void 0,right:n==="right"?`${e.getAfter("right")}px`:void 0,position:"sticky",width:e.getSize(),zIndex:1,background:t?"white":""}:{}},V2=e=>{const t=e.columnPinning.left||[],n=e.columnPinning.right||[],r=e.rowPinning.top||[],i=e.rowPinning.bottom||[];return{left:t,right:n,top:r,bottom:i,isPinning:t.length>0||n.length>0||r.length>0||i.length>0}},bP=({tableInstance:e,classNameWrapperTable:t,classNameTable:n,handlerRowClick:r,privillageRowClick:i,headerId:a,tbodyTrId:o,theadTrId:s,maxHeight:l,idCalculateHeight:u,componentSortASC:c,componentSortDESC:d,classNamePointer:h,emptyPlaceholder:f,renderSubComponent:g,visibilityColumns:p,classNameSubMobile:m})=>_.jsx("div",{id:"1ru-table",style:l?{height:l,overflow:"auto"}:{},className:t??"",children:_.jsxs("table",{className:n,style:{width:V2(e.getState()).isPinning?e.getCenterTotalSize():""},children:[_.jsx("thead",{id:a,"data-calculate-height-header":u,children:e.getHeaderGroups().map(b=>_.jsx("tr",{children:b.headers.map(v=>{var C,E,w,B;const x=(E=(C=v.column.columnDef.meta)==null?void 0:C.rowSpan)==null?void 0:E.call(C,v);return!v.isPlaceholder&&x!==void 0&&v.id===v.column.id?_.jsx(_.Fragment,{}):_.jsxs("th",{style:{...mP(l,v),...Sd(v.column),...p.columns.includes(v.column.id)?{display:"none"}:{}},id:`${s(v)}-${v.id}`,colSpan:typeof((w=v.column.columnDef.meta)==null?void 0:w.colSpan)=="function"?(B=v.column.columnDef.meta)==null?void 0:B.colSpan(v.column.columnDef):v.colSpan,rowSpan:x,children:[v.isPlaceholder&&x===void 0?null:_.jsxs("div",{className:v.column.getCanSort()?en.sorting:"",onClick:v.column.getToggleSortingHandler(),id:v.column.getCanSort()?`${s(v)}-${v.id}-sort`:"",children:[ms(v.column.columnDef.header,v.getContext()),v.column.getCanSort()&&_.jsx("span",{className:"1ru-flex-shrink-0",children:v.column.getIsSorted()==="asc"||v.column.getIsSorted()==="desc"?_.jsxs(_.Fragment,{children:[v.column.getIsSorted()==="asc"&&_.jsx(_.Fragment,{children:c}),v.column.getIsSorted()==="desc"&&_.jsx(_.Fragment,{children:d})]}):_.jsx(_.Fragment,{})})]}),v.column.getIsPinned()&&_.jsx("div",{onDoubleClick:()=>v.column.resetSize(),onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:en["resize-menu"]})]},v.id)})},b.id))}),_.jsxs("tbody",{children:[e.getRowModel().rows.length>0&&e.getRowModel().rows.map((b,v)=>{var x;return _.jsxs(I.Fragment,{children:[_.jsx("tr",{onClick:C=>{C.stopPropagation(),i&&typeof r=="function"&&r(b.original,b)},className:i?h:"","data-calculate-height":`${u}-${v}`,id:o(b),children:b.getVisibleCells().map(C=>{var E,w,B;return _.jsx("td",{style:{...typeof((E=C.column.columnDef.meta)==null?void 0:E.styleTd)=="function"?C.column.columnDef.meta.styleTd(b.original,b):{},...Sd(C.column,!0),...p.columns.includes(C.column.id)?{display:"none"}:{}},className:typeof((w=C.column.columnDef.meta)==null?void 0:w.classNameTd)=="function"?(B=C.column.columnDef.meta)==null?void 0:B.classNameTd(b.original,b):"",id:`${o(b)}-${C.column.id}`,children:ms(C.column.columnDef.cell,C.getContext())},C.id)})},b.id),b.getIsExpanded()&&typeof g=="function"&&_.jsx("tr",{children:_.jsx("td",{colSpan:b.getVisibleCells().length-(((x=p==null?void 0:p.realColumns)==null?void 0:x.length)||0),children:g(b.original,b,{visibilityColumns:p,classNameSubMobile:m})})})]},b.id)}),e.getRowModel().rows.length===0&&I.isValidElement(f)&&_.jsx("tr",{children:_.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:f})})]})]})}),H2=I.forwardRef((e,t)=>{const{context:n,...r}=e;return _.jsx("thead",{id:(n==null?void 0:n.headerId)??"",...r,ref:t})});H2.displayName="VirtualizationHead";const vP=({style:e,context:t,...n})=>_.jsx("table",{...n,id:"1ru-table",className:(t==null?void 0:t.classNameTable)??"",style:{...e,width:t==null?void 0:t.width}}),yP=({tableInstance:e,classNameWrapperTable:t,handlerRowClick:n,privillageRowClick:r,virtualizationProps:i,headerId:a,tbodyTrId:o,theadTrId:s,classNameTable:l,componentSortASC:u,componentSortDESC:c,classNamePointer:d,emptyPlaceholder:h,renderSubComponent:f,visibilityColumns:g,classNameSubMobile:p})=>{var v,x,C;const[m,b]=I.useState(0);return _.jsx(Jp,{context:{headerId:a,classNameTable:l,width:V2(e.getState()).isPinning?e.getCenterTotalSize():""},typeHight:"min-max",totalCount:((v=e.getRowModel().rows)==null?void 0:v.length)||0,minLengthItem:((x=e.getRowModel().rows)==null?void 0:x.length)||0,typeCalculateItemSize:"auto",component:{TableHead:H2,Table:vP,EmptyPlaceholder:()=>_.jsx("tbody",{ref:E=>{var w;return b(((w=E==null?void 0:E.getBoundingClientRect())==null?void 0:w.height)??0)},children:_.jsx("tr",{children:_.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:I.isValidElement(h)&&h})})})},classNameContainer:t,fixedHeaderContent:()=>e.getHeaderGroups().map(E=>_.jsx("tr",{children:E.headers.map(w=>{var y,S,D,A;const B=(S=(y=w.column.columnDef.meta)==null?void 0:y.rowSpan)==null?void 0:S.call(y,w);return!w.isPlaceholder&&B!==void 0&&w.id===w.column.id?_.jsx(_.Fragment,{}):_.jsxs("th",{id:`${s(w)}-${w.id}`,colSpan:w.colSpan,rowSpan:B,style:{...typeof((D=w.column.columnDef.meta)==null?void 0:D.styleTh)=="function"?(A=w.column.columnDef.meta)==null?void 0:A.styleTh(w.column.columnDef):{},...Sd(w.column),...g.columns.includes(w.column.id)?{display:"none"}:{}},children:[w.isPlaceholder&&B===void 0?null:_.jsxs("div",{className:w.column.getCanSort()?en.sorting:"",onClick:w.column.getToggleSortingHandler(),id:w.column.getCanSort()?`${s(w)}-${w.id}-sort`:"",children:[ms(w.column.columnDef.header,w.getContext()),w.column.getCanSort()&&_.jsx("span",{className:"1ru-flex-shrink-0",children:w.column.getIsSorted()==="asc"||w.column.getIsSorted()==="desc"?_.jsxs(_.Fragment,{children:[w.column.getIsSorted()==="asc"&&_.jsx(_.Fragment,{children:u}),w.column.getIsSorted()==="desc"&&_.jsx(_.Fragment,{children:c})]}):_.jsx(_.Fragment,{})})]}),w.column.getIsPinned()&&_.jsx("div",{onDoubleClick:()=>w.column.resetSize(),onMouseDown:w.getResizeHandler(),onTouchStart:w.getResizeHandler(),className:en["resize-menu"]})]},w.id)})},E.id)),itemContent:(E,w)=>{var y,S;const B=(S=(y=e.getRowModel())==null?void 0:y.rows)==null?void 0:S[w];return _.jsx(E,{children:({...D})=>{var A;return _.jsxs(I.Fragment,{children:[_.jsx("tr",{...D,onClick:T=>{T.stopPropagation(),r&&typeof n=="function"&&n(B.original,B)},className:r?d:"",id:o(B),children:B.getVisibleCells().map(T=>{var F,k,P;return _.jsx(_.Fragment,{children:_.jsx("td",{style:{...typeof((F=T.column.columnDef.meta)==null?void 0:F.styleTd)=="function"?T.column.columnDef.meta.styleTd(B.original,B):{},...Sd(T.column,!0),...g.columns.includes(T.column.id)?{display:"none"}:{}},className:typeof((k=T.column.columnDef.meta)==null?void 0:k.classNameTd)=="function"?(P=T.column.columnDef.meta)==null?void 0:P.classNameTd(B.original,B):"",id:`${o(B)}-${T.column.id}`,children:ms(T.column.columnDef.cell,T.getContext())},T.id)})})}),B.getIsExpanded()&&typeof f=="function"&&_.jsx("tr",{"data-sub-component":w,children:_.jsx("td",{colSpan:B.getVisibleCells().length-(((A=g==null?void 0:g.realColumns)==null?void 0:A.length)||0),children:f(B.original,B,{visibilityColumns:g,classNameSubMobile:p})})})]},B.id)}},B.id)},...i,minHeightItem:((i==null?void 0:i.minHeightItem)??60)+((((C=e.getRowModel().rows)==null?void 0:C.length)||0)>0?0:m),itemSizeNames:typeof f=="function"?[...(i==null?void 0:i.itemSizeNames)??[],"data-sub-component"]:i==null?void 0:i.itemSizeNames})},xP=({tableInstance:e,classNameWrapperTable:t="",classNameTable:n="",collapseAll:r=!0,handlerRowClick:i,privillageRowClick:a=!1,virtualization:o=!1,virtualizationProps:s,headerId:l="",tbodyTrId:u=()=>"",theadTrId:c=()=>"",maxHeight:d=0,idCalculateHeight:h=void 0,kind:f="laba-reguler",componentSortASC:g,componentSortDESC:p,scrollTop:m=!1,emptyPlaceholder:b,variant:v,renderSubComponent:x,columnBreakpoints:C})=>{var A;const[E,w]=I.useState(0),[B,y]=I.useState({columns:[],realColumns:[]}),S=()=>{if(![void 0,"undefined"].includes(h)){const T=document.querySelector(`[data-calculate-height-header="${h}"]`);let F=0;const k=document.querySelectorAll(`[data-calculate-height^="${h}-"]`);return k==null||k.forEach(P=>{F+=P.offsetHeight}),F>d?d+T.offsetHeight:0}return d},D=()=>{var P;const T=((P=document.querySelector("body"))==null?void 0:P.offsetWidth)||0,F=C==null?void 0:C.sort(($,R)=>{const O=($.maxWidth??$.minWidth)||0,j=(R.maxWidth??R.minWidth)||0;return O!==j?O-j:$.maxWidth?-1:1}),k=(F==null?void 0:F.find($=>!!(Object.hasOwnProperty.call($,"maxWidth")&&T<=($.maxWidth||0)||Object.hasOwnProperty.call($,"minWidth")&&T>=($.minWidth||0))))||{};Object.keys(k).length>0?(y({columns:k.columns,realColumns:k.realColumns||k.columns}),k!=null&&k.resetExpanded&&e.resetExpanded()):y({columns:[],realColumns:[]})};return ba(()=>{!r&&typeof e.toggleAllRowsExpanded=="function"&&e.toggleAllRowsExpanded()},[r,e==null?void 0:e.toggleAllRowsExpanded]),ba(()=>{d>0&&w(S())},[(A=e==null?void 0:e.options)==null?void 0:A.data,d]),ba(()=>{if(Array.isArray(C)&&(C==null?void 0:C.length)>0)return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[C]),_.jsxs(_.Fragment,{children:[!o&&_.jsx(bP,{theadTrId:c,tbodyTrId:u,headerId:l,tableInstance:e,classNameTable:n,classNameWrapperTable:`${cn().kind[f]} ${v?cn().variant[v]:""}
|
|
66
|
+
*/function ms(e,t){return e?bk(e)?J.createElement(e,t):e:null}function bk(e){return vk(e)||typeof e=="function"||yk(e)}function vk(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function yk(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function xk(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=J.useState(()=>({current:c2(t)})),[r,i]=J.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}const Ck=Object.freeze(Object.defineProperty({__proto__:null,ColumnFaceting:O4,ColumnFiltering:Z4,ColumnGrouping:Y4,ColumnOrdering:q4,ColumnPinning:J4,ColumnSizing:Q4,ColumnVisibility:t2,GlobalFaceting:n2,GlobalFiltering:r2,Headers:L4,RowExpanding:i2,RowPagination:a2,RowPinning:o2,RowSelection:s2,RowSorting:u2,_getVisibleLeafColumns:ts,aggregationFns:Rc,buildHeaderGroups:Js,createCell:N4,createColumn:M4,createColumnHelper:H8,createRow:bu,createTable:c2,defaultColumnSizing:Qs,expandRows:Fp,filterFns:Xr,flattenBy:$p,flexRender:ms,functionalUpdate:Pi,getCoreRowModel:ak,getExpandedRowModel:ok,getFacetedMinMaxValues:sk,getFacetedRowModel:ck,getFacetedUniqueValues:dk,getFilteredRowModel:fk,getGroupedRowModel:hk,getMemoOptions:Ie,getPaginationRowModel:pk,getSortedRowModel:mk,isFunction:mu,isNumberArray:F4,isRowSelected:vf,isSubRowSelected:bd,makeStateUpdater:Wn,memo:we,noop:j8,orderColumns:K4,passiveEventSupported:e2,reSplitAlphaNumeric:vd,selectRowsFn:Bc,shouldAutoRemoveFilter:q0,sortingFns:Uo,useReactTable:xk},Symbol.toStringTag,{value:"Module"})),yf=0,Ta=1,Bs=2,f2=4;function kl(e,t){return n=>e(t(n))}function Ek(e,t){return t(e)}function h2(e,t){return n=>e(t,n)}function yb(e,t){return()=>e(t)}function xf(e,t){return t(e),e}function Dt(...e){return e}function Sk(e){e()}function xb(e){return()=>e}function wk(...e){return()=>{e.map(Sk)}}function Np(e){return e!==void 0}function wo(){}function mt(e,t){return e(Ta,t)}function We(e,t){e(yf,t)}function Mp(e){e(Bs)}function xn(e){return e(f2)}function _e(e,t){return mt(e,h2(t,yf))}function di(e,t){const n=e(Ta,r=>{n(),t(r)});return n}function tt(){const e=[];return(t,n)=>{switch(t){case Bs:e.splice(0,e.length);return;case Ta:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case yf:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function fe(e){let t=e;const n=tt();return(r,i)=>{switch(r){case Ta:i(t);break;case yf:t=i;break;case f2:return t}return n(r,i)}}function Ik(e){let t,n;const r=()=>t&&t();return function(i,a){switch(i){case Ta:return a?n===a?void 0:(r(),n=a,t=mt(e,a),t):(r(),wo);case Bs:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function tr(e){return xf(tt(),t=>_e(e,t))}function Cn(e,t){return xf(fe(t),n=>_e(e,n))}function _k(...e){return t=>e.reduceRight(Ek,t)}function ue(e,...t){const n=_k(...t);return(r,i)=>{switch(r){case Ta:return mt(e,n(i));case Bs:Mp(e);return}}}function g2(e,t){return e===t}function _t(e=g2){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Fe(e){return t=>n=>{e(n)&&t(n)}}function ve(e){return t=>kl(t,e)}function qr(e){return t=>()=>t(e)}function ri(e,t){return n=>r=>n(t=e(t,r))}function bs(e){return t=>n=>{e>0?e--:t(n)}}function ua(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Cb(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ge(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);mt(a,l=>{const u=n;n=n|s,t[o]=l,u!==i&&n===i&&r&&(r(),r=null)})}),a=>o=>{const s=()=>a([o].concat(t));n===i?s():r=s}}function Eb(...e){return function(t,n){switch(t){case Ta:return wk(...e.map(r=>mt(r,n)));case Bs:return;default:throw new Error(`unrecognized action ${t}`)}}}function Me(e,t=g2){return ue(e,_t(t))}function sn(...e){const t=tt(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);mt(a,l=>{n[o]=l,r=r|s,r===i&&We(t,n)})}),function(a,o){switch(a){case Ta:return r===i&&o(n),mt(t,o);case Bs:return Mp(t);default:throw new Error(`unrecognized action ${a}`)}}}function lt(e,t=[],{singleton:n}={singleton:!0}){return{id:Dk(),constructor:e,dependencies:t,singleton:n}}const Dk=()=>Symbol();function Ak(e){const t=new Map,n=({id:r,constructor:i,dependencies:a,singleton:o})=>{if(o&&t.has(r))return t.get(r);const s=i(a.map(l=>n(l)));return o&&t.set(r,s),s};return n(e)}function Tk(e,t){const n={},r={};let i=0;const a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(const o in t)r.hasOwnProperty(o)||(n[o]=t[o]);return n}const zu=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Lp(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=I.createContext({});function l(b,v){b.propsReady&&We(b.propsReady,!1);for(const x of r){const C=b[t.required[x]];We(C,v[x])}for(const x of i)if(x in v){const C=b[t.optional[x]];We(C,v[x])}b.propsReady&&We(b.propsReady,!0)}function u(b){return a.reduce((v,x)=>(v[x]=C=>{const E=b[t.methods[x]];We(E,C)},v),{})}function c(b){return o.reduce((v,x)=>(v[x]=Ik(b[t.events[x]]),v),{})}const d=I.forwardRef((b,v)=>{const{children:x,...C}=b,[E]=I.useState(()=>xf(Ak(e),B=>l(B,C))),[w]=I.useState(yb(c,E));return zu(()=>{for(const B of o)B in C&&mt(w[B],C[B]);return()=>{Object.values(w).map(Mp)}},[C,w,E]),zu(()=>{l(E,C)}),I.useImperativeHandle(v,xb(u(E))),I.createElement(s.Provider,{value:E},n?I.createElement(n,Tk([...r,...i,...o],C),x):x)}),h=b=>I.useCallback(h2(We,I.useContext(s)[b]),[b]),f=b=>{const x=I.useContext(s)[b],C=I.useCallback(E=>mt(x,E),[x]);return I.useSyncExternalStore(C,()=>xn(x),()=>xn(x))},g=b=>{const x=I.useContext(s)[b],[C,E]=I.useState(yb(xn,x));return zu(()=>mt(x,w=>{w!==C&&E(xb(w))}),[x,C]),C},p=I.version.startsWith("18")?f:g;return{Component:d,usePublisher:h,useEmitterValue:p,useEmitter:(b,v)=>{const C=I.useContext(s)[b];zu(()=>mt(C,v),[v,C])}}}const Rk=typeof document<"u"?I.useLayoutEffect:I.useEffect,Bk=Rk;var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const $k={0:"debug",1:"log",2:"warn",3:"error"},kk=()=>typeof globalThis>"u"?window:globalThis,Ra=lt(()=>{const e=fe(3);return{log:fe((n,r,i=1)=>{var a;const o=(a=kk().VIRTUOSO_LOG_LEVEL)!=null?a:xn(e);i>=o&&console[$k[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Op(e,t=!0){const n=I.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=I.useMemo(()=>new ResizeObserver(a=>{requestAnimationFrame(()=>{const o=a[0].target;o.offsetParent!==null&&e(o)})}),[e]);r=a=>{a&&t?(i.observe(a),n.current=a):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function fi(e,t=!0){return Op(e,t).callbackRef}function p2(e,t,n,r,i,a,o){const s=I.useCallback(l=>{const u=Pk(l.children,t,"offsetHeight",i);let c=l.parentElement;for(;!c.dataset.virtuosoScroller;)c=c.parentElement;const d=c.lastElementChild.dataset.viewportType==="window",h=o?o.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:c.scrollTop,f=o?o.scrollHeight:d?document.documentElement.scrollHeight:c.scrollHeight,g=o?o.offsetHeight:d?window.innerHeight:c.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:g}),a==null||a(Fk("row-gap",getComputedStyle(l).rowGap,i)),u!==null&&e(u)},[e,t,i,a,o,r]);return Op(s,n)}function Pk(e,t,n,r){const i=e.length;if(i===0)return null;const a=[];for(let o=0;o<i;o++){const s=e.item(o);if(!s||s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),u=parseFloat(s.dataset.knownSize),c=t(s,n);if(c===0&&r("Zero-sized element, this should not happen",{child:s},nr.ERROR),c===u)continue;const d=a[a.length-1];a.length===0||d.size!==c||d.endIndex!==l-1?a.push({startIndex:l,endIndex:l,size:c}):a[a.length-1].endIndex++}return a}function Fk(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function Fr(e,t){return Math.round(e.getBoundingClientRect()[t])}function m2(e,t){return Math.abs(e-t)<1.01}function b2(e,t,n,r=wo,i){const a=I.useRef(null),o=I.useRef(null),s=I.useRef(null),l=I.useCallback(d=>{const h=d.target,f=h===window||h===document,g=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,p=f?document.documentElement.scrollHeight:h.scrollHeight,m=f?window.innerHeight:h.offsetHeight,b=()=>{e({scrollTop:Math.max(g,0),scrollHeight:p,viewportHeight:m})};d.suppressFlushSync?b():cu.flushSync(b),o.current!==null&&(g===o.current||g<=0||g===p-m)&&(o.current=null,t(!0),s.current&&(clearTimeout(s.current),s.current=null))},[e,t]);I.useEffect(()=>{const d=i||a.current;return r(i||a.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[a,l,n,r,i]);function u(d){const h=a.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let g,p,m;h===window?(p=Math.max(Fr(document.documentElement,"height"),document.documentElement.scrollHeight),g=window.innerHeight,m=document.documentElement.scrollTop):(p=h.scrollHeight,g=Fr(h,"height"),m=h.scrollTop);const b=p-g;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),m2(g,p)||d.top===m){e({scrollTop:m,scrollHeight:p,viewportHeight:g}),f&&t(!0);return}f?(o.current=d.top,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,o.current=null,t(!0)},1e3)):o.current=null,h.scrollTo(d)}function c(d){a.current.scrollBy(d)}return{scrollerRef:a,scrollByCallback:c,scrollToCallback:u}}const $n=lt(()=>{const e=tt(),t=tt(),n=fe(0),r=tt(),i=fe(0),a=tt(),o=tt(),s=fe(0),l=fe(0),u=fe(0),c=fe(0),d=tt(),h=tt(),f=fe(!1);return _e(ue(e,ve(({scrollTop:g})=>g)),t),_e(ue(e,ve(({scrollHeight:g})=>g)),o),_e(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:a,headerHeight:s,fixedHeaderHeight:l,fixedFooterHeight:u,footerHeight:c,scrollHeight:o,smoothScrollTargetReached:r,scrollTo:d,scrollBy:h,statefulScrollTop:i,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Pl={lvl:0};function v2(e,t,n,r=Pl,i=Pl){return{k:e,v:t,lvl:n,l:r,r:i}}function yt(e){return e===Pl}function ns(){return Pl}function tg(e,t){if(yt(e))return Pl;const{k:n,l:r,r:i}=e;if(t===n){if(yt(r))return i;if(yt(i))return r;{const[a,o]=y2(r);return $c(qt(e,{k:a,v:o,l:x2(r)}))}}else return t<n?$c(qt(e,{l:tg(r,t)})):$c(qt(e,{r:tg(i,t)}))}function Fl(e,t){if(!yt(e))return t===e.k?e.v:t<e.k?Fl(e.l,t):Fl(e.r,t)}function Nr(e,t,n="k"){if(yt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Nr(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Nr(e.l,t,n)}function Jn(e,t,n){return yt(e)?v2(t,n,1):t===e.k?qt(e,{k:t,v:n}):t<e.k?Sb(qt(e,{l:Jn(e.l,t,n)})):Sb(qt(e,{r:Jn(e.r,t,n)}))}function ng(e,t,n){if(yt(e))return[];const{k:r,v:i,l:a,r:o}=e;let s=[];return r>t&&(s=s.concat(ng(a,t,n))),r>=t&&r<=n&&s.push({k:r,v:i}),r<=n&&(s=s.concat(ng(o,t,n))),s}function Qa(e){return yt(e)?[]:[...Qa(e.l),{k:e.k,v:e.v},...Qa(e.r)]}function y2(e){return yt(e.r)?[e.k,e.v]:y2(e.r)}function x2(e){return yt(e.r)?e.l:$c(qt(e,{r:x2(e.r)}))}function qt(e,t){return v2(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function gh(e){return yt(e)||e.lvl>e.r.lvl}function Sb(e){return rg(E2(e))}function $c(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(gh(t))return E2(qt(e,{lvl:r-1}));if(!yt(t)&&!yt(t.r))return qt(t.r,{l:qt(t,{r:t.r.l}),r:qt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(gh(e))return rg(qt(e,{lvl:r-1}));if(!yt(n)&&!yt(n.l)){const i=n.l,a=gh(i)?n.lvl-1:n.lvl;return qt(i,{l:qt(e,{r:i.l,lvl:r-1}),r:rg(qt(n,{l:i.r,lvl:a})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Cf(e,t,n){if(yt(e))return[];const r=Nr(e,t)[0];return Nk(ng(e,r,n))}function C2(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const a=[];for(let o=1;o<n;o++){const{index:s,value:l}=t(e[o]);a.push({start:r,end:s-1,value:i}),r=s,i=l}return a.push({start:r,end:1/0,value:i}),a}function Nk(e){return C2(e,({k:t,v:n})=>({index:t,value:n}))}function rg(e){const{r:t,lvl:n}=e;return!yt(t)&&!yt(t.r)&&t.lvl===n&&t.r.lvl===n?qt(t,{l:qt(e,{r:t.l}),lvl:n+1}):e}function E2(e){const{l:t}=e;return!yt(t)&&t.lvl===e.lvl?qt(t,{r:qt(e,{l:t.r})}):e}function yd(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function S2(e,t,n){return e[yd(e,t,n)]}function Mk(e,t,n,r){const i=yd(e,t,r),a=yd(e,n,r,i);return e.slice(i,a+1)}const Vp=lt(()=>({recalcInProgress:fe(!1)}),[],{singleton:!0});function Lk(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function wb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Ok(e,t){let n=yt(e)?0:1/0;for(const r of t){const{size:i,startIndex:a,endIndex:o}=r;if(n=Math.min(n,a),yt(e)){e=Jn(e,0,i);continue}const s=Cf(e,a-1,o+1);if(s.some(Lk(r)))continue;let l=!1,u=!1;for(const{start:c,end:d,value:h}of s)l?(o>=c||i===h)&&(e=tg(e,c)):(u=h!==i,l=!0),d>o&&o>=c&&h!==i&&(e=Jn(e,o+1,h));u&&(e=Jn(e,a,i))}return[e,n]}function Vk(){return{offsetTree:[],sizeTree:ns(),groupOffsetTree:ns(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Hp({index:e},t){return t===e?0:t<e?-1:1}function Hk({offset:e},t){return t===e?0:t<e?-1:1}function jk(e){return{index:e.index,value:e}}function Wk(e,t,n,r=0){return r>0&&(t=Math.max(t,S2(e,r,Hp).offset)),C2(Mk(e,t,n,Hk),jk)}function ig(e,t,n,r){let i=e,a=0,o=0,s=0,l=0;if(t!==0){l=yd(i,t-1,Hp),s=i[l].offset;const c=Nr(n,t-1);a=c[0],o=c[1],i.length&&i[l].size===Nr(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:c}of Cf(n,t,1/0)){const d=u-a,h=d*o+s+d*r;i.push({offset:h,size:c,index:u}),a=u,s=h,o=c}return{offsetTree:i,lastIndex:a,lastOffset:s,lastSize:o}}function zk(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,s=0;if(n.length>0&&yt(a)&&t.length===2){const h=t[0].size,f=t[1].size;o=n.reduce((g,p)=>Jn(Jn(g,p,h),p+1,f),o)}else[o,s]=Ok(o,t);if(o===a)return e;const{offsetTree:l,lastIndex:u,lastSize:c,lastOffset:d}=ig(e.offsetTree,s,o,i);return{sizeTree:o,offsetTree:l,lastIndex:u,lastOffset:d,lastSize:c,groupOffsetTree:n.reduce((h,f)=>Jn(h,f,Nl(f,l,i)),ns()),groupIndices:n}}function Nl(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:a}=S2(t,e,Hp),o=e-i,s=a*o+(o-1)*n+r;return s>0?s+n:s}function Gk(e){return typeof e.groupIndex<"u"}function w2(e,t,n){if(Gk(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=I2(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function I2(e,t){if(!Ef(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ef(e){return!yt(e.groupOffsetTree)}function Uk(e){return Qa(e).map(({k:t,v:n},r,i)=>{const a=i[r+1],o=a?a.k-1:1/0;return{startIndex:t,endIndex:o,size:n}})}const Xk={offsetHeight:"height",offsetWidth:"width"},pi=lt(([{log:e},{recalcInProgress:t}])=>{const n=tt(),r=tt(),i=Cn(r,0),a=tt(),o=tt(),s=fe(0),l=fe([]),u=fe(void 0),c=fe(void 0),d=fe((E,w)=>Fr(E,Xk[w])),h=fe(void 0),f=fe(0),g=Vk(),p=Cn(ue(n,Ge(l,e,f),ri(zk,g),_t()),g),m=Cn(ue(l,_t(),ri((E,w)=>({prev:E.current,current:w}),{prev:[],current:[]}),ve(({prev:E})=>E)),[]);_e(ue(l,Fe(E=>E.length>0),Ge(p,f),ve(([E,w,B])=>{const y=E.reduce((S,D,A)=>Jn(S,D,Nl(D,w.offsetTree,B)||A),ns());return{...w,groupIndices:E,groupOffsetTree:y}})),p),_e(ue(r,Ge(p),Fe(([E,{lastIndex:w}])=>E<w),ve(([E,{lastIndex:w,lastSize:B}])=>[{startIndex:E,endIndex:w,size:B}])),n),_e(u,c);const b=Cn(ue(u,ve(E=>E===void 0)),!0);_e(ue(c,Fe(E=>E!==void 0&&yt(xn(p).sizeTree)),ve(E=>[{startIndex:0,endIndex:0,size:E}])),n);const v=tr(ue(n,Ge(p),ri(({sizes:E},[w,B])=>({changed:B!==E,sizes:B}),{changed:!1,sizes:g}),ve(E=>E.changed)));mt(ue(s,ri((E,w)=>({diff:E.prev-w,prev:w}),{diff:0,prev:0}),ve(E=>E.diff)),E=>{const{groupIndices:w}=xn(p);if(E>0)We(t,!0),We(a,E+wb(E,w));else if(E<0){const B=xn(m);B.length>0&&(E-=wb(-E,B)),We(o,E)}}),mt(ue(s,Ge(e)),([E,w])=>{E<0&&w("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},nr.ERROR)});const x=tr(a);_e(ue(a,Ge(p),ve(([E,w])=>{const B=w.groupIndices.length>0,y=[],S=w.lastSize;if(B){const D=Fl(w.sizeTree,0);let A=0,T=0;for(;A<E;){const P=w.groupIndices[T],$=w.groupIndices.length===T+1?1/0:w.groupIndices[T+1]-P-1;y.push({startIndex:P,endIndex:P,size:D}),y.push({startIndex:P+1,endIndex:P+1+$-1,size:S}),T++,A+=$+1}const F=Qa(w.sizeTree);return A!==E&&F.shift(),F.reduce((P,{k:$,v:R})=>{let O=P.ranges;return P.prevSize!==0&&(O=[...P.ranges,{startIndex:P.prevIndex,endIndex:$+E-1,size:P.prevSize}]),{ranges:O,prevIndex:$+E,prevSize:R}},{ranges:y,prevIndex:E,prevSize:0}).ranges}return Qa(w.sizeTree).reduce((D,{k:A,v:T})=>({ranges:[...D.ranges,{startIndex:D.prevIndex,endIndex:A+E-1,size:D.prevSize}],prevIndex:A+E,prevSize:T}),{ranges:[],prevIndex:0,prevSize:S}).ranges})),n);const C=tr(ue(o,Ge(p,f),ve(([E,{offsetTree:w},B])=>{const y=-E;return Nl(y,w,B)})));return _e(ue(o,Ge(p,f),ve(([E,w,B])=>{if(w.groupIndices.length>0){if(yt(w.sizeTree))return w;let S=ns();const D=xn(m);let A=0,T=0,F=0;for(;A<-E;){F=D[T];const P=D[T+1]-F-1;T++,A+=P+1}if(S=Qa(w.sizeTree).reduce((P,{k:$,v:R})=>Jn(P,Math.max(0,$+E),R),S),A!==-E){const P=Fl(w.sizeTree,F);S=Jn(S,0,P);const $=Nr(w.sizeTree,-E+1)[1];S=Jn(S,1,$)}return{...w,sizeTree:S,...ig(w.offsetTree,0,S,B)}}else{const S=Qa(w.sizeTree).reduce((D,{k:A,v:T})=>Jn(D,Math.max(0,A+E),T),ns());return{...w,sizeTree:S,...ig(w.offsetTree,0,S,B)}}})),p),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:c,fixedItemSize:u,unshiftWith:a,shiftWith:o,shiftWithOffset:C,beforeUnshiftWith:x,firstItemIndex:s,gap:f,sizes:p,listRefresh:v,statefulTotalCount:i,trackItemSizes:b,itemSize:d}},Dt(Ra,Vp),{singleton:!0}),Zk=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function _2(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Zk)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const vu=lt(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:a,scrollTo:o,smoothScrollTargetReached:s,headerHeight:l,footerHeight:u,fixedHeaderHeight:c,fixedFooterHeight:d},{log:h}])=>{const f=tt(),g=tt(),p=fe(0);let m=null,b=null,v=null;function x(){m&&(m(),m=null),v&&(v(),v=null),b&&(clearTimeout(b),b=null),We(i,!1)}return _e(ue(f,Ge(e,a,t,p,l,u,h),Ge(r,c,d),ve(([[C,E,w,B,y,S,D,A],T,F,k])=>{const P=_2(C),{align:$,behavior:R,offset:O}=P,j=B-1,V=w2(P,E,j);let W=Nl(V,E.offsetTree,T)+S;$==="end"?(W+=F+Nr(E.sizeTree,V)[1]-w+k,V===j&&(W+=D)):$==="center"?W+=(F+Nr(E.sizeTree,V)[1]-w+k)/2:W-=y,O&&(W+=O);const U=K=>{x(),K?(A("retrying to scroll to",{location:C},nr.DEBUG),We(f,C)):(We(g,!0),A("list did not change, scroll successful",{},nr.DEBUG))};if(x(),R==="smooth"){let K=!1;v=mt(n,ee=>{K=K||ee}),m=di(s,()=>{U(K)})}else m=di(ue(n,Yk(150)),U);return b=setTimeout(()=>{x()},1200),We(i,!0),A("scrolling from index to",{index:V,top:W,behavior:R},nr.DEBUG),{top:W,behavior:R}})),o),{scrollToIndex:f,scrollTargetReached:g,topListHeight:p}},Dt(pi,$n,Ra),{singleton:!0});function Yk(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ml="up",ml="down",Kk="none",qk={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Jk=0,yu=lt(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:a}])=>{const o=fe(!1),s=fe(!0),l=tt(),u=tt(),c=fe(4),d=fe(Jk),h=Cn(ue(Eb(ue(Me(t),bs(1),qr(!0)),ue(Me(t),bs(1),qr(!1),Cb(100))),_t()),!1),f=Cn(ue(Eb(ue(a,qr(!0)),ue(a,qr(!1),Cb(200))),_t()),!1);_e(ue(sn(Me(t),Me(d)),ve(([v,x])=>v<=x),_t()),s),_e(ue(s,ua(50)),u);const g=tr(ue(sn(e,Me(n),Me(r),Me(i),Me(c)),ri((v,[{scrollTop:x,scrollHeight:C},E,w,B,y])=>{const S=x+E-C>-y,D={viewportHeight:E,scrollTop:x,scrollHeight:C};if(S){let T,F;return x>v.state.scrollTop?(T="SCROLLED_DOWN",F=v.state.scrollTop-x):(T="SIZE_DECREASED",F=v.state.scrollTop-x||v.scrollTopDelta),{atBottom:!0,state:D,atBottomBecause:T,scrollTopDelta:F}}let A;return D.scrollHeight>v.state.scrollHeight?A="SIZE_INCREASED":E<v.state.viewportHeight?A="VIEWPORT_HEIGHT_DECREASING":x<v.state.scrollTop?A="SCROLLING_UPWARDS":A="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:A,state:D}},qk),_t((v,x)=>v&&v.atBottom===x.atBottom))),p=Cn(ue(e,ri((v,{scrollTop:x,scrollHeight:C,viewportHeight:E})=>{if(m2(v.scrollHeight,C))return{scrollTop:x,scrollHeight:C,jump:0,changed:!1};{const w=C-(x+E)<1;return v.scrollTop!==x&&w?{scrollHeight:C,scrollTop:x,jump:v.scrollTop-x,changed:!0}:{scrollHeight:C,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Fe(v=>v.changed),ve(v=>v.jump)),0);_e(ue(g,ve(v=>v.atBottom)),o),_e(ue(o,ua(50)),l);const m=fe(ml);_e(ue(e,ve(({scrollTop:v})=>v),_t(),ri((v,x)=>xn(f)?{direction:v.direction,prevScrollTop:x}:{direction:x<v.prevScrollTop?Ml:ml,prevScrollTop:x},{direction:ml,prevScrollTop:0}),ve(v=>v.direction)),m),_e(ue(e,ua(50),qr(Kk)),m);const b=fe(0);return _e(ue(h,Fe(v=>!v),qr(0)),b),_e(ue(t,ua(100),Ge(h),Fe(([v,x])=>!!x),ri(([v,x],[C])=>[x,C],[0,0]),ve(([v,x])=>x-v)),b),{isScrolling:h,isAtTop:s,isAtBottom:o,atBottomState:g,atTopStateChange:u,atBottomStateChange:l,scrollDirection:m,atBottomThreshold:c,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:p}},Dt($n)),Ba=lt(([{log:e}])=>{const t=fe(!1),n=tr(ue(t,Fe(r=>r),_t()));return mt(t,r=>{r&&xn(e)("props updated",{},nr.DEBUG)}),{propsReady:t,didMount:n}},Dt(Ra),{singleton:!0});function jp(e,t){e==0?t():requestAnimationFrame(()=>jp(e-1,t))}function Wp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const xu=lt(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i,scrollTargetReached:a},{didMount:o}])=>{const s=fe(!0),l=fe(0),u=fe(!0);return _e(ue(o,Ge(l),Fe(([c,d])=>!!d),qr(!1)),s),_e(ue(o,Ge(l),Fe(([c,d])=>!!d),qr(!1)),u),mt(ue(sn(t,o),Ge(s,e,n,u),Fe(([[,c],d,{sizeTree:h},f,g])=>c&&(!yt(h)||Np(f))&&!d&&!g),Ge(l)),([,c])=>{di(a,()=>{We(u,!0)}),jp(4,()=>{di(r,()=>{We(s,!0)}),We(i,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l,initialItemFinalLocationReached:u}},Dt(pi,$n,vu,Ba),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const Qk=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),e7=lt(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:a},{propsReady:o,didMount:s},{log:l},{scrollingInProgress:u}])=>{const c=fe(!1),d=tt();let h=null;function f(p){We(i,{index:"LAST",align:"end",behavior:p})}mt(ue(sn(ue(Me(e),bs(1)),s),Ge(Me(c),n,a,u),ve(([[p,m],b,v,x,C])=>{let E=m&&x,w="auto";return E&&(w=Qk(b,v||C),E=E&&!!w),{totalCount:p,shouldFollow:E,followOutputBehavior:w}}),Fe(({shouldFollow:p})=>p)),({totalCount:p,followOutputBehavior:m})=>{h&&(h(),h=null),h=di(t,()=>{xn(l)("following output to ",{totalCount:p},nr.DEBUG),f(m),h=null})});function g(p){const m=di(r,b=>{p&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(xn(l)("scrolling to bottom due to increased size",{},nr.DEBUG),f("auto"))});setTimeout(m,100)}return mt(ue(sn(Me(c),e,o),Fe(([p,,m])=>p&&m),ri(({value:p},[,m])=>({refreshed:p===m,value:m}),{refreshed:!1,value:0}),Fe(({refreshed:p})=>p),Ge(c,e)),([,p])=>{xn(a)&&g(p!==!1)}),mt(d,()=>{g(xn(c)!==!1)}),mt(sn(Me(c),r),([p,m])=>{p&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:c,autoscrollToBottom:d}},Dt(pi,yu,vu,xu,Ba,Ra,$n));function t7(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const D2=lt(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const a=tt(),o=tt(),s=tr(ue(a,ve(t7)));return _e(ue(s,ve(l=>l.totalCount)),e),_e(ue(s,ve(l=>l.groupIndices)),t),_e(ue(sn(r,n,i),Fe(([l,u])=>Ef(u)),ve(([l,u,c])=>Nr(u.groupOffsetTree,Math.max(l-c,0),"v")[0]),_t(),ve(l=>[l])),o),{groupCounts:a,topItemsIndexes:o}},Dt(pi,$n));function Ll(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function A2(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const xd="top",Cd="bottom",_b="none";function Db(e,t,n){return typeof e=="number"?n===Ml&&t===xd||n===ml&&t===Cd?e:0:n===Ml?t===xd?e.main:e.reverse:t===Cd?e.main:e.reverse}function Ab(e,t){return typeof e=="number"?e:e[t]||0}const zp=lt(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const a=tt(),o=fe(0),s=fe(0),l=fe(0),u=Cn(ue(sn(Me(e),Me(t),Me(r),Me(a,Ll),Me(l),Me(o),Me(i),Me(n),Me(s)),ve(([c,d,h,[f,g],p,m,b,v,x])=>{const C=c-v,E=m+b,w=Math.max(h-C,0);let B=_b;const y=Ab(x,xd),S=Ab(x,Cd);return f-=v,f+=h+b,g+=h+b,g-=v,f>c+E-y&&(B=Ml),g<c-w+d+S&&(B=ml),B!==_b?[Math.max(C-h-Db(p,xd,B)-y,0),C-w-b+d+Db(p,Cd,B)+S]:null}),Fe(c=>c!=null),_t(Ll)),[0,0]);return{listBoundary:a,overscan:l,topListHeight:o,increaseViewportBy:s,visibleRange:u}},Dt($n),{singleton:!0});function n7(e,t,n){if(Ef(t)){const r=I2(e,t);return[{index:Nr(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const ph={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Tb(e,t,n){if(e.length===0)return[];if(!Ef(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,a=[],o=Cf(t.groupOffsetTree,r,i);let s,l=0;for(const u of e){(!s||s.end<u.index)&&(s=o.shift(),l=t.groupIndices.indexOf(s.start));let c;u.index===s.start?c={type:"group",index:l}:c={index:u.index-(l+1)+n,groupIndex:l},a.push({...c,size:u.size,offset:u.offset,originalIndex:u.index,data:u.data})}return a}function kc(e,t,n,r,i,a){const{lastSize:o,lastOffset:s,lastIndex:l}=i;let u=0,c=0;if(e.length>0){u=e[0].offset;const p=e[e.length-1];c=p.offset+p.size}const d=n-l,h=s+d*o+(d-1)*r,f=u,g=h-c;return{items:Tb(e,i,a),topItems:Tb(t,i,a),topListHeight:t.reduce((p,m)=>m.size+p,0),offsetTop:u,offsetBottom:g,top:f,bottom:c,totalCount:n,firstItemIndex:a}}function T2(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(const c of n.groupIndices){if(c-o>=e)break;o++}const s=e+o,l=Wp(t,s),u=Array.from({length:s}).map((c,d)=>({index:d+l,size:0,offset:0,data:a[d+l]}));return kc(u,[],s,i,n,r)}const Io=lt(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},a,{visibleRange:o,listBoundary:s,topListHeight:l},{scrolledToInitialItem:u,initialTopMostItemIndex:c},{topListHeight:d},h,{didMount:f},{recalcInProgress:g}])=>{const p=fe([]),m=fe(0),b=tt();_e(a.topItemsIndexes,p);const v=Cn(ue(sn(f,g,Me(o,Ll),Me(t),Me(e),Me(c),u,Me(p),Me(r),Me(i),n),Fe(([w,B,,y,,,,,,,S])=>{const D=S&&S.length!==y;return w&&!B&&!D}),ve(([,,[w,B],y,S,D,A,T,F,k,P])=>{const $=S,{sizeTree:R,offsetTree:O}=$,j=xn(m);if(y===0)return{...ph,totalCount:y};if(w===0&&B===0)return j===0?{...ph,totalCount:y}:T2(j,D,S,F,k,P||[]);if(yt(R))return j>0?null:kc(n7(Wp(D,y),$,P),[],y,k,$,F);const V=[];if(T.length>0){const z=T[0],H=T[T.length-1];let X=0;for(const te of Cf(R,z,H)){const ie=te.value,le=Math.max(te.start,z),ce=Math.min(te.end,H);for(let Q=le;Q<=ce;Q++)V.push({index:Q,size:ie,offset:X,data:P&&P[Q]}),X+=ie}}if(!A)return kc([],V,y,k,$,F);const W=T.length>0?T[T.length-1]+1:0,U=Wk(O,w,B,W);if(U.length===0)return null;const K=y-1,ee=xf([],z=>{for(const H of U){const X=H.value;let te=X.offset,ie=H.start;const le=X.size;if(X.offset<w){ie+=Math.floor((w-X.offset+k)/(le+k));const Q=ie-H.start;te+=Q*le+Q*k}ie<W&&(te+=(W-ie)*le,ie=W);const ce=Math.min(H.end,K);for(let Q=ie;Q<=ce&&!(te>=B);Q++)z.push({index:Q,size:le,offset:te,data:P&&P[Q]}),te+=le+k}});return kc(ee,V,y,k,$,F)}),Fe(w=>w!==null),_t()),ph);_e(ue(n,Fe(Np),ve(w=>w==null?void 0:w.length)),t),_e(ue(v,ve(w=>w.topListHeight)),d),_e(d,l),_e(ue(v,ve(w=>[w.top,w.bottom])),s),_e(ue(v,ve(w=>w.items)),b);const x=tr(ue(v,Fe(({items:w})=>w.length>0),Ge(t,n),Fe(([{items:w},B])=>w[w.length-1].originalIndex===B-1),ve(([,w,B])=>[w-1,B]),_t(Ll),ve(([w])=>w))),C=tr(ue(v,ua(200),Fe(({items:w,topItems:B})=>w.length>0&&w[0].originalIndex===B.length),ve(({items:w})=>w[0].index),_t())),E=tr(ue(v,Fe(({items:w})=>w.length>0),ve(({items:w})=>{let B=0,y=w.length-1;for(;w[B].type==="group"&&B<y;)B++;for(;w[y].type==="group"&&y>B;)y--;return{startIndex:w[B].index,endIndex:w[y].index}}),_t(A2)));return{listState:v,topItemsIndexes:p,endReached:x,startReached:C,rangeChanged:E,itemsRendered:b,initialItemCount:m,...h}},Dt(pi,D2,zp,xu,vu,yu,Ba,Vp),{singleton:!0}),r7=lt(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(_e(ue(s,Ge(a),Fe(([,l])=>l!==0),Ge(i,e,t,r,n),ve(([[,l],u,c,d,h,f=[]])=>T2(l,u,c,d,h,f))),o),{}),Dt(pi,xu,Io,Ba),{singleton:!0}),R2=lt(([{scrollVelocity:e}])=>{const t=fe(!1),n=tt(),r=fe(!1);return _e(ue(e,Ge(r,t,n),Fe(([i,a])=>!!a),ve(([i,a,o,s])=>{const{exit:l,enter:u}=a;if(o){if(l(i,s))return!1}else if(u(i,s))return!0;return o}),_t()),t),mt(ue(sn(t,e,n),Ge(r)),([[i,a,o],s])=>i&&s&&s.change&&s.change(a,o)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Dt(yu),{singleton:!0}),i7=lt(([{topItemsIndexes:e}])=>{const t=fe(0);return _e(ue(t,Fe(n=>n>0),ve(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},Dt(Io)),B2=lt(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const a=tt(),o=Cn(ue(sn(e,r,t,n,i),ve(([s,l,u,c,d])=>s+l+u+c+d.offsetBottom+d.bottom)),0);return _e(Me(o),a),{totalListHeight:o,totalListHeightChanged:a}},Dt($n,Io),{singleton:!0});function $2(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const a7=$2(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),o7=lt(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:a,scrollDirection:o,lastJumpDueToItemResize:s},{listState:l},{beforeUnshiftWith:u,shiftWithOffset:c,sizes:d,gap:h},{log:f},{recalcInProgress:g}])=>{const p=tr(ue(l,Ge(s),ri(([,b,v,x],[{items:C,totalCount:E,bottom:w,offsetBottom:B},y])=>{const S=w+B;let D=0;return v===E&&b.length>0&&C.length>0&&(C[0].originalIndex===0&&b[0].originalIndex===0||(D=S-x,D!==0&&(D+=y))),[D,C,E,S]},[0,[],0,0]),Fe(([b])=>b!==0),Ge(t,o,r,a,f,g),Fe(([,b,v,x,,,C])=>!C&&!x&&b!==0&&v===Ml),ve(([[b],,,,,v])=>(v("Upward scrolling compensation",{amount:b},nr.DEBUG),b))));function m(b){b>0?(We(e,{top:-b,behavior:"auto"}),We(n,0)):(We(n,0),We(e,{top:-b,behavior:"auto"}))}return mt(ue(p,Ge(n,i)),([b,v,x])=>{x&&a7()?We(n,v-b):m(-b)}),mt(ue(sn(Cn(i,!1),n,g),Fe(([b,v,x])=>!b&&!x&&v!==0),ve(([b,v])=>v),ua(1)),m),_e(ue(c,ve(b=>({top:-b}))),e),mt(ue(u,Ge(d,h),ve(([b,{lastSize:v,groupIndices:x,sizeTree:C},E])=>{function w(B){return B*(v+E)}if(x.length===0)return w(b);{let B=0;const y=Fl(C,0);let S=0,D=0;for(;S<b;){S++,B+=y;let A=x.length===D+1?1/0:x[D+1]-x[D]-1;S+A>b&&(B-=y,A=b-S+1),S+=A,B+=w(A),D++}return B}})),b=>{We(n,b),requestAnimationFrame(()=>{We(e,{top:b}),requestAnimationFrame(()=>{We(n,0),We(g,!1)})})}),{deviation:n}},Dt($n,yu,Io,pi,Ra,Vp)),s7=lt(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=fe(0);return mt(ue(e,Ge(r),Fe(([,i])=>i!==0),ve(([,i])=>({top:i}))),i=>{di(ue(n,bs(1),Fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{We(t,i)})})}),{initialScrollTop:r}},Dt(Ba,$n,Io),{singleton:!0}),l7=lt(([{viewportHeight:e},{totalListHeight:t}])=>{const n=fe(!1),r=Cn(ue(sn(n,e,t),Fe(([i])=>i),ve(([,i,a])=>Math.max(0,i-a)),ua(0),_t()),0);return{alignToBottom:n,paddingTopAddition:r}},Dt($n,B2),{singleton:!0}),Gp=lt(([{scrollTo:e,scrollContainerState:t}])=>{const n=tt(),r=tt(),i=tt(),a=fe(!1),o=fe(void 0);return _e(ue(sn(n,r),ve(([{viewportHeight:s,scrollTop:l,scrollHeight:u},{offsetTop:c}])=>({scrollTop:Math.max(0,l-c),scrollHeight:u,viewportHeight:s}))),t),_e(ue(e,Ge(r),ve(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{useWindowScroll:a,customScrollParent:o,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},Dt($n)),u7=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:a,...o}})=>e<n?{...o,behavior:i,align:a??"start"}:t>r?{...o,behavior:i,align:a??"end"}:null,c7=lt(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:a,fixedHeaderHeight:o,fixedFooterHeight:s,scrollingInProgress:l},{scrollToIndex:u}])=>{const c=tt();return _e(ue(c,Ge(e,i,t,a,o,s,r),Ge(n),ve(([[d,h,f,g,p,m,b,v],x])=>{const{done:C,behavior:E,align:w,calculateViewLocation:B=u7,...y}=d,S=w2(d,h,g-1),D=Nl(S,h.offsetTree,x)+p+m,A=D+Nr(h.sizeTree,S)[1],T=v+m,F=v+f-b,k=B({itemTop:D,itemBottom:A,viewportTop:T,viewportBottom:F,locationParams:{behavior:E,align:w,...y}});return k?C&&di(ue(l,Fe(P=>P===!1),bs(xn(l)?1:2)),C):C&&C(),k}),Fe(d=>d!==null)),u),{scrollIntoView:c}},Dt(pi,$n,vu,Io,Ra),{singleton:!0}),d7=lt(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:a,windowScrollContainerState:o,windowViewportRect:s}])=>{const l=tt(),u=fe(void 0),c=fe(null),d=fe(null);return _e(o,c),_e(s,d),mt(ue(l,Ge(e,n,a,c,d)),([h,f,g,p,m,b])=>{const v=Uk(f.sizeTree);p&&m!==null&&b!==null&&(g=m.scrollTop-b.offsetTop),h({ranges:v,scrollTop:g})}),_e(ue(u,Fe(Np),ve(f7)),r),_e(ue(i,Ge(u),Fe(([,h])=>h!==void 0),_t(),ve(([,h])=>h.ranges)),t),{getState:l,restoreStateFrom:u}},Dt(pi,$n,xu,Ba,Gp));function f7(e){return{offset:e.scrollTop,index:0,align:"start"}}const h7=lt(([e,t,n,r,i,a,o,s,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...l,...u}),Dt(zp,r7,Ba,R2,B2,s7,l7,Gp,c7,Ra)),k2=lt(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:a,data:o,firstItemIndex:s,groupIndices:l,statefulTotalCount:u,gap:c,sizes:d},{initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:g},p,m,b,{listState:v,topItemsIndexes:x,...C},{scrollToIndex:E},w,{topItemCount:B},{groupCounts:y},S])=>(_e(C.rangeChanged,S.scrollSeekRangeChanged),_e(ue(S.windowViewportRect,ve(D=>D.visibleHeight)),p.viewportHeight),{totalCount:e,data:o,firstItemIndex:s,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:g,topItemsIndexes:x,topItemCount:B,groupCounts:y,fixedItemHeight:n,defaultItemHeight:r,gap:c,...b,statefulTotalCount:u,listState:v,scrollToIndex:E,trackItemSizes:i,itemSize:a,groupIndices:l,...C,...S,...p,sizes:d,...m}),Dt(pi,xu,$n,d7,e7,Io,vu,o7,i7,D2,h7)),mh="-webkit-sticky",Rb="sticky",P2=$2(()=>{if(typeof document>"u")return Rb;const e=document.createElement("div");return e.style.position=mh,e.style.position===mh?mh:Rb});function Up(e,t){const n=I.useRef(null),r=I.useCallback(s=>{if(s===null||!s.offsetParent)return;const l=s.getBoundingClientRect(),u=l.width;let c,d;if(t){const h=t.getBoundingClientRect(),f=l.top-h.top;c=h.height-Math.max(0,f),d=f+t.scrollTop}else c=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:c,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:i,ref:a}=Op(r),o=I.useCallback(()=>{r(a.current)},[r,a]);return I.useEffect(()=>{if(t){t.addEventListener("scroll",o);const s=new ResizeObserver(()=>{requestAnimationFrame(o)});return s.observe(t),()=>{t.removeEventListener("scroll",o),s.unobserve(t)}}else return window.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[o,t]),i}const Sf=I.createContext(void 0),F2=I.createContext(void 0);function Xp(e){return e}const g7=lt(()=>{const e=fe(l=>`Item ${l}`),t=fe(null),n=fe(l=>`Group ${l}`),r=fe({}),i=fe(Xp),a=fe("div"),o=fe(wo),s=(l,u=null)=>Cn(ue(r,ve(c=>c[l]),_t()),u);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:a,scrollerRef:o,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),p7=lt(([e,t])=>({...e,...t}),Dt(k2,g7)),m7=({height:e})=>I.createElement("div",{style:{height:e}}),b7={position:P2(),zIndex:1,overflowAnchor:"none"},v7={overflowAnchor:"none"},Bb=I.memo(function({showTopList:t=!1}){const n=Ke("listState"),r=xr("sizeRanges"),i=Ke("useWindowScroll"),a=Ke("customScrollParent"),o=xr("windowScrollContainerState"),s=xr("scrollContainerState"),l=a||i?o:s,u=Ke("itemContent"),c=Ke("context"),d=Ke("groupContent"),h=Ke("trackItemSizes"),f=Ke("itemSize"),g=Ke("log"),p=xr("gap"),{callbackRef:m}=p2(r,f,h,t?wo:l,g,p,a),[b,v]=I.useState(0);Kp("deviation",k=>{b!==k&&v(k)});const x=Ke("EmptyPlaceholder"),C=Ke("ScrollSeekPlaceholder")||m7,E=Ke("ListComponent"),w=Ke("ItemComponent"),B=Ke("GroupComponent"),y=Ke("computeItemKey"),S=Ke("isSeeking"),D=Ke("groupIndices").length>0,A=Ke("alignToBottom"),T=Ke("initialItemFinalLocationReached"),F=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:A?"auto":0,...T?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?I.createElement(x,Ft(x,c)):I.createElement(E,{...Ft(E,c),ref:m,style:F,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const P=k.originalIndex,$=y(P+n.firstItemIndex,k.data,c);return S?I.createElement(C,{...Ft(C,c),key:$,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?I.createElement(B,{...Ft(B,c),key:$,"data-index":P,"data-known-size":k.size,"data-item-index":k.index,style:b7},d(k.index,c)):I.createElement(w,{...Ft(w,c),...N2(w,k.data),key:$,"data-index":P,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:v7},D?u(k.index,k.groupIndex,k.data,c):u(k.index,k.data,c))}))}),y7={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$s=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),x7={width:"100%",position:P2(),top:0,zIndex:1};function Ft(e,t){if(typeof e!="string")return{context:t}}function N2(e,t){return{item:typeof e=="string"?void 0:t}}const C7=I.memo(function(){const t=Ke("HeaderComponent"),n=xr("headerHeight"),r=Ke("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Ke("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),E7=I.memo(function(){const t=Ke("FooterComponent"),n=xr("footerHeight"),r=Ke("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=Ke("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null});function Zp({usePublisher:e,useEmitter:t,useEmitterValue:n}){return I.memo(function({style:a,children:o,...s}){const l=e("scrollContainerState"),u=n("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=n("scrollerRef"),h=n("context"),{scrollerRef:f,scrollByCallback:g,scrollToCallback:p}=b2(l,c,u,d);return t("scrollTo",p),t("scrollBy",g),I.createElement(u,{ref:f,style:{...y7,...a},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...s,...Ft(u,h)},o)})}function Yp({usePublisher:e,useEmitter:t,useEmitterValue:n}){return I.memo(function({style:a,children:o,...s}){const l=e("windowScrollContainerState"),u=n("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=n("totalListHeight"),h=n("deviation"),f=n("customScrollParent"),g=n("context"),{scrollerRef:p,scrollByCallback:m,scrollToCallback:b}=b2(l,c,u,wo,f);return Bk(()=>(p.current=f||window,()=>{p.current=null}),[p,f]),t("windowScrollTo",b),t("scrollBy",m),I.createElement(u,{style:{position:"relative",...a,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...s,...Ft(u,g)},o)})}const S7=({children:e})=>{const t=I.useContext(Sf),n=xr("viewportHeight"),r=xr("fixedItemHeight"),i=Ke("alignToBottom"),a=fi(kl(n,o=>Fr(o,"height")));return I.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),I.createElement("div",{style:$s(i),ref:a,"data-viewport-type":"element"},e)},w7=({children:e})=>{const t=I.useContext(Sf),n=xr("windowViewportRect"),r=xr("fixedItemHeight"),i=Ke("customScrollParent"),a=Up(n,i),o=Ke("alignToBottom");return I.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(o),"data-viewport-type":"window"},e)},I7=({children:e})=>{const t=Ke("TopItemListComponent")||"div",n=Ke("headerHeight"),r={...x7,marginTop:`${n}px`},i=Ke("context");return I.createElement(t,{style:r,...Ft(t,i)},e)},_7=I.memo(function(t){const n=Ke("useWindowScroll"),r=Ke("topItemsIndexes").length>0,i=Ke("customScrollParent"),a=i||n?T7:A7,o=i||n?w7:S7;return I.createElement(a,{...t},r&&I.createElement(I7,null,I.createElement(Bb,{showTopList:!0})),I.createElement(o,null,I.createElement(C7,null),I.createElement(Bb,null),I.createElement(E7,null)))}),{Component:D7,usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}=Lp(p7,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_7),A7=Zp({usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}),T7=Yp({usePublisher:xr,useEmitterValue:Ke,useEmitter:Kp}),R7=D7,$b={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},B7={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:kb,ceil:Pb,floor:Ed,min:bh,max:bl}=Math;function $7(e){return{...B7,items:e}}function Fb(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const a=n===null?null:n[i+e];return{index:i+e,data:a}})}function k7(e,t){return e&&e.column===t.column&&e.row===t.row}function Gu(e,t){return e&&e.width===t.width&&e.height===t.height}const P7=lt(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:a,scrollTo:o,smoothScrollTargetReached:s,scrollContainerState:l,footerHeight:u,headerHeight:c},d,h,{propsReady:f,didMount:g},{windowViewportRect:p,useWindowScroll:m,customScrollParent:b,windowScrollContainerState:v,windowScrollTo:x},C])=>{const E=fe(0),w=fe(0),B=fe($b),y=fe({height:0,width:0}),S=fe({height:0,width:0}),D=tt(),A=tt(),T=fe(0),F=fe(null),k=fe({row:0,column:0}),P=tt(),$=tt(),R=fe(!1),O=fe(0),j=fe(!0),V=fe(!1);mt(ue(g,Ge(O),Fe(([H,X])=>!!X)),()=>{We(j,!1),We(w,0)}),mt(ue(sn(g,j,S,y,O,V),Fe(([H,X,te,ie,,le])=>H&&!X&&te.height!==0&&ie.height!==0&&!le)),([,,,,H])=>{We(V,!0),jp(1,()=>{We(D,H)}),di(ue(r),()=>{We(n,[0,0]),We(j,!0)})}),_e(ue($,Fe(H=>H!=null&&H.scrollTop>0),qr(0)),w),mt(ue(g,Ge($),Fe(([,H])=>H!=null)),([,H])=>{H&&(We(y,H.viewport),We(S,H==null?void 0:H.item),We(k,H.gap),H.scrollTop>0&&(We(R,!0),di(ue(r,bs(1)),X=>{We(R,!1)}),We(o,{top:H.scrollTop})))}),_e(ue(y,ve(({height:H})=>H)),i),_e(ue(sn(Me(y,Gu),Me(S,Gu),Me(k,(H,X)=>H&&H.column===X.column&&H.row===X.row),Me(r)),ve(([H,X,te,ie])=>({viewport:H,item:X,gap:te,scrollTop:ie}))),P),_e(ue(sn(Me(E),t,Me(k,k7),Me(S,Gu),Me(y,Gu),Me(F),Me(w),Me(R),Me(j),Me(O)),Fe(([,,,,,,,H])=>!H),ve(([H,[X,te],ie,le,ce,Q,be,,Ce,Se])=>{const{row:un,column:ye}=ie,{height:Ee,width:He}=le,{width:bt}=ce;if(be===0&&(H===0||bt===0))return $b;if(He===0){const Gf=Wp(Se,H),vI=Gf===0?Math.max(be-1,0):Gf;return $7(Fb(Gf,vI,Q))}const Yt=M2(bt,He,ye);let at,Qe;Ce?X===0&&te===0&&be>0?(at=0,Qe=be-1):(at=Yt*Ed((X+un)/(Ee+un)),Qe=Yt*Pb((te+un)/(Ee+un))-1,Qe=bh(H-1,bl(Qe,Yt-1)),at=bh(Qe,bl(0,at))):(at=0,Qe=-1);const or=Fb(at,Qe,Q),{top:wr,bottom:Ir}=Nb(ce,ie,le,or),Ro=Pb(H/Yt),bI=Ro*Ee+(Ro-1)*un-Ir;return{items:or,offsetTop:wr,offsetBottom:bI,top:wr,bottom:Ir,itemHeight:Ee,itemWidth:He}})),B),_e(ue(F,Fe(H=>H!==null),ve(H=>H.length)),E),_e(ue(sn(y,S,B,k),Fe(([H,X,{items:te}])=>te.length>0&&X.height!==0&&H.height!==0),ve(([H,X,{items:te},ie])=>{const{top:le,bottom:ce}=Nb(H,ie,X,te);return[le,ce]}),_t(Ll)),n);const W=fe(!1);_e(ue(r,Ge(W),ve(([H,X])=>X||H!==0)),W);const U=tr(ue(Me(B),Fe(({items:H})=>H.length>0),Ge(E,W),Fe(([{items:H},X,te])=>te&&H[H.length-1].index===X-1),ve(([,H])=>H-1),_t())),K=tr(ue(Me(B),Fe(({items:H})=>H.length>0&&H[0].index===0),qr(0),_t())),ee=tr(ue(Me(B),Ge(R),Fe(([{items:H},X])=>H.length>0&&!X),ve(([{items:H}])=>({startIndex:H[0].index,endIndex:H[H.length-1].index})),_t(A2),ua(0)));_e(ee,h.scrollSeekRangeChanged),_e(ue(D,Ge(y,S,E,k),ve(([H,X,te,ie,le])=>{const ce=_2(H),{align:Q,behavior:be,offset:Ce}=ce;let Se=ce.index;Se==="LAST"&&(Se=ie-1),Se=bl(0,Se,bh(ie-1,Se));let un=ag(X,le,te,Se);return Q==="end"?un=kb(un-X.height+te.height):Q==="center"&&(un=kb(un-X.height/2+te.height/2)),Ce&&(un+=Ce),{top:un,behavior:be}})),o);const z=Cn(ue(B,ve(H=>H.offsetBottom+H.bottom)),0);return _e(ue(p,ve(H=>({width:H.visibleWidth,height:H.visibleHeight}))),y),{data:F,totalCount:E,viewportDimensions:y,itemDimensions:S,scrollTop:r,scrollHeight:A,overscan:e,scrollBy:a,scrollTo:o,scrollToIndex:D,smoothScrollTargetReached:s,windowViewportRect:p,windowScrollTo:x,useWindowScroll:m,customScrollParent:b,windowScrollContainerState:v,deviation:T,scrollContainerState:l,footerHeight:u,headerHeight:c,initialItemCount:w,gap:k,restoreStateFrom:$,...h,initialTopMostItemIndex:O,gridState:B,totalListHeight:z,...d,startReached:K,endReached:U,rangeChanged:ee,stateChanged:P,propsReady:f,stateRestoreInProgress:R,...C}},Dt(zp,$n,yu,R2,Ba,Gp,Ra));function Nb(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const a=ag(e,t,n,r[0].index),o=ag(e,t,n,r[r.length-1].index)+i;return{top:a,bottom:o}}function ag(e,t,n,r){const i=M2(e.width,n.width,t.column),a=Ed(r/i),o=a*n.height+bl(0,a-1)*t.row;return o>0?o+t.row:o}function M2(e,t,n){return bl(1,Ed((e+n)/(Ed(t)+n)))}const F7=lt(()=>{const e=fe(u=>`Item ${u}`),t=fe({}),n=fe(null),r=fe("virtuoso-grid-item"),i=fe("virtuoso-grid-list"),a=fe(Xp),o=fe("div"),s=fe(wo),l=(u,c=null)=>Cn(ue(t,ve(d=>d[u]),_t()),c);return{context:n,itemContent:e,components:t,computeItemKey:a,itemClassName:r,listClassName:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),N7=lt(([e,t])=>({...e,...t}),Dt(P7,F7)),M7=I.memo(function(){const t=$t("gridState"),n=$t("listClassName"),r=$t("itemClassName"),i=$t("itemContent"),a=$t("computeItemKey"),o=$t("isSeeking"),s=kr("scrollHeight"),l=$t("ItemComponent"),u=$t("ListComponent"),c=$t("ScrollSeekPlaceholder"),d=$t("context"),h=kr("itemDimensions"),f=kr("gap"),g=$t("log"),p=$t("stateRestoreInProgress"),m=fi(b=>{const v=b.parentElement.parentElement.scrollHeight;s(v);const x=b.firstChild;if(x){const{width:C,height:E}=x.getBoundingClientRect();h({width:C,height:E})}f({row:Mb("row-gap",getComputedStyle(b).rowGap,g),column:Mb("column-gap",getComputedStyle(b).columnGap,g)})});return p?null:I.createElement(u,{ref:m,className:n,...Ft(u,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const v=a(b.index,b.data,d);return o?I.createElement(c,{key:v,...Ft(c,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):I.createElement(l,{...Ft(l,d),className:r,"data-index":b.index,key:v},i(b.index,b.data,d))}))}),L7=I.memo(function(){const t=$t("HeaderComponent"),n=kr("headerHeight"),r=$t("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=$t("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),O7=I.memo(function(){const t=$t("FooterComponent"),n=kr("footerHeight"),r=$t("headerFooterTag"),i=fi(o=>n(Fr(o,"height"))),a=$t("context");return t?I.createElement(r,{ref:i},I.createElement(t,Ft(t,a))):null}),V7=({children:e})=>{const t=I.useContext(F2),n=kr("itemDimensions"),r=kr("viewportDimensions"),i=fi(a=>{r(a.getBoundingClientRect())});return I.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),I.createElement("div",{style:$s(!1),ref:i},e)},H7=({children:e})=>{const t=I.useContext(F2),n=kr("windowViewportRect"),r=kr("itemDimensions"),i=$t("customScrollParent"),a=Up(n,i);return I.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(!1)},e)},j7=I.memo(function({...t}){const n=$t("useWindowScroll"),r=$t("customScrollParent"),i=r||n?z7:W7,a=r||n?H7:V7;return I.createElement(i,{...t},I.createElement(a,null,I.createElement(L7,null),I.createElement(M7,null),I.createElement(O7,null)))}),{usePublisher:kr,useEmitterValue:$t,useEmitter:L2}=Lp(N7,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},j7),W7=Zp({usePublisher:kr,useEmitterValue:$t,useEmitter:L2}),z7=Yp({usePublisher:kr,useEmitterValue:$t,useEmitter:L2});function Mb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}const G7=lt(()=>{const e=fe(l=>I.createElement("td",null,"Item $",l)),t=fe(null),n=fe(null),r=fe(null),i=fe({}),a=fe(Xp),o=fe(wo),s=(l,u=null)=>Cn(ue(i,ve(c=>c[l]),_t()),u);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:i,computeItemKey:a,scrollerRef:o,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableFooterComponent:s("TableFoot","tfoot"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),FillerRow:s("FillerRow")}}),U7=lt(([e,t])=>({...e,...t}),Dt(k2,G7)),X7=({height:e})=>I.createElement("tr",null,I.createElement("td",{style:{height:e}})),Z7=({height:e})=>I.createElement("tr",null,I.createElement("td",{style:{height:e,padding:0,border:0}})),Y7={overflowAnchor:"none"},K7=I.memo(function(){const t=ht("listState"),n=Pr("sizeRanges"),r=ht("useWindowScroll"),i=ht("customScrollParent"),a=Pr("windowScrollContainerState"),o=Pr("scrollContainerState"),s=i||r?a:o,l=ht("itemContent"),u=ht("trackItemSizes"),c=ht("itemSize"),d=ht("log"),{callbackRef:h,ref:f}=p2(n,c,u,s,d,void 0,i),[g,p]=I.useState(0);qp("deviation",$=>{g!==$&&(f.current.style.marginTop=`${$}px`,p($))});const m=ht("EmptyPlaceholder"),b=ht("ScrollSeekPlaceholder")||X7,v=ht("FillerRow")||Z7,x=ht("TableBodyComponent"),C=ht("TableRowComponent"),E=ht("computeItemKey"),w=ht("isSeeking"),B=ht("paddingTopAddition"),y=ht("firstItemIndex"),S=ht("statefulTotalCount"),D=ht("context");if(S===0&&m)return I.createElement(m,Ft(m,D));const A=t.offsetTop+B+g,T=t.offsetBottom,F=A>0?I.createElement(v,{height:A,key:"padding-top",context:D}):null,k=T>0?I.createElement(v,{height:T,key:"padding-bottom",context:D}):null,P=t.items.map($=>{const R=$.originalIndex,O=E(R+y,$.data,D);return w?I.createElement(b,{...Ft(b,D),key:O,index:$.index,height:$.size,type:$.type||"item"}):I.createElement(C,{...Ft(C,D),...N2(C,$.data),key:O,"data-index":R,"data-known-size":$.size,"data-item-index":$.index,style:Y7},l($.index,$.data,D))});return I.createElement(x,{ref:h,"data-testid":"virtuoso-item-list",...Ft(x,D)},[F,...P,k])}),q7=({children:e})=>{const t=I.useContext(Sf),n=Pr("viewportHeight"),r=Pr("fixedItemHeight"),i=fi(kl(n,a=>Fr(a,"height")));return I.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),I.createElement("div",{style:$s(!1),ref:i,"data-viewport-type":"element"},e)},J7=({children:e})=>{const t=I.useContext(Sf),n=Pr("windowViewportRect"),r=Pr("fixedItemHeight"),i=ht("customScrollParent"),a=Up(n,i);return I.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),I.createElement("div",{ref:a,style:$s(!1),"data-viewport-type":"window"},e)},Q7=I.memo(function(t){const n=ht("useWindowScroll"),r=ht("customScrollParent"),i=Pr("fixedHeaderHeight"),a=Pr("fixedFooterHeight"),o=ht("fixedHeaderContent"),s=ht("fixedFooterContent"),l=ht("context"),u=fi(kl(i,v=>Fr(v,"height"))),c=fi(kl(a,v=>Fr(v,"height"))),d=r||n?nP:tP,h=r||n?J7:q7,f=ht("TableComponent"),g=ht("TableHeadComponent"),p=ht("TableFooterComponent"),m=o?I.createElement(g,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:u,...Ft(g,l)},o()):null,b=s?I.createElement(p,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:c,...Ft(p,l)},s()):null;return I.createElement(d,{...t},I.createElement(h,null,I.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...Ft(f,l)},[m,I.createElement(K7,{key:"TableBody"}),b])))}),{Component:eP,usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}=Lp(U7,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Q7),tP=Zp({usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}),nP=Yp({usePublisher:Pr,useEmitterValue:ht,useEmitter:qp}),rP=eP,iP=({children:e,...t})=>_.jsx(_.Fragment,{children:e(t)}),aP=({children:e,...t})=>_.jsx(_.Fragment,{children:I.isValidElement(e)&&_.jsx(_.Fragment,{children:I.cloneElement(e,t)})}),Jp=I.forwardRef((e,t)=>{const{classNameContainer:n="",computeItemKey:r=()=>"",itemSize:i=()=>0,totalCount:a=0,typeHight:o="min-max",minHeightItem:s=0,maxHeightTable:l=0,minLengthItem:u=0,fixedHeaderContent:c,itemContent:d,typeCalculateItemSize:h="manual",itemSizeNames:f=[],overscan:g=null,component:p={},idContainer:m="",triggerCalCulateContainer:b="",accumulationHeight:v=0,delayTriggerCalculateHeight:x=0,increaseViewportBy:C=()=>0,context:E={},endReached:w,increaseTotalCount:B=1}=e,[y,S]=I.useState(0),D=()=>{if(o==="min-max"){const F=(a+B)*s;return{height:a>u?l:y>F?y:F}}return o==="container"?{height:y}:{}},A=F=>{var $;const k=F.getAttribute("data-index");let P=(($=F.getBoundingClientRect())==null?void 0:$.height)||0;return f==null||f.forEach(R=>{var O,j;P+=((j=(O=document.querySelector(`[${R}="${k}"]`))==null?void 0:O.getBoundingClientRect())==null?void 0:j.height)??0}),P},T=()=>{var F;if(m&&o==="container"){const k=((F=document==null?void 0:document.getElementById(m))==null?void 0:F.offsetHeight)??0;S(k-v)}};return I.useEffect(()=>{const F=setTimeout(T,x);return window==null||window.addEventListener("resize",T),window==null||window.addEventListener("load",T),()=>{clearTimeout(F),window==null||window.removeEventListener("resize",T),window==null||window.removeEventListener("load",T)}},[o,b]),_.jsx("div",{className:`1ru-w-full ${n}`,children:_.jsx(rP,{context:E,ref:t,overscan:typeof g=="function"?g(o==="container"?y:l):o==="container"?y:l,totalListHeightChanged:F=>o==="min-max"?S(F):null,style:D(),totalCount:a,computeItemKey:r,itemSize:I.useCallback(F=>h==="manual"?i(F):A(F),[]),components:{TableRow:aP,...p},fixedHeaderContent:c,itemContent:(...F)=>d(iP,...F),endReached:w,increaseViewportBy:C(o==="container"?y:l)})})});Jp.displayName="TableVirtualization";const oP="_sorting_1a30n_536",en={"payhere-reguler":"_payhere-reguler_1a30n_109","laba-reguler":"_laba-reguler_1a30n_259","laba-rounded-md-extra-small":"_laba-rounded-md-extra-small_1a30n_259","laba-small_body-small":"_laba-small_body-small_1a30n_295","laba-small":"_laba-small_1a30n_295","bill-reguler":"_bill-reguler_1a30n_421","pointer-laba":"_pointer-laba_1a30n_489","pointer-payhere":"_pointer-payhere_1a30n_494","pointer-bill":"_pointer-bill_1a30n_499","resize-menu":"_resize-menu_1a30n_504",sorting:oP,"laba-grey-02":"_laba-grey-02_1a30n_557","laba-blue-01_border-transparent":"_laba-blue-01_border-transparent_1a30n_566"};function sP(e,t=null){const[n,r]=I.useState(!1);return I.useEffect(()=>{let i=null,a=null;const o=()=>{const s=i instanceof HTMLElement?i.getBoundingClientRect().width:window.innerWidth,l=window.matchMedia(e.replace("WIDTH",s.toString()));r(l.matches)};if(t){if(i=document.getElementById(t),!i)return;a=new ResizeObserver(o),a.observe(i)}else i=window,window.addEventListener("resize",o);return o(),()=>{a?a.disconnect():window.removeEventListener("resize",o)}},[e,t]),n}const vh=e=>{const t=e.getTime()-Date.now();return Math.max(Math.floor(t/1e3),0)},lP=e=>{const t=I.useMemo(()=>{const f=new Date(e.date);return e.adjustTimesTime&&f.setHours(f.getHours()-e.adjustTimesTime),f},[e.date,e.adjustTimesTime]),[n,r]=I.useState(t),[i,a]=I.useState(()=>vh(n)),[o,s]=I.useState(e.running??!1),[l,u]=I.useState(()=>e==null?void 0:e.callbackDone);return I.useEffect(()=>{let f;return o&&i>0&&(f=setInterval(()=>{const g=vh(n);a(g),g<=0&&(s(!1),f&&clearInterval(f),typeof l=="function"&&l())},e.intervalMs)),()=>{f&&clearInterval(f)}},[o,n,e.intervalMs,l,i]),{count:i,isRunning:o,startCountdown:()=>{!o&&i>0&&s(!0)},stopCountdown:()=>{s(!1)},resetCountdown:f=>{let g;f instanceof Date?g=f:typeof f=="number"?g=new Date(Date.now()+f*1e3):g=t,r(g);const p=vh(g);a(p),p<=0&&s(!1)},setCallbackDone:f=>u(()=>f)}};function O2(e,t=0){const n=I.useRef({promise:null,resolve:null,reject:null,timeout:null});return I.useCallback((...i)=>(n.current.timeout&&clearTimeout(n.current.timeout),n.current.promise||(n.current.promise=new Promise((a,o)=>{n.current.resolve=a,n.current.reject=o})),n.current.timeout=setTimeout(()=>{e(...i).then(a=>{n.current.resolve&&n.current.resolve(a)}).catch(a=>{n.current.reject&&n.current.reject(a)}).finally(()=>{n.current.promise=null,n.current.resolve=null,n.current.reject=null,n.current.timeout=null})},t),n.current.promise),[e,t])}const wf=typeof window<"u"?I.useLayoutEffect:I.useEffect,uP=(e,t)=>{const[n,r]=I.useState({width:0,height:0}),[i,a]=I.useState({width:0,height:0,top:0,left:0,bottom:0,right:0,x:0,y:0}),o=I.useRef(null);return wf(()=>{const s=()=>{r({width:window.innerWidth,height:window.innerHeight})},l=d=>{for(const h of d){const{width:f,height:g,top:p,left:m,bottom:b,right:v,x,y:C}=h.contentRect;a({width:f,height:g,top:p,left:m,bottom:b,right:v,x,y:C})}};let u=null;t?u=document.querySelector(t):o.current&&(u=o.current);const c=new ResizeObserver(l);return u&&c.observe(u),window.addEventListener("resize",s),s(),()=>{u&&c.unobserve(u),window.removeEventListener("resize",s)}},[t,...e??[]]),{ref:o,windowSize:n,contentRect:i}};function cP(e){const[t,n]=I.useState(e),r=I.useRef(t);return I.useEffect(()=>{r.current=t},[t]),[t,n,r]}function dP(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${JSON.stringify(t)}' to ref '${JSON.stringify(e)}'`)}}}function fP(...e){return t=>{e.forEach(n=>{dP(n,t)})}}function If(...e){return I.useMemo(()=>fP(...e),e)}function Ol(e){const t=I.useRef(e);return vp(e,t.current)||(t.current=e),t.current}function ba(e,t){const n=t.map(Ol);I.useEffect(e,n)}function hP({ref:e,handlerMain:t,eventListener:n="mousedown",useEffectDependency:r=[]}){I.useEffect(()=>{function i(a){t(e,a)}return document.addEventListener(n,i),()=>{document.removeEventListener(n,i)}},[e,t,n,...r])}const gP=({containerRef:e,children:t,columnCount:n,gapX:r,gapY:i,direction:a="masonry-ltr",debounceRecalculate:o=500,durationAnimation:s=500,enableAnimation:l=!1})=>{const u=I.useCallback(()=>{const d=e.current;if(!d)return;const h=Array.from(d.children);if(h.length===0){d.style.height="0px";return}const f=Array(n).fill(0),g=d.offsetWidth;if(g===0)return;const p=(g-(n-1)*r)/n,m=a.includes("rtl"),b=a.includes("top-down");h.forEach((x,C)=>{x.style.width=`${p}px`,x.style.position="absolute",l&&(x.style.transition=`top ${s}ms ease, left ${s}ms ease`);let E;if(b)E=C%n;else{const y=Math.min(...f);E=f.indexOf(y)}const w=f[E];let B;m?B=g-(p*(E+1)+r*E):B=E*(p+r),x.style.top=`${w}px`,x.style.left=`${B}px`,f[E]+=x.offsetHeight+i});const v=Math.max(...f);d.style.height=`${v-i}px`},[e,n,r,a,i]),c=O2(async()=>{u()},o);return I.useLayoutEffect(()=>{u()},[t,u]),I.useEffect(()=>(window.addEventListener("load",u),window.addEventListener("resize",c),()=>{window.removeEventListener("load",u),window.removeEventListener("resize",c)}),[t,c,u]),{recalculateLayout:u}},pP=({id:e,numInputs:t,onComplete:n,disableFocusOnEdit:r=!1,blurOnComplete:i=!1,disableOnComplete:a=!1})=>{const[o,s]=I.useState(()=>Array(t).fill("")),l=I.useRef([]),[u]=I.useState(()=>`otp-${Math.random().toString(36).slice(2,9)}`),c=e||u;I.useEffect(()=>{l.current=l.current.slice(0,t)},[t]);const d=I.useCallback((v,x)=>{var D,A;const C=v.target.value,E=C.length>1?C.slice(-1):C,w=o[x]!=="",B=[...o];B[x]=E,s(B);const y=B.join(""),S=!B.slice(0,t).includes("");E!==""&&x<t-1&&(r&&w&&S||(D=l.current[x+1])==null||D.focus()),S&&(typeof n=="function"&&n(y),i&&((A=l.current[x])==null||A.blur()))},[o,t,n,r,i]),h=I.useCallback((v,x)=>{var C,E,w,B,y;switch(v.key){case"Backspace":if(o[x]===""&&x>0){v.preventDefault();const S=[...o];S[x-1]="",s(S),(C=l.current[x-1])==null||C.focus()}break;case"ArrowLeft":x>0&&(v.preventDefault(),(E=l.current[x-1])==null||E.focus());break;case"ArrowRight":x<t-1&&(v.preventDefault(),(w=l.current[x+1])==null||w.focus());break;case"Home":v.preventDefault(),(B=l.current[0])==null||B.focus();break;case"End":v.preventDefault(),(y=l.current[t-1])==null||y.focus();break}},[o,t]),f=I.useCallback((v,x)=>{var D,A;v.preventDefault();const C=v.clipboardData.getData("text").trim();if(!C)return;const E=[...o];let w=x;for(const T of C){if(w>=t)break;E[w]=T,w++}s(E);const B=E.join(""),y=!E.includes(""),S=Math.min(w,t-1);(D=l.current[S])==null||D.focus(),y&&(typeof n=="function"&&n(B),i&&((A=l.current[S])==null||A.blur()))},[o,t,n,i]),g=v=>{v.target.select()},p=()=>{var v;s(Array(t).fill("")),(v=l.current[0])==null||v.focus()},m=v=>{if(v<0||v>=t)throw new Error(`useOtpInput: index ${v} is out of bounds for numInputs ${t}.`);const x=o.join("").length===t;return{id:`${c}-${v}`,"aria-label":`OTP digit ${v+1} of ${t}`,ref:C=>{l.current[v]=C},value:o[v],onChange:C=>d(C,v),onKeyDown:C=>h(C,v),onPaste:C=>f(C,v),onFocus:g,disabled:a&&x,type:"text",inputMode:"numeric",autoComplete:"one-time-code"}};return{getInputProps:m,getInputData:v=>({...JC(m(v),["onChange","onKeyDown","onPaste","onFocus","aria-label","autoComplete"]),isOtpFilled:o[v]!==""}),otpValues:o,otpString:o.join(""),clearOtp:p,isOtpComplete:o.join("").length===t}},Fo={"sub-mobile-payhere-reguler":"_sub-mobile-payhere-reguler_elvgc_115"},lr="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6673%2011.3333L8.00065%2014M8.00065%2014L5.33398%2011.3333M8.00065%2014V2'%20stroke='%23CFD8DC'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",cn=()=>({kind:{"payhere-reguler":en["payhere-reguler"],"laba-reguler":en["laba-reguler"],"laba-small":en["laba-small"],"laba-rounded-md-extra-small":en["laba-rounded-md-extra-small"],"laba-small_body-small":en["laba-small_body-small"],"bill-reguler":en["bill-reguler"]},subMobile:{"payhere-reguler":Fo["sub-mobile-payhere-reguler"],"laba-reguler":Fo["sub-mobile-laba-reguler"],"laba-small":Fo["sub-mobile-laba-small"],"laba-rounded-md-extra-small":Fo["sub-mobile-laba-rounded-md-extra-small"],"laba-small_body-small":Fo["sub-mobile-laba-small_body-small"],"bill-reguler":Fo["sub-mobile-bill-reguler"]},pointer:{"payhere-reguler":en["pointer-payhere"],"laba-reguler":en["pointer-laba"],"laba-small":en["pointer-laba"],"laba-rounded-md-extra-small":en["pointer-laba"],"laba-small_body-small":en["pointer-laba"],"bill-reguler":en["pointer-bill"]},utility:{"table-scroll-top":""},sortingIcon:{"payhere-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"bill-reguler":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-rounded-md-extra-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})},"laba-small_body-small":{asc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4"}),desc:_.jsx("img",{src:lr,className:"1ru-w-4 1ru-h-4 1ru-rotate-180"})}},variant:{"laba-grey-02":en["laba-grey-02"],"laba-blue-01_border-transparent":en["laba-blue-01_border-transparent"]}});Object.keys(cn().kind);Object.keys(cn().variant);const mP=(e,t)=>{var r,i;let n={};return e&&(n={position:"sticky",top:0,zIndex:2}),(r=t.column.columnDef.meta)!=null&&r.styleTh&&(n={...n,...(i=t.column.columnDef.meta)==null?void 0:i.styleTh(t.column.columnDef)}),n},Sd=(e,t=!1)=>{const n=e.getIsPinned(),r=n==="left"&&e.getIsLastColumn("left"),i=n==="right"&&e.getIsFirstColumn("right");return n?{boxShadow:r?"-4px 0 4px -4px gray inset":i?"4px 0 4px -4px gray inset":void 0,left:n==="left"?`${e.getStart("left")}px`:void 0,right:n==="right"?`${e.getAfter("right")}px`:void 0,position:"sticky",width:e.getSize(),zIndex:1,background:t?"white":""}:{}},V2=e=>{const t=e.columnPinning.left||[],n=e.columnPinning.right||[],r=e.rowPinning.top||[],i=e.rowPinning.bottom||[];return{left:t,right:n,top:r,bottom:i,isPinning:t.length>0||n.length>0||r.length>0||i.length>0}},bP=({tableInstance:e,classNameWrapperTable:t,classNameTable:n,handlerRowClick:r,privillageRowClick:i,headerId:a,tbodyTrId:o,theadTrId:s,maxHeight:l,idCalculateHeight:u,componentSortASC:c,componentSortDESC:d,classNamePointer:h,emptyPlaceholder:f,renderSubComponent:g,visibilityColumns:p,classNameSubMobile:m})=>_.jsx("div",{id:"1ru-table",style:l?{height:l,overflow:"auto"}:{},className:t??"",children:_.jsxs("table",{className:n,style:{width:V2(e.getState()).isPinning?e.getCenterTotalSize():""},children:[_.jsx("thead",{id:a,"data-calculate-height-header":u,children:e.getHeaderGroups().map(b=>_.jsx("tr",{children:b.headers.map(v=>{var C,E,w,B;const x=(E=(C=v.column.columnDef.meta)==null?void 0:C.rowSpan)==null?void 0:E.call(C,v);return!v.isPlaceholder&&x!==void 0&&v.id===v.column.id?_.jsx(_.Fragment,{}):_.jsxs("th",{style:{...mP(l,v),...Sd(v.column),...p.columns.includes(v.column.id)?{display:"none"}:{}},id:`${s(v)}-${v.id}`,colSpan:typeof((w=v.column.columnDef.meta)==null?void 0:w.colSpan)=="function"?(B=v.column.columnDef.meta)==null?void 0:B.colSpan(v.column.columnDef):v.colSpan,rowSpan:x,children:[v.isPlaceholder&&x===void 0?null:_.jsxs("div",{className:v.column.getCanSort()?en.sorting:"",onClick:v.column.getToggleSortingHandler(),id:v.column.getCanSort()?`${s(v)}-${v.id}-sort`:"",children:[ms(v.column.columnDef.header,v.getContext()),v.column.getCanSort()&&_.jsx("span",{className:"1ru-flex-shrink-0",children:v.column.getIsSorted()==="asc"||v.column.getIsSorted()==="desc"?_.jsxs(_.Fragment,{children:[v.column.getIsSorted()==="asc"&&_.jsx(_.Fragment,{children:c}),v.column.getIsSorted()==="desc"&&_.jsx(_.Fragment,{children:d})]}):_.jsx(_.Fragment,{})})]}),v.column.getIsPinned()&&_.jsx("div",{onDoubleClick:()=>v.column.resetSize(),onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:en["resize-menu"]})]},v.id)})},b.id))}),_.jsxs("tbody",{children:[e.getRowModel().rows.length>0&&e.getRowModel().rows.map((b,v)=>{var x;return _.jsxs(I.Fragment,{children:[_.jsx("tr",{onClick:C=>{C.stopPropagation(),i&&typeof r=="function"&&r(b.original,b)},className:i?h:"","data-calculate-height":`${u}-${v}`,id:o(b),children:b.getVisibleCells().map(C=>{var E,w,B;return _.jsx("td",{style:{...typeof((E=C.column.columnDef.meta)==null?void 0:E.styleTd)=="function"?C.column.columnDef.meta.styleTd(b.original,b):{},...Sd(C.column,!0),...p.columns.includes(C.column.id)?{display:"none"}:{}},className:typeof((w=C.column.columnDef.meta)==null?void 0:w.classNameTd)=="function"?(B=C.column.columnDef.meta)==null?void 0:B.classNameTd(b.original,b):"",id:`${o(b)}-${C.column.id}`,children:ms(C.column.columnDef.cell,C.getContext())},C.id)})},b.id),b.getIsExpanded()&&typeof g=="function"&&_.jsx("tr",{children:_.jsx("td",{colSpan:b.getVisibleCells().length-(((x=p==null?void 0:p.realColumns)==null?void 0:x.length)||0),children:g(b.original,b,{visibilityColumns:p,classNameSubMobile:m})})})]},b.id)}),e.getRowModel().rows.length===0&&I.isValidElement(f)&&_.jsx("tr",{children:_.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:f})})]})]})}),H2=I.forwardRef((e,t)=>{const{context:n,...r}=e;return _.jsx("thead",{id:(n==null?void 0:n.headerId)??"",...r,ref:t})});H2.displayName="VirtualizationHead";const vP=({style:e,context:t,...n})=>_.jsx("table",{...n,id:"1ru-table",className:(t==null?void 0:t.classNameTable)??"",style:{...e,width:t==null?void 0:t.width}}),yP=({tableInstance:e,classNameWrapperTable:t,handlerRowClick:n,privillageRowClick:r,virtualizationProps:i,headerId:a,tbodyTrId:o,theadTrId:s,classNameTable:l,componentSortASC:u,componentSortDESC:c,classNamePointer:d,emptyPlaceholder:h,renderSubComponent:f,visibilityColumns:g,classNameSubMobile:p})=>{var v,x,C;const[m,b]=I.useState(0);return _.jsx(Jp,{context:{headerId:a,classNameTable:l,width:V2(e.getState()).isPinning?e.getCenterTotalSize():""},typeHight:"min-max",totalCount:((v=e.getRowModel().rows)==null?void 0:v.length)||0,minLengthItem:((x=e.getRowModel().rows)==null?void 0:x.length)||0,typeCalculateItemSize:"auto",component:{TableHead:H2,Table:vP,EmptyPlaceholder:()=>_.jsx("tbody",{ref:E=>{var w;return b(((w=E==null?void 0:E.getBoundingClientRect())==null?void 0:w.height)??0)},children:_.jsx("tr",{children:_.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:I.isValidElement(h)&&h})})})},classNameContainer:t,fixedHeaderContent:()=>e.getHeaderGroups().map(E=>_.jsx("tr",{children:E.headers.map(w=>{var y,S,D,A;const B=(S=(y=w.column.columnDef.meta)==null?void 0:y.rowSpan)==null?void 0:S.call(y,w);return!w.isPlaceholder&&B!==void 0&&w.id===w.column.id?_.jsx(_.Fragment,{}):_.jsxs("th",{id:`${s(w)}-${w.id}`,colSpan:w.colSpan,rowSpan:B,style:{...typeof((D=w.column.columnDef.meta)==null?void 0:D.styleTh)=="function"?(A=w.column.columnDef.meta)==null?void 0:A.styleTh(w.column.columnDef):{},...Sd(w.column),...g.columns.includes(w.column.id)?{display:"none"}:{}},children:[w.isPlaceholder&&B===void 0?null:_.jsxs("div",{className:w.column.getCanSort()?en.sorting:"",onClick:w.column.getToggleSortingHandler(),id:w.column.getCanSort()?`${s(w)}-${w.id}-sort`:"",children:[ms(w.column.columnDef.header,w.getContext()),w.column.getCanSort()&&_.jsx("span",{className:"1ru-flex-shrink-0",children:w.column.getIsSorted()==="asc"||w.column.getIsSorted()==="desc"?_.jsxs(_.Fragment,{children:[w.column.getIsSorted()==="asc"&&_.jsx(_.Fragment,{children:u}),w.column.getIsSorted()==="desc"&&_.jsx(_.Fragment,{children:c})]}):_.jsx(_.Fragment,{})})]}),w.column.getIsPinned()&&_.jsx("div",{onDoubleClick:()=>w.column.resetSize(),onMouseDown:w.getResizeHandler(),onTouchStart:w.getResizeHandler(),className:en["resize-menu"]})]},w.id)})},E.id)),itemContent:(E,w)=>{var y,S;const B=(S=(y=e.getRowModel())==null?void 0:y.rows)==null?void 0:S[w];return _.jsx(E,{children:({...D})=>{var A;return _.jsxs(I.Fragment,{children:[_.jsx("tr",{...D,onClick:T=>{T.stopPropagation(),r&&typeof n=="function"&&n(B.original,B)},className:r?d:"",id:o(B),children:B.getVisibleCells().map(T=>{var F,k,P;return _.jsx(_.Fragment,{children:_.jsx("td",{style:{...typeof((F=T.column.columnDef.meta)==null?void 0:F.styleTd)=="function"?T.column.columnDef.meta.styleTd(B.original,B):{},...Sd(T.column,!0),...g.columns.includes(T.column.id)?{display:"none"}:{}},className:typeof((k=T.column.columnDef.meta)==null?void 0:k.classNameTd)=="function"?(P=T.column.columnDef.meta)==null?void 0:P.classNameTd(B.original,B):"",id:`${o(B)}-${T.column.id}`,children:ms(T.column.columnDef.cell,T.getContext())},T.id)})})}),B.getIsExpanded()&&typeof f=="function"&&_.jsx("tr",{"data-sub-component":w,children:_.jsx("td",{colSpan:B.getVisibleCells().length-(((A=g==null?void 0:g.realColumns)==null?void 0:A.length)||0),children:f(B.original,B,{visibilityColumns:g,classNameSubMobile:p})})})]},B.id)}},B.id)},...i,minHeightItem:((i==null?void 0:i.minHeightItem)??60)+((((C=e.getRowModel().rows)==null?void 0:C.length)||0)>0?0:m),itemSizeNames:typeof f=="function"?[...(i==null?void 0:i.itemSizeNames)??[],"data-sub-component"]:i==null?void 0:i.itemSizeNames})},xP=({tableInstance:e,classNameWrapperTable:t="",classNameTable:n="",collapseAll:r=!0,handlerRowClick:i,privillageRowClick:a=!1,virtualization:o=!1,virtualizationProps:s,headerId:l="",tbodyTrId:u=()=>"",theadTrId:c=()=>"",maxHeight:d=0,idCalculateHeight:h=void 0,kind:f="laba-reguler",componentSortASC:g,componentSortDESC:p,scrollTop:m=!1,emptyPlaceholder:b,variant:v,renderSubComponent:x,columnBreakpoints:C})=>{var A;const[E,w]=I.useState(0),[B,y]=I.useState({columns:[],realColumns:[]}),S=()=>{if(![void 0,"undefined"].includes(h)){const T=document.querySelector(`[data-calculate-height-header="${h}"]`);let F=0;const k=document.querySelectorAll(`[data-calculate-height^="${h}-"]`);return k==null||k.forEach(P=>{F+=P.offsetHeight}),F>d?d+T.offsetHeight:0}return d},D=()=>{var P;const T=((P=document.querySelector("body"))==null?void 0:P.offsetWidth)||0,F=C==null?void 0:C.sort(($,R)=>{const O=($.maxWidth??$.minWidth)||0,j=(R.maxWidth??R.minWidth)||0;return O!==j?O-j:$.maxWidth?-1:1}),k=(F==null?void 0:F.find($=>!!(Object.hasOwnProperty.call($,"maxWidth")&&T<=($.maxWidth||0)||Object.hasOwnProperty.call($,"minWidth")&&T>=($.minWidth||0))))||{};Object.keys(k).length>0?(y({columns:k.columns,realColumns:k.realColumns||k.columns}),k!=null&&k.resetExpanded&&e.resetExpanded()):y({columns:[],realColumns:[]})};return ba(()=>{!r&&typeof e.toggleAllRowsExpanded=="function"&&e.toggleAllRowsExpanded()},[r,e==null?void 0:e.toggleAllRowsExpanded]),ba(()=>{d>0&&w(S())},[(A=e==null?void 0:e.options)==null?void 0:A.data,d]),ba(()=>{if(Array.isArray(C)&&(C==null?void 0:C.length)>0)return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[C]),_.jsxs(_.Fragment,{children:[!o&&_.jsx(bP,{theadTrId:c,tbodyTrId:u,headerId:l,tableInstance:e,classNameTable:n,classNameWrapperTable:`${cn().kind[f]} ${v?cn().variant[v]:""}
|
|
67
67
|
${m?cn().utility["table-scroll-top"]:""} ${t}`,handlerRowClick:i,privillageRowClick:a,maxHeight:E,idCalculateHeight:h,componentSortASC:I.isValidElement(g)?g:cn().sortingIcon[f].asc,componentSortDESC:I.isValidElement(p)?p:cn().sortingIcon[f].desc,classNamePointer:cn().pointer[f],emptyPlaceholder:b,renderSubComponent:x,visibilityColumns:B,classNameSubMobile:cn().subMobile[f]}),o&&_.jsx(yP,{theadTrId:c,tbodyTrId:u,headerId:l,tableInstance:e,classNameTable:n,classNameWrapperTable:`${cn().kind[f]} ${v?cn().variant[v]:""}
|
|
68
68
|
${m?cn().utility["table-scroll-top"]:""} ${t}`,handlerRowClick:i,privillageRowClick:a,virtualizationProps:s,componentSortASC:I.isValidElement(g)?g:cn().sortingIcon[f].asc,componentSortDESC:I.isValidElement(p)?p:cn().sortingIcon[f].desc,classNamePointer:cn().pointer[f],emptyPlaceholder:b,renderSubComponent:x,visibilityColumns:B,classNameSubMobile:cn().subMobile[f]})]})},CP=(e,t,{visibilityColumns:n,classNameSubMobile:r})=>_.jsx("table",{className:"-1ru-mx-6 -1ru-my-3 !1ru-w-[calc(100%+48px)]",children:_.jsx("tbody",{children:t.getVisibleCells().map((i,a)=>{var o,s,l,u,c,d;return _.jsx(_.Fragment,{children:n!=null&&n.columns.includes(i.column.id)?_.jsxs("tr",{className:r,children:[_.jsx("td",{"data-section":"left",style:{...typeof((o=i.column.columnDef.meta)==null?void 0:o.styleTdLeftCellSubs)=="function"?(s=i.column.columnDef.meta)==null?void 0:s.styleTdLeftCellSubs(t.original,t):{}},children:_.jsxs("div",{children:[typeof i.column.columnDef.header=="string"&&_.jsx(_.Fragment,{children:i.column.columnDef.header}),typeof i.column.columnDef.header!="string"&&((l=i.column.columnDef.meta)==null?void 0:l.labelCellSubs)&&_.jsx(_.Fragment,{children:(u=i.column.columnDef.meta)==null?void 0:u.labelCellSubs(t.original,t)})]})}),_.jsx("td",{"data-section":"right",style:{...typeof((c=i.column.columnDef.meta)==null?void 0:c.styleTdRightCellSubs)=="function"?(d=i.column.columnDef.meta)==null?void 0:d.styleTdRightCellSubs(t.original,t):{}},children:_.jsxs("div",{children:[_.jsx("div",{className:"1ru-pr-1",children:":"})," ",ms(i.column.columnDef.cell,i.getContext())]})})]},i.id):_.jsx(_.Fragment,{})},a)})})}),EP=({children:e,...t})=>_.jsx(_.Fragment,{children:e(t)}),SP=({children:e,...t})=>_.jsx(_.Fragment,{children:I.isValidElement(e)&&_.jsx(_.Fragment,{children:I.cloneElement(e,t)})}),j2=I.forwardRef((e,t)=>{const{classNameContainer:n="",computeItemKey:r=()=>"",itemSize:i=()=>0,totalCount:a=0,typeHight:o="min-max",minHeightItem:s=0,maxHeightTable:l=0,minLengthItem:u=0,itemContent:c,typeCalculateItemSize:d="manual",itemSizeNames:h=[],overscan:f=null,component:g={},idContainer:p="",triggerCalCulateContainer:m="",accumulationHeight:b=0,delayTriggerCalculateHeight:v=0,increaseViewportBy:x=()=>0,context:C={},endReached:E,increaseTotalCount:w=1}=e,[B,y]=I.useState(0),S=()=>{if(o==="min-max"){const T=(a+w)*s;return{height:a>u?l:B>T?B:T}}return o==="container"?{height:B}:{}},D=T=>{var P;const F=T.getAttribute("data-index");let k=((P=T.getBoundingClientRect())==null?void 0:P.height)||0;return h==null||h.forEach($=>{var R,O;k+=((O=(R=document.querySelector(`[${$}="${F}"]`))==null?void 0:R.getBoundingClientRect())==null?void 0:O.height)??0}),k},A=()=>{var T;if(p&&o==="container"){const F=((T=document==null?void 0:document.getElementById(p))==null?void 0:T.offsetHeight)??0;y(F-b)}};return I.useEffect(()=>{const T=setTimeout(A,v);return window==null||window.addEventListener("resize",A),window==null||window.addEventListener("load",A),()=>{clearTimeout(T),window==null||window.removeEventListener("resize",A),window==null||window.removeEventListener("load",A)}},[o,m]),_.jsx("div",{className:`1ru-w-full ${n}`,children:_.jsx(R7,{context:C,ref:t,overscan:typeof f=="function"?f(o==="container"?B:l):o==="container"?B:l,totalListHeightChanged:T=>o==="min-max"?y(T):null,style:S(),totalCount:a,computeItemKey:r,itemSize:I.useCallback(T=>d==="manual"?i(T):D(T),[]),itemContent:(...T)=>c(EP,...T),components:{Item:SP,...g},endReached:E,increaseViewportBy:x(o==="container"?B:l)})})});j2.displayName="ListVirtualization";const wP="_ripple_eap0t_571",IP="_active_eap0t_578",Vt={"tabs-m":"_tabs-m_eap0t_115","tabs-list":"_tabs-list_eap0t_115","button-tabs":"_button-tabs_eap0t_115","container-tabs":"_container-tabs_eap0t_115","original-laba-blue-10":"_original-laba-blue-10_eap0t_115","original-bill-secondary-800":"_original-bill-secondary-800_eap0t_115","tabs-s":"_tabs-s_eap0t_139","tabs-medium":"_tabs-medium_eap0t_259","tabs-small":"_tabs-small_eap0t_289","disable-transition":"_disable-transition_eap0t_469","tab-panel":"_tab-panel_eap0t_473",ripple:wP,active:IP,"tabs-slider":"_tabs-slider_eap0t_585","container-payhere-brand-base":"_container-payhere-brand-base_eap0t_593","container-payhere-brand-base-bg_white":"_container-payhere-brand-base-bg_white_eap0t_630","container-laba-blue-10":"_container-laba-blue-10_eap0t_667","container-laba-blue-10-bg_white":"_container-laba-blue-10-bg_white_eap0t_704","container-laba-blue-10-bg_blue-01":"_container-laba-blue-10-bg_blue-01_eap0t_741","container-bill-secondary-800":"_container-bill-secondary-800_eap0t_820"},_f={"0px":"1ru-rounded-none","2px":"1ru-rounded-sm","4px":"1ru-rounded","6px":"1ru-rounded-md","8px":"1ru-rounded-lg","12px":"1ru-rounded-xl","16px":"1ru-rounded-2xl","24px":"1ru-rounded-3xl",full:"1ru-rounded-full"},Na={tabsVariant:{"original-laba-blue-10":Vt["original-laba-blue-10"],"container-payhere-brand-base":Vt["container-payhere-brand-base"],"container-payhere-brand-base-bg_white":Vt["container-payhere-brand-base-bg_white"],"container-laba-blue-10":Vt["container-laba-blue-10"],"container-laba-blue-10-bg_white":Vt["container-laba-blue-10-bg_white"],"container-laba-blue-10-bg_blue-01":Vt["container-laba-blue-10-bg_blue-01"],"original-bill-secondary-800":Vt["original-bill-secondary-800"],"container-bill-secondary-800":Vt["container-bill-secondary-800"]},size:{"tabs-m":Vt["tabs-m"],"tabs-s":Vt["tabs-s"],"tabs-medium":Vt["tabs-medium"],"tabs-small":Vt["tabs-small"]},borderRadius:_f,isContainer:["container-payhere-brand-base","container-payhere-brand-base-bg_white","container-laba-blue-10","container-laba-blue-10-bg_white","container-laba-blue-10-bg_blue-01","container-bill-secondary-800"]},_P=({id:e,value:t="",keyValueTab:n="",tabsList:r,className:i,classNameContainer:a,classNameButton:o,variant:s="original-laba-blue-10",size:l="tabs-m",borderRadius:u="0px",disabled:c,animation:d=!0,mountedExecuteChange:h=!0,typeButton:f="button",onChange:g,locale:p})=>{var D;const m=I.useRef([]);let b=r||[];const v=Object.fromEntries(new URL(window.location.href).searchParams.entries()),[x,C]=I.useState(-1),[E,w]=I.useState({height:0,width:0,left:0});b=b.filter(A=>typeof(A==null?void 0:A.isHide)=="boolean"?!A.isHide:!0);const B=A=>{const T=A.currentTarget,F=document.createElement("span"),k=Math.max(T.clientWidth,T.clientHeight),P=k/2;F.style.width=F.style.height=`${k}px`,F.style.left=`${A.clientX-T.getBoundingClientRect().left-P}px`,F.style.top=`${A.clientY-T.getBoundingClientRect().top-P}px`,F.classList.add(Vt.ripple);const $=T.getElementsByClassName(Vt.ripple)[0];$&&$.remove(),T.appendChild(F),setTimeout(()=>{F.remove()},500)},y=(A,T)=>{typeof g=="function"&&g(A,T)},S=I.useCallback((A,T)=>{var F,k;return p&&((k=(F=r.find($=>$.id===A))==null?void 0:F.locale)==null?void 0:k[p])||T},[p]);return I.useLayoutEffect(()=>{function A(){setTimeout(()=>{const T=m.current[x],F={left:(T==null?void 0:T.offsetLeft)??0,width:(T==null?void 0:T.clientWidth)??0,height:Na.isContainer.includes(s)?(T==null?void 0:T.clientHeight)||0:4};w(F)},50)}return x>=0&&A(),window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[x]),I.useLayoutEffect(()=>{const A=b.findIndex(T=>T.id===(v==null?void 0:v[n])||T.id===t);if((v!=null&&v[n]||t)&&A>=0){C(A);const T=b==null?void 0:b.find(F=>F.id===(v==null?void 0:v[n]));v!=null&&v[n]&&T&&!t&&h&&y(T,"mounted")}A<0&&h&&y(b[0],"mounted")},[JSON.stringify(t),JSON.stringify(v==null?void 0:v[n])]),_.jsx("div",{className:`${Vt["container-tabs"]} ${c?"1ru-opacity-50":""} ${a??""}`,children:_.jsxs("div",{className:`${Na.tabsVariant[s]}
|
|
69
69
|
${Na.isContainer.includes(s)?Na.size[l]:""}
|
|
@@ -103,7 +103,7 @@ You should wrap it with \`css\` like this:
|
|
|
103
103
|
`),r=0;r<n.length;r++){var i=YF(n[r]);if(i){if(KF.has(i))break;if(/^[A-Z]/.test(i))return qF(i)}}},dg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fg="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",QF=function(t,n){if(process.env.NODE_ENV!=="production"&&typeof n.css=="string"&&n.css.indexOf(":")!==-1)throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+n.css+"`");var r={};for(var i in n)lm.call(n,i)&&(r[i]=n[i]);if(r[dg]=t,process.env.NODE_ENV!=="production"&&n.css&&(typeof n.css!="object"||typeof n.css.name!="string"||n.css.name.indexOf("-")===-1)){var a=JF(new Error().stack);a&&(r[fg]=a)}return r},eN=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return am(n,r,i),s3(function(){return om(n,r,i)}),null},l3=cm(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[dg],a=[r],o="";typeof e.className=="string"?o=n3(t.registered,a,e.className):e.className!=null&&(o=e.className+" ");var s=Wl(a,void 0,J.useContext(Rf));if(process.env.NODE_ENV!=="production"&&s.name.indexOf("-")===-1){var l=e[fg];l&&(s=Wl([s,"label:"+l+";"]))}o+=t.key+"-"+s.name;var u={};for(var c in e)lm.call(e,c)&&c!=="css"&&c!==dg&&(process.env.NODE_ENV==="production"||c!==fg)&&(u[c]=e[c]);return u.ref=n,u.className=o,J.createElement(J.Fragment,null,J.createElement(eN,{cache:t,serialized:s,isStringTag:typeof i=="string"}),J.createElement(i,u))});process.env.NODE_ENV!=="production"&&(l3.displayName="EmotionCssPropInternal");var tN=l3,nN={version:"11.11.4"},Te=function(t,n){var r=arguments;if(n==null||!lm.call(n,"css"))return J.createElement.apply(void 0,r);var i=r.length,a=new Array(i);a[0]=tN,a[1]=QF(t,n);for(var o=2;o<i;o++)a[o]=r[o];return J.createElement.apply(null,a)},Jb=!1,rN=cm(function(e,t){process.env.NODE_ENV!=="production"&&!Jb&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),Jb=!0);var n=e.styles,r=Wl([n],void 0,J.useContext(Rf)),i=J.useRef();return Kb(function(){var a=t.key+"-global",o=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",a),o.hydrate([l])),i.current=[o,s],function(){o.flush()}},[t]),Kb(function(){var a=i.current,o=a[0],s=a[1];if(s){a[1]=!1;return}if(r.next!==void 0&&om(t,r.next,!0),o.tags.length){var l=o.tags[o.tags.length-1].nextElementSibling;o.before=l,o.flush()}t.insert("",r,o,!1)},[t,r.name]),null});process.env.NODE_ENV!=="production"&&(rN.displayName="EmotionGlobal");function dm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Wl(t)}var iN=function(){var t=dm.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},aN=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var a=t[r];if(a!=null){var o=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))o=e(a);else{process.env.NODE_ENV!=="production"&&a.styles!==void 0&&a.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),o="";for(var s in a)a[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};function oN(e,t,n){var r=[],i=n3(e,r,n);return r.length<2?n:i+t(r)}var sN=function(t){var n=t.cache,r=t.serializedArr;return s3(function(){for(var i=0;i<r.length;i++)om(n,r[i],!1)}),null},lN=cm(function(e,t){var n=!1,r=[],i=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];var h=Wl(c,t.registered);return r.push(h),am(t,h,!1),t.key+"-"+h.name},a=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return oN(t.registered,i,aN(c))},o={css:i,cx:a,theme:J.useContext(Rf)},s=e.children(o);return n=!0,J.createElement(J.Fragment,null,J.createElement(sN,{cache:t,serializedArr:r}),s)});process.env.NODE_ENV!=="production"&&(lN.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var Qb=!0,uN=typeof jest<"u"||typeof vi<"u";if(Qb&&!uN){var ev=typeof globalThis<"u"?globalThis:Qb?window:global,tv="__EMOTION_REACT_"+nN.version.split(".")[0]+"__";ev[tv]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),ev[tv]=!0}}function cN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var hg=I.useLayoutEffect,dN=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Dd=function(){};function fN(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function hN(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&a.push("".concat(fN(e,o)));return a.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var nv=function(t){return EN(t)?t.filter(Boolean):mo(t)==="object"&&t!==null?[t]:[]},u3=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Wi(t,dN);return Be({},n)},Mt=function(t,n,r){var i=t.cx,a=t.getStyles,o=t.getClassNames,s=t.className;return{css:a(n,t),className:i(r??{},o(n,t),s)}};function Bf(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function gN(e){return Bf(e)?window.innerHeight:e.clientHeight}function c3(e){return Bf(e)?window.pageYOffset:e.scrollTop}function Ad(e,t){if(Bf(e)){window.scrollTo(0,t);return}e.scrollTop=t}function pN(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function mN(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Zu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Dd,i=c3(e),a=t-i,o=10,s=0;function l(){s+=o;var u=mN(s,i,a,n);Ad(e,u),s<n?window.requestAnimationFrame(l):r(e)}l()}function rv(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Ad(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Ad(e,Math.max(t.offsetTop-i,0))}function bN(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function iv(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function vN(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var d3=!1,yN={get passive(){return d3=!0}},Yu=typeof window<"u"?window:{};Yu.addEventListener&&Yu.removeEventListener&&(Yu.addEventListener("p",Dd,yN),Yu.removeEventListener("p",Dd,!1));var xN=d3;function CN(e){return e!=null}function EN(e){return Array.isArray(e)}function Ku(e,t,n){return e?t:n}var SN=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=Object.entries(t).filter(function(o){var s=Oi(o,1),l=s[0];return!r.includes(l)});return a.reduce(function(o,s){var l=Oi(s,2),u=l[0],c=l[1];return o[u]=c,o},{})},wN=["children","innerProps"],IN=["children","innerProps"];function _N(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,a=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=pN(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect(),d=c.height,h=n.getBoundingClientRect(),f=h.bottom,g=h.height,p=h.top,m=n.offsetParent.getBoundingClientRect(),b=m.top,v=o?window.innerHeight:gN(l),x=c3(l),C=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),w=b-E,B=v-p,y=w+x,S=d-x-p,D=f-v+x+C,A=x+p-E,T=160;switch(i){case"auto":case"bottom":if(B>=g)return{placement:"bottom",maxHeight:t};if(S>=g&&!o)return a&&Zu(l,D,T),{placement:"bottom",maxHeight:t};if(!o&&S>=r||o&&B>=r){a&&Zu(l,D,T);var F=o?B-C:S-C;return{placement:"bottom",maxHeight:F}}if(i==="auto"||o){var k=t,P=o?w:y;return P>=r&&(k=Math.min(P-C-s,t)),{placement:"top",maxHeight:k}}if(i==="bottom")return a&&Ad(l,D),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(y>=g&&!o)return a&&Zu(l,A,T),{placement:"top",maxHeight:t};if(!o&&y>=r||o&&w>=r){var $=t;return(!o&&y>=r||o&&w>=r)&&($=o?w-E:y-E),a&&Zu(l,A,T),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function DN(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var f3=function(t){return t==="auto"?"bottom":t},AN=function(t,n){var r,i=t.placement,a=t.theme,o=a.borderRadius,s=a.spacing,l=a.colors;return Be((r={label:"menu"},el(r,DN(i),"100%"),el(r,"position","absolute"),el(r,"width","100%"),el(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},h3=I.createContext(null),TN=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,a=t.menuPlacement,o=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,u=I.useContext(h3)||{},c=u.setPortalPlacement,d=I.useRef(null),h=I.useState(i),f=Oi(h,2),g=f[0],p=f[1],m=I.useState(null),b=Oi(m,2),v=b[0],x=b[1],C=l.spacing.controlHeight;return hg(function(){var E=d.current;if(E){var w=o==="fixed",B=s&&!w,y=_N({maxHeight:i,menuEl:E,minHeight:r,placement:a,shouldScroll:B,isFixedPosition:w,controlHeight:C});p(y.maxHeight),x(y.placement),c==null||c(y.placement)}},[i,a,o,s,r,c,C]),n({ref:d,placerProps:Be(Be({},t),{},{placement:v||f3(a),maxHeight:g})})},RN=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Te("div",$e({},Mt(t,"menu",{menu:!0}),{ref:r},i),n)},BN=RN,$N=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Be({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},kN=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,a=t.isMulti;return Te("div",$e({},Mt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:i},r),n)},g3=function(t,n){var r=t.theme,i=r.spacing.baseUnit,a=r.colors;return Be({textAlign:"center"},n?{}:{color:a.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},PN=g3,FN=g3,NN=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,a=Wi(t,wN);return Te("div",$e({},Mt(Be(Be({},a),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},MN=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,a=Wi(t,IN);return Te("div",$e({},Mt(Be(Be({},a),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},LN=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},ON=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,a=t.innerProps,o=t.menuPlacement,s=t.menuPosition,l=I.useRef(null),u=I.useRef(null),c=I.useState(f3(o)),d=Oi(c,2),h=d[0],f=d[1],g=I.useMemo(function(){return{setPortalPlacement:f}},[]),p=I.useState(null),m=Oi(p,2),b=m[0],v=m[1],x=I.useCallback(function(){if(i){var B=bN(i),y=s==="fixed"?0:window.pageYOffset,S=B[h]+y;(S!==(b==null?void 0:b.offset)||B.left!==(b==null?void 0:b.rect.left)||B.width!==(b==null?void 0:b.rect.width))&&v({offset:S,rect:B})}},[i,s,h,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);hg(function(){x()},[x]);var C=I.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=w4(i,l.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);hg(function(){C()},[C]);var E=I.useCallback(function(B){l.current=B,C()},[C]);if(!n&&s!=="fixed"||!b)return null;var w=Te("div",$e({ref:E},Mt(Be(Be({},t),{},{offset:b.offset,position:s,rect:b.rect}),"menuPortal",{"menu-portal":!0}),a),r);return Te(h3.Provider,{value:g},n?cu.createPortal(w,n):w)},VN=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},HN=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,a=t.isRtl;return Te("div",$e({},Mt(t,"container",{"--is-disabled":i,"--is-rtl":a}),r),n)},jN=function(t,n){var r=t.theme.spacing,i=t.isMulti,a=t.hasValue,o=t.selectProps.controlShouldRenderValue;return Be({alignItems:"center",display:i&&a&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},WN=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,a=t.hasValue;return Te("div",$e({},Mt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a}),r),n)},zN=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},GN=function(t){var n=t.children,r=t.innerProps;return Te("div",$e({},Mt(t,"indicatorsContainer",{indicators:!0}),r),n)},av,UN=["size"],XN=["innerProps","isRtl","size"];function ZN(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var YN=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:ZN},p3=function(t){var n=t.size,r=Wi(t,UN);return Te("svg",$e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:YN},r))},fm=function(t){return Te(p3,$e({size:20},t),Te("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},m3=function(t){return Te(p3,$e({size:20},t),Te("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},b3=function(t,n){var r=t.isFocused,i=t.theme,a=i.spacing.baseUnit,o=i.colors;return Be({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:a*2,":hover":{color:r?o.neutral80:o.neutral40}})},KN=b3,qN=function(t){var n=t.children,r=t.innerProps;return Te("div",$e({},Mt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Te(m3,null))},JN=b3,QN=function(t){var n=t.children,r=t.innerProps;return Te("div",$e({},Mt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Te(fm,null))},eM=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing.baseUnit,o=i.colors;return Be({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:a*2,marginTop:a*2})},tM=function(t){var n=t.innerProps;return Te("span",$e({},n,Mt(t,"indicatorSeparator",{"indicator-separator":!0})))},nM=iN(av||(av=cN([`
|
|
104
104
|
0%, 80%, 100% { opacity: 0; }
|
|
105
105
|
40% { opacity: 1; }
|
|
106
|
-
`]))),rM=function(t,n){var r=t.isFocused,i=t.size,a=t.theme,o=a.colors,s=a.spacing.baseUnit;return Be({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2})},Eh=function(t){var n=t.delay,r=t.offset;return Te("span",{css:dm({animation:"".concat(nM," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},iM=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,a=i===void 0?4:i,o=Wi(t,XN);return Te("div",$e({},Mt(Be(Be({},o),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Te(Eh,{delay:0,offset:r}),Te(Eh,{delay:160,offset:!0}),Te(Eh,{delay:320,offset:!r}))},aM=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.theme,o=a.colors,s=a.borderRadius,l=a.spacing;return Be({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},oM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.innerRef,o=t.innerProps,s=t.menuIsOpen;return Te("div",$e({ref:a},Mt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),o,{"aria-disabled":r||void 0}),n)},sM=oM,lM=["data"],uM=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},cM=function(t){var n=t.children,r=t.cx,i=t.getStyles,a=t.getClassNames,o=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Te("div",$e({},Mt(t,"group",{group:!0}),l),Te(o,$e({},s,{selectProps:d,theme:c,getStyles:i,getClassNames:a,cx:r}),u),Te("div",null,n))},dM=function(t,n){var r=t.theme,i=r.colors,a=r.spacing;return Be({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},fM=function(t){var n=u3(t);n.data;var r=Wi(n,lM);return Te("div",$e({},Mt(t,"groupHeading",{"group-heading":!0}),r))},hM=cM,gM=["innerRef","isDisabled","isHidden","inputClassName"],pM=function(t,n){var r=t.isDisabled,i=t.value,a=t.theme,o=a.spacing,s=a.colors;return Be(Be({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},mM),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},v3={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mM={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Be({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},v3)},bM=function(t){return Be({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},v3)},vM=function(t){var n=t.cx,r=t.value,i=u3(t),a=i.innerRef,o=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Wi(i,gM);return Te("div",$e({},Mt(t,"input",{"input-container":!0}),{"data-value":r||""}),Te("input",$e({className:n({input:!0},l),ref:a,style:bM(s),disabled:o},u)))},yM=vM,xM=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors;return Be({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:a/2,margin:i.baseUnit/2})},CM=function(t,n){var r=t.theme,i=r.borderRadius,a=r.colors,o=t.cropWithEllipsis;return Be({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},EM=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors,s=t.isFocused;return Be({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},y3=function(t){var n=t.children,r=t.innerProps;return Te("div",r,n)},SM=y3,wM=y3;function IM(e){var t=e.children,n=e.innerProps;return Te("div",$e({role:"button"},n),t||Te(fm,{size:14}))}var _M=function(t){var n=t.children,r=t.components,i=t.data,a=t.innerProps,o=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Te(u,{data:i,innerProps:Be(Be({},Mt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),a),selectProps:l},Te(c,{data:i,innerProps:Be({},Mt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Te(d,{data:i,innerProps:Be(Be({},Mt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},DM=_M,AM=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.theme,s=o.spacing,l=o.colors;return Be({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?l.primary:l.primary50}})},TM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.innerRef,s=t.innerProps;return Te("div",$e({},Mt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":a}),{ref:o,"aria-disabled":r},s),n)},RM=TM,BM=function(t,n){var r=t.theme,i=r.spacing,a=r.colors;return Be({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},$M=function(t){var n=t.children,r=t.innerProps;return Te("div",$e({},Mt(t,"placeholder",{placeholder:!0}),r),n)},kM=$M,PM=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing,o=i.colors;return Be({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},FM=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Te("div",$e({},Mt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},NM=FM,x3={ClearIndicator:QN,Control:sM,DropdownIndicator:qN,DownChevron:m3,CrossIcon:fm,Group:hM,GroupHeading:fM,IndicatorsContainer:GN,IndicatorSeparator:tM,Input:yM,LoadingIndicator:iM,Menu:BN,MenuList:kN,MenuPortal:ON,LoadingMessage:MN,NoOptionsMessage:NN,MultiValue:DM,MultiValueContainer:SM,MultiValueLabel:wM,MultiValueRemove:IM,Option:RM,Placeholder:kM,SelectContainer:HN,SingleValue:NM,ValueContainer:WN},MM=function(t){return Be(Be({},x3),t.components)},ov=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function LM(e,t){return!!(e===t||ov(e)&&ov(t))}function OM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!LM(e[n],t[n]))return!1;return!0}function VM(e,t){t===void 0&&(t=OM);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}function HM(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var jM=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:HM},WM=function(t){return Te("span",$e({css:jM},t))},sv=WM,zM={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,a=t.context,o=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,a=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,a=t.label,o=a===void 0?"":a,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(p,m){return p&&p.length?"".concat(p.indexOf(m)+1," of ").concat(p.length):""};if(n==="value"&&s)return"value ".concat(o," focused, ").concat(d(s,r),".");if(n==="menu"&&c){var h=l?" disabled":"",f="".concat(u?" selected":"").concat(h);return"".concat(o).concat(f,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},GM=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,o=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,h=l.getOptionLabel,f=l.inputValue,g=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,v=l.options,x=l.screenReaderStatus,C=l.tabSelectsValue,E=l.isLoading,w=l["aria-label"],B=l["aria-live"],y=I.useMemo(function(){return Be(Be({},zM),d||{})},[d]),S=I.useMemo(function(){var P="";if(n&&y.onChange){var $=n.option,R=n.options,O=n.removedValue,j=n.removedValues,V=n.value,W=function(te){return Array.isArray(te)?null:te},U=O||$||W(V),K=U?h(U):"",ee=R||j||void 0,z=ee?ee.map(h):[],H=Be({isDisabled:U&&p(U,s),label:K,labels:z},n);P=y.onChange(H)}return P},[n,y,p,s,h]),D=I.useMemo(function(){var P="",$=r||i,R=!!(r&&s&&s.includes(r));if($&&y.onFocus){var O={focused:$,label:h($),isDisabled:p($,s),isSelected:R,options:a,context:$===r?"menu":"value",selectValue:s,isAppleDevice:c};P=y.onFocus(O)}return P},[r,i,h,p,y,a,s,c]),A=I.useMemo(function(){var P="";if(b&&v.length&&!E&&y.onFilter){var $=x({count:a.length});P=y.onFilter({inputValue:f,resultsMessage:$})}return P},[a,f,b,y,v,x,E]),T=(n==null?void 0:n.action)==="initial-input-focus",F=I.useMemo(function(){var P="";if(y.guidance){var $=i?"value":b?"menu":"input";P=y.guidance({"aria-label":w,context:$,isDisabled:r&&p(r,s),isMulti:g,isSearchable:m,tabSelectsValue:C,isInitialFocus:T})}return P},[w,r,i,g,p,m,b,y,s,C,T]),k=Te(I.Fragment,null,Te("span",{id:"aria-selection"},S),Te("span",{id:"aria-focused"},D),Te("span",{id:"aria-results"},A),Te("span",{id:"aria-guidance"},F));return Te(I.Fragment,null,Te(sv,{id:u},T&&k),Te(sv,{"aria-live":B,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!T&&k))},UM=GM,gg=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XM=new RegExp("["+gg.map(function(e){return e.letters}).join("")+"]","g"),C3={};for(var Sh=0;Sh<gg.length;Sh++)for(var wh=gg[Sh],Ih=0;Ih<wh.letters.length;Ih++)C3[wh.letters[Ih]]=wh.base;var E3=function(t){return t.replace(XM,function(n){return C3[n]})},ZM=VM(E3),lv=function(t){return t.replace(/^\s+|\s+$/g,"")},YM=function(t){return"".concat(t.label," ").concat(t.value)},KM=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Be({ignoreCase:!0,ignoreAccents:!0,stringify:YM,trim:!0,matchFrom:"any"},t),a=i.ignoreCase,o=i.ignoreAccents,s=i.stringify,l=i.trim,u=i.matchFrom,c=l?lv(r):r,d=l?lv(s(n)):s(n);return a&&(c=c.toLowerCase(),d=d.toLowerCase()),o&&(c=ZM(c),d=E3(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},qM=["innerRef"];function JM(e){var t=e.innerRef,n=Wi(e,qM),r=SN(n,"onExited","in","enter","exit","appear");return Te("input",$e({ref:t},r,{css:dm({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var QM=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function eL(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=I.useRef(!1),s=I.useRef(!1),l=I.useRef(0),u=I.useRef(null),c=I.useCallback(function(m,b){if(u.current!==null){var v=u.current,x=v.scrollTop,C=v.scrollHeight,E=v.clientHeight,w=u.current,B=b>0,y=C-E-x,S=!1;y>b&&o.current&&(r&&r(m),o.current=!1),B&&s.current&&(a&&a(m),s.current=!1),B&&b>y?(n&&!o.current&&n(m),w.scrollTop=C,S=!0,o.current=!0):!B&&-b>x&&(i&&!s.current&&i(m),w.scrollTop=0,S=!0,s.current=!0),S&&QM(m)}},[n,r,i,a]),d=I.useCallback(function(m){c(m,m.deltaY)},[c]),h=I.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),f=I.useCallback(function(m){var b=l.current-m.changedTouches[0].clientY;c(m,b)},[c]),g=I.useCallback(function(m){if(m){var b=xN?{passive:!1}:!1;m.addEventListener("wheel",d,b),m.addEventListener("touchstart",h,b),m.addEventListener("touchmove",f,b)}},[f,h,d]),p=I.useCallback(function(m){m&&(m.removeEventListener("wheel",d,!1),m.removeEventListener("touchstart",h,!1),m.removeEventListener("touchmove",f,!1))},[f,h,d]);return I.useEffect(function(){if(t){var m=u.current;return g(m),function(){p(m)}}},[t,g,p]),function(m){u.current=m}}var uv=["boxSizing","height","overflow","paddingRight","position"],cv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function dv(e){e.preventDefault()}function fv(e){e.stopPropagation()}function hv(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gv(){return"ontouchstart"in window||navigator.maxTouchPoints}var pv=!!(typeof window<"u"&&window.document&&window.document.createElement),Os=0,No={capture:!1,passive:!1};function tL(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=I.useRef({}),a=I.useRef(null),o=I.useCallback(function(l){if(pv){var u=document.body,c=u&&u.style;if(r&&uv.forEach(function(g){var p=c&&c[g];i.current[g]=p}),r&&Os<1){var d=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,f=window.innerWidth-h+d||0;Object.keys(cv).forEach(function(g){var p=cv[g];c&&(c[g]=p)}),c&&(c.paddingRight="".concat(f,"px"))}u&&gv()&&(u.addEventListener("touchmove",dv,No),l&&(l.addEventListener("touchstart",hv,No),l.addEventListener("touchmove",fv,No))),Os+=1}},[r]),s=I.useCallback(function(l){if(pv){var u=document.body,c=u&&u.style;Os=Math.max(Os-1,0),r&&Os<1&&uv.forEach(function(d){var h=i.current[d];c&&(c[d]=h)}),u&&gv()&&(u.removeEventListener("touchmove",dv,No),l&&(l.removeEventListener("touchstart",hv,No),l.removeEventListener("touchmove",fv,No)))}},[r]);return I.useEffect(function(){if(t){var l=a.current;return o(l),function(){s(l)}}},[t,o,s]),function(l){a.current=l}}function nL(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var rL=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},iL=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:nL};function aL(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,o=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=eL({isEnabled:i,onBottomArrive:a,onBottomLeave:o,onTopArrive:s,onTopLeave:l}),c=tL({isEnabled:n}),d=function(f){u(f),c(f)};return Te(I.Fragment,null,n&&Te("div",{onClick:rL,css:iL}),t(d))}function oL(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var sL=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:oL},lL=function(t){var n=t.name,r=t.onFocus;return Te("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:sL,value:"",onChange:function(){}})},uL=lL;function hm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function cL(){return hm(/^iPhone/i)}function S3(){return hm(/^Mac/i)}function dL(){return hm(/^iPad/i)||S3()&&navigator.maxTouchPoints>1}function fL(){return cL()||dL()}function hL(){return S3()||fL()}var gL=function(t){return t.label},pL=function(t){return t.label},mL=function(t){return t.value},bL=function(t){return!!t.isDisabled},vL={clearIndicator:JN,container:VN,control:aM,dropdownIndicator:KN,group:uM,groupHeading:dM,indicatorsContainer:zN,indicatorSeparator:eM,input:pM,loadingIndicator:rM,loadingMessage:FN,menu:AN,menuList:$N,menuPortal:LN,multiValue:xM,multiValueLabel:CM,multiValueRemove:EM,noOptionsMessage:PN,option:AM,placeholder:BM,singleValue:PM,valueContainer:jN},yL={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},xL=4,w3=4,CL=38,EL=w3*2,SL={baseUnit:w3,controlHeight:CL,menuGutter:EL},_h={borderRadius:xL,colors:yL,spacing:SL},wL={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:iv(),captureMenuScroll:!iv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:KM(),formatGroupLabel:gL,getOptionLabel:pL,getOptionValue:mL,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:bL,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vN(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function mv(e,t,n,r){var i=D3(e,t,n),a=A3(e,t,n),o=_3(e,t),s=Td(e,t);return{type:"option",data:t,isDisabled:i,isSelected:a,label:o,value:s,index:r}}function Mc(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,s){return mv(e,o,t,s)}).filter(function(o){return vv(e,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=mv(e,n,t,r);return vv(e,a)?a:void 0}).filter(CN)}function I3(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Qp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function bv(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Qp(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function IL(e,t){return I3(Mc(e,t))}function vv(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!R3(e)||!a)&&T3(e,{label:o,value:s,data:i},r)}function _L(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var a=t.indexOf(n);if(a>-1)return n;if(i<t.length)return t[i]}return null}function DL(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Dh=function(t,n){var r,i=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return i||null},_3=function(t,n){return t.getOptionLabel(n)},Td=function(t,n){return t.getOptionValue(n)};function D3(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function A3(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Td(e,t);return n.some(function(i){return Td(e,i)===r})}function T3(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var R3=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},AL=1,B3=function(e){GP(n,e);var t=ZP(n);function n(r){var i;if(WP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=hL(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,u){var c=i.props,d=c.onChange,h=c.name;u.name=h,i.ariaOnChange(l,u),d(l,u)},i.setValue=function(l,u,c){var d=i.props,h=d.closeMenuOnSelect,f=d.isMulti,g=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),h&&(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:u,option:c})},i.selectOption=function(l){var u=i.props,c=u.blurInputOnSelect,d=u.isMulti,h=u.name,f=i.state.selectValue,g=d&&i.isOptionSelected(l,f),p=i.isOptionDisabled(l,f);if(g){var m=i.getOptionValue(l);i.setValue(f.filter(function(b){return i.getOptionValue(b)!==m}),"deselect-option",l)}else if(!p)d?i.setValue([].concat(Qp(f),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}c&&i.blurInput()},i.removeValue=function(l){var u=i.props.isMulti,c=i.state.selectValue,d=i.getOptionValue(l),h=c.filter(function(g){return i.getOptionValue(g)!==d}),f=Ku(u,h,h[0]||null);i.onChange(f,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Ku(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),h=Ku(l,d,d[0]||null);i.onChange(h,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(l){return Dh(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return bv(Mc(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return hN.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(l){return _3(i.props,l)},i.getOptionValue=function(l){return Td(i.props,l)},i.getStyles=function(l,u){var c=i.props.unstyled,d=vL[l](u,c);d.boxSizing="border-box";var h=i.props.styles[l];return h?h(d,u):d},i.getClassNames=function(l,u){var c,d;return(c=(d=i.props.classNames)[l])===null||c===void 0?void 0:c.call(d,u)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return MM(i.props)},i.buildCategorizedOptions=function(){return Mc(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return I3(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,u){i.setState({ariaSelection:Be({value:l},u)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Bf(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var u=l.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var u=l.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-i.initialTouchX),h=Math.abs(c.clientY-i.initialTouchY),f=5;i.userIsDragging=d>f||h>f}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var u=i.props.inputValue,c=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var u=i.getFocusableOptions(),c=u.indexOf(l);i.setState({focusedOption:l,focusedOptionId:c>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return R3(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var u=i.props,c=u.isMulti,d=u.backspaceRemovesValue,h=u.escapeClearsValue,f=u.inputValue,g=u.isClearable,p=u.isDisabled,m=u.menuIsOpen,b=u.onKeyDown,v=u.tabSelectsValue,x=u.openMenuOnFocus,C=i.state,E=C.focusedOption,w=C.focusedValue,B=C.selectValue;if(!p&&!(typeof b=="function"&&(b(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||f)return;i.focusValue("previous");break;case"ArrowRight":if(!c||f)return;i.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(w)i.removeValue(w);else{if(!d)return;c?i.popValue():g&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!v||!E||x&&i.isOptionSelected(E,B))return;i.selectOption(E);break;case"Enter":if(l.keyCode===229)break;if(m){if(!E||i.isComposing)return;i.selectOption(E);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:f}),i.onMenuClose()):g&&h&&i.clearValue();break;case" ":if(f)return;if(!m){i.openMenu("first");break}if(!E)return;i.selectOption(E);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++AL),i.state.selectValue=nv(r.value),r.menuIsOpen&&i.state.selectValue.length){var a=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=a,i.state.focusedOption=o[s],i.state.focusedOptionId=Dh(a,o[s])}return i}return zP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&rv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!o&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(rv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,a){this.props.onInputChange(i,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var a=this,o=this.state,s=o.selectValue,l=o.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(s[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(i){var a=this.state,o=a.selectValue,s=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(s);s||(l=-1);var u=o.length-1,c=-1;if(o.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l<u&&(c=l+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,o=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(o);o||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-a,l<0&&(l=0)):i==="pagedown"?(l=u+a,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(_h):Be(Be({},_h),this.props.theme):_h}},{key:"getCommonProps",value:function(){var i=this.clearValue,a=this.cx,o=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,h=d.isMulti,f=d.isRtl,g=d.options,p=this.hasValue();return{clearValue:i,cx:a,getStyles:o,getClassNames:s,getValue:l,hasValue:p,isMulti:h,isRtl:f,options:g,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,a=i.isClearable,o=i.isMulti;return a===void 0?o:a}},{key:"isOptionDisabled",value:function(i,a){return D3(this.props,i,a)}},{key:"isOptionSelected",value:function(i,a){return A3(this.props,i,a)}},{key:"filterOption",value:function(i,a){return T3(this.props,i,a)}},{key:"formatOptionLabel",value:function(i,a){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:a,inputValue:o,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,a=i.isDisabled,o=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,d=i.menuIsOpen,h=i.required,f=this.getComponents(),g=f.Input,p=this.state,m=p.inputIsHidden,b=p.ariaSelection,v=this.commonProps,x=s||this.getElementId("input"),C=Be(Be(Be({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?J.createElement(g,$e({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:a,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},C)):J.createElement(JM,$e({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Dd,onFocus:this.onInputFocus,disabled:a,tabIndex:u,inputMode:"none",form:c,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,a=this.getComponents(),o=a.MultiValue,s=a.MultiValueContainer,l=a.MultiValueLabel,u=a.MultiValueRemove,c=a.SingleValue,d=a.Placeholder,h=this.commonProps,f=this.props,g=f.controlShouldRenderValue,p=f.isDisabled,m=f.isMulti,b=f.inputValue,v=f.placeholder,x=this.state,C=x.selectValue,E=x.focusedValue,w=x.isFocused;if(!this.hasValue()||!g)return b?null:J.createElement(d,$e({},h,{key:"placeholder",isDisabled:p,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(m)return C.map(function(y,S){var D=y===E,A="".concat(i.getOptionLabel(y),"-").concat(i.getOptionValue(y));return J.createElement(o,$e({},h,{components:{Container:s,Label:l,Remove:u},isFocused:D,isDisabled:p,key:A,index:S,removeProps:{onClick:function(){return i.removeValue(y)},onTouchEnd:function(){return i.removeValue(y)},onMouseDown:function(F){F.preventDefault()}},data:y}),i.formatOptionLabel(y,"value"))});if(b)return null;var B=C[0];return J.createElement(c,$e({},h,{data:B,isDisabled:p}),this.formatOptionLabel(B,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),a=i.ClearIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),a=i.LoadingIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!a||!u)return null;var d={"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator,o=i.IndicatorSeparator;if(!a||!o)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return J.createElement(o,$e({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator;if(!a)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,a=this.getComponents(),o=a.Group,s=a.GroupHeading,l=a.Menu,u=a.MenuList,c=a.MenuPortal,d=a.LoadingMessage,h=a.NoOptionsMessage,f=a.Option,g=this.commonProps,p=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,v=m.inputValue,x=m.isLoading,C=m.loadingMessage,E=m.minMenuHeight,w=m.maxMenuHeight,B=m.menuIsOpen,y=m.menuPlacement,S=m.menuPosition,D=m.menuPortalTarget,A=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,F=m.noOptionsMessage,k=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!B)return null;var $=function(K,ee){var z=K.type,H=K.data,X=K.isDisabled,te=K.isSelected,ie=K.label,le=K.value,ce=p===H,Q=X?void 0:function(){return i.onOptionHover(H)},be=X?void 0:function(){return i.selectOption(H)},Ce="".concat(i.getElementId("option"),"-").concat(ee),Se={id:Ce,onClick:be,onMouseMove:Q,onMouseOver:Q,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:te};return J.createElement(f,$e({},g,{innerProps:Se,data:H,isDisabled:X,isSelected:te,key:Ce,label:ie,type:z,value:le,isFocused:ce,innerRef:ce?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(K.data,"menu"))},R;if(this.hasOptions())R=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var K=U.data,ee=U.options,z=U.index,H="".concat(i.getElementId("group"),"-").concat(z),X="".concat(H,"-heading");return J.createElement(o,$e({},g,{key:H,data:K,options:ee,Heading:s,headingProps:{id:X,data:U.data},label:i.formatGroupLabel(U.data)}),U.options.map(function(te){return $(te,"".concat(z,"-").concat(te.index))}))}else if(U.type==="option")return $(U,"".concat(U.index))});else if(x){var O=C({inputValue:v});if(O===null)return null;R=J.createElement(d,g,O)}else{var j=F({inputValue:v});if(j===null)return null;R=J.createElement(h,g,j)}var V={minMenuHeight:E,maxMenuHeight:w,menuPlacement:y,menuPosition:S,menuShouldScrollIntoView:T},W=J.createElement(TN,$e({},g,V),function(U){var K=U.ref,ee=U.placerProps,z=ee.placement,H=ee.maxHeight;return J.createElement(l,$e({},g,V,{innerRef:K,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:z}),J.createElement(aL,{captureEnabled:b,onTopArrive:k,onBottomArrive:P,lockEnabled:A},function(X){return J.createElement(u,$e({},g,{innerRef:function(ie){i.getMenuListRef(ie),X(ie)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:x,maxHeight:H,focusedOption:p}),R)}))});return D||S==="fixed"?J.createElement(c,$e({},g,{appendTo:D,controlElement:this.controlRef,menuPlacement:y,menuPosition:S}),W):W}},{key:"renderFormField",value:function(){var i=this,a=this.props,o=a.delimiter,s=a.isDisabled,l=a.isMulti,u=a.name,c=a.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!s)return J.createElement(uL,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(o){var h=d.map(function(p){return i.getOptionValue(p)}).join(o);return J.createElement("input",{name:u,type:"hidden",value:h})}else{var f=d.length>0?d.map(function(p,m){return J.createElement("input",{key:"i-".concat(m),name:u,type:"hidden",value:i.getOptionValue(p)})}):J.createElement("input",{name:u,type:"hidden",value:""});return J.createElement("div",null,f)}else{var g=d[0]?this.getOptionValue(d[0]):"";return J.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,a=this.state,o=a.ariaSelection,s=a.focusedOption,l=a.focusedValue,u=a.isFocused,c=a.selectValue,d=this.getFocusableOptions();return J.createElement(UM,$e({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),a=i.Control,o=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,d=u.id,h=u.isDisabled,f=u.menuIsOpen,g=this.state.isFocused,p=this.commonProps=this.getCommonProps();return J.createElement(s,$e({},p,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:g}),this.renderLiveRegion(),J.createElement(a,$e({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:g,menuIsOpen:f}),J.createElement(l,$e({},p,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),J.createElement(o,$e({},p,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var o=a.prevProps,s=a.clearFocusValueOnUpdate,l=a.inputIsHiddenAfterUpdate,u=a.ariaSelection,c=a.isFocused,d=a.prevWasFocused,h=a.instancePrefix,f=i.options,g=i.value,p=i.menuIsOpen,m=i.inputValue,b=i.isMulti,v=nv(g),x={};if(o&&(g!==o.value||f!==o.options||p!==o.menuIsOpen||m!==o.inputValue)){var C=p?IL(i,v):[],E=p?bv(Mc(i,v),"".concat(h,"-option")):[],w=s?_L(a,v):null,B=DL(a,C),y=Dh(E,B);x={selectValue:v,focusedOption:B,focusedOptionId:y,focusableOptionsWithIds:E,focusedValue:w,clearFocusValueOnUpdate:!1}}var S=l!=null&&i!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},D=u,A=c&&d;return c&&!A&&(D={value:Ku(b,v,v[0]||null),options:v,action:"initial-input-focus"},A=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(D=null),Be(Be(Be({},x),S),{},{prevProps:i,ariaSelection:D,prevWasFocused:A})}}]),n}(I.Component);B3.defaultProps=wL;var TL=I.forwardRef(function(e,t){var n=jP(e);return J.createElement(B3,$e({ref:t},n))}),RL=TL;const BL="_container_2k8uz_109",Lc={container:BL,"error-payhere":"_error-payhere_2k8uz_109","error-laba":"_error-laba_2k8uz_307","error-bill":"_error-bill_2k8uz_421"},$L={control:e=>({...e,border:"1px solid #D6D6D6","&:hover":{borderColor:"#0163C8"},borderRadius:"4px",outline:"none",boxShadow:"none",color:"#898989",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:32,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},kL={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},PL={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},FL={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},NL={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},ML={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",fontWeight:"500",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},qu={error:{laba:Lc["error-laba"],payhere:Lc["error-payhere"],bill:Lc["error-bill"]},variant:{laba:$L,payhere:kL,bill:PL},noSearchVariant:{laba:FL,payhere:NL,bill:ML},classNamePopover:{laba:"",payhere:"",bill:"!1ru-rounded-xl"}},$3=I.forwardRef((e,t)=>{const{width:n,children:r,components:i,classNameContainer:a="",classNameContainerShowSelect:o="",classNameContainerSelect:s="",classNameLabelError:l="",error:u,onChange:c,externalValue:d=!1,defaultValueButtonDropdown:h={},autoClose:f=!0,onMenuOpen:g=()=>{},autoCloseOutside:p=!0,styleInnerPopper:m={},onMenuClose:b=()=>{},zIndexPopper:v=0,id:x="select-dropdown-container",idPopover:C="select-dropdown-container-popover",useAutoPlacement:E,flipOptions:w,autoPlacementOptions:B,withSearch:y=!1,floatingOptions:S={},offsetPopover:D=5,selectProps:A={},errorLabel:T="payhere",controlType:F="payhere",actionValueChange:k=()=>{},...P}=e,$=I.useRef(null),R=I.useRef(null),[O,j]=I.useState(""),[V,W]=I.useState(!1),[U,K]=I.useState({}),[ee,z]=I.useState(0),H=Q=>{var be;(be=R.current)==null||be.setShow(Q),W(Q)},X=()=>{if(d)return e.isMulti?h:[h]},te=Q=>{var be;(be=R.current)==null||be.handlerShow(Q),z($.current.offsetWidth),W(Ce=>!Ce)},ie=()=>{var Q;p&&((Q=R.current)==null||Q.setShow(!1))},le=(Q,be)=>{var Ce;f&&(W(!1),(Ce=R.current)==null||Ce.setShow(!1)),typeof c=="function"&&c(Q,be),d||K(Q)},ce=()=>{$.current&&z($.current.offsetWidth)};return ba(()=>{d&&K(h),k(h)},[d,h]),I.useEffect(()=>{V?g():V||(b(),j(""))},[V]),I.useImperativeHandle(t,()=>({selectValue:U,setSelectValue:K,handlerClose:ie,handlerShow:te,show:V,setShow:H}),[V,Ol(U)]),I.useEffect(()=>(window.addEventListener("resize",ce),window.addEventListener("load",ce),()=>{window.removeEventListener("resize",ce),window.removeEventListener("load",ce)}),[$]),_.jsxs("div",{id:x,className:`${Lc.container} ${a} ${V?`${o} open-popover`:null}`,ref:$,children:[r({selectValue:U,setSelectValue:K,handlerClose:ie,handlerShow:te,show:V,setShow:H}),_.jsx(gi,{ref:R,offset:D,useAutoPlacement:E,flipOptions:w,autoPlacementOptions:B,zIndex:v,styleInnerPopover:m,id:C,width:typeof n=="function"?n(ee,U):n||ee,className:`${s} ${qu.classNamePopover[F]}`,floatingOptions:S,children:_.jsx(RL,{className:"1ru-w-full",defaultValue:X(),inputValue:O,onInputChange:(Q,{action:be})=>{be==="input-change"&&j(Q)},openMenuOnFocus:!0,autoFocus:!1,backspaceRemovesValue:!1,components:{IndicatorSeparator:null,...i},controlShouldRenderValue:!1,hideSelectedOptions:!1,isClearable:!1,menuIsOpen:!0,tabSelectsValue:!1,styles:y?qu.variant[F]:qu.noSearchVariant[F],noOptionsMessage:()=>"Tidak ada data.",onChange:le,selectProps:{...A,setShowDropdown:H},...P})}),_.jsx("div",{className:`${qu.error[T]} ${l}`,children:u})]})});$3.displayName="SelectDropdownContainer";function is(e,t){return e-t*Math.floor(e/t)}const k3=1721426;function eo(e,t,n,r){t=Eu(e,t);let i=t-1,a=-2;return n<=2?a=0:ca(t)&&(a=-1),k3-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function ca(e){return e%4===0&&(e%100!==0||e%400===0)}function Eu(e,t){return e==="BC"?1-t:t}function $f(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const LL={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class ar{fromJulianDay(t){let n=t,r=n-k3,i=Math.floor(r/146097),a=is(r,146097),o=Math.floor(a/36524),s=is(a,36524),l=Math.floor(s/1461),u=is(s,1461),c=Math.floor(u/365),d=i*400+o*100+l*4+c+(o!==4&&c!==4?1:0),[h,f]=$f(d),g=n-eo(h,f,1,1),p=2;n<eo(h,f,3,1)?p=0:ca(f)&&(p=1);let m=Math.floor(((g+p)*12+373)/367),b=n-eo(h,f,m,1)+1;return new Ot(h,f,m,b)}toJulianDay(t){return eo(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return LL[ca(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return ca(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const OL={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function zt(e,t){return t=rn(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function pg(e,t){return e.calendar.identifier===t.calendar.identifier&&e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function VL(e,t){return zt(e,gm(t))}function kf(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-GL(t))%7;return r<0&&(r+=7),r}function HL(e){return ii(Date.now(),e)}function gm(e){return Bn(HL(e))}function P3(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function F3(e,t){return yv(e)-yv(t)}function yv(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Ah=null;function Kn(){return Ah==null&&(Ah=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ah}function Su(e){return e.subtract({days:e.day-1})}function mg(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function jL(e){return Su(e.subtract({months:e.month-1}))}function zl(e,t){let n=kf(e,t);return e.subtract({days:n})}function WL(e,t){return zl(e,t).add({days:6})}const xv=new Map;function zL(e){if(Intl.Locale){let n=xv.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&xv.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function GL(e){let t=zL(e);return t&&OL[t]||0}function N3(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((kf(Su(e),t)+n)/7)}function pm(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function mm(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ys(e){e=rn(e,new ar);let t=Eu(e.era,e.year);return M3(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function M3(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function bg(e,t){if(t==="UTC")return 0;if(e>0&&t===Kn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=L3(e,t);return M3(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}const Cv=new Map;function L3(e,t){let n=Cv.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Cv.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Ev=864e5;function UL(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>XL(e,t,a))}function XL(e,t,n){let r=L3(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Ti(e,t,n="compatible"){let r=Ia(e);if(t==="UTC")return ys(r);if(t===Kn()&&n==="compatible"){r=rn(r,new ar);let l=new Date,u=Eu(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=ys(r),a=bg(i-Ev,t),o=bg(i+Ev,t),s=UL(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-o);case"compatible":case"later":return Math.max(i-a,i-o);case"reject":throw new RangeError("No such absolute time found")}}function O3(e,t,n="compatible"){return new Date(Ti(e,t,n))}function ii(e,t){let n=bg(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new Ul(i,a,o,t,n,s,l,u,c)}function Sv(e,t){return ii(e.getTime(),t)}function Bn(e){return new Ot(e.calendar,e.era,e.year,e.month,e.day)}function Ia(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Rd(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function rn(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,bo(r),r}function ZL(e,t,n){if(e instanceof Ul)return e.timeZone===t?e:KL(e,t);let r=Ti(e,t,n);return ii(r,t)}function YL(e){let t=ys(e)-e.offset;return new Date(t)}function KL(e,t){let n=ys(e)-e.offset;return rn(ii(n,t),e.calendar)}const Vs=36e5;function Pf(e,t){let n=e.copy(),r="hour"in n?W3(n,t):0;vg(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,yg(n),V3(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,qL(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let l=(a=(o=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(o,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vg(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function yg(e){for(;e.month<1;)vg(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vg(e,1)}function qL(e){for(;e.day<1;)e.month--,yg(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,yg(e)}function V3(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function bo(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),V3(e)}function bm(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function H3(e,t){return Pf(e,bm(t))}function vm(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),bo(n),n}function Gl(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),j3(n),n}function JL(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Ju(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Ju(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Ju(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Ju(e.hour,24),t}function j3(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Ju(e,t){let n=e%t;return n<0&&(n+=t),n}function W3(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,JL(e)}function z3(e,t){let n=e.copy();return W3(n,t),n}function QL(e,t){return z3(e,bm(t))}function ym(e,t,n,r){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=Fi(l,n,0,s.length-1,r==null?void 0:r.round),i.era=s[l],bo(i);break}case"year":var a,o;!((a=(o=i.calendar).isInverseEra)===null||a===void 0)&&a.call(o,i)&&(n=-n),i.year=Fi(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=Fi(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=Fi(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),bo(i),i}function xm(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,o=0,s=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;o=l?12:0,s=l?23:11}i.hour=Fi(a,n,o,s,r==null?void 0:r.round);break}case"minute":i.minute=Fi(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=Fi(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=Fi(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function Fi(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function G3(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Pf(Ia(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Ti(i,e.timeZone)}else n=ys(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=ii(n,e.timeZone);return rn(r,e.calendar)}function eO(e,t){return G3(e,bm(t))}function tO(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let g=e.hour>=12;i=g?12:0,a=g?23:11}let o=Ia(e),s=rn(Gl(o,{hour:i}),new ar),l=[Ti(s,e.timeZone,"earlier"),Ti(s,e.timeZone,"later")].filter(g=>ii(g,e.timeZone).day===s.day)[0],u=rn(Gl(o,{hour:a}),new ar),c=[Ti(u,e.timeZone,"earlier"),Ti(u,e.timeZone,"later")].filter(g=>ii(g,e.timeZone).day===u.day).pop(),d=ys(e)-e.offset,h=Math.floor(d/Vs),f=d%Vs;return d=Fi(h,n,Math.floor(l/Vs),Math.floor(c/Vs),r==null?void 0:r.round)*Vs+f,rn(ii(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return xm(e,t,n,r);case"era":case"year":case"month":case"day":{let i=ym(Ia(e),t,n,r),a=Ti(i,e.timeZone);return rn(ii(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function nO(e,t,n){let r=Ia(e),i=Gl(vm(r,t),t);if(i.compare(r)===0)return e;let a=Ti(i,e.timeZone,n);return rn(ii(a,e.timeZone),e.calendar)}const rO=/^(\d{4})-(\d{2})-(\d{2})$/;function Cm(e){let t=e.match(rO);if(!t)throw new Error("Invalid ISO 8601 date string: "+e);let n=new Ot(Th(t[1],0,9999),Th(t[2],1,12),1);return n.day=Th(t[3],0,n.calendar.getDaysInMonth(n)),n}function Th(e,t,n){let r=Number(e);if(r<t||r>n)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function U3(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function X3(e){let t=rn(e,new ar);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Z3(e){return`${X3(e)}T${U3(e)}`}function iO(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function aO(e){return`${Z3(e)}${iO(e.offset)}[${e.timeZone}]`}function oO(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wu(e,t,n){oO(e,t),t.set(e,n)}function Em(e){let t=typeof e[0]=="object"?e.shift():new ar,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var sO=new WeakMap;class Ot{copy(){return this.era?new Ot(this.calendar,this.era,this.year,this.month,this.day):new Ot(this.calendar,this.year,this.month,this.day)}add(t){return Pf(this,t)}subtract(t){return H3(this,t)}set(t){return vm(this,t)}cycle(t,n,r){return ym(this,t,n,r)}toDate(t){return O3(this,t)}toString(){return X3(this)}compare(t){return P3(this,t)}constructor(...t){wu(this,sO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,bo(this)}}var lO=new WeakMap;class Sm{copy(){return new Sm(this.hour,this.minute,this.second,this.millisecond)}add(t){return z3(this,t)}subtract(t){return QL(this,t)}set(t){return Gl(this,t)}cycle(t,n,r){return xm(this,t,n,r)}toString(){return U3(this)}compare(t){return F3(this,t)}constructor(t=0,n=0,r=0,i=0){wu(this,lO,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,j3(this)}}var uO=new WeakMap;class Rd{copy(){return this.era?new Rd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Rd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Pf(this,t)}subtract(t){return H3(this,t)}set(t){return vm(Gl(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return ym(this,t,n,r);default:return xm(this,t,n,r)}}toDate(t,n){return O3(this,t,n)}toString(){return Z3(this)}compare(t){let n=P3(this,t);return n===0?F3(this,Ia(t)):n}constructor(...t){wu(this,uO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,bo(this)}}var cO=new WeakMap;class Ul{copy(){return this.era?new Ul(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ul(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return G3(this,t)}subtract(t){return eO(this,t)}set(t,n){return nO(this,t,n)}cycle(t,n,r){return tO(this,t,n,r)}toDate(){return YL(this)}toString(){return aO(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-ZL(t,this.timeZone).toDate().getTime()}constructor(...t){wu(this,cO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,bo(this)}}const as=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],dO=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Oc=[1867,1911,1925,1988,2018],ea=["meiji","taisho","showa","heisei","reiwa"];function wv(e){const t=as.findIndex(([n,r,i])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<i);return t===-1?as.length-1:t===0?0:t-1}function Rh(e){let t=Oc[ea.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Ot(e.year+t,e.month,e.day)}class fO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=wv(n);return new Ot(this,ea[r],n.year-Oc[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(Rh(t))}balanceDate(t){let n=Rh(t),r=wv(n);ea[r]!==t.era&&(t.era=ea[r],t.year=n.year-Oc[r]),this.constrainDate(t)}constrainDate(t){let n=ea.indexOf(t.era),r=dO[n];if(r!=null){let[i,a,o]=r,s=i-Oc[n];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(a,t.month),t.month===a&&(t.day=Math.min(o,t.day)))}if(t.year===1&&n>=0){let[,i,a]=as[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return ea}getYearsInEra(t){let n=ea.indexOf(t.era),r=as[n],i=as[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month<i[1]||t.month===i[1]&&t.day<i[2])&&a++,a}getDaysInMonth(t){return super.getDaysInMonth(Rh(t))}getMinimumMonthInYear(t){let n=Iv(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=Iv(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function Iv(e){if(e.year===1){let t=ea.indexOf(e.era);return as[t]}}const Y3=-543;class hO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=Eu(n.era,n.year);return new Ot(this,r-Y3,n.month,n.day)}toJulianDay(t){return super.toJulianDay(_v(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(_v(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function _v(e){let[t,n]=$f(e.year+Y3);return new Ot(t,n,e.month,e.day)}const Bd=1911;function K3(e){return e.era==="minguo"?e.year+Bd:1-e.year+Bd}function Dv(e){let t=e-Bd;return t>0?["minguo",t]:["before_minguo",1-t]}class gO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=Eu(n.era,n.year),[i,a]=Dv(r);return new Ot(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(Av(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=Dv(K3(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(Av(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Bd}constructor(...t){super(...t),this.identifier="roc"}}function Av(e){let[t,n]=$f(K3(e));return new Ot(t,n,e.month,e.day)}const Tv=1948320,Rv=[0,31,62,93,124,155,186,216,246,276,306,336];class pO{fromJulianDay(t){let n=t-Tv,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,o=a<216?Math.floor(a/31):Math.floor((a-6)/30),s=a-Rv[o]+1;return new Ot(this,r,o+1,s)}toJulianDay(t){let n=Tv-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=Rv[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||is(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Bh=78,Bv=80;class mO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-Bh,i=t-eo(n.era,n.year,1,1),a;i<Bv?(r--,a=ca(n.year-1)?31:30,i+=a+155+90+10):(a=ca(n.year)?31:30,i-=Bv);let o,s;if(i<a)o=1,s=i+1;else{let l=i-a;l<155?(o=Math.floor(l/31)+2,s=l%31+1):(l-=155,o=Math.floor(l/30)+7,s=l%30+1)}return new Ot(this,r,o,s)}toJulianDay(t){let n=t.year+Bh,[r,i]=$f(n),a,o;return ca(i)?(a=31,o=eo(r,i,3,21)):(a=30,o=eo(r,i,3,22)),t.month===1?o+t.day-1:(o+=a+Math.min(t.month-2,5)*31,t.month>=8&&(o+=(t.month-7)*30),o+=t.day-1,o)}getDaysInMonth(t){return t.month===1&&ca(t.year+Bh)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const $d=1948440,$v=1948439,hr=1300,Mo=1600,bO=460322;function kd(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function q3(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+kd(t,r,1,1)))/29.5)+1),a=n-kd(t,r,i,1)+1;return new Ot(e,r,i,a)}function kv(e){return(14+11*e)%30<11}class wm{fromJulianDay(t){return q3(this,$d,t)}toJulianDay(t){return kd($d,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&kv(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return kv(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vO extends wm{fromJulianDay(t){return q3(this,$v,t)}toJulianDay(t){return kd($v,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const yO="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let xg,os;function Vc(e){return bO+os[e-hr]}function tl(e,t){let n=e-hr,r=1<<11-(t-1);return xg[n]&r?30:29}function Pv(e,t){let n=Vc(e);for(let r=1;r<t;r++)n+=tl(e,r);return n}function Fv(e){return os[e+1-hr]-os[e-hr]}class xO extends wm{fromJulianDay(t){let n=t-$d,r=Vc(hr),i=Vc(Mo);if(n<r||n>i)return super.fromJulianDay(t);{let a=hr-1,o=1,s=1;for(;s>0;){a++,s=n-Vc(a)+1;let l=Fv(a);if(s===l){o=12;break}else if(s<l){let u=tl(a,o);for(o=1;s>u;)s-=u,o++,u=tl(a,o);break}}return new Ot(this,a,o,n-Pv(a,o)+1)}}toJulianDay(t){return t.year<hr||t.year>Mo?super.toJulianDay(t):$d+Pv(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<hr||t.year>Mo?super.getDaysInMonth(t):tl(t.year,t.month)}getDaysInYear(t){return t.year<hr||t.year>Mo?super.getDaysInYear(t):Fv(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",xg||(xg=new Uint16Array(Uint8Array.from(atob(yO),t=>t.charCodeAt(0)).buffer)),!os){os=new Uint32Array(Mo-hr+1);let t=0;for(let n=hr;n<=Mo;n++){os[n-hr]=t;for(let r=1;r<=12;r++)t+=tl(n,r)}}}}const Nv=347997,J3=1080,Q3=24*J3,CO=29,EO=12*J3+793,SO=CO*Q3+EO;function Ya(e){return is(e*7+1,19)<7}function Hc(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return is(3*(r+1),7)<3&&(r+=1),r}function wO(e){let t=Hc(e-1),n=Hc(e);return Hc(e+1)-n===356?2:n-t===382?1:0}function vl(e){return Hc(e)+wO(e)}function eE(e){return vl(e+1)-vl(e)}function IO(e){let t=eE(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function Qu(e,t){if(t>=6&&!Ya(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=IO(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Ya(e)?30:0:30}class _O{fromJulianDay(t){let n=t-Nv,r=n*Q3/SO,i=Math.floor((19*r+234)/235)+1,a=vl(i),o=Math.floor(n-a);for(;o<1;)i--,a=vl(i),o=Math.floor(n-a);let s=1,l=0;for(;l<o;)l+=Qu(i,s),s++;s--,l-=Qu(i,s);let u=o-l;return new Ot(this,i,s,u)}toJulianDay(t){let n=vl(t.year);for(let r=1;r<t.month;r++)n+=Qu(t.year,r);return n+t.day+Nv}getDaysInMonth(t){return Qu(t.year,t.month)}getMonthsInYear(t){return Ya(t.year)?13:12}getDaysInYear(t){return eE(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(Ya(n.year)&&!Ya(t.year)&&n.month>6?t.month--:!Ya(n.year)&&Ya(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Cg=1723856,Mv=1824665,Eg=5500;function Pd(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function Im(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Pd(e,n,1,1))/30),i=t+1-Pd(e,n,r,1);return[n,r,i]}function tE(e){return Math.floor(e%4/3)}function nE(e,t){return t%13!==0?30:tE(e)+5}class _m{fromJulianDay(t){let[n,r,i]=Im(Cg,t),a="AM";return n<=0&&(a="AA",n+=Eg),new Ot(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=Eg),Pd(Cg,n,t.month,t.day)}getDaysInMonth(t){return nE(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+tE(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class DO extends _m{fromJulianDay(t){let[n,r,i]=Im(Cg,t);return n+=Eg,new Ot(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class AO extends _m{fromJulianDay(t){let[n,r,i]=Im(Mv,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Ot(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Pd(Mv,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),nE(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Iu(e){switch(e){case"buddhist":return new hO;case"ethiopic":return new _m;case"ethioaa":return new DO;case"coptic":return new AO;case"hebrew":return new _O;case"indian":return new mO;case"islamic-civil":return new wm;case"islamic-tbla":return new vO;case"islamic-umalqura":return new xO;case"japanese":return new fO;case"persian":return new pO;case"roc":return new gO;case"gregory":default:return new ar}}let $h=new Map;class Xl{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return BO()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$O(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,n={}){this.formatter=rE(t,n),this.options=n}}const TO={true:{ja:"h11"},false:{}};function rE(e,t={}){if(typeof t.hour12=="boolean"&&RO()){t={...t};let i=TO[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if($h.has(n))return $h.get(n);let r=new Intl.DateTimeFormat(e,t);return $h.set(n,r),r}let kh=null;function RO(){return kh==null&&(kh=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),kh}let Ph=null;function BO(){return Ph==null&&(Ph=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ph}function $O(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 n=rE(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const _o=typeof document<"u"?I.useLayoutEffect:()=>{};function Ri(e){const t=I.useRef(null);return _o(()=>{t.current=e},[e]),I.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function kO(e){let[t,n]=I.useState(e),r=I.useRef(null),i=Ri(()=>{if(!r.current)return;let o=r.current.next();if(o.done){r.current=null;return}t===o.value?i():n(o.value)});_o(()=>{r.current&&i()});let a=Ri(o=>{r.current=o(t),i()});return[t,a]}const Fd={prefix:String(Math.round(Math.random()*1e10)),current:0},iE=I.createContext(Fd),PO=I.createContext(!1);let FO=!!(typeof window<"u"&&window.document&&window.document.createElement),Fh=new WeakMap;function NO(e=!1){let t=I.useContext(iE),n=I.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let o=Fh.get(a);o==null?Fh.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==o.state&&(t.current=o.id,Fh.delete(a))}n.current=++t.current}return n.current}function MO(e){let t=I.useContext(iE);t===Fd&&!FO&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=NO(!!e),r=t===Fd&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function LO(e){let t=I.useId(),[n]=I.useState(aE()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Fd.prefix}`;return e||`${r}-${t}`}const OO=typeof I.useId=="function"?LO:MO;function VO(){return!1}function HO(){return!0}function jO(e){return()=>{}}function aE(){return typeof I.useSyncExternalStore=="function"?I.useSyncExternalStore(jO,VO,HO):I.useContext(PO)}let WO=!!(typeof window<"u"&&window.document&&window.document.createElement),Nd=new Map;function xs(e){let[t,n]=I.useState(e),r=I.useRef(null),i=OO(t),a=I.useCallback(o=>{r.current=o},[]);return WO&&Nd.set(i,a),_o(()=>{let o=i;return()=>{Nd.delete(o)}},[i]),I.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),i}function zO(e,t){if(e===t)return e;let n=Nd.get(e);if(n)return n(t),t;let r=Nd.get(t);return r?(r(e),e):t}function Sg(e=[]){let t=xs(),[n,r]=kO(t),i=I.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return _o(i,[t,i,...e]),n}function oE(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const yn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Br=e=>e&&"window"in e&&e.window===e?e:yn(e).defaultView||window;function Gn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],o=r[i];typeof a=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=oE(a,o):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof o=="string"?t[i]=ki(a,o):i==="id"&&a&&o?t.id=zO(a,o):t[i]=o!==void 0?o:a}}return t}const GO=new Set(["id"]),UO=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),XO=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ZO=/^(data-.*)$/;function Dm(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(GO.has(o)||n&&UO.has(o)||r&&XO.has(o)||i!=null&&i.has(o)||ZO.test(o))&&(a[o]=e[o]);return a}function da(e){if(YO())e.focus({preventScroll:!0});else{let t=KO(e);e.focus(),qO(t)}}let ec=null;function YO(){if(ec==null){ec=!1;try{document.createElement("div").focus({get preventScroll(){return ec=!0,!0}})}catch{}}return ec}function KO(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function qO(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Ff(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Am(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Zl(){return Am(/^Mac/i)}function JO(){return Am(/^iPhone/i)}function sE(){return Am(/^iPad/i)||Zl()&&navigator.maxTouchPoints>1}function lE(){return JO()||sE()}function QO(){return Ff(/AppleWebKit/i)&&!eV()}function eV(){return Ff(/Chrome/i)}function uE(){return Ff(/Android/i)}function tV(){return Ff(/Firefox/i)}function Yl(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}=t;tV()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Zl()?a=!0:o=!0);let u=QO()&&Zl()&&!sE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});Yl.isOpening=n,da(e),e.dispatchEvent(u),Yl.isOpening=!1}Yl.isOpening=!1;let Xo=new Map,wg=new Set;function Lv(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Xo.get(r.target);i||(i=new Set,Xo.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Xo.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Xo.delete(r.target)),Xo.size===0)){for(let a of wg)a();wg.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Lv():document.addEventListener("DOMContentLoaded",Lv));function cE(e){requestAnimationFrame(()=>{Xo.size===0?e():wg.add(e)})}function nV(){let e=I.useRef(new Map),t=I.useCallback((i,a,o,s)=>{let l=s!=null&&s.once?(...u)=>{e.current.delete(o),o(...u)}:o;e.current.set(o,{type:a,eventTarget:i,fn:l,options:s}),i.addEventListener(a,o,s)},[]),n=I.useCallback((i,a,o,s)=>{var l;let u=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(a,u,s),e.current.delete(o)},[]),r=I.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return I.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Tm(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=xs(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Ov(e,t){const n=I.useRef(!0),r=I.useRef(null);I.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),I.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((i,a)=>!Object.is(i,r[a])))&&e(),r.current=t},t)}function dE(e,t){_o(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Ig(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function rV(e,t){let n=e;for(Ig(n,t)&&(n=n.parentElement);n&&!Ig(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function iV(e,t){const n=[];for(;e&&e!==document.documentElement;)Ig(e,t)&&n.push(e),e=e.parentElement;return n}let aV=0;const Nh=new Map;function fE(e){let[t,n]=I.useState();return _o(()=>{if(!e)return;let r=Nh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${aV++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},Nh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Nh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mh(e,t,n,r){let i=Ri(n),a=n==null;I.useEffect(()=>{if(a||!e.current)return;let o=e.current;return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[e,t,r,a,i])}function oV(e,t){let n=Vv(e,t,"left"),r=Vv(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),h=c+e.clientWidth,f=d+e.clientHeight;n<=o?o=n-parseInt(u,10):n+i>h&&(o+=n+i-h),r<=d?s=r-parseInt(l,10):r+a>f&&(s+=r+a-f),e.scrollLeft=o,e.scrollTop=s}function Vv(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function sV(e,t){if(document.contains(e)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let l=iV(e);for(let u of l)oV(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:d}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function _g(e){return e.mozInputSource===0&&e.isTrusted?!0:uE()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lV(e){return!uE()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function hE(e,t){let n=I.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function Kl(e,t,n){let[r,i]=I.useState(e||t),a=I.useRef(e!==void 0),o=e!==void 0;I.useEffect(()=>{let u=a.current;u!==o&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),a.current=o},[o]);let s=o?e:r,l=I.useCallback((u,...c)=>{let d=(h,...f)=>{n&&(Object.is(s,h)||n(h,...f)),o||(s=h)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((f,...g)=>{let p=u(o?s:f,...g);return d(p,...c),o?f:p})):(o||i(u),d(u,...c))},[o,s,n]);return[s,l]}let Jo="default",Dg="",jc=new WeakMap;function Hv(e){if(lE()){if(Jo==="default"){const t=yn(e);Dg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Jo="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(jc.set(e,e.style.userSelect),e.style.userSelect="none")}function tc(e){if(lE()){if(Jo!=="disabled")return;Jo="restoring",setTimeout(()=>{cE(()=>{if(Jo==="restoring"){const t=yn(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Dg||""),Dg="",Jo="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&jc.has(e)){let t=jc.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),jc.delete(e)}}const gE=I.createContext({register:()=>{}});gE.displayName="PressResponderContext";function uV(e,t){return t.get?t.get.call(e):t.value}function pE(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function cV(e,t){var n=pE(e,t,"get");return uV(e,n)}function dV(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function jv(e,t,n){var r=pE(e,t,"set");return dV(e,r,n),n}function fV(e){let t=I.useContext(gE);if(t){let{register:n,...r}=t;e=Gn(r,e),n()}return dE(t,e.ref),e}var nc=new WeakMap;class rc{continuePropagation(){jv(this,nc,!1)}get shouldStopPropagation(){return cV(this,nc)}constructor(t,n,r){wu(this,nc,{writable:!0,value:void 0}),jv(this,nc,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const Wv=Symbol("linkClicked");function Rm(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:o,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...h}=fV(e),[f,g]=I.useState(!1),p=I.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:m,removeAllGlobalListeners:b}=nV(),v=Ri((y,S)=>{let D=p.current;if(o||D.didFirePressStart)return!1;let A=!0;if(D.isTriggeringEvent=!0,r){let T=new rc("pressstart",S,y);r(T),A=T.shouldStopPropagation}return n&&n(!0),D.isTriggeringEvent=!1,D.didFirePressStart=!0,g(!0),A}),x=Ri((y,S,D=!0)=>{let A=p.current;if(!A.didFirePressStart)return!1;A.ignoreClickAfterPress=!0,A.didFirePressStart=!1,A.isTriggeringEvent=!0;let T=!0;if(i){let F=new rc("pressend",S,y);i(F),T=F.shouldStopPropagation}if(n&&n(!1),g(!1),t&&D&&!o){let F=new rc("press",S,y);t(F),T&&(T=F.shouldStopPropagation)}return A.isTriggeringEvent=!1,T}),C=Ri((y,S)=>{let D=p.current;if(o)return!1;if(a){D.isTriggeringEvent=!0;let A=new rc("pressup",S,y);return a(A),D.isTriggeringEvent=!1,A.shouldStopPropagation}return!0}),E=Ri(y=>{let S=p.current;S.isPressed&&S.target&&(S.isOverTarget&&S.pointerType!=null&&x(bi(S.target,y),S.pointerType,!1),S.isPressed=!1,S.isOverTarget=!1,S.activePointerId=null,S.pointerType=null,b(),c||tc(S.target))}),w=Ri(y=>{u&&E(y)}),B=I.useMemo(()=>{let y=p.current,S={onKeyDown(A){if(Lh(A.nativeEvent,A.currentTarget)&&A.currentTarget.contains(A.target)){var T;Gv(A.target,A.key)&&A.preventDefault();let F=!0;if(!y.isPressed&&!A.repeat){y.target=A.currentTarget,y.isPressed=!0,F=v(A,"keyboard");let k=A.currentTarget,P=$=>{Lh($,k)&&!$.repeat&&k.contains($.target)&&y.target&&C(bi(y.target,$),"keyboard")};m(yn(A.currentTarget),"keyup",oE(P,D),!0)}F&&A.stopPropagation(),A.metaKey&&Zl()&&((T=y.metaKeyEvents)===null||T===void 0||T.set(A.key,A.nativeEvent))}else A.key==="Meta"&&(y.metaKeyEvents=new Map)},onClick(A){if(!(A&&!A.currentTarget.contains(A.target))&&A&&A.button===0&&!y.isTriggeringEvent&&!Yl.isOpening){let T=!0;if(o&&A.preventDefault(),!y.ignoreClickAfterPress&&!y.ignoreEmulatedMouseEvents&&!y.isPressed&&(y.pointerType==="virtual"||_g(A.nativeEvent))){!o&&!l&&da(A.currentTarget);let F=v(A,"virtual"),k=C(A,"virtual"),P=x(A,"virtual");T=F&&k&&P}y.ignoreEmulatedMouseEvents=!1,y.ignoreClickAfterPress=!1,T&&A.stopPropagation()}}},D=A=>{var T;if(y.isPressed&&y.target&&Lh(A,y.target)){var F;Gv(A.target,A.key)&&A.preventDefault();let P=A.target;x(bi(y.target,A),"keyboard",y.target.contains(P)),b(),A.key!=="Enter"&&Bm(y.target)&&y.target.contains(P)&&!A[Wv]&&(A[Wv]=!0,Yl(y.target,A,!1)),y.isPressed=!1,(F=y.metaKeyEvents)===null||F===void 0||F.delete(A.key)}else if(A.key==="Meta"&&(!((T=y.metaKeyEvents)===null||T===void 0)&&T.size)){var k;let P=y.metaKeyEvents;y.metaKeyEvents=void 0;for(let $ of P.values())(k=y.target)===null||k===void 0||k.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){S.onPointerDown=k=>{if(k.button!==0||!k.currentTarget.contains(k.target))return;if(lV(k.nativeEvent)){y.pointerType="virtual";return}Oh(k.currentTarget)&&k.preventDefault(),y.pointerType=k.pointerType;let P=!0;y.isPressed||(y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=k.pointerId,y.target=k.currentTarget,!o&&!l&&da(k.currentTarget),c||Hv(y.target),P=v(k,y.pointerType),m(yn(k.currentTarget),"pointermove",A,!1),m(yn(k.currentTarget),"pointerup",T,!1),m(yn(k.currentTarget),"pointercancel",F,!1)),P&&k.stopPropagation()},S.onMouseDown=k=>{k.currentTarget.contains(k.target)&&k.button===0&&(Oh(k.currentTarget)&&k.preventDefault(),k.stopPropagation())},S.onPointerUp=k=>{!k.currentTarget.contains(k.target)||y.pointerType==="virtual"||k.button===0&&Lo(k,k.currentTarget)&&C(k,y.pointerType||k.pointerType)};let A=k=>{k.pointerId===y.activePointerId&&(y.target&&Lo(k,y.target)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,v(bi(y.target,k),y.pointerType)):y.target&&y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,x(bi(y.target,k),y.pointerType,!1),w(k)))},T=k=>{k.pointerId===y.activePointerId&&y.isPressed&&k.button===0&&y.target&&(Lo(k,y.target)&&y.pointerType!=null?x(bi(y.target,k),y.pointerType):y.isOverTarget&&y.pointerType!=null&&x(bi(y.target,k),y.pointerType,!1),y.isPressed=!1,y.isOverTarget=!1,y.activePointerId=null,y.pointerType=null,b(),c||tc(y.target))},F=k=>{E(k)};S.onDragStart=k=>{k.currentTarget.contains(k.target)&&E(k)}}else{S.onMouseDown=F=>{if(F.button!==0||!F.currentTarget.contains(F.target))return;if(Oh(F.currentTarget)&&F.preventDefault(),y.ignoreEmulatedMouseEvents){F.stopPropagation();return}y.isPressed=!0,y.isOverTarget=!0,y.target=F.currentTarget,y.pointerType=_g(F.nativeEvent)?"virtual":"mouse",!o&&!l&&da(F.currentTarget),v(F,y.pointerType)&&F.stopPropagation(),m(yn(F.currentTarget),"mouseup",A,!1)},S.onMouseEnter=F=>{if(!F.currentTarget.contains(F.target))return;let k=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!0,k=v(F,y.pointerType)),k&&F.stopPropagation()},S.onMouseLeave=F=>{if(!F.currentTarget.contains(F.target))return;let k=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!1,k=x(F,y.pointerType,!1),w(F)),k&&F.stopPropagation()},S.onMouseUp=F=>{F.currentTarget.contains(F.target)&&!y.ignoreEmulatedMouseEvents&&F.button===0&&C(F,y.pointerType||"mouse")};let A=F=>{if(F.button===0){if(y.isPressed=!1,b(),y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}y.target&&Lo(F,y.target)&&y.pointerType!=null?x(bi(y.target,F),y.pointerType):y.target&&y.isOverTarget&&y.pointerType!=null&&x(bi(y.target,F),y.pointerType,!1),y.isOverTarget=!1}};S.onTouchStart=F=>{if(!F.currentTarget.contains(F.target))return;let k=hV(F.nativeEvent);if(!k)return;y.activePointerId=k.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=F.currentTarget,y.pointerType="touch",!o&&!l&&da(F.currentTarget),c||Hv(y.target),v(F,y.pointerType)&&F.stopPropagation(),m(Br(F.currentTarget),"scroll",T,!0)},S.onTouchMove=F=>{if(!F.currentTarget.contains(F.target))return;if(!y.isPressed){F.stopPropagation();return}let k=zv(F.nativeEvent,y.activePointerId),P=!0;k&&Lo(k,F.currentTarget)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,P=v(F,y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,P=x(F,y.pointerType,!1),w(F)),P&&F.stopPropagation()},S.onTouchEnd=F=>{if(!F.currentTarget.contains(F.target))return;if(!y.isPressed){F.stopPropagation();return}let k=zv(F.nativeEvent,y.activePointerId),P=!0;k&&Lo(k,F.currentTarget)&&y.pointerType!=null?(C(F,y.pointerType),P=x(F,y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(P=x(F,y.pointerType,!1)),P&&F.stopPropagation(),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,y.target&&!c&&tc(y.target),b()},S.onTouchCancel=F=>{F.currentTarget.contains(F.target)&&(F.stopPropagation(),y.isPressed&&E(F))};let T=F=>{y.isPressed&&F.target.contains(y.target)&&E({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};S.onDragStart=F=>{F.currentTarget.contains(F.target)&&E(F)}}return S},[m,o,l,b,c,E,w,x,v,C]);return I.useEffect(()=>()=>{var y;c||tc((y=p.current.target)!==null&&y!==void 0?y:void 0)},[c]),{isPressed:s||f,pressProps:Gn(h,B)}}function Bm(e){return e.tagName==="A"&&e.hasAttribute("href")}function Lh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Br(i).HTMLInputElement&&!mE(i,n)||i instanceof Br(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&Bm(i))&&n!=="Enter")}function hV(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function zv(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function bi(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function gV(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function pV(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Lo(e,t){let n=t.getBoundingClientRect(),r=gV(e);return pV(n,r)}function Oh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Gv(e,t){return e instanceof HTMLInputElement?!mE(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Bm(e)}const mV=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function mE(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":mV.has(e.type)}class bV{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,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function bE(e){let t=I.useRef({isFocused:!1,observer:null});_o(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Ri(r=>{e==null||e(r)});return I.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=o=>{t.current.isFocused=!1,i.disabled&&n(new bV("blur",o)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function vE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=I.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=bE(a),s=I.useCallback(l=>{const u=yn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}let Ps=null,Ag=new Set,yl=new Map,vo=!1,Tg=!1;const vV={Tab:!0,Escape:!0};function $m(e,t){for(let n of Ag)n(e,t)}function yV(e){return!(e.metaKey||!Zl()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Md(e){vo=!0,yV(e)&&(Ps="keyboard",$m("keyboard",e))}function pr(e){Ps="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(vo=!0,$m("pointer",e))}function yE(e){_g(e)&&(vo=!0,Ps="virtual")}function xE(e){e.target===window||e.target===document||(!vo&&!Tg&&(Ps="virtual",$m("virtual",e)),vo=!1,Tg=!1)}function CE(){vo=!1,Tg=!0}function Rg(e){if(typeof window>"u"||yl.get(Br(e)))return;const t=Br(e),n=yn(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){vo=!0,r.apply(this,arguments)},n.addEventListener("keydown",Md,!0),n.addEventListener("keyup",Md,!0),n.addEventListener("click",yE,!0),t.addEventListener("focus",xE,!0),t.addEventListener("blur",CE,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",pr,!0),n.addEventListener("pointermove",pr,!0),n.addEventListener("pointerup",pr,!0)):(n.addEventListener("mousedown",pr,!0),n.addEventListener("mousemove",pr,!0),n.addEventListener("mouseup",pr,!0)),t.addEventListener("beforeunload",()=>{EE(e)},{once:!0}),yl.set(t,{focus:r})}const EE=(e,t)=>{const n=Br(e),r=yn(e);t&&r.removeEventListener("DOMContentLoaded",t),yl.has(n)&&(n.HTMLElement.prototype.focus=yl.get(n).focus,r.removeEventListener("keydown",Md,!0),r.removeEventListener("keyup",Md,!0),r.removeEventListener("click",yE,!0),n.removeEventListener("focus",xE,!0),n.removeEventListener("blur",CE,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",pr,!0),r.removeEventListener("pointermove",pr,!0),r.removeEventListener("pointerup",pr,!0)):(r.removeEventListener("mousedown",pr,!0),r.removeEventListener("mousemove",pr,!0),r.removeEventListener("mouseup",pr,!0)),yl.delete(n))};function xV(e){const t=yn(e);let n;return t.readyState!=="loading"?Rg(e):(n=()=>{Rg(e)},t.addEventListener("DOMContentLoaded",n)),()=>EE(e,n)}typeof document<"u"&&xV();function SE(){return Ps!=="pointer"}function wE(){return Ps}const CV=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function EV(e,t,n){var r;const i=typeof window<"u"?Br(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Br(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?Br(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?Br(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!CV.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof a||(n==null?void 0:n.target)instanceof o&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof s&&!vV[n.key])}function SV(e,t,n){Rg(),I.useEffect(()=>{let r=(i,a)=>{EV(!!(n!=null&&n.isTextInput),i,a)&&e(SE())};return Ag.add(r),()=>{Ag.delete(r)}},t)}function IE(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=I.useRef({isFocusWithin:!1}),o=I.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,a]),s=bE(o),l=I.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),a.current.isFocusWithin=!0,s(u))},[r,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}function Uv(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.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(r),t&&n.stopPropagation()}}function wV(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Uv(e.onKeyDown),onKeyUp:Uv(e.onKeyUp)}}}function _E(e){const t=yn(e);if(wE()==="virtual"){let n=t.activeElement;cE(()=>{t.activeElement===n&&e.isConnected&&da(e)})}else da(e)}function IV(e){const t=Br(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:o,visibility:s}=a(e);i=o!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function _V(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function DE(e,t){return e.nodeName!=="#comment"&&IV(e)&&_V(e,t)&&(!e.parentElement||DE(e.parentElement,e))}const km=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],DV=km.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";km.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const AV=km.join(':not([hidden]):not([tabindex="-1"]),');function AE(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Hs(e,t=!1){if(e!=null&&!t)try{_E(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function nl(e,t,n){let r=t!=null&&t.tabbable?AV:DV,i=yn(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var o;return!(t==null||(o=t.from)===null||o===void 0)&&o.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&DE(a)&&(!n||AE(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function TE(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||yn(r).activeElement,u=nl(r,{tabbable:a,accept:s});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&o&&(u.currentNode=r,c=u.nextNode()),c&&Hs(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||yn(r).activeElement,u=nl(r,{tabbable:a,accept:s});if(r.contains(l))u.currentNode=l;else{let d=Vh(u);return d&&Hs(d,!0),d??null}let c=u.previousNode();if(!c&&o){u.currentNode=r;let d=Vh(u);if(!d)return null;c=d}return c&&Hs(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=nl(r,{tabbable:i,accept:a}).nextNode();return s&&Hs(s,!0),s},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=nl(r,{tabbable:i,accept:a}),s=Vh(o);return s&&Hs(s,!0),s??null}}}function Vh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class Pm{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Xv({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&AE(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Pm;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Xv({scopeRef:null}),this.fastMap.set(null,this.root)}}class Xv{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new Pm;function RE(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=I.useRef({isFocused:!1,isFocusVisible:t||SE()}),[a,o]=I.useState(!1),[s,l]=I.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=I.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=I.useCallback(f=>{i.current.isFocused=f,o(f),u()},[u]);SV(f=>{i.current.isFocusVisible=f,u()},[],{isTextInput:n});let{focusProps:d}=vE({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=IE({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:r?h:d}}let TV=I.createContext(null);function RV(e){let t=I.useContext(TV)||{};dE(t,e);let{ref:n,...r}=t;return r}function BV(e,t){let{focusProps:n}=vE(e),{keyboardProps:r}=wV(e),i=Gn(n,r),a=RV(t),o=e.isDisabled?{}:a,s=I.useRef(e.autoFocus);return I.useEffect(()=>{s.current&&t.current&&_E(t.current),s.current=!1},[t]),{focusableProps:Gn({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},o)}}const $V=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),kV=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function BE(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return $V.has(n.script)}let t=e.split("-")[0];return kV.has(t)}const PV=Symbol.for("react-aria.i18n.locale");function $E(){let e=typeof window<"u"&&window[PV]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:BE(e)?"rtl":"ltr"}}let Bg=$E(),rl=new Set;function Zv(){Bg=$E();for(let e of rl)e(Bg)}function kE(){let e=aE(),[t,n]=I.useState(Bg);return I.useEffect(()=>(rl.size===0&&window.addEventListener("languagechange",Zv),rl.add(n),()=>{rl.delete(n),rl.size===0&&window.removeEventListener("languagechange",Zv)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const PE=I.createContext(null);function Fm(e){let{locale:t,children:n}=e,r=kE(),i=I.useMemo(()=>t?{locale:t,direction:BE(t)?"rtl":"ltr"}:r,[r,t]);return I.createElement(PE.Provider,{value:i},n)}function Mr(){let e=kE();return I.useContext(PE)||e}const FV=Symbol.for("react-aria.i18n.locale"),NV=Symbol.for("react-aria.i18n.strings");let Oo;class Do{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=MV(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[FV];if(Oo===void 0){let i=window[NV];if(!i)return null;Oo={};for(let a in i)Oo[a]=new Do({[n]:i[a]},n)}let r=Oo==null?void 0:Oo[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function MV(e,t,n="en-US"){if(t[e])return t[e];let r=LV(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function LV(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Yv=new Map,Kv=new Map;class FE{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,o=Yv.get(a);o||(o=new Intl.PluralRules(this.locale,{type:r}),Yv.set(a,o));let s=o.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=Kv.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Kv.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const qv=new WeakMap;function OV(e){let t=qv.get(e);return t||(t=new Do(e),qv.set(e,t)),t}function VV(e,t){return t&&Do.getGlobalDictionaryForPackage(t)||OV(e)}function _u(e,t){let{locale:n}=Mr(),r=VV(e,t);return I.useMemo(()=>new FE(n,r),[n,r])}function _a(e){e=hE(e??{},HV);let{locale:t}=Mr();return I.useMemo(()=>new Xl(t,e),[t,e])}function HV(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}function jV(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:h,target:f,rel:g,type:p="button"}=e,m;n==="button"?m={type:p,disabled:r}:m={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:h,target:n==="a"?f:void 0,type:n==="input"?p:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:b,isPressed:v}=Rm({onPressStart:a,onPressEnd:o,onPressChange:l,onPress:i,onPressUp:s,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:x}=BV(e,t);c&&(x.tabIndex=r?-1:x.tabIndex);let C=Gn(x,b,Dm(e,{labelable:!0}));return{isPressed:v,buttonProps:Gn(m,C,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:E=>{d&&(d(E),console.warn("onClick is deprecated, please use onPress"))}})}}var NE={};NE={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var ME={};ME={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var LE={};LE={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var OE={};OE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var VE={};VE={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var HE={};HE={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var jE={};jE={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var WE={};WE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var zE={};zE={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var GE={};GE={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var UE={};UE={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var XE={};XE={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var ZE={};ZE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var YE={};YE={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var KE={};KE={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var qE={};qE={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var JE={};JE={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var QE={};QE={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var eS={};eS={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var tS={};tS={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var nS={};nS={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var rS={};rS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var iS={};iS={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var aS={};aS={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var oS={};oS={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var sS={};sS={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var lS={};lS={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var uS={};uS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var cS={};cS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var dS={};dS={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var fS={};fS={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var hS={};hS={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var gS={};gS={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var pS={};pS={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Du={};Du={"ar-AE":NE,"bg-BG":ME,"cs-CZ":LE,"da-DK":OE,"de-DE":VE,"el-GR":HE,"en-US":jE,"es-ES":WE,"et-EE":zE,"fi-FI":GE,"fr-FR":UE,"he-IL":XE,"hr-HR":ZE,"hu-HU":YE,"it-IT":KE,"ja-JP":qE,"ko-KR":JE,"lt-LT":QE,"lv-LV":eS,"nb-NO":tS,"nl-NL":nS,"pl-PL":rS,"pt-BR":iS,"pt-PT":aS,"ro-RO":oS,"ru-RU":sS,"sk-SK":lS,"sl-SI":uS,"sr-SP":cS,"sv-SE":dS,"tr-TR":fS,"uk-UA":hS,"zh-CN":gS,"zh-TW":pS};function mS(e){return e&&e.__esModule?e.default:e}const Nm=new WeakMap;function ql(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function WV(e){let t=_u(mS(Du),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let i=_a({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ql(n)||ql(r),timeZone:e.timeZone}),a="anchorDate"in e?e.anchorDate:null;return I.useMemo(()=>{if(!a&&n&&r)if(zt(n,r)){let o=i.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:o})}else{let o=kg(i,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:o})}return""},[n,r,a,e.timeZone,t,i])}function $g(e,t,n,r){let i=_u(mS(Du),"@react-aria/calendar"),a=ql(e)||ql(t),o=_a({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),s=_a({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return I.useMemo(()=>{if(zt(e,Su(e))){if(zt(t,mg(e)))return o.format(e.toDate(n));if(zt(t,mg(t)))return r?kg(o,i,e,t,n):o.formatRange(e.toDate(n),t.toDate(n))}return r?kg(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function kg(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let u=0;u<a.length;u++){let c=a[u];if(c.source==="shared"&&c.type==="literal")o=u;else if(c.source==="endRange")break}let s="",l="";for(let u=0;u<a.length;u++)u<o?s+=a[u].value:u>o&&(l+=a[u].value);return t.format("dateRange",{startDate:s,endDate:l})}const bS=7e3;let Hh=null;function Jv(e,t="assertive",n=bS){Hh||(Hh=new zV),Hh.announce(e,t,n)}class zV{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=bS){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function GV(e){return e&&e.__esModule?e.default:e}function vS(e,t){let n=_u(GV(Du),"@react-aria/calendar"),r=Dm(e),i=$g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=$g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);Ov(()=>{t.isFocused||Jv(a)},[a]);let o=WV(t);Ov(()=>{o&&Jv(o,"polite",4e3)},[o]);let s=Sg([!!e.errorMessage,e.isInvalid,e.validationState]);Nm.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:s,selectedDateDescription:o});let[l,u]=I.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[d,h]=I.useState(!1),f=e.isDisabled||t.isPreviousVisibleRangeInvalid();f&&d&&(h(!1),t.setFocused(!0));let g=Tm({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:Gn(r,g,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:f,onFocusChange:h},errorMessageProps:{id:s},title:i}}function yS(e,t){return vS(e,t)}function UV(e,t,n){let r=vS(e,t),i=I.useRef(!1),a=I.useRef(typeof window<"u"?window:null);return Mh(a,"pointerdown",s=>{i.current=s.width===0&&s.height===0}),Mh(a,"pointerup",s=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=s.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=s=>{n.current&&(!s.relatedTarget||!n.current.contains(s.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},Mh(n,"touchmove",s=>{t.isDragging&&s.preventDefault()},{passive:!1,capture:!0}),r}function xS(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:i}=Mr(),a=f=>{switch(f.key){case"Enter":case" ":f.preventDefault(),t.selectFocusedDate();break;case"PageUp":f.preventDefault(),f.stopPropagation(),t.focusPreviousSection(f.shiftKey);break;case"PageDown":f.preventDefault(),f.stopPropagation(),t.focusNextSection(f.shiftKey);break;case"End":f.preventDefault(),f.stopPropagation(),t.focusSectionEnd();break;case"Home":f.preventDefault(),f.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":f.preventDefault(),f.stopPropagation(),i==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":f.preventDefault(),f.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":f.preventDefault(),f.stopPropagation(),i==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":f.preventDefault(),f.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(f.preventDefault(),t.setAnchorDate(null));break}},o=$g(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=Nm.get(t),u=Tm({"aria-label":[s,o].filter(Boolean).join(", "),"aria-labelledby":l}),c=_a({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=Mr(),h=I.useMemo(()=>{let f=zl(gm(t.timeZone),d);return[...new Array(7).keys()].map(g=>{let m=f.add({days:g}).toDate(t.timeZone);return c.format(m)})},[d,t.timeZone,c]);return{gridProps:Gn(u,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:a,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:h}}function XV(e){return e&&e.__esModule?e.default:e}function ZV(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=Nm.get(t),s=_u(XV(Du),"@react-aria/calendar"),l=_a({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ql(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r);i=i||t.isCellDisabled(r);let d=t.isCellUnavailable(r),h=!i&&!d,f=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&zt(t.value,r));f&&(u=!0),r=hE(r,pg);let g=I.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),p=VL(r,t.timeZone),m=I.useMemo(()=>{let A="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(zt(r,t.value.start)||zt(r,t.value.end))&&(A=o+", "),A+=l.format(g),p?A=s.format(u?"todayDateSelected":"todayDate",{date:A}):u&&(A=s.format("dateSelected",{date:A})),t.minValue&&zt(r,t.minValue)?A+=", "+s.format("minimumDate"):t.maxValue&&zt(r,t.maxValue)&&(A+=", "+s.format("maximumDate")),A},[l,g,s,u,p,r,t,o]),b="";"anchorDate"in t&&c&&!t.isReadOnly&&h&&(t.anchorDate?b=s.format("finishRangeSelectionPrompt"):b=s.format("startRangeSelectionPrompt"));let v=fE(b),x=I.useRef(!1),C=I.useRef(!1),E=I.useRef(null),{pressProps:w,isPressed:B}=Rm({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(A){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(A.pointerType==="mouse"||A.pointerType==="touch")){if(t.highlightedRange&&!f){if(zt(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),C.current=!0;return}else if(zt(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),C.current=!0;return}}let T=()=>{t.setDragging(!0),E.current=null,t.selectDate(r),t.setFocusedDate(r),x.current=!0};A.pointerType==="touch"?E.current=setTimeout(T,200):T()}},onPressEnd(){C.current=!1,x.current=!1,clearTimeout(E.current),E.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(A){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(C.current)t.setAnchorDate(r);else if(t.anchorDate&&!x.current)t.selectDate(r),t.setFocusedDate(r);else if(A.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let T=r.add({days:1});t.isInvalid(T)&&(T=r.subtract({days:1})),t.isInvalid(T)||t.setFocusedDate(T)}else A.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),y=null;i||(y=zt(r,t.focusedDate)?0:-1),I.useEffect(()=>{c&&n.current&&(da(n.current),wE()!=="pointer"&&document.activeElement===n.current&&sV(n.current,{containingElement:rV(n.current)}))},[c,n]);let S=_a({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),D=I.useMemo(()=>S.formatToParts(g).find(A=>A.type==="day").value,[S,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||null,"aria-selected":u||null,"aria-invalid":f||null},buttonProps:Gn(w,{onFocus(){i||t.setFocusedDate(r)},tabIndex:y,role:"button","aria-disabled":!h||null,"aria-label":m,"aria-invalid":f||null,"aria-describedby":[f?a:null,v["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(A){"highlightDate"in t&&(A.pointerType!=="touch"||t.isDragging)&&h&&t.highlightDate(r)},onPointerDown(A){"releasePointerCapture"in A.target&&A.target.releasePointerCapture(A.pointerId)},onContextMenu(A){A.preventDefault()}}),isPressed:B,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:f,formattedDate:D}}const Nf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},CS={...Nf,customError:!0,valid:!1},Ka={isInvalid:!1,validationDetails:Nf,validationErrors:[]},YV=I.createContext({}),Ld="__formValidationState"+Date.now();function KV(e){if(e[Ld]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Ld];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return qV(e)}function qV(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:CS}:null,u=I.useMemo(()=>Qv(JV(o,i)),[o,i]);a!=null&&a.validationDetails.valid&&(a=null);let c=I.useContext(YV),d=I.useMemo(()=>r?Array.isArray(r)?r.flatMap(D=>Pg(c[D])):Pg(c[r]):[],[c,r]),[h,f]=I.useState(c),[g,p]=I.useState(!1);c!==h&&(f(c),p(!1));let m=I.useMemo(()=>Qv(g?[]:d),[g,d]),b=I.useRef(Ka),[v,x]=I.useState(Ka),C=I.useRef(Ka),E=()=>{if(!w)return;B(!1);let D=u||a||b.current;jh(D,C.current)||(C.current=D,x(D))},[w,B]=I.useState(!1);return I.useEffect(E),{realtimeValidation:l||m||u||a||Ka,displayValidation:s==="native"?l||m||v:l||m||u||a||v,updateValidation(D){s==="aria"&&!jh(v,D)?x(D):b.current=D},resetValidation(){let D=Ka;jh(D,C.current)||(C.current=D,x(D)),s==="native"&&B(!1),p(!0)},commitValidation(){s==="native"&&B(!0),p(!0)}}}function Pg(e){return e?Array.isArray(e)?e:[e]:[]}function JV(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Pg(n)}return[]}function Qv(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:CS}:null}function jh(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Od(...e){let t=new Set,n=!1,r={...Nf};for(let o of e){var i,a;for(let s of o.validationErrors)t.add(s);n||(n=o.isInvalid);for(let s in r)(i=r)[a=s]||(i[a]=o.validationDetails[s])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function QV(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=xs(t);let o=xs(),s={};n?(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=Tm({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:l}}function eH(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=QV(e),s=Sg([!!t,!!n,r,i]),l=Sg([!!t,!!n,r,i]);return o=Gn(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:l}}}var ES={};ES={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var SS={};SS={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var wS={};wS={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var IS={};IS={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var _S={};_S={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var DS={};DS={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var AS={};AS={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var TS={};TS={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var RS={};RS={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var BS={};BS={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var $S={};$S={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var kS={};kS={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var PS={};PS={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var FS={};FS={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var NS={};NS={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var MS={};MS={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var LS={};LS={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var OS={};OS={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var VS={};VS={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var HS={};HS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var jS={};jS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var WS={};WS={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var zS={};zS={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var GS={};GS={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var US={};US={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var XS={};XS={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var ZS={};ZS={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var YS={};YS={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var KS={};KS={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var qS={};qS={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var JS={};JS={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var QS={};QS={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var ew={};ew={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var tw={};tw={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var nw={};nw={"ar-AE":ES,"bg-BG":SS,"cs-CZ":wS,"da-DK":IS,"de-DE":_S,"el-GR":DS,"en-US":AS,"es-ES":TS,"et-EE":RS,"fi-FI":BS,"fr-FR":$S,"he-IL":kS,"hr-HR":PS,"hu-HU":FS,"it-IT":NS,"ja-JP":MS,"ko-KR":LS,"lt-LT":OS,"lv-LV":VS,"nb-NO":HS,"nl-NL":jS,"pl-PL":WS,"pt-BR":zS,"pt-PT":GS,"ro-RO":US,"ru-RU":XS,"sk-SK":ZS,"sl-SI":YS,"sr-SP":KS,"sv-SE":qS,"tr-TR":JS,"uk-UA":QS,"zh-CN":ew,"zh-TW":tw};function tH(e,t,n){let{direction:r}=Mr(),i=I.useMemo(()=>TE(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusNext():i.focusPrevious();break;case"ArrowRight":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusPrevious():i.focusNext();break}},o=()=>{var l;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=nl(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let d;do d=c.lastChild(),d&&(u=d);while(d)}for(;u!=null&&u.hasAttribute("data-placeholder");){let d=c.previousNode();if(d&&d.hasAttribute("data-placeholder"))u=d;else break}u&&u.focus()},{pressProps:s}=Rm({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&o()},onPress(l){l.pointerType!=="mouse"&&o()}});return Gn(s,{onKeyDown:a})}const nH="__role_"+Date.now(),rH="__focusManager_"+Date.now();function iH(e){return e&&e.__esModule?e.default:e}function aH(e,t,n){var r,i;let a=_u(iH(nw),"@react-aria/datepicker"),{isInvalid:o,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:h}=eH({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||s}),f=c["aria-labelledby"]||c.id,{locale:g}=Mr(),p=t.formatValue(g,{month:"long"}),m=p?a.format("selectedRangeDescription",{startDate:p.start,endDate:p.end}):"",b=fE(m),v={"aria-label":a.format("startDate"),"aria-labelledby":f},x={"aria-label":a.format("endDate"),"aria-labelledby":f},C=xs(),E=xs(),w=tH(t,n),B=[b["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,y=I.useMemo(()=>TE(n,{accept:k=>k.id!==C}),[n,C]),S={[rH]:y,[nH]:"presentation","aria-describedby":B,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=Dm(e),{focusWithinProps:A}=IE({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),T=I.useRef(Ka),F=I.useRef(Ka);return{groupProps:Gn(D,w,c,b,A,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":B,onKeyDown(k){t.isOpen||e.onKeyDown&&e.onKeyDown(k)},onKeyUp(k){t.isOpen||e.onKeyUp&&e.onKeyUp(k)}}),labelProps:{...u,onClick:()=>{y.focusFirst()}},buttonProps:{...b,id:C,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${C} ${f}`,"aria-describedby":B,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:E,"aria-labelledby":`${C} ${f}`},startFieldProps:{...v,...S,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:k=>t.setDateTime("start",k),autoFocus:e.autoFocus,name:e.startName,[Ld]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(k){T.current=k,t.updateValidation(Od(k,F.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...S,value:(i=t.value)===null||i===void 0?void 0:i.end,onChange:k=>t.setDateTime("end",k),name:e.endName,[Ld]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(k){F.current=k,t.updateValidation(Od(T.current,k))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:d,errorMessageProps:h,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:o,validationErrors:s,validationDetails:l}}function ss(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Fg(e,t,n,r,i){let a={};for(let s in t)a[s]=Math.floor(t[s]/2),a[s]>0&&t[s]%2===0&&a[s]--;let o=to(e,t,n).subtract(a);return Jl(e,o,t,n,r,i)}function to(e,t,n,r,i){let a=e;return t.years?a=jL(e):t.months?a=Su(e):t.weeks&&(a=zl(e,n)),Jl(e,a,t,n,r,i)}function Ng(e,t,n,r,i){let a={...t};t.days?a.days--:t.weeks?a.weeks--:t.months?a.months--:t.years&&a.years--;let o=to(e,t,n).subtract(a);return Jl(e,o,t,n,r,i)}function Jl(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=mm(t,to(Bn(i),n,r))),a&&e.compare(a)<=0&&(t=pm(t,Ng(Bn(a),n,r))),t}function Qi(e,t,n){return t&&(e=mm(e,Bn(t))),n&&(e=pm(e,Bn(n))),e}function rw(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function iw(e){let t=I.useMemo(()=>new Xl(e.locale),[e.locale]),n=I.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible"}=e,d=I.useMemo(()=>i(n.calendar),[i,n.calendar]),[h,f]=Kl(e.value,e.defaultValue,e.onChange),g=I.useMemo(()=>h?rn(Bn(h),d):null,[h,d]),p=I.useMemo(()=>h&&"timeZone"in h?h.timeZone:n.timeZone,[h,n.timeZone]),m=I.useMemo(()=>e.focusedValue?Qi(rn(Bn(e.focusedValue),d),o,s):void 0,[e.focusedValue,d,o,s]),b=I.useMemo(()=>Qi(e.defaultFocusedValue?rn(Bn(e.defaultFocusedValue),d):g||rn(gm(p),d),o,s),[e.defaultFocusedValue,g,p,d,o,s]),[v,x]=Kl(m,b,e.onFocusChange),[C,E]=I.useState(()=>{switch(l){case"start":return to(v,a,r,o,s);case"end":return Ng(v,a,r,o,s);case"center":default:return Fg(v,a,r,o,s)}}),[w,B]=I.useState(e.autoFocus||!1),y=I.useMemo(()=>{let R={...a};return R.days?R.days--:R.days=-1,C.add(R)},[C,a]),[S,D]=I.useState(d.identifier);if(d.identifier!==S){let R=rn(v,d);E(Fg(R,a,r,o,s)),x(R),D(d.identifier)}ss(v,o,s)?x(Qi(v,o,s)):v.compare(C)<0?E(Ng(v,a,r,o,s)):v.compare(y)>0&&E(to(v,a,r,o,s));function A(R){R=Qi(R,o,s),x(R)}function T(R){if(!e.isDisabled&&!e.isReadOnly){if(R===null){f(null);return}if(R=Qi(R,o,s),R=rw(R,C,u),!R)return;R=rn(R,(h==null?void 0:h.calendar)||new ar),h&&"hour"in h?f(h.set(R)):f(R)}}let F=I.useMemo(()=>g?u&&u(g)?!0:ss(g,o,s):!1,[g,u,o,s]),k=e.isInvalid||e.validationState==="invalid"||F,P=k?"invalid":null,$=I.useMemo(()=>c==="visible"?a:Wh(a),[c,a]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:g,setValue:T,visibleRange:{start:C,end:y},minValue:o,maxValue:s,focusedDate:v,timeZone:p,validationState:P,isValueInvalid:k,setFocusedDate(R){A(R),B(!0)},focusNextDay(){A(v.add({days:1}))},focusPreviousDay(){A(v.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&A(v.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&A(v.subtract({weeks:1}))},focusNextPage(){let R=C.add($);x(Qi(v.add($),o,s)),E(to(Jl(v,R,$,r,o,s),$,r))},focusPreviousPage(){let R=C.subtract($);x(Qi(v.subtract($),o,s)),E(to(Jl(v,R,$,r,o,s),$,r))},focusSectionStart(){a.days?A(C):a.weeks?A(zl(v,r)):(a.months||a.years)&&A(Su(v))},focusSectionEnd(){a.days?A(y):a.weeks?A(WL(v,r)):(a.months||a.years)&&A(mg(v))},focusNextSection(R){if(!R&&!a.days){A(v.add(Wh(a)));return}a.days?this.focusNextPage():a.weeks?A(v.add({months:1})):(a.months||a.years)&&A(v.add({years:1}))},focusPreviousSection(R){if(!R&&!a.days){A(v.subtract(Wh(a)));return}a.days?this.focusPreviousPage():a.weeks?A(v.subtract({months:1})):(a.months||a.years)&&A(v.subtract({years:1}))},selectFocusedDate(){T(v)},selectDate(R){T(R)},isFocused:w,setFocused:B,isInvalid(R){return ss(R,o,s)},isSelected(R){return g!=null&&zt(R,g)&&!this.isCellDisabled(R)&&!this.isCellUnavailable(R)},isCellFocused(R){return w&&v&&zt(R,v)},isCellDisabled(R){return e.isDisabled||R.compare(C)<0||R.compare(y)>0||this.isInvalid(R,o,s)},isCellUnavailable(R){return e.isDateUnavailable&&e.isDateUnavailable(R)},isPreviousVisibleRangeInvalid(){let R=C.subtract({days:1});return zt(R,C)||this.isInvalid(R,o,s)},isNextVisibleRangeInvalid(){let R=y.add({days:1});return zt(R,y)||this.isInvalid(R,o,s)},getDatesInWeek(R,O=C){let j=O.add({weeks:R}),V=[];j=zl(j,r);let W=kf(j,r);for(let U=0;U<W;U++)V.push(null);for(;V.length<7;){V.push(j);let U=j.add({days:1});if(zt(j,U))break;j=U}for(;V.length<7;)V.push(null);return V}}}function Wh(e){let t={...e};for(let n in e)t[n]=1;return t}function oH(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=Kl(t,n||null,r),[h,f]=I.useState(null),g="center";if(c&&c.start&&c.end){let O=Fg(Bn(c.start),o,a,s,l).add(o).subtract({days:1});c.end.compare(O)>0&&(g="start")}let p=I.useRef(null),[m,b]=I.useState(null),v=I.useMemo(()=>mm(s,m==null?void 0:m.start),[s,m]),x=I.useMemo(()=>pm(l,m==null?void 0:m.end),[l,m]),C=iw({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:o,minValue:v,maxValue:x,selectionAlignment:g}),E=R=>{R&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(p.current={start:ty(R,C,-1),end:ty(R,C,1)},b(p.current)):(p.current=null,b(null))},[w,B]=I.useState(C.visibleRange);(!pg(C.visibleRange.start,w.start)||!pg(C.visibleRange.end,w.end))&&(E(h),B(C.visibleRange));let y=R=>{R?(f(R),E(R)):(f(null),E(null))},S=h?zh(h,C.focusedDate):c&&zh(c.start,c.end),D=R=>{if(!e.isReadOnly&&(R=Qi(R,v,x),R=rw(R,C.visibleRange.start,e.isDateUnavailable),!!R))if(!h)y(R);else{let O=zh(h,R);d({start:ey(O.start,c==null?void 0:c.start),end:ey(O.end,c==null?void 0:c.end)}),y(null)}},[A,T]=I.useState(!1),{isDateUnavailable:F}=e,k=I.useMemo(()=>!c||h?!1:F&&(F(c.start)||F(c.end))?!0:ss(c.start,s,l)||ss(c.end,s,l),[F,c,h,s,l]),P=e.isInvalid||e.validationState==="invalid"||k;return{...C,value:c,setValue:d,anchorDate:h,setAnchorDate:y,highlightedRange:S,validationState:P?"invalid":null,isValueInvalid:P,selectFocusedDate(){D(C.focusedDate)},selectDate:D,highlightDate(R){h&&C.setFocusedDate(R)},isSelected(R){return S&&R.compare(S.start)>=0&&R.compare(S.end)<=0&&!C.isCellDisabled(R)&&!C.isCellUnavailable(R)},isInvalid(R){var O,j;return C.isInvalid(R)||ss(R,(O=p.current)===null||O===void 0?void 0:O.start,(j=p.current)===null||j===void 0?void 0:j.end)},isDragging:A,setDragging:T}}function zh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Bn(e),end:Bn(t)})}function ey(e,t){return e=rn(e,(t==null?void 0:t.calendar)||new ar),t&&"hour"in t?t.set(e):e}function ty(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function sH(e){let[t,n]=Kl(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=I.useCallback(()=>{n(!0)},[n]),i=I.useCallback(()=>{n(!1)},[n]),a=I.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var aw={};aw={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var ow={};ow={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var sw={};sw={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var lw={};lw={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var uw={};uw={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var cw={};cw={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var dw={};dw={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var fw={};fw={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var hw={};hw={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var gw={};gw={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var pw={};pw={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var mw={};mw={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var bw={};bw={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var vw={};vw={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var yw={};yw={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var xw={};xw={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var Cw={};Cw={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var Ew={};Ew={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var Sw={};Sw={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var ww={};ww={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var Iw={};Iw={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var _w={};_w={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var Dw={};Dw={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var Aw={};Aw={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var Tw={};Tw={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var Rw={};Rw={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var Bw={};Bw={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var $w={};$w={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var kw={};kw={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var Pw={};Pw={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var Fw={};Fw={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var Nw={};Nw={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var Mw={};Mw={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var Lw={};Lw={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var Ow={};Ow={"ar-AE":aw,"bg-BG":ow,"cs-CZ":sw,"da-DK":lw,"de-DE":uw,"el-GR":cw,"en-US":dw,"es-ES":fw,"et-EE":hw,"fi-FI":gw,"fr-FR":pw,"he-IL":mw,"hr-HR":bw,"hu-HU":vw,"it-IT":yw,"ja-JP":xw,"ko-KR":Cw,"lt-LT":Ew,"lv-LV":Sw,"nb-NO":ww,"nl-NL":Iw,"pl-PL":_w,"pt-BR":Dw,"pt-PT":Aw,"ro-RO":Tw,"ru-RU":Rw,"sk-SK":Bw,"sl-SI":$w,"sr-SP":kw,"sv-SE":Pw,"tr-TR":Fw,"uk-UA":Nw,"zh-CN":Mw,"zh-TW":Lw};function lH(e){return e&&e.__esModule?e.default:e}const Vw=new Do(lH(Ow));function Hw(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function ny(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&(r==null?void 0:r(e))||!1,l=a||o||s,u=[];if(l){let c=Hw(),d=Do.getGlobalDictionaryForPackage("@react-stately/datepicker")||Vw,h=new FE(c,d),f=new Xl(c,Mg({},i)),g=f.resolvedOptions().timeZone;o&&u.push(h.format("rangeUnderflow",{minValue:f.format(t.toDate(g))})),a&&u.push(h.format("rangeOverflow",{maxValue:f.format(n.toDate(g))})),s&&u.push(h.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function uH(e,t,n,r,i){let a=ny(e==null?void 0:e.start,t,n,r,i),o=ny(e==null?void 0:e.end,t,n,r,i),s=Od(a,o);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let l=Do.getGlobalDictionaryForPackage("@react-stately/datepicker")||Vw;s=Od(s,{isInvalid:!0,validationErrors:[l.getStringForLocale("rangeReversed",Hw())],validationDetails:{...Nf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return s}const cH={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},dH={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Mg(e,t){e={...t.shouldForceLeadingZeros?dH:cH,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let o=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");o<0&&(o=0);let s=i.indexOf(r);if(s<0&&(s=2),o>s)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(o,s+1).reduce((c,d)=>(c[d]=e[d],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&o===0&&(l.era="short"),l}function ic(e){return e&&"hour"in e?e:new Sm}function fH(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=I.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let o=e?n:i[1];return[t,o]}function hH(e){var t,n;let r=sH(e),[i,a]=Kl(e.value,e.defaultValue||null,e.onChange),[o,s]=I.useState(()=>i||{start:null,end:null});i==null&&o.start&&o.end&&(o={start:null,end:null},s(o));let l=i||o,u=$=>{s($||{start:null,end:null}),$!=null&&$.start&&$.end?a($):a(null)},c=(l==null?void 0:l.start)||(l==null?void 0:l.end)||e.placeholderValue,[d,h]=fH(c,e.granularity),f=d==="hour"||d==="minute"||d==="second";var g;let p=(g=e.shouldCloseOnSelect)!==null&&g!==void 0?g:!0,[m,b]=I.useState(null),[v,x]=I.useState(null);l&&l.start&&l.end&&(m=l,"hour"in l.start&&(v=l));let C=($,R)=>{u({start:"timeZone"in R.start?R.start.set(Bn($.start)):Ia($.start,R.start),end:"timeZone"in R.end?R.end.set(Bn($.end)):Ia($.end,R.end)}),b(null),x(null),F.commitValidation()},E=$=>{let R=typeof p=="function"?p():p;f?R||$.start&&$.end&&(v!=null&&v.start)&&(v!=null&&v.end)?C($,{start:(v==null?void 0:v.start)||ic(e.placeholderValue),end:(v==null?void 0:v.end)||ic(e.placeholderValue)}):b($):$.start&&$.end?(u($),F.commitValidation()):b($),R&&r.setOpen(!1)},w=$=>{m!=null&&m.start&&(m!=null&&m.end)&&$.start&&$.end?C(m,$):x($)},B=(l==null||(t=l.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&l.start.era==="BC"||(l==null||(n=l.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&l.end.era==="BC",y=I.useMemo(()=>({granularity:d,timeZone:h,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:B}),[d,e.hourCycle,e.shouldForceLeadingZeros,h,e.hideTimeZone,B]),{minValue:S,maxValue:D,isDateUnavailable:A}=e,T=I.useMemo(()=>uH(l,S,D,A,y),[l,S,D,A,y]),F=KV({...e,value:i,name:I.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:T}),k=F.displayValidation.isInvalid,P=e.validationState||(k?"invalid":null);return{...F,value:l,setValue:u,dateRange:m,timeRange:v,granularity:d,hasTime:f,setDate($,R){E({...m,[$]:R})},setTime($,R){w({...v,[$]:R})},setDateTime($,R){u({...l,[$]:R})},setDateRange:E,setTimeRange:w,...r,setOpen($){!$&&!(l!=null&&l.start&&(l!=null&&l.end))&&(m!=null&&m.start)&&(m!=null&&m.end)&&f&&C(m,{start:(v==null?void 0:v.start)||ic(e.placeholderValue),end:(v==null?void 0:v.end)||ic(e.placeholderValue)}),r.setOpen($)},validationState:P,isInvalid:k,formatValue($,R){if(!l||!l.start||!l.end)return null;let O="timeZone"in l.start?l.start.timeZone:void 0,j=e.granularity||(l.start&&"minute"in l.start?"minute":"day"),V="timeZone"in l.end?l.end.timeZone:void 0,W=e.granularity||(l.end&&"minute"in l.end?"minute":"day"),U=Mg(R,{granularity:j,timeZone:O,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:l.start.calendar.identifier==="gregory"&&l.start.era==="BC"||l.end.calendar.identifier==="gregory"&&l.end.era==="BC"}),K=l.start.toDate(O||"UTC"),ee=l.end.toDate(V||"UTC"),z=new Xl($,U),H;if(O===V&&j===W&&l.start.compare(l.end)!==0){try{let X=z.formatRangeToParts(K,ee),te=-1;for(let ce=0;ce<X.length;ce++){let Q=X[ce];if(Q.source==="shared"&&Q.type==="literal")te=ce;else if(Q.source==="endRange")break}let ie="",le="";for(let ce=0;ce<X.length;ce++)ce<te?ie+=X[ce].value:ce>te&&(le+=X[ce].value);return{start:ie,end:le}}catch{}H=z}else{let X=Mg(R,{granularity:W,timeZone:V,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});H=new Xl($,X)}return{start:z.format(K),end:H.format(ee)}}}}const jw=e=>{const t=I.useRef(null),{locale:n}=Mr(),{state:r,date:i}=e,{cellProps:a,buttonProps:o,isSelected:s,isOutsideVisibleRange:l,isDisabled:u,formattedDate:c,isInvalid:d}=ZV({date:i},r,t),{focusProps:h}=RE(),f="highlightedRange"in r?r.highlightedRange?zt(i,r.highlightedRange.start):null:s,g="highlightedRange"in r?r.highlightedRange?zt(i,r.highlightedRange.end):null:s,p=kf(i,n),m=s&&(f||p===0||i.day===1),b=s&&(g||p===6||i.day===i.calendar.getDaysInMonth(i));return _.jsx("td",{...a,children:_.jsx("div",{...Gn(o,h),ref:t,className:`${Pe["cell-calendar"]} ${m?"1ru-rounded-l-full":""} ${b?"1ru-rounded-r-full":""} ${s?d?"1ru-bg-red-300":"1ru-bg-laba-blue-02":""} ${u?"1ru-disabled":""}`,children:l?_.jsx("div",{className:Pe["visible-cell-calendar"],children:c}):_.jsx("div",{className:`${Pe["active-cell-calendar"]} ${u&&!d?Pe.disabled:""} ${f||g?d?Pe.error:Pe.selected:""} ${s&&!u&&!(f??g)?d?"hover:1ru-bg-red-400":"hover:1ru-text-laba-blue-05":""} ${!s&&!u?"hover:1ru-bg-laba-blue-01":""}`,children:c})})})},Cs=e=>{const t=I.useRef(null),{buttonProps:n}=jV(e,t),{focusProps:r}=RE();return _.jsx("button",{...Gn(n,r),ref:t,className:`1ru-px-2 1ru-py-1 1ru-rounded-full ${e.isDisabled?"1ru-text-gray-400":"1ru-text-laba-blue-10"} ${e.isDisabled?"":"hover:1ru-bg-laba-blue-01 1ru-cursor-pointer"} 1ru-outline-none`,children:e.children})},Ww=({prevIcon:e,nextIcon:t,state:n,setActiveTypeCalendar:r,onChangeMonth:i,type:a,hiddenHeader:o})=>{const s=new Date().getFullYear(),l=n.focusedDate.calendar.getMonthsInYear(n.focusedDate),u=_a({month:"short",timeZone:n.timeZone}),c=(h,f)=>{const g=n.focusedDate.set({month:h});f?(r("date"),n.setFocusedDate(g)):!f&&typeof i=="function"&&i(g)},d=h=>{const f=n.focusedDate.set({year:h});n.setFocusedDate(f)};return _.jsxs("div",{className:`1ru-w-[296px] ${Pe["container-calendar"]}`,children:[!o&&_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{isDisabled:n!=null&&n.minValue?n.focusedDate.year<=n.minValue.year:!1,onPress:()=>d(n.focusedDate.year-1),children:typeof e=="function"||I.isValidElement(e)?I.isValidElement(e)?e:e():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:`${Pe["header-button-calendar"]} ${a.includes("year")?"":Pe.disabled}`,onClick:()=>{a.includes("year")&&r("year")},children:n.focusedDate.year}),_.jsx(Cs,{isDisabled:n!=null&&n.maxValue?n.focusedDate.year>=n.maxValue.year:!1,onPress:()=>d(n.focusedDate.year+1),children:typeof t=="function"||I.isValidElement(t)?I.isValidElement(t)?t:t():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsx("div",{className:Pe["month-calendar"],children:[...Array(l).keys()].map(h=>{var x,C,E,w;const f=n.focusedDate.set({month:h+1}),g=u.format(f.toDate(n.timeZone)),p=((x=n.value)==null?void 0:x.year)||((E=(C=n.value)==null?void 0:C.start)==null?void 0:E.year)||s,m=n!=null&&n.minValue?f.month<((w=n==null?void 0:n.minValue)==null?void 0:w.month)&&f.year<=n.minValue.year:!1,b=n!=null&&n.maxValue?f.month>n.maxValue.month&&f.year>=n.maxValue.year:!1,v=m||b;return _.jsx("div",{onClick:()=>{v||c(f.month,a.includes("date"))},className:`${Pe["cell-month"]} ${n.focusedDate.month===f.month&&!v&&f.year===p?Pe.selected:""} ${n.focusedDate.month!==f.month&&!v?"hover:1ru-bg-laba-blue-01":""} ${v?"1ru-text-gray-400":"1ru-cursor-pointer"}`,children:g},h)})})]})},gH=e=>{const t=N3(e.state.visibleRange.start,e.locale),{gridProps:n,headerProps:r,weekDays:i}=xS({},e.state),{prevButtonProps:a,nextButtonProps:o,title:s}=yS(e,e.state),l=u=>{let c="";switch(u){case 0:c="Min";break;case 1:c="Sen";break;case 2:c="Sel";break;case 3:c="Rab";break;case 4:c="Kam";break;case 5:c="Jum";break;case 6:c="Sab";break}return c};return _.jsxs("div",{children:[!e.hiddenHeader&&_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{...a,children:typeof(e==null?void 0:e.prevIcon)=="function"||I.isValidElement(e==null?void 0:e.prevIcon)?I.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:Pe["header-button-calendar"],onClick:()=>e.setActiveTypeCalendar("month"),children:s}),_.jsx(Cs,{...o,children:typeof(e==null?void 0:e.nextIcon)=="function"||I.isValidElement(e==null?void 0:e.nextIcon)?I.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsxs("table",{...n,children:[_.jsx("thead",{...r,children:_.jsx("tr",{children:i.map((u,c)=>_.jsx("th",{className:Pe["days-calendar"],children:l(c)},c))})}),_.jsx("tbody",{children:[...new Array(t).keys()].map(u=>_.jsx("tr",{children:e.state.getDatesInWeek(u).map((c,d)=>c?_.jsx(jw,{state:e.state,date:c},d):_.jsx("td",{},d))},u))})]})]})},Vd=({minDate:e,maxDate:t,value:n,time:r,hiddenHeader:i,handlerChangeTime:a,timeLabel:o,type:s})=>{const l=e?new Date(e):null,u=t?new Date(t):null,c=l==null?void 0:l.getHours(),d=u==null?void 0:u.getHours(),h=l==null?void 0:l.getMinutes(),f=u==null?void 0:u.getMinutes(),[g,p]=I.useState(!0),m=(C,E,w)=>Array.from({length:(E-C)/w+1},(B,y)=>C+y*w),b=(C,E)=>{typeof a=="function"&&a({hour:C,minut:E,second:r==null?void 0:r.second})},v=()=>{const C=document.getElementById(`calendar-hour-${r==null?void 0:r.hour}-${s}`),E=document.getElementById(`calendar-minut-${r==null?void 0:r.minut}-${s}`),w=document.getElementById(`wrapper-calendar-hour-${s}`),B=document.getElementById(`wrapper-calendar-minut-${s}`);C&&w&&w.scrollTo({behavior:"instant",top:C.offsetTop-78}),E&&B&&B.scrollTo({behavior:"instant",top:E.offsetTop-78})},x=(C,E)=>{let w=!0;if(l&&n){const B=n.year===l.getFullYear(),y=n.month===l.getMonth()+1;n.day===l.getDate()&&y&&B?(E==="hour"&&C<(c??0)||E==="minut"&&((r==null?void 0:r.hour)??0)<=l.getHours()&&C<(h??0))&&(w=!1):n.toDate(Kn()).getTime()<l.getTime()&&(w=!1)}if(u&&n){const B=n.year===u.getFullYear(),y=n.month===u.getMonth()+1;n.day===u.getDate()&&y&&B?(E==="hour"&&C>(d??0)||E==="minut"&&((r==null?void 0:r.hour)??0)>=u.getHours()&&C>(f??0))&&(w=!1):n.toDate(Kn()).getTime()>u.getTime()&&(w=!1)}return w};return I.useEffect(()=>{g&&v(),r&&p(!1)},[JSON.stringify(n),JSON.stringify(r)]),_.jsxs("div",{className:Pe["custom-time-calendar"],children:[!i&&_.jsx("div",{className:Pe["header-time"],children:o||"Atur Waktu"}),_.jsxs("div",{className:Pe["type-time"],children:[_.jsx("div",{children:"Jam"}),_.jsx("div",{children:"Menit"})]}),_.jsxs("div",{className:"1ru-flex 1ru-justify-around",children:[_.jsx("div",{id:`wrapper-calendar-hour-${s}`,className:Pe["container-cell-time"],children:m(0,23,1).map(C=>_.jsx("div",{id:`calendar-hour-${C}-${s}`,className:`${Pe["cell-time"]} ${(r==null?void 0:r.hour)===C?x(C,"hour")?Pe.selected:Pe.error:""} ${x(C,"hour")&&(r==null?void 0:r.hour)!=C?Pe.valid:Pe.invalid}`,onClick:()=>{x(C,"hour")&&b(C,r==null?void 0:r.minut)},children:C<10?`0${C}`:C},C))}),_.jsx("div",{id:`wrapper-calendar-minut-${s}`,className:Pe["container-cell-time"],children:m(0,59,1).map(C=>_.jsx("div",{id:`calendar-minut-${C}-${s}`,className:`${Pe["cell-time"]} ${(r==null?void 0:r.minut)===C?x(C,"minut")?Pe.selected:Pe.error:""} ${x(C,"minut")&&(r==null?void 0:r.minut)!=C?Pe.valid:Pe.invalid}`,onClick:()=>{x(C,"minut")&&b(r==null?void 0:r.hour,C)},children:C<10?`0${C}`:C},C))})]})]})},Mf=e=>{var h,f,g,p,m,b,v,x,C;const t=e.typeTime??"SINGLE",n=iw({...e,locale:e.locale,createCalendar:Iu}),{title:r}=yS(e,n),[i,a]=I.useState((e==null?void 0:e.activeType)??"date"),[o,s]=I.useState({start:void 0,end:void 0}),l=((f=(h=o.start)==null?void 0:h.hour)==null?void 0:f.toString())&&((p=(g=o==null?void 0:o.start)==null?void 0:g.minut)==null?void 0:p.toString())&&((v=e.value)==null?void 0:v.toDate(Kn()).setHours((m=o.start)==null?void 0:m.hour,(b=o.start)==null?void 0:b.minut))||e.minDate,u=e.maxDate,c=(E,w)=>{const B={...o,[w]:E};s(B),typeof(e==null?void 0:e.handlerChangeTime)=="function"&&e.handlerChangeTime(B)},d=E=>{n.setValue(E)};return ba(()=>{e!=null&&e.activeType&&a(e.activeType)},[e==null?void 0:e.activeType]),I.useEffect(()=>{var E,w;if((E=e.time)!=null&&E.start&&((w=e.time)!=null&&w.end)){const B=e.time.start,y=e.time.end;s({start:B,end:y})}},[JSON.stringify(e.time)]),_.jsxs("div",{className:"1ru-text-laba-base-sr",children:[i==="date"&&_.jsx(_.Fragment,{children:_.jsxs("div",{className:Pe["container-calendar"],children:[_.jsxs("div",{className:"1ru-flex 1ru-gap-2",children:[_.jsx(gH,{state:n,setActiveTypeCalendar:a,...e}),(e==null?void 0:e.isCustomTime)&&_.jsxs("div",{className:"1ru-flex",children:[_.jsx(Vd,{minDate:e.minDate,maxDate:e.maxDate,time:(x=e.time)==null?void 0:x.start,value:e.value,timeLabel:t==="RANGE"?"Awal":"Atur Waktu",type:"start",handlerChangeTime:E=>c(E,"start")}),t==="RANGE"&&_.jsx(Vd,{minDate:l,maxDate:u,time:(C=e.time)==null?void 0:C.end,value:e.value,timeLabel:"Akhir",type:"end",handlerChangeTime:E=>c(E,"end")})]})]}),((e==null?void 0:e.withConfirm)??(e==null?void 0:e.isCustomTime))&&_.jsxs("div",{className:`${Pe["footer-calendar"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:()=>e.handlerReset(n),children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(n),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})}),i==="month"&&_.jsx(Ww,{state:n,setActiveTypeCalendar:a,type:e.type,onChangeMonth:d,hiddenHeader:e.hiddenHeader}),i==="year"&&_.jsx(W2,{state:n,type:e.type,setActiveTypeCalendar:a,title:r,onChangeYear:d,hiddenHeader:e.hiddenHeader})]})},pH=e=>{var C,E,w,B,y,S,D,A,T,F,k,P;const t=I.useRef(null),{locale:n}=Mr(),r=oH({...e,locale:n,createCalendar:Iu}),i=$=>{let R="";switch($){case 0:R="Min";break;case 1:R="Sen";break;case 2:R="Sel";break;case 3:R="Rab";break;case 4:R="Kam";break;case 5:R="Jum";break;case 6:R="Sab";break}return R},{calendarProps:a,prevButtonProps:o,nextButtonProps:s,title:l}=UV(e,r,t),{gridProps:u,headerProps:c,weekDays:d}=xS({},r),h=N3(r.visibleRange.start,n),[f,g]=I.useState("date"),[p,m]=I.useState({start:void 0,end:void 0}),b=((E=(C=p.start)==null?void 0:C.hour)==null?void 0:E.toString())&&((B=(w=p==null?void 0:p.start)==null?void 0:w.minut)==null?void 0:B.toString())&&((A=(y=e.value)==null?void 0:y.start)==null?void 0:A.toDate(Kn()).setHours((S=p.start)==null?void 0:S.hour,(D=p.start)==null?void 0:D.minut))||e.minDate,v=e.maxDate,x=($,R)=>{const O={...p,[R]:$};m(O),typeof(e==null?void 0:e.handlerChangeTimeRange)=="function"&&e.handlerChangeTimeRange(O)};return I.useEffect(()=>{var $,R;if(($=e.time)!=null&&$.start&&((R=e.time)!=null&&R.end)){const O=e.time.start,j=e.time.end;m({start:O,end:j})}},[JSON.stringify(e.time)]),_.jsxs("div",{className:"1ru-text-laba-base-sr",children:[f==="date"&&_.jsx(_.Fragment,{children:_.jsx("div",{...a,ref:t,children:_.jsxs("div",{className:Pe["container-calendar"],children:[_.jsxs("div",{className:"1ru-flex 1ru-gap-2",children:[_.jsxs("div",{children:[_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{...o,children:typeof(e==null?void 0:e.prevIcon)=="function"||I.isValidElement(e==null?void 0:e.prevIcon)?I.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:Pe["header-button-calendar"],onClick:()=>g("month"),children:l}),_.jsx(Cs,{...s,children:typeof(e==null?void 0:e.nextIcon)=="function"||I.isValidElement(e==null?void 0:e.nextIcon)?I.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsxs("table",{...u,cellPadding:"0",className:"flex-1",children:[_.jsx("thead",{...c,className:"text-gray-600",children:_.jsx("tr",{children:d.map(($,R)=>_.jsx("th",{className:Pe["days-calendar"],children:i(R)},R))})}),_.jsx("tbody",{children:[...new Array(h).keys()].map($=>_.jsx("tr",{children:r.getDatesInWeek($).map((R,O)=>R?_.jsx(jw,{state:r,date:R},O):_.jsx("td",{},O))},$))})]})]}),(e==null?void 0:e.isCustomTime)&&_.jsxs("div",{className:"1ru-flex",children:[_.jsx(Vd,{minDate:e.minDate,maxDate:e.maxDate,time:(T=e.time)==null?void 0:T.start,value:(F=e.value)==null?void 0:F.start,timeLabel:"Awal",type:"start",handlerChangeTime:$=>x($,"start")}),_.jsx(Vd,{minDate:b,maxDate:v,time:(k=e.time)==null?void 0:k.end,value:(P=e.value)==null?void 0:P.end,timeLabel:"Akhir",type:"end",handlerChangeTime:$=>x($,"end")})]})]}),e.withConfirm&&_.jsxs("div",{className:Pe["footer-calendar"],children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:()=>e.handlerReset(r),children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(r),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})})}),f==="month"&&_.jsx(Ww,{state:r,setActiveTypeCalendar:g,type:["date","month","year"]}),f==="year"&&_.jsx(W2,{state:r,setActiveTypeCalendar:g,title:l,type:["date","month","year"]})]})},zw=e=>{const t=hH(e),n=I.useRef(null),{calendarProps:r}=aH(e,t,n);return _.jsx("div",{ref:n,children:_.jsx(pH,{handlerReset:e.handlerReset,handlerSubmit:e.handlerSubmit,withConfirm:e.withConfirm,prevIcon:e.prevIcon,nextIcon:e.nextIcon,buttonReset:e.buttonReset,buttonSubmit:e.buttonSubmit,isCustomTime:e.isCustomTime,time:e.time,minDate:e.minDate,maxDate:e.maxDate,handlerChangeTimeRange:e.handlerChangeTimeRange,...r})})},ac=e=>{let t;const n=new Date(e??new Date);return e&&(t=Cm(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},mH=e=>{const{minDate:t,maxDate:n,value:r,defaultValue:i,withConfirm:a=!1,isCustomTime:o=!1,className:s,classNameButton:l,buttonClick:u,buttonReset:c,buttonSubmit:d,prevIcon:h,nextIcon:f,onChange:g,id:p="date-picker",idPopover:m="date-picker-popover",floatingOptions:b={},offsetPopover:v=5,zIndexPopper:x=1,hiddenHeader:C}=e,E=_a(),{locale:w}=Mr(),B=ac(t),y=ac(n),S=I.useRef(null),[D,A]=I.useState(),[T,F]=I.useState(),k=j=>{var ee;const V=new Date;let W=j.toDate(Kn());W.setHours(V.getHours(),V.getMinutes(),V.getSeconds());const U=t?new Date(t):null,K=n?new Date(n):null;if(o){if(W=new Date(new Date(W).setHours((T==null?void 0:T.hour)??0,T==null?void 0:T.minut,T==null?void 0:T.second)),U&&(U==null?void 0:U.toDateString())===new Date(W).toDateString()&&(U==null?void 0:U.toTimeString())>=(W==null?void 0:W.toTimeString())){if(U&&(U.getHours()>W.getHours()||U.getHours()===W.getHours()&&U.getMinutes()>W.getMinutes()))return;W=new Date(U.setSeconds(U.getSeconds()+1))}if(K&&(K==null?void 0:K.toDateString())===new Date(W).toDateString()&&(K==null?void 0:K.toTimeString())<(W==null?void 0:W.toTimeString())){if(K&&(K.getHours()<W.getHours()||K.getHours()===W.getHours()&&K.getMinutes()<W.getMinutes()))return;W=new Date(K.setSeconds(K.getSeconds()-1))}}else U&&E.format(W)===E.format(U)&&U.getTime()>=W.getTime()?W=new Date(U.setSeconds(U.getSeconds()+1)):K&&E.format(W)===E.format(K)&&K.getTime()<=W.getTime()&&(W=new Date(K.setSeconds(K.getSeconds()-1)));typeof g=="function"&&(g(W),(ee=S.current)==null||ee.setShow(!1))},P=(j,V)=>{A(j),(V??(!a&&!o))&&k(j)},$=j=>{const{start:V}=j;F(V)},R=j=>{const V=new Date(r??new Date);F({hour:V.getHours(),minut:V.getMinutes(),second:V.getSeconds()}),A(ac(r))},O=()=>{D&&P(D,!0)};return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:p,onClick:j=>{var V;(V=S.current)==null||V.handlerShow(j),R()},className:l,children:typeof u=="function"?u(r):r?new Date(r).toDateString():"Pilih Tanggal"}),_.jsx(gi,{zIndex:x,ref:S,offset:v,id:m,floatingOptions:{placement:"bottom-end",...b},children:_.jsx("div",{className:s??"",children:_.jsx(Fm,{locale:"id-ID",children:_.jsx(Mf,{minValue:B,maxValue:y,minDate:t,maxDate:n,time:{start:T},locale:w,value:D,typeTime:"SINGLE",buttonReset:c,buttonSubmit:d,prevIcon:h,nextIcon:f,createCalendar:Iu,defaultValue:ac(r),onChange:P,handlerReset:()=>{var j;typeof g=="function"&&(g(i),(j=S.current)==null||j.setShow(!1))},handlerSubmit:O,handlerChangeTime:$,withConfirm:a,isCustomTime:o,type:["date","month","year"],hiddenHeader:C})})})})]})},Gh=e=>{let t;const n=new Date(e??new Date);return e&&(t=Cm(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},ry=e=>{const t=new Date((e==null?void 0:e.startDate)??new Date),n=new Date((e==null?void 0:e.endDate)??new Date),r=new Ot(t.getFullYear(),t.getMonth()+1,t.getDate()),i=new Ot(n.getFullYear(),n.getMonth()+1,n.getDate());return e?{start:r,end:i}:void 0},Gw=e=>{const{minDate:t,maxDate:n,defaultValue:r,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,typePicker:u="RANGE",onChange:c,value:d,onReset:h,isCustomTime:f}=e,{locale:g}=Mr(),p=Gh(t),m=Gh(n),[b,v]=I.useState(),[x,C]=I.useState({start:void 0,end:void 0}),E=D=>{typeof c=="function"&&c(D)},w=(D,A)=>{const T=D.start.toDate(Kn()),F=D.end.toDate(Kn());v(D),C({start:{hour:0,minut:0,second:0},end:{hour:23,minut:59,second:59}}),(A??!i)&&E({startDate:T,endDate:new Date(F.setHours(23,59,59))})},B=(D,A)=>{var T,F,k,P,$,R,O,j;if(b!=null&&b.start&&(b!=null&&b.end)&&(C(D),(F=(T=D.start)==null?void 0:T.hour)!=null&&F.toString()&&((P=(k=D.start)==null?void 0:k.minut)!=null&&P.toString())&&((R=($=D.end)==null?void 0:$.hour)!=null&&R.toString())&&((j=(O=D.end)==null?void 0:O.minut)!=null&&j.toString())&&(A??!i))){const V=b.start.toDate(Kn()),W=b.end.toDate(Kn()),U=new Date(V.setHours(D.start.hour,D.start.minut)),K=new Date(W.setHours(D.end.hour,D.end.minut,59));U.getTime()<K.getTime()&&E({startDate:U,endDate:K})}},y=D=>{if(typeof h=="function")h();else if(r&&D){const A=new Date(r.endDate??new Date),T=D.focusedDate.set({month:A.getMonth()+1,year:A.getFullYear()});D.setFocusedDate(T)}v(ry(r))},S=()=>{b&&(f?B(x,!0):w(b,!0))};return I.useEffect(()=>{if(d!=null&&d.endDate&&(d!=null&&d.startDate)){const D=new Date(d.startDate),A=new Date(d.endDate),T=D.getHours(),F=D.getMinutes(),k=A.getHours(),P=A.getMinutes(),$=Bn(Sv(D,Kn())),R=Bn(Sv(A,Kn()));v({start:$,end:R}),C({start:{hour:T,minut:F},end:{hour:k,minut:P}})}},[JSON.stringify(d)]),_.jsx("div",{className:"1ru-flex 1ru-flex-col",children:_.jsxs(Fm,{locale:"id-ID",children:[u==="RANGE"&&_.jsx(zw,{defaultValue:ry(r),value:b,minValue:p,maxValue:m,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,onChange:w,isCustomTime:f,handlerReset:y,handlerSubmit:S,time:x,minDate:t,maxDate:n,handlerChangeTimeRange:B}),u==="SINGLE"&&_.jsx(Mf,{defaultValue:Gh(r==null?void 0:r.endDate),value:b==null?void 0:b.end,minValue:p,maxValue:m,minDate:t,maxDate:n,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,locale:g,time:x,typeTime:"RANGE",handlerChangeTime:B,isCustomTime:f,createCalendar:Iu,onChange:D=>w({start:D,end:D}),handlerReset:y,handlerSubmit:S,type:["date","month","year"]})]})})},bH=({value:e,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,className:a,classNameButton:o,buttonClick:s,buttonList:l,typePicker:u="RANGE",onChange:c,idPopover:d="filter-date-popover",id:h="filter-date",floatingOptions:f={},offsetPopover:g=5,zIndexPopper:p=0,defaultValueLabel:m,isCustomTime:b=!1,mountedExecuteChange:v=!0,formatingDate:x})=>{const C=[{key:"thisDay",value:"Hari ini"},{key:"thisWeek",value:"Minggu ini"},{key:"thisMonth",value:"Bulan ini"},{key:"thisYear",value:"Tahun ini"},{key:"yesterday",value:"Kemarin"},{key:"lastWeek",value:"Minggu lalu"},{key:"lastMonth",value:"Bulan lalu"},{key:"lastYear",value:"Tahun lalu"},{key:"custom",value:"Kustom"}],E=I.useRef(null),[w,B]=I.useState(),[y,S]=I.useState(),[D,A]=I.useState(),T=(z,H)=>{const X=new Date(z??new Date);return H==="start"?new Date(X.setHours(0,0,0)):new Date(X.setHours(23,59,59))},F=()=>{const z=new Date;return{startDate:z,endDate:z}},k=()=>{const z=new Date;z.setDate(z.getDate()-z.getDay());const H=new Date;return H.setDate(H.getDate()+(6-H.getDay())),{startDate:z,endDate:H}},P=()=>{const z=new Date,H=new Date(z.getFullYear(),z.getMonth(),1),X=new Date(z.getFullYear(),z.getMonth()+1,0);return{startDate:H,endDate:X}},$=()=>{const z=new Date(new Date().getFullYear(),0,1),H=new Date(new Date().getFullYear(),11,31);return{startDate:z,endDate:H}},R=()=>{const z=new Date(new Date().setDate(new Date().getDate()-1));return{startDate:z,endDate:z}},O=()=>{const z=new Date;z.setDate(z.getDate()-(7+z.getDay()));const H=new Date;return H.setDate(H.getDate()-(H.getDay()+1)),{startDate:z,endDate:H}},j=()=>{const z=new Date,H=new Date(z.getFullYear(),z.getMonth()-1,1),X=new Date(z.getFullYear(),z.getMonth(),0);return{startDate:H,endDate:X}},V=()=>{const z=new Date(new Date().getFullYear()-1,0,1),H=new Date(new Date().getFullYear()-1,11,31);return{startDate:z,endDate:H}},W=(z,H,X)=>{var te;if(A(z),typeof c=="function"){let ie=z;x==="string"&&z?ie={startDate:qo(z.startDate,x),endDate:qo(z.endDate,x)}:typeof x=="boolean"&&z&&(ie={startDate:qo(z.startDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),endDate:qo(z.endDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")}),(te=E.current)==null||te.setShow(!1),c(ie,H??"",X)}},U=(z,H)=>{B(z);let X;if((z==null?void 0:z.key)!=="custom"){switch(S(z),z==null?void 0:z.key){case"thisDay":X=F();break;case"thisWeek":X=k();break;case"thisMonth":X=P();break;case"thisYear":X=$();break;case"yesterday":X=R();break;case"lastWeek":X=O();break;case"lastMonth":X=j();break;case"lastYear":X=V();break}X&&H&&W({startDate:T(X.startDate,"start"),endDate:T(X.endDate,"end")},z==null?void 0:z.value,z)}},K=(z,H)=>{const X=(l??C).find(te=>te.key===z);!z&&!X?(H&&W(),U(void 0,H),S(void 0)):typeof z=="object"?(H&&W({startDate:T(z.startDate,"start"),endDate:T(z.endDate,"end")},"Kustom",{key:"custom",value:"Kustom"}),U({key:"custom",value:"Kustom"},H),S({key:"custom",value:"Kustom"})):(U(X,H),S(X))},ee=()=>{var z;if(e){A(e);const H=(z=l??C)==null?void 0:z.find(X=>X.key===e.label||X.value===e.label);Object.keys(H||{}).length>0&&B(H)}else B(void 0),S(void 0)};return I.useEffect(()=>{ee()},[JSON.stringify(e)]),I.useEffect(()=>{K(m??e,v)},[]),_.jsxs(_.Fragment,{children:[_.jsxs("div",{onClick:z=>{var H;(H=E.current)==null||H.handlerShow(z),ee()},className:o,id:h,children:[I.isValidElement(s)&&s,typeof s=="function"?s(D,y):"Pilih Filter"]}),_.jsx(gi,{zIndex:p,ref:E,offset:g,id:d,floatingOptions:{placement:"bottom-end",...f},children:_.jsxs("div",{className:`${Pe["container-filter-date"]} ${a}`,children:[_.jsxs("div",{children:[(l??C).map((z,H)=>_.jsx("div",{className:`${Pe["button-filter-date"]} hover:1ru-bg-laba-blue-01 ${(w==null?void 0:w.key)===z.key?"1ru-text-laba-blue-10":""}`,onClick:()=>U(z,!0),children:z.value},H)),(w==null?void 0:w.key)!=="custom"&&_.jsx(_.Fragment,{children:typeof r=="function"?_.jsx("div",{className:Pe["button-filter-date-custome"],onClick:()=>K(m,!0),children:r()}):_.jsx(jn,{className:Pe["button-reset-filter-date"],variants:"nude-laba-blue-10",size:"small",onClick:()=>K(m,!0),children:"Reset"})})]}),(w==null?void 0:w.key)==="custom"&&_.jsx("div",{children:_.jsx(Gw,{defaultValue:D,value:D,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,isCustomTime:b,onChange:z=>{W(z,"Kustom",{key:"custom",value:"Kustom"}),S({key:"custom",value:"Kustom"})},onReset:()=>{K(m,!0)},typePicker:u,withConfirm:!0})})]})})]})},vH="_active_1fa6e_506",yH="_disabled_1fa6e_509",Kt={"title-switch-payhere":"_title-switch-payhere_1fa6e_73","description-switch-payhere":"_description-switch-payhere_1fa6e_109","title-switch-laba":"_title-switch-laba_1fa6e_247","description-switch-laba":"_description-switch-laba_1fa6e_271","title-switch-bill":"_title-switch-bill_1fa6e_385","description-switch-bill":"_description-switch-bill_1fa6e_421","switch-l":"_switch-l_1fa6e_493","switch-payhere":"_switch-payhere_1fa6e_493",active:vH,disabled:yH,"disabled-nonactive":"_disabled-nonactive_1fa6e_512","thumb-switch":"_thumb-switch_1fa6e_515","switch-laba":"_switch-laba_1fa6e_532","switch-bill":"_switch-bill_1fa6e_571","switch-r":"_switch-r_1fa6e_611","switch-s":"_switch-s_1fa6e_729"},oc={size:{large:Kt["switch-l"],regular:Kt["switch-r"],small:Kt["switch-s"]},kind:{laba:Kt["switch-laba"],payhere:Kt["switch-payhere"],bill:Kt["switch-bill"]},text:{title:{laba:Kt["title-switch-laba"],payhere:Kt["title-switch-payhere"],bill:Kt["title-switch-bill"]},desc:{laba:Kt["description-switch-laba"],payhere:Kt["description-switch-payhere"],bill:Kt["description-switch-bill"]}}},xH=({value:e,disabled:t,title:n="",description:r="",size:i="regular",kind:a="payhere",id:o,className:s,classNameTitle:l,classNameDesc:u,onChange:c})=>{const d=()=>{!t&&typeof c=="function"&&c(!e)};return _.jsxs("div",{className:`1ru-flex 1ru-gap-2 ${s??""}`,onClick:h=>h.stopPropagation(),children:[_.jsxs("label",{children:[_.jsx("input",{id:o??"1ru-switch",type:"checkbox",checked:e,onChange:d,className:"1ru-hidden"}),_.jsx("span",{className:`${oc.size[i]} ${oc.kind[a]} ${e?Kt.active:""} ${t?Kt.disabled:""} ${!e&&t?Kt["disabled-nonactive"]:""}`,children:_.jsx("span",{className:`${Kt["thumb-switch"]} ${e?Kt.active:""} ${t?Kt.disabled:""} ${!e&&t?Kt["disabled-nonactive"]:""}`})})]}),(n||r)&&_.jsxs("div",{children:[n&&_.jsx("div",{className:`${oc.text.title[a]} ${l}`,children:n}),r&&_.jsx("div",{className:`${oc.text.desc[a]} ${u}`,children:r})]})]})},CH="_loading_153hn_482",Ne={"button-l":"_button-l_153hn_67","button-m":"_button-m_153hn_67","button-s":"_button-s_153hn_115","button-xs":"_button-xs_153hn_115","button-large":"_button-large_153hn_241","button-reguler":"_button-reguler_153hn_241","button-small":"_button-small_153hn_259","button-extra-small":"_button-extra-small_153hn_259","button-bill-l":"_button-bill-l_153hn_379","button-bill-m":"_button-bill-m_153hn_379","button-bill-s":"_button-bill-s_153hn_427","button-bill-xs":"_button-bill-xs_153hn_427","button-bill-xxs":"_button-bill-xxs_153hn_427",loading:CH,"nude-laba-red-05":"_nude-laba-red-05_153hn_497","nude-laba-red-10":"_nude-laba-red-10_153hn_497","nude-gray-500":"_nude-gray-500_153hn_497","nude-green-700":"_nude-green-700_153hn_497","nude-red-700":"_nude-red-700_153hn_497","nude-laba-blue-10":"_nude-laba-blue-10_153hn_497","ghost-laba-green-10":"_ghost-laba-green-10_153hn_497","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_153hn_497","ghost-green-700":"_ghost-green-700_153hn_497","ghost-red-700":"_ghost-red-700_153hn_497","ghost-laba-blue-10":"_ghost-laba-blue-10_153hn_497","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_153hn_497","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_153hn_497","primary-green-700":"_primary-green-700_153hn_497","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_153hn_497","primary-laba-blue-10":"_primary-laba-blue-10_153hn_497","primary-bill-red-700":"_primary-bill-red-700_153hn_497","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_153hn_497","secondary-bill-secondary-800":"_secondary-bill-secondary-800_153hn_497","primary-bill-primary-600":"_primary-bill-primary-600_153hn_497","tertiary-gray-500":"_tertiary-gray-500_153hn_497","tertiary-red-600":"_tertiary-red-600_153hn_497","tertiary-red-300":"_tertiary-red-300_153hn_497","tertiary-blue-700":"_tertiary-blue-700_153hn_497","secondary-green-600":"_secondary-green-600_153hn_497","secondary-red-700":"_secondary-red-700_153hn_497","secondary-red-600":"_secondary-red-600_153hn_497","secondary-blue-700":"_secondary-blue-700_153hn_497","primary-red-700":"_primary-red-700_153hn_497","primary-blue-700":"_primary-blue-700_153hn_497","icon-loading":"_icon-loading_153hn_595"},Uh={size:{large:Ne["button-large"],reguler:Ne["button-reguler"],small:Ne["button-small"],"extra-small":Ne["button-extra-small"],l:Ne["button-l"],m:Ne["button-m"],s:Ne["button-s"],xs:Ne["button-xs"],"bill-l":Ne["button-bill-l"],"bill-m":Ne["button-bill-m"],"bill-s":Ne["button-bill-s"],"bill-xs":Ne["button-bill-xs"],"bill-xxs":Ne["button-bill-xxs"]},loadingSize:{large:"1ru-size-6",reguler:"1ru-size-5",small:"1ru-size-5","extra-small":"1ru-size-5",l:"1ru-size-6",m:"1ru-size-5",s:"1ru-size-5",xs:"1ru-size-5","bill-l":"1ru-size-6","bill-m":"1ru-size-5","bill-s":"1ru-size-5","bill-xs":"1ru-size-5","bill-xxs":"1ru-size-5"},variants:{"primary-laba-blue-10":Ne["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Ne["primary-red-700-dsb_laba-grey-06"],"primary-green-700":Ne["primary-green-700"],"filled-laba-white_laba-blue-10":Ne["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Ne["filled-laba-white_laba-red-05"],"ghost-laba-blue-10":Ne["ghost-laba-blue-10"],"ghost-red-700":Ne["ghost-red-700"],"ghost-green-700":Ne["ghost-green-700"],"ghost-laba-green-10":Ne["ghost-laba-green-10"],"nude-laba-blue-10":Ne["nude-laba-blue-10"],"nude-red-700":Ne["nude-red-700"],"nude-green-700":Ne["nude-green-700"],"nude-gray-500":Ne["nude-gray-500"],"primary-blue-700":Ne["primary-blue-700"],"secondary-blue-700":Ne["secondary-blue-700"],"tertiary-blue-700":Ne["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Ne["ghost-blue-gray-100-bg_white"],"secondary-red-600":Ne["secondary-red-600"],"tertiary-red-300":Ne["tertiary-red-300"],"tertiary-gray-500":Ne["tertiary-gray-500"],"tertiary-red-600":Ne["tertiary-red-600"],"secondary-green-600":Ne["secondary-green-600"],"nude-laba-red-10":Ne["nude-laba-red-10"],"nude-laba-red-05":Ne["nude-laba-red-05"],"primary-red-700":Ne["primary-red-700"],"secondary-red-700":Ne["secondary-red-700"],"primary-bill-primary-600":Ne["primary-bill-primary-600"],"secondary-bill-secondary-800":Ne["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Ne["tertiary-bill-secondary-800"],"primary-bill-red-700":Ne["primary-bill-red-700"]}},EH=({className:e=""})=>_.jsx("svg",{className:`${Ne["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:_.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
106
|
+
`]))),rM=function(t,n){var r=t.isFocused,i=t.size,a=t.theme,o=a.colors,s=a.spacing.baseUnit;return Be({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2})},Eh=function(t){var n=t.delay,r=t.offset;return Te("span",{css:dm({animation:"".concat(nM," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},iM=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,a=i===void 0?4:i,o=Wi(t,XN);return Te("div",$e({},Mt(Be(Be({},o),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Te(Eh,{delay:0,offset:r}),Te(Eh,{delay:160,offset:!0}),Te(Eh,{delay:320,offset:!r}))},aM=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.theme,o=a.colors,s=a.borderRadius,l=a.spacing;return Be({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},oM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.innerRef,o=t.innerProps,s=t.menuIsOpen;return Te("div",$e({ref:a},Mt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),o,{"aria-disabled":r||void 0}),n)},sM=oM,lM=["data"],uM=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},cM=function(t){var n=t.children,r=t.cx,i=t.getStyles,a=t.getClassNames,o=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Te("div",$e({},Mt(t,"group",{group:!0}),l),Te(o,$e({},s,{selectProps:d,theme:c,getStyles:i,getClassNames:a,cx:r}),u),Te("div",null,n))},dM=function(t,n){var r=t.theme,i=r.colors,a=r.spacing;return Be({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},fM=function(t){var n=u3(t);n.data;var r=Wi(n,lM);return Te("div",$e({},Mt(t,"groupHeading",{"group-heading":!0}),r))},hM=cM,gM=["innerRef","isDisabled","isHidden","inputClassName"],pM=function(t,n){var r=t.isDisabled,i=t.value,a=t.theme,o=a.spacing,s=a.colors;return Be(Be({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},mM),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},v3={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mM={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Be({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},v3)},bM=function(t){return Be({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},v3)},vM=function(t){var n=t.cx,r=t.value,i=u3(t),a=i.innerRef,o=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Wi(i,gM);return Te("div",$e({},Mt(t,"input",{"input-container":!0}),{"data-value":r||""}),Te("input",$e({className:n({input:!0},l),ref:a,style:bM(s),disabled:o},u)))},yM=vM,xM=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors;return Be({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:a/2,margin:i.baseUnit/2})},CM=function(t,n){var r=t.theme,i=r.borderRadius,a=r.colors,o=t.cropWithEllipsis;return Be({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},EM=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors,s=t.isFocused;return Be({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},y3=function(t){var n=t.children,r=t.innerProps;return Te("div",r,n)},SM=y3,wM=y3;function IM(e){var t=e.children,n=e.innerProps;return Te("div",$e({role:"button"},n),t||Te(fm,{size:14}))}var _M=function(t){var n=t.children,r=t.components,i=t.data,a=t.innerProps,o=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Te(u,{data:i,innerProps:Be(Be({},Mt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),a),selectProps:l},Te(c,{data:i,innerProps:Be({},Mt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Te(d,{data:i,innerProps:Be(Be({},Mt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},DM=_M,AM=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.theme,s=o.spacing,l=o.colors;return Be({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?l.primary:l.primary50}})},TM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.innerRef,s=t.innerProps;return Te("div",$e({},Mt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":a}),{ref:o,"aria-disabled":r},s),n)},RM=TM,BM=function(t,n){var r=t.theme,i=r.spacing,a=r.colors;return Be({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},$M=function(t){var n=t.children,r=t.innerProps;return Te("div",$e({},Mt(t,"placeholder",{placeholder:!0}),r),n)},kM=$M,PM=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing,o=i.colors;return Be({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},FM=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Te("div",$e({},Mt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},NM=FM,x3={ClearIndicator:QN,Control:sM,DropdownIndicator:qN,DownChevron:m3,CrossIcon:fm,Group:hM,GroupHeading:fM,IndicatorsContainer:GN,IndicatorSeparator:tM,Input:yM,LoadingIndicator:iM,Menu:BN,MenuList:kN,MenuPortal:ON,LoadingMessage:MN,NoOptionsMessage:NN,MultiValue:DM,MultiValueContainer:SM,MultiValueLabel:wM,MultiValueRemove:IM,Option:RM,Placeholder:kM,SelectContainer:HN,SingleValue:NM,ValueContainer:WN},MM=function(t){return Be(Be({},x3),t.components)},ov=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function LM(e,t){return!!(e===t||ov(e)&&ov(t))}function OM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!LM(e[n],t[n]))return!1;return!0}function VM(e,t){t===void 0&&(t=OM);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}function HM(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var jM=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:HM},WM=function(t){return Te("span",$e({css:jM},t))},sv=WM,zM={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,a=t.context,o=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,a=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,a=t.label,o=a===void 0?"":a,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(p,m){return p&&p.length?"".concat(p.indexOf(m)+1," of ").concat(p.length):""};if(n==="value"&&s)return"value ".concat(o," focused, ").concat(d(s,r),".");if(n==="menu"&&c){var h=l?" disabled":"",f="".concat(u?" selected":"").concat(h);return"".concat(o).concat(f,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},GM=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,o=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,h=l.getOptionLabel,f=l.inputValue,g=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,v=l.options,x=l.screenReaderStatus,C=l.tabSelectsValue,E=l.isLoading,w=l["aria-label"],B=l["aria-live"],y=I.useMemo(function(){return Be(Be({},zM),d||{})},[d]),S=I.useMemo(function(){var P="";if(n&&y.onChange){var $=n.option,R=n.options,O=n.removedValue,j=n.removedValues,V=n.value,W=function(te){return Array.isArray(te)?null:te},U=O||$||W(V),K=U?h(U):"",ee=R||j||void 0,z=ee?ee.map(h):[],H=Be({isDisabled:U&&p(U,s),label:K,labels:z},n);P=y.onChange(H)}return P},[n,y,p,s,h]),D=I.useMemo(function(){var P="",$=r||i,R=!!(r&&s&&s.includes(r));if($&&y.onFocus){var O={focused:$,label:h($),isDisabled:p($,s),isSelected:R,options:a,context:$===r?"menu":"value",selectValue:s,isAppleDevice:c};P=y.onFocus(O)}return P},[r,i,h,p,y,a,s,c]),A=I.useMemo(function(){var P="";if(b&&v.length&&!E&&y.onFilter){var $=x({count:a.length});P=y.onFilter({inputValue:f,resultsMessage:$})}return P},[a,f,b,y,v,x,E]),T=(n==null?void 0:n.action)==="initial-input-focus",F=I.useMemo(function(){var P="";if(y.guidance){var $=i?"value":b?"menu":"input";P=y.guidance({"aria-label":w,context:$,isDisabled:r&&p(r,s),isMulti:g,isSearchable:m,tabSelectsValue:C,isInitialFocus:T})}return P},[w,r,i,g,p,m,b,y,s,C,T]),k=Te(I.Fragment,null,Te("span",{id:"aria-selection"},S),Te("span",{id:"aria-focused"},D),Te("span",{id:"aria-results"},A),Te("span",{id:"aria-guidance"},F));return Te(I.Fragment,null,Te(sv,{id:u},T&&k),Te(sv,{"aria-live":B,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!T&&k))},UM=GM,gg=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XM=new RegExp("["+gg.map(function(e){return e.letters}).join("")+"]","g"),C3={};for(var Sh=0;Sh<gg.length;Sh++)for(var wh=gg[Sh],Ih=0;Ih<wh.letters.length;Ih++)C3[wh.letters[Ih]]=wh.base;var E3=function(t){return t.replace(XM,function(n){return C3[n]})},ZM=VM(E3),lv=function(t){return t.replace(/^\s+|\s+$/g,"")},YM=function(t){return"".concat(t.label," ").concat(t.value)},KM=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Be({ignoreCase:!0,ignoreAccents:!0,stringify:YM,trim:!0,matchFrom:"any"},t),a=i.ignoreCase,o=i.ignoreAccents,s=i.stringify,l=i.trim,u=i.matchFrom,c=l?lv(r):r,d=l?lv(s(n)):s(n);return a&&(c=c.toLowerCase(),d=d.toLowerCase()),o&&(c=ZM(c),d=E3(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},qM=["innerRef"];function JM(e){var t=e.innerRef,n=Wi(e,qM),r=SN(n,"onExited","in","enter","exit","appear");return Te("input",$e({ref:t},r,{css:dm({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var QM=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function eL(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=I.useRef(!1),s=I.useRef(!1),l=I.useRef(0),u=I.useRef(null),c=I.useCallback(function(m,b){if(u.current!==null){var v=u.current,x=v.scrollTop,C=v.scrollHeight,E=v.clientHeight,w=u.current,B=b>0,y=C-E-x,S=!1;y>b&&o.current&&(r&&r(m),o.current=!1),B&&s.current&&(a&&a(m),s.current=!1),B&&b>y?(n&&!o.current&&n(m),w.scrollTop=C,S=!0,o.current=!0):!B&&-b>x&&(i&&!s.current&&i(m),w.scrollTop=0,S=!0,s.current=!0),S&&QM(m)}},[n,r,i,a]),d=I.useCallback(function(m){c(m,m.deltaY)},[c]),h=I.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),f=I.useCallback(function(m){var b=l.current-m.changedTouches[0].clientY;c(m,b)},[c]),g=I.useCallback(function(m){if(m){var b=xN?{passive:!1}:!1;m.addEventListener("wheel",d,b),m.addEventListener("touchstart",h,b),m.addEventListener("touchmove",f,b)}},[f,h,d]),p=I.useCallback(function(m){m&&(m.removeEventListener("wheel",d,!1),m.removeEventListener("touchstart",h,!1),m.removeEventListener("touchmove",f,!1))},[f,h,d]);return I.useEffect(function(){if(t){var m=u.current;return g(m),function(){p(m)}}},[t,g,p]),function(m){u.current=m}}var uv=["boxSizing","height","overflow","paddingRight","position"],cv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function dv(e){e.preventDefault()}function fv(e){e.stopPropagation()}function hv(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gv(){return"ontouchstart"in window||navigator.maxTouchPoints}var pv=!!(typeof window<"u"&&window.document&&window.document.createElement),Os=0,No={capture:!1,passive:!1};function tL(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=I.useRef({}),a=I.useRef(null),o=I.useCallback(function(l){if(pv){var u=document.body,c=u&&u.style;if(r&&uv.forEach(function(g){var p=c&&c[g];i.current[g]=p}),r&&Os<1){var d=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,f=window.innerWidth-h+d||0;Object.keys(cv).forEach(function(g){var p=cv[g];c&&(c[g]=p)}),c&&(c.paddingRight="".concat(f,"px"))}u&&gv()&&(u.addEventListener("touchmove",dv,No),l&&(l.addEventListener("touchstart",hv,No),l.addEventListener("touchmove",fv,No))),Os+=1}},[r]),s=I.useCallback(function(l){if(pv){var u=document.body,c=u&&u.style;Os=Math.max(Os-1,0),r&&Os<1&&uv.forEach(function(d){var h=i.current[d];c&&(c[d]=h)}),u&&gv()&&(u.removeEventListener("touchmove",dv,No),l&&(l.removeEventListener("touchstart",hv,No),l.removeEventListener("touchmove",fv,No)))}},[r]);return I.useEffect(function(){if(t){var l=a.current;return o(l),function(){s(l)}}},[t,o,s]),function(l){a.current=l}}function nL(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var rL=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},iL=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:nL};function aL(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,o=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=eL({isEnabled:i,onBottomArrive:a,onBottomLeave:o,onTopArrive:s,onTopLeave:l}),c=tL({isEnabled:n}),d=function(f){u(f),c(f)};return Te(I.Fragment,null,n&&Te("div",{onClick:rL,css:iL}),t(d))}function oL(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var sL=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:oL},lL=function(t){var n=t.name,r=t.onFocus;return Te("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:sL,value:"",onChange:function(){}})},uL=lL;function hm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function cL(){return hm(/^iPhone/i)}function S3(){return hm(/^Mac/i)}function dL(){return hm(/^iPad/i)||S3()&&navigator.maxTouchPoints>1}function fL(){return cL()||dL()}function hL(){return S3()||fL()}var gL=function(t){return t.label},pL=function(t){return t.label},mL=function(t){return t.value},bL=function(t){return!!t.isDisabled},vL={clearIndicator:JN,container:VN,control:aM,dropdownIndicator:KN,group:uM,groupHeading:dM,indicatorsContainer:zN,indicatorSeparator:eM,input:pM,loadingIndicator:rM,loadingMessage:FN,menu:AN,menuList:$N,menuPortal:LN,multiValue:xM,multiValueLabel:CM,multiValueRemove:EM,noOptionsMessage:PN,option:AM,placeholder:BM,singleValue:PM,valueContainer:jN},yL={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},xL=4,w3=4,CL=38,EL=w3*2,SL={baseUnit:w3,controlHeight:CL,menuGutter:EL},_h={borderRadius:xL,colors:yL,spacing:SL},wL={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:iv(),captureMenuScroll:!iv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:KM(),formatGroupLabel:gL,getOptionLabel:pL,getOptionValue:mL,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:bL,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vN(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function mv(e,t,n,r){var i=D3(e,t,n),a=A3(e,t,n),o=_3(e,t),s=Td(e,t);return{type:"option",data:t,isDisabled:i,isSelected:a,label:o,value:s,index:r}}function Mc(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,s){return mv(e,o,t,s)}).filter(function(o){return vv(e,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=mv(e,n,t,r);return vv(e,a)?a:void 0}).filter(CN)}function I3(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Qp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function bv(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Qp(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function IL(e,t){return I3(Mc(e,t))}function vv(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!R3(e)||!a)&&T3(e,{label:o,value:s,data:i},r)}function _L(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var a=t.indexOf(n);if(a>-1)return n;if(i<t.length)return t[i]}return null}function DL(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Dh=function(t,n){var r,i=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return i||null},_3=function(t,n){return t.getOptionLabel(n)},Td=function(t,n){return t.getOptionValue(n)};function D3(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function A3(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Td(e,t);return n.some(function(i){return Td(e,i)===r})}function T3(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var R3=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},AL=1,B3=function(e){GP(n,e);var t=ZP(n);function n(r){var i;if(WP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=hL(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,u){var c=i.props,d=c.onChange,h=c.name;u.name=h,i.ariaOnChange(l,u),d(l,u)},i.setValue=function(l,u,c){var d=i.props,h=d.closeMenuOnSelect,f=d.isMulti,g=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),h&&(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:u,option:c})},i.selectOption=function(l){var u=i.props,c=u.blurInputOnSelect,d=u.isMulti,h=u.name,f=i.state.selectValue,g=d&&i.isOptionSelected(l,f),p=i.isOptionDisabled(l,f);if(g){var m=i.getOptionValue(l);i.setValue(f.filter(function(b){return i.getOptionValue(b)!==m}),"deselect-option",l)}else if(!p)d?i.setValue([].concat(Qp(f),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}c&&i.blurInput()},i.removeValue=function(l){var u=i.props.isMulti,c=i.state.selectValue,d=i.getOptionValue(l),h=c.filter(function(g){return i.getOptionValue(g)!==d}),f=Ku(u,h,h[0]||null);i.onChange(f,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Ku(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),h=Ku(l,d,d[0]||null);i.onChange(h,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(l){return Dh(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return bv(Mc(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return hN.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(l){return _3(i.props,l)},i.getOptionValue=function(l){return Td(i.props,l)},i.getStyles=function(l,u){var c=i.props.unstyled,d=vL[l](u,c);d.boxSizing="border-box";var h=i.props.styles[l];return h?h(d,u):d},i.getClassNames=function(l,u){var c,d;return(c=(d=i.props.classNames)[l])===null||c===void 0?void 0:c.call(d,u)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return MM(i.props)},i.buildCategorizedOptions=function(){return Mc(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return I3(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,u){i.setState({ariaSelection:Be({value:l},u)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Bf(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var u=l.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var u=l.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-i.initialTouchX),h=Math.abs(c.clientY-i.initialTouchY),f=5;i.userIsDragging=d>f||h>f}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var u=i.props.inputValue,c=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var u=i.getFocusableOptions(),c=u.indexOf(l);i.setState({focusedOption:l,focusedOptionId:c>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return R3(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var u=i.props,c=u.isMulti,d=u.backspaceRemovesValue,h=u.escapeClearsValue,f=u.inputValue,g=u.isClearable,p=u.isDisabled,m=u.menuIsOpen,b=u.onKeyDown,v=u.tabSelectsValue,x=u.openMenuOnFocus,C=i.state,E=C.focusedOption,w=C.focusedValue,B=C.selectValue;if(!p&&!(typeof b=="function"&&(b(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||f)return;i.focusValue("previous");break;case"ArrowRight":if(!c||f)return;i.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(w)i.removeValue(w);else{if(!d)return;c?i.popValue():g&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!v||!E||x&&i.isOptionSelected(E,B))return;i.selectOption(E);break;case"Enter":if(l.keyCode===229)break;if(m){if(!E||i.isComposing)return;i.selectOption(E);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:f}),i.onMenuClose()):g&&h&&i.clearValue();break;case" ":if(f)return;if(!m){i.openMenu("first");break}if(!E)return;i.selectOption(E);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++AL),i.state.selectValue=nv(r.value),r.menuIsOpen&&i.state.selectValue.length){var a=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=a,i.state.focusedOption=o[s],i.state.focusedOptionId=Dh(a,o[s])}return i}return zP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&rv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!o&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(rv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,a){this.props.onInputChange(i,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var a=this,o=this.state,s=o.selectValue,l=o.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(s[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(i){var a=this.state,o=a.selectValue,s=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(s);s||(l=-1);var u=o.length-1,c=-1;if(o.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l<u&&(c=l+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,o=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(o);o||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-a,l<0&&(l=0)):i==="pagedown"?(l=u+a,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(_h):Be(Be({},_h),this.props.theme):_h}},{key:"getCommonProps",value:function(){var i=this.clearValue,a=this.cx,o=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,h=d.isMulti,f=d.isRtl,g=d.options,p=this.hasValue();return{clearValue:i,cx:a,getStyles:o,getClassNames:s,getValue:l,hasValue:p,isMulti:h,isRtl:f,options:g,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,a=i.isClearable,o=i.isMulti;return a===void 0?o:a}},{key:"isOptionDisabled",value:function(i,a){return D3(this.props,i,a)}},{key:"isOptionSelected",value:function(i,a){return A3(this.props,i,a)}},{key:"filterOption",value:function(i,a){return T3(this.props,i,a)}},{key:"formatOptionLabel",value:function(i,a){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:a,inputValue:o,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,a=i.isDisabled,o=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,d=i.menuIsOpen,h=i.required,f=this.getComponents(),g=f.Input,p=this.state,m=p.inputIsHidden,b=p.ariaSelection,v=this.commonProps,x=s||this.getElementId("input"),C=Be(Be(Be({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?J.createElement(g,$e({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:a,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},C)):J.createElement(JM,$e({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Dd,onFocus:this.onInputFocus,disabled:a,tabIndex:u,inputMode:"none",form:c,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,a=this.getComponents(),o=a.MultiValue,s=a.MultiValueContainer,l=a.MultiValueLabel,u=a.MultiValueRemove,c=a.SingleValue,d=a.Placeholder,h=this.commonProps,f=this.props,g=f.controlShouldRenderValue,p=f.isDisabled,m=f.isMulti,b=f.inputValue,v=f.placeholder,x=this.state,C=x.selectValue,E=x.focusedValue,w=x.isFocused;if(!this.hasValue()||!g)return b?null:J.createElement(d,$e({},h,{key:"placeholder",isDisabled:p,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(m)return C.map(function(y,S){var D=y===E,A="".concat(i.getOptionLabel(y),"-").concat(i.getOptionValue(y));return J.createElement(o,$e({},h,{components:{Container:s,Label:l,Remove:u},isFocused:D,isDisabled:p,key:A,index:S,removeProps:{onClick:function(){return i.removeValue(y)},onTouchEnd:function(){return i.removeValue(y)},onMouseDown:function(F){F.preventDefault()}},data:y}),i.formatOptionLabel(y,"value"))});if(b)return null;var B=C[0];return J.createElement(c,$e({},h,{data:B,isDisabled:p}),this.formatOptionLabel(B,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),a=i.ClearIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),a=i.LoadingIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!a||!u)return null;var d={"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator,o=i.IndicatorSeparator;if(!a||!o)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return J.createElement(o,$e({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator;if(!a)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return J.createElement(a,$e({},o,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,a=this.getComponents(),o=a.Group,s=a.GroupHeading,l=a.Menu,u=a.MenuList,c=a.MenuPortal,d=a.LoadingMessage,h=a.NoOptionsMessage,f=a.Option,g=this.commonProps,p=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,v=m.inputValue,x=m.isLoading,C=m.loadingMessage,E=m.minMenuHeight,w=m.maxMenuHeight,B=m.menuIsOpen,y=m.menuPlacement,S=m.menuPosition,D=m.menuPortalTarget,A=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,F=m.noOptionsMessage,k=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!B)return null;var $=function(K,ee){var z=K.type,H=K.data,X=K.isDisabled,te=K.isSelected,ie=K.label,le=K.value,ce=p===H,Q=X?void 0:function(){return i.onOptionHover(H)},be=X?void 0:function(){return i.selectOption(H)},Ce="".concat(i.getElementId("option"),"-").concat(ee),Se={id:Ce,onClick:be,onMouseMove:Q,onMouseOver:Q,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:te};return J.createElement(f,$e({},g,{innerProps:Se,data:H,isDisabled:X,isSelected:te,key:Ce,label:ie,type:z,value:le,isFocused:ce,innerRef:ce?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(K.data,"menu"))},R;if(this.hasOptions())R=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var K=U.data,ee=U.options,z=U.index,H="".concat(i.getElementId("group"),"-").concat(z),X="".concat(H,"-heading");return J.createElement(o,$e({},g,{key:H,data:K,options:ee,Heading:s,headingProps:{id:X,data:U.data},label:i.formatGroupLabel(U.data)}),U.options.map(function(te){return $(te,"".concat(z,"-").concat(te.index))}))}else if(U.type==="option")return $(U,"".concat(U.index))});else if(x){var O=C({inputValue:v});if(O===null)return null;R=J.createElement(d,g,O)}else{var j=F({inputValue:v});if(j===null)return null;R=J.createElement(h,g,j)}var V={minMenuHeight:E,maxMenuHeight:w,menuPlacement:y,menuPosition:S,menuShouldScrollIntoView:T},W=J.createElement(TN,$e({},g,V),function(U){var K=U.ref,ee=U.placerProps,z=ee.placement,H=ee.maxHeight;return J.createElement(l,$e({},g,V,{innerRef:K,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:z}),J.createElement(aL,{captureEnabled:b,onTopArrive:k,onBottomArrive:P,lockEnabled:A},function(X){return J.createElement(u,$e({},g,{innerRef:function(ie){i.getMenuListRef(ie),X(ie)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:x,maxHeight:H,focusedOption:p}),R)}))});return D||S==="fixed"?J.createElement(c,$e({},g,{appendTo:D,controlElement:this.controlRef,menuPlacement:y,menuPosition:S}),W):W}},{key:"renderFormField",value:function(){var i=this,a=this.props,o=a.delimiter,s=a.isDisabled,l=a.isMulti,u=a.name,c=a.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!s)return J.createElement(uL,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(o){var h=d.map(function(p){return i.getOptionValue(p)}).join(o);return J.createElement("input",{name:u,type:"hidden",value:h})}else{var f=d.length>0?d.map(function(p,m){return J.createElement("input",{key:"i-".concat(m),name:u,type:"hidden",value:i.getOptionValue(p)})}):J.createElement("input",{name:u,type:"hidden",value:""});return J.createElement("div",null,f)}else{var g=d[0]?this.getOptionValue(d[0]):"";return J.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,a=this.state,o=a.ariaSelection,s=a.focusedOption,l=a.focusedValue,u=a.isFocused,c=a.selectValue,d=this.getFocusableOptions();return J.createElement(UM,$e({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),a=i.Control,o=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,d=u.id,h=u.isDisabled,f=u.menuIsOpen,g=this.state.isFocused,p=this.commonProps=this.getCommonProps();return J.createElement(s,$e({},p,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:g}),this.renderLiveRegion(),J.createElement(a,$e({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:g,menuIsOpen:f}),J.createElement(l,$e({},p,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),J.createElement(o,$e({},p,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var o=a.prevProps,s=a.clearFocusValueOnUpdate,l=a.inputIsHiddenAfterUpdate,u=a.ariaSelection,c=a.isFocused,d=a.prevWasFocused,h=a.instancePrefix,f=i.options,g=i.value,p=i.menuIsOpen,m=i.inputValue,b=i.isMulti,v=nv(g),x={};if(o&&(g!==o.value||f!==o.options||p!==o.menuIsOpen||m!==o.inputValue)){var C=p?IL(i,v):[],E=p?bv(Mc(i,v),"".concat(h,"-option")):[],w=s?_L(a,v):null,B=DL(a,C),y=Dh(E,B);x={selectValue:v,focusedOption:B,focusedOptionId:y,focusableOptionsWithIds:E,focusedValue:w,clearFocusValueOnUpdate:!1}}var S=l!=null&&i!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},D=u,A=c&&d;return c&&!A&&(D={value:Ku(b,v,v[0]||null),options:v,action:"initial-input-focus"},A=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(D=null),Be(Be(Be({},x),S),{},{prevProps:i,ariaSelection:D,prevWasFocused:A})}}]),n}(I.Component);B3.defaultProps=wL;var TL=I.forwardRef(function(e,t){var n=jP(e);return J.createElement(B3,$e({ref:t},n))}),RL=TL;const BL="_container_2k8uz_109",Lc={container:BL,"error-payhere":"_error-payhere_2k8uz_109","error-laba":"_error-laba_2k8uz_307","error-bill":"_error-bill_2k8uz_421"},$L={control:e=>({...e,border:"1px solid #D6D6D6","&:hover":{borderColor:"#0163C8"},borderRadius:"4px",outline:"none",boxShadow:"none",color:"#898989",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:32,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},kL={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},PL={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},FL={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},NL={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},ML={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",fontWeight:"500",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},qu={error:{laba:Lc["error-laba"],payhere:Lc["error-payhere"],bill:Lc["error-bill"]},variant:{laba:$L,payhere:kL,bill:PL},noSearchVariant:{laba:FL,payhere:NL,bill:ML},classNamePopover:{laba:"",payhere:"",bill:"!1ru-rounded-xl"}},$3=I.forwardRef((e,t)=>{const{width:n,children:r,components:i,classNameContainer:a="",classNameContainerShowSelect:o="",classNameContainerSelect:s="",classNameLabelError:l="",error:u,onChange:c,externalValue:d=!1,defaultValueButtonDropdown:h={},autoClose:f=!0,onMenuOpen:g=()=>{},autoCloseOutside:p=!0,styleInnerPopper:m={},onMenuClose:b=()=>{},zIndexPopper:v=0,id:x="select-dropdown-container",idPopover:C="select-dropdown-container-popover",useAutoPlacement:E,flipOptions:w,autoPlacementOptions:B,withSearch:y=!1,floatingOptions:S={},offsetPopover:D=5,selectProps:A={},errorLabel:T="payhere",controlType:F="payhere",actionValueChange:k=()=>{},...P}=e,$=I.useRef(null),R=I.useRef(null),[O,j]=I.useState(""),[V,W]=I.useState(!1),[U,K]=I.useState({}),[ee,z]=I.useState(0),H=Q=>{var be;(be=R.current)==null||be.setShow(Q),W(Q)},X=()=>{if(d)return e.isMulti?h:[h]},te=Q=>{var be;(be=R.current)==null||be.handlerShow(Q),z($.current.offsetWidth),W(Ce=>!Ce)},ie=()=>{var Q;p&&((Q=R.current)==null||Q.setShow(!1))},le=(Q,be)=>{var Ce;f&&(W(!1),(Ce=R.current)==null||Ce.setShow(!1)),typeof c=="function"&&c(Q,be),d||K(Q)},ce=()=>{$.current&&z($.current.offsetWidth)};return ba(()=>{d&&K(h),k(h)},[d,h]),I.useEffect(()=>{V?g():V||(b(),j(""))},[V]),I.useImperativeHandle(t,()=>({selectValue:U,setSelectValue:K,handlerClose:ie,handlerShow:te,show:V,setShow:H}),[V,Ol(U)]),I.useEffect(()=>(window.addEventListener("resize",ce),window.addEventListener("load",ce),()=>{window.removeEventListener("resize",ce),window.removeEventListener("load",ce)}),[$]),_.jsxs("div",{id:x,className:`${Lc.container} ${a} ${V?`${o} open-popover`:null}`,ref:$,children:[r({selectValue:U,setSelectValue:K,handlerClose:ie,handlerShow:te,show:V,setShow:H}),_.jsx(gi,{ref:R,offset:D,useAutoPlacement:E,flipOptions:w,autoPlacementOptions:B,zIndex:v,styleInnerPopover:m,id:C,width:typeof n=="function"?n(ee,U):n||ee,className:`${s} ${qu.classNamePopover[F]}`,floatingOptions:S,children:_.jsx(RL,{className:"1ru-w-full",defaultValue:X(),inputValue:O,onInputChange:(Q,{action:be})=>{be==="input-change"&&j(Q)},openMenuOnFocus:!0,autoFocus:!1,backspaceRemovesValue:!1,components:{IndicatorSeparator:null,...i},controlShouldRenderValue:!1,hideSelectedOptions:!1,isClearable:!1,menuIsOpen:!0,tabSelectsValue:!1,styles:y?qu.variant[F]:qu.noSearchVariant[F],noOptionsMessage:()=>"Tidak ada data.",onChange:le,selectProps:{...A,setShowDropdown:H},...P})}),_.jsx("div",{className:`${qu.error[T]} ${l}`,children:u})]})});$3.displayName="SelectDropdownContainer";function is(e,t){return e-t*Math.floor(e/t)}const k3=1721426;function eo(e,t,n,r){t=Eu(e,t);let i=t-1,a=-2;return n<=2?a=0:ca(t)&&(a=-1),k3-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function ca(e){return e%4===0&&(e%100!==0||e%400===0)}function Eu(e,t){return e==="BC"?1-t:t}function $f(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const LL={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class ar{fromJulianDay(t){let n=t,r=n-k3,i=Math.floor(r/146097),a=is(r,146097),o=Math.floor(a/36524),s=is(a,36524),l=Math.floor(s/1461),u=is(s,1461),c=Math.floor(u/365),d=i*400+o*100+l*4+c+(o!==4&&c!==4?1:0),[h,f]=$f(d),g=n-eo(h,f,1,1),p=2;n<eo(h,f,3,1)?p=0:ca(f)&&(p=1);let m=Math.floor(((g+p)*12+373)/367),b=n-eo(h,f,m,1)+1;return new Ot(h,f,m,b)}toJulianDay(t){return eo(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return LL[ca(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return ca(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const OL={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function zt(e,t){return t=rn(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function pg(e,t){return e.calendar.identifier===t.calendar.identifier&&e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function VL(e,t){return zt(e,gm(t))}function kf(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-GL(t))%7;return r<0&&(r+=7),r}function HL(e){return ii(Date.now(),e)}function gm(e){return Bn(HL(e))}function P3(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function F3(e,t){return yv(e)-yv(t)}function yv(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Ah=null;function Kn(){return Ah==null&&(Ah=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ah}function Su(e){return e.subtract({days:e.day-1})}function mg(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function jL(e){return Su(e.subtract({months:e.month-1}))}function zl(e,t){let n=kf(e,t);return e.subtract({days:n})}function WL(e,t){return zl(e,t).add({days:6})}const xv=new Map;function zL(e){if(Intl.Locale){let n=xv.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&xv.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function GL(e){let t=zL(e);return t&&OL[t]||0}function N3(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((kf(Su(e),t)+n)/7)}function pm(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function mm(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ys(e){e=rn(e,new ar);let t=Eu(e.era,e.year);return M3(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function M3(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function bg(e,t){if(t==="UTC")return 0;if(e>0&&t===Kn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=L3(e,t);return M3(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}const Cv=new Map;function L3(e,t){let n=Cv.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Cv.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Ev=864e5;function UL(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>XL(e,t,a))}function XL(e,t,n){let r=L3(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Ti(e,t,n="compatible"){let r=Ia(e);if(t==="UTC")return ys(r);if(t===Kn()&&n==="compatible"){r=rn(r,new ar);let l=new Date,u=Eu(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=ys(r),a=bg(i-Ev,t),o=bg(i+Ev,t),s=UL(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-o);case"compatible":case"later":return Math.max(i-a,i-o);case"reject":throw new RangeError("No such absolute time found")}}function O3(e,t,n="compatible"){return new Date(Ti(e,t,n))}function ii(e,t){let n=bg(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new Ul(i,a,o,t,n,s,l,u,c)}function Sv(e,t){return ii(e.getTime(),t)}function Bn(e){return new Ot(e.calendar,e.era,e.year,e.month,e.day)}function Ia(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Rd(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function rn(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,bo(r),r}function ZL(e,t,n){if(e instanceof Ul)return e.timeZone===t?e:KL(e,t);let r=Ti(e,t,n);return ii(r,t)}function YL(e){let t=ys(e)-e.offset;return new Date(t)}function KL(e,t){let n=ys(e)-e.offset;return rn(ii(n,t),e.calendar)}const Vs=36e5;function Pf(e,t){let n=e.copy(),r="hour"in n?W3(n,t):0;vg(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,yg(n),V3(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,qL(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let l=(a=(o=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(o,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vg(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function yg(e){for(;e.month<1;)vg(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vg(e,1)}function qL(e){for(;e.day<1;)e.month--,yg(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,yg(e)}function V3(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function bo(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),V3(e)}function bm(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function H3(e,t){return Pf(e,bm(t))}function vm(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),bo(n),n}function Gl(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),j3(n),n}function JL(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Ju(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Ju(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Ju(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Ju(e.hour,24),t}function j3(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Ju(e,t){let n=e%t;return n<0&&(n+=t),n}function W3(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,JL(e)}function z3(e,t){let n=e.copy();return W3(n,t),n}function QL(e,t){return z3(e,bm(t))}function ym(e,t,n,r){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=Fi(l,n,0,s.length-1,r==null?void 0:r.round),i.era=s[l],bo(i);break}case"year":var a,o;!((a=(o=i.calendar).isInverseEra)===null||a===void 0)&&a.call(o,i)&&(n=-n),i.year=Fi(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=Fi(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=Fi(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),bo(i),i}function xm(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,o=0,s=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;o=l?12:0,s=l?23:11}i.hour=Fi(a,n,o,s,r==null?void 0:r.round);break}case"minute":i.minute=Fi(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=Fi(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=Fi(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function Fi(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function G3(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Pf(Ia(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Ti(i,e.timeZone)}else n=ys(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=ii(n,e.timeZone);return rn(r,e.calendar)}function eO(e,t){return G3(e,bm(t))}function tO(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let g=e.hour>=12;i=g?12:0,a=g?23:11}let o=Ia(e),s=rn(Gl(o,{hour:i}),new ar),l=[Ti(s,e.timeZone,"earlier"),Ti(s,e.timeZone,"later")].filter(g=>ii(g,e.timeZone).day===s.day)[0],u=rn(Gl(o,{hour:a}),new ar),c=[Ti(u,e.timeZone,"earlier"),Ti(u,e.timeZone,"later")].filter(g=>ii(g,e.timeZone).day===u.day).pop(),d=ys(e)-e.offset,h=Math.floor(d/Vs),f=d%Vs;return d=Fi(h,n,Math.floor(l/Vs),Math.floor(c/Vs),r==null?void 0:r.round)*Vs+f,rn(ii(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return xm(e,t,n,r);case"era":case"year":case"month":case"day":{let i=ym(Ia(e),t,n,r),a=Ti(i,e.timeZone);return rn(ii(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function nO(e,t,n){let r=Ia(e),i=Gl(vm(r,t),t);if(i.compare(r)===0)return e;let a=Ti(i,e.timeZone,n);return rn(ii(a,e.timeZone),e.calendar)}const rO=/^(\d{4})-(\d{2})-(\d{2})$/;function Cm(e){let t=e.match(rO);if(!t)throw new Error("Invalid ISO 8601 date string: "+e);let n=new Ot(Th(t[1],0,9999),Th(t[2],1,12),1);return n.day=Th(t[3],0,n.calendar.getDaysInMonth(n)),n}function Th(e,t,n){let r=Number(e);if(r<t||r>n)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function U3(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function X3(e){let t=rn(e,new ar);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Z3(e){return`${X3(e)}T${U3(e)}`}function iO(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function aO(e){return`${Z3(e)}${iO(e.offset)}[${e.timeZone}]`}function oO(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wu(e,t,n){oO(e,t),t.set(e,n)}function Em(e){let t=typeof e[0]=="object"?e.shift():new ar,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var sO=new WeakMap;class Ot{copy(){return this.era?new Ot(this.calendar,this.era,this.year,this.month,this.day):new Ot(this.calendar,this.year,this.month,this.day)}add(t){return Pf(this,t)}subtract(t){return H3(this,t)}set(t){return vm(this,t)}cycle(t,n,r){return ym(this,t,n,r)}toDate(t){return O3(this,t)}toString(){return X3(this)}compare(t){return P3(this,t)}constructor(...t){wu(this,sO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,bo(this)}}var lO=new WeakMap;class Sm{copy(){return new Sm(this.hour,this.minute,this.second,this.millisecond)}add(t){return z3(this,t)}subtract(t){return QL(this,t)}set(t){return Gl(this,t)}cycle(t,n,r){return xm(this,t,n,r)}toString(){return U3(this)}compare(t){return F3(this,t)}constructor(t=0,n=0,r=0,i=0){wu(this,lO,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,j3(this)}}var uO=new WeakMap;class Rd{copy(){return this.era?new Rd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Rd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Pf(this,t)}subtract(t){return H3(this,t)}set(t){return vm(Gl(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return ym(this,t,n,r);default:return xm(this,t,n,r)}}toDate(t,n){return O3(this,t,n)}toString(){return Z3(this)}compare(t){let n=P3(this,t);return n===0?F3(this,Ia(t)):n}constructor(...t){wu(this,uO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,bo(this)}}var cO=new WeakMap;class Ul{copy(){return this.era?new Ul(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ul(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return G3(this,t)}subtract(t){return eO(this,t)}set(t,n){return nO(this,t,n)}cycle(t,n,r){return tO(this,t,n,r)}toDate(){return YL(this)}toString(){return aO(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-ZL(t,this.timeZone).toDate().getTime()}constructor(...t){wu(this,cO,{writable:!0,value:void 0});let[n,r,i,a,o]=Em(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,bo(this)}}const as=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],dO=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Oc=[1867,1911,1925,1988,2018],ea=["meiji","taisho","showa","heisei","reiwa"];function wv(e){const t=as.findIndex(([n,r,i])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<i);return t===-1?as.length-1:t===0?0:t-1}function Rh(e){let t=Oc[ea.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Ot(e.year+t,e.month,e.day)}class fO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=wv(n);return new Ot(this,ea[r],n.year-Oc[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(Rh(t))}balanceDate(t){let n=Rh(t),r=wv(n);ea[r]!==t.era&&(t.era=ea[r],t.year=n.year-Oc[r]),this.constrainDate(t)}constrainDate(t){let n=ea.indexOf(t.era),r=dO[n];if(r!=null){let[i,a,o]=r,s=i-Oc[n];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(a,t.month),t.month===a&&(t.day=Math.min(o,t.day)))}if(t.year===1&&n>=0){let[,i,a]=as[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return ea}getYearsInEra(t){let n=ea.indexOf(t.era),r=as[n],i=as[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month<i[1]||t.month===i[1]&&t.day<i[2])&&a++,a}getDaysInMonth(t){return super.getDaysInMonth(Rh(t))}getMinimumMonthInYear(t){let n=Iv(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=Iv(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function Iv(e){if(e.year===1){let t=ea.indexOf(e.era);return as[t]}}const Y3=-543;class hO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=Eu(n.era,n.year);return new Ot(this,r-Y3,n.month,n.day)}toJulianDay(t){return super.toJulianDay(_v(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(_v(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function _v(e){let[t,n]=$f(e.year+Y3);return new Ot(t,n,e.month,e.day)}const Bd=1911;function K3(e){return e.era==="minguo"?e.year+Bd:1-e.year+Bd}function Dv(e){let t=e-Bd;return t>0?["minguo",t]:["before_minguo",1-t]}class gO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=Eu(n.era,n.year),[i,a]=Dv(r);return new Ot(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(Av(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=Dv(K3(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(Av(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Bd}constructor(...t){super(...t),this.identifier="roc"}}function Av(e){let[t,n]=$f(K3(e));return new Ot(t,n,e.month,e.day)}const Tv=1948320,Rv=[0,31,62,93,124,155,186,216,246,276,306,336];class pO{fromJulianDay(t){let n=t-Tv,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,o=a<216?Math.floor(a/31):Math.floor((a-6)/30),s=a-Rv[o]+1;return new Ot(this,r,o+1,s)}toJulianDay(t){let n=Tv-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=Rv[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||is(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Bh=78,Bv=80;class mO extends ar{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-Bh,i=t-eo(n.era,n.year,1,1),a;i<Bv?(r--,a=ca(n.year-1)?31:30,i+=a+155+90+10):(a=ca(n.year)?31:30,i-=Bv);let o,s;if(i<a)o=1,s=i+1;else{let l=i-a;l<155?(o=Math.floor(l/31)+2,s=l%31+1):(l-=155,o=Math.floor(l/30)+7,s=l%30+1)}return new Ot(this,r,o,s)}toJulianDay(t){let n=t.year+Bh,[r,i]=$f(n),a,o;return ca(i)?(a=31,o=eo(r,i,3,21)):(a=30,o=eo(r,i,3,22)),t.month===1?o+t.day-1:(o+=a+Math.min(t.month-2,5)*31,t.month>=8&&(o+=(t.month-7)*30),o+=t.day-1,o)}getDaysInMonth(t){return t.month===1&&ca(t.year+Bh)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const $d=1948440,$v=1948439,hr=1300,Mo=1600,bO=460322;function kd(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function q3(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+kd(t,r,1,1)))/29.5)+1),a=n-kd(t,r,i,1)+1;return new Ot(e,r,i,a)}function kv(e){return(14+11*e)%30<11}class wm{fromJulianDay(t){return q3(this,$d,t)}toJulianDay(t){return kd($d,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&kv(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return kv(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vO extends wm{fromJulianDay(t){return q3(this,$v,t)}toJulianDay(t){return kd($v,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const yO="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let xg,os;function Vc(e){return bO+os[e-hr]}function tl(e,t){let n=e-hr,r=1<<11-(t-1);return xg[n]&r?30:29}function Pv(e,t){let n=Vc(e);for(let r=1;r<t;r++)n+=tl(e,r);return n}function Fv(e){return os[e+1-hr]-os[e-hr]}class xO extends wm{fromJulianDay(t){let n=t-$d,r=Vc(hr),i=Vc(Mo);if(n<r||n>i)return super.fromJulianDay(t);{let a=hr-1,o=1,s=1;for(;s>0;){a++,s=n-Vc(a)+1;let l=Fv(a);if(s===l){o=12;break}else if(s<l){let u=tl(a,o);for(o=1;s>u;)s-=u,o++,u=tl(a,o);break}}return new Ot(this,a,o,n-Pv(a,o)+1)}}toJulianDay(t){return t.year<hr||t.year>Mo?super.toJulianDay(t):$d+Pv(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<hr||t.year>Mo?super.getDaysInMonth(t):tl(t.year,t.month)}getDaysInYear(t){return t.year<hr||t.year>Mo?super.getDaysInYear(t):Fv(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",xg||(xg=new Uint16Array(Uint8Array.from(atob(yO),t=>t.charCodeAt(0)).buffer)),!os){os=new Uint32Array(Mo-hr+1);let t=0;for(let n=hr;n<=Mo;n++){os[n-hr]=t;for(let r=1;r<=12;r++)t+=tl(n,r)}}}}const Nv=347997,J3=1080,Q3=24*J3,CO=29,EO=12*J3+793,SO=CO*Q3+EO;function Ya(e){return is(e*7+1,19)<7}function Hc(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return is(3*(r+1),7)<3&&(r+=1),r}function wO(e){let t=Hc(e-1),n=Hc(e);return Hc(e+1)-n===356?2:n-t===382?1:0}function vl(e){return Hc(e)+wO(e)}function eE(e){return vl(e+1)-vl(e)}function IO(e){let t=eE(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function Qu(e,t){if(t>=6&&!Ya(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=IO(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Ya(e)?30:0:30}class _O{fromJulianDay(t){let n=t-Nv,r=n*Q3/SO,i=Math.floor((19*r+234)/235)+1,a=vl(i),o=Math.floor(n-a);for(;o<1;)i--,a=vl(i),o=Math.floor(n-a);let s=1,l=0;for(;l<o;)l+=Qu(i,s),s++;s--,l-=Qu(i,s);let u=o-l;return new Ot(this,i,s,u)}toJulianDay(t){let n=vl(t.year);for(let r=1;r<t.month;r++)n+=Qu(t.year,r);return n+t.day+Nv}getDaysInMonth(t){return Qu(t.year,t.month)}getMonthsInYear(t){return Ya(t.year)?13:12}getDaysInYear(t){return eE(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(Ya(n.year)&&!Ya(t.year)&&n.month>6?t.month--:!Ya(n.year)&&Ya(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Cg=1723856,Mv=1824665,Eg=5500;function Pd(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function Im(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Pd(e,n,1,1))/30),i=t+1-Pd(e,n,r,1);return[n,r,i]}function tE(e){return Math.floor(e%4/3)}function nE(e,t){return t%13!==0?30:tE(e)+5}class _m{fromJulianDay(t){let[n,r,i]=Im(Cg,t),a="AM";return n<=0&&(a="AA",n+=Eg),new Ot(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=Eg),Pd(Cg,n,t.month,t.day)}getDaysInMonth(t){return nE(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+tE(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class DO extends _m{fromJulianDay(t){let[n,r,i]=Im(Cg,t);return n+=Eg,new Ot(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class AO extends _m{fromJulianDay(t){let[n,r,i]=Im(Mv,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Ot(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Pd(Mv,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),nE(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Iu(e){switch(e){case"buddhist":return new hO;case"ethiopic":return new _m;case"ethioaa":return new DO;case"coptic":return new AO;case"hebrew":return new _O;case"indian":return new mO;case"islamic-civil":return new wm;case"islamic-tbla":return new vO;case"islamic-umalqura":return new xO;case"japanese":return new fO;case"persian":return new pO;case"roc":return new gO;case"gregory":default:return new ar}}let $h=new Map;class Xl{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return BO()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$O(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,n={}){this.formatter=rE(t,n),this.options=n}}const TO={true:{ja:"h11"},false:{}};function rE(e,t={}){if(typeof t.hour12=="boolean"&&RO()){t={...t};let i=TO[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if($h.has(n))return $h.get(n);let r=new Intl.DateTimeFormat(e,t);return $h.set(n,r),r}let kh=null;function RO(){return kh==null&&(kh=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),kh}let Ph=null;function BO(){return Ph==null&&(Ph=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ph}function $O(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 n=rE(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const _o=typeof document<"u"?I.useLayoutEffect:()=>{};function Ri(e){const t=I.useRef(null);return _o(()=>{t.current=e},[e]),I.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function kO(e){let[t,n]=I.useState(e),r=I.useRef(null),i=Ri(()=>{if(!r.current)return;let o=r.current.next();if(o.done){r.current=null;return}t===o.value?i():n(o.value)});_o(()=>{r.current&&i()});let a=Ri(o=>{r.current=o(t),i()});return[t,a]}const Fd={prefix:String(Math.round(Math.random()*1e10)),current:0},iE=I.createContext(Fd),PO=I.createContext(!1);let FO=!!(typeof window<"u"&&window.document&&window.document.createElement),Fh=new WeakMap;function NO(e=!1){let t=I.useContext(iE),n=I.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let o=Fh.get(a);o==null?Fh.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==o.state&&(t.current=o.id,Fh.delete(a))}n.current=++t.current}return n.current}function MO(e){let t=I.useContext(iE);t===Fd&&!FO&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=NO(!!e),r=t===Fd&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function LO(e){let t=I.useId(),[n]=I.useState(aE()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Fd.prefix}`;return e||`${r}-${t}`}const OO=typeof I.useId=="function"?LO:MO;function VO(){return!1}function HO(){return!0}function jO(e){return()=>{}}function aE(){return typeof I.useSyncExternalStore=="function"?I.useSyncExternalStore(jO,VO,HO):I.useContext(PO)}let WO=!!(typeof window<"u"&&window.document&&window.document.createElement),Nd=new Map;function xs(e){let[t,n]=I.useState(e),r=I.useRef(null),i=OO(t),a=I.useCallback(o=>{r.current=o},[]);return WO&&Nd.set(i,a),_o(()=>{let o=i;return()=>{Nd.delete(o)}},[i]),I.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),i}function zO(e,t){if(e===t)return e;let n=Nd.get(e);if(n)return n(t),t;let r=Nd.get(t);return r?(r(e),e):t}function Sg(e=[]){let t=xs(),[n,r]=kO(t),i=I.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return _o(i,[t,i,...e]),n}function oE(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const yn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Br=e=>e&&"window"in e&&e.window===e?e:yn(e).defaultView||window;function Gn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],o=r[i];typeof a=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=oE(a,o):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof o=="string"?t[i]=ki(a,o):i==="id"&&a&&o?t.id=zO(a,o):t[i]=o!==void 0?o:a}}return t}const GO=new Set(["id"]),UO=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),XO=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ZO=/^(data-.*)$/;function Dm(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(GO.has(o)||n&&UO.has(o)||r&&XO.has(o)||i!=null&&i.has(o)||ZO.test(o))&&(a[o]=e[o]);return a}function da(e){if(YO())e.focus({preventScroll:!0});else{let t=KO(e);e.focus(),qO(t)}}let ec=null;function YO(){if(ec==null){ec=!1;try{document.createElement("div").focus({get preventScroll(){return ec=!0,!0}})}catch{}}return ec}function KO(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function qO(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Ff(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Am(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Zl(){return Am(/^Mac/i)}function JO(){return Am(/^iPhone/i)}function sE(){return Am(/^iPad/i)||Zl()&&navigator.maxTouchPoints>1}function lE(){return JO()||sE()}function QO(){return Ff(/AppleWebKit/i)&&!eV()}function eV(){return Ff(/Chrome/i)}function uE(){return Ff(/Android/i)}function tV(){return Ff(/Firefox/i)}function Yl(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}=t;tV()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Zl()?a=!0:o=!0);let u=QO()&&Zl()&&!sE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});Yl.isOpening=n,da(e),e.dispatchEvent(u),Yl.isOpening=!1}Yl.isOpening=!1;let Xo=new Map,wg=new Set;function Lv(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Xo.get(r.target);i||(i=new Set,Xo.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Xo.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Xo.delete(r.target)),Xo.size===0)){for(let a of wg)a();wg.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Lv():document.addEventListener("DOMContentLoaded",Lv));function cE(e){requestAnimationFrame(()=>{Xo.size===0?e():wg.add(e)})}function nV(){let e=I.useRef(new Map),t=I.useCallback((i,a,o,s)=>{let l=s!=null&&s.once?(...u)=>{e.current.delete(o),o(...u)}:o;e.current.set(o,{type:a,eventTarget:i,fn:l,options:s}),i.addEventListener(a,o,s)},[]),n=I.useCallback((i,a,o,s)=>{var l;let u=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(a,u,s),e.current.delete(o)},[]),r=I.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return I.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Tm(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=xs(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Ov(e,t){const n=I.useRef(!0),r=I.useRef(null);I.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),I.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((i,a)=>!Object.is(i,r[a])))&&e(),r.current=t},t)}function dE(e,t){_o(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Ig(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function rV(e,t){let n=e;for(Ig(n,t)&&(n=n.parentElement);n&&!Ig(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function iV(e,t){const n=[];for(;e&&e!==document.documentElement;)Ig(e,t)&&n.push(e),e=e.parentElement;return n}let aV=0;const Nh=new Map;function fE(e){let[t,n]=I.useState();return _o(()=>{if(!e)return;let r=Nh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${aV++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},Nh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Nh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mh(e,t,n,r){let i=Ri(n),a=n==null;I.useEffect(()=>{if(a||!e.current)return;let o=e.current;return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[e,t,r,a,i])}function oV(e,t){let n=Vv(e,t,"left"),r=Vv(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),h=c+e.clientWidth,f=d+e.clientHeight;n<=o?o=n-parseInt(u,10):n+i>h&&(o+=n+i-h),r<=d?s=r-parseInt(l,10):r+a>f&&(s+=r+a-f),e.scrollLeft=o,e.scrollTop=s}function Vv(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function sV(e,t){if(document.contains(e)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let l=iV(e);for(let u of l)oV(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:d}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function _g(e){return e.mozInputSource===0&&e.isTrusted?!0:uE()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lV(e){return!uE()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function hE(e,t){let n=I.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function Kl(e,t,n){let[r,i]=I.useState(e||t),a=I.useRef(e!==void 0),o=e!==void 0;I.useEffect(()=>{let u=a.current;u!==o&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),a.current=o},[o]);let s=o?e:r,l=I.useCallback((u,...c)=>{let d=(h,...f)=>{n&&(Object.is(s,h)||n(h,...f)),o||(s=h)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((f,...g)=>{let p=u(o?s:f,...g);return d(p,...c),o?f:p})):(o||i(u),d(u,...c))},[o,s,n]);return[s,l]}let Jo="default",Dg="",jc=new WeakMap;function Hv(e){if(lE()){if(Jo==="default"){const t=yn(e);Dg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Jo="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(jc.set(e,e.style.userSelect),e.style.userSelect="none")}function tc(e){if(lE()){if(Jo!=="disabled")return;Jo="restoring",setTimeout(()=>{cE(()=>{if(Jo==="restoring"){const t=yn(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Dg||""),Dg="",Jo="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&jc.has(e)){let t=jc.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),jc.delete(e)}}const gE=I.createContext({register:()=>{}});gE.displayName="PressResponderContext";function uV(e,t){return t.get?t.get.call(e):t.value}function pE(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function cV(e,t){var n=pE(e,t,"get");return uV(e,n)}function dV(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function jv(e,t,n){var r=pE(e,t,"set");return dV(e,r,n),n}function fV(e){let t=I.useContext(gE);if(t){let{register:n,...r}=t;e=Gn(r,e),n()}return dE(t,e.ref),e}var nc=new WeakMap;class rc{continuePropagation(){jv(this,nc,!1)}get shouldStopPropagation(){return cV(this,nc)}constructor(t,n,r){wu(this,nc,{writable:!0,value:void 0}),jv(this,nc,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const Wv=Symbol("linkClicked");function Rm(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:o,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...h}=fV(e),[f,g]=I.useState(!1),p=I.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:m,removeAllGlobalListeners:b}=nV(),v=Ri((y,S)=>{let D=p.current;if(o||D.didFirePressStart)return!1;let A=!0;if(D.isTriggeringEvent=!0,r){let T=new rc("pressstart",S,y);r(T),A=T.shouldStopPropagation}return n&&n(!0),D.isTriggeringEvent=!1,D.didFirePressStart=!0,g(!0),A}),x=Ri((y,S,D=!0)=>{let A=p.current;if(!A.didFirePressStart)return!1;A.ignoreClickAfterPress=!0,A.didFirePressStart=!1,A.isTriggeringEvent=!0;let T=!0;if(i){let F=new rc("pressend",S,y);i(F),T=F.shouldStopPropagation}if(n&&n(!1),g(!1),t&&D&&!o){let F=new rc("press",S,y);t(F),T&&(T=F.shouldStopPropagation)}return A.isTriggeringEvent=!1,T}),C=Ri((y,S)=>{let D=p.current;if(o)return!1;if(a){D.isTriggeringEvent=!0;let A=new rc("pressup",S,y);return a(A),D.isTriggeringEvent=!1,A.shouldStopPropagation}return!0}),E=Ri(y=>{let S=p.current;S.isPressed&&S.target&&(S.isOverTarget&&S.pointerType!=null&&x(bi(S.target,y),S.pointerType,!1),S.isPressed=!1,S.isOverTarget=!1,S.activePointerId=null,S.pointerType=null,b(),c||tc(S.target))}),w=Ri(y=>{u&&E(y)}),B=I.useMemo(()=>{let y=p.current,S={onKeyDown(A){if(Lh(A.nativeEvent,A.currentTarget)&&A.currentTarget.contains(A.target)){var T;Gv(A.target,A.key)&&A.preventDefault();let F=!0;if(!y.isPressed&&!A.repeat){y.target=A.currentTarget,y.isPressed=!0,F=v(A,"keyboard");let k=A.currentTarget,P=$=>{Lh($,k)&&!$.repeat&&k.contains($.target)&&y.target&&C(bi(y.target,$),"keyboard")};m(yn(A.currentTarget),"keyup",oE(P,D),!0)}F&&A.stopPropagation(),A.metaKey&&Zl()&&((T=y.metaKeyEvents)===null||T===void 0||T.set(A.key,A.nativeEvent))}else A.key==="Meta"&&(y.metaKeyEvents=new Map)},onClick(A){if(!(A&&!A.currentTarget.contains(A.target))&&A&&A.button===0&&!y.isTriggeringEvent&&!Yl.isOpening){let T=!0;if(o&&A.preventDefault(),!y.ignoreClickAfterPress&&!y.ignoreEmulatedMouseEvents&&!y.isPressed&&(y.pointerType==="virtual"||_g(A.nativeEvent))){!o&&!l&&da(A.currentTarget);let F=v(A,"virtual"),k=C(A,"virtual"),P=x(A,"virtual");T=F&&k&&P}y.ignoreEmulatedMouseEvents=!1,y.ignoreClickAfterPress=!1,T&&A.stopPropagation()}}},D=A=>{var T;if(y.isPressed&&y.target&&Lh(A,y.target)){var F;Gv(A.target,A.key)&&A.preventDefault();let P=A.target;x(bi(y.target,A),"keyboard",y.target.contains(P)),b(),A.key!=="Enter"&&Bm(y.target)&&y.target.contains(P)&&!A[Wv]&&(A[Wv]=!0,Yl(y.target,A,!1)),y.isPressed=!1,(F=y.metaKeyEvents)===null||F===void 0||F.delete(A.key)}else if(A.key==="Meta"&&(!((T=y.metaKeyEvents)===null||T===void 0)&&T.size)){var k;let P=y.metaKeyEvents;y.metaKeyEvents=void 0;for(let $ of P.values())(k=y.target)===null||k===void 0||k.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){S.onPointerDown=k=>{if(k.button!==0||!k.currentTarget.contains(k.target))return;if(lV(k.nativeEvent)){y.pointerType="virtual";return}Oh(k.currentTarget)&&k.preventDefault(),y.pointerType=k.pointerType;let P=!0;y.isPressed||(y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=k.pointerId,y.target=k.currentTarget,!o&&!l&&da(k.currentTarget),c||Hv(y.target),P=v(k,y.pointerType),m(yn(k.currentTarget),"pointermove",A,!1),m(yn(k.currentTarget),"pointerup",T,!1),m(yn(k.currentTarget),"pointercancel",F,!1)),P&&k.stopPropagation()},S.onMouseDown=k=>{k.currentTarget.contains(k.target)&&k.button===0&&(Oh(k.currentTarget)&&k.preventDefault(),k.stopPropagation())},S.onPointerUp=k=>{!k.currentTarget.contains(k.target)||y.pointerType==="virtual"||k.button===0&&Lo(k,k.currentTarget)&&C(k,y.pointerType||k.pointerType)};let A=k=>{k.pointerId===y.activePointerId&&(y.target&&Lo(k,y.target)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,v(bi(y.target,k),y.pointerType)):y.target&&y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,x(bi(y.target,k),y.pointerType,!1),w(k)))},T=k=>{k.pointerId===y.activePointerId&&y.isPressed&&k.button===0&&y.target&&(Lo(k,y.target)&&y.pointerType!=null?x(bi(y.target,k),y.pointerType):y.isOverTarget&&y.pointerType!=null&&x(bi(y.target,k),y.pointerType,!1),y.isPressed=!1,y.isOverTarget=!1,y.activePointerId=null,y.pointerType=null,b(),c||tc(y.target))},F=k=>{E(k)};S.onDragStart=k=>{k.currentTarget.contains(k.target)&&E(k)}}else{S.onMouseDown=F=>{if(F.button!==0||!F.currentTarget.contains(F.target))return;if(Oh(F.currentTarget)&&F.preventDefault(),y.ignoreEmulatedMouseEvents){F.stopPropagation();return}y.isPressed=!0,y.isOverTarget=!0,y.target=F.currentTarget,y.pointerType=_g(F.nativeEvent)?"virtual":"mouse",!o&&!l&&da(F.currentTarget),v(F,y.pointerType)&&F.stopPropagation(),m(yn(F.currentTarget),"mouseup",A,!1)},S.onMouseEnter=F=>{if(!F.currentTarget.contains(F.target))return;let k=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!0,k=v(F,y.pointerType)),k&&F.stopPropagation()},S.onMouseLeave=F=>{if(!F.currentTarget.contains(F.target))return;let k=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!1,k=x(F,y.pointerType,!1),w(F)),k&&F.stopPropagation()},S.onMouseUp=F=>{F.currentTarget.contains(F.target)&&!y.ignoreEmulatedMouseEvents&&F.button===0&&C(F,y.pointerType||"mouse")};let A=F=>{if(F.button===0){if(y.isPressed=!1,b(),y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}y.target&&Lo(F,y.target)&&y.pointerType!=null?x(bi(y.target,F),y.pointerType):y.target&&y.isOverTarget&&y.pointerType!=null&&x(bi(y.target,F),y.pointerType,!1),y.isOverTarget=!1}};S.onTouchStart=F=>{if(!F.currentTarget.contains(F.target))return;let k=hV(F.nativeEvent);if(!k)return;y.activePointerId=k.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=F.currentTarget,y.pointerType="touch",!o&&!l&&da(F.currentTarget),c||Hv(y.target),v(F,y.pointerType)&&F.stopPropagation(),m(Br(F.currentTarget),"scroll",T,!0)},S.onTouchMove=F=>{if(!F.currentTarget.contains(F.target))return;if(!y.isPressed){F.stopPropagation();return}let k=zv(F.nativeEvent,y.activePointerId),P=!0;k&&Lo(k,F.currentTarget)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,P=v(F,y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,P=x(F,y.pointerType,!1),w(F)),P&&F.stopPropagation()},S.onTouchEnd=F=>{if(!F.currentTarget.contains(F.target))return;if(!y.isPressed){F.stopPropagation();return}let k=zv(F.nativeEvent,y.activePointerId),P=!0;k&&Lo(k,F.currentTarget)&&y.pointerType!=null?(C(F,y.pointerType),P=x(F,y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(P=x(F,y.pointerType,!1)),P&&F.stopPropagation(),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,y.target&&!c&&tc(y.target),b()},S.onTouchCancel=F=>{F.currentTarget.contains(F.target)&&(F.stopPropagation(),y.isPressed&&E(F))};let T=F=>{y.isPressed&&F.target.contains(y.target)&&E({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};S.onDragStart=F=>{F.currentTarget.contains(F.target)&&E(F)}}return S},[m,o,l,b,c,E,w,x,v,C]);return I.useEffect(()=>()=>{var y;c||tc((y=p.current.target)!==null&&y!==void 0?y:void 0)},[c]),{isPressed:s||f,pressProps:Gn(h,B)}}function Bm(e){return e.tagName==="A"&&e.hasAttribute("href")}function Lh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Br(i).HTMLInputElement&&!mE(i,n)||i instanceof Br(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&Bm(i))&&n!=="Enter")}function hV(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function zv(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function bi(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function gV(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function pV(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Lo(e,t){let n=t.getBoundingClientRect(),r=gV(e);return pV(n,r)}function Oh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Gv(e,t){return e instanceof HTMLInputElement?!mE(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Bm(e)}const mV=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function mE(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":mV.has(e.type)}class bV{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,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function bE(e){let t=I.useRef({isFocused:!1,observer:null});_o(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Ri(r=>{e==null||e(r)});return I.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=o=>{t.current.isFocused=!1,i.disabled&&n(new bV("blur",o)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function vE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=I.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=bE(a),s=I.useCallback(l=>{const u=yn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}let Ps=null,Ag=new Set,yl=new Map,vo=!1,Tg=!1;const vV={Tab:!0,Escape:!0};function $m(e,t){for(let n of Ag)n(e,t)}function yV(e){return!(e.metaKey||!Zl()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Md(e){vo=!0,yV(e)&&(Ps="keyboard",$m("keyboard",e))}function pr(e){Ps="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(vo=!0,$m("pointer",e))}function yE(e){_g(e)&&(vo=!0,Ps="virtual")}function xE(e){e.target===window||e.target===document||(!vo&&!Tg&&(Ps="virtual",$m("virtual",e)),vo=!1,Tg=!1)}function CE(){vo=!1,Tg=!0}function Rg(e){if(typeof window>"u"||yl.get(Br(e)))return;const t=Br(e),n=yn(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){vo=!0,r.apply(this,arguments)},n.addEventListener("keydown",Md,!0),n.addEventListener("keyup",Md,!0),n.addEventListener("click",yE,!0),t.addEventListener("focus",xE,!0),t.addEventListener("blur",CE,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",pr,!0),n.addEventListener("pointermove",pr,!0),n.addEventListener("pointerup",pr,!0)):(n.addEventListener("mousedown",pr,!0),n.addEventListener("mousemove",pr,!0),n.addEventListener("mouseup",pr,!0)),t.addEventListener("beforeunload",()=>{EE(e)},{once:!0}),yl.set(t,{focus:r})}const EE=(e,t)=>{const n=Br(e),r=yn(e);t&&r.removeEventListener("DOMContentLoaded",t),yl.has(n)&&(n.HTMLElement.prototype.focus=yl.get(n).focus,r.removeEventListener("keydown",Md,!0),r.removeEventListener("keyup",Md,!0),r.removeEventListener("click",yE,!0),n.removeEventListener("focus",xE,!0),n.removeEventListener("blur",CE,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",pr,!0),r.removeEventListener("pointermove",pr,!0),r.removeEventListener("pointerup",pr,!0)):(r.removeEventListener("mousedown",pr,!0),r.removeEventListener("mousemove",pr,!0),r.removeEventListener("mouseup",pr,!0)),yl.delete(n))};function xV(e){const t=yn(e);let n;return t.readyState!=="loading"?Rg(e):(n=()=>{Rg(e)},t.addEventListener("DOMContentLoaded",n)),()=>EE(e,n)}typeof document<"u"&&xV();function SE(){return Ps!=="pointer"}function wE(){return Ps}const CV=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function EV(e,t,n){var r;const i=typeof window<"u"?Br(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Br(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?Br(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?Br(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!CV.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof a||(n==null?void 0:n.target)instanceof o&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof s&&!vV[n.key])}function SV(e,t,n){Rg(),I.useEffect(()=>{let r=(i,a)=>{EV(!!(n!=null&&n.isTextInput),i,a)&&e(SE())};return Ag.add(r),()=>{Ag.delete(r)}},t)}function IE(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=I.useRef({isFocusWithin:!1}),o=I.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,a]),s=bE(o),l=I.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),a.current.isFocusWithin=!0,s(u))},[r,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}function Uv(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.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(r),t&&n.stopPropagation()}}function wV(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Uv(e.onKeyDown),onKeyUp:Uv(e.onKeyUp)}}}function _E(e){const t=yn(e);if(wE()==="virtual"){let n=t.activeElement;cE(()=>{t.activeElement===n&&e.isConnected&&da(e)})}else da(e)}function IV(e){const t=Br(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:o,visibility:s}=a(e);i=o!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function _V(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function DE(e,t){return e.nodeName!=="#comment"&&IV(e)&&_V(e,t)&&(!e.parentElement||DE(e.parentElement,e))}const km=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],DV=km.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";km.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const AV=km.join(':not([hidden]):not([tabindex="-1"]),');function AE(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Hs(e,t=!1){if(e!=null&&!t)try{_E(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function nl(e,t,n){let r=t!=null&&t.tabbable?AV:DV,i=yn(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var o;return!(t==null||(o=t.from)===null||o===void 0)&&o.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&DE(a)&&(!n||AE(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function TE(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||yn(r).activeElement,u=nl(r,{tabbable:a,accept:s});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&o&&(u.currentNode=r,c=u.nextNode()),c&&Hs(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||yn(r).activeElement,u=nl(r,{tabbable:a,accept:s});if(r.contains(l))u.currentNode=l;else{let d=Vh(u);return d&&Hs(d,!0),d??null}let c=u.previousNode();if(!c&&o){u.currentNode=r;let d=Vh(u);if(!d)return null;c=d}return c&&Hs(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=nl(r,{tabbable:i,accept:a}).nextNode();return s&&Hs(s,!0),s},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=nl(r,{tabbable:i,accept:a}),s=Vh(o);return s&&Hs(s,!0),s??null}}}function Vh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class Pm{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Xv({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&AE(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Pm;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Xv({scopeRef:null}),this.fastMap.set(null,this.root)}}class Xv{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new Pm;function RE(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=I.useRef({isFocused:!1,isFocusVisible:t||SE()}),[a,o]=I.useState(!1),[s,l]=I.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=I.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=I.useCallback(f=>{i.current.isFocused=f,o(f),u()},[u]);SV(f=>{i.current.isFocusVisible=f,u()},[],{isTextInput:n});let{focusProps:d}=vE({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=IE({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:r?h:d}}let TV=I.createContext(null);function RV(e){let t=I.useContext(TV)||{};dE(t,e);let{ref:n,...r}=t;return r}function BV(e,t){let{focusProps:n}=vE(e),{keyboardProps:r}=wV(e),i=Gn(n,r),a=RV(t),o=e.isDisabled?{}:a,s=I.useRef(e.autoFocus);return I.useEffect(()=>{s.current&&t.current&&_E(t.current),s.current=!1},[t]),{focusableProps:Gn({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},o)}}const $V=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),kV=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function BE(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return $V.has(n.script)}let t=e.split("-")[0];return kV.has(t)}const PV=Symbol.for("react-aria.i18n.locale");function $E(){let e=typeof window<"u"&&window[PV]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:BE(e)?"rtl":"ltr"}}let Bg=$E(),rl=new Set;function Zv(){Bg=$E();for(let e of rl)e(Bg)}function kE(){let e=aE(),[t,n]=I.useState(Bg);return I.useEffect(()=>(rl.size===0&&window.addEventListener("languagechange",Zv),rl.add(n),()=>{rl.delete(n),rl.size===0&&window.removeEventListener("languagechange",Zv)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const PE=I.createContext(null);function Fm(e){let{locale:t,children:n}=e,r=kE(),i=I.useMemo(()=>t?{locale:t,direction:BE(t)?"rtl":"ltr"}:r,[r,t]);return I.createElement(PE.Provider,{value:i},n)}function Mr(){let e=kE();return I.useContext(PE)||e}const FV=Symbol.for("react-aria.i18n.locale"),NV=Symbol.for("react-aria.i18n.strings");let Oo;class Do{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=MV(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[FV];if(Oo===void 0){let i=window[NV];if(!i)return null;Oo={};for(let a in i)Oo[a]=new Do({[n]:i[a]},n)}let r=Oo==null?void 0:Oo[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function MV(e,t,n="en-US"){if(t[e])return t[e];let r=LV(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function LV(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Yv=new Map,Kv=new Map;class FE{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,o=Yv.get(a);o||(o=new Intl.PluralRules(this.locale,{type:r}),Yv.set(a,o));let s=o.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=Kv.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Kv.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const qv=new WeakMap;function OV(e){let t=qv.get(e);return t||(t=new Do(e),qv.set(e,t)),t}function VV(e,t){return t&&Do.getGlobalDictionaryForPackage(t)||OV(e)}function _u(e,t){let{locale:n}=Mr(),r=VV(e,t);return I.useMemo(()=>new FE(n,r),[n,r])}function _a(e){e=hE(e??{},HV);let{locale:t}=Mr();return I.useMemo(()=>new Xl(t,e),[t,e])}function HV(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}function jV(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:h,target:f,rel:g,type:p="button"}=e,m;n==="button"?m={type:p,disabled:r}:m={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:h,target:n==="a"?f:void 0,type:n==="input"?p:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:b,isPressed:v}=Rm({onPressStart:a,onPressEnd:o,onPressChange:l,onPress:i,onPressUp:s,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:x}=BV(e,t);c&&(x.tabIndex=r?-1:x.tabIndex);let C=Gn(x,b,Dm(e,{labelable:!0}));return{isPressed:v,buttonProps:Gn(m,C,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:E=>{d&&(d(E),console.warn("onClick is deprecated, please use onPress"))}})}}var NE={};NE={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var ME={};ME={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var LE={};LE={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var OE={};OE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var VE={};VE={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var HE={};HE={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var jE={};jE={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var WE={};WE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var zE={};zE={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var GE={};GE={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var UE={};UE={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var XE={};XE={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var ZE={};ZE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var YE={};YE={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var KE={};KE={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var qE={};qE={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var JE={};JE={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var QE={};QE={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var eS={};eS={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var tS={};tS={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var nS={};nS={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var rS={};rS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var iS={};iS={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var aS={};aS={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var oS={};oS={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var sS={};sS={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var lS={};lS={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var uS={};uS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var cS={};cS={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var dS={};dS={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var fS={};fS={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var hS={};hS={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var gS={};gS={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var pS={};pS={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Du={};Du={"ar-AE":NE,"bg-BG":ME,"cs-CZ":LE,"da-DK":OE,"de-DE":VE,"el-GR":HE,"en-US":jE,"es-ES":WE,"et-EE":zE,"fi-FI":GE,"fr-FR":UE,"he-IL":XE,"hr-HR":ZE,"hu-HU":YE,"it-IT":KE,"ja-JP":qE,"ko-KR":JE,"lt-LT":QE,"lv-LV":eS,"nb-NO":tS,"nl-NL":nS,"pl-PL":rS,"pt-BR":iS,"pt-PT":aS,"ro-RO":oS,"ru-RU":sS,"sk-SK":lS,"sl-SI":uS,"sr-SP":cS,"sv-SE":dS,"tr-TR":fS,"uk-UA":hS,"zh-CN":gS,"zh-TW":pS};function mS(e){return e&&e.__esModule?e.default:e}const Nm=new WeakMap;function ql(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function WV(e){let t=_u(mS(Du),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let i=_a({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ql(n)||ql(r),timeZone:e.timeZone}),a="anchorDate"in e?e.anchorDate:null;return I.useMemo(()=>{if(!a&&n&&r)if(zt(n,r)){let o=i.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:o})}else{let o=kg(i,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:o})}return""},[n,r,a,e.timeZone,t,i])}function $g(e,t,n,r){let i=_u(mS(Du),"@react-aria/calendar"),a=ql(e)||ql(t),o=_a({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),s=_a({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return I.useMemo(()=>{if(zt(e,Su(e))){if(zt(t,mg(e)))return o.format(e.toDate(n));if(zt(t,mg(t)))return r?kg(o,i,e,t,n):o.formatRange(e.toDate(n),t.toDate(n))}return r?kg(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function kg(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let u=0;u<a.length;u++){let c=a[u];if(c.source==="shared"&&c.type==="literal")o=u;else if(c.source==="endRange")break}let s="",l="";for(let u=0;u<a.length;u++)u<o?s+=a[u].value:u>o&&(l+=a[u].value);return t.format("dateRange",{startDate:s,endDate:l})}const bS=7e3;let Hh=null;function Jv(e,t="assertive",n=bS){Hh||(Hh=new zV),Hh.announce(e,t,n)}class zV{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=bS){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function GV(e){return e&&e.__esModule?e.default:e}function vS(e,t){let n=_u(GV(Du),"@react-aria/calendar"),r=Dm(e),i=$g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=$g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);Ov(()=>{t.isFocused||Jv(a)},[a]);let o=WV(t);Ov(()=>{o&&Jv(o,"polite",4e3)},[o]);let s=Sg([!!e.errorMessage,e.isInvalid,e.validationState]);Nm.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:s,selectedDateDescription:o});let[l,u]=I.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[d,h]=I.useState(!1),f=e.isDisabled||t.isPreviousVisibleRangeInvalid();f&&d&&(h(!1),t.setFocused(!0));let g=Tm({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:Gn(r,g,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:f,onFocusChange:h},errorMessageProps:{id:s},title:i}}function yS(e,t){return vS(e,t)}function UV(e,t,n){let r=vS(e,t),i=I.useRef(!1),a=I.useRef(typeof window<"u"?window:null);return Mh(a,"pointerdown",s=>{i.current=s.width===0&&s.height===0}),Mh(a,"pointerup",s=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=s.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=s=>{n.current&&(!s.relatedTarget||!n.current.contains(s.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},Mh(n,"touchmove",s=>{t.isDragging&&s.preventDefault()},{passive:!1,capture:!0}),r}function xS(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:i}=Mr(),a=f=>{switch(f.key){case"Enter":case" ":f.preventDefault(),t.selectFocusedDate();break;case"PageUp":f.preventDefault(),f.stopPropagation(),t.focusPreviousSection(f.shiftKey);break;case"PageDown":f.preventDefault(),f.stopPropagation(),t.focusNextSection(f.shiftKey);break;case"End":f.preventDefault(),f.stopPropagation(),t.focusSectionEnd();break;case"Home":f.preventDefault(),f.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":f.preventDefault(),f.stopPropagation(),i==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":f.preventDefault(),f.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":f.preventDefault(),f.stopPropagation(),i==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":f.preventDefault(),f.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(f.preventDefault(),t.setAnchorDate(null));break}},o=$g(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=Nm.get(t),u=Tm({"aria-label":[s,o].filter(Boolean).join(", "),"aria-labelledby":l}),c=_a({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=Mr(),h=I.useMemo(()=>{let f=zl(gm(t.timeZone),d);return[...new Array(7).keys()].map(g=>{let m=f.add({days:g}).toDate(t.timeZone);return c.format(m)})},[d,t.timeZone,c]);return{gridProps:Gn(u,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:a,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:h}}function XV(e){return e&&e.__esModule?e.default:e}function ZV(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=Nm.get(t),s=_u(XV(Du),"@react-aria/calendar"),l=_a({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ql(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r);i=i||t.isCellDisabled(r);let d=t.isCellUnavailable(r),h=!i&&!d,f=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&zt(t.value,r));f&&(u=!0),r=hE(r,pg);let g=I.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),p=VL(r,t.timeZone),m=I.useMemo(()=>{let A="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(zt(r,t.value.start)||zt(r,t.value.end))&&(A=o+", "),A+=l.format(g),p?A=s.format(u?"todayDateSelected":"todayDate",{date:A}):u&&(A=s.format("dateSelected",{date:A})),t.minValue&&zt(r,t.minValue)?A+=", "+s.format("minimumDate"):t.maxValue&&zt(r,t.maxValue)&&(A+=", "+s.format("maximumDate")),A},[l,g,s,u,p,r,t,o]),b="";"anchorDate"in t&&c&&!t.isReadOnly&&h&&(t.anchorDate?b=s.format("finishRangeSelectionPrompt"):b=s.format("startRangeSelectionPrompt"));let v=fE(b),x=I.useRef(!1),C=I.useRef(!1),E=I.useRef(null),{pressProps:w,isPressed:B}=Rm({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(A){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(A.pointerType==="mouse"||A.pointerType==="touch")){if(t.highlightedRange&&!f){if(zt(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),C.current=!0;return}else if(zt(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),C.current=!0;return}}let T=()=>{t.setDragging(!0),E.current=null,t.selectDate(r),t.setFocusedDate(r),x.current=!0};A.pointerType==="touch"?E.current=setTimeout(T,200):T()}},onPressEnd(){C.current=!1,x.current=!1,clearTimeout(E.current),E.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(A){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(C.current)t.setAnchorDate(r);else if(t.anchorDate&&!x.current)t.selectDate(r),t.setFocusedDate(r);else if(A.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let T=r.add({days:1});t.isInvalid(T)&&(T=r.subtract({days:1})),t.isInvalid(T)||t.setFocusedDate(T)}else A.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),y=null;i||(y=zt(r,t.focusedDate)?0:-1),I.useEffect(()=>{c&&n.current&&(da(n.current),wE()!=="pointer"&&document.activeElement===n.current&&sV(n.current,{containingElement:rV(n.current)}))},[c,n]);let S=_a({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),D=I.useMemo(()=>S.formatToParts(g).find(A=>A.type==="day").value,[S,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||null,"aria-selected":u||null,"aria-invalid":f||null},buttonProps:Gn(w,{onFocus(){i||t.setFocusedDate(r)},tabIndex:y,role:"button","aria-disabled":!h||null,"aria-label":m,"aria-invalid":f||null,"aria-describedby":[f?a:null,v["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(A){"highlightDate"in t&&(A.pointerType!=="touch"||t.isDragging)&&h&&t.highlightDate(r)},onPointerDown(A){"releasePointerCapture"in A.target&&A.target.releasePointerCapture(A.pointerId)},onContextMenu(A){A.preventDefault()}}),isPressed:B,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:f,formattedDate:D}}const Nf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},CS={...Nf,customError:!0,valid:!1},Ka={isInvalid:!1,validationDetails:Nf,validationErrors:[]},YV=I.createContext({}),Ld="__formValidationState"+Date.now();function KV(e){if(e[Ld]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Ld];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return qV(e)}function qV(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:CS}:null,u=I.useMemo(()=>Qv(JV(o,i)),[o,i]);a!=null&&a.validationDetails.valid&&(a=null);let c=I.useContext(YV),d=I.useMemo(()=>r?Array.isArray(r)?r.flatMap(D=>Pg(c[D])):Pg(c[r]):[],[c,r]),[h,f]=I.useState(c),[g,p]=I.useState(!1);c!==h&&(f(c),p(!1));let m=I.useMemo(()=>Qv(g?[]:d),[g,d]),b=I.useRef(Ka),[v,x]=I.useState(Ka),C=I.useRef(Ka),E=()=>{if(!w)return;B(!1);let D=u||a||b.current;jh(D,C.current)||(C.current=D,x(D))},[w,B]=I.useState(!1);return I.useEffect(E),{realtimeValidation:l||m||u||a||Ka,displayValidation:s==="native"?l||m||v:l||m||u||a||v,updateValidation(D){s==="aria"&&!jh(v,D)?x(D):b.current=D},resetValidation(){let D=Ka;jh(D,C.current)||(C.current=D,x(D)),s==="native"&&B(!1),p(!0)},commitValidation(){s==="native"&&B(!0),p(!0)}}}function Pg(e){return e?Array.isArray(e)?e:[e]:[]}function JV(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Pg(n)}return[]}function Qv(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:CS}:null}function jh(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Od(...e){let t=new Set,n=!1,r={...Nf};for(let o of e){var i,a;for(let s of o.validationErrors)t.add(s);n||(n=o.isInvalid);for(let s in r)(i=r)[a=s]||(i[a]=o.validationDetails[s])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function QV(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=xs(t);let o=xs(),s={};n?(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=Tm({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:l}}function eH(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=QV(e),s=Sg([!!t,!!n,r,i]),l=Sg([!!t,!!n,r,i]);return o=Gn(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:l}}}var ES={};ES={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var SS={};SS={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var wS={};wS={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var IS={};IS={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var _S={};_S={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var DS={};DS={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var AS={};AS={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var TS={};TS={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var RS={};RS={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var BS={};BS={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var $S={};$S={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var kS={};kS={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var PS={};PS={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var FS={};FS={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var NS={};NS={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var MS={};MS={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var LS={};LS={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var OS={};OS={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var VS={};VS={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var HS={};HS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var jS={};jS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var WS={};WS={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var zS={};zS={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var GS={};GS={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var US={};US={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var XS={};XS={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var ZS={};ZS={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var YS={};YS={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var KS={};KS={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var qS={};qS={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var JS={};JS={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var QS={};QS={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var ew={};ew={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var tw={};tw={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var nw={};nw={"ar-AE":ES,"bg-BG":SS,"cs-CZ":wS,"da-DK":IS,"de-DE":_S,"el-GR":DS,"en-US":AS,"es-ES":TS,"et-EE":RS,"fi-FI":BS,"fr-FR":$S,"he-IL":kS,"hr-HR":PS,"hu-HU":FS,"it-IT":NS,"ja-JP":MS,"ko-KR":LS,"lt-LT":OS,"lv-LV":VS,"nb-NO":HS,"nl-NL":jS,"pl-PL":WS,"pt-BR":zS,"pt-PT":GS,"ro-RO":US,"ru-RU":XS,"sk-SK":ZS,"sl-SI":YS,"sr-SP":KS,"sv-SE":qS,"tr-TR":JS,"uk-UA":QS,"zh-CN":ew,"zh-TW":tw};function tH(e,t,n){let{direction:r}=Mr(),i=I.useMemo(()=>TE(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusNext():i.focusPrevious();break;case"ArrowRight":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusPrevious():i.focusNext();break}},o=()=>{var l;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=nl(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let d;do d=c.lastChild(),d&&(u=d);while(d)}for(;u!=null&&u.hasAttribute("data-placeholder");){let d=c.previousNode();if(d&&d.hasAttribute("data-placeholder"))u=d;else break}u&&u.focus()},{pressProps:s}=Rm({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&o()},onPress(l){l.pointerType!=="mouse"&&o()}});return Gn(s,{onKeyDown:a})}const nH="__role_"+Date.now(),rH="__focusManager_"+Date.now();function iH(e){return e&&e.__esModule?e.default:e}function aH(e,t,n){var r,i;let a=_u(iH(nw),"@react-aria/datepicker"),{isInvalid:o,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:h}=eH({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||s}),f=c["aria-labelledby"]||c.id,{locale:g}=Mr(),p=t.formatValue(g,{month:"long"}),m=p?a.format("selectedRangeDescription",{startDate:p.start,endDate:p.end}):"",b=fE(m),v={"aria-label":a.format("startDate"),"aria-labelledby":f},x={"aria-label":a.format("endDate"),"aria-labelledby":f},C=xs(),E=xs(),w=tH(t,n),B=[b["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,y=I.useMemo(()=>TE(n,{accept:k=>k.id!==C}),[n,C]),S={[rH]:y,[nH]:"presentation","aria-describedby":B,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=Dm(e),{focusWithinProps:A}=IE({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),T=I.useRef(Ka),F=I.useRef(Ka);return{groupProps:Gn(D,w,c,b,A,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":B,onKeyDown(k){t.isOpen||e.onKeyDown&&e.onKeyDown(k)},onKeyUp(k){t.isOpen||e.onKeyUp&&e.onKeyUp(k)}}),labelProps:{...u,onClick:()=>{y.focusFirst()}},buttonProps:{...b,id:C,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${C} ${f}`,"aria-describedby":B,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:E,"aria-labelledby":`${C} ${f}`},startFieldProps:{...v,...S,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:k=>t.setDateTime("start",k),autoFocus:e.autoFocus,name:e.startName,[Ld]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(k){T.current=k,t.updateValidation(Od(k,F.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...S,value:(i=t.value)===null||i===void 0?void 0:i.end,onChange:k=>t.setDateTime("end",k),name:e.endName,[Ld]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(k){F.current=k,t.updateValidation(Od(T.current,k))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:d,errorMessageProps:h,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:o,validationErrors:s,validationDetails:l}}function ss(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Fg(e,t,n,r,i){let a={};for(let s in t)a[s]=Math.floor(t[s]/2),a[s]>0&&t[s]%2===0&&a[s]--;let o=to(e,t,n).subtract(a);return Jl(e,o,t,n,r,i)}function to(e,t,n,r,i){let a=e;return t.years?a=jL(e):t.months?a=Su(e):t.weeks&&(a=zl(e,n)),Jl(e,a,t,n,r,i)}function Ng(e,t,n,r,i){let a={...t};t.days?a.days--:t.weeks?a.weeks--:t.months?a.months--:t.years&&a.years--;let o=to(e,t,n).subtract(a);return Jl(e,o,t,n,r,i)}function Jl(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=mm(t,to(Bn(i),n,r))),a&&e.compare(a)<=0&&(t=pm(t,Ng(Bn(a),n,r))),t}function Qi(e,t,n){return t&&(e=mm(e,Bn(t))),n&&(e=pm(e,Bn(n))),e}function rw(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function iw(e){let t=I.useMemo(()=>new Xl(e.locale),[e.locale]),n=I.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible"}=e,d=I.useMemo(()=>i(n.calendar),[i,n.calendar]),[h,f]=Kl(e.value,e.defaultValue,e.onChange),g=I.useMemo(()=>h?rn(Bn(h),d):null,[h,d]),p=I.useMemo(()=>h&&"timeZone"in h?h.timeZone:n.timeZone,[h,n.timeZone]),m=I.useMemo(()=>e.focusedValue?Qi(rn(Bn(e.focusedValue),d),o,s):void 0,[e.focusedValue,d,o,s]),b=I.useMemo(()=>Qi(e.defaultFocusedValue?rn(Bn(e.defaultFocusedValue),d):g||rn(gm(p),d),o,s),[e.defaultFocusedValue,g,p,d,o,s]),[v,x]=Kl(m,b,e.onFocusChange),[C,E]=I.useState(()=>{switch(l){case"start":return to(v,a,r,o,s);case"end":return Ng(v,a,r,o,s);case"center":default:return Fg(v,a,r,o,s)}}),[w,B]=I.useState(e.autoFocus||!1),y=I.useMemo(()=>{let R={...a};return R.days?R.days--:R.days=-1,C.add(R)},[C,a]),[S,D]=I.useState(d.identifier);if(d.identifier!==S){let R=rn(v,d);E(Fg(R,a,r,o,s)),x(R),D(d.identifier)}ss(v,o,s)?x(Qi(v,o,s)):v.compare(C)<0?E(Ng(v,a,r,o,s)):v.compare(y)>0&&E(to(v,a,r,o,s));function A(R){R=Qi(R,o,s),x(R)}function T(R){if(!e.isDisabled&&!e.isReadOnly){if(R===null){f(null);return}if(R=Qi(R,o,s),R=rw(R,C,u),!R)return;R=rn(R,(h==null?void 0:h.calendar)||new ar),h&&"hour"in h?f(h.set(R)):f(R)}}let F=I.useMemo(()=>g?u&&u(g)?!0:ss(g,o,s):!1,[g,u,o,s]),k=e.isInvalid||e.validationState==="invalid"||F,P=k?"invalid":null,$=I.useMemo(()=>c==="visible"?a:Wh(a),[c,a]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:g,setValue:T,visibleRange:{start:C,end:y},minValue:o,maxValue:s,focusedDate:v,timeZone:p,validationState:P,isValueInvalid:k,setFocusedDate(R){A(R),B(!0)},focusNextDay(){A(v.add({days:1}))},focusPreviousDay(){A(v.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&A(v.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&A(v.subtract({weeks:1}))},focusNextPage(){let R=C.add($);x(Qi(v.add($),o,s)),E(to(Jl(v,R,$,r,o,s),$,r))},focusPreviousPage(){let R=C.subtract($);x(Qi(v.subtract($),o,s)),E(to(Jl(v,R,$,r,o,s),$,r))},focusSectionStart(){a.days?A(C):a.weeks?A(zl(v,r)):(a.months||a.years)&&A(Su(v))},focusSectionEnd(){a.days?A(y):a.weeks?A(WL(v,r)):(a.months||a.years)&&A(mg(v))},focusNextSection(R){if(!R&&!a.days){A(v.add(Wh(a)));return}a.days?this.focusNextPage():a.weeks?A(v.add({months:1})):(a.months||a.years)&&A(v.add({years:1}))},focusPreviousSection(R){if(!R&&!a.days){A(v.subtract(Wh(a)));return}a.days?this.focusPreviousPage():a.weeks?A(v.subtract({months:1})):(a.months||a.years)&&A(v.subtract({years:1}))},selectFocusedDate(){T(v)},selectDate(R){T(R)},isFocused:w,setFocused:B,isInvalid(R){return ss(R,o,s)},isSelected(R){return g!=null&&zt(R,g)&&!this.isCellDisabled(R)&&!this.isCellUnavailable(R)},isCellFocused(R){return w&&v&&zt(R,v)},isCellDisabled(R){return e.isDisabled||R.compare(C)<0||R.compare(y)>0||this.isInvalid(R,o,s)},isCellUnavailable(R){return e.isDateUnavailable&&e.isDateUnavailable(R)},isPreviousVisibleRangeInvalid(){let R=C.subtract({days:1});return zt(R,C)||this.isInvalid(R,o,s)},isNextVisibleRangeInvalid(){let R=y.add({days:1});return zt(R,y)||this.isInvalid(R,o,s)},getDatesInWeek(R,O=C){let j=O.add({weeks:R}),V=[];j=zl(j,r);let W=kf(j,r);for(let U=0;U<W;U++)V.push(null);for(;V.length<7;){V.push(j);let U=j.add({days:1});if(zt(j,U))break;j=U}for(;V.length<7;)V.push(null);return V}}}function Wh(e){let t={...e};for(let n in e)t[n]=1;return t}function oH(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=Kl(t,n||null,r),[h,f]=I.useState(null),g="center";if(c&&c.start&&c.end){let O=Fg(Bn(c.start),o,a,s,l).add(o).subtract({days:1});c.end.compare(O)>0&&(g="start")}let p=I.useRef(null),[m,b]=I.useState(null),v=I.useMemo(()=>mm(s,m==null?void 0:m.start),[s,m]),x=I.useMemo(()=>pm(l,m==null?void 0:m.end),[l,m]),C=iw({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:o,minValue:v,maxValue:x,selectionAlignment:g}),E=R=>{R&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(p.current={start:ty(R,C,-1),end:ty(R,C,1)},b(p.current)):(p.current=null,b(null))},[w,B]=I.useState(C.visibleRange);(!pg(C.visibleRange.start,w.start)||!pg(C.visibleRange.end,w.end))&&(E(h),B(C.visibleRange));let y=R=>{R?(f(R),E(R)):(f(null),E(null))},S=h?zh(h,C.focusedDate):c&&zh(c.start,c.end),D=R=>{if(!e.isReadOnly&&(R=Qi(R,v,x),R=rw(R,C.visibleRange.start,e.isDateUnavailable),!!R))if(!h)y(R);else{let O=zh(h,R);d({start:ey(O.start,c==null?void 0:c.start),end:ey(O.end,c==null?void 0:c.end)}),y(null)}},[A,T]=I.useState(!1),{isDateUnavailable:F}=e,k=I.useMemo(()=>!c||h?!1:F&&(F(c.start)||F(c.end))?!0:ss(c.start,s,l)||ss(c.end,s,l),[F,c,h,s,l]),P=e.isInvalid||e.validationState==="invalid"||k;return{...C,value:c,setValue:d,anchorDate:h,setAnchorDate:y,highlightedRange:S,validationState:P?"invalid":null,isValueInvalid:P,selectFocusedDate(){D(C.focusedDate)},selectDate:D,highlightDate(R){h&&C.setFocusedDate(R)},isSelected(R){return S&&R.compare(S.start)>=0&&R.compare(S.end)<=0&&!C.isCellDisabled(R)&&!C.isCellUnavailable(R)},isInvalid(R){var O,j;return C.isInvalid(R)||ss(R,(O=p.current)===null||O===void 0?void 0:O.start,(j=p.current)===null||j===void 0?void 0:j.end)},isDragging:A,setDragging:T}}function zh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Bn(e),end:Bn(t)})}function ey(e,t){return e=rn(e,(t==null?void 0:t.calendar)||new ar),t&&"hour"in t?t.set(e):e}function ty(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function sH(e){let[t,n]=Kl(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=I.useCallback(()=>{n(!0)},[n]),i=I.useCallback(()=>{n(!1)},[n]),a=I.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var aw={};aw={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var ow={};ow={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var sw={};sw={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var lw={};lw={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var uw={};uw={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var cw={};cw={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var dw={};dw={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var fw={};fw={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var hw={};hw={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var gw={};gw={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var pw={};pw={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var mw={};mw={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var bw={};bw={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var vw={};vw={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var yw={};yw={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var xw={};xw={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var Cw={};Cw={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var Ew={};Ew={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var Sw={};Sw={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var ww={};ww={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var Iw={};Iw={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var _w={};_w={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var Dw={};Dw={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var Aw={};Aw={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var Tw={};Tw={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var Rw={};Rw={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var Bw={};Bw={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var $w={};$w={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var kw={};kw={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var Pw={};Pw={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var Fw={};Fw={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var Nw={};Nw={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var Mw={};Mw={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var Lw={};Lw={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var Ow={};Ow={"ar-AE":aw,"bg-BG":ow,"cs-CZ":sw,"da-DK":lw,"de-DE":uw,"el-GR":cw,"en-US":dw,"es-ES":fw,"et-EE":hw,"fi-FI":gw,"fr-FR":pw,"he-IL":mw,"hr-HR":bw,"hu-HU":vw,"it-IT":yw,"ja-JP":xw,"ko-KR":Cw,"lt-LT":Ew,"lv-LV":Sw,"nb-NO":ww,"nl-NL":Iw,"pl-PL":_w,"pt-BR":Dw,"pt-PT":Aw,"ro-RO":Tw,"ru-RU":Rw,"sk-SK":Bw,"sl-SI":$w,"sr-SP":kw,"sv-SE":Pw,"tr-TR":Fw,"uk-UA":Nw,"zh-CN":Mw,"zh-TW":Lw};function lH(e){return e&&e.__esModule?e.default:e}const Vw=new Do(lH(Ow));function Hw(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function ny(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&(r==null?void 0:r(e))||!1,l=a||o||s,u=[];if(l){let c=Hw(),d=Do.getGlobalDictionaryForPackage("@react-stately/datepicker")||Vw,h=new FE(c,d),f=new Xl(c,Mg({},i)),g=f.resolvedOptions().timeZone;o&&u.push(h.format("rangeUnderflow",{minValue:f.format(t.toDate(g))})),a&&u.push(h.format("rangeOverflow",{maxValue:f.format(n.toDate(g))})),s&&u.push(h.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function uH(e,t,n,r,i){let a=ny(e==null?void 0:e.start,t,n,r,i),o=ny(e==null?void 0:e.end,t,n,r,i),s=Od(a,o);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let l=Do.getGlobalDictionaryForPackage("@react-stately/datepicker")||Vw;s=Od(s,{isInvalid:!0,validationErrors:[l.getStringForLocale("rangeReversed",Hw())],validationDetails:{...Nf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return s}const cH={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},dH={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Mg(e,t){e={...t.shouldForceLeadingZeros?dH:cH,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let o=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");o<0&&(o=0);let s=i.indexOf(r);if(s<0&&(s=2),o>s)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(o,s+1).reduce((c,d)=>(c[d]=e[d],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&o===0&&(l.era="short"),l}function ic(e){return e&&"hour"in e?e:new Sm}function fH(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=I.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let o=e?n:i[1];return[t,o]}function hH(e){var t,n;let r=sH(e),[i,a]=Kl(e.value,e.defaultValue||null,e.onChange),[o,s]=I.useState(()=>i||{start:null,end:null});i==null&&o.start&&o.end&&(o={start:null,end:null},s(o));let l=i||o,u=$=>{s($||{start:null,end:null}),$!=null&&$.start&&$.end?a($):a(null)},c=(l==null?void 0:l.start)||(l==null?void 0:l.end)||e.placeholderValue,[d,h]=fH(c,e.granularity),f=d==="hour"||d==="minute"||d==="second";var g;let p=(g=e.shouldCloseOnSelect)!==null&&g!==void 0?g:!0,[m,b]=I.useState(null),[v,x]=I.useState(null);l&&l.start&&l.end&&(m=l,"hour"in l.start&&(v=l));let C=($,R)=>{u({start:"timeZone"in R.start?R.start.set(Bn($.start)):Ia($.start,R.start),end:"timeZone"in R.end?R.end.set(Bn($.end)):Ia($.end,R.end)}),b(null),x(null),F.commitValidation()},E=$=>{let R=typeof p=="function"?p():p;f?R||$.start&&$.end&&(v!=null&&v.start)&&(v!=null&&v.end)?C($,{start:(v==null?void 0:v.start)||ic(e.placeholderValue),end:(v==null?void 0:v.end)||ic(e.placeholderValue)}):b($):$.start&&$.end?(u($),F.commitValidation()):b($),R&&r.setOpen(!1)},w=$=>{m!=null&&m.start&&(m!=null&&m.end)&&$.start&&$.end?C(m,$):x($)},B=(l==null||(t=l.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&l.start.era==="BC"||(l==null||(n=l.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&l.end.era==="BC",y=I.useMemo(()=>({granularity:d,timeZone:h,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:B}),[d,e.hourCycle,e.shouldForceLeadingZeros,h,e.hideTimeZone,B]),{minValue:S,maxValue:D,isDateUnavailable:A}=e,T=I.useMemo(()=>uH(l,S,D,A,y),[l,S,D,A,y]),F=KV({...e,value:i,name:I.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:T}),k=F.displayValidation.isInvalid,P=e.validationState||(k?"invalid":null);return{...F,value:l,setValue:u,dateRange:m,timeRange:v,granularity:d,hasTime:f,setDate($,R){E({...m,[$]:R})},setTime($,R){w({...v,[$]:R})},setDateTime($,R){u({...l,[$]:R})},setDateRange:E,setTimeRange:w,...r,setOpen($){!$&&!(l!=null&&l.start&&(l!=null&&l.end))&&(m!=null&&m.start)&&(m!=null&&m.end)&&f&&C(m,{start:(v==null?void 0:v.start)||ic(e.placeholderValue),end:(v==null?void 0:v.end)||ic(e.placeholderValue)}),r.setOpen($)},validationState:P,isInvalid:k,formatValue($,R){if(!l||!l.start||!l.end)return null;let O="timeZone"in l.start?l.start.timeZone:void 0,j=e.granularity||(l.start&&"minute"in l.start?"minute":"day"),V="timeZone"in l.end?l.end.timeZone:void 0,W=e.granularity||(l.end&&"minute"in l.end?"minute":"day"),U=Mg(R,{granularity:j,timeZone:O,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:l.start.calendar.identifier==="gregory"&&l.start.era==="BC"||l.end.calendar.identifier==="gregory"&&l.end.era==="BC"}),K=l.start.toDate(O||"UTC"),ee=l.end.toDate(V||"UTC"),z=new Xl($,U),H;if(O===V&&j===W&&l.start.compare(l.end)!==0){try{let X=z.formatRangeToParts(K,ee),te=-1;for(let ce=0;ce<X.length;ce++){let Q=X[ce];if(Q.source==="shared"&&Q.type==="literal")te=ce;else if(Q.source==="endRange")break}let ie="",le="";for(let ce=0;ce<X.length;ce++)ce<te?ie+=X[ce].value:ce>te&&(le+=X[ce].value);return{start:ie,end:le}}catch{}H=z}else{let X=Mg(R,{granularity:W,timeZone:V,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});H=new Xl($,X)}return{start:z.format(K),end:H.format(ee)}}}}const jw=e=>{const t=I.useRef(null),{locale:n}=Mr(),{state:r,date:i}=e,{cellProps:a,buttonProps:o,isSelected:s,isOutsideVisibleRange:l,isDisabled:u,formattedDate:c,isInvalid:d}=ZV({date:i},r,t),{focusProps:h}=RE(),f="highlightedRange"in r?r.highlightedRange?zt(i,r.highlightedRange.start):null:s,g="highlightedRange"in r?r.highlightedRange?zt(i,r.highlightedRange.end):null:s,p=kf(i,n),m=s&&(f||p===0||i.day===1),b=s&&(g||p===6||i.day===i.calendar.getDaysInMonth(i));return _.jsx("td",{...a,children:_.jsx("div",{...Gn(o,h),ref:t,className:`${Pe["cell-calendar"]} ${m?"1ru-rounded-l-full":""} ${b?"1ru-rounded-r-full":""} ${s?d?"1ru-bg-red-300":"1ru-bg-laba-blue-02":""} ${u?"1ru-disabled":""}`,children:l?_.jsx("div",{className:Pe["visible-cell-calendar"],children:c}):_.jsx("div",{className:`${Pe["active-cell-calendar"]} ${u&&!d?Pe.disabled:""} ${f||g?d?Pe.error:Pe.selected:""} ${s&&!u&&!(f??g)?d?"hover:1ru-bg-red-400":"hover:1ru-text-laba-blue-05":""} ${!s&&!u?"hover:1ru-bg-laba-blue-01":""}`,children:c})})})},Cs=e=>{const t=I.useRef(null),{buttonProps:n}=jV(e,t),{focusProps:r}=RE();return _.jsx("button",{...Gn(n,r),ref:t,className:`1ru-px-2 1ru-py-1 1ru-rounded-full ${e.isDisabled?"1ru-text-gray-400":"1ru-text-laba-blue-10"} ${e.isDisabled?"":"hover:1ru-bg-laba-blue-01 1ru-cursor-pointer"} 1ru-outline-none`,children:e.children})},Ww=({prevIcon:e,nextIcon:t,state:n,setActiveTypeCalendar:r,onChangeMonth:i,type:a,hiddenHeader:o})=>{const s=new Date().getFullYear(),l=n.focusedDate.calendar.getMonthsInYear(n.focusedDate),u=_a({month:"short",timeZone:n.timeZone}),c=(h,f)=>{const g=n.focusedDate.set({month:h});f?(r("date"),n.setFocusedDate(g)):!f&&typeof i=="function"&&i(g)},d=h=>{const f=n.focusedDate.set({year:h});n.setFocusedDate(f)};return _.jsxs("div",{className:`1ru-w-[296px] ${Pe["container-calendar"]}`,children:[!o&&_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{isDisabled:n!=null&&n.minValue?n.focusedDate.year<=n.minValue.year:!1,onPress:()=>d(n.focusedDate.year-1),children:typeof e=="function"||I.isValidElement(e)?I.isValidElement(e)?e:e():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:`${Pe["header-button-calendar"]} ${a.includes("year")?"":Pe.disabled}`,onClick:()=>{a.includes("year")&&r("year")},children:n.focusedDate.year}),_.jsx(Cs,{isDisabled:n!=null&&n.maxValue?n.focusedDate.year>=n.maxValue.year:!1,onPress:()=>d(n.focusedDate.year+1),children:typeof t=="function"||I.isValidElement(t)?I.isValidElement(t)?t:t():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsx("div",{className:Pe["month-calendar"],children:[...Array(l).keys()].map(h=>{var x,C,E,w;const f=n.focusedDate.set({month:h+1}),g=u.format(f.toDate(n.timeZone)),p=((x=n.value)==null?void 0:x.year)||((E=(C=n.value)==null?void 0:C.start)==null?void 0:E.year)||s,m=n!=null&&n.minValue?f.month<((w=n==null?void 0:n.minValue)==null?void 0:w.month)&&f.year<=n.minValue.year:!1,b=n!=null&&n.maxValue?f.month>n.maxValue.month&&f.year>=n.maxValue.year:!1,v=m||b;return _.jsx("div",{onClick:()=>{v||c(f.month,a.includes("date"))},className:`${Pe["cell-month"]} ${n.focusedDate.month===f.month&&!v&&f.year===p?Pe.selected:""} ${n.focusedDate.month!==f.month&&!v?"hover:1ru-bg-laba-blue-01":""} ${v?"1ru-text-gray-400":"1ru-cursor-pointer"}`,children:g},h)})})]})},gH=e=>{const t=N3(e.state.visibleRange.start,e.locale),{gridProps:n,headerProps:r,weekDays:i}=xS({},e.state),{prevButtonProps:a,nextButtonProps:o,title:s}=yS(e,e.state),l=u=>{let c="";switch(u){case 0:c="Min";break;case 1:c="Sen";break;case 2:c="Sel";break;case 3:c="Rab";break;case 4:c="Kam";break;case 5:c="Jum";break;case 6:c="Sab";break}return c};return _.jsxs("div",{children:[!e.hiddenHeader&&_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{...a,children:typeof(e==null?void 0:e.prevIcon)=="function"||I.isValidElement(e==null?void 0:e.prevIcon)?I.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:Pe["header-button-calendar"],onClick:()=>e.setActiveTypeCalendar("month"),children:s}),_.jsx(Cs,{...o,children:typeof(e==null?void 0:e.nextIcon)=="function"||I.isValidElement(e==null?void 0:e.nextIcon)?I.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsxs("table",{...n,children:[_.jsx("thead",{...r,children:_.jsx("tr",{children:i.map((u,c)=>_.jsx("th",{className:Pe["days-calendar"],children:l(c)},c))})}),_.jsx("tbody",{children:[...new Array(t).keys()].map(u=>_.jsx("tr",{children:e.state.getDatesInWeek(u).map((c,d)=>c?_.jsx(jw,{state:e.state,date:c},d):_.jsx("td",{},d))},u))})]})]})},Vd=({minDate:e,maxDate:t,value:n,time:r,hiddenHeader:i,handlerChangeTime:a,timeLabel:o,type:s})=>{const l=e?new Date(e):null,u=t?new Date(t):null,c=l==null?void 0:l.getHours(),d=u==null?void 0:u.getHours(),h=l==null?void 0:l.getMinutes(),f=u==null?void 0:u.getMinutes(),[g,p]=I.useState(!0),m=(C,E,w)=>Array.from({length:(E-C)/w+1},(B,y)=>C+y*w),b=(C,E)=>{typeof a=="function"&&a({hour:C,minut:E,second:r==null?void 0:r.second})},v=()=>{const C=document.getElementById(`calendar-hour-${r==null?void 0:r.hour}-${s}`),E=document.getElementById(`calendar-minut-${r==null?void 0:r.minut}-${s}`),w=document.getElementById(`wrapper-calendar-hour-${s}`),B=document.getElementById(`wrapper-calendar-minut-${s}`);C&&w&&w.scrollTo({behavior:"instant",top:C.offsetTop-78}),E&&B&&B.scrollTo({behavior:"instant",top:E.offsetTop-78})},x=(C,E)=>{let w=!0;if(l&&n){const B=n.year===l.getFullYear(),y=n.month===l.getMonth()+1;n.day===l.getDate()&&y&&B?(E==="hour"&&C<(c??0)||E==="minut"&&((r==null?void 0:r.hour)??0)<=l.getHours()&&C<(h??0))&&(w=!1):n.toDate(Kn()).getTime()<l.getTime()&&(w=!1)}if(u&&n){const B=n.year===u.getFullYear(),y=n.month===u.getMonth()+1;n.day===u.getDate()&&y&&B?(E==="hour"&&C>(d??0)||E==="minut"&&((r==null?void 0:r.hour)??0)>=u.getHours()&&C>(f??0))&&(w=!1):n.toDate(Kn()).getTime()>u.getTime()&&(w=!1)}return w};return I.useEffect(()=>{g&&v(),r&&p(!1)},[JSON.stringify(n),JSON.stringify(r)]),_.jsxs("div",{className:Pe["custom-time-calendar"],children:[!i&&_.jsx("div",{className:Pe["header-time"],children:o||"Atur Waktu"}),_.jsxs("div",{className:Pe["type-time"],children:[_.jsx("div",{children:"Jam"}),_.jsx("div",{children:"Menit"})]}),_.jsxs("div",{className:"1ru-flex 1ru-justify-around",children:[_.jsx("div",{id:`wrapper-calendar-hour-${s}`,className:Pe["container-cell-time"],children:m(0,23,1).map(C=>_.jsx("div",{id:`calendar-hour-${C}-${s}`,className:`${Pe["cell-time"]} ${(r==null?void 0:r.hour)===C?x(C,"hour")?Pe.selected:Pe.error:""} ${x(C,"hour")&&(r==null?void 0:r.hour)!=C?Pe.valid:Pe.invalid}`,onClick:()=>{x(C,"hour")&&b(C,r==null?void 0:r.minut)},children:C<10?`0${C}`:C},C))}),_.jsx("div",{id:`wrapper-calendar-minut-${s}`,className:Pe["container-cell-time"],children:m(0,59,1).map(C=>_.jsx("div",{id:`calendar-minut-${C}-${s}`,className:`${Pe["cell-time"]} ${(r==null?void 0:r.minut)===C?x(C,"minut")?Pe.selected:Pe.error:""} ${x(C,"minut")&&(r==null?void 0:r.minut)!=C?Pe.valid:Pe.invalid}`,onClick:()=>{x(C,"minut")&&b(r==null?void 0:r.hour,C)},children:C<10?`0${C}`:C},C))})]})]})},Mf=e=>{var h,f,g,p,m,b,v,x,C;const t=e.typeTime??"SINGLE",n=iw({...e,locale:e.locale,createCalendar:Iu}),{title:r}=yS(e,n),[i,a]=I.useState((e==null?void 0:e.activeType)??"date"),[o,s]=I.useState({start:void 0,end:void 0}),l=((f=(h=o.start)==null?void 0:h.hour)==null?void 0:f.toString())&&((p=(g=o==null?void 0:o.start)==null?void 0:g.minut)==null?void 0:p.toString())&&((v=e.value)==null?void 0:v.toDate(Kn()).setHours((m=o.start)==null?void 0:m.hour,(b=o.start)==null?void 0:b.minut))||e.minDate,u=e.maxDate,c=(E,w)=>{const B={...o,[w]:E};s(B),typeof(e==null?void 0:e.handlerChangeTime)=="function"&&e.handlerChangeTime(B)},d=E=>{n.setValue(E)};return ba(()=>{e!=null&&e.activeType&&a(e.activeType)},[e==null?void 0:e.activeType]),I.useEffect(()=>{var E,w;if((E=e.time)!=null&&E.start&&((w=e.time)!=null&&w.end)){const B=e.time.start,y=e.time.end;s({start:B,end:y})}},[JSON.stringify(e.time)]),_.jsxs("div",{className:"1ru-text-laba-base-sr",children:[i==="date"&&_.jsx(_.Fragment,{children:_.jsxs("div",{className:Pe["container-calendar"],children:[_.jsxs("div",{className:"1ru-flex 1ru-gap-2",children:[_.jsx(gH,{state:n,setActiveTypeCalendar:a,...e}),(e==null?void 0:e.isCustomTime)&&_.jsxs("div",{className:"1ru-flex",children:[_.jsx(Vd,{minDate:e.minDate,maxDate:e.maxDate,time:(x=e.time)==null?void 0:x.start,value:e.value,timeLabel:t==="RANGE"?"Awal":"Atur Waktu",type:"start",handlerChangeTime:E=>c(E,"start")}),t==="RANGE"&&_.jsx(Vd,{minDate:l,maxDate:u,time:(C=e.time)==null?void 0:C.end,value:e.value,timeLabel:"Akhir",type:"end",handlerChangeTime:E=>c(E,"end")})]})]}),((e==null?void 0:e.withConfirm)??(e==null?void 0:e.isCustomTime))&&_.jsxs("div",{className:`${Pe["footer-calendar"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:()=>e.handlerReset(n),children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(n),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})}),i==="month"&&_.jsx(Ww,{state:n,setActiveTypeCalendar:a,type:e.type,onChangeMonth:d,hiddenHeader:e.hiddenHeader}),i==="year"&&_.jsx(W2,{state:n,type:e.type,setActiveTypeCalendar:a,title:r,onChangeYear:d,hiddenHeader:e.hiddenHeader})]})},pH=e=>{var C,E,w,B,y,S,D,A,T,F,k,P;const t=I.useRef(null),{locale:n}=Mr(),r=oH({...e,locale:n,createCalendar:Iu}),i=$=>{let R="";switch($){case 0:R="Min";break;case 1:R="Sen";break;case 2:R="Sel";break;case 3:R="Rab";break;case 4:R="Kam";break;case 5:R="Jum";break;case 6:R="Sab";break}return R},{calendarProps:a,prevButtonProps:o,nextButtonProps:s,title:l}=UV(e,r,t),{gridProps:u,headerProps:c,weekDays:d}=xS({},r),h=N3(r.visibleRange.start,n),[f,g]=I.useState("date"),[p,m]=I.useState({start:void 0,end:void 0}),b=((E=(C=p.start)==null?void 0:C.hour)==null?void 0:E.toString())&&((B=(w=p==null?void 0:p.start)==null?void 0:w.minut)==null?void 0:B.toString())&&((A=(y=e.value)==null?void 0:y.start)==null?void 0:A.toDate(Kn()).setHours((S=p.start)==null?void 0:S.hour,(D=p.start)==null?void 0:D.minut))||e.minDate,v=e.maxDate,x=($,R)=>{const O={...p,[R]:$};m(O),typeof(e==null?void 0:e.handlerChangeTimeRange)=="function"&&e.handlerChangeTimeRange(O)};return I.useEffect(()=>{var $,R;if(($=e.time)!=null&&$.start&&((R=e.time)!=null&&R.end)){const O=e.time.start,j=e.time.end;m({start:O,end:j})}},[JSON.stringify(e.time)]),_.jsxs("div",{className:"1ru-text-laba-base-sr",children:[f==="date"&&_.jsx(_.Fragment,{children:_.jsx("div",{...a,ref:t,children:_.jsxs("div",{className:Pe["container-calendar"],children:[_.jsxs("div",{className:"1ru-flex 1ru-gap-2",children:[_.jsxs("div",{children:[_.jsxs("div",{className:Pe["header-calendar"],children:[_.jsx(Cs,{...o,children:typeof(e==null?void 0:e.prevIcon)=="function"||I.isValidElement(e==null?void 0:e.prevIcon)?I.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():_.jsx(si,{className:"1ru-rotate-90"})}),_.jsx("div",{className:Pe["header-button-calendar"],onClick:()=>g("month"),children:l}),_.jsx(Cs,{...s,children:typeof(e==null?void 0:e.nextIcon)=="function"||I.isValidElement(e==null?void 0:e.nextIcon)?I.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():_.jsx(si,{className:"-1ru-rotate-90"})})]}),_.jsxs("table",{...u,cellPadding:"0",className:"flex-1",children:[_.jsx("thead",{...c,className:"text-gray-600",children:_.jsx("tr",{children:d.map(($,R)=>_.jsx("th",{className:Pe["days-calendar"],children:i(R)},R))})}),_.jsx("tbody",{children:[...new Array(h).keys()].map($=>_.jsx("tr",{children:r.getDatesInWeek($).map((R,O)=>R?_.jsx(jw,{state:r,date:R},O):_.jsx("td",{},O))},$))})]})]}),(e==null?void 0:e.isCustomTime)&&_.jsxs("div",{className:"1ru-flex",children:[_.jsx(Vd,{minDate:e.minDate,maxDate:e.maxDate,time:(T=e.time)==null?void 0:T.start,value:(F=e.value)==null?void 0:F.start,timeLabel:"Awal",type:"start",handlerChangeTime:$=>x($,"start")}),_.jsx(Vd,{minDate:b,maxDate:v,time:(k=e.time)==null?void 0:k.end,value:(P=e.value)==null?void 0:P.end,timeLabel:"Akhir",type:"end",handlerChangeTime:$=>x($,"end")})]})]}),e.withConfirm&&_.jsxs("div",{className:Pe["footer-calendar"],children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:()=>e.handlerReset(r),children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(r),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})})}),f==="month"&&_.jsx(Ww,{state:r,setActiveTypeCalendar:g,type:["date","month","year"]}),f==="year"&&_.jsx(W2,{state:r,setActiveTypeCalendar:g,title:l,type:["date","month","year"]})]})},zw=e=>{const t=hH(e),n=I.useRef(null),{calendarProps:r}=aH(e,t,n);return _.jsx("div",{ref:n,children:_.jsx(pH,{handlerReset:e.handlerReset,handlerSubmit:e.handlerSubmit,withConfirm:e.withConfirm,prevIcon:e.prevIcon,nextIcon:e.nextIcon,buttonReset:e.buttonReset,buttonSubmit:e.buttonSubmit,isCustomTime:e.isCustomTime,time:e.time,minDate:e.minDate,maxDate:e.maxDate,handlerChangeTimeRange:e.handlerChangeTimeRange,...r})})},ac=e=>{let t;const n=new Date(e??new Date);return e&&(t=Cm(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},mH=e=>{const{minDate:t,maxDate:n,value:r,defaultValue:i,withConfirm:a=!1,isCustomTime:o=!1,className:s,classNameButton:l,buttonClick:u,buttonReset:c,buttonSubmit:d,prevIcon:h,nextIcon:f,onChange:g,id:p="date-picker",idPopover:m="date-picker-popover",floatingOptions:b={},offsetPopover:v=5,zIndexPopper:x=1,hiddenHeader:C}=e,E=_a(),{locale:w}=Mr(),B=ac(t),y=ac(n),S=I.useRef(null),[D,A]=I.useState(),[T,F]=I.useState(),k=j=>{var ee;const V=new Date;let W=j.toDate(Kn());W.setHours(V.getHours(),V.getMinutes(),V.getSeconds());const U=t?new Date(t):null,K=n?new Date(n):null;if(o){if(W=new Date(new Date(W).setHours((T==null?void 0:T.hour)??0,T==null?void 0:T.minut,T==null?void 0:T.second)),U&&(U==null?void 0:U.toDateString())===new Date(W).toDateString()&&(U==null?void 0:U.toTimeString())>=(W==null?void 0:W.toTimeString())){if(U&&(U.getHours()>W.getHours()||U.getHours()===W.getHours()&&U.getMinutes()>W.getMinutes()))return;W=new Date(U.setSeconds(U.getSeconds()+1))}if(K&&(K==null?void 0:K.toDateString())===new Date(W).toDateString()&&(K==null?void 0:K.toTimeString())<(W==null?void 0:W.toTimeString())){if(K&&(K.getHours()<W.getHours()||K.getHours()===W.getHours()&&K.getMinutes()<W.getMinutes()))return;W=new Date(K.setSeconds(K.getSeconds()-1))}}else U&&E.format(W)===E.format(U)&&U.getTime()>=W.getTime()?W=new Date(U.setSeconds(U.getSeconds()+1)):K&&E.format(W)===E.format(K)&&K.getTime()<=W.getTime()&&(W=new Date(K.setSeconds(K.getSeconds()-1)));typeof g=="function"&&(g(W),(ee=S.current)==null||ee.setShow(!1))},P=(j,V)=>{A(j),(V??(!a&&!o))&&k(j)},$=j=>{const{start:V}=j;F(V)},R=j=>{const V=new Date(r??new Date);F({hour:V.getHours(),minut:V.getMinutes(),second:V.getSeconds()}),A(ac(r))},O=()=>{D&&P(D,!0)};return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:p,onClick:j=>{var V;(V=S.current)==null||V.handlerShow(j),R()},className:l,children:typeof u=="function"?u(r):r?new Date(r).toDateString():"Pilih Tanggal"}),_.jsx(gi,{zIndex:x,ref:S,offset:v,id:m,floatingOptions:{placement:"bottom-end",...b},children:_.jsx("div",{className:s??"",children:_.jsx(Fm,{locale:"id-ID",children:_.jsx(Mf,{minValue:B,maxValue:y,minDate:t,maxDate:n,time:{start:T},locale:w,value:D,typeTime:"SINGLE",buttonReset:c,buttonSubmit:d,prevIcon:h,nextIcon:f,createCalendar:Iu,defaultValue:ac(r),onChange:P,handlerReset:()=>{var j;typeof g=="function"&&(g(i),(j=S.current)==null||j.setShow(!1))},handlerSubmit:O,handlerChangeTime:$,withConfirm:a,isCustomTime:o,type:["date","month","year"],hiddenHeader:C})})})})]})},Gh=e=>{let t;const n=new Date(e??new Date);return e&&(t=Cm(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},ry=e=>{const t=new Date((e==null?void 0:e.startDate)??new Date),n=new Date((e==null?void 0:e.endDate)??new Date),r=new Ot(t.getFullYear(),t.getMonth()+1,t.getDate()),i=new Ot(n.getFullYear(),n.getMonth()+1,n.getDate());return e?{start:r,end:i}:void 0},Gw=e=>{const{minDate:t,maxDate:n,defaultValue:r,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,typePicker:u="RANGE",onChange:c,value:d,onReset:h,isCustomTime:f}=e,{locale:g}=Mr(),p=Gh(t),m=Gh(n),[b,v]=I.useState(),[x,C]=I.useState({start:void 0,end:void 0}),E=D=>{typeof c=="function"&&c(D)},w=(D,A)=>{const T=D.start.toDate(Kn()),F=D.end.toDate(Kn());v(D),C({start:{hour:0,minut:0,second:0},end:{hour:23,minut:59,second:59}}),(A??!i)&&E({startDate:T,endDate:new Date(F.setHours(23,59,59))})},B=(D,A)=>{var T,F,k,P,$,R,O,j;if(b!=null&&b.start&&(b!=null&&b.end)&&(C(D),(F=(T=D.start)==null?void 0:T.hour)!=null&&F.toString()&&((P=(k=D.start)==null?void 0:k.minut)!=null&&P.toString())&&((R=($=D.end)==null?void 0:$.hour)!=null&&R.toString())&&((j=(O=D.end)==null?void 0:O.minut)!=null&&j.toString())&&(A??!i))){const V=b.start.toDate(Kn()),W=b.end.toDate(Kn()),U=new Date(V.setHours(D.start.hour,D.start.minut)),K=new Date(W.setHours(D.end.hour,D.end.minut,59));U.getTime()<K.getTime()&&E({startDate:U,endDate:K})}},y=D=>{if(typeof h=="function")h();else if(r&&D){const A=new Date(r.endDate??new Date),T=D.focusedDate.set({month:A.getMonth()+1,year:A.getFullYear()});D.setFocusedDate(T)}v(ry(r))},S=()=>{b&&(f?B(x,!0):w(b,!0))};return I.useEffect(()=>{if(d!=null&&d.endDate&&(d!=null&&d.startDate)){const D=new Date(d.startDate),A=new Date(d.endDate),T=D.getHours(),F=D.getMinutes(),k=A.getHours(),P=A.getMinutes(),$=Bn(Sv(D,Kn())),R=Bn(Sv(A,Kn()));v({start:$,end:R}),C({start:{hour:T,minut:F},end:{hour:k,minut:P}})}},[JSON.stringify(d)]),_.jsx("div",{className:"1ru-flex 1ru-flex-col",children:_.jsxs(Fm,{locale:"id-ID",children:[u==="RANGE"&&_.jsx(zw,{defaultValue:ry(r),value:b,minValue:p,maxValue:m,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,onChange:w,isCustomTime:f,handlerReset:y,handlerSubmit:S,time:x,minDate:t,maxDate:n,handlerChangeTimeRange:B}),u==="SINGLE"&&_.jsx(Mf,{defaultValue:Gh(r==null?void 0:r.endDate),value:b==null?void 0:b.end,minValue:p,maxValue:m,minDate:t,maxDate:n,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,locale:g,time:x,typeTime:"RANGE",handlerChangeTime:B,isCustomTime:f,createCalendar:Iu,onChange:D=>w({start:D,end:D}),handlerReset:y,handlerSubmit:S,type:["date","month","year"]})]})})},bH=({value:e,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,className:a,classNameButton:o,buttonClick:s,buttonList:l,typePicker:u="RANGE",onChange:c,idPopover:d="filter-date-popover",id:h="filter-date",floatingOptions:f={},offsetPopover:g=5,zIndexPopper:p=0,defaultValueLabel:m,isCustomTime:b=!1,mountedExecuteChange:v=!0,formatingDate:x})=>{const C=[{key:"thisDay",value:"Hari ini"},{key:"thisWeek",value:"Minggu ini"},{key:"thisMonth",value:"Bulan ini"},{key:"thisYear",value:"Tahun ini"},{key:"yesterday",value:"Kemarin"},{key:"lastWeek",value:"Minggu lalu"},{key:"lastMonth",value:"Bulan lalu"},{key:"lastYear",value:"Tahun lalu"},{key:"custom",value:"Kustom"}],E=I.useRef(null),[w,B]=I.useState(),[y,S]=I.useState(),[D,A]=I.useState(),T=(z,H)=>{const X=new Date(z??new Date);return H==="start"?new Date(X.setHours(0,0,0)):new Date(X.setHours(23,59,59))},F=()=>{const z=new Date;return{startDate:z,endDate:z}},k=()=>{const z=new Date;z.setDate(z.getDate()-z.getDay());const H=new Date;return H.setDate(H.getDate()+(6-H.getDay())),{startDate:z,endDate:H}},P=()=>{const z=new Date,H=new Date(z.getFullYear(),z.getMonth(),1),X=new Date(z.getFullYear(),z.getMonth()+1,0);return{startDate:H,endDate:X}},$=()=>{const z=new Date(new Date().getFullYear(),0,1),H=new Date(new Date().getFullYear(),11,31);return{startDate:z,endDate:H}},R=()=>{const z=new Date(new Date().setDate(new Date().getDate()-1));return{startDate:z,endDate:z}},O=()=>{const z=new Date;z.setDate(z.getDate()-(7+z.getDay()));const H=new Date;return H.setDate(H.getDate()-(H.getDay()+1)),{startDate:z,endDate:H}},j=()=>{const z=new Date,H=new Date(z.getFullYear(),z.getMonth()-1,1),X=new Date(z.getFullYear(),z.getMonth(),0);return{startDate:H,endDate:X}},V=()=>{const z=new Date(new Date().getFullYear()-1,0,1),H=new Date(new Date().getFullYear()-1,11,31);return{startDate:z,endDate:H}},W=(z,H,X)=>{var te;if(A(z),typeof c=="function"){let ie=z;x==="string"&&z?ie={startDate:qo(z.startDate,x),endDate:qo(z.endDate,x)}:typeof x=="boolean"&&z&&(ie={startDate:qo(z.startDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),endDate:qo(z.endDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")}),(te=E.current)==null||te.setShow(!1),c(ie,H??"",X)}},U=(z,H)=>{B(z);let X;if((z==null?void 0:z.key)!=="custom"){switch(S(z),z==null?void 0:z.key){case"thisDay":X=F();break;case"thisWeek":X=k();break;case"thisMonth":X=P();break;case"thisYear":X=$();break;case"yesterday":X=R();break;case"lastWeek":X=O();break;case"lastMonth":X=j();break;case"lastYear":X=V();break}X&&H&&W({startDate:T(X.startDate,"start"),endDate:T(X.endDate,"end")},z==null?void 0:z.value,z)}},K=(z,H)=>{const X=(l??C).find(te=>te.key===z);!z&&!X?(H&&W(),U(void 0,H),S(void 0)):typeof z=="object"?(H&&W({startDate:T(z.startDate,"start"),endDate:T(z.endDate,"end")},"Kustom",{key:"custom",value:"Kustom"}),U({key:"custom",value:"Kustom"},H),S({key:"custom",value:"Kustom"})):(U(X,H),S(X))},ee=()=>{var z;if(e){A(e);const H=(z=l??C)==null?void 0:z.find(X=>X.key===e.label||X.value===e.label);Object.keys(H||{}).length>0&&B(H)}else B(void 0),S(void 0)};return I.useEffect(()=>{ee()},[JSON.stringify(e)]),I.useEffect(()=>{K(m??e,v)},[]),_.jsxs(_.Fragment,{children:[_.jsxs("div",{onClick:z=>{var H;(H=E.current)==null||H.handlerShow(z),ee()},className:o,id:h,children:[I.isValidElement(s)&&s,typeof s=="function"?s(D,y):"Pilih Filter"]}),_.jsx(gi,{zIndex:p,ref:E,offset:g,id:d,floatingOptions:{placement:"bottom-end",...f},children:_.jsxs("div",{className:`${Pe["container-filter-date"]} ${a}`,children:[_.jsxs("div",{children:[(l??C).map((z,H)=>_.jsx("div",{className:`${Pe["button-filter-date"]} hover:1ru-bg-laba-blue-01 ${(w==null?void 0:w.key)===z.key?"1ru-text-laba-blue-10":""}`,onClick:()=>U(z,!0),children:z.value},H)),(w==null?void 0:w.key)!=="custom"&&_.jsx(_.Fragment,{children:typeof r=="function"?_.jsx("div",{className:Pe["button-filter-date-custome"],onClick:()=>K(m,!0),children:r()}):_.jsx(jn,{className:Pe["button-reset-filter-date"],variants:"nude-laba-blue-10",size:"small",onClick:()=>K(m,!0),children:"Reset"})})]}),(w==null?void 0:w.key)==="custom"&&_.jsx("div",{children:_.jsx(Gw,{defaultValue:D,value:D,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,isCustomTime:b,onChange:z=>{W(z,"Kustom",{key:"custom",value:"Kustom"}),S({key:"custom",value:"Kustom"})},onReset:()=>{K(m,!0)},typePicker:u,withConfirm:!0})})]})})]})},vH="_active_1fa6e_506",yH="_disabled_1fa6e_509",Kt={"title-switch-payhere":"_title-switch-payhere_1fa6e_73","description-switch-payhere":"_description-switch-payhere_1fa6e_109","title-switch-laba":"_title-switch-laba_1fa6e_247","description-switch-laba":"_description-switch-laba_1fa6e_271","title-switch-bill":"_title-switch-bill_1fa6e_385","description-switch-bill":"_description-switch-bill_1fa6e_421","switch-l":"_switch-l_1fa6e_493","switch-payhere":"_switch-payhere_1fa6e_493",active:vH,disabled:yH,"disabled-nonactive":"_disabled-nonactive_1fa6e_512","thumb-switch":"_thumb-switch_1fa6e_515","switch-laba":"_switch-laba_1fa6e_532","switch-bill":"_switch-bill_1fa6e_571","switch-r":"_switch-r_1fa6e_611","switch-s":"_switch-s_1fa6e_729"},oc={size:{large:Kt["switch-l"],regular:Kt["switch-r"],small:Kt["switch-s"]},kind:{laba:Kt["switch-laba"],payhere:Kt["switch-payhere"],bill:Kt["switch-bill"]},text:{title:{laba:Kt["title-switch-laba"],payhere:Kt["title-switch-payhere"],bill:Kt["title-switch-bill"]},desc:{laba:Kt["description-switch-laba"],payhere:Kt["description-switch-payhere"],bill:Kt["description-switch-bill"]}}},xH=({value:e,disabled:t,title:n="",description:r="",size:i="regular",kind:a="payhere",id:o,className:s,classNameTitle:l,classNameDesc:u,onChange:c})=>{const d=()=>{!t&&typeof c=="function"&&c(!e)};return _.jsxs("div",{className:`1ru-flex 1ru-gap-2 ${s??""}`,onClick:h=>h.stopPropagation(),children:[_.jsxs("label",{children:[_.jsx("input",{id:o??"1ru-switch",type:"checkbox",checked:e,onChange:d,className:"1ru-hidden"}),_.jsx("span",{className:`${oc.size[i]} ${oc.kind[a]} ${e?Kt.active:""} ${t?Kt.disabled:""} ${!e&&t?Kt["disabled-nonactive"]:""}`,children:_.jsx("span",{className:`${Kt["thumb-switch"]} ${e?Kt.active:""} ${t?Kt.disabled:""} ${!e&&t?Kt["disabled-nonactive"]:""}`})})]}),(n||r)&&_.jsxs("div",{children:[n&&_.jsx("div",{className:`${oc.text.title[a]} ${l}`,children:n}),r&&_.jsx("div",{className:`${oc.text.desc[a]} ${u}`,children:r})]})]})},CH="_loading_b0du1_482",Ne={"button-l":"_button-l_b0du1_67","button-m":"_button-m_b0du1_67","button-s":"_button-s_b0du1_115","button-xs":"_button-xs_b0du1_115","button-large":"_button-large_b0du1_241","button-reguler":"_button-reguler_b0du1_241","button-small":"_button-small_b0du1_259","button-extra-small":"_button-extra-small_b0du1_259","button-bill-l":"_button-bill-l_b0du1_379","button-bill-m":"_button-bill-m_b0du1_379","button-bill-s":"_button-bill-s_b0du1_427","button-bill-xs":"_button-bill-xs_b0du1_427","button-bill-xxs":"_button-bill-xxs_b0du1_427",loading:CH,"nude-laba-red-05":"_nude-laba-red-05_b0du1_497","nude-laba-red-10":"_nude-laba-red-10_b0du1_497","nude-gray-500":"_nude-gray-500_b0du1_497","nude-green-700":"_nude-green-700_b0du1_497","nude-red-700":"_nude-red-700_b0du1_497","nude-laba-blue-10":"_nude-laba-blue-10_b0du1_497","ghost-laba-green-10":"_ghost-laba-green-10_b0du1_497","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_b0du1_497","ghost-green-700":"_ghost-green-700_b0du1_497","ghost-red-700":"_ghost-red-700_b0du1_497","ghost-laba-blue-10":"_ghost-laba-blue-10_b0du1_497","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_b0du1_497","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_b0du1_497","primary-green-700-dsb_laba-grey-06":"_primary-green-700-dsb_laba-grey-06_b0du1_497","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_b0du1_497","primary-laba-blue-10":"_primary-laba-blue-10_b0du1_497","primary-bill-red-700":"_primary-bill-red-700_b0du1_497","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_b0du1_497","secondary-bill-secondary-800":"_secondary-bill-secondary-800_b0du1_497","primary-bill-primary-600":"_primary-bill-primary-600_b0du1_497","tertiary-gray-500":"_tertiary-gray-500_b0du1_497","tertiary-red-600":"_tertiary-red-600_b0du1_497","tertiary-red-300":"_tertiary-red-300_b0du1_497","tertiary-blue-700":"_tertiary-blue-700_b0du1_497","secondary-green-600":"_secondary-green-600_b0du1_497","secondary-red-700":"_secondary-red-700_b0du1_497","secondary-red-600":"_secondary-red-600_b0du1_497","secondary-blue-700":"_secondary-blue-700_b0du1_497","primary-red-700":"_primary-red-700_b0du1_497","primary-blue-700":"_primary-blue-700_b0du1_497","icon-loading":"_icon-loading_b0du1_595"},Uh={size:{large:Ne["button-large"],reguler:Ne["button-reguler"],small:Ne["button-small"],"extra-small":Ne["button-extra-small"],l:Ne["button-l"],m:Ne["button-m"],s:Ne["button-s"],xs:Ne["button-xs"],"bill-l":Ne["button-bill-l"],"bill-m":Ne["button-bill-m"],"bill-s":Ne["button-bill-s"],"bill-xs":Ne["button-bill-xs"],"bill-xxs":Ne["button-bill-xxs"]},loadingSize:{large:"1ru-size-6",reguler:"1ru-size-5",small:"1ru-size-5","extra-small":"1ru-size-5",l:"1ru-size-6",m:"1ru-size-5",s:"1ru-size-5",xs:"1ru-size-5","bill-l":"1ru-size-6","bill-m":"1ru-size-5","bill-s":"1ru-size-5","bill-xs":"1ru-size-5","bill-xxs":"1ru-size-5"},variants:{"primary-laba-blue-10":Ne["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Ne["primary-red-700-dsb_laba-grey-06"],"primary-green-700-dsb_laba-grey-06":Ne["primary-green-700-dsb_laba-grey-06"],"filled-laba-white_laba-blue-10":Ne["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Ne["filled-laba-white_laba-red-05"],"ghost-laba-blue-10":Ne["ghost-laba-blue-10"],"ghost-red-700":Ne["ghost-red-700"],"ghost-green-700":Ne["ghost-green-700"],"ghost-laba-green-10":Ne["ghost-laba-green-10"],"nude-laba-blue-10":Ne["nude-laba-blue-10"],"nude-red-700":Ne["nude-red-700"],"nude-green-700":Ne["nude-green-700"],"nude-gray-500":Ne["nude-gray-500"],"primary-blue-700":Ne["primary-blue-700"],"secondary-blue-700":Ne["secondary-blue-700"],"tertiary-blue-700":Ne["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Ne["ghost-blue-gray-100-bg_white"],"secondary-red-600":Ne["secondary-red-600"],"tertiary-red-300":Ne["tertiary-red-300"],"tertiary-gray-500":Ne["tertiary-gray-500"],"tertiary-red-600":Ne["tertiary-red-600"],"secondary-green-600":Ne["secondary-green-600"],"nude-laba-red-10":Ne["nude-laba-red-10"],"nude-laba-red-05":Ne["nude-laba-red-05"],"primary-red-700":Ne["primary-red-700"],"secondary-red-700":Ne["secondary-red-700"],"primary-bill-primary-600":Ne["primary-bill-primary-600"],"secondary-bill-secondary-800":Ne["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Ne["tertiary-bill-secondary-800"],"primary-bill-red-700":Ne["primary-bill-red-700"]}},EH=({className:e=""})=>_.jsx("svg",{className:`${Ne["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:_.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
107
107
|
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629 \r
|
|
108
108
|
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861 \r
|
|
109
109
|
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514 \r
|
|
@@ -139,7 +139,7 @@ You should wrap it with \`css\` like this:
|
|
|
139
139
|
Prefix can't start with '-' when allowNegative is true.
|
|
140
140
|
prefix: `+i+`
|
|
141
141
|
allowNegative: `+a+`
|
|
142
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function gj(e){e=hj(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Bi);var a=e.onBlur;a===void 0&&(a=Bi);var o=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var c=e.defaultValue,d=e.value,h=e.valueIsNumericString,f=e.onValueChange,g=Mm(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=Of(e),m=p.decimalSeparator,b=p.allowedDecimalSeparators,v=function($){return sy($,e)},x=function($,R){return dj($,R,e)},C=lo(d)?c:d,E=h??cj(C,u,t);lo(d)?lo(c)||(E=E||typeof c=="number"):E=E||typeof d=="number";var w=function($){return t5($)?$:(typeof $=="number"&&($=i5($)),E&&typeof s=="number"?oy($,s,!!l):$)},B=l5(w(d),w(c),!!E,v,x,f),y=B[0],S=y.numAsString,D=y.formattedValue,A=B[1],T=function($){var R=$.target,O=$.key,j=R.selectionStart,V=R.selectionEnd,W=R.value;if(W===void 0&&(W=""),(O==="Backspace"||O==="Delete")&&V<u.length){$.preventDefault();return}if(j!==V){i($);return}O==="Backspace"&&W[0]==="-"&&j===u.length+1&&n&&ra(R,1),s&&l&&(O==="Backspace"&&W[j-1]===m?(ra(R,j-1),$.preventDefault()):O==="Delete"&&W[j]===m&&$.preventDefault()),b!=null&&b.includes(O)&&W[j]===m&&ra(R,j+1);var U=o===!0?",":o;O==="Backspace"&&W[j-1]===U&&ra(R,j-1),O==="Delete"&&W[j]===U&&ra(R,j+1),i($)},F=function($){var R=S;if(R.match(/\d/g)||(R=""),r||(R=QH(R)),l&&s&&(R=oy(R,s,l)),R!==S){var O=sy(R,e);A({formattedValue:O,value:R,floatValue:parseFloat(R)},{event:$,source:eu.event})}a($)},k=function($){return $===m?!0:yo($)},P=function($){var R=$.currentValue,O=$.lastValue,j=$.formattedValue,V=$.currentValueIndex,W=$.formattedValueIndex,U=R[V],K=j[W],ee=a5(O,R),z=ee.to;return V>=z.start&&V<z.end&&b&&b.includes(U)&&K===m?!0:U===K};return Object.assign(Object.assign({},g),{value:D,valueIsNumericString:!1,isValidInputCharacter:k,isCharacterSame:P,onValueChange:A,format:v,removeFormatting:x,getCaretBoundary:function($){return fj($,e)},onKeyDown:T,onBlur:F})}function pj(e){var t=gj(e);return I.createElement(u5,Object.assign({},t))}function mj(e,t){var n=t.format,r=t.allowEmptyFormatting,i=t.mask,a=t.patternChar;if(a===void 0&&(a="#"),e===""&&!r)return"";for(var o=0,s=n.split(""),l=0,u=n.length;l<u;l++)n[l]===a&&(s[l]=e[o]||s5(i,o),o+=1);return s.join("")}function bj(e,t,n){t===void 0&&(t=o5(e));var r=n.format,i=n.patternChar;i===void 0&&(i="#");var a=t.from,o=t.to,s=t.lastValue;s===void 0&&(s="");var l=function(m){return r[m]===i},u=function(m,b){for(var v="",x=0;x<m.length;x++)l(b+x)&&yo(m[x])&&(v+=m[x]);return v},c=function(m){return m.replace(/[^0-9]/g,"")};if(!r.match(/\d/))return c(e);if((s===""||a.end-a.start===s.length)&&e.length===r.length){for(var d="",h=0;h<e.length;h++)if(l(h))yo(e[h])&&(d+=e[h]);else if(e[h]!==r[h])return c(e);return d}var f=s.substring(0,a.start),g=e.substring(o.start,o.end),p=s.substring(a.end);return""+u(f,0)+c(g)+u(p,a.end)}function vj(e,t){var n=t.format,r=t.mask,i=t.patternChar;i===void 0&&(i="#");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=0,s=-1,l={};n.split("").forEach(function(h,f){var g=void 0;h===i&&(o++,g=s5(r,o-1),s===-1&&e[f]===g&&(s=f)),l[f]=g});for(var u=function(h){return n[h]===i&&e[h]!==l[h]},c=0,d=a.length;c<d;c++)a[c]=c===s||u(c)||u(c-1);return a[n.indexOf(i)]=!0,a}function yj(e){var t=e.mask;if(t){var n=t==="string"?t:t.toString();if(n.match(/\d/g))throw new Error("Mask "+t+" should not contain numeric character;")}}function xj(e,t){return e===""?!0:!(t!=null&&t.match(/\d/))&&typeof e=="string"&&(!!e.match(/^\d+$/)||e==="")}function Cj(e){e.mask,e.allowEmptyFormatting;var t=e.format,n=e.inputMode;n===void 0&&(n="numeric");var r=e.onKeyDown;r===void 0&&(r=Bi);var i=e.patternChar;i===void 0&&(i="#");var a=e.value,o=e.defaultValue,s=e.valueIsNumericString,l=Mm(e,["mask","allowEmptyFormatting","format","inputMode","onKeyDown","patternChar","value","defaultValue","valueIsNumericString"]);yj(e);var u=function(g){return vj(g,e)},c=function(g){var p=g.key,m=g.target,b=m.selectionStart,v=m.selectionEnd,x=m.value;if(b!==v){r(g);return}var C=b;if(p==="Backspace"||p==="Delete"){var E="right";if(p==="Backspace"){for(;C>0&&t[C-1]!==i;)C--;E="left"}else{for(var w=t.length;C<w&&t[C]!==i;)C++;E="right"}C=Hd(x,C,u(x),E)}else t[C]!==i&&p!=="ArrowLeft"&&p!=="ArrowRight"&&(C=Hd(x,C+1,u(x),"right"));C!==b&&ra(m,C),r(g)},d=lo(a)?o:a,h=s??xj(d,t),f=Object.assign(Object.assign({},e),{valueIsNumericString:h});return Object.assign(Object.assign({},l),{value:a,defaultValue:o,valueIsNumericString:h,inputMode:n,format:function(g){return mj(g,f)},removeFormatting:function(g,p){return bj(g,p,f)},getCaretBoundary:u,onKeyDown:c})}function Ej(e){var t=Cj(e);return I.createElement(u5,Object.assign({},t))}const Sj=({max:e,min:t,selectedText:n="Rp0",onChange:r,onFocusInput:i,...a})=>_.jsx(pj,{isAllowed:o=>e!==void 0&&ci(e)&&$t(o.value).isGreaterThan(e)?(typeof r=="function"&&r({target:{value:$t(e).toString()}}),!1):t!==void 0&&ci(t)&&$t(o.value).isLessThan(t)?(typeof r=="function"&&r({target:{value:$t(t).toString()}}),!1):!0,onValueChange:(o,{source:s})=>{typeof r=="function"&&s.includes("event")&&r({target:{value:o.value}})},decimalSeparator:",",thousandSeparator:".",decimalScale:2,valueIsNumericString:!0,thousandsGroupStyle:"thousand",onFocus:o=>{var s;((s=o==null?void 0:o.target)==null?void 0:s.value)===n&&(typeof i=="function"?i(""):typeof r=="function"&&r({target:{value:""}}))},...a}),Om=({children:e,containerId:t="portal-root",selector:n})=>{const[r,i]=I.useState(null);return I.useEffect(()=>{let a=n?document.querySelector(n):document.getElementById(t),o=!1;return a||(a=document.createElement("div"),a.id=t,document.body.appendChild(a),o=!0),i(a),()=>{o&&a&&document.body.removeChild(a)}},[t,n]),r?cu.createPortal(e,r):null},wj={"button-remove":"_button-remove_lgwgf_1"},Ij=()=>_.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 6.74871 13.9891 6.83619 13.9542 6.91753C13.9192 6.99886 13.8684 7.07243 13.8048 7.13392L10.9428 9.99592L13.8048 12.8579C13.9262 12.9837 13.9934 13.1521 13.9919 13.3269C13.9904 13.5017 13.9203 13.6689 13.7966 13.7925C13.673 13.9161 13.5058 13.9862 13.331 13.9877C13.1562 13.9892 12.9878 13.922 12.8621 13.8006L10.0001 10.9386L7.1381 13.8006C7.01237 13.922 6.84397 13.9892 6.66917 13.9877C6.49437 13.9862 6.32716 13.9161 6.20356 13.7925C6.07995 13.6689 6.00984 13.5017 6.00832 13.3269C6.0068 13.1521 6.074 12.9837 6.19544 12.8579L9.05744 9.99592L6.19544 7.13392C6.07045 7.00891 6.00024 6.83937 6.00024 6.66259C6.00024 6.48581 6.07045 6.31628 6.19544 6.19126Z",fill:"#212121"})}),_j=()=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:_.jsx("path",{d:"M2 11.3334V4.66671C2 4.31309 2.14048 3.97395 2.39052 3.7239C2.64057 3.47385 2.97971 3.33337 3.33333 3.33337H7.33333L8.66667 4.66671H12.6667C13.0203 4.66671 13.3594 4.80718 13.6095 5.05723C13.8595 5.30728 14 5.64642 14 6.00004V11.3334C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3334Z",stroke:"#9E9E9E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),c5=e=>{const t=I.useRef(null),{fileName:n,onChange:r,maxFile:i,maxSize:a=2,validateFile:o,error:s,label:l,inputProps:u,priorityError:c="external",eventError:d}=e,h=o||["image/png","image/jpeg","image/jpg"],[f,g]=I.useState(""),p={internal:f||s,external:s||f},m=x=>{if(x!=null&&x.length){const C=x[0],E=C.size/1024/1024;let w="";if(h.some(B=>{var y;return(y=x[0].type)==null?void 0:y.includes(B)})?E>a?w=`${x.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${a}MB.`:r(C):w="Berkas tidak didukung, silahkan pilih file kembali.",g(w),d==null||d(w),!(t!=null&&t.current))return;t.current.value=""}},b=x=>{var C;x.preventDefault(),t!=null&&t.current&&((C=t.current)==null||C.click())},v=x=>{x.preventDefault(),t!=null&&t.current&&(r(null),t.current.value="")};return _.jsxs(_.Fragment,{children:[_.jsx("input",{accept:h==null?void 0:h.join(", "),ref:t,hidden:!0,type:"file",max:i,onChange:x=>{m(x.target.files)}}),_.jsx(Bp,{sizeInput:"medium",placeholder:"Pilih Berkas",label:l,value:n,readOnly:!0,onClick:x=>b(x),startIcon:_.jsx(_j,{}),endIcon:n&&_.jsx("div",{className:wj["button-remove"],onClick:x=>v(x),children:_.jsx(Ij,{})}),error:p[c],...u})]})};c5.displayName="UploadFile";const Dj=({children:e,maxWidth:t,moreElement:n,style:r={},className:i,gap:a=0,gapStyle:o,...s})=>{const l=I.useMemo(()=>I.Children.toArray(e),[e]),u=l.length,[c,d]=I.useState(u),h=I.useRef(null),f=I.useRef([]),g=I.useRef(null);f.current=[];const p=()=>{const x=h.current,C=g.current;if(!x||x.offsetWidth===0)return;const E=x.offsetWidth,w=f.current.map(k=>k?k.offsetWidth:0),B=w.reduce((k,P)=>k+P,0),y=Math.max(0,u-1)*a;if(B+y<=E){d(u);return}const D=C?C.offsetWidth+a:0,A=E-D;let T=0,F=0;for(let k=0;k<u;k++){const P=w[k],$=k>0?a:0;if(T+P+$>A)break;T+=P+$,F++}d(F)};I.useLayoutEffect(()=>{p();const x=new ResizeObserver(p);return h.current&&x.observe(h.current),()=>{x.disconnect()}},[l,a]);const m=u-c,b={display:"flex",flexWrap:"nowrap",alignItems:"center",overflow:"hidden",gap:o??`${a}px`,maxWidth:t,minHeight:"38px",...r},v={position:"fixed",top:"-9999px",left:"-9999px",visibility:"hidden",pointerEvents:"none",zIndex:-1,display:"flex",flexWrap:"nowrap",alignItems:"center",gap:o??`${a}px`};return _.jsxs(_.Fragment,{children:[_.jsxs("div",{ref:h,style:b,className:i??"",...s,children:[l.slice(0,c),m>0&&n(m)]}),_.jsxs("div",{style:v,"aria-hidden":"true",children:[l.map((x,C)=>I.cloneElement(x,{ref:E=>f.current[C]=E,key:`measure-${x.key||C}`})),u>0&&_.jsx("span",{ref:g,children:n(u)})]})]})},Aj="_container_1t9z5_133",Tj="_image_1t9z5_133",Ci={container:Aj,"image-content":"_image-content_1t9z5_133","text-desc":"_text-desc_1t9z5_133","action-content":"_action-content_1t9z5_133","text-error":"_text-error_1t9z5_133",image:Tj,"button-content":"_button-content_1t9z5_515"},Rj=({className:e})=>_.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:`1ru-h-5 1ru-w-5 1ru-text-red-600 ${e??""}`,fill:"currentColor",children:_.jsx("g",{id:"x",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:`M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 \r
|
|
142
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function gj(e){e=hj(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Bi);var a=e.onBlur;a===void 0&&(a=Bi);var o=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var c=e.defaultValue,d=e.value,h=e.valueIsNumericString,f=e.onValueChange,g=Mm(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=Of(e),m=p.decimalSeparator,b=p.allowedDecimalSeparators,v=function($){return sy($,e)},x=function($,R){return dj($,R,e)},C=lo(d)?c:d,E=h??cj(C,u,t);lo(d)?lo(c)||(E=E||typeof c=="number"):E=E||typeof d=="number";var w=function($){return t5($)?$:(typeof $=="number"&&($=i5($)),E&&typeof s=="number"?oy($,s,!!l):$)},B=l5(w(d),w(c),!!E,v,x,f),y=B[0],S=y.numAsString,D=y.formattedValue,A=B[1],T=function($){var R=$.target,O=$.key,j=R.selectionStart,V=R.selectionEnd,W=R.value;if(W===void 0&&(W=""),(O==="Backspace"||O==="Delete")&&V<u.length){$.preventDefault();return}if(j!==V){i($);return}O==="Backspace"&&W[0]==="-"&&j===u.length+1&&n&&ra(R,1),s&&l&&(O==="Backspace"&&W[j-1]===m?(ra(R,j-1),$.preventDefault()):O==="Delete"&&W[j]===m&&$.preventDefault()),b!=null&&b.includes(O)&&W[j]===m&&ra(R,j+1);var U=o===!0?",":o;O==="Backspace"&&W[j-1]===U&&ra(R,j-1),O==="Delete"&&W[j]===U&&ra(R,j+1),i($)},F=function($){var R=S;if(R.match(/\d/g)||(R=""),r||(R=QH(R)),l&&s&&(R=oy(R,s,l)),R!==S){var O=sy(R,e);A({formattedValue:O,value:R,floatValue:parseFloat(R)},{event:$,source:eu.event})}a($)},k=function($){return $===m?!0:yo($)},P=function($){var R=$.currentValue,O=$.lastValue,j=$.formattedValue,V=$.currentValueIndex,W=$.formattedValueIndex,U=R[V],K=j[W],ee=a5(O,R),z=ee.to;return V>=z.start&&V<z.end&&b&&b.includes(U)&&K===m?!0:U===K};return Object.assign(Object.assign({},g),{value:D,valueIsNumericString:!1,isValidInputCharacter:k,isCharacterSame:P,onValueChange:A,format:v,removeFormatting:x,getCaretBoundary:function($){return fj($,e)},onKeyDown:T,onBlur:F})}function pj(e){var t=gj(e);return I.createElement(u5,Object.assign({},t))}function mj(e,t){var n=t.format,r=t.allowEmptyFormatting,i=t.mask,a=t.patternChar;if(a===void 0&&(a="#"),e===""&&!r)return"";for(var o=0,s=n.split(""),l=0,u=n.length;l<u;l++)n[l]===a&&(s[l]=e[o]||s5(i,o),o+=1);return s.join("")}function bj(e,t,n){t===void 0&&(t=o5(e));var r=n.format,i=n.patternChar;i===void 0&&(i="#");var a=t.from,o=t.to,s=t.lastValue;s===void 0&&(s="");var l=function(m){return r[m]===i},u=function(m,b){for(var v="",x=0;x<m.length;x++)l(b+x)&&yo(m[x])&&(v+=m[x]);return v},c=function(m){return m.replace(/[^0-9]/g,"")};if(!r.match(/\d/))return c(e);if((s===""||a.end-a.start===s.length)&&e.length===r.length){for(var d="",h=0;h<e.length;h++)if(l(h))yo(e[h])&&(d+=e[h]);else if(e[h]!==r[h])return c(e);return d}var f=s.substring(0,a.start),g=e.substring(o.start,o.end),p=s.substring(a.end);return""+u(f,0)+c(g)+u(p,a.end)}function vj(e,t){var n=t.format,r=t.mask,i=t.patternChar;i===void 0&&(i="#");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=0,s=-1,l={};n.split("").forEach(function(h,f){var g=void 0;h===i&&(o++,g=s5(r,o-1),s===-1&&e[f]===g&&(s=f)),l[f]=g});for(var u=function(h){return n[h]===i&&e[h]!==l[h]},c=0,d=a.length;c<d;c++)a[c]=c===s||u(c)||u(c-1);return a[n.indexOf(i)]=!0,a}function yj(e){var t=e.mask;if(t){var n=t==="string"?t:t.toString();if(n.match(/\d/g))throw new Error("Mask "+t+" should not contain numeric character;")}}function xj(e,t){return e===""?!0:!(t!=null&&t.match(/\d/))&&typeof e=="string"&&(!!e.match(/^\d+$/)||e==="")}function Cj(e){e.mask,e.allowEmptyFormatting;var t=e.format,n=e.inputMode;n===void 0&&(n="numeric");var r=e.onKeyDown;r===void 0&&(r=Bi);var i=e.patternChar;i===void 0&&(i="#");var a=e.value,o=e.defaultValue,s=e.valueIsNumericString,l=Mm(e,["mask","allowEmptyFormatting","format","inputMode","onKeyDown","patternChar","value","defaultValue","valueIsNumericString"]);yj(e);var u=function(g){return vj(g,e)},c=function(g){var p=g.key,m=g.target,b=m.selectionStart,v=m.selectionEnd,x=m.value;if(b!==v){r(g);return}var C=b;if(p==="Backspace"||p==="Delete"){var E="right";if(p==="Backspace"){for(;C>0&&t[C-1]!==i;)C--;E="left"}else{for(var w=t.length;C<w&&t[C]!==i;)C++;E="right"}C=Hd(x,C,u(x),E)}else t[C]!==i&&p!=="ArrowLeft"&&p!=="ArrowRight"&&(C=Hd(x,C+1,u(x),"right"));C!==b&&ra(m,C),r(g)},d=lo(a)?o:a,h=s??xj(d,t),f=Object.assign(Object.assign({},e),{valueIsNumericString:h});return Object.assign(Object.assign({},l),{value:a,defaultValue:o,valueIsNumericString:h,inputMode:n,format:function(g){return mj(g,f)},removeFormatting:function(g,p){return bj(g,p,f)},getCaretBoundary:u,onKeyDown:c})}function Ej(e){var t=Cj(e);return I.createElement(u5,Object.assign({},t))}const Sj=({max:e,min:t,selectedText:n="Rp0",onChange:r,onFocusInput:i,...a})=>_.jsx(pj,{isAllowed:o=>e!==void 0&&ci(e)&&At(o.value).isGreaterThan(e)?(typeof r=="function"&&r({target:{value:At(e).toString()}}),!1):t!==void 0&&ci(t)&&At(o.value).isLessThan(t)?(typeof r=="function"&&r({target:{value:At(t).toString()}}),!1):!0,onValueChange:(o,{source:s})=>{typeof r=="function"&&s.includes("event")&&r({target:{value:o.value}})},decimalSeparator:",",thousandSeparator:".",decimalScale:2,valueIsNumericString:!0,thousandsGroupStyle:"thousand",onFocus:o=>{var s;((s=o==null?void 0:o.target)==null?void 0:s.value)===n&&(typeof i=="function"?i(""):typeof r=="function"&&r({target:{value:""}}))},...a}),Om=({children:e,containerId:t="portal-root",selector:n})=>{const[r,i]=I.useState(null);return I.useEffect(()=>{let a=n?document.querySelector(n):document.getElementById(t),o=!1;return a||(a=document.createElement("div"),a.id=t,document.body.appendChild(a),o=!0),i(a),()=>{o&&a&&document.body.removeChild(a)}},[t,n]),r?cu.createPortal(e,r):null},wj={"button-remove":"_button-remove_lgwgf_1"},Ij=()=>_.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 6.74871 13.9891 6.83619 13.9542 6.91753C13.9192 6.99886 13.8684 7.07243 13.8048 7.13392L10.9428 9.99592L13.8048 12.8579C13.9262 12.9837 13.9934 13.1521 13.9919 13.3269C13.9904 13.5017 13.9203 13.6689 13.7966 13.7925C13.673 13.9161 13.5058 13.9862 13.331 13.9877C13.1562 13.9892 12.9878 13.922 12.8621 13.8006L10.0001 10.9386L7.1381 13.8006C7.01237 13.922 6.84397 13.9892 6.66917 13.9877C6.49437 13.9862 6.32716 13.9161 6.20356 13.7925C6.07995 13.6689 6.00984 13.5017 6.00832 13.3269C6.0068 13.1521 6.074 12.9837 6.19544 12.8579L9.05744 9.99592L6.19544 7.13392C6.07045 7.00891 6.00024 6.83937 6.00024 6.66259C6.00024 6.48581 6.07045 6.31628 6.19544 6.19126Z",fill:"#212121"})}),_j=()=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:_.jsx("path",{d:"M2 11.3334V4.66671C2 4.31309 2.14048 3.97395 2.39052 3.7239C2.64057 3.47385 2.97971 3.33337 3.33333 3.33337H7.33333L8.66667 4.66671H12.6667C13.0203 4.66671 13.3594 4.80718 13.6095 5.05723C13.8595 5.30728 14 5.64642 14 6.00004V11.3334C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3334Z",stroke:"#9E9E9E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),c5=e=>{const t=I.useRef(null),{fileName:n,onChange:r,maxFile:i,maxSize:a=2,validateFile:o,error:s,label:l,inputProps:u,priorityError:c="external",eventError:d}=e,h=o||["image/png","image/jpeg","image/jpg"],[f,g]=I.useState(""),p={internal:f||s,external:s||f},m=x=>{if(x!=null&&x.length){const C=x[0],E=C.size/1024/1024;let w="";if(h.some(B=>{var y;return(y=x[0].type)==null?void 0:y.includes(B)})?E>a?w=`${x.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${a}MB.`:r(C):w="Berkas tidak didukung, silahkan pilih file kembali.",g(w),d==null||d(w),!(t!=null&&t.current))return;t.current.value=""}},b=x=>{var C;x.preventDefault(),t!=null&&t.current&&((C=t.current)==null||C.click())},v=x=>{x.preventDefault(),t!=null&&t.current&&(r(null),t.current.value="")};return _.jsxs(_.Fragment,{children:[_.jsx("input",{accept:h==null?void 0:h.join(", "),ref:t,hidden:!0,type:"file",max:i,onChange:x=>{m(x.target.files)}}),_.jsx(Bp,{sizeInput:"medium",placeholder:"Pilih Berkas",label:l,value:n,readOnly:!0,onClick:x=>b(x),startIcon:_.jsx(_j,{}),endIcon:n&&_.jsx("div",{className:wj["button-remove"],onClick:x=>v(x),children:_.jsx(Ij,{})}),error:p[c],...u})]})};c5.displayName="UploadFile";const Dj=({children:e,maxWidth:t,moreElement:n,style:r={},className:i,gap:a=0,gapStyle:o,...s})=>{const l=I.useMemo(()=>I.Children.toArray(e),[e]),u=l.length,[c,d]=I.useState(u),h=I.useRef(null),f=I.useRef([]),g=I.useRef(null);f.current=[];const p=()=>{const x=h.current,C=g.current;if(!x||x.offsetWidth===0)return;const E=x.offsetWidth,w=f.current.map(k=>k?k.offsetWidth:0),B=w.reduce((k,P)=>k+P,0),y=Math.max(0,u-1)*a;if(B+y<=E){d(u);return}const D=C?C.offsetWidth+a:0,A=E-D;let T=0,F=0;for(let k=0;k<u;k++){const P=w[k],$=k>0?a:0;if(T+P+$>A)break;T+=P+$,F++}d(F)};I.useLayoutEffect(()=>{p();const x=new ResizeObserver(p);return h.current&&x.observe(h.current),()=>{x.disconnect()}},[l,a]);const m=u-c,b={display:"flex",flexWrap:"nowrap",alignItems:"center",overflow:"hidden",gap:o??`${a}px`,maxWidth:t,minHeight:"38px",...r},v={position:"fixed",top:"-9999px",left:"-9999px",visibility:"hidden",pointerEvents:"none",zIndex:-1,display:"flex",flexWrap:"nowrap",alignItems:"center",gap:o??`${a}px`};return _.jsxs(_.Fragment,{children:[_.jsxs("div",{ref:h,style:b,className:i??"",...s,children:[l.slice(0,c),m>0&&n(m)]}),_.jsxs("div",{style:v,"aria-hidden":"true",children:[l.map((x,C)=>I.cloneElement(x,{ref:E=>f.current[C]=E,key:`measure-${x.key||C}`})),u>0&&_.jsx("span",{ref:g,children:n(u)})]})]})},Aj="_container_1t9z5_133",Tj="_image_1t9z5_133",Ci={container:Aj,"image-content":"_image-content_1t9z5_133","text-desc":"_text-desc_1t9z5_133","action-content":"_action-content_1t9z5_133","text-error":"_text-error_1t9z5_133",image:Tj,"button-content":"_button-content_1t9z5_515"},Rj=({className:e})=>_.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:`1ru-h-5 1ru-w-5 1ru-text-red-600 ${e??""}`,fill:"currentColor",children:_.jsx("g",{id:"x",children:_.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:`M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 \r
|
|
143
143
|
6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 \r
|
|
144
144
|
5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 \r
|
|
145
145
|
6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 \r
|
|
@@ -189,7 +189,7 @@ You should wrap it with \`css\` like this:
|
|
|
189
189
|
${(d.step??f)<=e?Gr.active:""}`,style:{maxWidth:h+1===(t==null?void 0:t.length)||h===0?(n-30)*2:n-30,marginRight:h+1===(t==null?void 0:t.length)?-(n/2):0,marginLeft:h===0?-(n/2):0},children:d.desc})]},h)})});To.register(ws,Is,fo,ai,rI,uu,tI);const OX=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},VX=({data:e,className:t,height:n=65})=>{const r=I.useRef(null),i=e.map(h=>wl(OX(1,h.label,h.year),"MMM yy",{locale:Yc}))||[],[a,o]=I.useState(""),[s,l]=I.useState(""),u=h=>{const f=[],g=[];let p=!h.find(m=>m.isCurrent);return h.forEach(m=>{p?(g.push(m.value),f.push(null)):(f.push(m.value),m.isCurrent?(p=!0,g.push(m.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function p(b){return b.lines}if(g.body){const b=g.title||[];let v=g.body.map(p),x="<thead>";b.forEach(E=>{let w="";w+="display: flex",w+="; justify-content: center",w+="; font-weight: 600",w+="; font-size: 12px",w+="; padding: 0px 14px",x+=`<tr><span style="${w}">${E}</span></tr>`}),x+="</thead><tbody>",v.length>1&&v[0][0]===v[1][0]&&(v=[v[0]]),v.forEach(E=>{let w="";w+="display: flex",w+="; justify-content: center",w+="; color: #0163C8",w+="; padding: 0px 14px",w+="; font-size: 12px";const B=`<span style="${w}">${E}</span>`;x+=`<tr><td>${B}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const m=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=m.left+window.pageXOffset+g.caretX-30+"px",f.style.top=m.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return wl(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Yc})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return df(h)??0}}}}};return I.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),o(f)}},[]),_.jsxs("div",{className:t??"",children:[_.jsx(lI,{options:d,data:c,height:n}),_.jsx("div",{className:"1ru-h-5",children:_.jsx("canvas",{ref:r})})]})},HX="_container_ser71_289",kx={"container-popover":"_container-popover_ser71_289",container:HX},jX=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=I.useRef(null),p={backgroundColor:a4[s]||s},[m,b]=I.useState(!1),[v,x]=I.useState(!1),C=w=>{var B;(B=g.current)==null||B.handlerShow(w),x(!0),typeof i=="function"&&i()},E=()=>{var w;x(!1),m||(clearInterval(f),(w=g.current)==null||w.setShow(!1),typeof a=="function"&&a())};return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:e,onMouseEnter:w=>{if(d&&!m){const B=w.currentTarget;f=setTimeout(()=>{C({...w,currentTarget:B})},h)}},onMouseLeave:()=>{d&&!m&&E()},onClick:w=>{b(!0),clearInterval(f),v||C(w)},className:kx.container,children:t}),_.jsx(gi,{floatingOptions:{placement:o},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{m&&(b(!1),E())},styleInnerPopover:{backgroundColor:p.backgroundColor},propsArrow:{fill:p.backgroundColor,...u},className:`${kx["container-popover"]} ${c??""}`,...l,children:n})]})},WX="_icon_zrudt_5",zX="_show_zrudt_10",c0={"container-popover":"_container-popover_zrudt_1",icon:WX,show:zX},cI=I.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:p=5,idPopover:m="1ru-popover-button-popover",onClick:b,onClose:v,...x}=e,C=I.useRef(null),E=I.useRef(null),[w,B]=I.useState(!1),y=(T,F,k)=>{let P=_.jsx(_.Fragment,{});return T&&I.isValidElement(F)?P=F:I.isValidElement(k)&&(P=_.jsx("div",{className:`${c0.icon} ${T?c0.show:""}`,children:k})),P},S=T=>{var F;(F=C.current)==null||F.setShow(T),B(T)},D=T=>{var F;(F=C.current)==null||F.handlerShow(T),B(!0)},A=()=>{var T;B(!1),(T=C.current)==null||T.setShow(!1),typeof v=="function"&&v()};return I.useImperativeHandle(t,()=>({show:w,setShow:S,handlerClose:A,handlerShow:D}),[w]),_.jsxs(_.Fragment,{children:[_.jsx(jn,{ref:E,id:r,className:`${u} ${w?c:""}`,onClick:T=>{w?A():typeof b=="function"?b(T):D(T)},startIcon:y(w,s,a),endIcon:y(w,l,o),...x,children:i}),_.jsx(gi,{ref:C,id:m,offset:p,floatingOptions:{placement:h},zIndex:g,onClose:A,className:`${c0["container-popover"]} ${d}`,...f,children:n})]})});cI.displayName="ButtonPopover";To.register(ws,Is,fo,ai,Q5,uu);const GX=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},UX={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},XX={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},ZX=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=I.useRef(void 0),s=I.useRef(0),l=I.useRef(0),[u,c]=I.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=I.useCallback(function({ctx:p,chartArea:m,scales:b,chartHeight:v,gradientFor:x,item:C}){let B=(b.y.getPixelForValue(0)-m.top)/v;B=B<0?0:B>1?1:B,o.current=p.createLinearGradient(0,m.top,0,v+m.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(B,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(B,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(B,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(B,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=I.useCallback(function({ctx:p,chartArea:m,scales:b,gradientFor:v,item:x}){const C=m.right-m.left,E=m.bottom-m.top;return(!o.current||s.current!==C||l.current!==E)&&(s.current=C,l.current=E,d({ctx:p,chartArea:m,scales:b,chartHeight:E,gradientFor:v,item:x})),d({ctx:p,chartArea:m,scales:b,chartHeight:E,gradientFor:v,item:x}),o.current},[]),f=I.useMemo(()=>({...e,datasets:e.datasets.map(m=>({fill:!0,backgroundColor:function(b){const v=b.chart,{ctx:x,chartArea:C,scales:E}=v;if(C)return h({ctx:x,chartArea:C,scales:E,gradientFor:"background",item:m})},borderColor:function(b){const v=b.chart,{ctx:x,chartArea:C,scales:E}=v;if(C)return h({ctx:x,chartArea:C,scales:E,gradientFor:"border",item:m})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...m,data:m.data}))}),[e]),g=I.useMemo(()=>_l(XX,{plugins:{tooltip:{enabled:!a,external:({chart:m,tooltip:b})=>a?GX(c)({chart:m,tooltip:b}):void 0}}},i??{}),[i,a]);return _.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&_.jsx(Om,{selector:"body",children:_.jsx(a,{...u})}),_.jsx(lI,{data:f,options:g,plugins:[UX]})]})};To.register(ws,Is,Xc,uu,fo,Q5,uu);const YX=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},KX={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?df(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},qX={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return df(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},JX=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=I.useRef(void 0),s=I.useRef(0),l=I.useRef(0),[u,c]=I.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=I.useCallback(function({ctx:p,chartArea:m,scales:b,chartHeight:v,gradientFor:x,item:C}){let B=(b.y.getPixelForValue(0)-m.top)/v;B=B<0?0:B>1?1:B,o.current=p.createLinearGradient(0,m.top,0,v+m.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(B,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(B,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(B,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(B,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=I.useCallback(function({ctx:p,chartArea:m,scales:b,gradientFor:v,item:x}){const C=m.right-m.left,E=m.bottom-m.top;return(!o.current||s.current!==C||l.current!==E)&&(s.current=C,l.current=E,d({ctx:p,chartArea:m,scales:b,chartHeight:E,gradientFor:v,item:x})),d({ctx:p,chartArea:m,scales:b,chartHeight:E,gradientFor:v,item:x}),o.current},[]),f=I.useMemo(()=>({...e,datasets:e.datasets.map(m=>({fill:!0,backgroundColor:function(b){const v=b.chart,{ctx:x,chartArea:C,scales:E}=v;if(C)return h({ctx:x,chartArea:C,scales:E,gradientFor:"background",item:m})},borderColor:function(b){const v=b.chart,{ctx:x,chartArea:C,scales:E}=v;if(C)return h({ctx:x,chartArea:C,scales:E,gradientFor:"border",item:m})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...m,data:m.data}))}),[e]),g=I.useMemo(()=>_l(qX,{plugins:{tooltip:{enabled:!a,external:({chart:m,tooltip:b})=>a?YX(c)({chart:m,tooltip:b}):void 0}}},i??{}),[i,a]);return _.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&_.jsx(Om,{selector:"body",children:_.jsx(a,{...u})}),_.jsx(bX,{data:f,options:g,plugins:[KX]})]})},QX="_left_fwo8v_475",eZ="_right_fwo8v_478",tZ="_indicator_fwo8v_489",nZ="_active_fwo8v_494",Ki={"container-step-indicator":"_container-step-indicator_fwo8v_301","text-step-indicator":"_text-step-indicator_fwo8v_301",left:QX,right:eZ,"step-indicator":"_step-indicator_fwo8v_485",indicator:tZ,active:nZ};function rZ(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const iZ=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>_.jsxs("div",{id:o,className:`${Ki["container-step-indicator"]}
|
|
190
190
|
${s==="left"?Ki.left:Ki.right} ${r||""}`,children:[s==="left"&&_.jsxs("p",{className:`${Ki["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]}),_.jsx("div",{className:`${Ki["step-indicator"]} ${d||""}
|
|
191
191
|
${u?"1ru-w-full":""} ${c}`,style:{gap:c},children:Array.from({length:t}).map((h,f)=>_.jsx("div",{className:`${Ki.indicator} ${a||""}
|
|
192
|
-
${f<=e?`${Ki.active} ${n}`:""}`,style:{width:u?rZ(t,c):l}},f))}),s==="right"&&_.jsxs("p",{className:`${Ki["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]}),aZ="1.0.
|
|
192
|
+
${f<=e?`${Ki.active} ${n}`:""}`,style:{width:u?rZ(t,c):l}},f))}),s==="right"&&_.jsxs("p",{className:`${Ki["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]}),aZ="1.0.8",Px={version:aZ},oZ=({label:e})=>({tinymceScriptSrc:`https://unpkg.com/1mpacto-react-ui@${Px.version}/dist/tinymce/js/tinymce/tinymce.min.js`,init:{plugins:"lists",menubar:!1,statusbar:!1,content_css:`https://unpkg.com/1mpacto-react-ui@${Px.version}/dist/assets/fontfamily.css`,toolbar:"fontfamily fontsize italic bold underline bullist numlist",font_size_formats:"8px 10px 12px 14px 16px 18px 24px 36px 48px",image_advtab:!0,importcss_append:!0,min_height:220,image_caption:!0,noneditable_class:"mceNonEditable",toolbar_mode:"sliding",table_tab_navigation:!1,line_height_formats:"100px",font_family_formats:`
|
|
193
193
|
Lato=Lato;
|
|
194
194
|
Inter=Inter;
|
|
195
195
|
Andale Mono=Andale Mono,times;
|
|
@@ -221,7 +221,7 @@ object-assign
|
|
|
221
221
|
(c) Sindre Sorhus
|
|
222
222
|
@license MIT
|
|
223
223
|
*/var d0,Fx;function uZ(){if(Fx)return d0;Fx=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return d0=i()?Object.assign:function(a,o){for(var s,l=r(a),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){u=e(s);for(var h=0;h<u.length;h++)n.call(s,u[h])&&(l[u[h]]=s[u[h]])}}return l},d0}var f0,Nx;function i1(){if(Nx)return f0;Nx=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return f0=e,f0}var h0,Mx;function dI(){return Mx||(Mx=1,h0=Function.call.bind(Object.prototype.hasOwnProperty)),h0}var g0,Lx;function cZ(){if(Lx)return g0;Lx=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=i1(),n={},r=dI();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var d;try{if(typeof a[c]!="function"){var h=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=a[c](o,c,l,s,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=u?u():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},g0=i,g0}var p0,Ox;function dZ(){if(Ox)return p0;Ox=1;var e=im,t=uZ(),n=i1(),r=dI(),i=cZ(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return p0=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(V){var W=V&&(u&&V[u]||V[c]);if(typeof W=="function")return W}var h="<<anonymous>>",f={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:v(),arrayOf:x,element:C(),elementType:E(),instanceOf:w,node:D(),objectOf:y,oneOf:B,oneOfType:S,shape:T,exact:F};function g(V,W){return V===W?V!==0||1/V===1/W:V!==V&&W!==W}function p(V,W){this.message=V,this.data=W&&typeof W=="object"?W:{},this.stack=""}p.prototype=Error.prototype;function m(V){if(process.env.NODE_ENV!=="production")var W={},U=0;function K(z,H,X,te,ie,le,ce){if(te=te||h,le=le||X,ce!==n){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=te+":"+X;!W[be]&&U<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[be]=!0,U++)}}return H[X]==null?z?H[X]===null?new p("The "+ie+" `"+le+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new p("The "+ie+" `"+le+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:V(H,X,te,ie,le)}var ee=K.bind(null,!1);return ee.isRequired=K.bind(null,!0),ee}function b(V){function W(U,K,ee,z,H,X){var te=U[K],ie=$(te);if(ie!==V){var le=R(te);return new p("Invalid "+z+" `"+H+"` of type "+("`"+le+"` supplied to `"+ee+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return m(W)}function v(){return m(o)}function x(V){function W(U,K,ee,z,H){if(typeof V!="function")return new p("Property `"+H+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var X=U[K];if(!Array.isArray(X)){var te=$(X);return new p("Invalid "+z+" `"+H+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected an array."))}for(var ie=0;ie<X.length;ie++){var le=V(X,ie,ee,z,H+"["+ie+"]",n);if(le instanceof Error)return le}return null}return m(W)}function C(){function V(W,U,K,ee,z){var H=W[U];if(!s(H)){var X=$(H);return new p("Invalid "+ee+" `"+z+"` of type "+("`"+X+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return m(V)}function E(){function V(W,U,K,ee,z){var H=W[U];if(!e.isValidElementType(H)){var X=$(H);return new p("Invalid "+ee+" `"+z+"` of type "+("`"+X+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return m(V)}function w(V){function W(U,K,ee,z,H){if(!(U[K]instanceof V)){var X=V.name||h,te=j(U[K]);return new p("Invalid "+z+" `"+H+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected ")+("instance of `"+X+"`."))}return null}return m(W)}function B(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function W(U,K,ee,z,H){for(var X=U[K],te=0;te<V.length;te++)if(g(X,V[te]))return null;var ie=JSON.stringify(V,function(ce,Q){var be=R(Q);return be==="symbol"?String(Q):Q});return new p("Invalid "+z+" `"+H+"` of value `"+String(X)+"` "+("supplied to `"+ee+"`, expected one of "+ie+"."))}return m(W)}function y(V){function W(U,K,ee,z,H){if(typeof V!="function")return new p("Property `"+H+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var X=U[K],te=$(X);if(te!=="object")return new p("Invalid "+z+" `"+H+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected an object."));for(var ie in X)if(r(X,ie)){var le=V(X,ie,ee,z,H+"."+ie,n);if(le instanceof Error)return le}return null}return m(W)}function S(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var W=0;W<V.length;W++){var U=V[W];if(typeof U!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(U)+" at index "+W+"."),o}function K(ee,z,H,X,te){for(var ie=[],le=0;le<V.length;le++){var ce=V[le],Q=ce(ee,z,H,X,te,n);if(Q==null)return null;Q.data&&r(Q.data,"expectedType")&&ie.push(Q.data.expectedType)}var be=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new p("Invalid "+X+" `"+te+"` supplied to "+("`"+H+"`"+be+"."))}return m(K)}function D(){function V(W,U,K,ee,z){return k(W[U])?null:new p("Invalid "+ee+" `"+z+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return m(V)}function A(V,W,U,K,ee){return new p((V||"React class")+": "+W+" type `"+U+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function T(V){function W(U,K,ee,z,H){var X=U[K],te=$(X);if(te!=="object")return new p("Invalid "+z+" `"+H+"` of type `"+te+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ie in V){var le=V[ie];if(typeof le!="function")return A(ee,z,H,ie,R(le));var ce=le(X,ie,ee,z,H+"."+ie,n);if(ce)return ce}return null}return m(W)}function F(V){function W(U,K,ee,z,H){var X=U[K],te=$(X);if(te!=="object")return new p("Invalid "+z+" `"+H+"` of type `"+te+"` "+("supplied to `"+ee+"`, expected `object`."));var ie=t({},U[K],V);for(var le in ie){var ce=V[le];if(r(V,le)&&typeof ce!="function")return A(ee,z,H,le,R(ce));if(!ce)return new p("Invalid "+z+" `"+H+"` key `"+le+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(U[K],null," ")+`
|
|
224
|
-
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Q=ce(X,le,ee,z,H+"."+le,n);if(Q)return Q}return null}return m(W)}function k(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(k);if(V===null||s(V))return!0;var W=d(V);if(W){var U=W.call(V),K;if(W!==V.entries){for(;!(K=U.next()).done;)if(!k(K.value))return!1}else for(;!(K=U.next()).done;){var ee=K.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function P(V,W){return V==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(V){var W=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":P(W,V)?"symbol":W}function R(V){if(typeof V>"u"||V===null)return""+V;var W=$(V);if(W==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return W}function O(V){var W=R(V);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function j(V){return!V.constructor||!V.constructor.name?h:V.constructor.name}return f.checkPropTypes=i,f.resetWarningCache=i.resetWarningCache,f.PropTypes=f,f},p0}var m0,Vx;function fZ(){if(Vx)return m0;Vx=1;var e=i1();function t(){}function n(){}return n.resetWarningCache=t,m0=function(){function r(o,s,l,u,c,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},m0}if(process.env.NODE_ENV!=="production"){var hZ=im,gZ=!0;Ug.exports=dZ()(hZ.isElement,gZ)}else Ug.exports=fZ()();var re=Ug.exports,Xg=function(){return Xg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Xg.apply(this,arguments)},fI={onActivate:re.func,onAddUndo:re.func,onBeforeAddUndo:re.func,onBeforeExecCommand:re.func,onBeforeGetContent:re.func,onBeforeRenderUI:re.func,onBeforeSetContent:re.func,onBeforePaste:re.func,onBlur:re.func,onChange:re.func,onClearUndos:re.func,onClick:re.func,onContextMenu:re.func,onCommentChange:re.func,onCompositionEnd:re.func,onCompositionStart:re.func,onCompositionUpdate:re.func,onCopy:re.func,onCut:re.func,onDblclick:re.func,onDeactivate:re.func,onDirty:re.func,onDrag:re.func,onDragDrop:re.func,onDragEnd:re.func,onDragGesture:re.func,onDragOver:re.func,onDrop:re.func,onExecCommand:re.func,onFocus:re.func,onFocusIn:re.func,onFocusOut:re.func,onGetContent:re.func,onHide:re.func,onInit:re.func,onInput:re.func,onKeyDown:re.func,onKeyPress:re.func,onKeyUp:re.func,onLoadContent:re.func,onMouseDown:re.func,onMouseEnter:re.func,onMouseLeave:re.func,onMouseMove:re.func,onMouseOut:re.func,onMouseOver:re.func,onMouseUp:re.func,onNodeChange:re.func,onObjectResizeStart:re.func,onObjectResized:re.func,onObjectSelected:re.func,onPaste:re.func,onPostProcess:re.func,onPostRender:re.func,onPreProcess:re.func,onProgressState:re.func,onRedo:re.func,onRemove:re.func,onReset:re.func,onSaveContent:re.func,onSelectionChange:re.func,onSetAttrib:re.func,onSetContent:re.func,onShow:re.func,onSubmit:re.func,onUndo:re.func,onVisualAid:re.func,onSkinLoadError:re.func,onThemeLoadError:re.func,onModelLoadError:re.func,onPluginLoadError:re.func,onIconsLoadError:re.func,onLanguageLoadError:re.func,onScriptsLoad:re.func,onScriptsLoadError:re.func},pZ=Xg({apiKey:re.string,licenseKey:re.string,id:re.string,inline:re.bool,init:re.object,initialValue:re.string,onEditorChange:re.func,value:re.string,tagName:re.string,tabIndex:re.number,cloudChannel:re.string,plugins:re.oneOfType([re.string,re.array]),toolbar:re.oneOfType([re.string,re.array]),disabled:re.bool,readonly:re.bool,textareaName:re.string,tinymceScriptSrc:re.oneOfType([re.string,re.arrayOf(re.string),re.arrayOf(re.shape({src:re.string,async:re.bool,defer:re.bool}))]),rollback:re.oneOfType([re.number,re.oneOf([!1])]),scriptLoading:re.shape({async:re.bool,defer:re.bool,delay:re.number})},fI),hI=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},b0=function(e){return typeof e=="function"},Hx=function(e){return e in fI},jx=function(e){return e.substr(2)},mZ=function(e,t,n,r,i,a,o){var s=Object.keys(i).filter(Hx),l=Object.keys(a).filter(Hx),u=s.filter(function(d){return a[d]===void 0}),c=l.filter(function(d){return i[d]===void 0});u.forEach(function(d){var h=jx(d),f=o[h];n(h,f),delete o[h]}),c.forEach(function(d){var h=r(e,d),f=jx(d);o[f]=h,t(f,h)})},bZ=function(e,t,n,r,i){return mZ(i,e.on.bind(e),e.off.bind(e),function(a,o){return function(s){var l;return(l=a(o))===null||l===void 0?void 0:l(s,e)}},t,n,r)},Wx=0,gI=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return Wx++,e+"_"+n+Wx+String(t)},zx=function(e){return e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input")},Gx=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},vZ=function(e,t){return Gx(e).concat(Gx(t))},yZ=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},xZ=function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;n!=null;)t=n,n=t.parentNode;return t===e.ownerDocument}return e.isConnected},Ux=function(e,t){e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(t):e.setMode(t))},CZ=function(e){var t=hI(e);if(!t)throw new Error("tinymce should have been loaded into global scope");return t},Xx=function(e){return e.options&&e.options.isRegistered("disabled")},Zg=function(){return Zg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zg.apply(this,arguments)},EZ=function(e,t,n){var r,i,a=e.createElement("script");a.referrerPolicy="origin",a.type="application/javascript",a.id=t.id,a.src=t.src,a.async=(r=t.async)!==null&&r!==void 0?r:!1,a.defer=(i=t.defer)!==null&&i!==void 0?i:!1;var o=function(){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src)},s=function(l){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src,l)};a.addEventListener("load",o),a.addEventListener("error",s),e.head&&e.head.appendChild(a)},SZ=function(e){var t={},n=function(o,s){var l=t[o];l.done=!0,l.error=s;for(var u=0,c=l.handlers;u<c.length;u++){var d=c[u];d(o,s)}l.handlers=[]},r=function(o,s,l){var u=function(v){return l!==void 0?l(v):console.error(v)};if(o.length===0){u(new Error("At least one script must be provided"));return}for(var c=0,d=!1,h=function(v,x){d||(x?(d=!0,u(x)):++c===o.length&&s())},f=0,g=o;f<g.length;f++){var p=g[f],m=t[p.src];if(m)m.done?h(p.src,m.error):m.handlers.push(h);else{var b=gI("tiny-");t[p.src]={id:b,src:p.src,done:!1,error:null,handlers:[h]},EZ(e,Zg({id:b},p),n)}}},i=function(){for(var o,s=0,l=Object.values(t);s<l.length;s++){var u=l[s],c=e.getElementById(u.id);c!=null&&c.tagName==="SCRIPT"&&((o=c.parentNode)===null||o===void 0||o.removeChild(c))}t={}},a=function(){return e};return{loadScripts:r,deleteScripts:i,getDocument:a}},wZ=function(){var e=[],t=function(i){var a=e.find(function(o){return o.getDocument()===i});return a===void 0&&(a=SZ(i),e.push(a)),a},n=function(i,a,o,s,l){var u=function(){return t(i).loadScripts(a,s,l)};o>0?setTimeout(u,o):u()},r=function(){for(var i=e.pop();i!=null;i=e.pop())i.deleteScripts()};return{loadList:n,reinitialize:r}},IZ=wZ(),_Z=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qo=function(){return Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qo.apply(this,arguments)},v0="change keyup compositionend setcontent CommentChange",DZ=function(e){_Z(t,e);function t(n){var r,i,a,o=e.call(this,n)||this;return o.rollbackTimer=void 0,o.valueCursor=void 0,o.rollbackChange=function(){var s=o.editor,l=o.props.value;s&&l&&l!==o.currentContent&&s.undoManager.ignore(function(){if(s.setContent(l),o.valueCursor&&(!o.inline||s.hasFocus()))try{s.selection.moveToBookmark(o.valueCursor)}catch{}}),o.rollbackTimer=void 0},o.handleBeforeInput=function(s){if(o.props.value!==void 0&&o.props.value===o.currentContent&&o.editor&&(!o.inline||o.editor.hasFocus()))try{o.valueCursor=o.editor.selection.getBookmark(3)}catch{}},o.handleBeforeInputSpecial=function(s){(s.key==="Enter"||s.key==="Backspace"||s.key==="Delete")&&o.handleBeforeInput(s)},o.handleEditorChange=function(s){var l=o.editor;if(l&&l.initialized){var u=l.getContent();o.props.value!==void 0&&o.props.value!==u&&o.props.rollback!==!1&&(o.rollbackTimer||(o.rollbackTimer=window.setTimeout(o.rollbackChange,typeof o.props.rollback=="number"?o.props.rollback:200))),u!==o.currentContent&&(o.currentContent=u,b0(o.props.onEditorChange)&&o.props.onEditorChange(u,l))}},o.handleEditorChangeSpecial=function(s){(s.key==="Backspace"||s.key==="Delete")&&o.handleEditorChange(s)},o.initialise=function(s){var l,u,c;s===void 0&&(s=0);var d=o.elementRef.current;if(d){if(!xZ(d)){if(s===0)setTimeout(function(){return o.initialise(1)},1);else if(s<100)setTimeout(function(){return o.initialise(s+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var h=CZ(o.view),f=Qo(Qo(Qo(Qo({},o.props.init),{selector:void 0,target:d,disabled:o.props.disabled,readonly:o.props.readonly,inline:o.inline,plugins:vZ((l=o.props.init)===null||l===void 0?void 0:l.plugins,o.props.plugins),toolbar:(u=o.props.toolbar)!==null&&u!==void 0?u:(c=o.props.init)===null||c===void 0?void 0:c.toolbar}),o.props.licenseKey?{license_key:o.props.licenseKey}:{}),{setup:function(g){o.editor=g,o.bindHandlers({}),o.inline&&!zx(d)&&g.once("PostRender",function(p){g.setContent(o.getInitialValue(),{no_events:!0})}),o.props.init&&b0(o.props.init.setup)&&o.props.init.setup(g),o.props.disabled&&(Xx(o.editor)?o.editor.options.set("disabled",o.props.disabled):o.editor.mode.set("readonly"))},init_instance_callback:function(g){var p,m=o.getInitialValue();o.currentContent=(p=o.currentContent)!==null&&p!==void 0?p:g.getContent(),o.currentContent!==m&&(o.currentContent=m,g.setContent(m),g.undoManager.clear(),g.undoManager.add(),g.setDirty(!1)),o.props.init&&b0(o.props.init.init_instance_callback)&&o.props.init.init_instance_callback(g)}});o.inline||(d.style.visibility=""),zx(d)&&(d.value=o.getInitialValue()),h.init(f)}},o.id=o.props.id||gI("tiny-react"),o.elementRef=J.createRef(),o.inline=(a=(r=o.props.inline)!==null&&r!==void 0?r:(i=o.props.init)===null||i===void 0?void 0:i.inline)!==null&&a!==void 0?a:!1,o.boundHandlers={},o}return Object.defineProperty(t.prototype,"view",{get:function(){var n,r;return(r=(n=this.elementRef.current)===null||n===void 0?void 0:n.ownerDocument.defaultView)!==null&&r!==void 0?r:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(n){var r=this,i,a;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=(i=this.currentContent)!==null&&i!==void 0?i:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var o=this.editor;o.undoManager.transact(function(){var l;if(!r.inline||o.hasFocus())try{l=o.selection.getBookmark(3)}catch{}var u=r.valueCursor;if(o.setContent(r.props.value),!r.inline||o.hasFocus())for(var c=0,d=[l,u];c<d.length;c++){var h=d[c];if(h)try{o.selection.moveToBookmark(h),r.valueCursor=h;break}catch{}}})}if(this.props.readonly!==n.readonly){var s=(a=this.props.readonly)!==null&&a!==void 0?a:!1;Ux(this.editor,s?"readonly":"design")}this.props.disabled!==n.disabled&&(Xx(this.editor)?this.editor.options.set("disabled",this.props.disabled):Ux(this.editor,this.props.disabled?"readonly":"design"))}},t.prototype.componentDidMount=function(){var n=this,r,i,a,o,s;if(hI(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(i=(r=this.props).onScriptsLoadError)===null||i===void 0||i.call(r,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((a=this.elementRef.current)===null||a===void 0)&&a.ownerDocument){var l=function(){var c,d;(d=(c=n.props).onScriptsLoad)===null||d===void 0||d.call(c),n.initialise()},u=function(c){var d,h;(h=(d=n.props).onScriptsLoadError)===null||h===void 0||h.call(d,c)};IZ.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(s=(o=this.props.scriptLoading)===null||o===void 0?void 0:o.delay)!==null&&s!==void 0?s:0,l,u)}},t.prototype.componentWillUnmount=function(){var n=this,r=this.editor;r&&(r.off(v0,this.handleEditorChange),r.off(this.beforeInputEvent(),this.handleBeforeInput),r.off("keypress",this.handleEditorChangeSpecial),r.off("keydown",this.handleBeforeInputSpecial),r.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(i){r.off(i,n.boundHandlers[i])}),this.boundHandlers={},r.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.beforeInputEvent=function(){return yZ()?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var n=this.props.tagName,r=n===void 0?"div":n;return J.createElement(r,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return J.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var n,r,i=(n=this.props.scriptLoading)===null||n===void 0?void 0:n.async,a=(r=this.props.scriptLoading)===null||r===void 0?void 0:r.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:i,defer:a}]:this.props.tinymceScriptSrc.map(function(u){return typeof u=="string"?{src:u,async:i,defer:a}:u});var o=this.props.cloudChannel,s=this.props.apiKey?this.props.apiKey:"no-api-key",l="https://cdn.tiny.cloud/1/".concat(s,"/tinymce/").concat(o,"/tinymce.min.js");return[{src:l,async:i,defer:a}]},t.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},t.prototype.bindHandlers=function(n){var r=this;if(this.editor!==void 0){bZ(this.editor,n,this.props,this.boundHandlers,function(s){return r.props[s]});var i=function(s){return s.onEditorChange!==void 0||s.value!==void 0},a=i(n),o=i(this.props);!a&&o?(this.editor.on(v0,this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):a&&!o&&(this.editor.off(v0,this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=pZ,t.defaultProps={cloudChannel:"7"},t}(J.Component);const AZ=e=>_.jsx("div",{className:`${lZ.container}`,children:_.jsx(DZ,{..._l(oZ({label:e.label}),e)})}),TZ=({children:e,open:t,className:n,id:r,classNameContainer:i})=>(I.useLayoutEffect(()=>{const a=document.getElementById(r),o=document.getElementById(`inner-${r}`);if(!a||!o)return;const s=new ResizeObserver(()=>{const l=o.getBoundingClientRect().height;a.style.height=`${l}px`});if(t){const l=o.getBoundingClientRect().height;a.style.height=`${l}px`,s.observe(o)}else a.style.height="0px";return()=>{s.disconnect()}},[t,r]),_.jsx("div",{id:r,className:`${Qw.collapse} ${i??""}`,style:{height:0},children:_.jsx("div",{id:`inner-${r}`,className:n??"",children:e})})),RZ="_selected_dsej5_541",BZ="_error_dsej5_546",$Z="_disabled_dsej5_550",Rt={"container-time-range":"_container-time-range_dsej5_133","time-range-header":"_time-range-header_dsej5_133","text-to":"_text-to_dsej5_133","time-range":"_time-range_dsej5_133","time-range-body":"_time-range-body_dsej5_133","list-time":"_list-time_dsej5_133","container-time":"_container-time_dsej5_133","title-time":"_title-time_dsej5_133","cell-time":"_cell-time_dsej5_133","time-range-divider":"_time-range-divider_dsej5_502","container-cell-time":"_container-cell-time_dsej5_524",selected:RZ,error:BZ,disabled:$Z,"time-range-footer":"_time-range-footer_dsej5_557"},zo=(e,t=2)=>String(e).padStart(t,"0"),Zx=(e,t)=>e[0][0]&&e[0][1]&&e[1][0]&&e[1][1]?`${e[0][0]}:${e[0][1]} - ${e[1][0]}:${e[1][1]}`:io[t]["Select Time"],io={"en-US":{to:"to",Hour:"Hour",Minute:"Minute","Select Time":"Select Time",Reset:"Reset",Apply:"Apply"},"id-ID":{to:"to",Hour:"Jam",Minute:"Menit","Select Time":"Pilih Waktu",Reset:"Reset",Apply:"Terapkan"},"zh-CN":{to:"到",Hour:"小时",Minute:"分钟","Select Time":"选择时间",Reset:"重置",Apply:"应用"},"nl-NL":{to:"tot",Hour:"Uur",Minute:"Minuten","Select Time":"Select Time",Reset:"Reset",Apply:"Toepassen"}},Zs=[["",""],["",""]],kZ=e=>{const{id:t="time-range",classNameContainer:n,value:r=Zs,buttonClick:i,zIndexPopper:a=1,offsetPopover:o=5,floatingOptions:s,locale:l="id-ID",disableValidation:u=!1}=e,c=I.useRef(null),[d,h]=I.useState(Zs),f=(b,v)=>{if(v==="start"){const x=[b,d[1]];h(x)}else{const x=[d[0],b];h(x)}},g=b=>{var v;(v=c.current)==null||v.handlerShow(b),h(r||Zs)},p=()=>{var b;typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(Zs),h(Zs),(b=c.current)==null||b.setShow(!1)},m=()=>{var B;const b=Number(d[0][0]),v=Number(d[0][1]),x=Number(d[1][0]),C=Number(d[1][1]),E=d[0][0]&&d[0][1]&&d[1][0]&&d[1][1],w=b<x||b===x&&v<=C;E&&(w||u)&&(typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(d),(B=c.current)==null||B.setShow(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:t,onClick:g,className:n,children:typeof i=="function"?i(r,Zx(r,l)):r?Zx(r,l):io[l]["Select Time"]}),_.jsx(gi,{zIndex:a,ref:c,offset:o,id:`${t}-popover`,floatingOptions:{placement:"bottom-end",...s},className:"1ru-flex 1ru-flex-col",children:_.jsxs("div",{className:Rt["container-time-range"],children:[_.jsxs("div",{className:Rt["time-range-header"],children:[_.jsx("div",{className:Rt["time-range"],children:d[0][0]&&d[0][1]?`${d[0][0]}:${d[0][1]}`:"--:--"}),_.jsx("p",{className:Rt["text-to"],children:io[l].to}),_.jsx("div",{className:Rt["time-range"],children:d[1][0]&&d[1][1]?`${d[1][0]}:${d[1][1]}`:"--:--"})]}),_.jsxs("div",{className:Rt["time-range-body"],children:[_.jsx(Yx,{type:"start",value:[d[0][0],d[0][1]],onChange:b=>f(b,"start"),locale:l,values:d,disableValidation:u}),_.jsx("div",{className:Rt["time-range-divider"]}),_.jsx(Yx,{type:"end",value:[d[1][0],d[1][1]],onChange:b=>f(b,"end"),locale:l,values:d,disableValidation:u})]}),_.jsxs("div",{className:`${Rt["time-range-footer"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:p,children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:p,children:io[l].Reset}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:m,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:m,children:io[l].Apply})]})]})})]})},Yx=e=>{const{value:t,onChange:n,type:r,locale:i,values:a,disableValidation:o}=e,s=(f,g,p)=>Array.from({length:(g-f)/p+1},(m,b)=>f+b*p),l=()=>{const f=document.getElementById(`time-range-${r}-hour-${t[0]}`),g=document.getElementById(`time-range-${r}-minute-${t[1]}`),p=document.getElementById(`time-range-${r}-hour`),m=document.getElementById(`time-range-${r}-minute`);f&&p&&p.scrollTo({behavior:"instant",top:f.offsetTop-75}),g&&m&&m.scrollTo({behavior:"instant",top:g.offsetTop-75})},u=f=>{if(r==="start"||o)return!1;{if(!a[0][0])return!1;const g=Number(a[0][0]);return f<g}},c=f=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const g=Number(a[0][0]),p=Number(a[1][0]),m=Number(a[0][1]);return g===p&&f<m}},d=f=>{if(r==="start"||o)return!1;{const g=Number(a[0][0]);return f<g}},h=f=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const g=Number(a[0][0]),p=Number(a[1][0]),m=Number(a[0][1]);return g===p&&f<m}};return I.useEffect(()=>{l()},[]),_.jsxs("div",{className:Rt["list-time"],children:[_.jsxs("div",{className:Rt["container-time"],children:[_.jsx("p",{className:Rt["title-time"],children:io[i].Hour}),_.jsx("div",{id:`time-range-${r}-hour`,className:Rt["container-cell-time"],children:s(0,23,1).map(f=>_.jsx("div",{id:`time-range-${r}-hour-${f}`,className:`${Rt["cell-time"]} ${t[0]===zo(f)?Rt.selected:""} ${u(f)?Rt.error:""} ${d(f)?Rt.disabled:""}`,onClick:()=>n([zo(f),t[1]]),children:zo(f)},f))})]}),_.jsxs("div",{className:Rt["container-time"],children:[_.jsx("p",{className:Rt["title-time"],children:io[i].Minute}),_.jsx("div",{id:`time-range-${r}-minute`,className:Rt["container-cell-time"],children:s(0,59,1).map(f=>_.jsx("div",{id:`time-range-${r}-minute-${f}`,className:`${Rt["cell-time"]} ${t[1]===zo(f)?Rt.selected:""} ${c(f)?Rt.error:""} ${h(f)?Rt.disabled:""}`,onClick:()=>n([t[0],zo(f)]),children:zo(f)},f))})]})]})},PZ="_container_4603f_421",FZ="_textarea_4603f_421",NZ="_label_4603f_421",MZ="_error_4603f_517",Ur={container:PZ,"size-large":"_size-large_4603f_421","container-textarea":"_container-textarea_4603f_421",textarea:FZ,"label-error":"_label-error_4603f_421","size-small":"_size-small_4603f_421",label:NZ,error:MZ},LZ={size:{large:Ur["size-large"],small:Ur["size-small"]}},pI=I.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,error:c,height:d,minHeight:h=94,maxHeight:f=150,style:g,sizeInput:p="large",...m}=e,b=I.useRef(null),v=If(b,t),x={...g??{},maxHeight:f,height:d??h,minHeight:h},[C,E]=I.useState(!1),w=function(S){var D;E(!0),(D=e.onFocus)==null||D.call(e,S)},B=function(S){var D;E(!1),(D=e.onBlur)==null||D.call(e,S)},y=function(S){const D=(S==null?void 0:S.target)??b.current;D.style.height="0px",D.style.height=D.scrollHeight+"px"};return wf(()=>(C&&b.current?b.current.addEventListener("input",y):y(),()=>{var S;(S=b.current)==null||S.removeEventListener("input",y)}),[C]),_.jsxs("div",{className:`${Ur.container}
|
|
224
|
+
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Q=ce(X,le,ee,z,H+"."+le,n);if(Q)return Q}return null}return m(W)}function k(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(k);if(V===null||s(V))return!0;var W=d(V);if(W){var U=W.call(V),K;if(W!==V.entries){for(;!(K=U.next()).done;)if(!k(K.value))return!1}else for(;!(K=U.next()).done;){var ee=K.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function P(V,W){return V==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(V){var W=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":P(W,V)?"symbol":W}function R(V){if(typeof V>"u"||V===null)return""+V;var W=$(V);if(W==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return W}function O(V){var W=R(V);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function j(V){return!V.constructor||!V.constructor.name?h:V.constructor.name}return f.checkPropTypes=i,f.resetWarningCache=i.resetWarningCache,f.PropTypes=f,f},p0}var m0,Vx;function fZ(){if(Vx)return m0;Vx=1;var e=i1();function t(){}function n(){}return n.resetWarningCache=t,m0=function(){function r(o,s,l,u,c,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},m0}if(process.env.NODE_ENV!=="production"){var hZ=im,gZ=!0;Ug.exports=dZ()(hZ.isElement,gZ)}else Ug.exports=fZ()();var re=Ug.exports,Xg=function(){return Xg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Xg.apply(this,arguments)},fI={onActivate:re.func,onAddUndo:re.func,onBeforeAddUndo:re.func,onBeforeExecCommand:re.func,onBeforeGetContent:re.func,onBeforeRenderUI:re.func,onBeforeSetContent:re.func,onBeforePaste:re.func,onBlur:re.func,onChange:re.func,onClearUndos:re.func,onClick:re.func,onContextMenu:re.func,onCommentChange:re.func,onCompositionEnd:re.func,onCompositionStart:re.func,onCompositionUpdate:re.func,onCopy:re.func,onCut:re.func,onDblclick:re.func,onDeactivate:re.func,onDirty:re.func,onDrag:re.func,onDragDrop:re.func,onDragEnd:re.func,onDragGesture:re.func,onDragOver:re.func,onDrop:re.func,onExecCommand:re.func,onFocus:re.func,onFocusIn:re.func,onFocusOut:re.func,onGetContent:re.func,onHide:re.func,onInit:re.func,onInput:re.func,onKeyDown:re.func,onKeyPress:re.func,onKeyUp:re.func,onLoadContent:re.func,onMouseDown:re.func,onMouseEnter:re.func,onMouseLeave:re.func,onMouseMove:re.func,onMouseOut:re.func,onMouseOver:re.func,onMouseUp:re.func,onNodeChange:re.func,onObjectResizeStart:re.func,onObjectResized:re.func,onObjectSelected:re.func,onPaste:re.func,onPostProcess:re.func,onPostRender:re.func,onPreProcess:re.func,onProgressState:re.func,onRedo:re.func,onRemove:re.func,onReset:re.func,onSaveContent:re.func,onSelectionChange:re.func,onSetAttrib:re.func,onSetContent:re.func,onShow:re.func,onSubmit:re.func,onUndo:re.func,onVisualAid:re.func,onSkinLoadError:re.func,onThemeLoadError:re.func,onModelLoadError:re.func,onPluginLoadError:re.func,onIconsLoadError:re.func,onLanguageLoadError:re.func,onScriptsLoad:re.func,onScriptsLoadError:re.func},pZ=Xg({apiKey:re.string,licenseKey:re.string,id:re.string,inline:re.bool,init:re.object,initialValue:re.string,onEditorChange:re.func,value:re.string,tagName:re.string,tabIndex:re.number,cloudChannel:re.string,plugins:re.oneOfType([re.string,re.array]),toolbar:re.oneOfType([re.string,re.array]),disabled:re.bool,readonly:re.bool,textareaName:re.string,tinymceScriptSrc:re.oneOfType([re.string,re.arrayOf(re.string),re.arrayOf(re.shape({src:re.string,async:re.bool,defer:re.bool}))]),rollback:re.oneOfType([re.number,re.oneOf([!1])]),scriptLoading:re.shape({async:re.bool,defer:re.bool,delay:re.number})},fI),hI=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},b0=function(e){return typeof e=="function"},Hx=function(e){return e in fI},jx=function(e){return e.substr(2)},mZ=function(e,t,n,r,i,a,o){var s=Object.keys(i).filter(Hx),l=Object.keys(a).filter(Hx),u=s.filter(function(d){return a[d]===void 0}),c=l.filter(function(d){return i[d]===void 0});u.forEach(function(d){var h=jx(d),f=o[h];n(h,f),delete o[h]}),c.forEach(function(d){var h=r(e,d),f=jx(d);o[f]=h,t(f,h)})},bZ=function(e,t,n,r,i){return mZ(i,e.on.bind(e),e.off.bind(e),function(a,o){return function(s){var l;return(l=a(o))===null||l===void 0?void 0:l(s,e)}},t,n,r)},Wx=0,gI=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return Wx++,e+"_"+n+Wx+String(t)},zx=function(e){return e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input")},Gx=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},vZ=function(e,t){return Gx(e).concat(Gx(t))},yZ=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},xZ=function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;n!=null;)t=n,n=t.parentNode;return t===e.ownerDocument}return e.isConnected},Ux=function(e,t){e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(t):e.setMode(t))},CZ=function(e){var t=hI(e);if(!t)throw new Error("tinymce should have been loaded into global scope");return t},Xx=function(e){return e.options&&e.options.isRegistered("disabled")},Zg=function(){return Zg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zg.apply(this,arguments)},EZ=function(e,t,n){var r,i,a=e.createElement("script");a.referrerPolicy="origin",a.type="application/javascript",a.id=t.id,a.src=t.src,a.async=(r=t.async)!==null&&r!==void 0?r:!1,a.defer=(i=t.defer)!==null&&i!==void 0?i:!1;var o=function(){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src)},s=function(l){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src,l)};a.addEventListener("load",o),a.addEventListener("error",s),e.head&&e.head.appendChild(a)},SZ=function(e){var t={},n=function(o,s){var l=t[o];l.done=!0,l.error=s;for(var u=0,c=l.handlers;u<c.length;u++){var d=c[u];d(o,s)}l.handlers=[]},r=function(o,s,l){var u=function(v){return l!==void 0?l(v):console.error(v)};if(o.length===0){u(new Error("At least one script must be provided"));return}for(var c=0,d=!1,h=function(v,x){d||(x?(d=!0,u(x)):++c===o.length&&s())},f=0,g=o;f<g.length;f++){var p=g[f],m=t[p.src];if(m)m.done?h(p.src,m.error):m.handlers.push(h);else{var b=gI("tiny-");t[p.src]={id:b,src:p.src,done:!1,error:null,handlers:[h]},EZ(e,Zg({id:b},p),n)}}},i=function(){for(var o,s=0,l=Object.values(t);s<l.length;s++){var u=l[s],c=e.getElementById(u.id);c!=null&&c.tagName==="SCRIPT"&&((o=c.parentNode)===null||o===void 0||o.removeChild(c))}t={}},a=function(){return e};return{loadScripts:r,deleteScripts:i,getDocument:a}},wZ=function(){var e=[],t=function(i){var a=e.find(function(o){return o.getDocument()===i});return a===void 0&&(a=SZ(i),e.push(a)),a},n=function(i,a,o,s,l){var u=function(){return t(i).loadScripts(a,s,l)};o>0?setTimeout(u,o):u()},r=function(){for(var i=e.pop();i!=null;i=e.pop())i.deleteScripts()};return{loadList:n,reinitialize:r}},IZ=wZ(),_Z=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qo=function(){return Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qo.apply(this,arguments)},v0="change keyup compositionend setcontent CommentChange",DZ=function(e){_Z(t,e);function t(n){var r,i,a,o=e.call(this,n)||this;return o.rollbackTimer=void 0,o.valueCursor=void 0,o.rollbackChange=function(){var s=o.editor,l=o.props.value;s&&l&&l!==o.currentContent&&s.undoManager.ignore(function(){if(s.setContent(l),o.valueCursor&&(!o.inline||s.hasFocus()))try{s.selection.moveToBookmark(o.valueCursor)}catch{}}),o.rollbackTimer=void 0},o.handleBeforeInput=function(s){if(o.props.value!==void 0&&o.props.value===o.currentContent&&o.editor&&(!o.inline||o.editor.hasFocus()))try{o.valueCursor=o.editor.selection.getBookmark(3)}catch{}},o.handleBeforeInputSpecial=function(s){(s.key==="Enter"||s.key==="Backspace"||s.key==="Delete")&&o.handleBeforeInput(s)},o.handleEditorChange=function(s){var l=o.editor;if(l&&l.initialized){var u=l.getContent();o.props.value!==void 0&&o.props.value!==u&&o.props.rollback!==!1&&(o.rollbackTimer||(o.rollbackTimer=window.setTimeout(o.rollbackChange,typeof o.props.rollback=="number"?o.props.rollback:200))),u!==o.currentContent&&(o.currentContent=u,b0(o.props.onEditorChange)&&o.props.onEditorChange(u,l))}},o.handleEditorChangeSpecial=function(s){(s.key==="Backspace"||s.key==="Delete")&&o.handleEditorChange(s)},o.initialise=function(s){var l,u,c;s===void 0&&(s=0);var d=o.elementRef.current;if(d){if(!xZ(d)){if(s===0)setTimeout(function(){return o.initialise(1)},1);else if(s<100)setTimeout(function(){return o.initialise(s+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var h=CZ(o.view),f=Qo(Qo(Qo(Qo({},o.props.init),{selector:void 0,target:d,disabled:o.props.disabled,readonly:o.props.readonly,inline:o.inline,plugins:vZ((l=o.props.init)===null||l===void 0?void 0:l.plugins,o.props.plugins),toolbar:(u=o.props.toolbar)!==null&&u!==void 0?u:(c=o.props.init)===null||c===void 0?void 0:c.toolbar}),o.props.licenseKey?{license_key:o.props.licenseKey}:{}),{setup:function(g){o.editor=g,o.bindHandlers({}),o.inline&&!zx(d)&&g.once("PostRender",function(p){g.setContent(o.getInitialValue(),{no_events:!0})}),o.props.init&&b0(o.props.init.setup)&&o.props.init.setup(g),o.props.disabled&&(Xx(o.editor)?o.editor.options.set("disabled",o.props.disabled):o.editor.mode.set("readonly"))},init_instance_callback:function(g){var p,m=o.getInitialValue();o.currentContent=(p=o.currentContent)!==null&&p!==void 0?p:g.getContent(),o.currentContent!==m&&(o.currentContent=m,g.setContent(m),g.undoManager.clear(),g.undoManager.add(),g.setDirty(!1)),o.props.init&&b0(o.props.init.init_instance_callback)&&o.props.init.init_instance_callback(g)}});o.inline||(d.style.visibility=""),zx(d)&&(d.value=o.getInitialValue()),h.init(f)}},o.id=o.props.id||gI("tiny-react"),o.elementRef=J.createRef(),o.inline=(a=(r=o.props.inline)!==null&&r!==void 0?r:(i=o.props.init)===null||i===void 0?void 0:i.inline)!==null&&a!==void 0?a:!1,o.boundHandlers={},o}return Object.defineProperty(t.prototype,"view",{get:function(){var n,r;return(r=(n=this.elementRef.current)===null||n===void 0?void 0:n.ownerDocument.defaultView)!==null&&r!==void 0?r:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(n){var r=this,i,a;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=(i=this.currentContent)!==null&&i!==void 0?i:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var o=this.editor;o.undoManager.transact(function(){var l;if(!r.inline||o.hasFocus())try{l=o.selection.getBookmark(3)}catch{}var u=r.valueCursor;if(o.setContent(r.props.value),!r.inline||o.hasFocus())for(var c=0,d=[l,u];c<d.length;c++){var h=d[c];if(h)try{o.selection.moveToBookmark(h),r.valueCursor=h;break}catch{}}})}if(this.props.readonly!==n.readonly){var s=(a=this.props.readonly)!==null&&a!==void 0?a:!1;Ux(this.editor,s?"readonly":"design")}this.props.disabled!==n.disabled&&(Xx(this.editor)?this.editor.options.set("disabled",this.props.disabled):Ux(this.editor,this.props.disabled?"readonly":"design"))}},t.prototype.componentDidMount=function(){var n=this,r,i,a,o,s;if(hI(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(i=(r=this.props).onScriptsLoadError)===null||i===void 0||i.call(r,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((a=this.elementRef.current)===null||a===void 0)&&a.ownerDocument){var l=function(){var c,d;(d=(c=n.props).onScriptsLoad)===null||d===void 0||d.call(c),n.initialise()},u=function(c){var d,h;(h=(d=n.props).onScriptsLoadError)===null||h===void 0||h.call(d,c)};IZ.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(s=(o=this.props.scriptLoading)===null||o===void 0?void 0:o.delay)!==null&&s!==void 0?s:0,l,u)}},t.prototype.componentWillUnmount=function(){var n=this,r=this.editor;r&&(r.off(v0,this.handleEditorChange),r.off(this.beforeInputEvent(),this.handleBeforeInput),r.off("keypress",this.handleEditorChangeSpecial),r.off("keydown",this.handleBeforeInputSpecial),r.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(i){r.off(i,n.boundHandlers[i])}),this.boundHandlers={},r.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.beforeInputEvent=function(){return yZ()?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var n=this.props.tagName,r=n===void 0?"div":n;return J.createElement(r,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return J.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var n,r,i=(n=this.props.scriptLoading)===null||n===void 0?void 0:n.async,a=(r=this.props.scriptLoading)===null||r===void 0?void 0:r.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:i,defer:a}]:this.props.tinymceScriptSrc.map(function(u){return typeof u=="string"?{src:u,async:i,defer:a}:u});var o=this.props.cloudChannel,s=this.props.apiKey?this.props.apiKey:"no-api-key",l="https://cdn.tiny.cloud/1/".concat(s,"/tinymce/").concat(o,"/tinymce.min.js");return[{src:l,async:i,defer:a}]},t.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},t.prototype.bindHandlers=function(n){var r=this;if(this.editor!==void 0){bZ(this.editor,n,this.props,this.boundHandlers,function(s){return r.props[s]});var i=function(s){return s.onEditorChange!==void 0||s.value!==void 0},a=i(n),o=i(this.props);!a&&o?(this.editor.on(v0,this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):a&&!o&&(this.editor.off(v0,this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=pZ,t.defaultProps={cloudChannel:"7"},t}(J.Component);const AZ=e=>_.jsx("div",{className:`${lZ.container}`,children:_.jsx(DZ,{..._l(oZ({label:e.label}),e)})}),TZ=({children:e,open:t,className:n,id:r,classNameContainer:i})=>(I.useLayoutEffect(()=>{const a=document.getElementById(r),o=document.getElementById(`inner-${r}`);if(!a||!o)return;const s=new ResizeObserver(()=>{const l=o.getBoundingClientRect().height;a.style.height=`${l}px`});if(t){const l=o.getBoundingClientRect().height;a.style.height=`${l}px`,s.observe(o)}else a.style.height="0px";return()=>{s.disconnect()}},[t,r]),_.jsx("div",{id:r,className:`${Qw.collapse} ${i??""}`,style:{height:0},children:_.jsx("div",{id:`inner-${r}`,className:n??"",children:e})})),RZ="_selected_dsej5_541",BZ="_error_dsej5_546",$Z="_disabled_dsej5_550",Bt={"container-time-range":"_container-time-range_dsej5_133","time-range-header":"_time-range-header_dsej5_133","text-to":"_text-to_dsej5_133","time-range":"_time-range_dsej5_133","time-range-body":"_time-range-body_dsej5_133","list-time":"_list-time_dsej5_133","container-time":"_container-time_dsej5_133","title-time":"_title-time_dsej5_133","cell-time":"_cell-time_dsej5_133","time-range-divider":"_time-range-divider_dsej5_502","container-cell-time":"_container-cell-time_dsej5_524",selected:RZ,error:BZ,disabled:$Z,"time-range-footer":"_time-range-footer_dsej5_557"},zo=(e,t=2)=>String(e).padStart(t,"0"),Zx=(e,t)=>e[0][0]&&e[0][1]&&e[1][0]&&e[1][1]?`${e[0][0]}:${e[0][1]} - ${e[1][0]}:${e[1][1]}`:io[t]["Select Time"],io={"en-US":{to:"to",Hour:"Hour",Minute:"Minute","Select Time":"Select Time",Reset:"Reset",Apply:"Apply"},"id-ID":{to:"to",Hour:"Jam",Minute:"Menit","Select Time":"Pilih Waktu",Reset:"Reset",Apply:"Terapkan"},"zh-CN":{to:"到",Hour:"小时",Minute:"分钟","Select Time":"选择时间",Reset:"重置",Apply:"应用"},"nl-NL":{to:"tot",Hour:"Uur",Minute:"Minuten","Select Time":"Select Time",Reset:"Reset",Apply:"Toepassen"}},Zs=[["",""],["",""]],kZ=e=>{const{id:t="time-range",classNameContainer:n,value:r=Zs,buttonClick:i,zIndexPopper:a=1,offsetPopover:o=5,floatingOptions:s,locale:l="id-ID",disableValidation:u=!1}=e,c=I.useRef(null),[d,h]=I.useState(Zs),f=(b,v)=>{if(v==="start"){const x=[b,d[1]];h(x)}else{const x=[d[0],b];h(x)}},g=b=>{var v;(v=c.current)==null||v.handlerShow(b),h(r||Zs)},p=()=>{var b;typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(Zs),h(Zs),(b=c.current)==null||b.setShow(!1)},m=()=>{var B;const b=Number(d[0][0]),v=Number(d[0][1]),x=Number(d[1][0]),C=Number(d[1][1]),E=d[0][0]&&d[0][1]&&d[1][0]&&d[1][1],w=b<x||b===x&&v<=C;E&&(w||u)&&(typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(d),(B=c.current)==null||B.setShow(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:t,onClick:g,className:n,children:typeof i=="function"?i(r,Zx(r,l)):r?Zx(r,l):io[l]["Select Time"]}),_.jsx(gi,{zIndex:a,ref:c,offset:o,id:`${t}-popover`,floatingOptions:{placement:"bottom-end",...s},className:"1ru-flex 1ru-flex-col",children:_.jsxs("div",{className:Bt["container-time-range"],children:[_.jsxs("div",{className:Bt["time-range-header"],children:[_.jsx("div",{className:Bt["time-range"],children:d[0][0]&&d[0][1]?`${d[0][0]}:${d[0][1]}`:"--:--"}),_.jsx("p",{className:Bt["text-to"],children:io[l].to}),_.jsx("div",{className:Bt["time-range"],children:d[1][0]&&d[1][1]?`${d[1][0]}:${d[1][1]}`:"--:--"})]}),_.jsxs("div",{className:Bt["time-range-body"],children:[_.jsx(Yx,{type:"start",value:[d[0][0],d[0][1]],onChange:b=>f(b,"start"),locale:l,values:d,disableValidation:u}),_.jsx("div",{className:Bt["time-range-divider"]}),_.jsx(Yx,{type:"end",value:[d[1][0],d[1][1]],onChange:b=>f(b,"end"),locale:l,values:d,disableValidation:u})]}),_.jsxs("div",{className:`${Bt["time-range-footer"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?_.jsx("div",{onClick:p,children:e.buttonReset()}):_.jsx(jn,{variants:"nude-laba-blue-10",size:"small",onClick:p,children:io[l].Reset}),typeof(e==null?void 0:e.buttonSubmit)=="function"?_.jsx("div",{onClick:m,children:e.buttonSubmit()}):_.jsx(jn,{size:"small",onClick:m,children:io[l].Apply})]})]})})]})},Yx=e=>{const{value:t,onChange:n,type:r,locale:i,values:a,disableValidation:o}=e,s=(f,g,p)=>Array.from({length:(g-f)/p+1},(m,b)=>f+b*p),l=()=>{const f=document.getElementById(`time-range-${r}-hour-${t[0]}`),g=document.getElementById(`time-range-${r}-minute-${t[1]}`),p=document.getElementById(`time-range-${r}-hour`),m=document.getElementById(`time-range-${r}-minute`);f&&p&&p.scrollTo({behavior:"instant",top:f.offsetTop-75}),g&&m&&m.scrollTo({behavior:"instant",top:g.offsetTop-75})},u=f=>{if(r==="start"||o)return!1;{if(!a[0][0])return!1;const g=Number(a[0][0]);return f<g}},c=f=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const g=Number(a[0][0]),p=Number(a[1][0]),m=Number(a[0][1]);return g===p&&f<m}},d=f=>{if(r==="start"||o)return!1;{const g=Number(a[0][0]);return f<g}},h=f=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const g=Number(a[0][0]),p=Number(a[1][0]),m=Number(a[0][1]);return g===p&&f<m}};return I.useEffect(()=>{l()},[]),_.jsxs("div",{className:Bt["list-time"],children:[_.jsxs("div",{className:Bt["container-time"],children:[_.jsx("p",{className:Bt["title-time"],children:io[i].Hour}),_.jsx("div",{id:`time-range-${r}-hour`,className:Bt["container-cell-time"],children:s(0,23,1).map(f=>_.jsx("div",{id:`time-range-${r}-hour-${f}`,className:`${Bt["cell-time"]} ${t[0]===zo(f)?Bt.selected:""} ${u(f)?Bt.error:""} ${d(f)?Bt.disabled:""}`,onClick:()=>n([zo(f),t[1]]),children:zo(f)},f))})]}),_.jsxs("div",{className:Bt["container-time"],children:[_.jsx("p",{className:Bt["title-time"],children:io[i].Minute}),_.jsx("div",{id:`time-range-${r}-minute`,className:Bt["container-cell-time"],children:s(0,59,1).map(f=>_.jsx("div",{id:`time-range-${r}-minute-${f}`,className:`${Bt["cell-time"]} ${t[1]===zo(f)?Bt.selected:""} ${c(f)?Bt.error:""} ${h(f)?Bt.disabled:""}`,onClick:()=>n([t[0],zo(f)]),children:zo(f)},f))})]})]})},PZ="_container_4603f_421",FZ="_textarea_4603f_421",NZ="_label_4603f_421",MZ="_error_4603f_517",Ur={container:PZ,"size-large":"_size-large_4603f_421","container-textarea":"_container-textarea_4603f_421",textarea:FZ,"label-error":"_label-error_4603f_421","size-small":"_size-small_4603f_421",label:NZ,error:MZ},LZ={size:{large:Ur["size-large"],small:Ur["size-small"]}},pI=I.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,error:c,height:d,minHeight:h=94,maxHeight:f=150,style:g,sizeInput:p="large",...m}=e,b=I.useRef(null),v=If(b,t),x={...g??{},maxHeight:f,height:d??h,minHeight:h},[C,E]=I.useState(!1),w=function(S){var D;E(!0),(D=e.onFocus)==null||D.call(e,S)},B=function(S){var D;E(!1),(D=e.onBlur)==null||D.call(e,S)},y=function(S){const D=(S==null?void 0:S.target)??b.current;D.style.height="0px",D.style.height=D.scrollHeight+"px"};return wf(()=>(C&&b.current?b.current.addEventListener("input",y):y(),()=>{var S;(S=b.current)==null||S.removeEventListener("input",y)}),[C]),_.jsxs("div",{className:`${Ur.container}
|
|
225
225
|
${LZ.size[p]}
|
|
226
226
|
${r??""}`,children:[_.jsxs("div",{className:`${Ur["container-textarea"]}`,children:[_.jsx("textarea",{id:l??s,className:` ${c?Ur.error:""}
|
|
227
227
|
${Ur.textarea}
|
|
@@ -231,4 +231,4 @@ Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Q=ce(X,le,ee,z,H+"."
|
|
|
231
231
|
${m()?Nn["isset-left-icon"]:""}
|
|
232
232
|
${b()?Nn["isset-right-icon"]:""}
|
|
233
233
|
${i??""}`,ref:t,type:c,...p}),_.jsxs("div",{className:Nn["end-icon"],children:[typeof h=="function"&&h(),I.isValidElement(h)&&h]}),u&&_.jsxs("label",{htmlFor:l??s,className:`${Nn.label} ${p.disabled?Nn.disabled:""} ${a??""}`,children:[u," ",n&&_.jsx("span",{children:"*"})]})]}),f&&_.jsx("label",{className:`${Nn["label-error"]}
|
|
234
|
-
${p.disabled?Nn.disabled:""} ${o??""}`,children:f})]})});mI.displayName="InputInnerLabel";exports.AlertContainer=_B;exports.Badges=Xw;exports.BigNumber
|
|
234
|
+
${p.disabled?Nn.disabled:""} ${o??""}`,children:f})]})});mI.displayName="InputInnerLabel";exports.AlertContainer=_B;exports.Badges=Xw;exports.BigNumber=At;exports.Breadcrumbs=FH;exports.Button=jn;exports.ButtonIcon=Uw;exports.ButtonPopover=cI;exports.Calendar=Mf;exports.CalendarRange=zw;exports.CheckboxTable=xX;exports.Chips=Zw;exports.Collapse=VH;exports.CollapseV2=TZ;exports.ConfigColors=a4;exports.ConfigTable=cn;exports.DatePicker=mH;exports.DateRangePicker=Gw;exports.DefaultCheckedChecboxIcon=Yw;exports.DefaultRadioChecboxIcon=Kw;exports.DoughnutChart=vX;exports.ErrorMessage=TX;exports.FilterContainer=e5;exports.FilterDate=bH;exports.GradientBarChart=JX;exports.GradientLineChart=ZX;exports.InputFloatingInner=P4;exports.InputInnerLabel=mI;exports.InputNative=r1;exports.InputReguler=Bp;exports.LineChart=VX;exports.ListVirtualization=j2;exports.ModalDialog=WH;exports.MonthYearPicker=yX;exports.NumberFormat=Sj;exports.Pagination=FP;exports.PatternFormat=Ej;exports.Popover=gi;exports.PortalComponent=Om;exports.RadioCheckbox=Lf;exports.RadioCheckboxLabel=RH;exports.SelectDropdownContainer=$3;exports.SelectDropdownContainerComponents=x3;exports.Sidebar=Jw;exports.Step=LX;exports.StepIndicator=iZ;exports.Switch=xH;exports.TPublish=A9;exports.TabPanel=DP;exports.Table=xP;exports.TableSubComponent=CP;exports.TableVirtualization=Jp;exports.Tabs=_P;exports.TextEditor=AZ;exports.Textarea=d5;exports.TextareaFloatingInner=uI;exports.TextareaInnerLabel=pI;exports.TimeRange=kZ;exports.Timeline=XH;exports.Tooltip=jX;exports.TruncateComponent=Dj;exports.TypeBigNumber=Jd;exports.UploadFile=c5;exports.UploadImage=$j;exports.UploadMultipleFile=DX;exports.betweenBig=VB;exports.configNativeScreens=U0;exports.configScreens=D9;exports.configTypography=_9;exports.configTypographyLabaBisnis=s4;exports.configTypographyPayhere=o4;exports.convertBigNumbersToStrings=G0;exports.convertNumbersToBigNumbers=z0;exports.convertTextToJsonBigNumbers=w9;exports.cookieStorage=gB;exports.deepCompareEquals=vp;exports.deepMerge=aB;exports.defaultConfig=aC;exports.deleteKeysImmutable=JC;exports.deleteKeysMutable=iB;exports.encryptRSAOAEP=cB;exports.extractElementStringToOriginalValue=uB;exports.formatBigNumber=dB;exports.formatDate=qo;exports.formatDateRange=qR;exports.formatNumber=Ji;exports.groupByKey=qC;exports.isAccurateBigNumber=ci;exports.isAccurateNumber=KC;exports.lessThanBig=OB;exports.maxBig=MB;exports.minBig=NB;exports.moreThanBig=LB;exports.openAlert=DB;exports.parseBigDecimal=cf;exports.parseDecimal=pp;exports.parseFileName=O0;exports.removeKeyObjectEmptyValue=QR;exports.removeTrailingZeros=fB;exports.setDigit=df;exports.transformArrayMapping=tB;exports.transformArrayMappingObjectFC=nB;exports.transformArrayOfObjectToArray=bp;exports.transformArrayOfObjectToString=mp;exports.transformBigNumber=sB;exports.transformDataHistory=JR;exports.transformLatLong=eB;exports.transformNumber=oB;exports.transformSecondTime=rB;exports.transfromIsNan=lB;exports.useAsyncDebounce=O2;exports.useCombinedResizeObserver=uP;exports.useCountdown=lP;exports.useDeepCompareEffect=ba;exports.useDeepCompareMemoize=Ol;exports.useElementOrWindowMediaQuery=sP;exports.useEventListener=hP;exports.useMasonry=gP;exports.useMergeRefs=If;exports.useOtpInput=pP;exports.useStateRef=cP;exports.utilTable=Ck;
|