@wexio/messenger-widget-react 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/{widget-react-CtHBMV7Z.js → widget-react-C8SNEdwd.js} +3 -2
- package/dist/{widget-react-DGksrvCr.js → widget-react-Cjd5m37N.js} +2 -2
- package/dist/widget-react-DJDytohv.js +2 -0
- package/dist/{widget-react-CfpEYz7V.js → widget-react-D_H6kTTD.js} +8 -8
- package/dist/widget-react-Df0nz7Rs.js +2 -0
- package/dist/{widget-react-B-NKlxTt.js → widget-react-DyHOzlxL.js} +11 -11
- package/dist/widget-react.js +28 -28
- package/package.json +1 -1
- package/dist/widget-react-BflWAq27.js +0 -2
- package/dist/widget-react-Yd3uIKgg.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @wexio/messenger-widget-react
|
|
2
2
|
|
|
3
|
+
## 1.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f4adfa6: Greeting variables `page.title` and `page.path`: the widget sends the host page the session starts on (`pageTitle`, `pagePath`) so the backend can render them; the playground preview knows both
|
|
8
|
+
- cba72e6: One long-lived SSE stream per tab: sound and notifications now come from the threads stream, and the per-chat stream opens only while a conversation is on screen
|
|
9
|
+
- f89e688: The conversation shows the AI "thinking" bubble right after the visitor's send, before the first realtime frame (not when an operator is connected or the queue is pending, with the AI agent off, or for a send queued offline). A deleted last message (`lastMessageDeletedId` on the threads stream) refreshes the thread list, the launcher peek and the unread count. The thread list now queries `lastMessageId`, so this release needs a BE that serves `VisitorThread.lastMessageId` (BE 1.8.0 or later).
|
|
10
|
+
|
|
11
|
+
## 1.7.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 10ee9db: Back from a thread always returns to the thread list
|
|
16
|
+
|
|
3
17
|
## 1.7.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -113,6 +113,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
113
113
|
lastMessageSenderName
|
|
114
114
|
lastMessageMediaType
|
|
115
115
|
lastMessageMediaThumbUrl
|
|
116
|
+
lastMessageId
|
|
116
117
|
}
|
|
117
118
|
nextCursor
|
|
118
119
|
hasNext
|
|
@@ -287,5 +288,5 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
287
288
|
`,...a.current()});return/^[\t ]/.test(l)&&(l=jC(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}LC.peek=RC;function LC(e){return e.value||``}function RC(){return`<`}zC.peek=BC;function zC(e,t,n,r){let i=OC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function BC(){return`!`}VC.peek=HC;function VC(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function HC(){return`!`}UC.peek=WC;function UC(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function WC(){return"`"}function GC(e,t){let n=x_(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}KC.peek=qC;function KC(e,t,n,r){let i=OC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(GC(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function qC(e,t,n){return GC(e,n)?`<`:`[`}JC.peek=YC;function JC(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function YC(){return`[`}function XC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ZC(e){let t=XC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function QC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $C(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ew(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?QC(n):XC(n),s=e.ordered?o===`.`?`)`:`.`:ZC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),$C(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function tw(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nw(e,t,n,r){let i=tw(n),a=n.bulletCurrent||XC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function rw(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var iw=fx([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function aw(e,t,n,r){return(e.children.some(function(e){return iw(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ow(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sw.peek=cw;function sw(e,t,n,r){let i=ow(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=MC(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=jC(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=MC(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+jC(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function cw(e,t,n){return n.options.strong||`*`}function lw(e,t,n,r){return n.safe(e.value,r)}function uw(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function dw(e,t,n){let r=($C(n)+(n.options.ruleSpaces?` `:``)).repeat(uw(n));return n.options.ruleSpaces?r.slice(0,-1):r}var fw={blockquote:vC,break:SC,code:EC,definition:kC,emphasis:NC,hardBreak:SC,heading:IC,html:LC,image:zC,imageReference:VC,inlineCode:UC,link:KC,linkReference:JC,list:ew,listItem:nw,paragraph:rw,root:aw,strong:sw,text:lw,thematicBreak:dw};function pw(){return{enter:{table:mw,tableData:vw,tableHeader:vw,tableRow:gw},exit:{codeText:yw,table:hw,tableData:_w,tableHeader:_w,tableRow:_w}}}function mw(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function hw(e){this.exit(e),this.data.inTable=void 0}function gw(e){this.enter({type:`tableRow`,children:[]},e)}function _w(e){this.exit(e)}function vw(e){this.enter({type:`tableCell`,children:[]},e)}function yw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bw));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function bw(e,t){return t===`|`?t:e}function xw(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
288
289
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
289
290
|
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return hC(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=fw.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Sw(){return{exit:{taskListCheckValueChecked:ww,taskListCheckValueUnchecked:ww,paragraph:Tw}}}function Cw(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Ew}}}function ww(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Tw(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ew(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=fw.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Dw(){return[NS(),rC(),cC(),pw(),Sw()]}function Ow(e){return{extensions:[PS(),iC(e),lC(),xw(e),Cw()]}}var kw={tokenize:Uw,partial:!0},Aw={tokenize:Ww,partial:!0},jw={tokenize:Gw,partial:!0},Mw={tokenize:Kw,partial:!0},Nw={tokenize:qw,partial:!0},Pw={name:`wwwAutolink`,tokenize:Vw,previous:Jw},Fw={name:`protocolAutolink`,tokenize:Hw,previous:Yw},Iw={name:`emailAutolink`,tokenize:Bw,previous:Xw},Lw={};function Rw(){return{text:Lw}}for(var zw=48;zw<123;)Lw[zw]=Iw,zw++,zw===58?zw=65:zw===91&&(zw=97);Lw[43]=Iw,Lw[45]=Iw,Lw[46]=Iw,Lw[95]=Iw,Lw[72]=[Iw,Fw],Lw[104]=[Iw,Fw],Lw[87]=[Iw,Pw],Lw[119]=[Iw,Pw];function Bw(e,t,n){let r=this,i,a;return o;function o(t){return!Zw(t)||!Xw.call(r,r.previous)||Qw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Zw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Nw,u,l)(t):t===45||t===95||L_(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&I_(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Vw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Jw.call(r,r.previous)||Qw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(kw,e.attempt(Aw,e.attempt(jw,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Hw(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Yw.call(r,r.previous)&&!Qw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(I_(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||z_(t)||X(t)||W_(t)||U_(t)?n(t):e.attempt(Aw,e.attempt(jw,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Uw(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ww(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Mw,c,s)(t):t===null||X(t)||W_(t)||t!==45&&U_(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Gw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(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(Mw,t,a)(o):o===null||X(o)||W_(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Kw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||X(o)||W_(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||X(e)||W_(e)?t(e):r(e)}function a(e){return I_(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):I_(t)?(e.consume(t),o):n(t)}}function qw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return L_(e)?n(e):t(e)}}function Jw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function Yw(e){return!I_(e)}function Xw(e){return!(e===47||Zw(e))}function Zw(e){return e===43||e===45||e===46||e===95||L_(e)}function Qw(e){let t=e.length,n=!1;for(;t--;){let 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}var $w={tokenize:sT,partial:!0};function eT(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:iT,continuation:{tokenize:aT},exit:oT}},text:{91:{name:`gfmFootnoteCall`,tokenize:rT},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tT,resolveTo:nT}}}}function tT(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=F_(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function nT(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function rT(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||X(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(F_(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return X(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function iT(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||X(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=F_(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return X(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function aT(e,t,n){return e.check(sv,t,e.attempt($w,t,n))}function oT(e){e.exit(`gfmFootnoteDefinition`)}function sT(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function cT(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&O_(o,o.length,0,ev(s,e.slice(r+1,n),t)),O_(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),O_(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=$_(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=$_(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var lT=class{constructor(){this.map=[]}add(e,t,n){uT(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function uT(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function dT(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function fT(){return{flow:{null:{name:`table`,tokenize:pT,resolveAll:mT}}}}function pT(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Y(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||X(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Y(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Y(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Y(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||X(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function mT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new lT;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(gT(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=hT(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=hT(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=hT(f,t,o,i,n,d)):(o[0]=o[1],d=hT(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&gT(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=dT(t.events,n))}return e}function hT(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},_T(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=_T(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=_T(t.events,n[2]),a=_T(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},_T(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function gT(e,t,n,r,i){let a=[],o=_T(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function _T(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var vT={name:`tasklistCheck`,tokenize:bT};function yT(){return{text:{91:vT}}}function bT(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return X(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Y(r)?t(r):Z(r)?e.check({tokenize:xT},t,n)(r):n(r)}}function xT(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ST(e){return j_([Rw(),eT(),cT(e),fT(),yT()])}var CT={};function wT(e){let t=this,n=e||CT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ST(n)),a.push(Dw()),o.push(Ow(n))}var TT=u((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(t||(t={}));function n(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}t.Root,t.Text,t.Directive,t.Comment,t.Script,t.Style,t.Tag,t.CDATA,t.Doctype;var r=class{constructor(){P(this,`parent`,null),P(this,`prev`,null),P(this,`next`,null),P(this,`startIndex`,null),P(this,`endIndex`,null)}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return v(this,e)}},i=class extends r{constructor(e){super(),P(this,`data`,void 0),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},a=class extends i{constructor(...e){super(...e),P(this,`type`,t.Text)}get nodeType(){return 3}},o=class extends i{constructor(...e){super(...e),P(this,`type`,t.Comment)}get nodeType(){return 8}},s=class extends i{constructor(e,n){super(n),P(this,`type`,t.Directive),P(this,`name`,void 0),P(this,`x-name`,void 0),P(this,`x-publicId`,void 0),P(this,`x-systemId`,void 0),this.name=e}get nodeType(){return 1}},c=class extends r{constructor(e){super(),P(this,`children`,void 0),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},l=class extends c{constructor(...e){super(...e),P(this,`type`,t.CDATA)}get nodeType(){return 4}},u=class extends c{constructor(...e){super(...e),P(this,`type`,t.Root)}get nodeType(){return 9}},d=class extends c{constructor(e,n,r=[],i=e===`script`?t.Script:e===`style`?t.Style:t.Tag){super(r),P(this,`name`,void 0),P(this,`attribs`,void 0),P(this,`type`,void 0),P(this,`namespace`,void 0),P(this,`x-attribsNamespace`,void 0),P(this,`x-attribsPrefix`,void 0),this.name=e,this.attribs=n,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}};function f(e){return n(e)}function p(e){return e.type===t.CDATA}function m(e){return e.type===t.Text}function h(e){return e.type===t.Comment}function g(e){return e.type===t.Directive}function _(e){return e.type===t.Root}function v(e,t=!1){let n;if(m(e))n=new a(e.data);else if(h(e))n=new o(e.data);else if(f(e)){let r=t?y(e.children):[],i=new d(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(p(e)){let r=t?y(e.children):[],i=new l(r);for(let e of r)e.parent=i;n=i}else if(_(e)){let r=t?y(e.children):[],i=new u(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(g(e)){let t=new s(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function y(e){let t=e.map(e=>v(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var b=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`).reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),x=`\r`,S=new RegExp(x,`g`),C=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,w=new RegExp(C,`g`);function T(e){return b[e]}function E(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function ee(e){return e=e.toLowerCase(),T(e)||e}function D(e,t){var n=`<`+t,r=e.toLowerCase().indexOf(n);if(r===-1)return!1;var i=e[r+n.length];return i===`>`||i===` `||i===` `||i===`
|
|
290
|
-
`||i===`\r`||i===`/`}function te(e){return e.replace(S,C)}function O(e){return e.replace(w,x)}function ne(e,t,n){t===void 0&&(t=null);for(var r=[],i,c=0,l=e.length;c<l;c++){var u=e[c];switch(u.nodeType){case 1:var f=ee(u.nodeName);i=new d(f,E(u.attributes)),i.children=ne(f===`template`?u.content.childNodes:u.childNodes,i);break;case 3:i=new a(O(u.nodeValue??``));break;case 8:i=new o(u.nodeValue??``);break;default:continue}var p=r[c-1]??null;p&&(p.next=i),i.parent=t,i.prev=p,i.next=null,r.push(i)}return n&&(i=new s(n.substring(0,n.indexOf(` `)).toLowerCase(),n),i.next=r[0]??null,i.parent=t,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var re=`html`,k=`head`,A=`body`,ie=/<([a-zA-Z]+[0-9]?)/;function ae(e,t){return t?t.createHTML(e):e}var oe=function(e,t,n){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},se=function(e,t,n){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},ce=typeof window==`object`&&window.DOMParser;if(typeof ce==`function`){var le=new ce,ue=`text/html`;se=function(e,t,n){return t&&(e=`<${t}>${e}</${t}>`),le.parseFromString(e,ue)},oe=se}if(typeof document==`object`&&document.implementation){var de=document.implementation.createHTMLDocument();oe=function(e,t,n){if(t){var r=de.documentElement.querySelector(t);return r&&(r.innerHTML=ae(e,n)),de}return de.documentElement.innerHTML=ae(e,n),de}}var fe=typeof document==`object`&&document.createElement(`template`),pe;fe&&fe.content&&(pe=function(e,t){return fe.innerHTML=ae(e,t),fe.content.childNodes});var me=function(){return document.createDocumentFragment().childNodes};function he(e,t){var n,r;e=te(e);var i=(ie.exec(e)?.[1])?.toLowerCase();switch(i){case re:var a=se(e);if(!D(e,k)){var o=a.querySelector(k);(n=o?.parentNode)==null||n.removeChild(o)}if(!D(e,A)){var o=a.querySelector(A);(r=o?.parentNode)==null||r.removeChild(o)}return a.querySelectorAll(re);case k:case A:var s=oe(e,void 0,t).querySelectorAll(i);return D(e,A)&&D(e,k)?s[0].parentNode?.childNodes??me():s;default:if(pe)return pe(e,t);var o=oe(e,A,t).querySelector(A);return o?.childNodes??me()}}var ge=/<(![a-zA-Z\s]+)>/;function _e(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];var n=ge.exec(e),r=n?n[1]:void 0;return ne(he(e,t?.trustedTypePolicy),null,r)}e.default=_e})),ET=u((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),DT=u((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!1,e,null,!1,!1)}),[`allowFullScreen`,`async`,`autoFocus`,`autoPlay`,`controls`,`default`,`defer`,`disabled`,`disablePictureInPicture`,`disableRemotePlayback`,`formNoValidate`,`hidden`,`loop`,`noModule`,`noValidate`,`open`,`playsInline`,`readOnly`,`required`,`reversed`,`scoped`,`seamless`,`itemScope`].forEach(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>e[1].toUpperCase();`accent-height.alignment-baseline.arabic-form.baseline-shift.cap-height.clip-path.clip-rule.color-interpolation.color-interpolation-filters.color-profile.color-rendering.dominant-baseline.enable-background.fill-opacity.fill-rule.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-name.glyph-orientation-horizontal.glyph-orientation-vertical.horiz-adv-x.horiz-origin-x.image-rendering.letter-spacing.lighting-color.marker-end.marker-mid.marker-start.overline-position.overline-thickness.paint-order.panose-1.pointer-events.rendering-intent.shape-rendering.stop-color.stop-opacity.strikethrough-position.strikethrough-thickness.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.underline-position.underline-thickness.unicode-bidi.unicode-range.units-per-em.v-alphabetic.v-hanging.v-ideographic.v-mathematical.vector-effect.vert-adv-y.vert-origin-x.vert-origin-y.word-spacing.writing-mode.xmlns:xlink.x-height`.split(`.`).forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=ET(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),OT=u((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=o,t.setStyleProp=c;var r=e(`react`),i=n(Pg()),a=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function o(e,t){return e.includes(`-`)?!a.has(e):!!(t&&typeof t.is==`string`)}var s={reactCompat:!0};function c(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,i.default)(e,s)}catch{t.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(`.`)[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),t.canTextBeChildOfNode=e=>!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name),t.returnFirstArg=e=>e})),kT=u((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var t=DT(),n=OT(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e={},o){let c={},l=!!(e.type&&a[e.type]);for(let a in e){let u=e[a];if((0,t.isCustomAttribute)(a)){c[a]=u;continue}let d=a.toLowerCase(),f=s(d);if(f){let e=(0,t.getPropertyInfo)(f);switch(r.includes(f)&&i.includes(o)&&!l&&(f=s(`default`+d)),c[f]=u,e?.type){case t.BOOLEAN:c[f]=!0;break;case t.OVERLOADED_BOOLEAN:u===``&&(c[f]=!0);break}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[a]=u)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}}));function AT(e){return e.type===$.Tag||e.type===$.Script||e.type===$.Style}var $,jT=i((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})($||($={})),$.Root,$.Text,$.Directive,$.Comment,$.Script,$.Style,$.Tag,$.CDATA,$.Doctype}));function MT(e){return AT(e)}function NT(e){return e.type===$.CDATA}function PT(e){return e.type===$.Text}function FT(e){return e.type===$.Comment}function IT(e){return e.type===$.Directive}function LT(e){return e.type===$.Root}function RT(e){return Object.hasOwn(e,`children`)}function zT(e,t=!1){let n;if(PT(e))n=new UT(e.data);else if(FT(e))n=new WT(e.data);else if(MT(e)){let r=t?BT(e.children):[],i=new YT(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(NT(e)){let r=t?BT(e.children):[],i=new qT(r);for(let e of r)e.parent=i;n=i}else if(LT(e)){let r=t?BT(e.children):[],i=new JT(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(IT(e)){let t=new GT(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function BT(e){let t=e.map(e=>zT(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var VT,HT,UT,WT,GT,KT,qT,JT,YT,XT=i((()=>{jT(),wt(),VT=class{constructor(){P(this,`parent`,null),P(this,`prev`,null),P(this,`next`,null),P(this,`startIndex`,null),P(this,`endIndex`,null)}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return zT(this,e)}},HT=class extends VT{constructor(e){super(),P(this,`data`,void 0),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},UT=class extends HT{constructor(...e){super(...e),P(this,`type`,$.Text)}get nodeType(){return 3}},WT=class extends HT{constructor(...e){super(...e),P(this,`type`,$.Comment)}get nodeType(){return 8}},GT=class extends HT{constructor(e,t){super(t),P(this,`type`,$.Directive),P(this,`name`,void 0),P(this,`x-name`,void 0),P(this,`x-publicId`,void 0),P(this,`x-systemId`,void 0),this.name=e}get nodeType(){return 1}},KT=class extends VT{constructor(e){super(),P(this,`children`,void 0),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},qT=class extends KT{constructor(...e){super(...e),P(this,`type`,$.CDATA)}get nodeType(){return 4}},JT=class extends KT{constructor(...e){super(...e),P(this,`type`,$.Root)}get nodeType(){return 9}},YT=class extends KT{constructor(e,t,n=[],r=e===`script`?$.Script:e===`style`?$.Style:$.Tag){super(n),P(this,`name`,void 0),P(this,`attribs`,void 0),P(this,`type`,void 0),P(this,`namespace`,void 0),P(this,`x-attribsNamespace`,void 0),P(this,`x-attribsPrefix`,void 0),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}}})),ZT=t({CDATA:()=>qT,Comment:()=>WT,DataNode:()=>HT,Document:()=>JT,DomHandler:()=>$T,Element:()=>YT,Node:()=>VT,NodeWithChildren:()=>KT,ProcessingInstruction:()=>GT,Text:()=>UT,cloneNode:()=>zT,default:()=>$T,hasChildren:()=>RT,isCDATA:()=>NT,isComment:()=>FT,isDirective:()=>IT,isDocument:()=>LT,isTag:()=>MT,isText:()=>PT}),QT,$T,eE=i((()=>{jT(),XT(),wt(),XT(),QT={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},$T=class{constructor(e,t,n){P(this,`dom`,[]),P(this,`root`,new JT(this.dom)),P(this,`callback`,void 0),P(this,`options`,void 0),P(this,`elementCB`,void 0),P(this,`done`,!1),P(this,`tagStack`,[this.root]),P(this,`lastNode`,null),P(this,`parser`,null),typeof t==`function`&&(n=t,t=QT),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??QT,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new JT(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=new YT(e,t,void 0,this.options.xmlMode?$.Tag:void 0);this.addNode(n),this.tagStack.push(n)}ontext(e){let{lastNode:t}=this;if(t&&t.type===$.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new UT(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===$.Comment){this.lastNode.data+=e;return}let t=new WT(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new UT(``),t=new qT([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new GT(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),tE=u((t=>{var r=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.default=l;var i=(eE(),n(ZT)),a=e(`react`),o=r(kT()),s=OT(),c={cloneElement:a.cloneElement,createElement:a.createElement,isValidElement:a.isValidElement};function l(e,t={}){let n=[],r=typeof t.replace==`function`,i=t.transform??s.returnFirstArg,{cloneElement:a,createElement:f,isValidElement:p}=t.library??c,m=e.length;u(e);for(let c=0;c<m;c++){let u=e[c];if(r){let e=t.replace?.call(t,u,c);if(p(e)){m>1&&(e=a(e,{key:e.key??c})),n.push(i(e,u,c));continue}}if(u.type===`text`){let e=!u.data.trim().length;if(e&&u.parent&&!(0,s.canTextBeChildOfNode)(u.parent)||t.trim&&e)continue;n.push(i(u.data,u,c));continue}let h=u,g={};d(h)?((0,s.setStyleProp)(h.attribs.style,h.attribs),g=h.attribs):h.attribs&&(g=(0,o.default)(h.attribs,h.name));let _;switch(u.type){case`script`:case`style`:u.children[0]&&(g.dangerouslySetInnerHTML={__html:u.children[0].data});break;case`tag`:u.name===`textarea`&&u.children[0]?g.defaultValue=u.children[0].data:u.children?.length&&(_=l(u.children,t));break;default:continue}m>1&&(g.key=c),n.push(i(f(u.name,g,_),u,c))}return n.length===1?n[0]:n}function u(e){for(let t of e)(t.type===`tag`||t.type===`script`||t.type===`style`)&&(Object.setPrototypeOf(t,i.Element.prototype),u(t.children))}function d(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,s.isCustomComponent)(e.name,e.attribs)}})),nE=s(u((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=s;var r=t(TT());e.htmlToDOM=r.default,e.attributesToProps=t(kT()).default;var i=t(tE());e.domToReact=i.default;var a=(eE(),n(ZT));Object.defineProperty(e,`Comment`,{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(e,`Element`,{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(e,`ProcessingInstruction`,{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(e,`Text`,{enumerable:!0,get:function(){return a.Text}});var o={lowerCaseAttributeNames:!1};function s(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let n=Object.assign(Object.assign({},t?.htmlparser2??o),{trustedTypePolicy:t?.trustedTypePolicy});return(0,i.default)((0,r.default)(e,n),t)}}))(),1),rE=nE.default.default||nE.default;function iE({entries:e}){let t=a(`article`),[n,r]=S(!1),i=(e,t)=>{e.preventDefault();let n=e.currentTarget.getRootNode(),r=n instanceof ShadowRoot||n instanceof Document?n:document,i=`querySelector`in r?r.querySelector(`[id="${CSS.escape(t)}"]`):null;if(!i)return;let a=i.closest(`[data-slot='scroll-area-viewport']`);if(!a){let e=i.parentElement;for(;e;){let t=getComputedStyle(e);if(/(auto|scroll|overlay)/.test(t.overflowY)){a=e;break}e=e.parentElement}}if(a){let e=i.getBoundingClientRect(),t=a.getBoundingClientRect();a.scrollTo({top:a.scrollTop+e.top-t.top-16,behavior:`smooth`})}else i.scrollIntoView({behavior:`smooth`,block:`start`})};return E(`nav`,{"aria-label":t(`tableOfContents`),className:c(`wx-toc mt-0 overflow-hidden rounded-xl border border-wx-border bg-wx-bg`,`[&_a]:no-underline [&_a]:text-inherit [&_a:hover]:opacity-100`,`[&_ul]:m-0 [&_ul]:list-none [&_ul]:p-0`,`[&_li]:m-0`),children:[E(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,className:c(`flex w-full items-center justify-between gap-3 px-4 py-3`,`text-left text-sm font-medium text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/40`),children:[T(`span`,{children:t(`tableOfContents`)}),T(im,{className:c(`h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform duration-200`,n&&`rotate-180`),"aria-hidden":`true`})]}),T(`div`,{className:c(`grid transition-[grid-template-rows] duration-200 ease-out`,n?`grid-rows-[1fr]`:`grid-rows-[0fr]`),"aria-hidden":!n,children:T(`div`,{className:`min-h-0 overflow-hidden`,children:T(`div`,{className:`border-t border-wx-border/70 px-2 py-2`,children:T(`div`,{className:`flex flex-col`,children:e.map(e=>{let t=e.level===2?16:e.level===3?32:0;return T(`button`,{type:`button`,onClick:t=>i(t,e.id),className:c(`flex h-8 items-center truncate rounded-md pr-2 text-left text-sm text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/50`),style:{paddingLeft:12+t},children:T(`span`,{className:`truncate`,children:e.text})},e.id)})})})})})]})}function aE({summary:e,body:t,defaultOpen:n}){let[r,i]=S(n);return E(`div`,{className:`my-2 overflow-hidden rounded-lg border border-wx-border`,children:[E(`button`,{type:`button`,onClick:()=>i(e=>!e),"aria-expanded":r,className:c(`flex w-full items-center justify-between gap-3 px-4 py-3`,`text-left text-sm font-semibold text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/50`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary/30`),children:[T(`span`,{className:`min-w-0 flex-1`,children:e}),T(im,{className:c(`h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform`,r&&`rotate-180`),"aria-hidden":`true`})]}),r&&T(`div`,{className:`border-t border-wx-border px-4 py-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0`,children:t})]})}var oE=(e,t)=>{let n=e.name===`details`,r=e.name===`div`&&e.attribs?.[`data-type`]===`details`;if(!n&&!r)return;let i=r?(e.children??[]).flatMap(e=>e instanceof nE.Element&&e.name===`div`&&!e.attribs?.[`data-type`]?e.children??[]:[e]):e.children??[],a=i.find(e=>e instanceof nE.Element&&e.name===`summary`),o=i.filter(e=>e!==a&&!(e instanceof nE.Element&&e.name===`button`)),s=o.find(e=>e instanceof nE.Element&&e.name===`div`&&(e.attribs?.[`data-type`]===`detailsContent`||e.attribs?.[`data-type`]===`details-content`)),c=s?s.children??[]:o,l=a?(0,nE.domToReact)(a.children,t.options):null,u=T(w,{children:(0,nE.domToReact)(c,t.options)});return T(aE,{defaultOpen:e.attribs?.open!==void 0||e.attribs?.[`data-open`]===`true`,summary:l,body:u})},sE={card:`border-wx-border bg-wx-bg-elevated/60`,callout:`border-wx-primary/30 bg-wx-primary/5`,note:`border-wx-border bg-wx-bg-elevated/60`,tip:`border-wx-success/30 bg-wx-success/5`,warning:`border-wx-warning/30 bg-wx-warning/5`,danger:`border-wx-danger/30 bg-wx-danger/5`},cE=(e,t)=>{let n=sE[e.name];if(n)return T(`div`,{className:`my-4 rounded-wx-md border px-4 py-3 ${n}`,"data-custom-block":e.name,children:(0,nE.domToReact)(e.children??[],t.options)})};function lE(e,t){let n=e.normalize(`NFD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`,r=n,i=2;for(;t.has(r);)r=`${n}-${i}`,i+=1;return t.add(r),r}function uE(e){let t=``;for(let n of e.children??[])n.type===`text`?t+=n.data??``:n instanceof nE.Element&&(t+=uE(n));return t}var dE=(e,t)=>{if(e.name!==`h1`&&e.name!==`h2`&&e.name!==`h3`)return;let n=Number(e.name.slice(1)),r=uE(e).trim();if(!r)return;let i=lE(r,t.seenIds);return t.entries.push({id:i,text:r,level:n}),h(e.name,{id:i},(0,nE.domToReact)(e.children??[],t.options))},fE=(e,t)=>{if(e.name!==`img`)return;let n=e.attribs??{},r=n[`data-align`]??`center`,i=n.width||n.style?.match(/width:\s*([^;]+)/i)?.[1],a=r===`left`?`0`:`auto`,o=r===`right`?`0`:`auto`,s=n.src??``,c=n.alt??``,l={...i?{width:i}:{},marginLeft:a,marginRight:o,display:`block`};if(t.images&&t.onImageClick){let e=t.images.length;t.images.push({url:s,mimetype:`image/jpeg`,alt:c});let n=t.onImageClick;return T(`button`,{type:`button`,onClick:()=>n(e),className:`my-3 block w-full cursor-zoom-in border-0 bg-transparent p-0`,"aria-label":c||t.openImageLabel,children:T(`img`,{src:s,alt:c,style:l,className:`max-w-full`})})}return T(`img`,{src:s,alt:c,style:l,className:`my-3 max-w-full`})},pE=(e,t)=>{if(e.name!==`a`)return;let n=e.attribs?.href??``;return T(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>t.onLinkClick?.(n),className:`text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-70`,children:(0,nE.domToReact)(e.children??[],t.options)})},mE=(e,t)=>{if(e.name===`table`)return T(`div`,{className:c(`my-3 overflow-x-auto`,`[scrollbar-width:thin] [scrollbar-color:var(--color-wx-fg-subtle)_transparent]`,`[&::-webkit-scrollbar]:h-2`,`[&::-webkit-scrollbar-track]:bg-transparent`,`[&::-webkit-scrollbar-thumb]:rounded-full`,`[&::-webkit-scrollbar-thumb]:bg-wx-fg-subtle/40`,`[&::-webkit-scrollbar-thumb:hover]:bg-wx-fg-subtle/60`),children:T(`table`,{children:(0,nE.domToReact)(e.children??[],t.options)})})};function hE({tabs:e}){let t=a(`article`),[n,r]=S(0);return e.length===0?null:E(`div`,{className:`my-4`,children:[T(`div`,{role:`tablist`,className:`relative flex items-center gap-1 border-b border-wx-border`,children:e.map((e,i)=>{let a=i===n,o=e.label||t(`tabFallback`,{n:i+1});return E(`button`,{type:`button`,role:`tab`,"aria-selected":a,tabIndex:a?0:-1,onClick:()=>r(i),className:c(`group relative inline-flex items-center justify-center px-3 py-2 text-sm`,`transition-colors focus-visible:outline-none`,a?`font-semibold text-wx-fg`:`font-medium text-wx-fg-muted hover:text-wx-fg`),children:[o,T(`span`,{"aria-hidden":`true`,className:c(`pointer-events-none absolute inset-x-2 bottom-0 h-[2px] origin-left rounded-full bg-wx-primary`,`transition-transform duration-200 ease-out`,a?`scale-x-100`:`scale-x-0`)})]},i)})}),T(`div`,{className:`mt-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0`,children:e[n]?.body})]})}var gE=[dE,(e,t)=>{if(e.name===`div`&&(e.attribs?.[`data-type`]===`tabs`||e.attribs?.[`data-type`]===`tabs`))return T(hE,{tabs:(e.children??[]).filter(e=>e instanceof nE.Element&&e.name===`div`&&e.attribs?.[`data-type`]===`tab`).map(e=>{let n=e.children?.find(e=>e instanceof nE.Element&&e.name===`div`&&`data-tab-label`in(e.attribs??{})),r=(e.children??[]).filter(e=>e!==n);return{label:n?uE(n).trim():``,body:T(w,{children:(0,nE.domToReact)(r,t.options)})}})})},oE,cE,mE,fE,pE];function _E(e,t,n,r,i,a){let o={},s={options:o,entries:e,seenIds:t,images:n,onImageClick:r,onLinkClick:i,openImageLabel:a};return o.replace=e=>{if(e instanceof nE.Element){for(let t of Object.keys(e.attribs))t.startsWith(`data-wx-`)&&delete e.attribs[t];for(let t of gE){let n=t(e,s);if(n!==void 0)return n}}},o}function vE({html:e,className:t,onLinkClick:n}){let[r,i]=S(null),o=a(`messages`)(`openImage`),{trackLinkClick:s}=Ah(),c=g(e=>s({url:e,targetType:`EXTERNAL`}),[s]),l=n??c,{parsed:u,entries:d,images:f}=b(()=>{let t=[],n=new Set,r=[];return{parsed:rE(e,_E(t,n,r,i,l,o)),entries:t,images:r}},[e,l,o]);return E(`div`,{className:t,children:[d.length>=3&&T(iE,{entries:d}),u,f.length>0&&T(Uh,{items:f,initialIndex:r??0,open:r!==null,onClose:()=>i(null)})]})}function yE(e){return rE(e,_E([],new Set))}var bE=[{value:`en`,label:`English`},{value:`en-US`,label:`English (US)`},{value:`en-GB`,label:`English (UK)`},{value:`uk`,label:`Українська`},{value:`de`,label:`Deutsch`},{value:`es`,label:`Español`},{value:`es-MX`,label:`Español (México)`},{value:`fr`,label:`Français`},{value:`it`,label:`Italiano`},{value:`pt`,label:`Português`},{value:`pt-BR`,label:`Português (Brasil)`},{value:`nl`,label:`Nederlands`},{value:`pl`,label:`Polski`},{value:`tr`,label:`Türkçe`},{value:`cs`,label:`Čeština`},{value:`sk`,label:`Slovenčina`},{value:`ro`,label:`Română`},{value:`hu`,label:`Magyar`},{value:`el`,label:`Ελληνικά`},{value:`sv`,label:`Svenska`},{value:`da`,label:`Dansk`},{value:`no`,label:`Norsk`},{value:`fi`,label:`Suomi`},{value:`ar`,label:`العربية`},{value:`he`,label:`עברית`},{value:`hi`,label:`हिन्दी`},{value:`th`,label:`ไทย`},{value:`vi`,label:`Tiếng Việt`},{value:`id`,label:`Bahasa Indonesia`},{value:`ja`,label:`日本語`},{value:`ko`,label:`한국어`},{value:`zh`,label:`中文(简体)`},{value:`zh-TW`,label:`中文(繁體)`}];function xE(e){let t=bE.find(t=>t.value===e);if(t)return t.label;let n=e.split(`-`)[0].toLowerCase(),r=bE.find(e=>e.value===n);return r?r.label:n.toUpperCase()}export{cf as $,Ol as $t,op as A,ed as At,Uf as B,ku as Bt,Wp as C,hd as Ct,vp as D,cd as Dt,pp as E,ud as Et,Bf as F,Vu as Ft,Rf as G,Tu as Gt,kf as H,Lu as Ht,Kf as I,Gu as It,Df as J,eu as Jt,Af as K,ou as Kt,Vf as L,Ju as Lt,ip as M,td as Mt,Hf as N,Zu as Nt,_p as O,od as Ot,Wf as P,Qu as Pt,Cf as Q,Pl as Qt,Jf as R,qu as Rt,Kp as S,_d as St,mp as T,dd as Tt,Lf as U,Du as Ut,Gf as V,Ru as Vt,Mf as W,Eu as Wt,wf as X,nu as Xt,Of as Y,$l as Yt,Sf as Z,jl as Zt,sm as _,Md as _t,bS as a,j as an,Rd as at,rm as b,Vd as bt,Ah as c,A as cn,Gd as ct,Ch as d,bd as dt,ll as en,yf as et,Nm as f,Sd as ft,dm as g,qd as gt,fm as h,Yd as ht,wT as i,we as in,Bd as it,sp as j,$u as jt,dp as k,id as kt,Eh as l,wd as lt,pm as m,Zd as mt,vE as n,Ba as nn,nf as nt,Uh as o,O as on,Od as ot,cm as p,Id as pt,Nf as q,Ql as qt,yE as r,za as rn,ef as rt,Mh as s,ne as sn,Pd as st,xE as t,G as tn,rf as tt,Th as u,Ad as ut,om as v,Ud as vt,Sp as w,pd as wt,qp as x,Ed as xt,im as y,zd as yt,Yf as z,Ou as zt};
|
|
291
|
-
//# sourceMappingURL=widget-react-
|
|
291
|
+
`||i===`\r`||i===`/`}function te(e){return e.replace(S,C)}function O(e){return e.replace(w,x)}function ne(e,t,n){t===void 0&&(t=null);for(var r=[],i,c=0,l=e.length;c<l;c++){var u=e[c];switch(u.nodeType){case 1:var f=ee(u.nodeName);i=new d(f,E(u.attributes)),i.children=ne(f===`template`?u.content.childNodes:u.childNodes,i);break;case 3:i=new a(O(u.nodeValue??``));break;case 8:i=new o(u.nodeValue??``);break;default:continue}var p=r[c-1]??null;p&&(p.next=i),i.parent=t,i.prev=p,i.next=null,r.push(i)}return n&&(i=new s(n.substring(0,n.indexOf(` `)).toLowerCase(),n),i.next=r[0]??null,i.parent=t,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var re=`html`,k=`head`,A=`body`,ie=/<([a-zA-Z]+[0-9]?)/;function ae(e,t){return t?t.createHTML(e):e}var oe=function(e,t,n){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},se=function(e,t,n){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},ce=typeof window==`object`&&window.DOMParser;if(typeof ce==`function`){var le=new ce,ue=`text/html`;se=function(e,t,n){return t&&(e=`<${t}>${e}</${t}>`),le.parseFromString(e,ue)},oe=se}if(typeof document==`object`&&document.implementation){var de=document.implementation.createHTMLDocument();oe=function(e,t,n){if(t){var r=de.documentElement.querySelector(t);return r&&(r.innerHTML=ae(e,n)),de}return de.documentElement.innerHTML=ae(e,n),de}}var fe=typeof document==`object`&&document.createElement(`template`),pe;fe&&fe.content&&(pe=function(e,t){return fe.innerHTML=ae(e,t),fe.content.childNodes});var me=function(){return document.createDocumentFragment().childNodes};function he(e,t){var n,r;e=te(e);var i=(ie.exec(e)?.[1])?.toLowerCase();switch(i){case re:var a=se(e);if(!D(e,k)){var o=a.querySelector(k);(n=o?.parentNode)==null||n.removeChild(o)}if(!D(e,A)){var o=a.querySelector(A);(r=o?.parentNode)==null||r.removeChild(o)}return a.querySelectorAll(re);case k:case A:var s=oe(e,void 0,t).querySelectorAll(i);return D(e,A)&&D(e,k)?s[0].parentNode?.childNodes??me():s;default:if(pe)return pe(e,t);var o=oe(e,A,t).querySelector(A);return o?.childNodes??me()}}var ge=/<(![a-zA-Z\s]+)>/;function _e(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];var n=ge.exec(e),r=n?n[1]:void 0;return ne(he(e,t?.trustedTypePolicy),null,r)}e.default=_e})),ET=u((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),DT=u((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!1,e,null,!1,!1)}),[`allowFullScreen`,`async`,`autoFocus`,`autoPlay`,`controls`,`default`,`defer`,`disabled`,`disablePictureInPicture`,`disableRemotePlayback`,`formNoValidate`,`hidden`,`loop`,`noModule`,`noValidate`,`open`,`playsInline`,`readOnly`,`required`,`reversed`,`scoped`,`seamless`,`itemScope`].forEach(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>e[1].toUpperCase();`accent-height.alignment-baseline.arabic-form.baseline-shift.cap-height.clip-path.clip-rule.color-interpolation.color-interpolation-filters.color-profile.color-rendering.dominant-baseline.enable-background.fill-opacity.fill-rule.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-name.glyph-orientation-horizontal.glyph-orientation-vertical.horiz-adv-x.horiz-origin-x.image-rendering.letter-spacing.lighting-color.marker-end.marker-mid.marker-start.overline-position.overline-thickness.paint-order.panose-1.pointer-events.rendering-intent.shape-rendering.stop-color.stop-opacity.strikethrough-position.strikethrough-thickness.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.underline-position.underline-thickness.unicode-bidi.unicode-range.units-per-em.v-alphabetic.v-hanging.v-ideographic.v-mathematical.vector-effect.vert-adv-y.vert-origin-x.vert-origin-y.word-spacing.writing-mode.xmlns:xlink.x-height`.split(`.`).forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=ET(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),OT=u((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=o,t.setStyleProp=c;var r=e(`react`),i=n(Pg()),a=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function o(e,t){return e.includes(`-`)?!a.has(e):!!(t&&typeof t.is==`string`)}var s={reactCompat:!0};function c(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,i.default)(e,s)}catch{t.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(`.`)[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),t.canTextBeChildOfNode=e=>!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name),t.returnFirstArg=e=>e})),kT=u((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var t=DT(),n=OT(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e={},o){let c={},l=!!(e.type&&a[e.type]);for(let a in e){let u=e[a];if((0,t.isCustomAttribute)(a)){c[a]=u;continue}let d=a.toLowerCase(),f=s(d);if(f){let e=(0,t.getPropertyInfo)(f);switch(r.includes(f)&&i.includes(o)&&!l&&(f=s(`default`+d)),c[f]=u,e?.type){case t.BOOLEAN:c[f]=!0;break;case t.OVERLOADED_BOOLEAN:u===``&&(c[f]=!0);break}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[a]=u)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}}));function AT(e){return e.type===$.Tag||e.type===$.Script||e.type===$.Style}var $,jT=i((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})($||($={})),$.Root,$.Text,$.Directive,$.Comment,$.Script,$.Style,$.Tag,$.CDATA,$.Doctype}));function MT(e){return AT(e)}function NT(e){return e.type===$.CDATA}function PT(e){return e.type===$.Text}function FT(e){return e.type===$.Comment}function IT(e){return e.type===$.Directive}function LT(e){return e.type===$.Root}function RT(e){return Object.hasOwn(e,`children`)}function zT(e,t=!1){let n;if(PT(e))n=new UT(e.data);else if(FT(e))n=new WT(e.data);else if(MT(e)){let r=t?BT(e.children):[],i=new YT(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(NT(e)){let r=t?BT(e.children):[],i=new qT(r);for(let e of r)e.parent=i;n=i}else if(LT(e)){let r=t?BT(e.children):[],i=new JT(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(IT(e)){let t=new GT(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function BT(e){let t=e.map(e=>zT(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var VT,HT,UT,WT,GT,KT,qT,JT,YT,XT=i((()=>{jT(),wt(),VT=class{constructor(){P(this,`parent`,null),P(this,`prev`,null),P(this,`next`,null),P(this,`startIndex`,null),P(this,`endIndex`,null)}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return zT(this,e)}},HT=class extends VT{constructor(e){super(),P(this,`data`,void 0),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},UT=class extends HT{constructor(...e){super(...e),P(this,`type`,$.Text)}get nodeType(){return 3}},WT=class extends HT{constructor(...e){super(...e),P(this,`type`,$.Comment)}get nodeType(){return 8}},GT=class extends HT{constructor(e,t){super(t),P(this,`type`,$.Directive),P(this,`name`,void 0),P(this,`x-name`,void 0),P(this,`x-publicId`,void 0),P(this,`x-systemId`,void 0),this.name=e}get nodeType(){return 1}},KT=class extends VT{constructor(e){super(),P(this,`children`,void 0),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},qT=class extends KT{constructor(...e){super(...e),P(this,`type`,$.CDATA)}get nodeType(){return 4}},JT=class extends KT{constructor(...e){super(...e),P(this,`type`,$.Root)}get nodeType(){return 9}},YT=class extends KT{constructor(e,t,n=[],r=e===`script`?$.Script:e===`style`?$.Style:$.Tag){super(n),P(this,`name`,void 0),P(this,`attribs`,void 0),P(this,`type`,void 0),P(this,`namespace`,void 0),P(this,`x-attribsNamespace`,void 0),P(this,`x-attribsPrefix`,void 0),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}}})),ZT=t({CDATA:()=>qT,Comment:()=>WT,DataNode:()=>HT,Document:()=>JT,DomHandler:()=>$T,Element:()=>YT,Node:()=>VT,NodeWithChildren:()=>KT,ProcessingInstruction:()=>GT,Text:()=>UT,cloneNode:()=>zT,default:()=>$T,hasChildren:()=>RT,isCDATA:()=>NT,isComment:()=>FT,isDirective:()=>IT,isDocument:()=>LT,isTag:()=>MT,isText:()=>PT}),QT,$T,eE=i((()=>{jT(),XT(),wt(),XT(),QT={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},$T=class{constructor(e,t,n){P(this,`dom`,[]),P(this,`root`,new JT(this.dom)),P(this,`callback`,void 0),P(this,`options`,void 0),P(this,`elementCB`,void 0),P(this,`done`,!1),P(this,`tagStack`,[this.root]),P(this,`lastNode`,null),P(this,`parser`,null),typeof t==`function`&&(n=t,t=QT),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??QT,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new JT(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=new YT(e,t,void 0,this.options.xmlMode?$.Tag:void 0);this.addNode(n),this.tagStack.push(n)}ontext(e){let{lastNode:t}=this;if(t&&t.type===$.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new UT(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===$.Comment){this.lastNode.data+=e;return}let t=new WT(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new UT(``),t=new qT([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new GT(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),tE=u((t=>{var r=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.default=l;var i=(eE(),n(ZT)),a=e(`react`),o=r(kT()),s=OT(),c={cloneElement:a.cloneElement,createElement:a.createElement,isValidElement:a.isValidElement};function l(e,t={}){let n=[],r=typeof t.replace==`function`,i=t.transform??s.returnFirstArg,{cloneElement:a,createElement:f,isValidElement:p}=t.library??c,m=e.length;u(e);for(let c=0;c<m;c++){let u=e[c];if(r){let e=t.replace?.call(t,u,c);if(p(e)){m>1&&(e=a(e,{key:e.key??c})),n.push(i(e,u,c));continue}}if(u.type===`text`){let e=!u.data.trim().length;if(e&&u.parent&&!(0,s.canTextBeChildOfNode)(u.parent)||t.trim&&e)continue;n.push(i(u.data,u,c));continue}let h=u,g={};d(h)?((0,s.setStyleProp)(h.attribs.style,h.attribs),g=h.attribs):h.attribs&&(g=(0,o.default)(h.attribs,h.name));let _;switch(u.type){case`script`:case`style`:u.children[0]&&(g.dangerouslySetInnerHTML={__html:u.children[0].data});break;case`tag`:u.name===`textarea`&&u.children[0]?g.defaultValue=u.children[0].data:u.children?.length&&(_=l(u.children,t));break;default:continue}m>1&&(g.key=c),n.push(i(f(u.name,g,_),u,c))}return n.length===1?n[0]:n}function u(e){for(let t of e)(t.type===`tag`||t.type===`script`||t.type===`style`)&&(Object.setPrototypeOf(t,i.Element.prototype),u(t.children))}function d(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,s.isCustomComponent)(e.name,e.attribs)}})),nE=s(u((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=s;var r=t(TT());e.htmlToDOM=r.default,e.attributesToProps=t(kT()).default;var i=t(tE());e.domToReact=i.default;var a=(eE(),n(ZT));Object.defineProperty(e,`Comment`,{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(e,`Element`,{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(e,`ProcessingInstruction`,{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(e,`Text`,{enumerable:!0,get:function(){return a.Text}});var o={lowerCaseAttributeNames:!1};function s(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let n=Object.assign(Object.assign({},t?.htmlparser2??o),{trustedTypePolicy:t?.trustedTypePolicy});return(0,i.default)((0,r.default)(e,n),t)}}))(),1),rE=nE.default.default||nE.default;function iE({entries:e}){let t=a(`article`),[n,r]=S(!1),i=(e,t)=>{e.preventDefault();let n=e.currentTarget.getRootNode(),r=n instanceof ShadowRoot||n instanceof Document?n:document,i=`querySelector`in r?r.querySelector(`[id="${CSS.escape(t)}"]`):null;if(!i)return;let a=i.closest(`[data-slot='scroll-area-viewport']`);if(!a){let e=i.parentElement;for(;e;){let t=getComputedStyle(e);if(/(auto|scroll|overlay)/.test(t.overflowY)){a=e;break}e=e.parentElement}}if(a){let e=i.getBoundingClientRect(),t=a.getBoundingClientRect();a.scrollTo({top:a.scrollTop+e.top-t.top-16,behavior:`smooth`})}else i.scrollIntoView({behavior:`smooth`,block:`start`})};return E(`nav`,{"aria-label":t(`tableOfContents`),className:c(`wx-toc mt-0 overflow-hidden rounded-xl border border-wx-border bg-wx-bg`,`[&_a]:no-underline [&_a]:text-inherit [&_a:hover]:opacity-100`,`[&_ul]:m-0 [&_ul]:list-none [&_ul]:p-0`,`[&_li]:m-0`),children:[E(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,className:c(`flex w-full items-center justify-between gap-3 px-4 py-3`,`text-left text-sm font-medium text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/40`),children:[T(`span`,{children:t(`tableOfContents`)}),T(im,{className:c(`h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform duration-200`,n&&`rotate-180`),"aria-hidden":`true`})]}),T(`div`,{className:c(`grid transition-[grid-template-rows] duration-200 ease-out`,n?`grid-rows-[1fr]`:`grid-rows-[0fr]`),"aria-hidden":!n,children:T(`div`,{className:`min-h-0 overflow-hidden`,children:T(`div`,{className:`border-t border-wx-border/70 px-2 py-2`,children:T(`div`,{className:`flex flex-col`,children:e.map(e=>{let t=e.level===2?16:e.level===3?32:0;return T(`button`,{type:`button`,onClick:t=>i(t,e.id),className:c(`flex h-8 items-center truncate rounded-md pr-2 text-left text-sm text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/50`),style:{paddingLeft:12+t},children:T(`span`,{className:`truncate`,children:e.text})},e.id)})})})})})]})}function aE({summary:e,body:t,defaultOpen:n}){let[r,i]=S(n);return E(`div`,{className:`my-2 overflow-hidden rounded-lg border border-wx-border`,children:[E(`button`,{type:`button`,onClick:()=>i(e=>!e),"aria-expanded":r,className:c(`flex w-full items-center justify-between gap-3 px-4 py-3`,`text-left text-sm font-semibold text-wx-fg`,`transition-colors hover:bg-wx-bg-elevated/50`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary/30`),children:[T(`span`,{className:`min-w-0 flex-1`,children:e}),T(im,{className:c(`h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform`,r&&`rotate-180`),"aria-hidden":`true`})]}),r&&T(`div`,{className:`border-t border-wx-border px-4 py-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0`,children:t})]})}var oE=(e,t)=>{let n=e.name===`details`,r=e.name===`div`&&e.attribs?.[`data-type`]===`details`;if(!n&&!r)return;let i=r?(e.children??[]).flatMap(e=>e instanceof nE.Element&&e.name===`div`&&!e.attribs?.[`data-type`]?e.children??[]:[e]):e.children??[],a=i.find(e=>e instanceof nE.Element&&e.name===`summary`),o=i.filter(e=>e!==a&&!(e instanceof nE.Element&&e.name===`button`)),s=o.find(e=>e instanceof nE.Element&&e.name===`div`&&(e.attribs?.[`data-type`]===`detailsContent`||e.attribs?.[`data-type`]===`details-content`)),c=s?s.children??[]:o,l=a?(0,nE.domToReact)(a.children,t.options):null,u=T(w,{children:(0,nE.domToReact)(c,t.options)});return T(aE,{defaultOpen:e.attribs?.open!==void 0||e.attribs?.[`data-open`]===`true`,summary:l,body:u})},sE={card:`border-wx-border bg-wx-bg-elevated/60`,callout:`border-wx-primary/30 bg-wx-primary/5`,note:`border-wx-border bg-wx-bg-elevated/60`,tip:`border-wx-success/30 bg-wx-success/5`,warning:`border-wx-warning/30 bg-wx-warning/5`,danger:`border-wx-danger/30 bg-wx-danger/5`},cE=(e,t)=>{let n=sE[e.name];if(n)return T(`div`,{className:`my-4 rounded-wx-md border px-4 py-3 ${n}`,"data-custom-block":e.name,children:(0,nE.domToReact)(e.children??[],t.options)})};function lE(e,t){let n=e.normalize(`NFD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`,r=n,i=2;for(;t.has(r);)r=`${n}-${i}`,i+=1;return t.add(r),r}function uE(e){let t=``;for(let n of e.children??[])n.type===`text`?t+=n.data??``:n instanceof nE.Element&&(t+=uE(n));return t}var dE=(e,t)=>{if(e.name!==`h1`&&e.name!==`h2`&&e.name!==`h3`)return;let n=Number(e.name.slice(1)),r=uE(e).trim();if(!r)return;let i=lE(r,t.seenIds);return t.entries.push({id:i,text:r,level:n}),h(e.name,{id:i},(0,nE.domToReact)(e.children??[],t.options))},fE=(e,t)=>{if(e.name!==`img`)return;let n=e.attribs??{},r=n[`data-align`]??`center`,i=n.width||n.style?.match(/width:\s*([^;]+)/i)?.[1],a=r===`left`?`0`:`auto`,o=r===`right`?`0`:`auto`,s=n.src??``,c=n.alt??``,l={...i?{width:i}:{},marginLeft:a,marginRight:o,display:`block`};if(t.images&&t.onImageClick){let e=t.images.length;t.images.push({url:s,mimetype:`image/jpeg`,alt:c});let n=t.onImageClick;return T(`button`,{type:`button`,onClick:()=>n(e),className:`my-3 block w-full cursor-zoom-in border-0 bg-transparent p-0`,"aria-label":c||t.openImageLabel,children:T(`img`,{src:s,alt:c,style:l,className:`max-w-full`})})}return T(`img`,{src:s,alt:c,style:l,className:`my-3 max-w-full`})},pE=(e,t)=>{if(e.name!==`a`)return;let n=e.attribs?.href??``;return T(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>t.onLinkClick?.(n),className:`text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-70`,children:(0,nE.domToReact)(e.children??[],t.options)})},mE=(e,t)=>{if(e.name===`table`)return T(`div`,{className:c(`my-3 overflow-x-auto`,`[scrollbar-width:thin] [scrollbar-color:var(--color-wx-fg-subtle)_transparent]`,`[&::-webkit-scrollbar]:h-2`,`[&::-webkit-scrollbar-track]:bg-transparent`,`[&::-webkit-scrollbar-thumb]:rounded-full`,`[&::-webkit-scrollbar-thumb]:bg-wx-fg-subtle/40`,`[&::-webkit-scrollbar-thumb:hover]:bg-wx-fg-subtle/60`),children:T(`table`,{children:(0,nE.domToReact)(e.children??[],t.options)})})};function hE({tabs:e}){let t=a(`article`),[n,r]=S(0);return e.length===0?null:E(`div`,{className:`my-4`,children:[T(`div`,{role:`tablist`,className:`relative flex items-center gap-1 border-b border-wx-border`,children:e.map((e,i)=>{let a=i===n,o=e.label||t(`tabFallback`,{n:i+1});return E(`button`,{type:`button`,role:`tab`,"aria-selected":a,tabIndex:a?0:-1,onClick:()=>r(i),className:c(`group relative inline-flex items-center justify-center px-3 py-2 text-sm`,`transition-colors focus-visible:outline-none`,a?`font-semibold text-wx-fg`:`font-medium text-wx-fg-muted hover:text-wx-fg`),children:[o,T(`span`,{"aria-hidden":`true`,className:c(`pointer-events-none absolute inset-x-2 bottom-0 h-[2px] origin-left rounded-full bg-wx-primary`,`transition-transform duration-200 ease-out`,a?`scale-x-100`:`scale-x-0`)})]},i)})}),T(`div`,{className:`mt-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0`,children:e[n]?.body})]})}var gE=[dE,(e,t)=>{if(e.name===`div`&&(e.attribs?.[`data-type`]===`tabs`||e.attribs?.[`data-type`]===`tabs`))return T(hE,{tabs:(e.children??[]).filter(e=>e instanceof nE.Element&&e.name===`div`&&e.attribs?.[`data-type`]===`tab`).map(e=>{let n=e.children?.find(e=>e instanceof nE.Element&&e.name===`div`&&`data-tab-label`in(e.attribs??{})),r=(e.children??[]).filter(e=>e!==n);return{label:n?uE(n).trim():``,body:T(w,{children:(0,nE.domToReact)(r,t.options)})}})})},oE,cE,mE,fE,pE];function _E(e,t,n,r,i,a){let o={},s={options:o,entries:e,seenIds:t,images:n,onImageClick:r,onLinkClick:i,openImageLabel:a};return o.replace=e=>{if(e instanceof nE.Element){for(let t of Object.keys(e.attribs))t.startsWith(`data-wx-`)&&delete e.attribs[t];for(let t of gE){let n=t(e,s);if(n!==void 0)return n}}},o}function vE({html:e,className:t,onLinkClick:n}){let[r,i]=S(null),o=a(`messages`)(`openImage`),{trackLinkClick:s}=Ah(),c=g(e=>s({url:e,targetType:`EXTERNAL`}),[s]),l=n??c,{parsed:u,entries:d,images:f}=b(()=>{let t=[],n=new Set,r=[];return{parsed:rE(e,_E(t,n,r,i,l,o)),entries:t,images:r}},[e,l,o]);return E(`div`,{className:t,children:[d.length>=3&&T(iE,{entries:d}),u,f.length>0&&T(Uh,{items:f,initialIndex:r??0,open:r!==null,onClose:()=>i(null)})]})}function yE(e){return rE(e,_E([],new Set))}var bE=[{value:`en`,label:`English`},{value:`en-US`,label:`English (US)`},{value:`en-GB`,label:`English (UK)`},{value:`uk`,label:`Українська`},{value:`de`,label:`Deutsch`},{value:`es`,label:`Español`},{value:`es-MX`,label:`Español (México)`},{value:`fr`,label:`Français`},{value:`it`,label:`Italiano`},{value:`pt`,label:`Português`},{value:`pt-BR`,label:`Português (Brasil)`},{value:`nl`,label:`Nederlands`},{value:`pl`,label:`Polski`},{value:`tr`,label:`Türkçe`},{value:`cs`,label:`Čeština`},{value:`sk`,label:`Slovenčina`},{value:`ro`,label:`Română`},{value:`hu`,label:`Magyar`},{value:`el`,label:`Ελληνικά`},{value:`sv`,label:`Svenska`},{value:`da`,label:`Dansk`},{value:`no`,label:`Norsk`},{value:`fi`,label:`Suomi`},{value:`ar`,label:`العربية`},{value:`he`,label:`עברית`},{value:`hi`,label:`हिन्दी`},{value:`th`,label:`ไทย`},{value:`vi`,label:`Tiếng Việt`},{value:`id`,label:`Bahasa Indonesia`},{value:`ja`,label:`日本語`},{value:`ko`,label:`한국어`},{value:`zh`,label:`中文(简体)`},{value:`zh-TW`,label:`中文(繁體)`}];function xE(e){let t=bE.find(t=>t.value===e);if(t)return t.label;let n=e.split(`-`)[0].toLowerCase(),r=bE.find(e=>e.value===n);return r?r.label:n.toUpperCase()}export{cf as $,Pl as $t,op as A,id as At,Uf as B,Ou as Bt,Wp as C,_d as Ct,vp as D,ud as Dt,pp as E,dd as Et,Bf as F,Qu as Ft,Rf as G,Eu as Gt,kf as H,Ru as Ht,Kf as I,Vu as It,Df as J,Ql as Jt,Af as K,Tu as Kt,Vf as L,Gu as Lt,ip as M,$u as Mt,Hf as N,td as Nt,_p as O,cd as Ot,Wf as P,Zu as Pt,Cf as Q,jl as Qt,Jf as R,Ju as Rt,Kp as S,Ed as St,mp as T,pd as Tt,Lf as U,Lu as Ut,Gf as V,ku as Vt,Mf as W,Du as Wt,wf as X,$l as Xt,Of as Y,eu as Yt,Sf as Z,nu as Zt,sm as _,qd as _t,bS as a,we as an,Bd as at,rm as b,zd as bt,Ah as c,ne as cn,Pd as ct,Ch as d,Ad as dt,Ol as en,yf as et,Nm as f,bd as ft,dm as g,Yd as gt,fm as h,Zd as ht,wT as i,za as in,Ld as it,sp as j,ed as jt,dp as k,od as kt,Eh as l,A as ln,Gd as lt,pm as m,Id as mt,vE as n,G as nn,nf as nt,Uh as o,j as on,Rd as ot,cm as p,Sd as pt,Nf as q,ou as qt,yE as r,Ba as rn,ef as rt,Mh as s,O as sn,Od as st,xE as t,ll as tn,rf as tt,Th as u,wd as ut,om as v,Md as vt,Sp as w,hd as wt,qp as x,Vd as xt,im as y,Ud as yt,Yf as z,qu as zt};
|
|
292
|
+
//# sourceMappingURL=widget-react-C8SNEdwd.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{b as e,i as t,n}from"./widget-react-DIvxQOfe.js";import{Pt as r,Q as i,_ as a,a as o,b as s,i as c,n as l,nn as u,nt as d,rt as f,t as p,y as m}from"./widget-react-CtHBMV7Z.js";import{n as h}from"./widget-react-ChDwJoyJ.js";import{useCallback as g,useEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";function C(e){if(!e)return!1;let t=e.trimStart().slice(0,200);return/^<(?:[a-z!][^>]*|!--)/i.test(t)}var w=function(e){return e.HTML=`HTML`,e.MARKDOWN=`MARKDOWN`,e}({}),T=function(e){return e.HELP=`HELP`,e.NEWS=`NEWS`,e}({});function E(e,t){_(()=>{if(t)return e&&t(e),()=>t(null)},[e,t])}var D=`prose max-w-none text-sm leading-relaxed text-wx-fg [overflow-wrap:anywhere],[&_pre]:[overflow-wrap:normal],[&_p]:my-3 [&_strong]:font-semibold [&_em]:italic,[&_a]:text-wx-primary [&_a]:underline [&_a]:underline-offset-2,[&_a]:transition-opacity [&_a:hover]:opacity-70,[&_code]:rounded-[6px] [&_code]:bg-wx-bg-elevated [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em],[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-wx-border,[&_pre]:bg-[#0f1115] [&_pre]:text-zinc-100 [&_pre]:p-4 [&_pre]:text-[12.5px] [&_pre]:leading-relaxed,[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-zinc-100,[&_.hljs-keyword]:text-violet-300 [&_.hljs-built_in]:text-violet-300 [&_.hljs-type]:text-violet-300,[&_.hljs-string]:text-emerald-300,[&_.hljs-number]:text-amber-300 [&_.hljs-literal]:text-amber-300,[&_.hljs-comment]:text-zinc-500 [&_.hljs-comment]:italic,[&_.hljs-attr]:text-sky-300 [&_.hljs-attribute]:text-sky-300,[&_.hljs-title]:text-zinc-100 [&_.hljs-title]:font-medium,[&_.hljs-tag]:text-rose-300 [&_.hljs-name]:text-rose-300,[&_h1]:mt-6 [&_h1]:mb-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:tracking-tight,[&_h2]:mt-5 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:tracking-tight,[&_h3]:mt-4 [&_h3]:mb-1.5 [&_h3]:text-sm [&_h3]:font-semibold,[&_h1]:scroll-mt-16 [&_h2]:scroll-mt-16 [&_h3]:scroll-mt-16,[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:marker:text-wx-fg-subtle,[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:marker:text-wx-fg-subtle,[&_li]:my-1,[&_ul[data-type=taskList]]:list-none! [&_ul[data-type=taskList]]:pl-0!,[&_ul[data-type=taskList]_li]:my-1.5 [&_ul[data-type=taskList]_li]:flex! [&_ul[data-type=taskList]_li]:items-start [&_ul[data-type=taskList]_li]:gap-2 [&_ul[data-type=taskList]_li]:pl-0,[&_ul[data-type=taskList]_li]:marker:content-none,[&_ul[data-type=taskList]_li>label]:m-0 [&_ul[data-type=taskList]_li>label]:inline-flex [&_ul[data-type=taskList]_li>label]:h-5 [&_ul[data-type=taskList]_li>label]:items-center [&_ul[data-type=taskList]_li>label]:shrink-0 [&_ul[data-type=taskList]_li>label]:select-none,[&_ul[data-type=taskList]_li>label]:pointer-events-none [&_ul[data-type=taskList]_li>label]:cursor-default,[&_ul[data-type=taskList]_input]:accent-wx-primary [&_ul[data-type=taskList]_input]:h-3.5 [&_ul[data-type=taskList]_input]:w-3.5,[&_ul[data-type=taskList]_li>label>span]:hidden,[&_ul[data-type=taskList]_li>div]:min-w-0 [&_ul[data-type=taskList]_li>div]:flex-1,[&_ul[data-type=taskList]_li>div>p]:my-0! [&_ul[data-type=taskList]_li>div>p]:leading-snug,[&_ul[data-type=taskList]_li[data-checked=true]>div]:text-wx-fg-muted [&_ul[data-type=taskList]_li[data-checked=true]>div]:line-through,[&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-wx-primary/40,[&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-wx-fg-muted,[&_hr]:my-6 [&_hr]:border-wx-border,[&_img]:my-3 [&_img]:mx-auto [&_img]:block [&_img]:max-w-full,[&_figure]:my-5 [&_figure]:flex [&_figure]:flex-col [&_figure]:items-center [&_figure]:text-center,[&_figure_img]:my-0,[&_figcaption]:mt-2 [&_figcaption]:text-xs [&_figcaption]:italic [&_figcaption]:text-wx-fg-muted,[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse [&_table]:text-xs,[&_table]:overflow-hidden [&_table]:rounded-lg [&_table]:border [&_table]:border-wx-border,[&_thead]:bg-wx-bg-elevated,[&_th]:px-2.5 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-medium [&_th]:text-wx-fg,[&_th]:border-b [&_th]:border-wx-border,[&_th+th]:border-l [&_th+th]:border-wx-border,[&_td]:px-2.5 [&_td]:py-1.5 [&_td]:text-wx-fg [&_td]:align-top,[&_td+td]:border-l [&_td+td]:border-wx-border,[&_tbody_tr]:border-t [&_tbody_tr]:border-wx-border,[&_tbody_tr:nth-child(odd)]:bg-wx-bg-elevated/40,[&_th_p]:my-0 [&_td_p]:my-0 [&_th_p]:inline [&_td_p]:inline,[&_details]:my-2 [&_details]:overflow-hidden [&_details]:rounded-lg [&_details]:border [&_details]:border-wx-border [&_details]:bg-wx-bg-elevated/40,[&_details+details]:mt-2,[&_summary]:relative [&_summary]:cursor-pointer [&_summary]:list-none [&_summary]:px-4 [&_summary]:py-3,[&_summary]:pr-10 [&_summary]:text-sm [&_summary]:font-medium [&_summary]:text-wx-fg,[&_summary::-webkit-details-marker]:hidden [&_summary::marker]:hidden,[&_summary]:after:absolute [&_summary]:after:right-4 [&_summary]:after:top-1/2,[&_summary]:after:-translate-y-1/2 [&_summary]:after:text-wx-fg-subtle,[&_summary]:after:text-base [&_summary]:after:leading-none,[&_summary]:after:transition-transform [&_summary]:after:content-['\\203A'],[&_details[open]_summary]:after:rotate-90,[&_details[open]_summary]:border-b [&_details[open]_summary]:border-wx-border,[&_details]:[&>:not(summary)]:px-4 [&_details]:[&>:not(summary)]:py-3,[&_details]:[&>:not(summary):first-of-type]:pt-3`.split(`,`).join(` `);function O({content:e,isHtml:t,markdownMarginClass:n}){return t?x(l,{html:e,className:`mt-0 ${D}`}):x(`div`,{className:`${n} ${D}`,children:x(o,{remarkPlugins:[c],children:e})})}function k({currentLocale:r,locales:i,allowedLocales:o,onSelect:c,className:l}){let u=e(`languageSelector`),[d,f]=b(!1),g=y(null);_(()=>{if(!d)return;let e=e=>{g.current&&!e.composedPath().includes(g.current)&&f(!1)},t=e=>{e.key===`Escape`&&f(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[d]);let v=o&&o.length>0?new Set(o.map(e=>e.split(`-`)[0].toLowerCase())):null,C=Array.from(new Set(i.filter(Boolean))).filter(e=>!v||v.has(e.split(`-`)[0].toLowerCase()));if(C.length<=1)return null;let w=r.split(`-`)[0].toLowerCase(),T=C.includes(r);return S(`div`,{ref:g,className:n(`relative`,l),children:[x(`p`,{className:`mb-1.5 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:u(`title`)}),S(`button`,{type:`button`,onClick:()=>f(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":d,"aria-label":u(`ariaLabel`),className:n(`flex w-full items-center gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2`,`text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:[x(a,{size:15,className:`shrink-0 text-wx-fg-muted`}),x(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:p(r)}),x(m,{size:15,className:n(`shrink-0 text-wx-fg-subtle transition-transform`,d&&`rotate-180`)})]}),x(h,{children:d&&x(t.ul,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.14},className:n(`absolute bottom-full left-0 z-20 mb-1 max-h-56 w-full overflow-auto`,`rounded-wx-sm border border-wx-border bg-wx-bg py-1 shadow-[0_12px_32px_rgba(0,0,0,0.16)]`),role:`listbox`,children:C.map(e=>{let t=T?e===r:e.split(`-`)[0].toLowerCase()===w;return x(`li`,{children:S(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>{c(e),f(!1)},className:n(`flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors`,t?`font-semibold text-wx-primary`:`text-wx-fg hover:bg-wx-bg-elevated`),children:[x(`span`,{className:`min-w-0 flex-1 truncate`,children:p(e)}),t&&x(s,{size:15,className:`shrink-0 text-wx-primary`})]})},e)})})})]})}var A=(e,t)=>`wexio:reaction:${e}:${t}`,j=[{slotIndex:0,emoji:`🎉`},{slotIndex:1,emoji:`❤️`},{slotIndex:2,emoji:`👍`}],M={[T.NEWS]:`NewsPost`,[T.HELP]:`HelpArticle`};function N({surface:a,itemId:o,reactionCounts:s,viewerReaction:c,groupItemIds:l,readonly:p=!1,showCounts:m=!0,isDummy:h=!1,className:y}){let C=e(`reactions`),w=u(),{data:T,loading:E}=f({variables:{surface:a},fetchPolicy:`cache-first`,skip:h}),[D,{loading:O}]=d(),k=i(),N=r().storage,P=v(()=>h?j:T?.visitorReactionSet?.slots??[],[h,T]),F=h?!0:T?.visitorReactionSet?.enabled??!0,I=A(a,o),[L,R]=b(null);_(()=>{if(!h){R(c??null);return}if(typeof window>`u`)return;let e=N.getItem(I);R(e===null?null:Number(e))},[h,I,N,c]);let[z,B]=b({}),V=e=>(s?.[String(e)]??0)+(h?z[e]??0:0),H=g((e,t)=>{let n=M[a],r=l?.length?l:[o];for(let i of r){let r=w.cache.identify({__typename:n,_id:i});r&&w.cache.modify({id:r,fields:{viewerReaction:()=>t,reactionCounts:n=>{let r={...n??{}};return t!==null&&(r[t]=(r[t]??0)+1),e!==null&&(r[e]=Math.max(0,(r[e]??0)-1)),r}}})}},[w,a,l,o]),U=async e=>{if(p||O||L===e)return;let t=L;if(R(e),h){typeof window<`u`&&N.setItem(I,String(e)),B(n=>({...n,[e]:(n[e]??0)+1,...t===null?{}:{[t]:(n[t]??0)-1}}));return}if(H(t,e),k){k.enqueue({op:`reaction`,semantics:`convergence`,convergenceKey:`reaction:${a}:${o}`,payload:{surface:a,itemId:o,slotIndex:e}});return}try{await D({variables:{input:{surface:a,itemId:o,slotIndex:e}}})}catch{H(e,t),R(t)}};return E||!F||P.length===0?null:x(`div`,{className:n(`flex flex-wrap items-center justify-center gap-2`,y),role:`group`,"aria-label":C(`ariaLabel`),children:P.map(e=>{let r=L===e.slotIndex,i=V(e.slotIndex);return S(t.button,{type:`button`,disabled:p||O,onClick:()=>void U(e.slotIndex),whileTap:{scale:.9},whileHover:{scale:1.06},transition:{type:`spring`,stiffness:400,damping:18},className:n(`flex items-center gap-1.5 rounded-full px-3 py-1.5 text-2xl leading-none transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,r?`bg-wx-primary/10 ring-1 ring-wx-primary/40`:`hover:bg-wx-bg-elevated`,p&&`cursor-default opacity-70`),"aria-pressed":r,"aria-label":C(`tapAria`,{emoji:e.emoji}),children:[x(`span`,{"aria-hidden":`true`,children:e.emoji}),m&&i>0&&x(`span`,{className:`text-xs font-medium text-wx-fg-muted`,children:i})]},e.slotIndex)})})}export{w as a,E as i,k as n,T as o,O as r,C as s,N as t};
|
|
2
|
-
//# sourceMappingURL=widget-react-
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{b as e,i as t,n}from"./widget-react-DIvxQOfe.js";import{Ft as r,Q as i,_ as a,a as o,b as s,i as c,n as l,nt as u,rn as d,rt as f,t as p,y as m}from"./widget-react-C8SNEdwd.js";import{n as h}from"./widget-react-ChDwJoyJ.js";import{useCallback as g,useEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";function C(e){if(!e)return!1;let t=e.trimStart().slice(0,200);return/^<(?:[a-z!][^>]*|!--)/i.test(t)}var w=function(e){return e.HTML=`HTML`,e.MARKDOWN=`MARKDOWN`,e}({}),T=function(e){return e.HELP=`HELP`,e.NEWS=`NEWS`,e}({});function E(e,t){_(()=>{if(t)return e&&t(e),()=>t(null)},[e,t])}var D=`prose max-w-none text-sm leading-relaxed text-wx-fg [overflow-wrap:anywhere],[&_pre]:[overflow-wrap:normal],[&_p]:my-3 [&_strong]:font-semibold [&_em]:italic,[&_a]:text-wx-primary [&_a]:underline [&_a]:underline-offset-2,[&_a]:transition-opacity [&_a:hover]:opacity-70,[&_code]:rounded-[6px] [&_code]:bg-wx-bg-elevated [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em],[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-wx-border,[&_pre]:bg-[#0f1115] [&_pre]:text-zinc-100 [&_pre]:p-4 [&_pre]:text-[12.5px] [&_pre]:leading-relaxed,[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-zinc-100,[&_.hljs-keyword]:text-violet-300 [&_.hljs-built_in]:text-violet-300 [&_.hljs-type]:text-violet-300,[&_.hljs-string]:text-emerald-300,[&_.hljs-number]:text-amber-300 [&_.hljs-literal]:text-amber-300,[&_.hljs-comment]:text-zinc-500 [&_.hljs-comment]:italic,[&_.hljs-attr]:text-sky-300 [&_.hljs-attribute]:text-sky-300,[&_.hljs-title]:text-zinc-100 [&_.hljs-title]:font-medium,[&_.hljs-tag]:text-rose-300 [&_.hljs-name]:text-rose-300,[&_h1]:mt-6 [&_h1]:mb-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:tracking-tight,[&_h2]:mt-5 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:tracking-tight,[&_h3]:mt-4 [&_h3]:mb-1.5 [&_h3]:text-sm [&_h3]:font-semibold,[&_h1]:scroll-mt-16 [&_h2]:scroll-mt-16 [&_h3]:scroll-mt-16,[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:marker:text-wx-fg-subtle,[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:marker:text-wx-fg-subtle,[&_li]:my-1,[&_ul[data-type=taskList]]:list-none! [&_ul[data-type=taskList]]:pl-0!,[&_ul[data-type=taskList]_li]:my-1.5 [&_ul[data-type=taskList]_li]:flex! [&_ul[data-type=taskList]_li]:items-start [&_ul[data-type=taskList]_li]:gap-2 [&_ul[data-type=taskList]_li]:pl-0,[&_ul[data-type=taskList]_li]:marker:content-none,[&_ul[data-type=taskList]_li>label]:m-0 [&_ul[data-type=taskList]_li>label]:inline-flex [&_ul[data-type=taskList]_li>label]:h-5 [&_ul[data-type=taskList]_li>label]:items-center [&_ul[data-type=taskList]_li>label]:shrink-0 [&_ul[data-type=taskList]_li>label]:select-none,[&_ul[data-type=taskList]_li>label]:pointer-events-none [&_ul[data-type=taskList]_li>label]:cursor-default,[&_ul[data-type=taskList]_input]:accent-wx-primary [&_ul[data-type=taskList]_input]:h-3.5 [&_ul[data-type=taskList]_input]:w-3.5,[&_ul[data-type=taskList]_li>label>span]:hidden,[&_ul[data-type=taskList]_li>div]:min-w-0 [&_ul[data-type=taskList]_li>div]:flex-1,[&_ul[data-type=taskList]_li>div>p]:my-0! [&_ul[data-type=taskList]_li>div>p]:leading-snug,[&_ul[data-type=taskList]_li[data-checked=true]>div]:text-wx-fg-muted [&_ul[data-type=taskList]_li[data-checked=true]>div]:line-through,[&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-wx-primary/40,[&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-wx-fg-muted,[&_hr]:my-6 [&_hr]:border-wx-border,[&_img]:my-3 [&_img]:mx-auto [&_img]:block [&_img]:max-w-full,[&_figure]:my-5 [&_figure]:flex [&_figure]:flex-col [&_figure]:items-center [&_figure]:text-center,[&_figure_img]:my-0,[&_figcaption]:mt-2 [&_figcaption]:text-xs [&_figcaption]:italic [&_figcaption]:text-wx-fg-muted,[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse [&_table]:text-xs,[&_table]:overflow-hidden [&_table]:rounded-lg [&_table]:border [&_table]:border-wx-border,[&_thead]:bg-wx-bg-elevated,[&_th]:px-2.5 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-medium [&_th]:text-wx-fg,[&_th]:border-b [&_th]:border-wx-border,[&_th+th]:border-l [&_th+th]:border-wx-border,[&_td]:px-2.5 [&_td]:py-1.5 [&_td]:text-wx-fg [&_td]:align-top,[&_td+td]:border-l [&_td+td]:border-wx-border,[&_tbody_tr]:border-t [&_tbody_tr]:border-wx-border,[&_tbody_tr:nth-child(odd)]:bg-wx-bg-elevated/40,[&_th_p]:my-0 [&_td_p]:my-0 [&_th_p]:inline [&_td_p]:inline,[&_details]:my-2 [&_details]:overflow-hidden [&_details]:rounded-lg [&_details]:border [&_details]:border-wx-border [&_details]:bg-wx-bg-elevated/40,[&_details+details]:mt-2,[&_summary]:relative [&_summary]:cursor-pointer [&_summary]:list-none [&_summary]:px-4 [&_summary]:py-3,[&_summary]:pr-10 [&_summary]:text-sm [&_summary]:font-medium [&_summary]:text-wx-fg,[&_summary::-webkit-details-marker]:hidden [&_summary::marker]:hidden,[&_summary]:after:absolute [&_summary]:after:right-4 [&_summary]:after:top-1/2,[&_summary]:after:-translate-y-1/2 [&_summary]:after:text-wx-fg-subtle,[&_summary]:after:text-base [&_summary]:after:leading-none,[&_summary]:after:transition-transform [&_summary]:after:content-['\\203A'],[&_details[open]_summary]:after:rotate-90,[&_details[open]_summary]:border-b [&_details[open]_summary]:border-wx-border,[&_details]:[&>:not(summary)]:px-4 [&_details]:[&>:not(summary)]:py-3,[&_details]:[&>:not(summary):first-of-type]:pt-3`.split(`,`).join(` `);function O({content:e,isHtml:t,markdownMarginClass:n}){return t?x(l,{html:e,className:`mt-0 ${D}`}):x(`div`,{className:`${n} ${D}`,children:x(o,{remarkPlugins:[c],children:e})})}function k({currentLocale:r,locales:i,allowedLocales:o,onSelect:c,className:l}){let u=e(`languageSelector`),[d,f]=b(!1),g=y(null);_(()=>{if(!d)return;let e=e=>{g.current&&!e.composedPath().includes(g.current)&&f(!1)},t=e=>{e.key===`Escape`&&f(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[d]);let v=o&&o.length>0?new Set(o.map(e=>e.split(`-`)[0].toLowerCase())):null,C=Array.from(new Set(i.filter(Boolean))).filter(e=>!v||v.has(e.split(`-`)[0].toLowerCase()));if(C.length<=1)return null;let w=r.split(`-`)[0].toLowerCase(),T=C.includes(r);return S(`div`,{ref:g,className:n(`relative`,l),children:[x(`p`,{className:`mb-1.5 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:u(`title`)}),S(`button`,{type:`button`,onClick:()=>f(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":d,"aria-label":u(`ariaLabel`),className:n(`flex w-full items-center gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2`,`text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:[x(a,{size:15,className:`shrink-0 text-wx-fg-muted`}),x(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:p(r)}),x(m,{size:15,className:n(`shrink-0 text-wx-fg-subtle transition-transform`,d&&`rotate-180`)})]}),x(h,{children:d&&x(t.ul,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.14},className:n(`absolute bottom-full left-0 z-20 mb-1 max-h-56 w-full overflow-auto`,`rounded-wx-sm border border-wx-border bg-wx-bg py-1 shadow-[0_12px_32px_rgba(0,0,0,0.16)]`),role:`listbox`,children:C.map(e=>{let t=T?e===r:e.split(`-`)[0].toLowerCase()===w;return x(`li`,{children:S(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>{c(e),f(!1)},className:n(`flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors`,t?`font-semibold text-wx-primary`:`text-wx-fg hover:bg-wx-bg-elevated`),children:[x(`span`,{className:`min-w-0 flex-1 truncate`,children:p(e)}),t&&x(s,{size:15,className:`shrink-0 text-wx-primary`})]})},e)})})})]})}var A=(e,t)=>`wexio:reaction:${e}:${t}`,j=[{slotIndex:0,emoji:`🎉`},{slotIndex:1,emoji:`❤️`},{slotIndex:2,emoji:`👍`}],M={[T.NEWS]:`NewsPost`,[T.HELP]:`HelpArticle`};function N({surface:a,itemId:o,reactionCounts:s,viewerReaction:c,groupItemIds:l,readonly:p=!1,showCounts:m=!0,isDummy:h=!1,className:y}){let C=e(`reactions`),w=d(),{data:T,loading:E}=f({variables:{surface:a},fetchPolicy:`cache-first`,skip:h}),[D,{loading:O}]=u(),k=i(),N=r().storage,P=v(()=>h?j:T?.visitorReactionSet?.slots??[],[h,T]),F=h?!0:T?.visitorReactionSet?.enabled??!0,I=A(a,o),[L,R]=b(null);_(()=>{if(!h){R(c??null);return}if(typeof window>`u`)return;let e=N.getItem(I);R(e===null?null:Number(e))},[h,I,N,c]);let[z,B]=b({}),V=e=>(s?.[String(e)]??0)+(h?z[e]??0:0),H=g((e,t)=>{let n=M[a],r=l?.length?l:[o];for(let i of r){let r=w.cache.identify({__typename:n,_id:i});r&&w.cache.modify({id:r,fields:{viewerReaction:()=>t,reactionCounts:n=>{let r={...n??{}};return t!==null&&(r[t]=(r[t]??0)+1),e!==null&&(r[e]=Math.max(0,(r[e]??0)-1)),r}}})}},[w,a,l,o]),U=async e=>{if(p||O||L===e)return;let t=L;if(R(e),h){typeof window<`u`&&N.setItem(I,String(e)),B(n=>({...n,[e]:(n[e]??0)+1,...t===null?{}:{[t]:(n[t]??0)-1}}));return}if(H(t,e),k){k.enqueue({op:`reaction`,semantics:`convergence`,convergenceKey:`reaction:${a}:${o}`,payload:{surface:a,itemId:o,slotIndex:e}});return}try{await D({variables:{input:{surface:a,itemId:o,slotIndex:e}}})}catch{H(e,t),R(t)}};return E||!F||P.length===0?null:x(`div`,{className:n(`flex flex-wrap items-center justify-center gap-2`,y),role:`group`,"aria-label":C(`ariaLabel`),children:P.map(e=>{let r=L===e.slotIndex,i=V(e.slotIndex);return S(t.button,{type:`button`,disabled:p||O,onClick:()=>void U(e.slotIndex),whileTap:{scale:.9},whileHover:{scale:1.06},transition:{type:`spring`,stiffness:400,damping:18},className:n(`flex items-center gap-1.5 rounded-full px-3 py-1.5 text-2xl leading-none transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,r?`bg-wx-primary/10 ring-1 ring-wx-primary/40`:`hover:bg-wx-bg-elevated`,p&&`cursor-default opacity-70`),"aria-pressed":r,"aria-label":C(`tapAria`,{emoji:e.emoji}),children:[x(`span`,{"aria-hidden":`true`,children:e.emoji}),m&&i>0&&x(`span`,{className:`text-xs font-medium text-wx-fg-muted`,children:i})]},e.slotIndex)})})}export{w as a,E as i,k as n,T as o,O as r,C as s,N as t};
|
|
2
|
+
//# sourceMappingURL=widget-react-Cjd5m37N.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{b as e,n as t}from"./widget-react-DIvxQOfe.js";import{$ as n,D as r,Ft as i,O as ee,Ot as a,T as o,Y as te,c as ne,d as s,l as c,m as l,p as u,u as d,x as re}from"./widget-react-C8SNEdwd.js";import{i as ie}from"./widget-react-_QsYqFeh.js";import{o as ae,p as oe,s as se,t as ce}from"./widget-react-DyHOzlxL.js";import{t as le}from"./widget-react-BxEMz2N0.js";import{a as f,i as p,n as ue,o as m,r as h,s as g,t as de}from"./widget-react-Cjd5m37N.js";import{useEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";var C=5;function fe(e,t,n=C){let r=e.find(e=>e.slug===t),i=new Set((r?.tags??[]).map(e=>e.slug));return e.filter(e=>e.slug!==t).map(e=>({a:e,score:(r&&e.categoryId===r.categoryId?2:0)+e.tags.filter(e=>i.has(e.slug)).length})).sort((e,t)=>t.score-e.score||t.a.publishedAt.localeCompare(e.a.publishedAt)).slice(0,n).map(({a:e})=>({_id:e.id,title:e.title,slug:e.slug,excerpt:e.excerpt||null}))}function pe(e){let t=e=>Array.isArray(e)?e:[];return{id:String(e._id??``),title:typeof e.title==`string`?e.title:``,excerpt:typeof e.excerpt==`string`?e.excerpt:``,content:typeof e.content==`string`?e.content:``,contentFormat:e.contentFormat===f.HTML?f.HTML:f.MARKDOWN,authors:t(e.authors).filter(e=>!!e&&typeof e==`object`).map(e=>({_id:String(e._id??``),name:typeof e.name==`string`?e.name:null,photo:e.photo})),tags:t(e.tags).filter(e=>!!e&&typeof e==`object`).map(e=>({_id:String(e._id??``),slug:typeof e.slug==`string`?e.slug:``,label:typeof e.label==`string`?e.label:``}))}}function w({slug:t,locale:C,isDummy:w,onHandoff:E,onOpenArticle:D,onOpenTranslation:O,onTitleResolved:k}){let A=e(`help`),j=r(),M=d(),N=te(),{config:P}=re(),F=P.messenger?.showRelatedHelpArticles??!0,I=P.messenger?.showReactionCounts??!0,L=le(),[R,z]=b(C),B=ee(R,j),V=v(()=>{if(w)return null;let e=N.previewData?.helpArticles;return Array.isArray(e)?e.find(e=>e&&typeof e==`object`&&e.slug===t)??null:null},[N.previewData,w,t]),H=!!V,{data:U,loading:me}=se({variables:{args:{slug:t,locale:C}},skip:w||H}),W=i(),G=W.publicKey,K=c(G&&!w&&!H?n.article(G,t,C):null,U),[q]=ae(),{trackLinkClick:J}=ne(),Y=y(null),X=v(()=>w?a(B).find(e=>e.slug===t):null,[w,t,B]),Z=w?X?{id:X.id,title:X.title,excerpt:X.excerpt,content:X.contentMarkdown,contentFormat:f.MARKDOWN,authors:X.authors,tags:X.tags,reactionCounts:null,locale:R,translations:[]}:null:H&&V?{...pe(V),reactionCounts:V.reactionCounts??null,locale:C,translations:[]}:K?.visitorHelpArticle?{id:K.visitorHelpArticle._id,title:K.visitorHelpArticle.title,excerpt:K.visitorHelpArticle.excerpt??``,content:K.visitorHelpArticle.content,contentFormat:K.visitorHelpArticle.contentFormat,authors:K.visitorHelpArticle.authors,tags:K.visitorHelpArticle.tags,reactionCounts:K.visitorHelpArticle.reactionCounts??null,locale:K.visitorHelpArticle.locale,translations:K.visitorHelpArticle.translations}:null,{data:he}=oe({variables:{articleId:Z?.id??``,limit:5,locale:C},skip:w||H||!Z?.id||!F}),ge=v(()=>{if(!H||!Z?.id)return[];let e=(N.previewData?.helpArticles??[]).filter(e=>!!e&&typeof e==`object`),t=new Set((Z.tags??[]).map(e=>typeof e==`object`&&e&&`slug`in e?String(e.slug):null).filter(e=>!!e)),n=(()=>{let e=V;if(!e)return null;let t=e.folderId;if(typeof t==`string`)return t;let n=e.folder;if(n&&typeof n==`object`&&`_id`in n){let e=n._id;return typeof e==`string`?e:null}return null})();return e.filter(e=>String(e._id??``)!==Z.id).map(e=>{let r=typeof e.folderId==`string`?e.folderId:e.folder&&typeof e.folder==`object`&&`_id`in e.folder?String(e.folder._id??``):null,i=Array.isArray(e.tags)?e.tags.map(e=>typeof e==`object`&&e&&`slug`in e?String(e.slug):null).filter(e=>!!e):[];return{raw:e,score:(n&&r===n?2:0)+i.filter(e=>t.has(e)).length}}).filter(e=>e.score>0).sort((e,t)=>t.score-e.score).slice(0,5).map(({raw:e})=>({_id:String(e._id??``),title:typeof e.title==`string`?e.title:``,slug:typeof e.slug==`string`?e.slug:``,excerpt:typeof e.excerpt==`string`?e.excerpt:null}))},[H,Z,V,N.previewData]),_e=v(()=>w?fe(a(B),t):[],[w,B,t]),Q=w?_e:H?ge:he?.visitorHelpRelated??[],ve=w||H?null:U?.visitorHelpArticle?.viewerReaction??null,ye=!w&&!H&&U?.visitorHelpArticle?[U.visitorHelpArticle._id,...(U.visitorHelpArticle.translations??[]).map(e=>e._id)]:Z?.id?[Z.id]:[];_(()=>{w||!Z?.id||!W.token||q({variables:{articleId:Z.id}}).catch(()=>{})},[Z?.id,w,q,W]),_(()=>{w||H||!Z?.id||Y.current!==Z.id&&(Y.current=Z.id,J({url:`/help/${t}`,targetType:`HELP_ARTICLE`,targetRefId:Z.id}))},[Z?.id,w,H,t,J]),p(Z?.title,k);let be=()=>E();if(!me&&!Z)return x(`div`,{className:`flex flex-1 flex-col items-center justify-center px-6 py-12`,children:x(u,{children:x(l,{className:`py-8 text-center`,children:x(`p`,{className:`text-sm font-semibold text-wx-fg`,children:A(`articleNotFound`)})})})});let xe=C.split(`-`)[0].toLowerCase(),$=Z?Z.locale.split(`-`)[0].toLowerCase():null;return!w&&!H&&!P.contentLocaleFallback&&$!==null&&$!==xe?x(`div`,{className:`flex flex-1 flex-col items-center justify-center px-6 py-12`,children:x(u,{children:x(l,{className:`py-8 text-center`,children:x(`p`,{className:`text-sm font-semibold text-wx-fg`,children:A(`articleNotTranslated`)})})})}):Z?x(s,{followDirection:!0,className:`flex-1`,viewportRef:M,children:S(`div`,{className:`flex flex-col px-5 pt-5 pb-12 [overflow-wrap:anywhere]`,children:[x(`h2`,{className:`text-xl leading-tight font-bold text-wx-fg`,children:Z.title}),Z.authors.length>0&&S(`p`,{className:`mt-2 flex items-center gap-2 text-xs text-wx-fg-muted`,children:[x(`span`,{className:`flex -space-x-1.5`,children:Z.authors.slice(0,3).map(e=>x(`span`,{className:`h-5 w-5 overflow-hidden rounded-full bg-wx-bg-elevated ring-1 ring-wx-bg`,"aria-hidden":`true`,children:e.photo?.url?x(`img`,{src:e.photo.url,alt:``,className:`h-full w-full object-cover`}):x(`span`,{className:`flex h-full w-full items-center justify-center text-[10px] font-semibold uppercase text-wx-fg-muted`,children:(e.name??`?`).charAt(0)})},e._id))}),x(`span`,{children:A(`writtenBy`,{names:Z.authors.map(e=>e.name??``).filter(Boolean).join(`, `)})})]}),Z.tags.length>0&&x(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:Z.tags.map(e=>x(`span`,{className:`rounded-full bg-wx-bg-elevated px-2 py-0.5 text-[11px] font-medium text-wx-fg-muted`,children:e.label},e._id))}),Z.excerpt&&x(`p`,{className:`mt-2 mb-5 text-sm text-wx-fg-muted`,children:Z.excerpt}),x(h,{content:Z.content,isHtml:Z.contentFormat===f.HTML||g(Z.content),markdownMarginClass:`mt-3`}),S(ce,{type:`button`,variant:`solid`,size:`lg`,className:`mt-6 w-full shrink-0 min-h-12`,onClick:be,...L.parentHandlers,children:[x(ie,{ref:L.iconRef,size:16}),x(`span`,{children:A(`unresolvedCta`)})]}),Z.id&&x(de,{surface:m.HELP,itemId:Z.id,reactionCounts:Z.reactionCounts,viewerReaction:ve,groupItemIds:ye,isDummy:w,showCounts:I,className:`mt-4`}),x(ue,{currentLocale:w?R:Z.locale,locales:w?[...o]:Z.translations.map(e=>e.locale),allowedLocales:w?void 0:P.supportedLocales,onSelect:w?e=>z(e):e=>{let t=Z.translations.find(t=>t.locale===e);t&&O?.(t.slug,t.locale)},className:`mt-6`}),F&&Q.length>0&&S(`section`,{className:`mt-6`,children:[x(`p`,{className:`mb-2 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:A(`relatedTitle`)}),x(`ul`,{className:`flex flex-col gap-1.5`,children:Q.map(e=>x(`li`,{children:S(`button`,{type:`button`,onClick:()=>D?.(e.slug),className:`flex w-full flex-col items-start gap-0.5 rounded-wx-lg bg-wx-bg-elevated px-3 py-2 text-start transition-colors hover:bg-wx-bg-elevated/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[x(`span`,{className:`block truncate text-sm font-medium text-wx-fg`,children:e.title}),e.excerpt&&x(`span`,{className:`line-clamp-1 block text-xs text-wx-fg-muted`,children:e.excerpt})]})},e._id))})]})]})}):x(T,{})}function T(){return x(s,{followDirection:!0,className:`flex-1`,viewportRef:d(),children:S(`div`,{className:`flex flex-col px-5 pt-5 pb-12`,"aria-busy":`true`,"aria-live":`polite`,children:[S(`div`,{className:`animate-pulse space-y-2.5`,children:[x(`div`,{className:`h-5 w-3/4 rounded-md bg-wx-bg-elevated`}),x(`div`,{className:`h-5 w-1/2 rounded-md bg-wx-bg-elevated`})]}),S(`div`,{className:`mt-4 flex items-center gap-2 animate-pulse`,children:[x(`div`,{className:`h-5 w-5 rounded-full bg-wx-bg-elevated`}),x(`div`,{className:`h-3 w-32 rounded-md bg-wx-bg-elevated`})]}),x(`div`,{className:`mt-6 space-y-2.5 animate-pulse`,children:[`w-full`,`w-11/12`,`w-10/12`,`w-full`,`w-9/12`,`w-full`,`w-11/12`,`w-7/12`].map((e,n)=>x(`div`,{className:t(`h-3 rounded-md bg-wx-bg-elevated`,e)},n))})]})})}export{w as HelpArticleView};
|
|
2
|
+
//# sourceMappingURL=widget-react-DJDytohv.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{S as e,b as t,i as n,n as r,t as i}from"./widget-react-DIvxQOfe.js";import{$ as a,
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{S as e,b as t,i as n,n as r,t as i}from"./widget-react-DIvxQOfe.js";import{$ as a,D as o,E as s,Ft as c,Y as l,d as ee,g as u,h as d,l as f,nn as p,tn as m,wt as h}from"./widget-react-C8SNEdwd.js";import{c as g}from"./widget-react-_QsYqFeh.js";import{useCallback as _,useEffect as v,useMemo as y,useRef as b,useState as x}from"react";import{Fragment as te,jsx as S,jsxs as C}from"react/jsx-runtime";var w={},T=p`
|
|
2
2
|
query VisitorNewsList($args: VisitorNewsListArgs) {
|
|
3
3
|
visitorNewsList(args: $args) {
|
|
4
4
|
items {
|
|
@@ -42,7 +42,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`;function ne(e){return
|
|
45
|
+
`;function ne(e){return m(T,{...w,...e})}var E=p`
|
|
46
46
|
query VisitorNewsPostCard($args: VisitorNewsPostArgs!) {
|
|
47
47
|
visitorNewsPost(args: $args) {
|
|
48
48
|
_id
|
|
@@ -55,7 +55,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
55
55
|
externalCoverImageUrl
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`;function D(e){return
|
|
58
|
+
`;function D(e){return m(E,{...w,...e})}var O=p`
|
|
59
59
|
query VisitorNewsPost($args: VisitorNewsPostArgs!) {
|
|
60
60
|
visitorNewsPost(args: $args) {
|
|
61
61
|
_id
|
|
@@ -106,7 +106,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
`;function k(e){return
|
|
109
|
+
`;function k(e){return m(O,{...w,...e})}var A=p`
|
|
110
110
|
query VisitorNewsRelated($postId: ID!, $limit: Int, $locale: String) {
|
|
111
111
|
visitorNewsRelated(postId: $postId, limit: $limit, locale: $locale) {
|
|
112
112
|
_id
|
|
@@ -121,13 +121,13 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
121
121
|
externalCoverImageUrl
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
`;function j(e){return
|
|
124
|
+
`;function j(e){return m(A,{...w,...e})}p`
|
|
125
125
|
mutation RecordVisitorNewsView($postId: String!) {
|
|
126
126
|
recordVisitorNewsView(postId: $postId) {
|
|
127
127
|
ok
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
`;var M=
|
|
130
|
+
`;var M=p`
|
|
131
131
|
query VisitorNewsListSlim($args: VisitorNewsListArgs) {
|
|
132
132
|
visitorNewsList(args: $args) {
|
|
133
133
|
items {
|
|
@@ -136,5 +136,5 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
`;function N(e){return
|
|
140
|
-
//# sourceMappingURL=widget-react-
|
|
139
|
+
`;function N(e){return m(M,{...w,...e})}var P=i(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),F=i(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]);function I({icon:e,size:t=20,strokeWidth:n=2,className:i,...a}){return S(e,{width:t,height:t,strokeWidth:n,className:r(`shrink-0`,i),...a})}function L({className:e,...t}){return S(`div`,{"data-slot":`skeleton`,className:r(`animate-pulse rounded-wx-sm bg-wx-bg-elevated`,e),...t})}function R(e){if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||typeof e!=`object`)return null;let t=e.name;if(typeof t!=`string`)return null;let n=e._id??e.id,r=e.photo?.url;return{id:String(n??t),name:t,photoUrl:typeof r==`string`?r:null}}).filter(e=>!!e);return t.length>0?t:void 0}function z({authors:e,max:t=3,className:n}){return!e||e.length===0?null:S(`span`,{className:`flex items-center -space-x-1.5 ${n??``}`,children:e.slice(0,t).map(e=>e.photoUrl?S(`img`,{src:e.photoUrl,alt:e.name,title:e.name,className:`h-5 w-5 rounded-full border border-wx-bg object-cover`},e.id):S(`span`,{title:e.name,className:`flex h-5 w-5 items-center justify-center rounded-full border border-wx-bg bg-wx-bg-elevated-2 text-[9px] font-semibold text-wx-fg-muted`,children:e.name.charAt(0).toUpperCase()},e.id))})}function B({value:e,onChange:t,placeholder:n,className:i}){return C(`div`,{className:r(`sticky top-0 z-10 flex items-center gap-2.5 border-wx-border border-b bg-wx-bg px-4`,i),children:[S(g,{size:16,className:`shrink-0 text-wx-fg-muted`}),S(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:n,className:r(`block w-full min-w-0 flex-1 border-0 bg-transparent py-3 text-sm text-wx-fg`,`placeholder:text-wx-fg-muted focus:outline-none focus:ring-0`,`[&::-webkit-search-cancel-button]:appearance-none`)})]})}var V=new Map;function H(e){let t=b(null);return v(()=>{let n=t.current;if(!n)return;let r=V.get(e)??0,i=!1,a=performance.now(),o=()=>{if(i||!t.current)return;let e=t.current;if(e.scrollHeight-e.clientHeight>=r){e.scrollTop=r;return}if(performance.now()-a>500){e.scrollTop=r;return}requestAnimationFrame(o)};requestAnimationFrame(o);let s=()=>{V.set(e,n.scrollTop)};return n.addEventListener(`scroll`,s,{passive:!0}),()=>{i=!0,n.removeEventListener(`scroll`,s)}},[e]),t}function U(e){if(!e.upstreamUpdatedAt)return!1;let t=Date.parse(e.upstreamUpdatedAt),n=Date.parse(e.publishedAt);return Number.isNaN(t)||Number.isNaN(n)?!1:t>n+6e4}function W(e){let t=Date.parse(e);if(Number.isNaN(t))return``;let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<7?`${a}d ago`:new Date(t).toLocaleDateString()}var G=10,K=240;function q({isDummy:n,onOpenArticle:r}){let i=t(`news`),u=o(),d=e(),p=l(),[m,g]=x(``),b=Y(m,300),w=b.length>=2,T=p.previewData?.newsPosts,E=!n&&Array.isArray(T)&&T.length>0,[D,O]=x(G),{data:k,error:A,loading:j,fetchMore:M}=ne({variables:{args:{locale:d,limit:G,offset:0,...w?{query:b}:{}}},skip:n||E,notifyOnNetworkStatusChange:!0});v(()=>{O(G)},[b,E]);let N=c().publicKey,P=f(N&&!n&&!w?a.news(N,d):null,k),R=y(()=>(P?.visitorNewsList?.items??[]).filter(e=>!!e).map(J),[P]),z=E?(T??[]).filter(e=>!!e&&typeof e==`object`).map(J):[],V=_(e=>e.title.toLowerCase().includes(b.toLowerCase())||e.excerpt.toLowerCase().includes(b.toLowerCase()),[b]),U=n?w?h(u).filter(V):h(u):E?w?z.filter(V):z:R,W=E||n?U.slice(0,D):U,q=y(()=>n||E?D<U.length:P?.visitorNewsList?.meta?.hasNextPage??!1,[n,E,D,U.length,P]),[Z,Q]=x(!1),$=_(async()=>{if(!(!q||Z)){if(n||E){O(e=>e+G);return}Q(!0);try{await M({variables:{args:{locale:d,limit:G,offset:k?.visitorNewsList?.items?.length??0,...w?{query:b}:{}}},updateQuery:(e,{fetchMoreResult:t})=>{if(!t)return e;let n=new Set,r=[];for(let i of[...e.visitorNewsList?.items??[],...t.visitorNewsList?.items??[]])i&&!n.has(i._id)&&(n.add(i._id),r.push(i));return{...e,visitorNewsList:{...t.visitorNewsList,items:r}}}})}catch(e){console.warn(`[wexio] news load-more failed:`,e)}finally{Q(!1)}}},[q,Z,n,E,w,b,d,M,k]),re=H(`news`),ie=_(e=>{let t=e.currentTarget;t.scrollHeight-t.clientHeight-t.scrollTop<K&&$()},[$]),ae=U.length>0||w,oe=n&&!s(u)||!n&&!E&&j&&W.length===0;return A&&W.length===0?S(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 px-6 py-12 text-center`,children:S(`p`,{className:`text-sm text-wx-fg-muted`,children:i(`emptyTitle`)})}):C(ee,{followDirection:!0,className:`flex-1`,viewportRef:re,onScroll:ie,children:[ae&&S(B,{value:m,onChange:g,placeholder:i(`searchPlaceholder`)}),S(`div`,{className:`flex flex-col gap-3 px-4 pt-4 pb-6`,children:oe?Array.from({length:3}).map((e,t)=>C(`div`,{className:`overflow-hidden rounded-wx-lg bg-wx-bg-elevated`,children:[S(L,{className:`aspect-[16/10] w-full rounded-none`}),C(`div`,{className:`space-y-2 px-5 py-4`,children:[S(L,{className:`h-3 w-3/4`}),S(L,{className:`h-3 w-1/2`}),S(L,{className:`mt-1 h-2 w-1/3`})]})]},t)):W.length===0?C(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 px-6 py-12 text-center`,children:[S(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-full bg-wx-bg-elevated text-wx-fg-muted`,children:S(I,{icon:F,size:28})}),S(`p`,{className:`text-base font-semibold text-wx-fg`,children:i(w?`noResults`:`emptyTitle`)}),!w&&S(`p`,{className:`text-sm text-wx-fg-muted`,children:i(`emptyBody`)})]}):C(te,{children:[W.map((e,t)=>S(X,{item:e,locale:d,delay:t<G?t*.04:0,onClick:()=>r(e.id)},e.id)),Z&&S(`div`,{className:`flex justify-center py-3`,children:S(L,{className:`h-3 w-24`})})]})})]})}function J(e,t=0){let n=e.coverImageUrl?.url,r=e.externalCoverImageUrl,i=typeof n==`string`?n:typeof r==`string`?r:null,a=e=>Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return null;let t=e.slug,n=e.label;return typeof t!=`string`||typeof n!=`string`?null:{slug:t,label:n}}).filter(e=>!!e):void 0,o=a(e.tags),s=a(e.categories),c=Array.isArray(e.authors)?e.authors.map(e=>{if(!e||typeof e!=`object`)return null;let t=e.name;if(typeof t!=`string`)return null;let n=e._id,r=e.photo?.url;return{_id:String(n??t),name:t,photo:{url:typeof r==`string`?r:``}}}).filter(e=>!!e):void 0;return{id:String(e._id??e.id??`news-${t}`),title:typeof e.title==`string`?e.title:``,excerpt:typeof e.excerpt==`string`?e.excerpt:``,publishedAt:typeof e.publishedAt==`string`?e.publishedAt:new Date().toISOString(),coverGradient:[`#1e1f21`,`#121314`],...i?{coverImageUrl:i}:{},...typeof e.upstreamUpdatedAt==`string`?{upstreamUpdatedAt:e.upstreamUpdatedAt}:{},...o&&o.length>0?{tags:o}:{},...s&&s.length>0?{categories:s}:{},...c&&c.length>0?{authors:c}:{},reactionCounts:e.reactionCounts??null}}function Y(e,t){let[n,r]=x(e);return v(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function X({item:e,locale:i,delay:a,onClick:o}){let s=t(`news`),c=e.categories??(e.category?[e.category]:[]),l=R(e.authors);return C(n.button,{type:`button`,onClick:o,initial:{opacity:0,y:8},animate:{opacity:1,y:0},whileHover:{y:-2},whileTap:{scale:.985},transition:{duration:.2,delay:a},className:r(`block w-full shrink-0 overflow-hidden rounded-wx-lg bg-wx-bg-elevated text-start [overflow-wrap:anywhere]`,`transition-colors hover:bg-wx-bg-elevated-2`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`),children:[S(`div`,{className:`aspect-[16/10] w-full bg-cover bg-center`,style:e.coverImageUrl?{backgroundImage:`url(${e.coverImageUrl})`}:{background:`linear-gradient(135deg, ${e.coverGradient[0]}, ${e.coverGradient[1]})`},"aria-hidden":`true`}),C(`div`,{className:`px-5 py-4`,children:[(c.length>0||l!=null)&&C(`div`,{className:`mb-1.5 flex items-center justify-between gap-2`,children:[S(`div`,{className:`flex min-w-0 flex-wrap gap-1.5`,children:c.slice(0,2).map(e=>S(`span`,{className:`text-[10px] font-semibold uppercase tracking-wide text-wx-primary`,children:e.label},e.slug))}),S(z,{authors:l,className:`shrink-0`})]}),S(u,{className:`text-sm`,children:e.title}),e.excerpt&&S(d,{className:`mt-1 text-xs`,children:e.excerpt}),C(`p`,{className:`mt-2 flex items-center gap-2 text-xs text-wx-fg-subtle`,children:[S(`span`,{children:new Date(e.publishedAt).toLocaleDateString(i,{month:`short`,day:`numeric`,year:`numeric`})}),U(e)&&e.upstreamUpdatedAt&&S(`span`,{className:`rounded-full bg-wx-bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-wx-fg-muted`,title:new Date(e.upstreamUpdatedAt).toLocaleString(i),children:s(`editedAt`,{when:W(e.upstreamUpdatedAt)})})]}),e.tags&&e.tags.length>0&&S(`div`,{className:`mt-2.5 flex flex-wrap gap-1`,children:e.tags.slice(0,4).map(e=>S(`span`,{className:`rounded-full bg-wx-bg-elevated px-2 py-0.5 text-[10px] font-medium text-wx-fg-muted`,children:e.label},e.slug))})]})]})}export{B as a,L as c,P as d,T as f,j as g,k as h,H as i,I as l,D as m,W as n,z as o,N as p,U as r,R as s,q as t,F as u};
|
|
140
|
+
//# sourceMappingURL=widget-react-D_H6kTTD.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{S as e,b as t,n}from"./widget-react-DIvxQOfe.js";import{$ as r,D as i,Ft as a,O as o,T as s,Y as c,c as l,d as u,l as d,u as f,wt as p,x as ee}from"./widget-react-C8SNEdwd.js";import{d as te,g as ne,h as m,n as h,r as g}from"./widget-react-D_H6kTTD.js";import{i as _,n as v,o as y,r as b,s as x,t as S}from"./widget-react-Cjd5m37N.js";import{useEffect as C,useMemo as w,useRef as re,useState as ie}from"react";import{jsx as T,jsxs as E}from"react/jsx-runtime";var D=3;function ae(e,t,n=D){let r=e.find(e=>e.id===t),i=new Set((r?.tags??[]).map(e=>e.slug)),a=r?.category?.slug;return e.filter(e=>e.id!==t).map(e=>({n:e,score:(a&&e.category?.slug===a?1:0)+(e.tags??[]).filter(e=>i.has(e.slug)).length})).sort((e,t)=>t.score-e.score||t.n.publishedAt.localeCompare(e.n.publishedAt)).slice(0,n).map(({n:e})=>({id:e.id,title:e.title,coverImageUrl:e.coverImageUrl}))}function oe(e){if(!e||typeof e!=`object`)return null;let t=e,n=String(t._id??t.id??``);if(!n)return null;let r=t.coverImageUrl?.url,i=t.externalCoverImageUrl,a=typeof r==`string`?r:typeof i==`string`?i:void 0,o=Array.isArray(t.tags)?t.tags.map(e=>{if(!e||typeof e!=`object`)return null;let t=e.slug,n=e.label;return typeof t!=`string`||typeof n!=`string`?null:{slug:t,label:n}}).filter(e=>!!e):void 0,s=e=>{if(!Array.isArray(e))return;let t=[];for(let n of e)if(n){if(typeof n==`string`)t.push(n);else if(typeof n==`object`){let e=n._id??n.id;typeof e==`string`&&t.push(e)}}return t.length>0?t:void 0},c=Array.isArray(t.translations)?t.translations.map(e=>{if(!e||typeof e!=`object`)return null;let t=String(e._id??e.id??``),n=e.locale;return!t||typeof n!=`string`?null:{id:t,locale:n}}).filter(e=>!!e):void 0,l=Array.isArray(t.authors)?t.authors.map(e=>{if(!e||typeof e!=`object`)return null;let t=e.name;if(typeof t!=`string`)return null;let n=e._id,r=e.photo?.url;return{_id:String(n??t),name:t,photo:{url:typeof r==`string`?r:``}}}).filter(e=>!!e):void 0;return{id:n,title:typeof t.title==`string`?t.title:``,excerpt:typeof t.excerpt==`string`?t.excerpt:``,contentMarkdown:typeof t.contentMarkdown==`string`?t.contentMarkdown:void 0,bodyFormat:typeof t.bodyFormat==`string`?t.bodyFormat:void 0,coverImageUrl:a,publishedAt:typeof t.publishedAt==`string`?t.publishedAt:new Date().toISOString(),upstreamUpdatedAt:typeof t.upstreamUpdatedAt==`string`?t.upstreamUpdatedAt:void 0,sourceUrl:typeof t.sourceUrl==`string`?t.sourceUrl:void 0,reactionCounts:t.reactionCounts??null,viewerReaction:typeof t.viewerReaction==`number`?t.viewerReaction:null,tags:o,authors:l,categoryIds:s(t.categories),tagIds:s(t.tags),locale:typeof t.locale==`string`?t.locale:void 0,translations:c}}function se({currentId:e,currentCategoryIds:n,currentTagIds:r,previewPostsById:i,visitorRelatedRaw:a,isDummy:o,demoItems:s,onOpen:c}){let l=t(`news`),u=(()=>{if(o)return s??[];if(Array.isArray(a)&&a.length>0)return a.filter(e=>!!e&&typeof e==`object`).map(e=>{let t=e.coverImageUrl?.url??e.externalCoverImageUrl;return{id:String(e._id??e.id??``),title:typeof e.title==`string`?e.title:``,coverImageUrl:typeof t==`string`?t:void 0}}).filter(e=>e.id&&e.title);if(i&&Object.keys(i).length>0&&(n.length>0||r.length>0)){let t=new Set(n),a=new Set(r),o=[];for(let[n,r]of Object.entries(i)){if(n===e||!r||typeof r!=`object`)continue;let i=r,s=Array.isArray(i.categories)?i.categories:[],c=Array.isArray(i.tags)?i.tags:[],l=e=>{let t=new Set;for(let n of e)if(n&&typeof n==`object`){let e=n._id??n.id;typeof e==`string`&&t.add(e)}return t},u=l(s),d=l(c),f=0;for(let e of u)t.has(e)&&f++;for(let e of d)a.has(e)&&f++;if(f===0)continue;let p=i.coverImageUrl?.url??i.externalCoverImageUrl;o.push({id:n,title:typeof i.title==`string`?i.title:``,coverImageUrl:typeof p==`string`?p:void 0,overlap:f,publishedAt:typeof i.publishedAt==`string`?i.publishedAt:``})}return o.sort((e,t)=>t.overlap===e.overlap?t.publishedAt.localeCompare(e.publishedAt):t.overlap-e.overlap),o.slice(0,5).map(({id:e,title:t,coverImageUrl:n})=>({id:e,title:t,coverImageUrl:n}))}return[]})();return u.length===0?null:E(`section`,{className:`mt-6`,children:[T(`p`,{className:`mb-2 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:l(`relatedTitle`)}),T(`ul`,{className:`flex flex-col gap-2`,children:u.map(e=>T(`li`,{children:E(`button`,{type:`button`,onClick:()=>c(e.id),className:`flex w-full items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-3 py-2 text-start transition-colors hover:bg-wx-bg-elevated/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[T(`span`,{className:`aspect-square w-12 shrink-0 rounded-wx-sm bg-cover bg-center`,style:e.coverImageUrl?{backgroundImage:`url(${e.coverImageUrl})`}:{background:`linear-gradient(135deg, #1e1f21, #121314)`},"aria-hidden":`true`}),T(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-wx-fg`,children:e.title})]})},e.id))})]})}function O({id:D,isDummy:O,onOpenRelated:A,onTitleResolved:j}){let M=t(`news`),N=i(),P=f(),F=e(),I=c(),{config:L}=ee(),R=L.messenger?.showRelatedNews??!0,z=L.messenger?.showReactionCounts??!0,{trackLinkClick:B}=l(),V=re(null),H=e=>{A?.(e)},[U,W]=ie(F),G=o(U,N),K=O?null:I.previewData?.newsPostsById?.[D],q=!!K,{data:ce,loading:le}=m({variables:{args:{id:D,locale:F}},skip:O||q||!D}),J=a().publicKey,Y=d(J&&!O&&!q&&D?r.newsPost(J,D,F):null,ce),{data:ue}=ne({variables:{postId:D,limit:5,locale:F},skip:O||q||!D||!R}),X=O?p(G).find(e=>e.id===D)??null:null,de=w(()=>O?ae(p(G),D):void 0,[O,G,D]),Z=X?{id:X.id,title:X.title,excerpt:X.excerpt,contentMarkdown:X.contentMarkdown,bodyFormat:`markdown`,coverImageUrl:X.coverImageUrl,coverGradient:X.coverGradient,publishedAt:X.publishedAt,upstreamUpdatedAt:X.upstreamUpdatedAt,tags:X.tags,authors:X.authors,category:X.category,locale:U}:oe(q?K:Y?.visitorNewsPost);if(_(Z?.title,j),C(()=>{O||q||!Z?.id||V.current!==Z.id&&(V.current=Z.id,B({url:`/news/${Z.id}`,targetType:`NEWS_POST`,targetRefId:Z.id}))},[Z?.id,O,q,B]),!Z)return le?T(k,{}):T(`div`,{className:`flex flex-1 items-center justify-center px-6 py-12 text-center`,children:T(`p`,{className:`text-sm text-wx-fg-muted`,children:M(`articleNotFound`)})});let fe=F.split(`-`)[0].toLowerCase(),Q=Z.locale?Z.locale.split(`-`)[0].toLowerCase():null;if(!O&&!q&&!L.contentLocaleFallback&&Q!==null&&Q!==fe)return T(`div`,{className:`flex flex-1 items-center justify-center px-6 py-12 text-center`,children:T(`p`,{className:`text-sm text-wx-fg-muted`,children:M(`articleNotTranslated`)})});let $=Z.coverGradient??[`#1e1f21`,`#121314`];return T(u,{followDirection:!0,className:`flex-1`,viewportRef:P,children:E(`div`,{className:`flex flex-col`,children:[T(`div`,{className:n(`relative w-full`),style:{aspectRatio:`16 / 9`,background:Z.coverImageUrl?`url(${Z.coverImageUrl}) center/cover`:`linear-gradient(135deg, ${$[0]}, ${$[1]})`},"aria-hidden":`true`}),E(`div`,{className:`flex flex-col gap-3 px-5 pt-5 pb-12 [overflow-wrap:anywhere]`,children:[Z.category&&T(`p`,{className:`text-[11px] font-semibold tracking-[0.14em] text-wx-primary uppercase`,children:Z.category.label}),E(`p`,{className:`flex items-center gap-2 text-xs text-wx-fg-subtle`,children:[T(`span`,{children:new Date(Z.publishedAt).toLocaleDateString(F,{month:`long`,day:`numeric`,year:`numeric`})}),g(Z)&&Z.upstreamUpdatedAt&&T(`span`,{className:`rounded-full bg-wx-bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-wx-fg-muted`,title:new Date(Z.upstreamUpdatedAt).toLocaleString(F),children:M(`editedAt`,{when:h(Z.upstreamUpdatedAt)})})]}),T(`h2`,{className:`text-2xl leading-tight font-bold text-wx-fg`,children:Z.title}),Z.authors&&Z.authors.length>0&&E(`p`,{className:`flex items-center gap-2 text-xs text-wx-fg-muted`,children:[T(`span`,{className:`flex -space-x-1.5`,children:Z.authors.slice(0,3).map(e=>T(`span`,{className:`h-5 w-5 overflow-hidden rounded-full bg-wx-bg-elevated ring-1 ring-wx-bg`,"aria-hidden":`true`,children:T(`img`,{src:e.photo.url,alt:``,className:`h-full w-full object-cover`})},e._id))}),T(`span`,{children:M(`writtenBy`,{names:Z.authors.map(e=>e.name).join(`, `)})})]}),Z.tags&&Z.tags.length>0&&T(`div`,{className:`flex flex-wrap gap-1`,children:Z.tags.map(e=>T(`span`,{className:`rounded-full bg-wx-bg-elevated px-2 py-0.5 text-[11px] font-medium text-wx-fg-muted`,children:e.label},e.slug))}),Z.excerpt&&T(`p`,{className:`text-base leading-relaxed text-wx-fg-muted`,children:Z.excerpt}),Z.contentMarkdown&&T(b,{content:Z.contentMarkdown,isHtml:Z.bodyFormat===`html`||x(Z.contentMarkdown),markdownMarginClass:`mt-3`}),Z.sourceUrl&&E(`a`,{href:Z.sourceUrl,target:`_blank`,rel:`noopener noreferrer`,className:`mt-4 flex items-center justify-center gap-1.5 text-xs text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-80`,children:[T(te,{size:12}),T(`span`,{children:M(`readOriginal`)})]}),R&&T(se,{currentId:Z.id,currentCategoryIds:Z.categoryIds??[],currentTagIds:Z.tagIds??[],previewPostsById:O?void 0:I.previewData?.newsPostsById,visitorRelatedRaw:ue?.visitorNewsRelated,isDummy:O,demoItems:de,onOpen:H}),Z.id&&T(S,{surface:y.NEWS,itemId:Z.id,reactionCounts:Z.reactionCounts??null,viewerReaction:Z.viewerReaction??null,groupItemIds:[Z.id,...(Z.translations??[]).map(e=>e.id)],isDummy:O,showCounts:z,className:`mt-6`}),T(v,{currentLocale:O?U:Z.locale??F,locales:O?[...s]:(Z.translations??[]).map(e=>e.locale),allowedLocales:O?void 0:L.supportedLocales,onSelect:O?e=>W(e):e=>{let t=(Z.translations??[]).find(t=>t.locale===e);t&&H(t.id)},className:`mt-6`})]})]})})}function k(){return T(u,{followDirection:!0,className:`flex-1`,viewportRef:f(),children:E(`div`,{className:`flex flex-col`,"aria-busy":`true`,"aria-live":`polite`,children:[T(`div`,{className:`w-full animate-pulse bg-wx-bg-elevated`,style:{aspectRatio:`16 / 9`}}),E(`div`,{className:`px-5 pt-5 pb-12`,children:[E(`div`,{className:`animate-pulse space-y-2.5`,children:[T(`div`,{className:`h-5 w-3/4 rounded-md bg-wx-bg-elevated`}),T(`div`,{className:`h-5 w-1/2 rounded-md bg-wx-bg-elevated`})]}),T(`div`,{className:`mt-4 flex items-center gap-2 animate-pulse`,children:T(`div`,{className:`h-3 w-24 rounded-md bg-wx-bg-elevated`})}),T(`div`,{className:`mt-6 space-y-2.5 animate-pulse`,children:[`w-full`,`w-11/12`,`w-10/12`,`w-full`,`w-9/12`,`w-7/12`].map((e,t)=>T(`div`,{className:n(`h-3 rounded-md bg-wx-bg-elevated`,e)},t))})]})]})})}export{O as NewsArticleView};
|
|
2
|
+
//# sourceMappingURL=widget-react-Df0nz7Rs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{n as e,r as t}from"./widget-react-DIvxQOfe.js";import{
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{n as e,r as t}from"./widget-react-DIvxQOfe.js";import{en as n,nn as r,tn as i}from"./widget-react-C8SNEdwd.js";import*as a from"react";import{jsx as o}from"react/jsx-runtime";var s={},c=function(e){return e.Popular=`POPULAR`,e.Recent=`RECENT`,e}({}),l=r`
|
|
2
2
|
query VisitorHelpFolders($parentId: ID, $locale: String) {
|
|
3
3
|
visitorHelpFolders(parentId: $parentId, locale: $locale) {
|
|
4
4
|
_id
|
|
@@ -11,7 +11,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
11
11
|
articleCount
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
`;function u(e){return
|
|
14
|
+
`;function u(e){return i(l,{...s,...e})}r`
|
|
15
15
|
query VisitorHelpTags($locale: String) {
|
|
16
16
|
visitorHelpTags(locale: $locale) {
|
|
17
17
|
_id
|
|
@@ -20,7 +20,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
20
20
|
description
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`;var d=
|
|
23
|
+
`;var d=r`
|
|
24
24
|
query VisitorHelpList($args: VisitorHelpListArgs) {
|
|
25
25
|
visitorHelpList(args: $args) {
|
|
26
26
|
items {
|
|
@@ -63,7 +63,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`;function f(e){return
|
|
66
|
+
`;function f(e){return i(d,{...s,...e})}var p=r`
|
|
67
67
|
query VisitorHelpArticle($args: VisitorHelpArticleArgs!) {
|
|
68
68
|
visitorHelpArticle(args: $args) {
|
|
69
69
|
_id
|
|
@@ -108,7 +108,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
`;function m(e){return
|
|
111
|
+
`;function m(e){return i(p,{...s,...e})}var h=r`
|
|
112
112
|
query VisitorHelpArticlesByIds($ids: [ID!]!, $locale: String) {
|
|
113
113
|
visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
|
|
114
114
|
_id
|
|
@@ -122,7 +122,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
`;function g(e){return
|
|
125
|
+
`;function g(e){return i(h,{...s,...e})}var _=r`
|
|
126
126
|
query VisitorHelpRelated($articleId: ID!, $limit: Int, $locale: String) {
|
|
127
127
|
visitorHelpRelated(articleId: $articleId, limit: $limit, locale: $locale) {
|
|
128
128
|
_id
|
|
@@ -135,13 +135,13 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
`;function v(e){return
|
|
138
|
+
`;function v(e){return i(_,{...s,...e})}var y=r`
|
|
139
139
|
mutation RecordVisitorHelpView($articleId: String!) {
|
|
140
140
|
recordVisitorHelpView(articleId: $articleId) {
|
|
141
141
|
ok
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
`;function b(e){return n(y,{...s,...e})}var x=
|
|
144
|
+
`;function b(e){return n(y,{...s,...e})}var x=r`
|
|
145
145
|
query VisitorHelpListSlim($args: VisitorHelpListArgs) {
|
|
146
146
|
visitorHelpList(args: $args) {
|
|
147
147
|
items {
|
|
@@ -151,7 +151,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
`;function S(e){return
|
|
154
|
+
`;function S(e){return i(x,{...s,...e})}var C=r`
|
|
155
155
|
query VisitorHelpArticlesByIdsSlim($ids: [ID!]!, $locale: String) {
|
|
156
156
|
visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
|
|
157
157
|
_id
|
|
@@ -159,5 +159,5 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
159
159
|
slug
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
`;function w(e){return
|
|
163
|
-
//# sourceMappingURL=widget-react-
|
|
162
|
+
`;function w(e){return i(C,{...s,...e})}function T(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function E(...e){return t=>{let n=!1,r=e.map(e=>{let r=T(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():T(e[t],null)}}}}var D=Symbol.for(`react.lazy`),O=a.use;function k(e){return typeof e==`object`&&!!e&&`then`in e}function A(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===D&&`_payload`in e&&k(e._payload)}function j(e){let t=N(e),n=a.forwardRef((e,n)=>{let{children:r,...i}=e;A(r)&&typeof O==`function`&&(r=O(r._payload));let s=a.Children.toArray(r),c=s.find(F);if(c){let e=c.props.children,r=s.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return o(t,{...i,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return o(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var M=j(`Slot`);function N(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(A(n)&&typeof O==`function`&&(n=O(n._payload)),a.isValidElement(n)){let e=L(n),i=I(r,n.props);return n.type!==a.Fragment&&(i.ref=t?E(t,e):e),a.cloneElement(n,i)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var P=Symbol(`radix.slottable`);function F(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===P}function I(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function L(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var R=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,z=t,B=((e,t)=>n=>{if(t?.variants==null)return z(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=R(t)||R(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return z(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex items-center justify-center gap-2 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{solid:`bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover`,tonal:`bg-wx-bg-elevated text-wx-fg hover:bg-wx-bg-elevated-2`,ghost:`bg-transparent text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`,outline:`border border-wx-border bg-transparent text-wx-fg hover:bg-wx-bg-elevated`},size:{sm:`h-8 px-3 text-xs rounded-wx-sm whitespace-nowrap`,md:`h-10 px-4 text-sm rounded-wx whitespace-nowrap`,lg:`h-12 px-5 text-sm rounded-wx-lg whitespace-nowrap`,tile:`w-full px-5 py-5 text-base rounded-wx-lg`,icon:`h-9 w-9 rounded-full whitespace-nowrap`}},defaultVariants:{variant:`solid`,size:`md`}}),V=a.forwardRef(({className:t,variant:n,size:r,asChild:i=!1,...a},s)=>o(i?M:`button`,{ref:s,className:e(B({variant:n,size:r,className:t})),...a}));V.displayName=`Button`;export{d as a,g as c,f as d,S as f,l as i,w as l,j as n,b as o,v as p,c as r,m as s,V as t,u};
|
|
163
|
+
//# sourceMappingURL=widget-react-DyHOzlxL.js.map
|