skuse-ui 0.1.0 → 0.1.1

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.
@@ -350,7 +350,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
350
350
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:l,tableRow:s}};function o(m,h,g,b){return u(d(m,g,b),m.align)}function s(m,h,g,b){const E=c(m,g,b),T=u([E]);return T.slice(0,T.indexOf(`
351
351
  `))}function l(m,h,g,b){const E=g.enter("tableCell"),T=g.enter("phrasing"),v=g.containerPhrasing(m,{...b,before:i,after:i});return T(),E(),v}function u(m,h){return i$(m,{align:h,alignDelimiters:r,padding:n,stringLength:a})}function d(m,h,g){const b=m.children;let E=-1;const T=[],v=h.enter("table");for(;++E<b.length;)T[E]=c(b[E],h,g);return v(),T}function c(m,h,g){const b=m.children;let E=-1;const T=[],v=h.enter("tableRow");for(;++E<b.length;)T[E]=l(b[E],m,h,g);return v(),T}function f(m,h,g){let b=bw.inlineCode(m,h,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function W$(){return{exit:{taskListCheckValueChecked:$y,taskListCheckValueUnchecked:$y,paragraph:Y$}}}function q$(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K$}}}function $y(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Y$(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const s=a[i];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function K$(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(o);let l=bw.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+o}}function X$(){return[NU(),UU(),JU(),U$(),W$()]}function Z$(e){return{extensions:[CU(),$U(),e$(),V$(e),q$()]}}const Q$={tokenize:a6,partial:!0},Ew={tokenize:i6,partial:!0},yw={tokenize:o6,partial:!0},xw={tokenize:s6,partial:!0},J$={tokenize:l6,partial:!0},Tw={name:"wwwAutolink",tokenize:n6,previous:Sw},vw={name:"protocolAutolink",tokenize:r6,previous:Aw},Kn={name:"emailAutolink",tokenize:t6,previous:ww},Ln={};function e6(){return{text:Ln}}let Nr=48;for(;Nr<123;)Ln[Nr]=Kn,Nr++,Nr===58?Nr=65:Nr===91&&(Nr=97);Ln[43]=Kn;Ln[45]=Kn;Ln[46]=Kn;Ln[95]=Kn;Ln[72]=[Kn,vw];Ln[104]=[Kn,vw];Ln[87]=[Kn,Tw];Ln[119]=[Kn,Tw];function t6(e,t,n){const r=this;let a,i;return o;function o(c){return!ad(c)||!ww.call(r,r.previous)||Cb(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return ad(c)?(e.consume(c),s):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(J$,d,u)(c):c===45||c===95||kt(c)?(i=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),a=!0,l}function d(c){return i&&a&&Lt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function n6(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!Sw.call(r,r.previous)||Cb(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Q$,e.attempt(Ew,e.attempt(yw,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function r6(e,t,n){const r=this;let a="",i=!1;return o;function o(c){return(c===72||c===104)&&Aw.call(r,r.previous)&&!Cb(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Lt(c)&&a.length<5)return a+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const f=a.toLowerCase();if(f==="http"||f==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),i?u:(i=!0,l)):n(c)}function u(c){return c===null||Vs(c)||je(c)||zr(c)||$l(c)?n(c):e.attempt(Ew,e.attempt(yw,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function a6(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function i6(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(xw,l,s)(u):u===null||je(u)||zr(u)||u!==45&&$l(u)?l(u):(i=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function l(u){return a||r||!i?n(u):t(u)}}function o6(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xw,t,i)(o):o===null||je(o)||zr(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function s6(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),a):s===60||s===null||je(s)||zr(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||je(s)||zr(s)?t(s):r(s)}function i(s){return Lt(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Lt(s)?(e.consume(s),o):n(s)}}function l6(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return kt(i)?n(i):t(i)}}function Sw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||je(e)}function Aw(e){return!Lt(e)}function ww(e){return!(e===47||ad(e))}function ad(e){return e===43||e===45||e===46||e===95||kt(e)}function Cb(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const u6={tokenize:b6,partial:!0};function c6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:m6,continuation:{tokenize:h6},exit:g6}},text:{91:{name:"gfmFootnoteCall",tokenize:f6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d6,resolveTo:p6}}}}function d6(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const u=mn(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function p6(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function f6(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(i>999||c===93&&!o||c===null||c===91||je(c))return n(c);if(c===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return a.includes(mn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return je(c)||(o=!0),i++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),i++,u):u(c)}}function m6(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(h)}function d(h){if(o>999||h===93&&!s||h===null||h===91||je(h))return n(h);if(h===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return i=mn(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return je(h)||(s=!0),o++,e.consume(h),h===92?c:d}function c(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a.includes(i)||a.push(i),Pe(e,m,"gfmFootnoteDefinitionWhitespace")):n(h)}function m(h){return t(h)}}function h6(e,t,n){return e.check(Ro,t,e.attempt(u6,t,n))}function g6(e){e.exit("gfmFootnoteDefinition")}function b6(e,t,n){const r=this;return Pe(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function E6(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},f=[["enter",d,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],m=s.parser.constructs.insideSpan.null;m&&Kt(f,f.length,0,jl(m,o.slice(u+1,l),s)),Kt(f,f.length,0,[["exit",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",d,s]]),Kt(o,u-1,l-u+3,f),l=u+f.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){const u=this.previous,d=this.events;let c=0;return f;function f(h){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(h):(o.enter("strikethroughSequenceTemporary"),m(h))}function m(h){const g=ja(u);if(h===126)return c>1?l(h):(o.consume(h),c++,m);if(c<2&&!n)return l(h);const b=o.exit("strikethroughSequenceTemporary"),E=ja(h);return b._open=!E||E===2&&!!g,b._close=!g||g===2&&!!E,s(h)}}}class y6{constructor(){this.map=[]}add(t,n,r){x6(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let a=r.pop();for(;a;)t.push(...a),a=r.pop();this.map.length=0}}function x6(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function T6(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function v6(){return{flow:{null:{name:"table",tokenize:S6,resolveAll:A6}}}}function S6(e,t,n){const r=this;let a=0,i=0,o;return s;function s(O){let M=r.events.length-1;for(;M>-1;){const z=r.events[M][1].type;if(z==="lineEnding"||z==="linePrefix")M--;else break}const P=M>-1?r.events[M][1].type:null,j=P==="tableHead"||P==="tableRow"?A:l;return j===A&&r.parser.lazy[r.now().line]?n(O):j(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(o=!0,i+=1),d(O)}function d(O){return O===null?n(O):ve(O)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),m):n(O):Ie(O)?Pe(e,d,"whitespace")(O):(i+=1,o&&(o=!1,a+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),c(O)))}function c(O){return O===null||O===124||je(O)?(e.exit("data"),d(O)):(e.consume(O),O===92?f:c)}function f(O){return O===92||O===124?(e.consume(O),c):c(O)}function m(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,Ie(O)?Pe(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),g):w(O)}function g(O){return Ie(O)?Pe(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(i+=1,E(O)):O===null||ve(O)?S(O):w(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),T(O)):w(O)}function T(O){return O===45?(e.consume(O),T):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return Ie(O)?Pe(e,S,"whitespace")(O):S(O)}function S(O){return O===124?h(O):O===null||ve(O)?!o||a!==i?w(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):w(O)}function w(O){return n(O)}function A(O){return e.enter("tableRow"),_(O)}function _(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),_):O===null||ve(O)?(e.exit("tableRow"),t(O)):Ie(O)?Pe(e,_,"whitespace")(O):(e.enter("data"),D(O))}function D(O){return O===null||O===124||je(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?I:D)}function I(O){return O===92||O===124?(e.consume(O),D):D(O)}}function A6(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,d,c;const f=new y6;for(;++n<e.length;){const m=e[n],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(jy(f,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,c=void 0,i=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",d,t]])),a=h.type==="tableDelimiterRow"?2:d?3:1):a&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],c=ls(f,t,i,a,void 0,c),i=[0,0,0,0]),o[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],c=ls(f,t,i,a,void 0,c)),i=o,o=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],c=ls(f,t,i,a,n,c)):o[1]!==0&&(c=ls(f,t,o,a,n,c)),a=0):a&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&jy(f,t,l,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=T6(t.events,n))}return e}function ls(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},xa(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=xa(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=xa(t.events,n[2]),d=xa(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const f=t.events[n[2]],m=t.events[n[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,g=n[3]-n[2]-1;e.add(h,g,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return a!==void 0&&(i.end=Object.assign({},xa(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function jy(e,t,n,r,a){const i=[],o=xa(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function xa(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const w6={name:"tasklistCheck",tokenize:N6};function _6(){return{text:{91:w6}}}function N6(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return je(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ve(l)?t(l):Ie(l)?e.check({tokenize:C6},t,n)(l):n(l)}}function C6(e,t,n){return Pe(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function k6(e){return jA([e6(),c6(),E6(e),v6(),_6()])}const I6={};function R6(e){const t=this,n=e||I6,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(k6(n)),i.push(X$()),o.push(Z$(n))}const O6=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,D6=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,L6=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{It(n,"blockquote",(r,a,i)=>{let o="",s="",l=!0,u=r.children.map(d=>{if(l&&d.type==="paragraph"){const c=d.children[0],f=c.type==="text"?c.value:"",m=e?D6:O6,h=f.match(m);if(h&&(l=!1,o=h[1].toLocaleLowerCase(),s=e&&h[2]||o.toLocaleUpperCase(),f.includes(`
352
352
  `)&&(d.children[0]={type:"text",value:f.replace(m,"").replace(/^\n+/,"")}),!f.includes(`
353
- `))){const g=[];d.children.forEach((b,E)=>{E!=0&&(E==1&&b.type==="break"||g.push(b))}),d.children=[...g]}}return d});o&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${o}`,dir:"auto"}},u.unshift({type:"paragraph",children:[P6(o),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function P6(e){let t=F6[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const F6={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function M6(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let a=!1;try{a=!!document.execCommand("copy")}catch{a=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(a)}function _w(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?_w(t.parentElement):null}function B6(e){var t=n=>{var r=_w(n.target);r&&(r.classList.add("active"),M6(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};R.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var a;(a=e.current)==null||a.removeEventListener("click",t,!1)}},[e])}var U6=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],$6=e=>e;const j6=R.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:a,style:i,disableCopy:o=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:d,wrapperElement:c={},warpperElement:f={},urlTransform:m}=e,h=_M(e,U6),g=R.useRef(null);R.useImperativeHandle(t,()=>nt({},e,{mdp:g}),[g,e]);var b=(n||"")+" "+(r||"");B6(g);var E=[...h.rehypePlugins||[]],T={allowElement:(w,A,_)=>h.allowElement?h.allowElement(w,A,_):/^[A-Za-z0-9]+$/.test(w.tagName)};s&&E.push(LA);var v=[L6,...h.remarkPlugins||[],R6],S=nt({},f,c);return p.jsx("div",nt({ref:g,onScroll:l,onMouseOver:u},S,{className:b,style:i,children:p.jsx(xU,nt({},T,h,{skipHtml:s,urlTransform:m||$6,rehypePlugins:d?d("rehype",E):E,remarkPlugins:d?d("remark",v):v,children:a||""}))}))});var H6=function(t){return n=>{It(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=nt({},r.properties,{"data-meta":String(r.data.meta)}))})}},z6=function(t){return n=>{It(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var a=r.properties.dataMeta;typeof a=="string"&&(r.data.meta=a),delete r.properties.dataMeta}})}};const G6=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,V6=Object.hasOwnProperty;class W6{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let a=q6(t,n===!0);const i=a;for(;V6.call(r.occurrences,a);)r.occurrences[i]++,a=i+"-"+r.occurrences[i];return r.occurrences[a]=0,a}reset(){this.occurrences=Object.create(null)}}function q6(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(G6,"").replace(/ /g,"-"))}function Nw(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const Y6={},Hy=new W6;function K6(e){const n=(e||Y6).prefix||"";return function(r){Hy.reset(),It(r,"element",function(a){Nw(a)&&!a.properties.id&&(a.properties.id=n+Hy.slug(Sa(a)))})}}const kb=function(e){if(e==null)return Q6;if(typeof e=="string")return Z6(e);if(typeof e=="object")return X6(e);if(typeof e=="function")return Ib(e);throw new Error("Expected function, string, or array as `test`")};function X6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kb(e[n]);return Ib(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Z6(e){return Ib(t);function t(n){return n.tagName===e}}function Ib(e){return t;function t(n,r,a){return!!(J6(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Q6(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function J6(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const zy={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},ej={};function tj(e){const t=e||ej;let n=t.properties;const r=t.headingProperties,a=t.behavior||"prepend",i=t.content,o=t.group,s=kb(t.test);let l;return a==="after"||a==="before"?l=d:a==="wrap"?l=c:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(f){It(f,"element",function(m,h,g){if(Nw(m)&&m.properties.id&&s(m,h,g))return Object.assign(m.properties,us(r,m)),l(m,h,g)})};function u(f){const m=Gy(i||zy,f);return f.children[a==="prepend"?"unshift":"push"](nc(f,us(n,f),m)),[Pi]}function d(f,m,h){if(typeof m!="number"||!h)return;const g=Gy(i||zy,f),b=nc(f,us(n,f),g);let E=a==="before"?[b,f]:[f,b];if(o){const T=Cw(o,f);T&&!Array.isArray(T)&&T.type==="element"&&(T.children=E,E=[T])}return h.children.splice(m,1,...E),[Pi,m+E.length]}function c(f){let m=f.children,h=[];return typeof i=="function"?(m=[],h=i(f)):i&&(h=Rb(i)),f.children=[nc(f,us(n,f),Array.isArray(h)?[...m,...h]:[...m,h])],[Pi]}}function Rb(e){return fn(e)}function nc(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function Gy(e,t){const n=Cw(e,t);return Array.isArray(n)?n:[n]}function Cw(e,t){return typeof e=="function"?e(t):Rb(e)}function us(e,t){return typeof e=="function"?e(t):e?Rb(e):{}}const nj=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{It(r,(a,i,o)=>{if(a.type==="element"||a.type==="root"){let s=!1;a.children=a.children.filter(l=>{if(l.type==="raw"||l.type==="comment"){let u=(l.value||"").trim();if(u=u.replace(/^<!--(.*?)-->/,"$1"),u===t)return s=!0,!1;if(u===n)return s=!1,!1}return!s})}})}};var rj={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function aj(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var ij=(e,t)=>(n,r,a)=>{if(n.type==="element"&&a&&a.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var i=n.children&&n.children[0];i&&i.properties&&i.properties.ariaHidden==="true"&&(i.properties=nt({class:"anchor"},i.properties),i.children=[rj])}if(n.type==="element"&&n.tagName==="pre"&&!e){var o=zS(n.children);n.children.push(aj(o))}t&&t(n,r===null?void 0:r,a===null?void 0:a)},oj=[K6,tj,nj];const sj=R.forwardRef((e,t)=>{var n,r=[H6,LA,z6,...oj,[s2,{rewrite:ij((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[c2,{properties:"attr"}],...e.rehypePlugins||[],[qD,{ignoreMissing:!0}]];return p.jsx(j6,nt({},e,{rehypePlugins:r,ref:t}))}),Cr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Or={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Cr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Cr],h2:[["className","sr-only"]],img:[...Cr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Cr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Cr],table:[...Cr],ul:[...Cr,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ar={}.hasOwnProperty;function lj(e,t){let n={type:"root",children:[]};const r={schema:t?{...Or,...t}:Or,stack:[]},a=kw(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function kw(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return uj(e,n);case"doctype":return cj(e,n);case"element":return dj(e,n);case"root":return pj(e,n);case"text":return fj(e,n)}}}function uj(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Do(i,t),i}}function cj(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Do(n,t),n}}function dj(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Iw(e,t.children),a=mj(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&ar.call(e.schema.ancestors,n))){const s=e.schema.ancestors[n];let l=-1;for(i=!1;++l<s.length;)e.stack.includes(s[l])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const o={type:"element",tagName:n,properties:a,children:r};return Do(o,t),o}function pj(e,t){const r={type:"root",children:Iw(e,t.children)};return Do(r,t),r}function fj(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Do(r,t),r}function Iw(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=kw(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function mj(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&ar.call(r,n)?r[n]:void 0,o=r&&ar.call(r,"*")?r["*"]:void 0,s=t&&typeof t=="object"?t:{},l={};let u;for(u in s)if(ar.call(s,u)){const d=s[u];let c=Vy(e,Wy(i,u),u,d);c==null&&(c=Vy(e,Wy(o,u),u,d)),c!=null&&(l[u]=c)}if(a&&ar.call(a,n)){const d=a[n];for(u in d)ar.call(d,u)&&!ar.call(l,u)&&(l[u]=d[u])}return l}function Vy(e,t,n,r){return t?Array.isArray(r)?hj(e,t,n,r):Rw(e,t,n,r):void 0}function hj(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const o=Rw(e,t,n,r[a]);(typeof o=="number"||typeof o=="string")&&i.push(o)}return i}function Rw(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&gj(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const o=t[i];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(r))){a=!0;break}}else if(o===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function gj(e,t,n){const r=e.schema.protocols&&ar.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),o=a.indexOf("?"),s=a.indexOf("#"),l=a.indexOf("/");if(i<0||l>-1&&i>l||o>-1&&i>o||s>-1&&i>s)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(i===d.length&&a.slice(0,d.length)===d)return!0}return!1}function Do(e,t){const n=kA(t);t.data&&(e.data=fn(t.data)),n&&(e.position=n)}function Wy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function bj(e){return function(t){return lj(t,e)}}const Ej=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,yj=/^[a-zA-Z]:\\/;function xj(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return yj.test(e)?!1:Ej.test(e)}const Tj=["http","https"],vj=["nofollow"],Sj={};function Aj(e){const t=e||Sj,n=t.protocols||Tj,r=kb(t.test);return function(a){It(a,"element",function(i,o,s){if(i.tagName==="a"&&typeof i.properties.href=="string"&&r(i,o,s)){const l=i.properties.href;if(xj(l)?n.includes(l.slice(0,l.indexOf(":"))):l.startsWith("//")){const u=Ti(t.content,i),d=u&&!Array.isArray(u)?[u]:u,c=Ti(t.rel,i)||vj,f=typeof c=="string"?Ua(c):c,m=Ti(t.target,i),h=Ti(t.properties,i);if(h&&Object.assign(i.properties,fn(h)),f.length>0&&(i.properties.rel=[...f]),m&&(i.properties.target=m),d){const g=Ti(t.contentProperties,i)||{};i.children.push({type:"element",tagName:"span",properties:fn(g),children:fn(d)})}}}})}}function Ti(e,t){return typeof e=="function"?e(t):e}const qy=e=>setTimeout(e,0),wj=()=>{R.useEffect(()=>{const e=()=>{let n;try{n=decodeURIComponent(location.hash.slice(1)).toLowerCase()}catch{return}const r="user-content-"+n,a=document.getElementById(r)||document.getElementsByName(r)[0];a&&qy(()=>{a.scrollIntoView({behavior:"smooth"})})};e(),window.addEventListener("hashchange",e);const t=n=>{n.target&&n.target instanceof HTMLAnchorElement&&n.target.href===location.href&&location.hash.length>1&&qy(()=>{n.defaultPrevented||e()})};return document.addEventListener("click",t,!1),()=>{window.removeEventListener("hashchange",e),document.removeEventListener("click",t)}},[])};function st({markdown:e,className:t,style:n,maxLength:r,maxLines:a,languageCode:i}){var E,T;const[o,s]=R.useState(!1),[l,u]=R.useState(!1);wj(),i==="json"&&(e=JSON.stringify(JSON.parse(e),null,2));const d=i?"```"+i+`
353
+ `))){const g=[];d.children.forEach((b,E)=>{E!=0&&(E==1&&b.type==="break"||g.push(b))}),d.children=[...g]}}return d});o&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${o}`,dir:"auto"}},u.unshift({type:"paragraph",children:[P6(o),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function P6(e){let t=F6[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const F6={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function M6(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let a=!1;try{a=!!document.execCommand("copy")}catch{a=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(a)}function _w(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?_w(t.parentElement):null}function B6(e){var t=n=>{var r=_w(n.target);r&&(r.classList.add("active"),M6(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};R.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var a;(a=e.current)==null||a.removeEventListener("click",t,!1)}},[e])}var U6=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],$6=e=>e;const j6=R.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:a,style:i,disableCopy:o=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:d,wrapperElement:c={},warpperElement:f={},urlTransform:m}=e,h=_M(e,U6),g=R.useRef(null);R.useImperativeHandle(t,()=>nt({},e,{mdp:g}),[g,e]);var b=(n||"")+" "+(r||"");B6(g);var E=[...h.rehypePlugins||[]],T={allowElement:(w,A,_)=>h.allowElement?h.allowElement(w,A,_):/^[A-Za-z0-9]+$/.test(w.tagName)};s&&E.push(LA);var v=[L6,...h.remarkPlugins||[],R6],S=nt({},f,c);return p.jsx("div",nt({ref:g,onScroll:l,onMouseOver:u},S,{className:b,style:i,children:p.jsx(xU,nt({},T,h,{skipHtml:s,urlTransform:m||$6,rehypePlugins:d?d("rehype",E):E,remarkPlugins:d?d("remark",v):v,children:a||""}))}))});var H6=function(t){return n=>{It(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=nt({},r.properties,{"data-meta":String(r.data.meta)}))})}},z6=function(t){return n=>{It(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var a=r.properties.dataMeta;typeof a=="string"&&(r.data.meta=a),delete r.properties.dataMeta}})}};const G6=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,V6=Object.hasOwnProperty;class W6{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let a=q6(t,n===!0);const i=a;for(;V6.call(r.occurrences,a);)r.occurrences[i]++,a=i+"-"+r.occurrences[i];return r.occurrences[a]=0,a}reset(){this.occurrences=Object.create(null)}}function q6(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(G6,"").replace(/ /g,"-"))}function Nw(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const Y6={},Hy=new W6;function K6(e){const n=(e||Y6).prefix||"";return function(r){Hy.reset(),It(r,"element",function(a){Nw(a)&&!a.properties.id&&(a.properties.id=n+Hy.slug(Sa(a)))})}}const kb=function(e){if(e==null)return Q6;if(typeof e=="string")return Z6(e);if(typeof e=="object")return X6(e);if(typeof e=="function")return Ib(e);throw new Error("Expected function, string, or array as `test`")};function X6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kb(e[n]);return Ib(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Z6(e){return Ib(t);function t(n){return n.tagName===e}}function Ib(e){return t;function t(n,r,a){return!!(J6(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Q6(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function J6(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const zy={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},ej={};function tj(e){const t=e||ej;let n=t.properties;const r=t.headingProperties,a=t.behavior||"prepend",i=t.content,o=t.group,s=kb(t.test);let l;return a==="after"||a==="before"?l=d:a==="wrap"?l=c:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(f){It(f,"element",function(m,h,g){if(Nw(m)&&m.properties.id&&s(m,h,g))return Object.assign(m.properties,us(r,m)),l(m,h,g)})};function u(f){const m=Gy(i||zy,f);return f.children[a==="prepend"?"unshift":"push"](nc(f,us(n,f),m)),[Pi]}function d(f,m,h){if(typeof m!="number"||!h)return;const g=Gy(i||zy,f),b=nc(f,us(n,f),g);let E=a==="before"?[b,f]:[f,b];if(o){const T=Cw(o,f);T&&!Array.isArray(T)&&T.type==="element"&&(T.children=E,E=[T])}return h.children.splice(m,1,...E),[Pi,m+E.length]}function c(f){let m=f.children,h=[];return typeof i=="function"?(m=[],h=i(f)):i&&(h=Rb(i)),f.children=[nc(f,us(n,f),Array.isArray(h)?[...m,...h]:[...m,h])],[Pi]}}function Rb(e){return fn(e)}function nc(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function Gy(e,t){const n=Cw(e,t);return Array.isArray(n)?n:[n]}function Cw(e,t){return typeof e=="function"?e(t):Rb(e)}function us(e,t){return typeof e=="function"?e(t):e?Rb(e):{}}const nj=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{It(r,(a,i,o)=>{if(a.type==="element"||a.type==="root"){let s=!1;a.children=a.children.filter(l=>{if(l.type==="raw"||l.type==="comment"){let u=(l.value||"").trim();if(u=u.replace(/^<!--(.*?)-->/,"$1"),u===t)return s=!0,!1;if(u===n)return s=!1,!1}return!s})}})}};var rj={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function aj(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var ij=(e,t)=>(n,r,a)=>{if(n.type==="element"&&a&&a.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var i=n.children&&n.children[0];i&&i.properties&&i.properties.ariaHidden==="true"&&(i.properties=nt({class:"anchor"},i.properties),i.children=[rj])}if(n.type==="element"&&n.tagName==="pre"&&!e){var o=zS(n.children);n.children.push(aj(o))}t&&t(n,r===null?void 0:r,a===null?void 0:a)},oj=[K6,tj,nj];const sj=R.forwardRef((e,t)=>{var n,r=[H6,LA,z6,...oj,[s2,{rewrite:ij((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[c2,{properties:"attr"}],...e.rehypePlugins||[],[qD,{ignoreMissing:!0}]];return p.jsx(j6,nt({},e,{rehypePlugins:r,ref:t}))}),Cr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Or={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Cr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Cr],h2:[["className","sr-only"]],img:[...Cr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Cr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Cr],table:[...Cr],ul:[...Cr,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ar={}.hasOwnProperty;function lj(e,t){let n={type:"root",children:[]};const r={schema:t?{...Or,...t}:Or,stack:[]},a=kw(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function kw(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return uj(e,n);case"doctype":return cj(e,n);case"element":return dj(e,n);case"root":return pj(e,n);case"text":return fj(e,n)}}}function uj(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Do(i,t),i}}function cj(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Do(n,t),n}}function dj(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Iw(e,t.children),a=mj(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&ar.call(e.schema.ancestors,n))){const s=e.schema.ancestors[n];let l=-1;for(i=!1;++l<s.length;)e.stack.includes(s[l])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const o={type:"element",tagName:n,properties:a,children:r};return Do(o,t),o}function pj(e,t){const r={type:"root",children:Iw(e,t.children)};return Do(r,t),r}function fj(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Do(r,t),r}function Iw(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=kw(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function mj(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&ar.call(r,n)?r[n]:void 0,o=r&&ar.call(r,"*")?r["*"]:void 0,s=t&&typeof t=="object"?t:{},l={};let u;for(u in s)if(ar.call(s,u)){const d=s[u];let c=Vy(e,Wy(i,u),u,d);c==null&&(c=Vy(e,Wy(o,u),u,d)),c!=null&&(l[u]=c)}if(a&&ar.call(a,n)){const d=a[n];for(u in d)ar.call(d,u)&&!ar.call(l,u)&&(l[u]=d[u])}return l}function Vy(e,t,n,r){return t?Array.isArray(r)?hj(e,t,n,r):Rw(e,t,n,r):void 0}function hj(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const o=Rw(e,t,n,r[a]);(typeof o=="number"||typeof o=="string")&&i.push(o)}return i}function Rw(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&gj(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const o=t[i];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(r))){a=!0;break}}else if(o===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function gj(e,t,n){const r=e.schema.protocols&&ar.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),o=a.indexOf("?"),s=a.indexOf("#"),l=a.indexOf("/");if(i<0||l>-1&&i>l||o>-1&&i>o||s>-1&&i>s)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(i===d.length&&a.slice(0,d.length)===d)return!0}return!1}function Do(e,t){const n=kA(t);t.data&&(e.data=fn(t.data)),n&&(e.position=n)}function Wy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function bj(e){return function(t){return lj(t,e)}}const Ej=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,yj=/^[a-zA-Z]:\\/;function xj(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return yj.test(e)?!1:Ej.test(e)}const Tj=["http","https"],vj=["nofollow"],Sj={};function Aj(e){const t=e||Sj,n=t.protocols||Tj,r=kb(t.test);return function(a){It(a,"element",function(i,o,s){if(i.tagName==="a"&&typeof i.properties.href=="string"&&r(i,o,s)){const l=i.properties.href;if(xj(l)?n.includes(l.slice(0,l.indexOf(":"))):l.startsWith("//")){const u=Ti(t.content,i),d=u&&!Array.isArray(u)?[u]:u,c=Ti(t.rel,i)||vj,f=typeof c=="string"?Ua(c):c,m=Ti(t.target,i),h=Ti(t.properties,i);if(h&&Object.assign(i.properties,fn(h)),f.length>0&&(i.properties.rel=[...f]),m&&(i.properties.target=m),d){const g=Ti(t.contentProperties,i)||{};i.children.push({type:"element",tagName:"span",properties:fn(g),children:fn(d)})}}}})}}function Ti(e,t){return typeof e=="function"?e(t):e}const qy=e=>setTimeout(e,0),wj=()=>{R.useEffect(()=>{const e=()=>{let n;try{n=decodeURIComponent(location.hash.slice(1)).toLowerCase()}catch{return}const r="user-content-"+n,a=document.getElementById(r)||document.getElementsByName(r)[0];a&&qy(()=>{a.scrollIntoView({behavior:"smooth"})})};e(),window.addEventListener("hashchange",e);const t=n=>{n.target&&n.target instanceof HTMLAnchorElement&&n.target.href===location.href&&location.hash.length>1&&qy(()=>{n.defaultPrevented||e()})};return document.addEventListener("click",t,!1),()=>{window.removeEventListener("hashchange",e),document.removeEventListener("click",t)}},[])};function st({markdown:e,className:t,style:n,maxLength:r,maxLines:a,languageCode:i}){var E,T;const[o,s]=R.useState(!1),[l,u]=R.useState(!1);if(wj(),i==="json")try{e=JSON.stringify(JSON.parse(e),null,2)}catch{}const d=i?"```"+i+`
354
354
  `+e+"\n```":e,c=e.split(`
355
355
  `).length,f=!!a&&c>a,m=r&&d.length>r&&!o,h=m?d.slice(0,r)+"...":d,g=async()=>{u(!0),await new Promise(v=>setTimeout(v,300)),s(!0),u(!1)},b=p.jsx(sj,{source:h,rehypePlugins:[[bj,{...Or,attributes:{...Or.attributes,a:[...((E=Or.attributes)==null?void 0:E.a)||[],"class"],svg:["className","hidden","viewBox","fill","height","width","aria-hidden","version"],path:["fill-rule","d"],div:["className","class","data-code",...((T=Or.attributes)==null?void 0:T.div)||[]]},tagNames:[...Or.tagNames||[],"a","svg","path","div"]}],[Aj,{target:"_blank",rel:["noopener","noreferrer"]}]],style:{backgroundColor:"transparent",...n},className:t});return f?p.jsx("div",{className:"overflow-y-auto",style:{maxHeight:`${a*1.5}rem`},children:b}):p.jsxs("div",{className:"relative",children:[p.jsxs("div",{className:m?"relative":void 0,children:[b,m&&p.jsx("div",{className:"absolute bottom-0 left-0 w-full h-24 bg-gradient-to-t from-white dark:from-black to-transparent"})]}),m&&p.jsx("div",{className:"flex justify-center -mt-12 relative z-10",children:p.jsx(Qe,{variant:"outline",onClick:g,disabled:l,className:"rounded-full px-6 bg-white dark:bg-black shadow-md hover:shadow-lg transition-shadow",children:l?p.jsxs(p.Fragment,{children:[p.jsx(Ya,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):"See more"})})]})}function Ow(e){return btoa(Array.from(e,t=>String.fromCharCode(t)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _j(){const e=new Uint8Array(32);return crypto.getRandomValues(e),Ow(e)}async function Nj(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Ow(new Uint8Array(n))}function Hl(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cj(e,t=globalThis==null?void 0:globalThis.document){const n=Hl(e);x.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kj="DismissableLayer",id="dismissableLayer.update",Ij="dismissableLayer.pointerDownOutside",Rj="dismissableLayer.focusOutside",Yy,Dw=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Lw=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=x.useContext(Dw),[c,f]=x.useState(null),m=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),g=qn(t,I=>f(I)),b=Array.from(d.layers),[E]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),T=b.indexOf(E),v=c?b.indexOf(c):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,w=v>=T,A=x.useRef(!1),_=Lj(I=>{const O=I.target;if(!(O instanceof Node))return;const M=[...d.branches].some(P=>P.contains(O));!w||M||(i==null||i(I),s==null||s(I),I.defaultPrevented||l==null||l())},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:A,dismissableSurfaces:d.dismissableSurfaces}),D=Pj(I=>{if(r&&A.current)return;const O=I.target;[...d.branches].some(P=>P.contains(O))||(o==null||o(I),s==null||s(I),I.defaultPrevented||l==null||l())},m);return Cj(I=>{v===d.layers.size-1&&(a==null||a(I),!I.defaultPrevented&&l&&(I.preventDefault(),l()))},m),x.useEffect(()=>{if(c)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Yy=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),Ky(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(c),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=Yy))}},[c,m,n,d]),x.useEffect(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),Ky())},[c,d]),x.useEffect(()=>{const I=()=>h({});return document.addEventListener(id,I),()=>document.removeEventListener(id,I)},[]),p.jsx(vn.div,{...u,ref:g,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,_.onPointerDownCapture)})});Lw.displayName=kj;var Oj="DismissableLayerBranch",Dj=x.forwardRef((e,t)=>{const n=x.useContext(Dw),r=x.useRef(null),a=qn(t,r);return x.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(vn.div,{...e,ref:a})});Dj.displayName=Oj;function Lj(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:i}=t,o=Hl(e),s=x.useRef(!1),l=x.useRef(!1),u=x.useRef(new Map),d=x.useRef(()=>{});return x.useEffect(()=>{function c(){l.current=!1,a.current=!1,u.current.clear()}function f(){return Array.from(u.current.values()).some(Boolean)}function m(T){if(!l.current)return;const v=T.target;v instanceof Node&&[...i].some(w=>w.contains(v))||u.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{l.current&&d.current()},0)}function h(T){l.current&&u.current.set(T.type,!1)}const g=T=>{if(T.target&&!s.current){let v=function(){n.removeEventListener("click",d.current);const w=f();c(),w||Pw(Ij,o,S,{discrete:!0})};const S={originalEvent:T};l.current=!0,a.current=r&&T.button===0,u.current.clear(),!r||T.button!==0?v():(n.removeEventListener("click",d.current),d.current=v,n.addEventListener("click",d.current,{once:!0}))}else n.removeEventListener("click",d.current),c();s.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of b)n.addEventListener(T,m,!0),n.addEventListener(T,h);const E=window.setTimeout(()=>{n.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(E),n.removeEventListener("pointerdown",g),n.removeEventListener("click",d.current);for(const T of b)n.removeEventListener(T,m,!0),n.removeEventListener(T,h)}},[n,o,r,a,i]),{onPointerDownCapture:()=>s.current=!0}}function Pj(e,t=globalThis==null?void 0:globalThis.document){const n=Hl(e),r=x.useRef(!1);return x.useEffect(()=>{const a=i=>{i.target&&!r.current&&Pw(Rj,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ky(){const e=new CustomEvent(id);document.dispatchEvent(e)}function Pw(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?YO(a,i):a.dispatchEvent(i)}var Fj=x[" useId ".trim().toString()]||(()=>{}),Mj=0;function Bj(e){const[t,n]=x.useState(Fj());return jn(()=>{n(r=>r??String(Mj++))},[e]),t?`radix-${t}`:""}const Uj=["top","right","bottom","left"],pr=Math.min,qt=Math.max,qs=Math.round,cs=Math.floor,kn=e=>({x:e,y:e}),$j={left:"right",right:"left",bottom:"top",top:"bottom"},jj={start:"end",end:"start"};function od(e,t,n){return qt(e,pr(t,n))}function Vn(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function li(e){return e.split("-")[1]}function Ob(e){return e==="x"?"y":"x"}function Db(e){return e==="y"?"height":"width"}function fr(e){return["top","bottom"].includes(Wn(e))?"y":"x"}function Lb(e){return Ob(fr(e))}function Hj(e,t,n){n===void 0&&(n=!1);const r=li(e),a=Lb(e),i=Db(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ys(o)),[o,Ys(o)]}function zj(e){const t=Ys(e);return[sd(e),t,sd(t)]}function sd(e){return e.replace(/start|end/g,t=>jj[t])}function Gj(e,t,n){const r=["left","right"],a=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?i:o;default:return[]}}function Vj(e,t,n,r){const a=li(e);let i=Gj(Wn(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(sd)))),i}function Ys(e){return e.replace(/left|right|bottom|top/g,t=>$j[t])}function Wj(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fw(e){return typeof e!="number"?Wj(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Xy(e,t,n){let{reference:r,floating:a}=e;const i=fr(t),o=Lb(t),s=Db(o),l=Wn(t),u=i==="y",d=r.x+r.width/2-a.width/2,c=r.y+r.height/2-a.height/2,f=r[s]/2-a[s]/2;let m;switch(l){case"top":m={x:d,y:r.y-a.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:c};break;case"left":m={x:r.x-a.width,y:c};break;default:m={x:r.x,y:r.y}}switch(li(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const qj=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,s=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:c}=Xy(u,r,l),f=r,m={},h=0;for(let g=0;g<s.length;g++){const{name:b,fn:E}=s[g],{x:T,y:v,data:S,reset:w}=await E({x:d,y:c,initialPlacement:r,placement:f,strategy:a,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=T??d,c=v??c,m={...m,[b]:{...m[b],...S}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(u=w.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:d,y:c}=Xy(u,f,l)),g=-1)}return{x:d,y:c,placement:f,strategy:a,middlewareData:m}};async function to(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:m=0}=Vn(t,e),h=Fw(m),b=s[f?c==="floating"?"reference":"floating":c],E=Ks(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),T=c==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},w=Ks(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:T,offsetParent:v,strategy:l}):T);return{top:(E.top-w.top+h.top)/S.y,bottom:(w.bottom-E.bottom+h.bottom)/S.y,left:(E.left-w.left+h.left)/S.x,right:(w.right-E.right+h.right)/S.x}}const Yj=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=Vn(e,t)||{};if(u==null)return{};const c=Fw(d),f={x:n,y:r},m=Lb(a),h=Db(m),g=await o.getDimensions(u),b=m==="y",E=b?"top":"left",T=b?"bottom":"right",v=b?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[m]-f[m]-i.floating[h],w=f[m]-i.reference[m],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let _=A?A[v]:0;(!_||!await(o.isElement==null?void 0:o.isElement(A)))&&(_=s.floating[v]||i.floating[h]);const D=S/2-w/2,I=_/2-g[h]/2-1,O=pr(c[E],I),M=pr(c[T],I),P=O,j=_-g[h]-M,z=_/2-g[h]/2+D,W=od(P,z,j),H=!l.arrow&&li(a)!=null&&z!==W&&i.reference[h]/2-(z<P?O:M)-g[h]/2<0,X=H?z<P?z-P:z-j:0;return{[m]:f[m]+X,data:{[m]:W,centerOffset:z-W-X,...H&&{alignmentOffset:X}},reset:H}}}),Kj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=Vn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Wn(a),T=fr(s),v=Wn(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=f||(v||!g?[Ys(s)]:zj(s)),A=h!=="none";!f&&A&&w.push(...Vj(s,g,h,S));const _=[s,...w],D=await to(t,b),I=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&I.push(D[E]),c){const z=Hj(a,o,S);I.push(D[z[0]],D[z[1]])}if(O=[...O,{placement:a,overflows:I}],!I.every(z=>z<=0)){var M,P;const z=(((M=i.flip)==null?void 0:M.index)||0)+1,W=_[z];if(W)return{data:{index:z,overflows:O},reset:{placement:W}};let H=(P=O.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:P.placement;if(!H)switch(m){case"bestFit":{var j;const X=(j=O.filter(Z=>{if(A){const G=fr(Z.placement);return G===T||G==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(G=>G>0).reduce((G,k)=>G+k,0)]).sort((Z,G)=>Z[1]-G[1])[0])==null?void 0:j[0];X&&(H=X);break}case"initialPlacement":H=s;break}if(a!==H)return{reset:{placement:H}}}return{}}}};function Zy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qy(e){return Uj.some(t=>e[t]>=0)}const Xj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Vn(e,t);switch(r){case"referenceHidden":{const i=await to(t,{...a,elementContext:"reference"}),o=Zy(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Qy(o)}}}case"escaped":{const i=await to(t,{...a,altBoundary:!0}),o=Zy(i,n.floating);return{data:{escapedOffsets:o,escaped:Qy(o)}}}default:return{}}}}};async function Zj(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=Wn(n),s=li(n),l=fr(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,c=Vn(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const Qj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:s}=t,l=await Zj(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},Jj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:s={fn:b=>{let{x:E,y:T}=b;return{x:E,y:T}}},...l}=Vn(e,t),u={x:n,y:r},d=await to(t,l),c=fr(Wn(a)),f=Ob(c);let m=u[f],h=u[c];if(i){const b=f==="y"?"top":"left",E=f==="y"?"bottom":"right",T=m+d[b],v=m-d[E];m=od(T,m,v)}if(o){const b=c==="y"?"top":"left",E=c==="y"?"bottom":"right",T=h+d[b],v=h-d[E];h=od(T,h,v)}const g=s.fn({...t,[f]:m,[c]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[c]:o}}}}}},e5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Vn(e,t),d={x:n,y:r},c=fr(a),f=Ob(c);let m=d[f],h=d[c];const g=Vn(s,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const v=f==="y"?"height":"width",S=i.reference[f]-i.floating[v]+b.mainAxis,w=i.reference[f]+i.reference[v]-b.mainAxis;m<S?m=S:m>w&&(m=w)}if(u){var E,T;const v=f==="y"?"width":"height",S=["top","left"].includes(Wn(a)),w=i.reference[c]-i.floating[v]+(S&&((E=o.offset)==null?void 0:E[c])||0)+(S?0:b.crossAxis),A=i.reference[c]+i.reference[v]+(S?0:((T=o.offset)==null?void 0:T[c])||0)-(S?b.crossAxis:0);h<w?h=w:h>A&&(h=A)}return{[f]:m,[c]:h}}}},t5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...u}=Vn(e,t),d=await to(t,u),c=Wn(a),f=li(a),m=fr(a)==="y",{width:h,height:g}=i.floating;let b,E;c==="top"||c==="bottom"?(b=c,E=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(E=c,b=f==="end"?"top":"bottom");const T=g-d.top-d.bottom,v=h-d.left-d.right,S=pr(g-d[b],T),w=pr(h-d[E],v),A=!t.middlewareData.shift;let _=S,D=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=T),A&&!f){const O=qt(d.left,0),M=qt(d.right,0),P=qt(d.top,0),j=qt(d.bottom,0);m?D=h-2*(O!==0||M!==0?O+M:qt(d.left,d.right)):_=g-2*(P!==0||j!==0?P+j:qt(d.top,d.bottom))}await l({...t,availableWidth:D,availableHeight:_});const I=await o.getDimensions(s.floating);return h!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function zl(){return typeof window<"u"}function ui(e){return Mw(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(Mw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mw(e){return zl()?e instanceof Node||e instanceof Xt(e).Node:!1}function gn(e){return zl()?e instanceof Element||e instanceof Xt(e).Element:!1}function Rn(e){return zl()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function Jy(e){return!zl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function Lo(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function n5(e){return["table","td","th"].includes(ui(e))}function Gl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Pb(e){const t=Fb(),n=gn(e)?bn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function r5(e){let t=mr(e);for(;Rn(t)&&!Ha(t);){if(Pb(t))return t;if(Gl(t))return null;t=mr(t)}return null}function Fb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ha(e){return["html","body","#document"].includes(ui(e))}function bn(e){return Xt(e).getComputedStyle(e)}function Vl(e){return gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mr(e){if(ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jy(e)&&e.host||Pn(e);return Jy(t)?t.host:t}function Bw(e){const t=mr(e);return Ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rn(t)&&Lo(t)?t:Bw(t)}function no(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Bw(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=Xt(a);if(i){const s=ld(o);return t.concat(o,o.visualViewport||[],Lo(a)?a:[],s&&n?no(s):[])}return t.concat(a,no(a,[],n))}function ld(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uw(e){const t=bn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Rn(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,s=qs(n)!==i||qs(r)!==o;return s&&(n=i,r=o),{width:n,height:r,$:s}}function Mb(e){return gn(e)?e:e.contextElement}function Oa(e){const t=Mb(e);if(!Rn(t))return kn(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=Uw(t);let o=(i?qs(n.width):n.width)/r,s=(i?qs(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const a5=kn(0);function $w(e){const t=Xt(e);return!Fb()||!t.visualViewport?a5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xt(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=Mb(e);let o=kn(1);t&&(r?gn(r)&&(o=Oa(r)):o=Oa(e));const s=i5(i,n,r)?$w(i):kn(0);let l=(a.left+s.x)/o.x,u=(a.top+s.y)/o.y,d=a.width/o.x,c=a.height/o.y;if(i){const f=Xt(i),m=r&&gn(r)?Xt(r):r;let h=f,g=ld(h);for(;g&&r&&m!==h;){const b=Oa(g),E=g.getBoundingClientRect(),T=bn(g),v=E.left+(g.clientLeft+parseFloat(T.paddingLeft))*b.x,S=E.top+(g.clientTop+parseFloat(T.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=v,u+=S,h=Xt(g),g=ld(h)}}return Ks({width:d,height:c,x:l,y:u})}function Bb(e,t){const n=Vl(e).scrollLeft;return t?t.left+n:Gr(Pn(e)).left+n}function jw(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:Bb(e,r)),i=r.top+t.scrollTop;return{x:a,y:i}}function o5(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=Pn(r),s=t?Gl(t.floating):!1;if(r===o||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=kn(1);const d=kn(0),c=Rn(r);if((c||!c&&!i)&&((ui(r)!=="body"||Lo(o))&&(l=Vl(r)),Rn(r))){const m=Gr(r);u=Oa(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=o&&!c&&!i?jw(o,l,!0):kn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-l.scrollTop*u.y+d.y+f.y}}function s5(e){return Array.from(e.getClientRects())}function l5(e){const t=Pn(e),n=Vl(e),r=e.ownerDocument.body,a=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Bb(e);const s=-n.scrollTop;return bn(r).direction==="rtl"&&(o+=qt(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:s}}function u5(e,t){const n=Xt(e),r=Pn(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;const u=Fb();(!u||u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s,y:l}}function c5(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Rn(e)?Oa(e):kn(1),o=e.clientWidth*i.x,s=e.clientHeight*i.y,l=a*i.x,u=r*i.y;return{width:o,height:s,x:l,y:u}}function ex(e,t,n){let r;if(t==="viewport")r=u5(e,n);else if(t==="document")r=l5(Pn(e));else if(gn(t))r=c5(t,n);else{const a=$w(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ks(r)}function Hw(e,t){const n=mr(e);return n===t||!gn(n)||Ha(n)?!1:bn(n).position==="fixed"||Hw(n,t)}function d5(e,t){const n=t.get(e);if(n)return n;let r=no(e,[],!1).filter(s=>gn(s)&&ui(s)!=="body"),a=null;const i=bn(e).position==="fixed";let o=i?mr(e):e;for(;gn(o)&&!Ha(o);){const s=bn(o),l=Pb(o);!l&&s.position==="fixed"&&(a=null),(i?!l&&!a:!l&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Lo(o)&&!l&&Hw(e,o))?r=r.filter(d=>d!==o):a=s,o=mr(o)}return t.set(e,r),r}function p5(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?Gl(t)?[]:d5(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((u,d)=>{const c=ex(t,d,a);return u.top=qt(c.top,u.top),u.right=pr(c.right,u.right),u.bottom=pr(c.bottom,u.bottom),u.left=qt(c.left,u.left),u},ex(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function f5(e){const{width:t,height:n}=Uw(e);return{width:t,height:n}}function m5(e,t,n){const r=Rn(t),a=Pn(t),i=n==="fixed",o=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=kn(0);if(r||!r&&!i)if((ui(t)!=="body"||Lo(a))&&(s=Vl(t)),r){const f=Gr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else a&&(l.x=Bb(a));const u=a&&!r&&!i?jw(a,s):kn(0),d=o.left+s.scrollLeft-l.x-u.x,c=o.top+s.scrollTop-l.y-u.y;return{x:d,y:c,width:o.width,height:o.height}}function rc(e){return bn(e).position==="static"}function tx(e,t){if(!Rn(e)||bn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pn(e)===n&&(n=n.ownerDocument.body),n}function zw(e,t){const n=Xt(e);if(Gl(e))return n;if(!Rn(e)){let a=mr(e);for(;a&&!Ha(a);){if(gn(a)&&!rc(a))return a;a=mr(a)}return n}let r=tx(e,t);for(;r&&n5(r)&&rc(r);)r=tx(r,t);return r&&Ha(r)&&rc(r)&&!Pb(r)?n:r||r5(e)||n}const h5=async function(e){const t=this.getOffsetParent||zw,n=this.getDimensions,r=await n(e.floating);return{reference:m5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function g5(e){return bn(e).direction==="rtl"}const b5={convertOffsetParentRelativeRectToViewportRelativeRect:o5,getDocumentElement:Pn,getClippingRect:p5,getOffsetParent:zw,getElementRects:h5,getClientRects:s5,getDimensions:f5,getScale:Oa,isElement:gn,isRTL:g5};function E5(e,t){let n=null,r;const a=Pn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:c,height:f}=e.getBoundingClientRect();if(s||t(),!c||!f)return;const m=cs(d),h=cs(a.clientWidth-(u+c)),g=cs(a.clientHeight-(d+f)),b=cs(u),T={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:qt(0,pr(1,l))||1};let v=!0;function S(w){const A=w[0].intersectionRatio;if(A!==l){if(!v)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(S,T)}n.observe(e)}return o(!0),i}function Ub(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Mb(e),d=a||i?[...u?no(u):[],...no(t)]:[];d.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const c=u&&s?E5(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(E=>{let[T]=E;T&&T.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,g=l?Gr(e):null;l&&b();function b(){const E=Gr(e);g&&(E.x!==g.x||E.y!==g.y||E.width!==g.width||E.height!==g.height)&&n(),g=E,h=requestAnimationFrame(b)}return n(),()=>{var E;d.forEach(T=>{a&&T.removeEventListener("scroll",n),i&&T.removeEventListener("resize",n)}),c==null||c(),(E=m)==null||E.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const y5=Qj,x5=Jj,T5=Kj,v5=t5,S5=Xj,nx=Yj,A5=e5,w5=(e,t,n)=>{const r=new Map,a={platform:b5,...n},i={...a.platform,_c:r};return qj(e,t,{...a,platform:i})};var Cs=typeof document<"u"?R.useLayoutEffect:R.useEffect;function Xs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xs(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Xs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rx(e,t){const n=Gw(e);return Math.round(t*n)/n}function ac(e){const t=x.useRef(e);return Cs(()=>{t.current=e}),t}function $b(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,c]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=x.useState(r);Xs(f,r)||m(r);const[h,g]=x.useState(null),[b,E]=x.useState(null),T=x.useCallback(Z=>{Z!==A.current&&(A.current=Z,g(Z))},[]),v=x.useCallback(Z=>{Z!==_.current&&(_.current=Z,E(Z))},[]),S=i||h,w=o||b,A=x.useRef(null),_=x.useRef(null),D=x.useRef(d),I=l!=null,O=ac(l),M=ac(a),P=ac(u),j=x.useCallback(()=>{if(!A.current||!_.current)return;const Z={placement:t,strategy:n,middleware:f};M.current&&(Z.platform=M.current),w5(A.current,_.current,Z).then(G=>{const k={...G,isPositioned:P.current!==!1};z.current&&!Xs(D.current,k)&&(D.current=k,Xr.flushSync(()=>{c(k)}))})},[f,t,n,M,P]);Cs(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,c(Z=>({...Z,isPositioned:!1})))},[u]);const z=x.useRef(!1);Cs(()=>(z.current=!0,()=>{z.current=!1}),[]),Cs(()=>{if(S&&(A.current=S),w&&(_.current=w),S&&w){if(O.current)return O.current(S,w,j);j()}},[S,w,j,O,I]);const W=x.useMemo(()=>({reference:A,floating:_,setReference:T,setFloating:v}),[T,v]),H=x.useMemo(()=>({reference:S,floating:w}),[S,w]),X=x.useMemo(()=>{const Z={position:n,left:0,top:0};if(!H.floating)return Z;const G=rx(H.floating,d.x),k=rx(H.floating,d.y);return s?{...Z,transform:"translate("+G+"px, "+k+"px)",...Gw(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:k}},[n,s,H.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:j,refs:W,elements:H,floatingStyles:X}),[d,j,W,H,X])}const _5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nx({element:r.current,padding:a}).fn(n):{}:r?nx({element:r,padding:a}).fn(n):{}}}},jb=(e,t)=>({...y5(e),options:[e,t]}),Hb=(e,t)=>({...x5(e),options:[e,t]}),zb=(e,t)=>({...A5(e),options:[e,t]}),Gb=(e,t)=>({...T5(e),options:[e,t]}),Vb=(e,t)=>({...v5(e),options:[e,t]}),Wb=(e,t)=>({...S5(e),options:[e,t]}),qb=(e,t)=>({..._5(e),options:[e,t]});var N5="Arrow",Vw=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return p.jsx(vn.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vw.displayName=N5;var C5=Vw,Yb="Popper",[Ww,qw]=bp(Yb),[k5,Yw]=Ww(Yb),Kw=e=>{const{__scopePopper:t,children:n}=e,[r,a]=x.useState(null),[i,o]=x.useState(void 0);return p.jsx(k5,{scope:t,anchor:r,onAnchorChange:a,placementState:i,setPlacementState:o,children:n})};Kw.displayName=Yb;var Xw="PopperAnchor",Zw=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=Yw(Xw,n),o=x.useRef(null),s=i.onAnchorChange,l=x.useCallback(h=>{o.current=h,h&&s(h)},[s]),u=qn(t,l),d=x.useRef(null);x.useEffect(()=>{if(!r)return;const h=d.current;d.current=r.current,h!==d.current&&s(d.current)});const c=i.placementState&&Xb(i.placementState),f=c==null?void 0:c[0],m=c==null?void 0:c[1];return r?null:p.jsx(vn.div,{"data-radix-popper-side":f,"data-radix-popper-align":m,...a,ref:u})});Zw.displayName=Xw;var Kb="PopperContent",[I5,R5]=Ww(Kb),Qw=x.forwardRef((e,t)=>{var J,oe,de,ie,$,re;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=e,b=Yw(Kb,n),[E,T]=x.useState(null),v=qn(t,se=>T(se)),[S,w]=x.useState(null),A=sS(S),_=(A==null?void 0:A.width)??0,D=(A==null?void 0:A.height)??0,I=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],P=M.length>0,j={padding:O,boundary:M.filter(D5),altBoundary:P},{refs:z,floatingStyles:W,placement:H,isPositioned:X,middlewareData:Z}=$b({strategy:"fixed",placement:I,whileElementsMounted:(...se)=>Ub(...se,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[jb({mainAxis:a+D,alignmentAxis:o}),l&&Hb({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?zb():void 0,...j}),l&&Gb({...j}),Vb({...j,apply:({elements:se,rects:pe,availableWidth:ye,availableHeight:be})=>{const{width:Le,height:xe}=pe.reference,Te=se.floating.style;Te.setProperty("--radix-popper-available-width",`${ye}px`),Te.setProperty("--radix-popper-available-height",`${be}px`),Te.setProperty("--radix-popper-anchor-width",`${Le}px`),Te.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),S&&qb({element:S,padding:s}),L5({arrowWidth:_,arrowHeight:D}),f&&Wb({strategy:"referenceHidden",...j,boundary:P?j.boundary:void 0})]}),G=b.setPlacementState;jn(()=>(G(H),()=>{G(void 0)}),[H,G]);const[k,ae]=Xb(H),V=Hl(h);jn(()=>{X&&(V==null||V())},[X,V]);const N=(J=Z.arrow)==null?void 0:J.x,te=(oe=Z.arrow)==null?void 0:oe.y,U=((de=Z.arrow)==null?void 0:de.centerOffset)!==0,[K,Q]=x.useState();return jn(()=>{E&&Q(window.getComputedStyle(E).zIndex)},[E]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:X?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(ie=Z.transformOrigin)==null?void 0:ie.x,($=Z.transformOrigin)==null?void 0:$.y].join(" "),...((re=Z.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(I5,{scope:n,placedSide:k,placedAlign:ae,onArrowChange:w,arrowX:N,arrowY:te,shouldHideArrow:U,children:p.jsx(vn.div,{"data-side":k,"data-align":ae,...g,ref:v,style:{...g.style,animation:X?void 0:"none"}})})})});Qw.displayName=Kb;var Jw="PopperArrow",O5={top:"bottom",right:"left",bottom:"top",left:"right"},e1=x.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=R5(Jw,r),o=O5[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(C5,{...a,ref:n,style:{...a.style,display:"block"}})})});e1.displayName=Jw;function D5(e){return e!==null}var L5=e=>({name:"transformOrigin",options:e,fn(t){var b,E,T;const{placement:n,rects:r,middlewareData:a}=t,o=((b=a.arrow)==null?void 0:b.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=Xb(n),c={start:"0%",center:"50%",end:"100%"}[d],f=(((E=a.arrow)==null?void 0:E.x)??0)+s/2,m=(((T=a.arrow)==null?void 0:T.y)??0)+l/2;let h="",g="";return u==="bottom"?(h=o?c:`${f}px`,g=`${-l}px`):u==="top"?(h=o?c:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(h=`${-l}px`,g=o?c:`${m}px`):u==="left"&&(h=`${r.floating.width+l}px`,g=o?c:`${m}px`),{data:{x:h,y:g}}}});function Xb(e){const[t,n="center"]=e.split("-");return[t,n]}var P5=Kw,F5=Zw,M5=Qw,B5=e1,U5="Portal",t1=x.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[a,i]=x.useState(!1);jn(()=>i(!0),[]);const o=n||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?Xr.createPortal(p.jsx(vn.div,{...r,ref:t}),o):null});t1.displayName=U5;var $5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),j5="VisuallyHidden",n1=x.forwardRef((e,t)=>p.jsx(vn.span,{...e,ref:t,style:{...$5,...e.style}}));n1.displayName=j5;var H5=n1,[Wl,MW]=bp("Tooltip",[qw]),ql=qw(),r1="TooltipProvider",z5=700,ud="tooltip.open",[G5,Zb]=Wl(r1),a1=e=>{const{__scopeTooltip:t,delayDuration:n=z5,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,o=x.useRef(!0),s=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(G5,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{r<=0||(window.clearTimeout(l.current),o.current=!1)},[r]),onClose:x.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(u=>{s.current=u},[]),disableHoverableContent:a,children:i})};a1.displayName=r1;var ro="Tooltip",[V5,Po]=Wl(ro),i1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=e,l=Zb(ro,e.__scopeTooltip),u=ql(t),[d,c]=x.useState(null),f=Bj(),m=x.useRef(0),h=o??l.disableHoverableContent,g=s??l.delayDuration,b=x.useRef(!1),[E,T]=oS({prop:r,defaultProp:a??!1,onChange:_=>{_?(l.onOpen(),document.dispatchEvent(new CustomEvent(ud))):l.onClose(),i==null||i(_)},caller:ro}),v=x.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),S=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,T(!0)},[T]),w=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,T(!1)},[T]),A=x.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,T(!0),m.current=0},g)},[g,T]);return x.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(P5,{...u,children:p.jsx(V5,{scope:t,contentId:f,open:E,stateAttribute:v,trigger:d,onTriggerChange:c,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?A():S()},[l.isOpenDelayedRef,A,S]),onTriggerLeave:x.useCallback(()=>{h?w():(window.clearTimeout(m.current),m.current=0)},[w,h]),onOpen:S,onClose:w,disableHoverableContent:h,children:n})})};i1.displayName=ro;var cd="TooltipTrigger",o1=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Po(cd,n),i=Zb(cd,n),o=ql(n),s=x.useRef(null),l=qn(t,s,a.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),c=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),p.jsx(F5,{asChild:!0,...o,children:p.jsx(vn.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:pn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:pn(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:pn(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:pn(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:pn(e.onBlur,a.onClose),onClick:pn(e.onClick,a.onClose)})})});o1.displayName=cd;var Qb="TooltipPortal",[W5,q5]=Wl(Qb,{forceMount:void 0}),s1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=Po(Qb,t);return p.jsx(W5,{scope:t,forceMount:n,children:p.jsx(dl,{present:n||i.open,children:p.jsx(t1,{asChild:!0,container:a,children:r})})})};s1.displayName=Qb;var za="TooltipContent",l1=x.forwardRef((e,t)=>{const n=q5(za,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,o=Po(za,e.__scopeTooltip);return p.jsx(dl,{present:r||o.open,children:o.disableHoverableContent?p.jsx(u1,{side:a,...i,ref:t}):p.jsx(Y5,{side:a,...i,ref:t})})}),Y5=x.forwardRef((e,t)=>{const n=Po(za,e.__scopeTooltip),r=Zb(za,e.__scopeTooltip),a=x.useRef(null),i=qn(t,a),[o,s]=x.useState(null),{trigger:l,onClose:u}=n,d=a.current,{onPointerInTransitChange:c}=r,f=x.useCallback(()=>{s(null),c(!1)},[c]),m=x.useCallback((h,g)=>{const b=h.currentTarget,E={x:h.clientX,y:h.clientY},T=J5(E,b.getBoundingClientRect()),v=e8(E,T),S=t8(g.getBoundingClientRect()),w=r8([...v,...S]);s(w),c(!0)},[c]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&d){const h=b=>m(b,d),g=b=>m(b,l);return l.addEventListener("pointerleave",h),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",g)}}},[l,d,m,f]),x.useEffect(()=>{if(o){const h=g=>{const b=g.target,E={x:g.clientX,y:g.clientY},T=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),v=!n8(E,o);T?f():v&&(f(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,d,o,u,f]),p.jsx(u1,{...e,ref:i})}),[K5,X5]=Wl(ro,{isInside:!1}),Z5=BO("TooltipContent"),u1=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=e,l=Po(za,n),u=ql(n),{onClose:d}=l;return x.useEffect(()=>(document.addEventListener(ud,d),()=>document.removeEventListener(ud,d)),[d]),x.useEffect(()=>{if(l.trigger){const c=f=>{f.target instanceof Node&&f.target.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),p.jsx(Lw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:p.jsxs(M5,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Z5,{children:r}),p.jsx(K5,{scope:n,isInside:!0,children:p.jsx(H5,{id:l.contentId,role:"tooltip",children:a||r})})]})})});l1.displayName=za;var c1="TooltipArrow",Q5=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ql(n);return X5(c1,n).isInside?null:p.jsx(B5,{...a,...r,ref:t})});Q5.displayName=c1;function J5(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function e8(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function t8(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function n8(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const s=t[i],l=t[o],u=s.x,d=s.y,c=l.x,f=l.y;d>r!=f>r&&n<(c-u)*(r-d)/(f-d)+u&&(a=!a)}return a}function r8(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),a8(t)}function a8(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var i8=a1,o8=i1,s8=o1,l8=s1,d1=l1;const u8=i8,c8=o8,d8=s8,p1=x.forwardRef(({className:e,sideOffset:t=6,...n},r)=>p.jsx(l8,{children:p.jsx(d1,{ref:r,sideOffset:t,className:Ee("z-50 max-w-xs rounded-md border bg-popover px-3 py-2 text-xs text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));p1.displayName=d1.displayName;const ax=()=>p.jsx("p",{className:"text-sm text-muted-foreground",children:"Unsupported authentication method."}),Yl=({onClear:e,onRefresh:t,isRefreshing:n,detail:r})=>p.jsxs("div",{className:"flex flex-col gap-3 px-4 py-4 rounded-lg bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(yT,{className:"h-5 w-5 text-green-600 dark:text-green-400 shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-400",children:"Authenticated"}),r&&p.jsx("p",{className:"text-xs text-green-600/70 dark:text-green-400/70 truncate",children:r})]})]}),p.jsxs("div",{className:"flex gap-2",children:[t&&p.jsxs(Qe,{variant:"outline",size:"sm",className:"flex-1 border-green-300 dark:border-green-700 text-green-700 dark:text-green-400 hover:bg-green-100 dark:hover:bg-green-900",onClick:t,disabled:n,children:[n?p.jsx(Ya,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):p.jsx(AT,{className:"h-3.5 w-3.5 mr-1.5"}),"Refresh"]}),p.jsxs(Qe,{variant:"outline",size:"sm",className:`${t?"flex-1":"w-full"} border-green-300 dark:border-green-700 text-green-700 dark:text-green-400 hover:bg-green-100 dark:hover:bg-green-900`,onClick:e,disabled:n,children:[p.jsx(Hd,{className:"h-3.5 w-3.5 mr-1.5"}),"Log out"]})]})]}),Un=({label:e,children:t})=>p.jsxs("div",{className:"space-y-1.5",children:[p.jsx("label",{className:"text-xs font-medium text-foreground",children:e}),t]}),p8=({text:e})=>p.jsxs(c8,{children:[p.jsx(d8,{asChild:!0,children:p.jsx(TT,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help shrink-0"})}),p.jsx(p1,{children:e})]}),f8=({scheme:e,schemeName:t})=>{const{credentials:n,setCredential:r,clearCredential:a}=lt(),i=n[t],[o,s]=R.useState((i==null?void 0:i.username)??""),[l,u]=R.useState((i==null?void 0:i.password)??""),d=()=>{if(!o.trim()){He.warning("Username is required");return}r(t,{type:"basic",username:o.trim(),password:l})},c=()=>{a(t),s(""),u("")};return p.jsxs("div",{className:"space-y-4",children:[e.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:p.jsx(st,{markdown:e.description})}),i?p.jsx(Yl,{onClear:c}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-3",children:[p.jsx(Un,{label:"Username",children:p.jsx(Pt,{type:"text",value:o,onChange:f=>s(f.target.value),placeholder:"username"})}),p.jsx(Un,{label:"Password",children:p.jsx(Pt,{type:"password",value:l,onChange:f=>u(f.target.value),placeholder:"••••••••"})})]}),p.jsx(lr,{onClick:d})]})]})},m8=({scheme:e,schemeName:t})=>{const{credentials:n,setCredential:r,clearCredential:a}=lt(),i=n[t],[o,s]=R.useState((i==null?void 0:i.token)??""),l=()=>{if(!o.trim()){He.warning("Token is required");return}r(t,{type:"bearer",token:o.trim()})},u=()=>{a(t),s("")},d=e;return p.jsxs("div",{className:"space-y-4",children:[d.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:p.jsx(st,{markdown:d.description})}),i?p.jsx(Yl,{onClear:u}):p.jsxs(p.Fragment,{children:[p.jsx(Un,{label:`Token${d.bearerFormat?` (${d.bearerFormat})`:""}`,children:p.jsx(Pt,{type:"password",value:o,onChange:c=>s(c.target.value),placeholder:"Bearer token"})}),p.jsx(lr,{onClick:l})]})]})},h8=({scheme:e,schemeName:t})=>{const{credentials:n,setCredential:r,clearCredential:a}=lt(),i=n[t],o=e,[s,l]=R.useState((i==null?void 0:i.key)??""),u=()=>{if(!s.trim()){He.warning("API key is required");return}r(t,{type:"apiKey",key:s.trim(),in:o.in,name:o.name})},d=()=>{a(t),l("")};return p.jsxs("div",{className:"space-y-4",children:[o.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:p.jsx(st,{markdown:o.description})}),p.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground bg-muted/50 px-3 py-2 rounded-lg",children:[p.jsx(vT,{className:"h-3 w-3 shrink-0"}),"Sent as ",p.jsx("code",{className:"font-mono mx-1 text-foreground",children:o.name})," in ",p.jsx("span",{className:"font-medium text-foreground ml-1",children:o.in})]}),i?p.jsx(Yl,{onClear:d}):p.jsxs(p.Fragment,{children:[p.jsx(Un,{label:"API Key",children:p.jsx(Pt,{type:"password",value:s,onChange:c=>l(c.target.value),placeholder:o.name})}),p.jsx(lr,{onClick:u})]})]})},f1=({scheme:e,schemeName:t})=>{const{credentials:n,setCredential:r,clearCredential:a,computedUrl:i}=lt(),o=n[t],s=e,l=Object.keys(s.flows),[u,d]=R.useState(l[0]),[c,f]=R.useState(""),[m,h]=R.useState(""),[g,b]=R.useState(""),[E,T]=R.useState(""),[v,S]=R.useState(new Set),[w,A]=R.useState(!1),[_,D]=R.useState("header"),[I,O]=R.useState(!0),M=R.useRef(null),P=s.flows[u],j=Object.entries((P==null?void 0:P.scopes)??{}),z=`${window.location.origin}${window.location.pathname}`,W=P&&"tokenUrl"in P&&!!P.tokenUrl,H=v.size>0?Array.from(v).join(" "):j.map(([$])=>$).join(" "),X=$=>{if(!$)return $;try{return new URL($),$}catch{}try{return new URL($,i||window.location.origin).toString()}catch{return $}},Z=($,re)=>{if(_==="header"&&c.trim()){const se=btoa(`${c.trim()}:${m}`);return re.delete("client_id"),re.delete("client_secret"),fetch($,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${se}`},body:re.toString()})}return fetch($,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:re.toString()})},G=($,re)=>{const se=(P==null?void 0:P["x-tokenName"])??"access_token";return $[se]?(r(t,{type:"oauth2",accessToken:$[se],tokenType:$.token_type??"Bearer",scope:$.scope??re,refreshToken:$.refresh_token,clientId:c.trim()||void 0}),!0):(He.error($.error_description??$.error??"No access token returned"),!1)},k=R.useCallback($=>{S(re=>{const se=new Set(re);return se.has($)?se.delete($):se.add($),se})},[]),ae=()=>S(new Set(j.map(([$])=>$))),V=()=>S(new Set),N=()=>a(t),te=$=>new Promise((re,se)=>{const be=window.screenX+(window.outerWidth-600)/2,Le=window.screenY+(window.outerHeight-700)/2,xe=window.open($,"skuse_oauth",`width=600,height=700,left=${be},top=${Le},scrollbars=yes,resizable=yes`);if(!xe){He.error("Popup blocked",{description:"Allow popups for this site and try again."}),se(new Error("blocked"));return}const Te=setInterval(()=>{if(xe.closed){clearInterval(Te),He.info("Authentication cancelled"),se(new Error("cancelled"));return}try{const De=xe.location.href;if(!De||De==="about:blank")return;clearInterval(Te),xe.close(),re(De)}catch{}},200)}),U=async()=>{if(!c.trim()){He.warning("Client ID is required");return}if(!(!P||!("authorizationUrl"in P)||!("tokenUrl"in P)||!P.tokenUrl)){A(!0);try{const $=crypto.randomUUID(),re=new URLSearchParams({response_type:"code",client_id:c.trim(),redirect_uri:z,scope:H,state:$});if(I){const xe=_j();M.current=xe;const Te=await Nj(xe);re.set("code_challenge",Te),re.set("code_challenge_method","S256")}let se;try{se=await te(`${X(P.authorizationUrl)}?${re}`)}catch{return}const pe=new URL(se),ye=pe.searchParams.get("error");if(ye){He.error(pe.searchParams.get("error_description")??ye);return}if(pe.searchParams.get("state")!==$){He.error("State mismatch — possible CSRF attack");return}const be=pe.searchParams.get("code");if(!be){He.error("No authorization code returned");return}const Le=new URLSearchParams({grant_type:"authorization_code",code:be,redirect_uri:z,client_id:c.trim()});I&&M.current&&(Le.set("code_verifier",M.current),M.current=null),m&&_==="body"&&Le.set("client_secret",m);try{const xe=await Z(X(P.tokenUrl),Le);G(await xe.json(),H)}catch(xe){He.error("Could not reach token endpoint",{description:xe instanceof Error?xe.message:void 0})}}finally{A(!1)}}},K=async()=>{if(!c.trim()){He.warning("Client ID is required");return}if(!(!P||!("authorizationUrl"in P))){A(!0);try{const $=crypto.randomUUID(),re=new URLSearchParams({response_type:"token",client_id:c.trim(),redirect_uri:z,scope:H,state:$});let se;try{se=await te(`${X(P.authorizationUrl)}?${re}`)}catch{return}const pe=new URL(se),ye=new URLSearchParams(pe.hash.slice(1)),be=pe.searchParams.get("error")??ye.get("error");if(be){He.error(pe.searchParams.get("error_description")??ye.get("error_description")??be);return}const Le=pe.searchParams.get("state")??ye.get("state");if(Le&&Le!==$){He.error("State mismatch — possible CSRF attack");return}const xe=ye.get("access_token")??pe.searchParams.get("access_token");if(!xe){He.error("No access token returned");return}r(t,{type:"oauth2",accessToken:xe,tokenType:ye.get("token_type")??"Bearer",scope:ye.get("scope")??void 0,clientId:c.trim()})}finally{A(!1)}}},Q=async()=>{if(!c.trim()){He.warning("Client ID is required");return}if(!g.trim()){He.warning("Username is required");return}if(!(!P||!("tokenUrl"in P))){A(!0);try{const $=new URLSearchParams({grant_type:"password",client_id:c.trim(),username:g.trim(),password:E,scope:H});m&&_==="body"&&$.set("client_secret",m);const re=await Z(X(P.tokenUrl),$);G(await re.json(),H)}catch($){He.error("Could not reach token endpoint",{description:$ instanceof Error?$.message:void 0})}finally{A(!1)}}},J=async()=>{if(!c.trim()){He.warning("Client ID is required");return}if(!(!P||!("tokenUrl"in P))){A(!0);try{const $=new URLSearchParams({grant_type:"client_credentials",client_id:c.trim(),scope:H});m&&_==="body"&&$.set("client_secret",m);const re=await Z(X(P.tokenUrl),$);G(await re.json(),H)}catch($){He.error("Could not reach token endpoint",{description:$ instanceof Error?$.message:void 0})}finally{A(!1)}}},oe=async()=>{if(!(o!=null&&o.refreshToken))return;const $=P&&"refreshUrl"in P&&P.refreshUrl?X(P.refreshUrl):P&&"tokenUrl"in P&&P.tokenUrl?X(P.tokenUrl):null;if($){A(!0);try{const re=new URLSearchParams({grant_type:"refresh_token",refresh_token:o.refreshToken});o.clientId&&re.set("client_id",o.clientId);const pe=await(await fetch($,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:re.toString()})).json(),ye=(P==null?void 0:P["x-tokenName"])??"access_token";pe[ye]?r(t,{type:"oauth2",accessToken:pe[ye],tokenType:pe.token_type??o.tokenType,scope:pe.scope??o.scope,refreshToken:pe.refresh_token??o.refreshToken,clientId:o.clientId}):He.error(pe.error_description??pe.error??"Token refresh failed")}catch(re){He.error("Could not reach token endpoint",{description:re instanceof Error?re.message:void 0})}finally{A(!1)}}},de=!!(o!=null&&o.refreshToken)&&(P&&"refreshUrl"in P&&!!P.refreshUrl||P&&"tokenUrl"in P&&!!P.tokenUrl),ie={authorizationCode:"Authorization Code",implicit:"Implicit",password:"Password",clientCredentials:"Client Credentials"};return p.jsxs("div",{className:"space-y-4",children:[s.description&&p.jsx("div",{className:"text-sm text-muted-foreground",children:p.jsx(st,{markdown:s.description})}),o?p.jsx(Yl,{onClear:N,onRefresh:de?oe:void 0,isRefreshing:w,detail:[o.tokenType,o.scope].filter(Boolean).join(" · ")}):p.jsxs(p.Fragment,{children:[l.length>1&&p.jsx("div",{className:"flex gap-2 flex-wrap",children:l.map($=>p.jsx(Qe,{variant:u===$?"default":"outline",size:"sm",onClick:()=>{d($),S(new Set),A(!1)},children:ie[$]??$},$))}),P&&p.jsxs("div",{className:"space-y-1.5 text-xs bg-muted/50 rounded-lg p-3",children:[p.jsxs("p",{className:"text-muted-foreground",children:[p.jsx("span",{className:"font-medium text-foreground",children:"Flow: "}),ie[u]??u]}),"authorizationUrl"in P&&P.authorizationUrl&&p.jsxs("p",{className:"text-muted-foreground flex items-start gap-1",children:[p.jsx("span",{className:"font-medium text-foreground shrink-0",children:"Authorization URL: "}),p.jsx("span",{className:"font-mono truncate",children:X(P.authorizationUrl)}),p.jsx(dr,{className:"h-3 w-3 shrink-0 mt-0.5"})]}),"tokenUrl"in P&&P.tokenUrl&&p.jsxs("p",{className:"text-muted-foreground flex items-start gap-1",children:[p.jsx("span",{className:"font-medium text-foreground shrink-0",children:"Token URL: "}),p.jsx("span",{className:"font-mono truncate",children:X(P.tokenUrl)})]})]}),j.length>0&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between shrink-0",children:[p.jsx("p",{className:"text-xs font-medium text-foreground",children:"Scopes"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:"text-xs text-primary hover:underline",onClick:ae,children:"select all"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"/"}),p.jsx("button",{className:"text-xs text-primary hover:underline",onClick:V,children:"select none"})]})]}),p.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-40 pr-1",children:j.map(([$,re])=>p.jsxs("label",{className:"flex items-start gap-2 cursor-pointer group",children:[p.jsx(Fc,{checked:v.has($),onCheckedChange:()=>k($),className:"mt-0.5 shrink-0"}),p.jsxs("span",{className:"text-xs leading-none pt-0.5",children:[p.jsx("code",{className:"font-mono",children:$}),re&&p.jsx("span",{className:"ml-1 text-muted-foreground",children:re})]})]},$))})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(Un,{label:"Client ID",children:p.jsx(Pt,{value:c,onChange:$=>f($.target.value),placeholder:"client_id"})}),(u==="clientCredentials"||u==="password")&&p.jsx(Un,{label:"Client Secret",children:p.jsx(Pt,{type:"password",value:m,onChange:$=>h($.target.value),placeholder:"client_secret"})}),u==="password"&&p.jsxs(p.Fragment,{children:[p.jsx(Un,{label:"Username",children:p.jsx(Pt,{value:g,onChange:$=>b($.target.value),placeholder:"username"})}),p.jsx(Un,{label:"Password",children:p.jsx(Pt,{type:"password",value:E,onChange:$=>T($.target.value),placeholder:"••••••••"})})]})]}),W&&p.jsx(Un,{label:"Client credentials",children:p.jsx("div",{className:"flex gap-2",children:["header","body"].map($=>p.jsx(Qe,{size:"sm",variant:_===$?"default":"outline",className:"flex-1 text-xs",onClick:()=>D($),children:$==="header"?"Auth header":"Request body"},$))})}),u==="authorizationCode"&&p.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[p.jsx(Fc,{checked:I,onCheckedChange:$=>O(!!$)}),p.jsx("span",{className:"text-xs text-foreground",children:"Use PKCE"}),p.jsx(p8,{text:"Proof Key for Code Exchange — generates a one-time code challenge so the authorization code can't be stolen and reused by a third party."})]}),u==="authorizationCode"&&p.jsx(lr,{onClick:U,isLoading:w}),u==="implicit"&&p.jsx(lr,{onClick:K,isLoading:w}),u==="password"&&p.jsx(lr,{onClick:Q,isLoading:w}),u==="clientCredentials"&&p.jsx(lr,{onClick:J,isLoading:w})]})]})},g8=({scheme:e,schemeName:t})=>{const n=e,[r,a]=R.useState(null),[i,o]=R.useState(!1),s=async()=>{o(!0);try{const l=await fetch(n.openIdConnectUrl);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);const u=await l.json(),d={};for(const f of u.scopes_supported??["openid"])d[f]="";const c={type:"oauth2",description:n.description,flows:{...u.authorization_endpoint&&u.token_endpoint?{authorizationCode:{authorizationUrl:u.authorization_endpoint,tokenUrl:u.token_endpoint,refreshUrl:u.token_endpoint,scopes:d}}:{},...u.authorization_endpoint&&!u.token_endpoint?{implicit:{authorizationUrl:u.authorization_endpoint,scopes:d}}:{}}};a(c)}catch(l){He.error("OIDC discovery failed",{description:l instanceof Error?l.message:void 0})}finally{o(!1)}};return R.useEffect(()=>{s()},[]),r?p.jsx(f1,{scheme:r,schemeName:t}):p.jsxs("div",{className:"space-y-4",children:[n.description&&p.jsx("div",{className:"text-sm text-muted-foreground",children:p.jsx(st,{markdown:n.description})}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:"OpenID Connect URL"}),p.jsx(Pt,{value:n.openIdConnectUrl,readOnly:!0,className:"font-mono text-xs"})]}),p.jsxs(Qe,{variant:"outline",className:"w-full",onClick:s,disabled:i,children:[i?p.jsx(Ya,{className:"w-4 h-4 mr-2 animate-spin"}):p.jsx(dr,{className:"w-4 h-4 mr-2"}),i?"Discovering…":"Retry discovery"]})]})},b8=e=>{switch(e.type){case"http":case"basic":return e.scheme==="basic"?f8:e.scheme==="bearer"?m8:ax;case"apiKey":return h8;case"oauth2":return f1;case"openIdConnect":return g8;default:return ax}},E8=e=>{switch(e){case"http":case"basic":return p.jsx(_C,{className:"w-4 h-4 mr-1.5"});case"apiKey":return p.jsx(vT,{className:"w-4 h-4 mr-1.5"});case"oauth2":return p.jsx(ho,{className:"w-4 h-4 mr-1.5"});case"openIdConnect":return p.jsx(jd,{className:"w-4 h-4 mr-1.5"});default:return p.jsx(gC,{className:"w-4 h-4 mr-1.5"})}},y8=({children:e,securitySchemes:t})=>{var l;const[n,r]=R.useState(!1),{credentials:a}=lt(),i=R.useRef({}),o=Object.entries(t),s=u=>{u&&(i.current={...a}),r(u)};return R.useEffect(()=>{if(!n)return;o.some(([d])=>a[d]&&a[d]!==i.current[d])&&(r(!1),He.success("Authenticated successfully"))},[a,n]),p.jsxs(oO,{open:n,onOpenChange:s,children:[p.jsx(sO,{asChild:!0,children:e}),p.jsxs(Fv,{className:"sm:max-w-[680px] flex flex-col max-h-[85vh] gap-0 p-0",onInteractOutside:u=>{var c,f;const d=(f=(c=u.detail)==null?void 0:c.originalEvent)==null?void 0:f.target;d!=null&&d.closest("[data-sonner-toaster]")&&u.preventDefault()},children:[p.jsxs(Mv,{className:"px-6 pt-6 pb-4 border-b shrink-0",children:[p.jsxs(Bv,{className:"flex items-center gap-2",children:[p.jsx(jd,{className:"h-5 w-5 text-primary shrink-0"}),"Available authorizations"]}),p.jsx(Uv,{className:"text-xs",children:"Configure authentication credentials for this API."})]}),p.jsxs(iS,{defaultValue:(l=o[0])==null?void 0:l[0],className:"flex flex-col flex-1 min-h-0",children:[o.length>1&&p.jsx("div",{className:"px-6 pt-4 shrink-0",children:p.jsx(mp,{className:"w-full h-auto flex flex-wrap gap-1 bg-muted p-1 rounded-lg",children:o.map(([u,d])=>{const c=!!a[u];return p.jsxs(hp,{value:u,className:"flex items-center gap-1.5 text-xs px-3 py-1.5 flex-1 min-w-0",children:[E8(d.type),p.jsx("span",{className:"truncate",children:u}),c&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 shrink-0"})]},u)})})}),p.jsx("div",{className:"flex-1",children:o.map(([u,d])=>{const c=b8(d),f=!!a[u],m=o.find(([h])=>h!==u&&!!a[h]);return p.jsx(gp,{value:u,className:"m-0 px-6 py-5",children:!f&&m?p.jsxs("div",{className:"flex items-start gap-3 px-4 py-3.5 rounded-lg bg-muted border text-sm text-muted-foreground",children:[p.jsx(ho,{className:"h-4 w-4 shrink-0 mt-0.5"}),p.jsxs("span",{children:["Already authenticated via"," ",p.jsx("span",{className:"font-medium text-foreground",children:m[0]}),"."," ","Log out first to switch methods."]})]}):p.jsx(c,{scheme:d,schemeName:u})},u)})})]})]})]})},lr=R.forwardRef(({onClick:e,isLoading:t},n)=>p.jsxs(Qe,{ref:n,variant:"outline",className:"w-full p-2 border rounded-md border-green-500 text-green-500 hover:bg-green-500 hover:text-white disabled:opacity-60 disabled:pointer-events-none",onClick:e,disabled:t,children:[t?p.jsx(Ya,{className:"w-4 h-4 mr-2 animate-spin"}):p.jsx(ho,{className:"w-4 h-4 mr-2"}),t?"Authorizing…":"Authorize"]})),m1=({securitySchemes:e})=>{const{credentials:t}=lt();if(!(e&&Object.keys(e).length>0))return p.jsx("div",{className:"cursor-not-allowed w-full",children:p.jsxs(Qe,{variant:"secondary",className:"w-full p-2 border rounded-lg opacity-50 pointer-events-none",children:[p.jsx(ho,{className:"w-4 h-4 mr-2"}),"No Auth"]})});const r=Object.keys(e).some(a=>t[a]);return p.jsx(y8,{securitySchemes:e,children:r?p.jsxs(Qe,{className:"w-full p-2 rounded-md bg-green-500 hover:bg-green-600 text-white border-0",children:[p.jsx(bC,{className:"w-4 h-4 mr-2"}),"Authorized"]}):p.jsx(lr,{})})};var x8="Arrow",h1=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return p.jsx(et.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});h1.displayName=x8;var T8=h1,Jb="Popper",[g1,b1]=cp(Jb),[v8,E1]=g1(Jb),y1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=x.useState(null);return p.jsx(v8,{scope:t,anchor:r,onAnchorChange:a,children:n})};y1.displayName=Jb;var x1="PopperAnchor",T1=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=E1(x1,n),o=x.useRef(null),s=Bt(t,o);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(et.div,{...a,ref:s})});T1.displayName=x1;var e0="PopperContent",[S8,A8]=g1(e0),v1=x.forwardRef((e,t)=>{var Q,J,oe,de,ie,$;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=e,b=E1(e0,n),[E,T]=x.useState(null),v=Bt(t,re=>T(re)),[S,w]=x.useState(null),A=Xd(S),_=(A==null?void 0:A.width)??0,D=(A==null?void 0:A.height)??0,I=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],P=M.length>0,j={padding:O,boundary:M.filter(_8),altBoundary:P},{refs:z,floatingStyles:W,placement:H,isPositioned:X,middlewareData:Z}=$b({strategy:"fixed",placement:I,whileElementsMounted:(...re)=>Ub(...re,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[jb({mainAxis:a+D,alignmentAxis:o}),l&&Hb({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?zb():void 0,...j}),l&&Gb({...j}),Vb({...j,apply:({elements:re,rects:se,availableWidth:pe,availableHeight:ye})=>{const{width:be,height:Le}=se.reference,xe=re.floating.style;xe.setProperty("--radix-popper-available-width",`${pe}px`),xe.setProperty("--radix-popper-available-height",`${ye}px`),xe.setProperty("--radix-popper-anchor-width",`${be}px`),xe.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),S&&qb({element:S,padding:s}),N8({arrowWidth:_,arrowHeight:D}),f&&Wb({strategy:"referenceHidden",...j})]}),[G,k]=w1(H),ae=Mt(h);ht(()=>{X&&(ae==null||ae())},[X,ae]);const V=(Q=Z.arrow)==null?void 0:Q.x,N=(J=Z.arrow)==null?void 0:J.y,te=((oe=Z.arrow)==null?void 0:oe.centerOffset)!==0,[U,K]=x.useState();return ht(()=>{E&&K(window.getComputedStyle(E).zIndex)},[E]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:X?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(de=Z.transformOrigin)==null?void 0:de.x,(ie=Z.transformOrigin)==null?void 0:ie.y].join(" "),...(($=Z.hide)==null?void 0:$.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(S8,{scope:n,placedSide:G,onArrowChange:w,arrowX:V,arrowY:N,shouldHideArrow:te,children:p.jsx(et.div,{"data-side":G,"data-align":k,...g,ref:v,style:{...g.style,animation:X?void 0:"none"}})})})});v1.displayName=e0;var S1="PopperArrow",w8={top:"bottom",right:"left",bottom:"top",left:"right"},A1=x.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=A8(S1,r),o=w8[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(T8,{...a,ref:n,style:{...a.style,display:"block"}})})});A1.displayName=S1;function _8(e){return e!==null}var N8=e=>({name:"transformOrigin",options:e,fn(t){var b,E,T;const{placement:n,rects:r,middlewareData:a}=t,o=((b=a.arrow)==null?void 0:b.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=w1(n),c={start:"0%",center:"50%",end:"100%"}[d],f=(((E=a.arrow)==null?void 0:E.x)??0)+s/2,m=(((T=a.arrow)==null?void 0:T.y)??0)+l/2;let h="",g="";return u==="bottom"?(h=o?c:`${f}px`,g=`${-l}px`):u==="top"?(h=o?c:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(h=`${-l}px`,g=o?c:`${m}px`):u==="left"&&(h=`${r.floating.width+l}px`,g=o?c:`${m}px`),{data:{x:h,y:g}}}});function w1(e){const[t,n="center"]=e.split("-");return[t,n]}var C8=y1,_1=T1,k8=v1,I8=A1,t0="Popover",[N1,BW]=gr(t0,[b1]),Fo=b1(),[R8,vr]=N1(t0),C1=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,s=Fo(t),l=x.useRef(null),[u,d]=x.useState(!1),[c=!1,f]=cr({prop:r,defaultProp:a,onChange:i});return p.jsx(C8,{...s,children:p.jsx(R8,{scope:t,contentId:Cn(),triggerRef:l,open:c,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:x.useCallback(()=>d(!0),[]),onCustomAnchorRemove:x.useCallback(()=>d(!1),[]),modal:o,children:n})})};C1.displayName=t0;var k1="PopoverAnchor",O8=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=vr(k1,n),i=Fo(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=a;return x.useEffect(()=>(o(),()=>s()),[o,s]),p.jsx(_1,{...i,...r,ref:t})});O8.displayName=k1;var I1="PopoverTrigger",R1=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=vr(I1,n),i=Fo(n),o=Bt(t,a.triggerRef),s=p.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":F1(a.open),...r,ref:o,onClick:Je(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:p.jsx(_1,{asChild:!0,...i,children:s})});R1.displayName=I1;var n0="PopoverPortal",[D8,L8]=N1(n0,{forceMount:void 0}),O1=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,i=vr(n0,t);return p.jsx(D8,{scope:t,forceMount:n,children:p.jsx(br,{present:n||i.open,children:p.jsx(tp,{asChild:!0,container:a,children:r})})})};O1.displayName=n0;var Ga="PopoverContent",D1=x.forwardRef((e,t)=>{const n=L8(Ga,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,i=vr(Ga,e.__scopePopover);return p.jsx(br,{present:r||i.open,children:i.modal?p.jsx(P8,{...a,ref:t}):p.jsx(F8,{...a,ref:t})})});D1.displayName=Ga;var P8=x.forwardRef((e,t)=>{const n=vr(Ga,e.__scopePopover),r=x.useRef(null),a=Bt(t,r),i=x.useRef(!1);return x.useEffect(()=>{const o=r.current;if(o)return ul(o)},[]),p.jsx(ip,{as:Br,allowPinchZoom:!0,children:p.jsx(L1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),i.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Je(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Je(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),F8=x.forwardRef((e,t)=>{const n=vr(Ga,e.__scopePopover),r=x.useRef(!1),a=x.useRef(!1);return p.jsx(L1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),L1=x.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...c}=e,f=vr(Ga,n),m=Fo(n);return np(),p.jsx(ep,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:p.jsx(Jd,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:p.jsx(k8,{"data-state":F1(f.open),role:"dialog",id:f.contentId,...m,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),P1="PopoverClose",M8=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=vr(P1,n);return p.jsx(et.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,()=>a.onOpenChange(!1))})});M8.displayName=P1;var B8="PopoverArrow",U8=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Fo(n);return p.jsx(I8,{...a,...r,ref:t})});U8.displayName=B8;function F1(e){return e?"open":"closed"}var $8=C1,j8=R1,H8=O1,M1=D1;const Zs=$8,Qs=j8,ao=x.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>p.jsx(H8,{children:p.jsx(M1,{ref:a,align:t,sideOffset:n,className:Ee("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ao.displayName=M1.displayName;var ix=1,z8=.9,G8=.8,V8=.17,ic=.1,oc=.999,W8=.9999,q8=.99,Y8=/[\\\/_+.#"@\[\(\{&]/,K8=/[\\\/_+.#"@\[\(\{&]/g,X8=/[\s-]/,B1=/[\s-]/g;function dd(e,t,n,r,a,i,o){if(i===t.length)return a===e.length?ix:q8;var s=`${a},${i}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(i),u=n.indexOf(l,a),d=0,c,f,m,h;u>=0;)c=dd(e,t,n,r,u+1,i+1,o),c>d&&(u===a?c*=ix:Y8.test(e.charAt(u-1))?(c*=G8,m=e.slice(a,u-1).match(K8),m&&a>0&&(c*=Math.pow(oc,m.length))):X8.test(e.charAt(u-1))?(c*=z8,h=e.slice(a,u-1).match(B1),h&&a>0&&(c*=Math.pow(oc,h.length))):(c*=V8,a>0&&(c*=Math.pow(oc,u-a))),e.charAt(u)!==t.charAt(i)&&(c*=W8)),(c<ic&&n.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(u-1)!==r.charAt(i))&&(f=dd(e,t,n,r,u+1,i+2,o),f*ic>c&&(c=f*ic)),c>d&&(d=c),u=n.indexOf(l,u+1);return o[s]=d,d}function ox(e){return e.toLowerCase().replace(B1," ")}function Z8(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,dd(e,t,ox(e),ox(t),0,0,{})}function Da(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Q8(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function U1(...e){return t=>e.forEach(n=>Q8(n,t))}function Mo(...e){return R.useCallback(U1(...e),e)}function J8(e,t=[]){let n=[];function r(i,o){const s=R.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:f,children:m,...h}=c,g=(f==null?void 0:f[e][l])||s,b=R.useMemo(()=>h,Object.values(h));return R.createElement(g.Provider,{value:b},m)}function d(c,f){const m=(f==null?void 0:f[e][l])||s,h=R.useContext(m);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const a=()=>{const i=n.map(o=>R.createContext(o));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return a.scopeName=e,[r,eH(a,...t)]}function eH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}const pd=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},tH=x.useId||(()=>{});let nH=0;function sc(e){const[t,n]=x.useState(tH());return pd(()=>{e||n(r=>r??String(nH++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function rH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=aH({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,s=Vr(n),l=R.useCallback(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else a(u)},[i,e,a,s]);return[o,l]}function aH({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,a=R.useRef(r),i=Vr(t);return R.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}const r0=R.forwardRef((e,t)=>{const{children:n,...r}=e,a=R.Children.toArray(n),i=a.find(oH);if(i){const o=i.props.children,s=a.map(l=>l===i?R.Children.count(o)>1?R.Children.only(null):R.isValidElement(o)?o.props.children:null:l);return R.createElement(fd,nt({},r,{ref:t}),R.isValidElement(o)?R.cloneElement(o,void 0,s):null)}return R.createElement(fd,nt({},r,{ref:t}),n)});r0.displayName="Slot";const fd=R.forwardRef((e,t)=>{const{children:n,...r}=e;return R.isValidElement(n)?R.cloneElement(n,{...sH(r,n.props),ref:t?U1(t,n.ref):n.ref}):R.Children.count(n)>1?R.Children.only(null):null});fd.displayName="SlotClone";const iH=({children:e})=>R.createElement(R.Fragment,null,e);function oH(e){return R.isValidElement(e)&&e.type===iH}function sH(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...s)=>{i(...s),a(...s)}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}const lH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],on=lH.reduce((e,t)=>{const n=R.forwardRef((r,a)=>{const{asChild:i,...o}=r,s=i?r0:t;return R.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),R.createElement(s,nt({},o,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uH(e,t){e&&hr.flushSync(()=>e.dispatchEvent(t))}function cH(e,t=globalThis==null?void 0:globalThis.document){const n=Vr(e);R.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const md="dismissableLayer.update",dH="dismissableLayer.pointerDownOutside",pH="dismissableLayer.focusOutside";let sx;const fH=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mH=R.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=R.useContext(fH),[c,f]=R.useState(null),m=(n=c==null?void 0:c.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=R.useState({}),g=Mo(t,D=>f(D)),b=Array.from(d.layers),[E]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),T=b.indexOf(E),v=c?b.indexOf(c):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,w=v>=T,A=hH(D=>{const I=D.target,O=[...d.branches].some(M=>M.contains(I));!w||O||(i==null||i(D),s==null||s(D),D.defaultPrevented||l==null||l())},m),_=gH(D=>{const I=D.target;[...d.branches].some(M=>M.contains(I))||(o==null||o(D),s==null||s(D),D.defaultPrevented||l==null||l())},m);return cH(D=>{v===d.layers.size-1&&(a==null||a(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},m),R.useEffect(()=>{if(c)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(sx=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),lx(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=sx)}},[c,m,r,d]),R.useEffect(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),lx())},[c,d]),R.useEffect(()=>{const D=()=>h({});return document.addEventListener(md,D),()=>document.removeEventListener(md,D)},[]),R.createElement(on.div,nt({},u,{ref:g,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:Da(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Da(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Da(e.onPointerDownCapture,A.onPointerDownCapture)}))});function hH(e,t=globalThis==null?void 0:globalThis.document){const n=Vr(e),r=R.useRef(!1),a=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){$1(dH,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gH(e,t=globalThis==null?void 0:globalThis.document){const n=Vr(e),r=R.useRef(!1);return R.useEffect(()=>{const a=i=>{i.target&&!r.current&&$1(pH,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lx(){const e=new CustomEvent(md);document.dispatchEvent(e)}function $1(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?uH(a,i):a.dispatchEvent(i)}const lc="focusScope.autoFocusOnMount",uc="focusScope.autoFocusOnUnmount",ux={bubbles:!1,cancelable:!0},bH=R.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[s,l]=R.useState(null),u=Vr(a),d=Vr(i),c=R.useRef(null),f=Mo(t,g=>l(g)),m=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let g=function(v){if(m.paused||!s)return;const S=v.target;s.contains(S)?c.current=S:nr(c.current,{select:!0})},b=function(v){if(m.paused||!s)return;const S=v.relatedTarget;S!==null&&(s.contains(S)||nr(c.current,{select:!0}))},E=function(v){if(document.activeElement===document.body)for(const w of v)w.removedNodes.length>0&&nr(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const T=new MutationObserver(E);return s&&T.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),T.disconnect()}}},[r,s,m.paused]),R.useEffect(()=>{if(s){dx.add(m);const g=document.activeElement;if(!s.contains(g)){const E=new CustomEvent(lc,ux);s.addEventListener(lc,u),s.dispatchEvent(E),E.defaultPrevented||(EH(SH(j1(s)),{select:!0}),document.activeElement===g&&nr(s))}return()=>{s.removeEventListener(lc,u),setTimeout(()=>{const E=new CustomEvent(uc,ux);s.addEventListener(uc,d),s.dispatchEvent(E),E.defaultPrevented||nr(g??document.body,{select:!0}),s.removeEventListener(uc,d),dx.remove(m)},0)}}},[s,u,d,m]);const h=R.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,E=document.activeElement;if(b&&E){const T=g.currentTarget,[v,S]=yH(T);v&&S?!g.shiftKey&&E===S?(g.preventDefault(),n&&nr(v,{select:!0})):g.shiftKey&&E===v&&(g.preventDefault(),n&&nr(S,{select:!0})):E===T&&g.preventDefault()}},[n,r,m.paused]);return R.createElement(on.div,nt({tabIndex:-1},o,{ref:f,onKeyDown:h}))});function EH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nr(r,{select:t}),document.activeElement!==n)return}function yH(e){const t=j1(e),n=cx(t,e),r=cx(t.reverse(),e);return[n,r]}function j1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cx(e,t){for(const n of e)if(!xH(n,{upTo:t}))return n}function xH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function TH(e){return e instanceof HTMLInputElement&&"select"in e}function nr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&TH(e)&&t&&e.select()}}const dx=vH();function vH(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=px(e,t),e.unshift(t)},remove(t){var n;e=px(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function px(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function SH(e){return e.filter(t=>t.tagName!=="A")}const AH=R.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...a}=e;return r?hr.createPortal(R.createElement(on.div,nt({},a,{ref:t})),r):null});function wH(e,t){return R.useReducer((n,r)=>{const a=t[n][r];return a??n},e)}const Kl=e=>{const{present:t,children:n}=e,r=_H(t),a=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Mo(r.ref,a.ref);return typeof n=="function"||r.isPresent?R.cloneElement(a,{ref:i}):null};Kl.displayName="Presence";function _H(e){const[t,n]=R.useState(),r=R.useRef({}),a=R.useRef(e),i=R.useRef("none"),o=e?"mounted":"unmounted",[s,l]=wH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const u=ds(r.current);i.current=s==="mounted"?u:"none"},[s]),pd(()=>{const u=r.current,d=a.current;if(d!==e){const f=i.current,m=ds(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),pd(()=>{if(t){const u=c=>{const m=ds(r.current).includes(c.animationName);c.target===t&&m&&hr.flushSync(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(i.current=ds(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function ds(e){return(e==null?void 0:e.animationName)||"none"}let cc=0;function NH(){R.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:fx()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:fx()),cc++,()=>{cc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),cc--}},[])}function fx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var H1=iv(),dc=function(){},Xl=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:dc,onWheelCapture:dc,onTouchMoveCapture:dc}),a=r[0],i=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,E=b===void 0?"div":b,T=go(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),v=f,S=av([n,t]),w=Ke(Ke({},T),a);return x.createElement(x.Fragment,null,d&&x.createElement(v,{sideCar:H1,removeScrollBar:u,shards:c,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n}),o?x.cloneElement(x.Children.only(s),Ke(Ke({},w),{ref:S})):x.createElement(E,Ke({},w,{className:l,ref:S}),s))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xl.classNames={fullWidth:Li,zeroRight:Di};var hd=!1;if(typeof window<"u")try{var ps=Object.defineProperty({},"passive",{get:function(){return hd=!0,!0}});window.addEventListener("test",ps,ps),window.removeEventListener("test",ps,ps)}catch{hd=!1}var fa=hd?{passive:!1}:!1,CH=function(e){return e.tagName==="TEXTAREA"},z1=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CH(e)&&n[t]==="visible")},kH=function(e){return z1(e,"overflowY")},IH=function(e){return z1(e,"overflowX")},mx=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=G1(e,n);if(r){var a=V1(e,n),i=a[1],o=a[2];if(i>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},RH=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},OH=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},G1=function(e,t){return e==="v"?kH(t):IH(t)},V1=function(e,t){return e==="v"?RH(t):OH(t)},DH=function(e,t){return e==="h"&&t==="rtl"?-1:1},LH=function(e,t,n,r,a){var i=DH(e,window.getComputedStyle(t).direction),o=i*r,s=n.target,l=t.contains(s),u=!1,d=o>0,c=0,f=0;do{var m=V1(e,s),h=m[0],g=m[1],b=m[2],E=g-b-i*h;(h||E)&&G1(e,s)&&(c+=E,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(c===0||!a)||!d&&(f===0||!a))&&(u=!0),u},fs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hx=function(e){return[e.deltaX,e.deltaY]},gx=function(e){return e&&"current"in e?e.current:e},PH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FH=function(e){return`
356
356
  .block-interactivity-`.concat(e,` {pointer-events: none;}
@@ -48405,7 +48405,11 @@ function ft({
48405
48405
  }) {
48406
48406
  var E, v;
48407
48407
  const [o, s] = be(!1), [l, u] = be(!1);
48408
- j5(), i === "json" && (e = JSON.stringify(JSON.parse(e), null, 2));
48408
+ if (j5(), i === "json")
48409
+ try {
48410
+ e = JSON.stringify(JSON.parse(e), null, 2);
48411
+ } catch {
48412
+ }
48409
48413
  const d = i ? "```" + i + `
48410
48414
  ` + e + "\n```" : e, c = e.split(`
48411
48415
  `).length, p = !!a && c > a, f = r && d.length > r && !o, m = f ? d.slice(0, r) + "..." : d, h = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skuse-ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A modern, beautiful OpenAPI documentation viewer — fully compatible with OpenAPI 3.0 and 3.1",
5
5
  "keywords": ["openapi", "swagger", "api", "documentation", "react", "ui"],
6
6
  "license": "MIT",