@piedata/pieui 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +361697 -0
  4. package/dist/components/Buttons/AjaxButtonCard/index.d.ts +2 -0
  5. package/dist/components/Buttons/AjaxButtonCard/index.d.ts.map +1 -0
  6. package/dist/components/Buttons/AjaxButtonCard/types/index.d.ts +15 -0
  7. package/dist/components/Buttons/AjaxButtonCard/types/index.d.ts.map +1 -0
  8. package/dist/components/Buttons/AjaxButtonCard/ui/AjaxButtonCard.d.ts +4 -0
  9. package/dist/components/Buttons/AjaxButtonCard/ui/AjaxButtonCard.d.ts.map +1 -0
  10. package/dist/components/Chats/ChatCard/index.d.ts +2 -0
  11. package/dist/components/Chats/ChatCard/index.d.ts.map +1 -0
  12. package/dist/components/Chats/ChatCard/types/index.d.ts +43 -0
  13. package/dist/components/Chats/ChatCard/types/index.d.ts.map +1 -0
  14. package/dist/components/Chats/ChatCard/ui/ChatCard.d.ts +4 -0
  15. package/dist/components/Chats/ChatCard/ui/ChatCard.d.ts.map +1 -0
  16. package/dist/components/Chats/ChatCard/ui/components/AttachFileButton.d.ts +11 -0
  17. package/dist/components/Chats/ChatCard/ui/components/AttachFileButton.d.ts.map +1 -0
  18. package/dist/components/Chats/ChatCard/ui/components/AttachedFileView.d.ts +7 -0
  19. package/dist/components/Chats/ChatCard/ui/components/AttachedFileView.d.ts.map +1 -0
  20. package/dist/components/Chats/ChatCard/ui/components/ChatCardInput.d.ts +22 -0
  21. package/dist/components/Chats/ChatCard/ui/components/ChatCardInput.d.ts.map +1 -0
  22. package/dist/components/Chats/ChatCard/ui/components/ChatOption.d.ts +7 -0
  23. package/dist/components/Chats/ChatCard/ui/components/ChatOption.d.ts.map +1 -0
  24. package/dist/components/Chats/ChatCard/ui/components/Markdown.d.ts +6 -0
  25. package/dist/components/Chats/ChatCard/ui/components/Markdown.d.ts.map +1 -0
  26. package/dist/components/Chats/ChatCard/ui/components/MessageAvatar.d.ts +6 -0
  27. package/dist/components/Chats/ChatCard/ui/components/MessageAvatar.d.ts.map +1 -0
  28. package/dist/components/Chats/ChatCard/ui/components/MessageCard.d.ts +9 -0
  29. package/dist/components/Chats/ChatCard/ui/components/MessageCard.d.ts.map +1 -0
  30. package/dist/components/Chats/ChatCard/ui/components/MessageContent.d.ts +7 -0
  31. package/dist/components/Chats/ChatCard/ui/components/MessageContent.d.ts.map +1 -0
  32. package/dist/components/Chats/ChatCard/ui/components/MessagesBoard.d.ts +17 -0
  33. package/dist/components/Chats/ChatCard/ui/components/MessagesBoard.d.ts.map +1 -0
  34. package/dist/components/Chats/ChatCard/ui/components/Options.d.ts +7 -0
  35. package/dist/components/Chats/ChatCard/ui/components/Options.d.ts.map +1 -0
  36. package/dist/components/Chats/ChatCard/ui/components/ResizableTextarea.d.ts +3 -0
  37. package/dist/components/Chats/ChatCard/ui/components/ResizableTextarea.d.ts.map +1 -0
  38. package/dist/components/Chats/ChatCard/ui/components/SendButton.d.ts +4 -0
  39. package/dist/components/Chats/ChatCard/ui/components/SendButton.d.ts.map +1 -0
  40. package/dist/components/Chats/ChatCard/ui/components/VoiceListeningButton.d.ts +8 -0
  41. package/dist/components/Chats/ChatCard/ui/components/VoiceListeningButton.d.ts.map +1 -0
  42. package/dist/components/Chats/ChatCard/ui/components/icons/AttachFileIcon.d.ts +3 -0
  43. package/dist/components/Chats/ChatCard/ui/components/icons/AttachFileIcon.d.ts.map +1 -0
  44. package/dist/components/Chats/ChatCard/ui/components/icons/AttachedFileIcon.d.ts +3 -0
  45. package/dist/components/Chats/ChatCard/ui/components/icons/AttachedFileIcon.d.ts.map +1 -0
  46. package/dist/components/Chats/ChatCard/ui/components/icons/CancelFileIcon.d.ts +3 -0
  47. package/dist/components/Chats/ChatCard/ui/components/icons/CancelFileIcon.d.ts.map +1 -0
  48. package/dist/components/Chats/ChatCard/ui/components/icons/DefaultAvatar.d.ts +3 -0
  49. package/dist/components/Chats/ChatCard/ui/components/icons/DefaultAvatar.d.ts.map +1 -0
  50. package/dist/components/Chats/ChatCard/ui/components/icons/SendIcon.d.ts +3 -0
  51. package/dist/components/Chats/ChatCard/ui/components/icons/SendIcon.d.ts.map +1 -0
  52. package/dist/components/Chats/ChatCard/ui/components/icons/VoiceRecordIcon.d.ts +3 -0
  53. package/dist/components/Chats/ChatCard/ui/components/icons/VoiceRecordIcon.d.ts.map +1 -0
  54. package/dist/components/Containers/AjaxGroupCard/index.d.ts +2 -0
  55. package/dist/components/Containers/AjaxGroupCard/index.d.ts.map +1 -0
  56. package/dist/components/Containers/AjaxGroupCard/types/index.d.ts +14 -0
  57. package/dist/components/Containers/AjaxGroupCard/types/index.d.ts.map +1 -0
  58. package/dist/components/Containers/AjaxGroupCard/ui/AjaxGroupCard.d.ts +5 -0
  59. package/dist/components/Containers/AjaxGroupCard/ui/AjaxGroupCard.d.ts.map +1 -0
  60. package/dist/components/Containers/SequenceCard/index.d.ts +2 -0
  61. package/dist/components/Containers/SequenceCard/index.d.ts.map +1 -0
  62. package/dist/components/Containers/SequenceCard/types/index.d.ts +9 -0
  63. package/dist/components/Containers/SequenceCard/types/index.d.ts.map +1 -0
  64. package/dist/components/Containers/SequenceCard/ui/SequenceCard.d.ts +4 -0
  65. package/dist/components/Containers/SequenceCard/ui/SequenceCard.d.ts.map +1 -0
  66. package/dist/components/Containers/UnionCard/index.d.ts +2 -0
  67. package/dist/components/Containers/UnionCard/index.d.ts.map +1 -0
  68. package/dist/components/Containers/UnionCard/types/index.d.ts +7 -0
  69. package/dist/components/Containers/UnionCard/types/index.d.ts.map +1 -0
  70. package/dist/components/Containers/UnionCard/ui/UnionCard.d.ts +4 -0
  71. package/dist/components/Containers/UnionCard/ui/UnionCard.d.ts.map +1 -0
  72. package/dist/components/PieBaseRoot/index.d.ts +5 -0
  73. package/dist/components/PieBaseRoot/index.d.ts.map +1 -0
  74. package/dist/components/PieBaseRoot/types/index.d.ts +6 -0
  75. package/dist/components/PieBaseRoot/types/index.d.ts.map +1 -0
  76. package/dist/components/PieCard/index.d.ts +4 -0
  77. package/dist/components/PieCard/index.d.ts.map +1 -0
  78. package/dist/components/PieCard/types/index.d.ts +16 -0
  79. package/dist/components/PieCard/types/index.d.ts.map +1 -0
  80. package/dist/components/PieRoot/index.d.ts +5 -0
  81. package/dist/components/PieRoot/index.d.ts.map +1 -0
  82. package/dist/components/PieRoot/types/index.d.ts +10 -0
  83. package/dist/components/PieRoot/types/index.d.ts.map +1 -0
  84. package/dist/components/PieStaticRoot/index.d.ts +5 -0
  85. package/dist/components/PieStaticRoot/index.d.ts.map +1 -0
  86. package/dist/components/PieStaticRoot/types/index.d.ts +7 -0
  87. package/dist/components/PieStaticRoot/types/index.d.ts.map +1 -0
  88. package/dist/components/PieTelegramRoot/index.d.ts +5 -0
  89. package/dist/components/PieTelegramRoot/index.d.ts.map +1 -0
  90. package/dist/components/UI/index.d.ts +8 -0
  91. package/dist/components/UI/index.d.ts.map +1 -0
  92. package/dist/components/index.d.ts +7 -0
  93. package/dist/components/index.d.ts.map +1 -0
  94. package/dist/components/index.esm.js +35 -0
  95. package/dist/components/index.js +48 -0
  96. package/dist/config/constant.d.ts +10 -0
  97. package/dist/config/constant.d.ts.map +1 -0
  98. package/dist/index.d.ts +10 -0
  99. package/dist/index.d.ts.map +1 -0
  100. package/dist/index.esm.js +40 -0
  101. package/dist/index.js +65 -0
  102. package/dist/pieui.components.json +364 -0
  103. package/dist/providers/CentrifugeIOInitProvider.d.ts +6 -0
  104. package/dist/providers/CentrifugeIOInitProvider.d.ts.map +1 -0
  105. package/dist/providers/SocketIOInitProvider.d.ts +6 -0
  106. package/dist/providers/SocketIOInitProvider.d.ts.map +1 -0
  107. package/dist/types/index.d.ts +103 -0
  108. package/dist/types/index.d.ts.map +1 -0
  109. package/dist/util/ajaxCommonUtils.d.ts +4 -0
  110. package/dist/util/ajaxCommonUtils.d.ts.map +1 -0
  111. package/dist/util/axiosWithCache.d.ts +3 -0
  112. package/dist/util/axiosWithCache.d.ts.map +1 -0
  113. package/dist/util/centrifuge.d.ts +5 -0
  114. package/dist/util/centrifuge.d.ts.map +1 -0
  115. package/dist/util/fallback.d.ts +4 -0
  116. package/dist/util/fallback.d.ts.map +1 -0
  117. package/dist/util/globalForm.d.ts +3 -0
  118. package/dist/util/globalForm.d.ts.map +1 -0
  119. package/dist/util/initializeComponents.d.ts +18 -0
  120. package/dist/util/initializeComponents.d.ts.map +1 -0
  121. package/dist/util/lazy.d.ts +6 -0
  122. package/dist/util/lazy.d.ts.map +1 -0
  123. package/dist/util/mitt.d.ts +7 -0
  124. package/dist/util/mitt.d.ts.map +1 -0
  125. package/dist/util/queryClient.d.ts +3 -0
  126. package/dist/util/queryClient.d.ts.map +1 -0
  127. package/dist/util/registry.d.ts +11 -0
  128. package/dist/util/registry.d.ts.map +1 -0
  129. package/dist/util/socket.d.ts +5 -0
  130. package/dist/util/socket.d.ts.map +1 -0
  131. package/dist/util/sx2radium.d.ts +3 -0
  132. package/dist/util/sx2radium.d.ts.map +1 -0
  133. package/dist/util/tailwindCommonUtils.d.ts +3 -0
  134. package/dist/util/tailwindCommonUtils.d.ts.map +1 -0
  135. package/dist/util/useBodyStyles.d.ts +5 -0
  136. package/dist/util/useBodyStyles.d.ts.map +1 -0
  137. package/dist/util/useImage.d.ts +5 -0
  138. package/dist/util/useImage.d.ts.map +1 -0
  139. package/dist/util/useIsSupported.d.ts +2 -0
  140. package/dist/util/useIsSupported.d.ts.map +1 -0
  141. package/dist/util/useOpenAIWebRTC.d.ts +14 -0
  142. package/dist/util/useOpenAIWebRTC.d.ts.map +1 -0
  143. package/dist/util/useScreenSize.d.ts +6 -0
  144. package/dist/util/useScreenSize.d.ts.map +1 -0
  145. package/dist/util/useTitle.d.ts +2 -0
  146. package/dist/util/useTitle.d.ts.map +1 -0
  147. package/dist/util/useWebApp.d.ts +4 -0
  148. package/dist/util/useWebApp.d.ts.map +1 -0
  149. package/dist/util/waitForSidAvailable.d.ts +3 -0
  150. package/dist/util/waitForSidAvailable.d.ts.map +1 -0
  151. package/dist/util/webrtcClient.d.ts +32 -0
  152. package/dist/util/webrtcClient.d.ts.map +1 -0
  153. package/package.json +95 -0
@@ -0,0 +1,35 @@
1
+ var hQ=Object.create;var{getPrototypeOf:yQ,defineProperty:g2,getOwnPropertyNames:vQ}=Object;var kQ=Object.prototype.hasOwnProperty;var u=($,Z,J)=>{J=$!=null?hQ(yQ($)):{};let H=Z||!$||!$.__esModule?g2(J,"default",{value:$,enumerable:!0}):J;for(let X of vQ($))if(!kQ.call(H,X))g2(H,X,{get:()=>$[X],enumerable:!0});return H};var j=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var b2=($,Z)=>{for(var J in Z)g2($,J,{get:Z[J],enumerable:!0,configurable:!0,set:(H)=>Z[J]=()=>H})};var mQ=($,Z)=>()=>($&&(Z=$($=0)),Z);var Y9=j((O$)=>{Object.defineProperty(O$,"__esModule",{value:!0});O$.Doctype=O$.CDATA=O$.Tag=O$.Style=O$.Script=O$.Comment=O$.Directive=O$.Text=O$.Root=O$.isTag=O$.ElementType=void 0;var S1;(function($){$.Root="root",$.Text="text",$.Directive="directive",$.Comment="comment",$.Script="script",$.Style="style",$.Tag="tag",$.CDATA="cdata",$.Doctype="doctype"})(S1=O$.ElementType||(O$.ElementType={}));function LG($){return $.type===S1.Tag||$.type===S1.Script||$.type===S1.Style}O$.isTag=LG;O$.Root=S1.Root;O$.Text=S1.Text;O$.Directive=S1.Directive;O$.Comment=S1.Comment;O$.Script=S1.Script;O$.Style=S1.Style;O$.Tag=S1.Tag;O$.CDATA=S1.CDATA;O$.Doctype=S1.Doctype});var K9=j((k)=>{var X0=k&&k.__extends||function(){var $=function(Z,J){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,X){H.__proto__=X}||function(H,X){for(var Q in X)if(Object.prototype.hasOwnProperty.call(X,Q))H[Q]=X[Q]},$(Z,J)};return function(Z,J){if(typeof J!=="function"&&J!==null)throw TypeError("Class extends value "+String(J)+" is not a constructor or null");$(Z,J);function H(){this.constructor=Z}Z.prototype=J===null?Object.create(J):(H.prototype=J.prototype,new H)}}(),N5=k&&k.__assign||function(){return N5=Object.assign||function($){for(var Z,J=1,H=arguments.length;J<H;J++){Z=arguments[J];for(var X in Z)if(Object.prototype.hasOwnProperty.call(Z,X))$[X]=Z[X]}return $},N5.apply(this,arguments)};Object.defineProperty(k,"__esModule",{value:!0});k.cloneNode=k.hasChildren=k.isDocument=k.isDirective=k.isComment=k.isText=k.isCDATA=k.isTag=k.Element=k.Document=k.CDATA=k.NodeWithChildren=k.ProcessingInstruction=k.Comment=k.Text=k.DataNode=k.Node=void 0;var P1=Y9(),W9=function(){function $(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty($.prototype,"parentNode",{get:function(){return this.parent},set:function(Z){this.parent=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"previousSibling",{get:function(){return this.prev},set:function(Z){this.prev=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"nextSibling",{get:function(){return this.next},set:function(Z){this.next=Z},enumerable:!1,configurable:!0}),$.prototype.cloneNode=function(Z){if(Z===void 0)Z=!1;return U9(this,Z)},$}();k.Node=W9;var R6=function($){X0(Z,$);function Z(J){var H=$.call(this)||this;return H.data=J,H}return Object.defineProperty(Z.prototype,"nodeValue",{get:function(){return this.data},set:function(J){this.data=J},enumerable:!1,configurable:!0}),Z}(W9);k.DataNode=R6;var R$=function($){X0(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=P1.ElementType.Text,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Z}(R6);k.Text=R$;var V$=function($){X0(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=P1.ElementType.Comment,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Z}(R6);k.Comment=V$;var N$=function($){X0(Z,$);function Z(J,H){var X=$.call(this,H)||this;return X.name=J,X.type=P1.ElementType.Directive,X}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Z}(R6);k.ProcessingInstruction=N$;var V6=function($){X0(Z,$);function Z(J){var H=$.call(this)||this;return H.children=J,H}return Object.defineProperty(Z.prototype,"firstChild",{get:function(){var J;return(J=this.children[0])!==null&&J!==void 0?J:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"childNodes",{get:function(){return this.children},set:function(J){this.children=J},enumerable:!1,configurable:!0}),Z}(W9);k.NodeWithChildren=V6;var I$=function($){X0(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=P1.ElementType.CDATA,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),Z}(V6);k.CDATA=I$;var T$=function($){X0(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=P1.ElementType.Root,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Z}(V6);k.Document=T$;var P$=function($){X0(Z,$);function Z(J,H,X,Q){if(X===void 0)X=[];if(Q===void 0)Q=J==="script"?P1.ElementType.Script:J==="style"?P1.ElementType.Style:P1.ElementType.Tag;var Y=$.call(this,X)||this;return Y.name=J,Y.attribs=H,Y.type=Q,Y}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"tagName",{get:function(){return this.name},set:function(J){this.name=J},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"attributes",{get:function(){var J=this;return Object.keys(this.attribs).map(function(H){var X,Q;return{name:H,value:J.attribs[H],namespace:(X=J["x-attribsNamespace"])===null||X===void 0?void 0:X[H],prefix:(Q=J["x-attribsPrefix"])===null||Q===void 0?void 0:Q[H]}})},enumerable:!1,configurable:!0}),Z}(V6);k.Element=P$;function w$($){return(0,P1.isTag)($)}k.isTag=w$;function _$($){return $.type===P1.ElementType.CDATA}k.isCDATA=_$;function C$($){return $.type===P1.ElementType.Text}k.isText=C$;function S$($){return $.type===P1.ElementType.Comment}k.isComment=S$;function j$($){return $.type===P1.ElementType.Directive}k.isDirective=j$;function E$($){return $.type===P1.ElementType.Root}k.isDocument=E$;function NG($){return Object.prototype.hasOwnProperty.call($,"children")}k.hasChildren=NG;function U9($,Z){if(Z===void 0)Z=!1;var J;if(C$($))J=new R$($.data);else if(S$($))J=new V$($.data);else if(w$($)){var H=Z?G9($.children):[],X=new P$($.name,N5({},$.attribs),H);if(H.forEach(function(W){return W.parent=X}),$.namespace!=null)X.namespace=$.namespace;if($["x-attribsNamespace"])X["x-attribsNamespace"]=N5({},$["x-attribsNamespace"]);if($["x-attribsPrefix"])X["x-attribsPrefix"]=N5({},$["x-attribsPrefix"]);J=X}else if(_$($)){var H=Z?G9($.children):[],Q=new I$(H);H.forEach(function(K){return K.parent=Q}),J=Q}else if(E$($)){var H=Z?G9($.children):[],Y=new T$(H);if(H.forEach(function(K){return K.parent=Y}),$["x-mode"])Y["x-mode"]=$["x-mode"];J=Y}else if(j$($)){var G=new N$($.name,$.data);if($["x-name"]!=null)G["x-name"]=$["x-name"],G["x-publicId"]=$["x-publicId"],G["x-systemId"]=$["x-systemId"];J=G}else throw Error("Not implemented yet: ".concat($.type));if(J.startIndex=$.startIndex,J.endIndex=$.endIndex,$.sourceCodeLocation!=null)J.sourceCodeLocation=$.sourceCodeLocation;return J}k.cloneNode=U9;function G9($){var Z=$.map(function(H){return U9(H,!0)});for(var J=1;J<Z.length;J++)Z[J].prev=Z[J-1],Z[J-1].next=Z[J];return Z}});var L9=j((d1)=>{var IG=d1&&d1.__createBinding||(Object.create?function($,Z,J,H){if(H===void 0)H=J;var X=Object.getOwnPropertyDescriptor(Z,J);if(!X||("get"in X?!Z.__esModule:X.writable||X.configurable))X={enumerable:!0,get:function(){return Z[J]}};Object.defineProperty($,H,X)}:function($,Z,J,H){if(H===void 0)H=J;$[H]=Z[J]}),TG=d1&&d1.__exportStar||function($,Z){for(var J in $)if(J!=="default"&&!Object.prototype.hasOwnProperty.call(Z,J))IG(Z,$,J)};Object.defineProperty(d1,"__esModule",{value:!0});d1.DomHandler=void 0;var q9=Y9(),Q0=K9();TG(K9(),d1);var x$={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},g$=function(){function $(Z,J,H){if(this.dom=[],this.root=new Q0.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof J==="function")H=J,J=x$;if(typeof Z==="object")J=Z,Z=void 0;this.callback=Z!==null&&Z!==void 0?Z:null,this.options=J!==null&&J!==void 0?J:x$,this.elementCB=H!==null&&H!==void 0?H:null}return $.prototype.onparserinit=function(Z){this.parser=Z},$.prototype.onreset=function(){this.dom=[],this.root=new Q0.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},$.prototype.onend=function(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)},$.prototype.onerror=function(Z){this.handleCallback(Z)},$.prototype.onclosetag=function(){this.lastNode=null;var Z=this.tagStack.pop();if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(Z)},$.prototype.onopentag=function(Z,J){var H=this.options.xmlMode?q9.ElementType.Tag:void 0,X=new Q0.Element(Z,J,void 0,H);this.addNode(X),this.tagStack.push(X)},$.prototype.ontext=function(Z){var J=this.lastNode;if(J&&J.type===q9.ElementType.Text){if(J.data+=Z,this.options.withEndIndices)J.endIndex=this.parser.endIndex}else{var H=new Q0.Text(Z);this.addNode(H),this.lastNode=H}},$.prototype.oncomment=function(Z){if(this.lastNode&&this.lastNode.type===q9.ElementType.Comment){this.lastNode.data+=Z;return}var J=new Q0.Comment(Z);this.addNode(J),this.lastNode=J},$.prototype.oncommentend=function(){this.lastNode=null},$.prototype.oncdatastart=function(){var Z=new Q0.Text(""),J=new Q0.CDATA([Z]);this.addNode(J),Z.parent=J,this.lastNode=Z},$.prototype.oncdataend=function(){this.lastNode=null},$.prototype.onprocessinginstruction=function(Z,J){var H=new Q0.ProcessingInstruction(Z,J);this.addNode(H)},$.prototype.handleCallback=function(Z){if(typeof this.callback==="function")this.callback(Z,this.dom);else if(Z)throw Z},$.prototype.addNode=function(Z){var J=this.tagStack[this.tagStack.length-1],H=J.children[J.children.length-1];if(this.options.withStartIndices)Z.startIndex=this.parser.startIndex;if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(J.children.push(Z),H)Z.prev=H,H.next=Z;Z.parent=J,this.lastNode=null},$}();d1.DomHandler=g$;d1.default=g$});var m$=j((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});b$.CARRIAGE_RETURN_PLACEHOLDER_REGEX=b$.CARRIAGE_RETURN_PLACEHOLDER=b$.CARRIAGE_RETURN_REGEX=b$.CARRIAGE_RETURN=b$.CASE_SENSITIVE_TAG_NAMES_MAP=b$.CASE_SENSITIVE_TAG_NAMES=void 0;b$.CASE_SENSITIVE_TAG_NAMES=["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"];b$.CASE_SENSITIVE_TAG_NAMES_MAP=b$.CASE_SENSITIVE_TAG_NAMES.reduce(function($,Z){return $[Z.toLowerCase()]=Z,$},{});b$.CARRIAGE_RETURN="\r";b$.CARRIAGE_RETURN_REGEX=new RegExp(b$.CARRIAGE_RETURN,"g");b$.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__");b$.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(b$.CARRIAGE_RETURN_PLACEHOLDER,"g")});var M9=j((l$)=>{Object.defineProperty(l$,"__esModule",{value:!0});l$.formatAttributes=f$;l$.escapeSpecialCharacters=SG;l$.revertEscapedCharacters=u$;l$.formatDOM=p$;var N6=L9(),I5=m$();function _G($){return I5.CASE_SENSITIVE_TAG_NAMES_MAP[$]}function f$($){var Z={},J=0,H=$.length;for(;J<H;J++){var X=$[J];Z[X.name]=X.value}return Z}function CG($){$=$.toLowerCase();var Z=_G($);if(Z)return Z;return $}function SG($){return $.replace(I5.CARRIAGE_RETURN_REGEX,I5.CARRIAGE_RETURN_PLACEHOLDER)}function u$($){return $.replace(I5.CARRIAGE_RETURN_PLACEHOLDER_REGEX,I5.CARRIAGE_RETURN)}function p$($,Z,J){if(Z===void 0)Z=null;var H=[],X,Q=0,Y=$.length;for(;Q<Y;Q++){var G=$[Q];switch(G.nodeType){case 1:{var W=CG(G.nodeName);X=new N6.Element(W,f$(G.attributes)),X.children=p$(W==="template"?G.content.childNodes:G.childNodes,X);break}case 3:X=new N6.Text(u$(G.nodeValue));break;case 8:X=new N6.Comment(G.nodeValue);break;default:continue}var K=H[Q-1]||null;if(K)K.next=X;X.parent=Z,X.prev=K,X.next=null,H.push(X)}if(J){if(X=new N6.ProcessingInstruction(J.substring(0,J.indexOf(" ")).toLowerCase(),J),X.next=H[0]||null,X.parent=Z,H.unshift(X),H[1])H[1].prev=H[0]}return H}});var s$=j((n$)=>{Object.defineProperty(n$,"__esModule",{value:!0});n$.default=yG;var bG=M9(),i$="html",d$="head",I6="body",hG=/<([a-zA-Z]+[0-9]?)/,c$=/<head[^]*>/i,r$=/<body[^]*>/i,P6=function($,Z){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},B9=function($,Z){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},a$=typeof window==="object"&&window.DOMParser;if(typeof a$==="function")F9=new a$,z9="text/html",B9=function($,Z){if(Z)$="<".concat(Z,">").concat($,"</").concat(Z,">");return F9.parseFromString($,z9)},P6=B9;var F9,z9;if(typeof document==="object"&&document.implementation)k0=document.implementation.createHTMLDocument(),P6=function($,Z){if(Z){var J=k0.documentElement.querySelector(Z);if(J)J.innerHTML=$;return k0}return k0.documentElement.innerHTML=$,k0};var k0,T6=typeof document==="object"&&document.createElement("template"),A9;if(T6&&T6.content)A9=function($){return T6.innerHTML=$,T6.content.childNodes};function yG($){var Z,J;$=(0,bG.escapeSpecialCharacters)($);var H=$.match(hG),X=H&&H[1]?H[1].toLowerCase():"";switch(X){case i$:{var Q=B9($);if(!c$.test($)){var Y=Q.querySelector(d$);(Z=Y===null||Y===void 0?void 0:Y.parentNode)===null||Z===void 0||Z.removeChild(Y)}if(!r$.test($)){var Y=Q.querySelector(I6);(J=Y===null||Y===void 0?void 0:Y.parentNode)===null||J===void 0||J.removeChild(Y)}return Q.querySelectorAll(i$)}case d$:case I6:{var G=P6($).querySelectorAll(X);if(r$.test($)&&c$.test($))return G[0].parentNode.childNodes;return G}default:{if(A9)return A9($);var Y=P6($,I6).querySelector(I6);return Y.childNodes}}}});var o$=j((T5)=>{var kG=T5&&T5.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(T5,"__esModule",{value:!0});T5.default=pG;var mG=kG(s$()),fG=M9(),uG=/<(![a-zA-Z\s]+)>/;function pG($){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];var Z=$.match(uG),J=Z?Z[1]:void 0;return(0,fG.formatDOM)((0,mG.default)($),null,J)}});var t$=j((dG)=>{var lG=0;dG.SAME=lG;var iG=1;dG.CAMELCASE=iG;dG.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}});var $3=j((XW)=>{function nG($){return q1.hasOwnProperty($)?q1[$]:null}function R1($,Z,J,H,X,Q,Y){this.acceptsBooleans=Z===2||Z===3||Z===4,this.attributeName=H,this.attributeNamespace=X,this.mustUseProperty=J,this.propertyName=$,this.type=Z,this.sanitizeURL=Q,this.removeEmptyString=Y}var q1={},sG=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];sG.forEach(($)=>{q1[$]=new R1($,0,!1,$,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([$,Z])=>{q1[$]=new R1($,1,!1,Z,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(($)=>{q1[$]=new R1($,2,!1,$.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(($)=>{q1[$]=new R1($,2,!1,$,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(($)=>{q1[$]=new R1($,3,!1,$.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(($)=>{q1[$]=new R1($,3,!0,$,null,!1,!1)});["capture","download"].forEach(($)=>{q1[$]=new R1($,4,!1,$,null,!1,!1)});["cols","rows","size","span"].forEach(($)=>{q1[$]=new R1($,6,!1,$,null,!1,!1)});["rowSpan","start"].forEach(($)=>{q1[$]=new R1($,5,!1,$.toLowerCase(),null,!1,!1)});var O9=/[\-\:]([a-z])/g,D9=($)=>$[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"].forEach(($)=>{let Z=$.replace(O9,D9);q1[Z]=new R1(Z,1,!1,$,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(($)=>{let Z=$.replace(O9,D9);q1[Z]=new R1(Z,1,!1,$,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(($)=>{let Z=$.replace(O9,D9);q1[Z]=new R1(Z,1,!1,$,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(($)=>{q1[$]=new R1($,1,!1,$.toLowerCase(),null,!1,!1)});var oG="xlinkHref";q1[oG]=new R1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(($)=>{q1[$]=new R1($,1,!1,$.toLowerCase(),null,!0,!0)});var{CAMELCASE:tG,SAME:eG,possibleStandardNames:e$}=t$(),$W=":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",ZW=$W+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",JW=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+ZW+"]*$")),HW=Object.keys(e$).reduce(($,Z)=>{let J=e$[Z];if(J===eG)$[Z]=Z;else if(J===tG)$[Z.toLowerCase()]=Z;else $[Z]=J;return $},{});XW.BOOLEAN=3;XW.BOOLEANISH_STRING=2;XW.NUMERIC=5;XW.OVERLOADED_BOOLEAN=4;XW.POSITIVE_NUMERIC=6;XW.RESERVED=0;XW.STRING=1;XW.getPropertyInfo=nG;XW.isCustomAttribute=JW;XW.possibleStandardNames=HW});var Y3=j((GV,Q3)=>{var Z3=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,FW=/\n/g,zW=/^\s*/,AW=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,OW=/^:\s*/,DW=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,RW=/^[;\s]*/,VW=/^\s+|\s+$/g,NW=`
2
+ `,J3="/",H3="*",N0="",IW="comment",TW="declaration";function PW($,Z){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];Z=Z||{};var J=1,H=1;function X(A){var O=A.match(FW);if(O)J+=O.length;var I=A.lastIndexOf(NW);H=~I?A.length-I:H+A.length}function Q(){var A={line:J,column:H};return function(O){return O.position=new Y(A),K(),O}}function Y(A){this.start=A,this.end={line:J,column:H},this.source=Z.source}Y.prototype.content=$;function G(A){var O=Error(Z.source+":"+J+":"+H+": "+A);if(O.reason=A,O.filename=Z.source,O.line=J,O.column=H,O.source=$,Z.silent);else throw O}function W(A){var O=A.exec($);if(!O)return;var I=O[0];return X(I),$=$.slice(I.length),O}function K(){W(zW)}function U(A){var O;A=A||[];while(O=L())if(O!==!1)A.push(O);return A}function L(){var A=Q();if(J3!=$.charAt(0)||H3!=$.charAt(1))return;var O=2;while(N0!=$.charAt(O)&&(H3!=$.charAt(O)||J3!=$.charAt(O+1)))++O;if(O+=2,N0===$.charAt(O-1))return G("End of comment missing");var I=$.slice(2,O-2);return H+=2,X(I),$=$.slice(O),H+=2,A({type:IW,comment:I})}function M(){var A=Q(),O=W(AW);if(!O)return;if(L(),!W(OW))return G("property missing ':'");var I=W(DW),V=A({type:TW,property:X3(O[0].replace(Z3,N0)),value:I?X3(I[0].replace(Z3,N0)):N0});return W(RW),V}function q(){var A=[];U(A);var O;while(O=M())if(O!==!1)A.push(O),U(A);return A}return K(),q()}function X3($){return $?$.replace(VW,N0):N0}Q3.exports=PW});var G3=j((P5)=>{var wW=P5&&P5.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(P5,"__esModule",{value:!0});P5.default=CW;var _W=wW(Y3());function CW($,Z){let J=null;if(!$||typeof $!=="string")return J;let H=(0,_W.default)($),X=typeof Z==="function";return H.forEach((Q)=>{if(Q.type!=="declaration")return;let{property:Y,value:G}=Q;if(X)Z(Y,G,Q);else if(G)J=J||{},J[Y]=G}),J}});var q3=j((U3)=>{Object.defineProperty(U3,"__esModule",{value:!0});U3.camelCase=void 0;var SW=/^--[a-zA-Z0-9_-]+$/,jW=/-([a-z])/g,EW=/^[^-]+$/,xW=/^-(webkit|moz|ms|o|khtml)-/,gW=/^-(ms)-/,bW=function($){return!$||EW.test($)||SW.test($)},hW=function($,Z){return Z.toUpperCase()},W3=function($,Z){return"".concat(Z,"-")},yW=function($,Z){if(Z===void 0)Z={};if(bW($))return $;if($=$.toLowerCase(),Z.reactCompat)$=$.replace(gW,W3);else $=$.replace(xW,W3);return $.replace(jW,hW)};U3.camelCase=yW});var N9=j((V9,L3)=>{var vW=V9&&V9.__importDefault||function($){return $&&$.__esModule?$:{default:$}},kW=vW(G3()),mW=q3();function R9($,Z){var J={};if(!$||typeof $!=="string")return J;return(0,kW.default)($,function(H,X){if(H&&X)J[(0,mW.camelCase)(H,Z)]=X}),J}R9.default=R9;L3.exports=R9});import*as M3 from"react";var I9=j((V1)=>{var fW=V1&&V1.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(V1,"__esModule",{value:!0});V1.returnFirstArg=V1.canTextBeChildOfNode=V1.ELEMENTS_WITH_NO_TEXT_CHILDREN=V1.PRESERVE_CUSTOM_ATTRIBUTES=void 0;V1.isCustomComponent=lW;V1.setStyleProp=dW;var uW=fW(N9()),pW=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function lW($,Z){if(!$.includes("-"))return Boolean(Z&&typeof Z.is==="string");if(pW.has($))return!1;return!0}var iW={reactCompat:!0};function dW($,Z){if(typeof $!=="string")return;if(!$.trim()){Z.style={};return}try{Z.style=(0,uW.default)($,iW)}catch(J){Z.style={}}}V1.PRESERVE_CUSTOM_ATTRIBUTES=Number(M3.version.split(".")[0])>=16;V1.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var cW=function($){return!V1.ELEMENTS_WITH_NO_TEXT_CHILDREN.has($.name)};V1.canTextBeChildOfNode=cW;var rW=function($){return $};V1.returnFirstArg=rW});var T9=j((z3)=>{Object.defineProperty(z3,"__esModule",{value:!0});z3.default=oW;var w5=$3(),B3=I9(),aW=["checked","value"],nW=["input","select","textarea"],sW={reset:!0,submit:!0};function oW($,Z){if($===void 0)$={};var J={},H=Boolean($.type&&sW[$.type]);for(var X in $){var Q=$[X];if((0,w5.isCustomAttribute)(X)){J[X]=Q;continue}var Y=X.toLowerCase(),G=F3(Y);if(G){var W=(0,w5.getPropertyInfo)(G);if(aW.includes(G)&&nW.includes(Z)&&!H)G=F3("default"+Y);switch(J[G]=Q,W&&W.type){case w5.BOOLEAN:J[G]=!0;break;case w5.OVERLOADED_BOOLEAN:if(Q==="")J[G]=!0;break}continue}if(B3.PRESERVE_CUSTOM_ATTRIBUTES)J[X]=Q}return(0,B3.setStyleProp)($.style,J),J}function F3($){return w5.possibleStandardNames[$]}});import*as m0 from"react";var O3=j((C5)=>{var eW=C5&&C5.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(C5,"__esModule",{value:!0});C5.default=A3;var $U=eW(T9()),_5=I9(),ZU={cloneElement:m0.cloneElement,createElement:m0.createElement,isValidElement:m0.isValidElement};function A3($,Z){if(Z===void 0)Z={};var J=[],H=typeof Z.replace==="function",X=Z.transform||_5.returnFirstArg,Q=Z.library||ZU,Y=Q.cloneElement,G=Q.createElement,W=Q.isValidElement,K=$.length;for(var U=0;U<K;U++){var L=$[U];if(H){var M=Z.replace(L,U);if(W(M)){if(K>1)M=Y(M,{key:M.key||U});J.push(X(M,L,U));continue}}if(L.type==="text"){var q=!L.data.trim().length;if(q&&L.parent&&!(0,_5.canTextBeChildOfNode)(L.parent))continue;if(Z.trim&&q)continue;J.push(X(L.data,L,U));continue}var A=L,O={};if(JU(A))(0,_5.setStyleProp)(A.attribs.style,A.attribs),O=A.attribs;else if(A.attribs)O=(0,$U.default)(A.attribs,A.name);var I=void 0;switch(L.type){case"script":case"style":if(L.children[0])O.dangerouslySetInnerHTML={__html:L.children[0].data};break;case"tag":if(L.name==="textarea"&&L.children[0])O.defaultValue=L.children[0].data;else if(L.children&&L.children.length)I=A3(L.children,Z);break;default:continue}if(K>1)O.key=U;J.push(X(G(L.name,O,I),L,U))}return J.length===1?J[0]:J}function JU($){return _5.PRESERVE_CUSTOM_ATTRIBUTES&&$.type==="tag"&&(0,_5.isCustomComponent)($.name,$.attribs)}});var w9=j((G1)=>{var P9=G1&&G1.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(G1,"__esModule",{value:!0});G1.htmlToDOM=G1.domToReact=G1.attributesToProps=G1.Text=G1.ProcessingInstruction=G1.Element=G1.Comment=void 0;G1.default=QU;var D3=P9(o$());G1.htmlToDOM=D3.default;var HU=P9(T9());G1.attributesToProps=HU.default;var R3=P9(O3());G1.domToReact=R3.default;var w6=L9();Object.defineProperty(G1,"Comment",{enumerable:!0,get:function(){return w6.Comment}});Object.defineProperty(G1,"Element",{enumerable:!0,get:function(){return w6.Element}});Object.defineProperty(G1,"ProcessingInstruction",{enumerable:!0,get:function(){return w6.ProcessingInstruction}});Object.defineProperty(G1,"Text",{enumerable:!0,get:function(){return w6.Text}});var XU={lowerCaseAttributeNames:!1};function QU($,Z){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];return(0,R3.default)((0,D3.default)($,(Z===null||Z===void 0?void 0:Z.htmlparser2)||XU),Z)}});var tZ=j((o_,oZ)=>{var H2=Object.prototype.hasOwnProperty,sZ=Object.prototype.toString,iZ=Object.defineProperty,dZ=Object.getOwnPropertyDescriptor,cZ=function(Z){if(typeof Array.isArray==="function")return Array.isArray(Z);return sZ.call(Z)==="[object Array]"},rZ=function(Z){if(!Z||sZ.call(Z)!=="[object Object]")return!1;var J=H2.call(Z,"constructor"),H=Z.constructor&&Z.constructor.prototype&&H2.call(Z.constructor.prototype,"isPrototypeOf");if(Z.constructor&&!J&&!H)return!1;var X;for(X in Z);return typeof X>"u"||H2.call(Z,X)},aZ=function(Z,J){if(iZ&&J.name==="__proto__")iZ(Z,J.name,{enumerable:!0,configurable:!0,value:J.newValue,writable:!0});else Z[J.name]=J.newValue},nZ=function(Z,J){if(J==="__proto__"){if(!H2.call(Z,J))return;else if(dZ)return dZ(Z,J).value}return Z[J]};oZ.exports=function $(){var Z,J,H,X,Q,Y,G=arguments[0],W=1,K=arguments.length,U=!1;if(typeof G==="boolean")U=G,G=arguments[1]||{},W=2;if(G==null||typeof G!=="object"&&typeof G!=="function")G={};for(;W<K;++W)if(Z=arguments[W],Z!=null){for(J in Z)if(H=nZ(G,J),X=nZ(Z,J),G!==X){if(U&&X&&(rZ(X)||(Q=cZ(X)))){if(Q)Q=!1,Y=H&&cZ(H)?H:[];else Y=H&&rZ(H)?H:{};aZ(G,{name:J,newValue:$(U,Y,X)})}else if(typeof X<"u")aZ(G,{name:J,newValue:X})}}return G}});var DJ=j((IS,OJ)=>{var LL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";OJ.exports=LL});var IJ=j((TS,NJ)=>{var ML=DJ();function RJ(){}function VJ(){}VJ.resetWarningCache=RJ;NJ.exports=function(){function $(H,X,Q,Y,G,W){if(W===ML)return;var K=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}$.isRequired=$;function Z(){return $}var J={array:$,bigint:$,bool:$,func:$,number:$,object:$,string:$,symbol:$,any:$,arrayOf:Z,element:$,elementType:$,instanceOf:Z,node:$,objectOf:Z,oneOf:Z,oneOfType:Z,shape:Z,exact:Z,checkPropTypes:VJ,resetWarningCache:RJ};return J.PropTypes=J,J}});var w8=j((PS,TJ)=>{TJ.exports=IJ()();var BL,FL});function _L($){if(typeof $==="object"&&$!==null){var Z=$.$$typeof;switch(Z){case zL:switch($=$.type,$){case IL:case TL:case OL:case RL:case DL:case PL:return $;default:switch($=$&&$.$$typeof,$){case NL:case PJ:case wL:case wJ:case VL:return $;default:return Z}}case AL:return Z}}}var E1,zL,AL,OL,DL,RL,VL,NL,IL,TL,PJ,PL,wJ,wL,_8,C8=function($){return _L($)===wJ};var _J=mQ(()=>{E1=typeof Symbol==="function"&&Symbol.for,zL=E1?Symbol.for("react.element"):60103,AL=E1?Symbol.for("react.portal"):60106,OL=E1?Symbol.for("react.fragment"):60107,DL=E1?Symbol.for("react.strict_mode"):60108,RL=E1?Symbol.for("react.profiler"):60114,VL=E1?Symbol.for("react.provider"):60109,NL=E1?Symbol.for("react.context"):60110,IL=E1?Symbol.for("react.async_mode"):60111,TL=E1?Symbol.for("react.concurrent_mode"):60111,PJ=E1?Symbol.for("react.forward_ref"):60112,PL=E1?Symbol.for("react.suspense"):60113,wJ=E1?Symbol.for("react.memo"):60115,wL=E1?Symbol.for("react.lazy"):60116;_8=PJ});var S8=j((wS,gJ)=>{_J();var SL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},EL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xL={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},EJ={};EJ[_8]=EL;function CJ($){if(C8($))return xL;return EJ[$.$$typeof]||SL}var{defineProperty:gL,getOwnPropertyNames:bL,getOwnPropertySymbols:SJ,getOwnPropertyDescriptor:hL,getPrototypeOf:yL,prototype:jJ}=Object;function xJ($,Z,J){if(typeof Z!=="string"){if(jJ){var H=yL(Z);if(H&&H!==jJ)xJ($,H,J)}var X=bL(Z);if(SJ)X=X.concat(SJ(Z));var Q=CJ($),Y=CJ(Z);for(var G=0;G<X.length;++G){var W=X[G];if(!jL[W]&&!(J&&J[W])&&!(Y&&Y[W])&&!(Q&&Q[W])){var K=hL(Z,W);try{gL($,W,K)}catch(U){}}}return $}return $}gJ.exports=xJ});var W2=j((x8,hJ)=>{Object.defineProperty(x8,"__esModule",{value:!0});x8.default=uL;function uL($){return $.charAt(0).toUpperCase()+$.slice(1)}hJ.exports=x8.default});var vJ=j((g8,yJ)=>{Object.defineProperty(g8,"__esModule",{value:!0});g8.default=cL;var lL=W2(),iL=dL(lL);function dL($){return $&&$.__esModule?$:{default:$}}function cL($,Z,J){if($.hasOwnProperty(Z)){var H={},X=$[Z],Q=(0,iL.default)(Z),Y=Object.keys(J);for(var G=0;G<Y.length;G++){var W=Y[G];if(W===Z)for(var K=0;K<X.length;K++)H[X[K]+Q]=J[Z];H[W]=J[W]}return H}return J}yJ.exports=g8.default});var h8=j((b8,kJ)=>{Object.defineProperty(b8,"__esModule",{value:!0});b8.default=aL;function aL($,Z,J,H,X){for(var Q=0,Y=$.length;Q<Y;++Q){var G=$[Q](Z,J,H,X);if(G)return G}}kJ.exports=b8.default});var v8=j((y8,fJ)=>{Object.defineProperty(y8,"__esModule",{value:!0});y8.default=sL;function mJ($,Z){if($.indexOf(Z)===-1)$.push(Z)}function sL($,Z){if(Array.isArray(Z))for(var J=0,H=Z.length;J<H;++J)mJ($,Z[J]);else mJ($,Z)}fJ.exports=y8.default});var m8=j((k8,uJ)=>{Object.defineProperty(k8,"__esModule",{value:!0});k8.default=tL;function tL($){return $ instanceof Object&&!Array.isArray($)}uJ.exports=k8.default});var iJ=j((f8,lJ)=>{Object.defineProperty(f8,"__esModule",{value:!0});f8.default=GM;var $M=vJ(),ZM=U2($M),JM=h8(),pJ=U2(JM),HM=v8(),XM=U2(HM),QM=m8(),YM=U2(QM);function U2($){return $&&$.__esModule?$:{default:$}}function GM($){var{prefixMap:Z,plugins:J}=$;function H(X){for(var Q in X){var Y=X[Q];if((0,YM.default)(Y))X[Q]=H(Y);else if(Array.isArray(Y)){var G=[];for(var W=0,K=Y.length;W<K;++W){var U=(0,pJ.default)(J,Q,Y[W],X,Z);(0,XM.default)(G,U||Y[W])}if(G.length>0)X[Q]=G}else{var L=(0,pJ.default)(J,Q,Y,X,Z);if(L)X[Q]=L;X=(0,ZM.default)(Z,Q,X)}}return X}return H}lJ.exports=f8.default});var cJ=j((dJ,K2)=>{/*!
3
+ * Bowser - a browser detector
4
+ * https://github.com/ded/bowser
5
+ * MIT License | (c) Dustin Diaz 2015
6
+ */(function($,Z,J){if(typeof K2<"u"&&K2.exports)K2.exports=J();else if(typeof define=="function"&&define.amd)define(Z,J);else $[Z]=J()})(dJ,"bowser",function(){var $=!0;function Z(W){function K(B1){var B=W.match(B1);return B&&B.length>1&&B[1]||""}function U(B1){var B=W.match(B1);return B&&B.length>1&&B[2]||""}var L=K(/(ipod|iphone|ipad)/i).toLowerCase(),M=/like android/i.test(W),q=!M&&/android/i.test(W),A=/nexus\s*[0-6]\s*/i.test(W),O=!A&&/nexus\s*[0-9]+/i.test(W),I=/CrOS/.test(W),V=/silk/i.test(W),w=/sailfish/i.test(W),T=/tizen/i.test(W),_=/(web|hpw)(o|0)s/i.test(W),x=/windows phone/i.test(W),R=/SamsungBrowser/i.test(W),d=!x&&/windows/i.test(W),$1=!L&&!V&&/macintosh/i.test(W),i=!q&&!w&&!T&&!_&&/linux/i.test(W),r=U(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),l=K(/version\/(\d+(\.\d+)?)/i),c=/tablet/i.test(W)&&!/tablet pc/i.test(W),S=!c&&/[^-]mobi/i.test(W),m=/xbox/i.test(W),z;if(/opera/i.test(W))z={name:"Opera",opera:$,version:l||K(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)};else if(/opr\/|opios/i.test(W))z={name:"Opera",opera:$,version:K(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||l};else if(/SamsungBrowser/i.test(W))z={name:"Samsung Internet for Android",samsungBrowser:$,version:l||K(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/Whale/i.test(W))z={name:"NAVER Whale browser",whale:$,version:K(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)};else if(/MZBrowser/i.test(W))z={name:"MZ Browser",mzbrowser:$,version:K(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/coast/i.test(W))z={name:"Opera Coast",coast:$,version:l||K(/(?:coast)[\s\/](\d+(\.\d+)?)/i)};else if(/focus/i.test(W))z={name:"Focus",focus:$,version:K(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)};else if(/yabrowser/i.test(W))z={name:"Yandex Browser",yandexbrowser:$,version:l||K(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/ucbrowser/i.test(W))z={name:"UC Browser",ucbrowser:$,version:K(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/mxios/i.test(W))z={name:"Maxthon",maxthon:$,version:K(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)};else if(/epiphany/i.test(W))z={name:"Epiphany",epiphany:$,version:K(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)};else if(/puffin/i.test(W))z={name:"Puffin",puffin:$,version:K(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)};else if(/sleipnir/i.test(W))z={name:"Sleipnir",sleipnir:$,version:K(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)};else if(/k-meleon/i.test(W))z={name:"K-Meleon",kMeleon:$,version:K(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)};else if(x)if(z={name:"Windows Phone",osname:"Windows Phone",windowsphone:$},r)z.msedge=$,z.version=r;else z.msie=$,z.version=K(/iemobile\/(\d+(\.\d+)?)/i);else if(/msie|trident/i.test(W))z={name:"Internet Explorer",msie:$,version:K(/(?:msie |rv:)(\d+(\.\d+)?)/i)};else if(I)z={name:"Chrome",osname:"Chrome OS",chromeos:$,chromeBook:$,chrome:$,version:K(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(/edg([ea]|ios)/i.test(W))z={name:"Microsoft Edge",msedge:$,version:r};else if(/vivaldi/i.test(W))z={name:"Vivaldi",vivaldi:$,version:K(/vivaldi\/(\d+(\.\d+)?)/i)||l};else if(w)z={name:"Sailfish",osname:"Sailfish OS",sailfish:$,version:K(/sailfish\s?browser\/(\d+(\.\d+)?)/i)};else if(/seamonkey\//i.test(W))z={name:"SeaMonkey",seamonkey:$,version:K(/seamonkey\/(\d+(\.\d+)?)/i)};else if(/firefox|iceweasel|fxios/i.test(W)){if(z={name:"Firefox",firefox:$,version:K(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(W))z.firefoxos=$,z.osname="Firefox OS"}else if(V)z={name:"Amazon Silk",silk:$,version:K(/silk\/(\d+(\.\d+)?)/i)};else if(/phantom/i.test(W))z={name:"PhantomJS",phantom:$,version:K(/phantomjs\/(\d+(\.\d+)?)/i)};else if(/slimerjs/i.test(W))z={name:"SlimerJS",slimer:$,version:K(/slimerjs\/(\d+(\.\d+)?)/i)};else if(/blackberry|\bbb\d+/i.test(W)||/rim\stablet/i.test(W))z={name:"BlackBerry",osname:"BlackBerry OS",blackberry:$,version:l||K(/blackberry[\d]+\/(\d+(\.\d+)?)/i)};else if(_)z={name:"WebOS",osname:"WebOS",webos:$,version:l||K(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(W)&&(z.touchpad=$);else if(/bada/i.test(W))z={name:"Bada",osname:"Bada",bada:$,version:K(/dolfin\/(\d+(\.\d+)?)/i)};else if(T)z={name:"Tizen",osname:"Tizen",tizen:$,version:K(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||l};else if(/qupzilla/i.test(W))z={name:"QupZilla",qupzilla:$,version:K(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||l};else if(/chromium/i.test(W))z={name:"Chromium",chromium:$,version:K(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||l};else if(/chrome|crios|crmo/i.test(W))z={name:"Chrome",chrome:$,version:K(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(q)z={name:"Android",version:l};else if(/safari|applewebkit/i.test(W)){if(z={name:"Safari",safari:$},l)z.version=l}else if(L){if(z={name:L=="iphone"?"iPhone":L=="ipad"?"iPad":"iPod"},l)z.version=l}else if(/googlebot/i.test(W))z={name:"Googlebot",googlebot:$,version:K(/googlebot\/(\d+(\.\d+))/i)||l};else z={name:K(/^(.*)\/(.*) /),version:U(/^(.*)\/(.*) /)};if(!z.msedge&&/(apple)?webkit/i.test(W)){if(/(apple)?webkit\/537\.36/i.test(W))z.name=z.name||"Blink",z.blink=$;else z.name=z.name||"Webkit",z.webkit=$;if(!z.version&&l)z.version=l}else if(!z.opera&&/gecko\//i.test(W))z.name=z.name||"Gecko",z.gecko=$,z.version=z.version||K(/gecko\/(\d+(\.\d+)?)/i);if(!z.windowsphone&&(q||z.silk))z.android=$,z.osname="Android";else if(!z.windowsphone&&L)z[L]=$,z.ios=$,z.osname="iOS";else if($1)z.mac=$,z.osname="macOS";else if(m)z.xbox=$,z.osname="Xbox";else if(d)z.windows=$,z.osname="Windows";else if(i)z.linux=$,z.osname="Linux";function Z1(B1){switch(B1){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var f="";if(z.windows)f=Z1(K(/Windows ((NT|XP)( \d\d?.\d)?)/i));else if(z.windowsphone)f=K(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);else if(z.mac)f=K(/Mac OS X (\d+([_\.\s]\d+)*)/i),f=f.replace(/[_\s]/g,".");else if(L)f=K(/os (\d+([_\s]\d+)*) like mac os x/i),f=f.replace(/[_\s]/g,".");else if(q)f=K(/android[ \/-](\d+(\.\d+)*)/i);else if(z.webos)f=K(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);else if(z.blackberry)f=K(/rim\stablet\sos\s(\d+(\.\d+)*)/i);else if(z.bada)f=K(/bada\/(\d+(\.\d+)*)/i);else if(z.tizen)f=K(/tizen[\/\s](\d+(\.\d+)*)/i);if(f)z.osversion=f;var T1=!z.windows&&f.split(".")[0];if(c||O||L=="ipad"||q&&(T1==3||T1>=4&&!S)||z.silk)z.tablet=$;else if(S||L=="iphone"||L=="ipod"||q||A||z.blackberry||z.webos||z.bada)z.mobile=$;if(z.msedge||z.msie&&z.version>=10||z.yandexbrowser&&z.version>=15||z.vivaldi&&z.version>=1||z.chrome&&z.version>=20||z.samsungBrowser&&z.version>=4||z.whale&&Q([z.version,"1.0"])===1||z.mzbrowser&&Q([z.version,"6.0"])===1||z.focus&&Q([z.version,"1.0"])===1||z.firefox&&z.version>=20||z.safari&&z.version>=6||z.opera&&z.version>=10||z.ios&&z.osversion&&z.osversion.split(".")[0]>=6||z.blackberry&&z.version>=10.1||z.chromium&&z.version>=20)z.a=$;else if(z.msie&&z.version<10||z.chrome&&z.version<20||z.firefox&&z.version<20||z.safari&&z.version<6||z.opera&&z.version<10||z.ios&&z.osversion&&z.osversion.split(".")[0]<6||z.chromium&&z.version<20)z.c=$;else z.x=$;return z}var J=Z(typeof navigator<"u"?navigator.userAgent||"":"");J.test=function(W){for(var K=0;K<W.length;++K){var U=W[K];if(typeof U==="string"){if(U in J)return!0}}return!1};function H(W){return W.split(".").length}function X(W,K){var U=[],L;if(Array.prototype.map)return Array.prototype.map.call(W,K);for(L=0;L<W.length;L++)U.push(K(W[L]));return U}function Q(W){var K=Math.max(H(W[0]),H(W[1])),U=X(W,function(L){var M=K-H(L);return L=L+Array(M+1).join(".0"),X(L.split("."),function(q){return Array(20-q.length).join("0")+q}).reverse()});while(--K>=0)if(U[0][K]>U[1][K])return 1;else if(U[0][K]===U[1][K]){if(K===0)return 0}else return-1}function Y(W,K,U){var L=J;if(typeof K==="string")U=K,K=void 0;if(K===void 0)K=!1;if(U)L=Z(U);var M=""+L.version;for(var q in W)if(W.hasOwnProperty(q)){if(L[q]){if(typeof W[q]!=="string")throw Error("Browser version in the minVersion map should be a string: "+q+": "+String(W));return Q([M,W[q]])<0}}return K}function G(W,K,U){return!Y(W,K,U)}return J.isUnsupportedBrowser=Y,J.compareVersions=Q,J.check=G,J._detect=Z,J.detect=Z,J})});var oJ=j((u8,sJ)=>{Object.defineProperty(u8,"__esModule",{value:!0});u8.default=LM;var UM=cJ(),rJ=KM(UM);function KM($){return $&&$.__esModule?$:{default:$}}var aJ={chrome:"Webkit",safari:"Webkit",ios:"Webkit",android:"Webkit",phantom:"Webkit",opera:"Webkit",webos:"Webkit",blackberry:"Webkit",bada:"Webkit",tizen:"Webkit",chromium:"Webkit",vivaldi:"Webkit",firefox:"Moz",seamoney:"Moz",sailfish:"Moz",msie:"ms",msedge:"ms"},nJ={chrome:"chrome",chromium:"chrome",safari:"safari",firfox:"firefox",msedge:"edge",opera:"opera",vivaldi:"opera",msie:"ie"};function qM($){if($.firefox)return"firefox";if($.mobile||$.tablet){if($.ios)return"ios_saf";else if($.android)return"android";else if($.opera)return"op_mini"}for(var Z in nJ)if($.hasOwnProperty(Z))return nJ[Z]}function LM($){var Z=rJ.default._detect($);if(Z.yandexbrowser)Z=rJ.default._detect($.replace(/YaBrowser\/[0-9.]*/,""));for(var J in aJ)if(Z.hasOwnProperty(J)){var H=aJ[J];Z.jsPrefix=H,Z.cssPrefix="-"+H.toLowerCase()+"-";break}if(Z.browserName=qM(Z),Z.version)Z.browserVersion=parseFloat(Z.version);else Z.browserVersion=parseInt(parseFloat(Z.osversion),10);if(Z.osVersion=parseFloat(Z.osversion),Z.browserName==="ios_saf"&&Z.browserVersion>Z.osVersion)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.chrome&&Z.browserVersion>37)Z.browserName="and_chr";if(Z.browserName==="android"&&Z.osVersion<5)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.samsungBrowser)Z.browserName="and_chr",Z.browserVersion=44;return Z}sJ.exports=u8.default});var eJ=j((p8,tJ)=>{Object.defineProperty(p8,"__esModule",{value:!0});p8.default=BM;function BM($,Z,J){var H="keyframes";if($==="chrome"&&Z<43||($==="safari"||$==="ios_saf")&&Z<9||$==="opera"&&Z<30||$==="android"&&Z<=4.4||$==="and_uc")return J+H;return H}tJ.exports=p8.default});var JH=j((l8,ZH)=>{Object.defineProperty(l8,"__esModule",{value:!0});var zM=function(){function $(Z,J){for(var H=0;H<J.length;H++){var X=J[H];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty(Z,X.key,X)}}return function(Z,J,H){if(J)$(Z.prototype,J);if(H)$(Z,H);return Z}}();l8.default=SM;var AM=oJ(),OM=s0(AM),DM=eJ(),RM=s0(DM),VM=W2(),NM=s0(VM),IM=v8(),TM=s0(IM),PM=m8(),wM=s0(PM),_M=h8(),$H=s0(_M);function s0($){return $&&$.__esModule?$:{default:$}}function CM($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function SM($){var{prefixMap:Z,plugins:J}=$,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(X){return X};return function(){function X(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};CM(this,X);var Y=typeof navigator<"u"?navigator.userAgent:void 0;if(this._userAgent=Q.userAgent||Y,this._keepUnprefixed=Q.keepUnprefixed||!1,this._userAgent)this._browserInfo=(0,OM.default)(this._userAgent);if(this._browserInfo&&this._browserInfo.cssPrefix)this.prefixedKeyframes=(0,RM.default)(this._browserInfo.browserName,this._browserInfo.browserVersion,this._browserInfo.cssPrefix);else return this._useFallback=!0,!1;var G=this._browserInfo.browserName&&Z[this._browserInfo.browserName];if(G){this._requiresPrefix={};for(var W in G)if(G[W]>=this._browserInfo.browserVersion)this._requiresPrefix[W]=!0;this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0}else this._useFallback=!0;this._metaData={browserVersion:this._browserInfo.browserVersion,browserName:this._browserInfo.browserName,cssPrefix:this._browserInfo.cssPrefix,jsPrefix:this._browserInfo.jsPrefix,keepUnprefixed:this._keepUnprefixed,requiresPrefix:this._requiresPrefix}}return zM(X,[{key:"prefix",value:function(Y){if(this._useFallback)return H(Y);if(!this._hasPropsRequiringPrefix)return Y;return this._prefixStyle(Y)}},{key:"_prefixStyle",value:function(Y){for(var G in Y){var W=Y[G];if((0,wM.default)(W))Y[G]=this.prefix(W);else if(Array.isArray(W)){var K=[];for(var U=0,L=W.length;U<L;++U){var M=(0,$H.default)(J,G,W[U],Y,this._metaData);(0,TM.default)(K,M||W[U])}if(K.length>0)Y[G]=K}else{var q=(0,$H.default)(J,G,W,Y,this._metaData);if(q)Y[G]=q;if(this._requiresPrefix.hasOwnProperty(G)){if(Y[this._browserInfo.jsPrefix+(0,NM.default)(G)]=W,!this._keepUnprefixed)delete Y[G]}}}return Y}}],[{key:"prefixAll",value:function(Y){return H(Y)}}]),X}()}ZH.exports=l8.default});var i8=j((gS,q2)=>{/*!
7
+ Copyright (c) 2015 Jed Watson.
8
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
9
+ All rights reserved.
10
+ */(function(){var $=!!(typeof window<"u"&&window.document&&window.document.createElement),Z={canUseDOM:$,canUseWorkers:typeof Worker<"u",canUseEventListeners:$&&!!(window.addEventListener||window.attachEvent),canUseViewport:$&&!!window.screen};if(typeof define==="function"&&typeof define.amd==="object"&&define.amd)define(function(){return Z});else if(typeof q2<"u"&&q2.exports)q2.exports=Z;else window.ExecutionEnvironment=Z})()});var S0=j((d8,HH)=>{Object.defineProperty(d8,"__esModule",{value:!0});d8.default=xM;var EM=/-webkit-|-moz-|-ms-/;function xM($){return typeof $==="string"&&EM.test($)}HH.exports=d8.default});var QH=j((c8,XH)=>{Object.defineProperty(c8,"__esModule",{value:!0});c8.default=kM;var bM=S0(),hM=yM(bM);function yM($){return $&&$.__esModule?$:{default:$}}var vM=["-webkit-","-moz-",""];function kM($,Z){if(typeof Z==="string"&&!(0,hM.default)(Z)&&Z.indexOf("calc(")>-1)return vM.map(function(J){return Z.replace(/calc\(/g,J+"calc(")})}XH.exports=c8.default});var GH=j((r8,YH)=>{Object.defineProperty(r8,"__esModule",{value:!0});r8.default=iM;var fM=S0(),uM=pM(fM);function pM($){return $&&$.__esModule?$:{default:$}}var lM=["-webkit-",""];function iM($,Z){if(typeof Z==="string"&&!(0,uM.default)(Z)&&Z.indexOf("cross-fade(")>-1)return lM.map(function(J){return Z.replace(/cross-fade\(/g,J+"cross-fade(")})}YH.exports=r8.default});var UH=j((a8,WH)=>{Object.defineProperty(a8,"__esModule",{value:!0});a8.default=aM;var cM=["-webkit-","-moz-",""],rM={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function aM($,Z){if($==="cursor"&&rM.hasOwnProperty(Z))return cM.map(function(J){return J+Z})}WH.exports=a8.default});var qH=j((n8,KH)=>{Object.defineProperty(n8,"__esModule",{value:!0});n8.default=$B;var sM=S0(),oM=tM(sM);function tM($){return $&&$.__esModule?$:{default:$}}var eM=["-webkit-",""];function $B($,Z){if(typeof Z==="string"&&!(0,oM.default)(Z)&&Z.indexOf("filter(")>-1)return eM.map(function(J){return Z.replace(/filter\(/g,J+"filter(")})}KH.exports=n8.default});var BH=j((s8,MH)=>{Object.defineProperty(s8,"__esModule",{value:!0});s8.default=JB;var LH={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function JB($,Z){if($==="display"&&LH.hasOwnProperty(Z))return LH[Z]}MH.exports=s8.default});var AH=j((o8,zH)=>{Object.defineProperty(o8,"__esModule",{value:!0});o8.default=QB;var XB={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},FH={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function QB($,Z,J){if(FH.hasOwnProperty($))J[FH[$]]=XB[Z]||Z}zH.exports=o8.default});var RH=j((t8,DH)=>{Object.defineProperty(t8,"__esModule",{value:!0});t8.default=WB;var GB={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},OH={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function WB($,Z,J){if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)J.WebkitBoxOrient="vertical";else J.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)J.WebkitBoxDirection="reverse";else J.WebkitBoxDirection="normal"}if(OH.hasOwnProperty($))J[OH[$]]=GB[Z]||Z}DH.exports=t8.default});var IH=j((e8,NH)=>{Object.defineProperty(e8,"__esModule",{value:!0});e8.default=BB;var KB=S0(),qB=LB(KB);function LB($){return $&&$.__esModule?$:{default:$}}var MB=["-webkit-","-moz-",""],VH=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function BB($,Z){if(typeof Z==="string"&&!(0,qB.default)(Z)&&VH.test(Z))return MB.map(function(J){return Z.replace(VH,function(H){return J+H})})}NH.exports=e8.default});var PH=j(($7,TH)=>{Object.defineProperty($7,"__esModule",{value:!0});$7.default=RB;var zB=S0(),AB=OB(zB);function OB($){return $&&$.__esModule?$:{default:$}}var DB=["-webkit-",""];function RB($,Z){if(typeof Z==="string"&&!(0,AB.default)(Z)&&Z.indexOf("image-set(")>-1)return DB.map(function(J){return Z.replace(/image-set\(/g,J+"image-set(")})}TH.exports=$7.default});var _H=j((Z7,wH)=>{Object.defineProperty(Z7,"__esModule",{value:!0});Z7.default=NB;function NB($,Z){if($==="position"&&Z==="sticky")return["-webkit-sticky","sticky"]}wH.exports=Z7.default});var SH=j((J7,CH)=>{Object.defineProperty(J7,"__esModule",{value:!0});J7.default=_B;var TB=["-webkit-","-moz-",""],PB={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},wB={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function _B($,Z){if(PB.hasOwnProperty($)&&wB.hasOwnProperty(Z))return TB.map(function(J){return J+Z})}CH.exports=J7.default});var EH=j((bS,jH)=>{var SB=/[A-Z]/g,jB=/^ms-/,H7={};function EB($){return"-"+$.toLowerCase()}function xB($){if(H7.hasOwnProperty($))return H7[$];var Z=$.replace(SB,EB);return H7[$]=jB.test(Z)?"-"+Z:Z}jH.exports=xB});var Q7=j((X7,xH)=>{Object.defineProperty(X7,"__esModule",{value:!0});X7.default=yB;var gB=EH(),bB=hB(gB);function hB($){return $&&$.__esModule?$:{default:$}}function yB($){return(0,bB.default)($)}xH.exports=X7.default});var hH=j((G7,bH)=>{Object.defineProperty(G7,"__esModule",{value:!0});G7.default=cB;var kB=Q7(),mB=Y7(kB),fB=S0(),uB=Y7(fB),pB=W2(),gH=Y7(pB);function Y7($){return $&&$.__esModule?$:{default:$}}var lB={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},iB={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function dB($,Z){if((0,uB.default)($))return $;var J=$.split(/,(?![^()]*(?:\([^()]*\))?\))/g);for(var H=0,X=J.length;H<X;++H){var Q=J[H],Y=[Q];for(var G in Z){var W=(0,mB.default)(G);if(Q.indexOf(W)>-1&&W!=="order"){var K=Z[G];for(var U=0,L=K.length;U<L;++U)Y.unshift(Q.replace(W,iB[K[U]]+W))}}J[H]=Y.join(",")}return J.join(",")}function cB($,Z,J,H){if(typeof Z==="string"&&lB.hasOwnProperty($)){var X=dB(Z,H),Q=X.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(G){return!/-moz-|-ms-/.test(G)}).join(",");if($.indexOf("Webkit")>-1)return Q;var Y=X.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(G){return!/-webkit-|-ms-/.test(G)}).join(",");if($.indexOf("Moz")>-1)return Y;return J["Webkit"+(0,gH.default)($)]=Q,J["Moz"+(0,gH.default)($)]=Y,X}}bH.exports=G7.default});var h1=j((U7,nH)=>{Object.defineProperty(U7,"__esModule",{value:!0});U7.default=aB;function aB($,Z,J){if(J)return[$,Z];return $}nH.exports=U7.default});var oH=j((K7,sH)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.default=eB;var sB=h1(),oB=tB(sB);function tB($){return $&&$.__esModule?$:{default:$}}function eB($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if(typeof Z==="string"&&Z.indexOf("calc(")>-1&&(X==="firefox"&&Q<15||X==="chrome"&&Q<25||X==="safari"&&Q<6.1||X==="ios_saf"&&Q<7))return(0,oB.default)(Z.replace(/calc\(/g,Y+"calc("),Z,G)}sH.exports=K7.default});var eH=j((q7,tH)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.default=XF;var ZF=h1(),JF=HF(ZF);function HF($){return $&&$.__esModule?$:{default:$}}function XF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if(typeof Z==="string"&&Z.indexOf("cross-fade(")>-1&&(X==="chrome"||X==="opera"||X==="and_chr"||(X==="ios_saf"||X==="safari")&&Q<10))return(0,JF.default)(Z.replace(/cross-fade\(/g,Y+"cross-fade("),Z,G)}tH.exports=q7.default});var JX=j((L7,ZX)=>{Object.defineProperty(L7,"__esModule",{value:!0});L7.default=KF;var YF=h1(),$X=GF(YF);function GF($){return $&&$.__esModule?$:{default:$}}var WF={grab:!0,grabbing:!0},UF={"zoom-in":!0,"zoom-out":!0};function KF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if($==="cursor"&&WF[Z]&&(X==="firefox"||X==="chrome"||X==="safari"||X==="opera"))return(0,$X.default)(Y+Z,Z,G);if($==="cursor"&&UF[Z]&&(X==="firefox"&&Q<24||X==="chrome"&&Q<37||X==="safari"&&Q<9||X==="opera"&&Q<24))return(0,$X.default)(Y+Z,Z,G)}ZX.exports=L7.default});var XX=j((M7,HX)=>{Object.defineProperty(M7,"__esModule",{value:!0});M7.default=FF;var LF=h1(),MF=BF(LF);function BF($){return $&&$.__esModule?$:{default:$}}function FF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if(typeof Z==="string"&&Z.indexOf("filter(")>-1&&(X==="ios_saf"||X==="safari"&&Q<9.1))return(0,MF.default)(Z.replace(/filter\(/g,Y+"filter("),Z,G)}HX.exports=M7.default});var YX=j((B7,QX)=>{Object.defineProperty(B7,"__esModule",{value:!0});B7.default=VF;var AF=h1(),OF=DF(AF);function DF($){return $&&$.__esModule?$:{default:$}}var RF={flex:!0,"inline-flex":!0};function VF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if($==="display"&&RF[Z]&&(X==="chrome"&&Q<29&&Q>20||(X==="safari"||X==="ios_saf")&&Q<9&&Q>6||X==="opera"&&(Q===15||Q===16)))return(0,OF.default)(Y+Z,Z,G)}QX.exports=B7.default});var WX=j((A7,GX)=>{Object.defineProperty(A7,"__esModule",{value:!0});A7.default=wF;var IF=h1(),TF=PF(IF);function PF($){return $&&$.__esModule?$:{default:$}}var F7={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},z7={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function wF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G,requiresPrefix:W}=H;if((z7.hasOwnProperty($)||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(X==="ie_mob"||X==="ie")&&Q===10){if(delete W[$],!G&&!Array.isArray(J[$]))delete J[$];if($==="display"&&F7.hasOwnProperty(Z))return(0,TF.default)(Y+F7[Z],Z,G);if(z7.hasOwnProperty($))J[z7[$]]=F7[Z]||Z}}GX.exports=A7.default});var KX=j((R7,UX)=>{Object.defineProperty(R7,"__esModule",{value:!0});R7.default=gF;var CF=h1(),SF=jF(CF);function jF($){return $&&$.__esModule?$:{default:$}}var O7={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},D7={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"},EF=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],xF=Object.keys(D7).concat(EF);function gF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G,requiresPrefix:W}=H;if((xF.indexOf($)>-1||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(X==="firefox"&&Q<22||X==="chrome"&&Q<21||(X==="safari"||X==="ios_saf")&&Q<=6.1||X==="android"&&Q<4.4||X==="and_uc")){if(delete W[$],!G&&!Array.isArray(J[$]))delete J[$];if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)J.WebkitBoxOrient="vertical";else J.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)J.WebkitBoxDirection="reverse";else J.WebkitBoxDirection="normal"}if($==="display"&&O7.hasOwnProperty(Z))return(0,SF.default)(Y+O7[Z],Z,G);if(D7.hasOwnProperty($))J[D7[$]]=O7[Z]||Z}}UX.exports=R7.default});var MX=j((V7,LX)=>{Object.defineProperty(V7,"__esModule",{value:!0});V7.default=kF;var hF=h1(),yF=vF(hF);function vF($){return $&&$.__esModule?$:{default:$}}var qX=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function kF($,Z,J,H){var{browserName:X,browserVersion:Q,cssPrefix:Y,keepUnprefixed:G}=H;if(typeof Z==="string"&&qX.test(Z)&&(X==="firefox"&&Q<16||X==="chrome"&&Q<26||(X==="safari"||X==="ios_saf")&&Q<7||(X==="opera"||X==="op_mini")&&Q<12.1||X==="android"&&Q<4.4||X==="and_uc"))return(0,yF.default)(Z.replace(qX,function(W){return Y+W}),Z,G)}LX.exports=V7.default});var FX=j((N7,BX)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.default=lF;var fF=h1(),uF=pF(fF);function pF($){return $&&$.__esModule?$:{default:$}}function lF($,Z,J,H){var{browserName:X,cssPrefix:Q,keepUnprefixed:Y}=H;if(typeof Z==="string"&&Z.indexOf("image-set(")>-1&&(X==="chrome"||X==="opera"||X==="and_chr"||X==="and_uc"||X==="ios_saf"||X==="safari"))return(0,uF.default)(Z.replace(/image-set\(/g,Q+"image-set("),Z,Y)}BX.exports=N7.default});var AX=j((I7,zX)=>{Object.defineProperty(I7,"__esModule",{value:!0});I7.default=aF;var dF=h1(),cF=rF(dF);function rF($){return $&&$.__esModule?$:{default:$}}function aF($,Z,J,H){var{browserName:X,cssPrefix:Q,keepUnprefixed:Y}=H;if($==="position"&&Z==="sticky"&&(X==="safari"||X==="ios_saf"))return(0,cF.default)(Q+Z,Z,Y)}zX.exports=I7.default});var DX=j((T7,OX)=>{Object.defineProperty(T7,"__esModule",{value:!0});T7.default=Zz;var sF=h1(),oF=tF(sF);function tF($){return $&&$.__esModule?$:{default:$}}var eF={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},$z={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function Zz($,Z,J,H){var{cssPrefix:X,keepUnprefixed:Q}=H;if(eF.hasOwnProperty($)&&$z.hasOwnProperty(Z))return(0,oF.default)(X+Z,Z,Q)}OX.exports=T7.default});var VX=j((w7,RX)=>{Object.defineProperty(w7,"__esModule",{value:!0});w7.default=Gz;var Hz=Q7(),Xz=Qz(Hz);function Qz($){return $&&$.__esModule?$:{default:$}}var Yz={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},P7=void 0;function Gz($,Z,J,H){var{cssPrefix:X,keepUnprefixed:Q,requiresPrefix:Y}=H;if(typeof Z==="string"&&Yz.hasOwnProperty($)){if(!P7)P7=Object.keys(Y).map(function(W){return(0,Xz.default)(W)});var G=Z.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return P7.forEach(function(W){G.forEach(function(K,U){if(K.indexOf(W)>-1&&W!=="order")G[U]=K.replace(W,X+W)+(Q?","+K:"")})}),G.join(",")}}RX.exports=w7.default});import{useContext as t2,useEffect as e2}from"react";var fQ=()=>typeof window<"u",n7=()=>typeof process<"u"&&!!process.versions?.node,uQ=()=>{try{return typeof Function("return import.meta")()<"u"}catch{return!1}},s7="__piedemo__",pQ={PIE_API_SERVER:typeof process<"u"?process.env.NEXT_PUBLIC_PIE_API_SERVER:void 0,PIE_CENTRIFUGE_SERVER:typeof process<"u"?process.env.NEXT_PUBLIC_PIE_CENTRIFUGE_SERVER:void 0,PIE_ENABLE_RENDERING_LOG:typeof process<"u"?process.env.NEXT_PUBLIC_PIE_ENABLE_RENDERING_LOG:void 0,PIE_PAGE_PROCESSOR:typeof process<"u"?process.env.NEXT_PUBLIC_PIE_PAGE_PROCESSOR:void 0},$6=($,Z="")=>{if(uQ())return import.meta.env[$]??Z;if(n7()&&process.env)return process.env[$]??Z;return Z},lQ=()=>{if(fQ())return window.location.hostname;if(n7())return process.env.HOSTNAME??"localhost";return"localhost"},o7=()=>{let $=$6("NEXT_PUBLIC_PIE_API_SERVER")||$6("PIE_API_SERVER");return $==="auto-api"?`https://api.${lQ()}/`:$};var n=()=>$6("VITE_PIE_ENABLE_RENDERING_LOG","false")==="true"||$6("PIE_ENABLE_RENDERING_LOG","false")==="true"||(pQ.PIE_ENABLE_RENDERING_LOG??"false")==="true";import{createContext as YY}from"react";function F1($,Z,J,H){function X(Q){return Q instanceof J?Q:new J(function(Y){Y(Q)})}return new(J||(J=Promise))(function(Q,Y){function G(U){try{K(H.next(U))}catch(L){Y(L)}}function W(U){try{K(H.throw(U))}catch(L){Y(L)}}function K(U){U.done?Q(U.value):X(U.value).then(G,W)}K((H=H.apply($,Z||[])).next())})}function iQ($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var k2={exports:{}},h0=typeof Reflect==="object"?Reflect:null,t7=h0&&typeof h0.apply==="function"?h0.apply:function(Z,J,H){return Function.prototype.apply.call(Z,J,H)},Z6;if(h0&&typeof h0.ownKeys==="function")Z6=h0.ownKeys;else if(Object.getOwnPropertySymbols)Z6=function(Z){return Object.getOwnPropertyNames(Z).concat(Object.getOwnPropertySymbols(Z))};else Z6=function(Z){return Object.getOwnPropertyNames(Z)};function dQ($){if(console&&console.warn)console.warn($)}var $4=Number.isNaN||function(Z){return Z!==Z};function s(){s.init.call(this)}k2.exports=s;k2.exports.once=nQ;s.EventEmitter=s;s.prototype._events=void 0;s.prototype._eventsCount=0;s.prototype._maxListeners=void 0;var e7=10;function Y6($){if(typeof $!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return e7},set:function($){if(typeof $!=="number"||$<0||$4($))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");e7=$}});s.init=function(){if(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)this._events=Object.create(null),this._eventsCount=0;this._maxListeners=this._maxListeners||void 0};s.prototype.setMaxListeners=function(Z){if(typeof Z!=="number"||Z<0||$4(Z))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Z+".");return this._maxListeners=Z,this};function Z4($){if($._maxListeners===void 0)return s.defaultMaxListeners;return $._maxListeners}s.prototype.getMaxListeners=function(){return Z4(this)};s.prototype.emit=function(Z){var J=[];for(var H=1;H<arguments.length;H++)J.push(arguments[H]);var X=Z==="error",Q=this._events;if(Q!==void 0)X=X&&Q.error===void 0;else if(!X)return!1;if(X){var Y;if(J.length>0)Y=J[0];if(Y instanceof Error)throw Y;var G=Error("Unhandled error."+(Y?" ("+Y.message+")":""));throw G.context=Y,G}var W=Q[Z];if(W===void 0)return!1;if(typeof W==="function")t7(W,this,J);else{var K=W.length,U=Y4(W,K);for(var H=0;H<K;++H)t7(U[H],this,J)}return!0};function J4($,Z,J,H){var X,Q,Y;if(Y6(J),Q=$._events,Q===void 0)Q=$._events=Object.create(null),$._eventsCount=0;else{if(Q.newListener!==void 0)$.emit("newListener",Z,J.listener?J.listener:J),Q=$._events;Y=Q[Z]}if(Y===void 0)Y=Q[Z]=J,++$._eventsCount;else{if(typeof Y==="function")Y=Q[Z]=H?[J,Y]:[Y,J];else if(H)Y.unshift(J);else Y.push(J);if(X=Z4($),X>0&&Y.length>X&&!Y.warned){Y.warned=!0;var G=Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(Z)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=$,G.type=Z,G.count=Y.length,dQ(G)}}return $}s.prototype.addListener=function(Z,J){return J4(this,Z,J,!1)};s.prototype.on=s.prototype.addListener;s.prototype.prependListener=function(Z,J){return J4(this,Z,J,!0)};function cQ(){if(!this.fired){if(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function H4($,Z,J){var H={fired:!1,wrapFn:void 0,target:$,type:Z,listener:J},X=cQ.bind(H);return X.listener=J,H.wrapFn=X,X}s.prototype.once=function(Z,J){return Y6(J),this.on(Z,H4(this,Z,J)),this};s.prototype.prependOnceListener=function(Z,J){return Y6(J),this.prependListener(Z,H4(this,Z,J)),this};s.prototype.removeListener=function(Z,J){var H,X,Q,Y,G;if(Y6(J),X=this._events,X===void 0)return this;if(H=X[Z],H===void 0)return this;if(H===J||H.listener===J){if(--this._eventsCount===0)this._events=Object.create(null);else if(delete X[Z],X.removeListener)this.emit("removeListener",Z,H.listener||J)}else if(typeof H!=="function"){Q=-1;for(Y=H.length-1;Y>=0;Y--)if(H[Y]===J||H[Y].listener===J){G=H[Y].listener,Q=Y;break}if(Q<0)return this;if(Q===0)H.shift();else rQ(H,Q);if(H.length===1)X[Z]=H[0];if(X.removeListener!==void 0)this.emit("removeListener",Z,G||J)}return this};s.prototype.off=s.prototype.removeListener;s.prototype.removeAllListeners=function(Z){var J,H,X;if(H=this._events,H===void 0)return this;if(H.removeListener===void 0){if(arguments.length===0)this._events=Object.create(null),this._eventsCount=0;else if(H[Z]!==void 0)if(--this._eventsCount===0)this._events=Object.create(null);else delete H[Z];return this}if(arguments.length===0){var Q=Object.keys(H),Y;for(X=0;X<Q.length;++X){if(Y=Q[X],Y==="removeListener")continue;this.removeAllListeners(Y)}return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(J=H[Z],typeof J==="function")this.removeListener(Z,J);else if(J!==void 0)for(X=J.length-1;X>=0;X--)this.removeListener(Z,J[X]);return this};function X4($,Z,J){var H=$._events;if(H===void 0)return[];var X=H[Z];if(X===void 0)return[];if(typeof X==="function")return J?[X.listener||X]:[X];return J?aQ(X):Y4(X,X.length)}s.prototype.listeners=function(Z){return X4(this,Z,!0)};s.prototype.rawListeners=function(Z){return X4(this,Z,!1)};s.listenerCount=function($,Z){if(typeof $.listenerCount==="function")return $.listenerCount(Z);else return Q4.call($,Z)};s.prototype.listenerCount=Q4;function Q4($){var Z=this._events;if(Z!==void 0){var J=Z[$];if(typeof J==="function")return 1;else if(J!==void 0)return J.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?Z6(this._events):[]};function Y4($,Z){var J=Array(Z);for(var H=0;H<Z;++H)J[H]=$[H];return J}function rQ($,Z){for(;Z+1<$.length;Z++)$[Z]=$[Z+1];$.pop()}function aQ($){var Z=Array($.length);for(var J=0;J<Z.length;++J)Z[J]=$[J].listener||$[J];return Z}function nQ($,Z){return new Promise(function(J,H){function X(Y){$.removeListener(Z,Q),H(Y)}function Q(){if(typeof $.removeListener==="function")$.removeListener("error",X);J([].slice.call(arguments))}if(G4($,Z,Q,{once:!0}),Z!=="error")sQ($,X,{once:!0})})}function sQ($,Z,J){if(typeof $.on==="function")G4($,"error",Z,J)}function G4($,Z,J,H){if(typeof $.on==="function")if(H.once)$.once(Z,J);else $.on(Z,J);else if(typeof $.addEventListener==="function")$.addEventListener(Z,function X(Q){if(H.once)$.removeEventListener(Z,X);J(Q)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $)}var oQ=k2.exports,W4=iQ(oQ),e;(function($){$[$.timeout=1]="timeout",$[$.transportClosed=2]="transportClosed",$[$.clientDisconnected=3]="clientDisconnected",$[$.clientClosed=4]="clientClosed",$[$.clientConnectToken=5]="clientConnectToken",$[$.clientRefreshToken=6]="clientRefreshToken",$[$.subscriptionUnsubscribed=7]="subscriptionUnsubscribed",$[$.subscriptionSubscribeToken=8]="subscriptionSubscribeToken",$[$.subscriptionRefreshToken=9]="subscriptionRefreshToken",$[$.transportWriteError=10]="transportWriteError",$[$.connectionClosed=11]="connectionClosed",$[$.badConfiguration=12]="badConfiguration"})(e||(e={}));var J0;(function($){$[$.connectCalled=0]="connectCalled",$[$.transportClosed=1]="transportClosed",$[$.noPing=2]="noPing",$[$.subscribeTimeout=3]="subscribeTimeout",$[$.unsubscribeError=4]="unsubscribeError"})(J0||(J0={}));var G5;(function($){$[$.disconnectCalled=0]="disconnectCalled",$[$.unauthorized=1]="unauthorized",$[$.badProtocol=2]="badProtocol",$[$.messageSizeLimit=3]="messageSizeLimit"})(G5||(G5={}));var J6;(function($){$[$.subscribeCalled=0]="subscribeCalled",$[$.transportClosed=1]="transportClosed"})(J6||(J6={}));var H6;(function($){$[$.unsubscribeCalled=0]="unsubscribeCalled",$[$.unauthorized=1]="unauthorized",$[$.clientClosed=2]="clientClosed"})(H6||(H6={}));var h2;(function($){$[$.channelCompaction=1]="channelCompaction"})(h2||(h2={}));var Q1;(function($){$.Disconnected="disconnected",$.Connecting="connecting",$.Connected="connected"})(Q1||(Q1={}));var O1;(function($){$.Unsubscribed="unsubscribed",$.Subscribing="subscribing",$.Subscribed="subscribed"})(O1||(O1={}));function tQ($,Z){return $.lastIndexOf(Z,0)===0}function U4($){if($===void 0||$===null)return!1;return typeof $==="function"}function eQ($,Z){if(globalThis.console){let J=globalThis.console[$];if(U4(J))J.apply(globalThis.console,Z)}}function $Y($,Z){return Math.floor(Math.random()*(Z-$+1)+$)}function X6($,Z,J){if($>31)$=31;let H=$Y(0,Math.min(J,Z*Math.pow(2,$)));return Math.min(J,Z+H)}function ZY($){return"error"in $&&$.error!==null}function Q6($){return Math.min($*1000,2147483647)}class K4 extends W4{constructor($,Z,J){super();if(this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=Z,this.state=O1.Unsubscribed,this._centrifuge=$,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=20000,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(J),this._centrifuge._debugEnabled)this.on("state",(H)=>{this._debug("subscription state",Z,H.oldState,"->",H.newState)}),this.on("error",(H)=>{this._debug("subscription error",Z,H)});else this.on("error",function(){Function.prototype()})}ready($){if(this.state===O1.Unsubscribed)return Promise.reject({code:e.subscriptionUnsubscribed,message:this.state});if(this.state===O1.Subscribed)return Promise.resolve();return new Promise((Z,J)=>{let H={resolve:Z,reject:J};if($)H.timeout=setTimeout(function(){J({code:e.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=H})}subscribe(){if(this._isSubscribed())return;this._resubscribeAttempts=0,this._setSubscribing(J6.subscribeCalled,"subscribe called")}unsubscribe(){this._unsubPromise=this._setUnsubscribed(H6.unsubscribeCalled,"unsubscribe called",!0)}publish($){return F1(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.publish(this.channel,$)})}presence(){return F1(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return F1(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}history($){return F1(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,$)})}setTagsFilter($){if($&&this._delta)throw Error("cannot use delta and tagsFilter together");this._tagsFilter=$}setData($){this._data=$}_methodCall(){if(this._isSubscribed())return Promise.resolve();if(this._isUnsubscribed())return Promise.reject({code:e.subscriptionUnsubscribed,message:this.state});return new Promise(($,Z)=>{let J=this._centrifuge._config.timeout,H=setTimeout(()=>{Z({code:e.timeout,message:"timeout"})},J);this._promises[this._nextPromiseId()]={timeout:H,resolve:$,reject:Z}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return this._recover===!0}_isUnsubscribed(){return this.state===O1.Unsubscribed}_isSubscribing(){return this.state===O1.Subscribing}_isSubscribed(){return this.state===O1.Subscribed}_setState($){if(this.state!==$){let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z,channel:this.channel}),!0}return!1}_usesToken(){return this._token!==""||this._getToken!==null}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed($){if(!this._isSubscribing())return;if(this._clearSubscribingState(),$.id)this._id=$.id;if($.recoverable)this._recover=!0,this._offset=$.offset||0,this._epoch=$.epoch||"";if($.delta)this._delta_negotiated=!0;else this._delta_negotiated=!1;this._setState(O1.Subscribed);let Z=this._centrifuge._getSubscribeContext(this.channel,$);this.emit("subscribed",Z),this._resolvePromises();let J=$.publications;if(J&&J.length>0)for(let H in J){if(!J.hasOwnProperty(H))continue;this._handlePublication(J[H])}if($.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),Q6($.ttl))}_setSubscribing($,Z){return F1(this,void 0,void 0,function*(){if(this._isSubscribing())return;if(this._isSubscribed())this._clearSubscribedState();if(this._setState(O1.Subscribing))this.emit("subscribing",{channel:this.channel,code:$,reason:Z});if(this._centrifuge._transport&&this._centrifuge._transport.emulation())yield this._unsubPromise;if(!this._isSubscribing())return;this._subscribe()})}_subscribe(){if(this._debug("subscribing on",this.channel),!this._isTransportOpen())return this._debug("delay subscribe on",this.channel,"till connected"),null;if(this._inflight)return null;if(this._inflight=!0,this._canSubscribeWithoutGettingToken())return this._subscribeWithoutToken();return this._getSubscriptionToken().then(($)=>this._handleTokenResponse($)).catch(($)=>this._handleTokenError($)),null}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){if(this._getData)return this._getDataAndSubscribe(this._token),null;else return this._sendSubscribe(this._token)}_getDataAndSubscribe($){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then((Z)=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=Z,this._sendSubscribe($)}).catch((Z)=>this._handleGetDataError(Z))}_handleGetDataError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof l1){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:e.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse($){if(!this._isSubscribing()){this._inflight=!1;return}if(!$){this._inflight=!1,this._failUnauthorized();return}if(this._token=$,this._getData)this._getDataAndSubscribe($);else this._sendSubscribe($)}_handleTokenError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof l1){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:e.subscriptionSubscribeToken,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe($){if(!this._isTransportOpen())return this._inflight=!1,null;let Z=this._buildSubscribeCommand($);return this._centrifuge._call(Z).then((J)=>{this._inflight=!1;let H=J.reply.subscribe;if(this._handleSubscribeResponse(H),J.next)J.next()},(J)=>{if(this._inflight=!1,this._handleSubscribeError(J.error),J.next)J.next()}),Z}_buildSubscribeCommand($){let Z={channel:this.channel};if($)Z.token=$;if(this._data)Z.data=this._data;if(this._positioned)Z.positioned=!0;if(this._recoverable)Z.recoverable=!0;if(this._joinLeave)Z.join_leave=!0;if(Z.flag=h2.channelCompaction,this._needRecover()){Z.recover=!0;let J=this._getOffset();if(J)Z.offset=J;let H=this._getEpoch();if(H)Z.epoch=H}if(this._delta)Z.delta=this._delta;if(this._tagsFilter)Z.tf=this._tagsFilter;return{subscribe:Z}}_debug(...$){this._centrifuge._debug(...$)}_handleSubscribeError($){if(!this._isSubscribing())return;if($.code===e.timeout){this._centrifuge._disconnect(J0.subscribeTimeout,"subscribe timeout",!0);return}this._subscribeError($)}_handleSubscribeResponse($){if(!this._isSubscribing())return;this._setSubscribed($)}_setUnsubscribed($,Z,J){if(this._isUnsubscribed())return Promise.resolve();let H=Promise.resolve();if(this._isSubscribed()){if(J)H=this._centrifuge._unsubscribe(this);this._clearSubscribedState()}else if(this._isSubscribing()){if(this._inflight&&J)H=this._centrifuge._unsubscribe(this);this._clearSubscribingState()}if(this._inflight=!1,this._setState(O1.Unsubscribed))this.emit("unsubscribed",{channel:this.channel,code:$,reason:Z});return this._rejectPromises({code:e.subscriptionUnsubscribed,message:this.state}),H}_handlePublication($){if(this._delta&&this._delta_negotiated){let{newData:J,newPrevValue:H}=this._centrifuge._codec.applyDeltaIfNeeded($,this._prevValue);$.data=J,this._prevValue=H}let Z=this._centrifuge._getPublicationContext(this.channel,$);if(this.emit("publication",Z),$.offset)this._offset=$.offset}_handleJoin($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("join",{channel:this.channel,info:Z})}_handleLeave($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("leave",{channel:this.channel,info:Z})}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}_scheduleResubscribe(){if(!this._isSubscribing()){this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);return}let $=this,Z=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){if($._isSubscribing())$._subscribe()},Z),this._debug("resubscribe scheduled after "+Z,this.channel)}_subscribeError($){if(!this._isSubscribing())return;if($.code<100||$.code===109||$.temporary===!0){if($.code===109)this._token="";let Z={channel:this.channel,type:"subscribe",error:$};if(this._centrifuge.state===Q1.Connected)this.emit("error",Z);this._scheduleResubscribe()}else this._setUnsubscribed($.code,$.message,!1)}_getResubscribeDelay(){let $=X6(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,$}_setOptions($){if(!$)return;if($.since)this._offset=$.since.offset||0,this._epoch=$.since.epoch||"",this._recover=!0;if($.data)this._data=$.data;if($.getData)this._getData=$.getData;if($.minResubscribeDelay!==void 0)this._minResubscribeDelay=$.minResubscribeDelay;if($.maxResubscribeDelay!==void 0)this._maxResubscribeDelay=$.maxResubscribeDelay;if($.token)this._token=$.token;if($.getToken)this._getToken=$.getToken;if($.positioned===!0)this._positioned=!0;if($.recoverable===!0)this._recoverable=!0;if($.joinLeave===!0)this._joinLeave=!0;if($.delta){if($.delta!=="fossil")throw Error("unsupported delta format");this._delta=$.delta}if($.tagsFilter)this._tagsFilter=$.tagsFilter;if(this._tagsFilter&&this._delta)throw Error("cannot use delta and tagsFilter together")}_getOffset(){let $=this._offset;if($!==null)return $;return 0}_getEpoch(){let $=this._epoch;if($!==null)return $;return""}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearResubscribeTimeout(){if(this._resubscribeTimeout!==null)clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);let $={channel:this.channel},Z=this._getToken;if(Z===null)return this.emit("error",{type:"configuration",channel:this.channel,error:{code:e.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new l1(""));return Z($)}_refresh(){this._clearRefreshTimeout();let $=this;this._getSubscriptionToken().then(function(Z){if(!$._isSubscribed())return;if(!Z){$._failUnauthorized();return}$._token=Z;let H={sub_refresh:{channel:$.channel,token:Z}};$._centrifuge._call(H).then((X)=>{let Q=X.reply.sub_refresh;if($._refreshResponse(Q),X.next)X.next()},(X)=>{if($._refreshError(X.error),X.next)X.next()})}).catch(function(Z){if(Z instanceof l1){$._failUnauthorized();return}$.emit("error",{type:"refreshToken",channel:$.channel,error:{code:e.subscriptionRefreshToken,message:Z!==void 0?Z.toString():""}}),$._refreshTimeout=setTimeout(()=>$._refresh(),$._getRefreshRetryDelay())})}_refreshResponse($){if(!this._isSubscribed())return;if(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),$.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),Q6($.ttl))}_refreshError($){if(!this._isSubscribed())return;if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",channel:this.channel,error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._setUnsubscribed($.code,$.message,!0)}_getRefreshRetryDelay(){return X6(0,1e4,20000)}_failUnauthorized(){this._setUnsubscribed(H6.unauthorized,"unauthorized",!0)}}class q4{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return this.options.sockjs!==null}initialize($,Z){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(J)=>{Z.onError(J)},this._transport.onclose=(J)=>{Z.onClose(J)},this._transport.onmessage=(J)=>{Z.onMessage(J.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class y2{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return this.options.websocket!==void 0&&this.options.websocket!==null}initialize($,Z){let J="";if($==="protobuf")J="centrifuge-protobuf";if(J!=="")this._transport=new this.options.websocket(this.endpoint,J);else this._transport=new this.options.websocket(this.endpoint);if($==="protobuf")this._transport.binaryType="arraybuffer";this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(H)=>{Z.onError(H)},this._transport.onclose=(H)=>{Z.onClose(H)},this._transport.onmessage=(H)=>{Z.onMessage(H.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class L4{constructor($,Z){this.endpoint=$,this.options=Z,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors($){if(!$.ok)throw Error($.status);return $}_fetchEventTarget($,Z,J){let H=new EventTarget,X=$.options.fetch;return X(Z,J).then($._handleErrors).then((Q)=>{H.dispatchEvent(new Event("open"));let Y="",G=0,W=new Uint8Array,K=Q.body.getReader();return new $.options.readableStream({start(U){function L(){return K.read().then(({done:M,value:q})=>{if(M){H.dispatchEvent(new Event("close")),U.close();return}try{if($._protocol==="json"){Y+=$._utf8decoder.decode(q);while(G<Y.length)if(Y[G]===`
11
+ `){let A=Y.substring(0,G);H.dispatchEvent(new MessageEvent("message",{data:A})),Y=Y.substring(G+1),G=0}else++G}else{let A=new Uint8Array(W.length+q.length);A.set(W),A.set(q,W.length),W=A;while(!0){let O=$.options.decoder.decodeReply(W);if(O.ok){let I=W.slice(0,O.pos);H.dispatchEvent(new MessageEvent("message",{data:I})),W=W.slice(O.pos);continue}break}}}catch(A){H.dispatchEvent(new Event("error",{detail:A})),H.dispatchEvent(new Event("close")),U.close();return}L()}).catch(function(M){H.dispatchEvent(new Event("error",{detail:M})),H.dispatchEvent(new Event("close")),U.close();return})}return L()}})}).catch((Q)=>{H.dispatchEvent(new Event("error",{detail:Q})),H.dispatchEvent(new Event("close"))}),H}supported(){return this.options.fetch!==null&&this.options.readableStream!==null&&typeof TextDecoder<"u"&&typeof AbortController<"u"&&typeof EventTarget<"u"&&typeof Event<"u"&&typeof MessageEvent<"u"&&typeof Error<"u"}initialize($,Z,J){this._protocol=$,this._abortController=new AbortController;let H,X;if($==="json")H={Accept:"application/json","Content-Type":"application/json"},X=J;else H={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},X=J;let Q={method:"POST",headers:H,body:X,mode:"cors",credentials:"same-origin",signal:this._abortController.signal},Y=this._fetchEventTarget(this,this.endpoint,Q);Y.addEventListener("open",()=>{Z.onOpen()}),Y.addEventListener("error",(G)=>{this._abortController.abort(),Z.onError(G)}),Y.addEventListener("close",()=>{this._abortController.abort(),Z.onClose({code:4,reason:"connection closed"})}),Y.addEventListener("message",(G)=>{Z.onMessage(G.data)})}close(){this._abortController.abort()}send($,Z,J){let H,X,Q={session:Z,node:J,data:$};if(this._protocol==="json")H={"Content-Type":"application/json"},X=JSON.stringify(Q);else H={"Content-Type":"application/octet-stream"},X=this.options.encoder.encodeEmulationRequest(Q);let Y=this.options.fetch,G={method:"POST",headers:H,body:X,mode:"cors",credentials:"same-origin"};Y(this.options.emulationEndpoint,G)}}class M4{constructor($,Z){this.endpoint=$,this.options=Z,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return this.options.eventsource!==null&&this.options.fetch!==null}initialize($,Z,J){let H;if(globalThis&&globalThis.document&&globalThis.document.baseURI)H=new URL(this.endpoint,globalThis.document.baseURI);else H=new URL(this.endpoint);H.searchParams.append("cf_connect",J);let X={},Q=new this.options.eventsource(H.toString(),X);this._transport=Q;let Y=this;Q.onopen=function(){Z.onOpen()},Q.onerror=function(G){Q.close(),Z.onError(G),Z.onClose({code:4,reason:"connection closed"})},Q.onmessage=function(G){Z.onMessage(G.data)},Y._onClose=function(){Z.onClose({code:4,reason:"connection closed"})}}close(){if(this._transport.close(),this._onClose!==null)this._onClose()}send($,Z,J){let H={session:Z,node:J,data:$},X={"Content-Type":"application/json"},Q=JSON.stringify(H),Y=this.options.fetch,G={method:"POST",headers:X,body:Q,mode:"cors",credentials:"same-origin"};Y(this.options.emulationEndpoint,G)}}class B4{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return this.options.webtransport!==void 0&&this.options.webtransport!==null}initialize($,Z){return F1(this,void 0,void 0,function*(){let J;if(globalThis&&globalThis.document&&globalThis.document.baseURI)J=new URL(this.endpoint,globalThis.document.baseURI);else J=new URL(this.endpoint);if($==="protobuf")J.searchParams.append("cf_protocol","protobuf");this._protocol=$;let H=new EventTarget;this._transport=new this.options.webtransport(J.toString()),this._transport.closed.then(()=>{Z.onClose({code:4,reason:"connection closed"})}).catch(()=>{Z.onClose({code:4,reason:"connection closed"})});try{yield this._transport.ready}catch(Q){this.close();return}let X;try{X=yield this._transport.createBidirectionalStream()}catch(Q){this.close();return}this._stream=X,this._writer=this._stream.writable.getWriter(),H.addEventListener("close",()=>{Z.onClose({code:4,reason:"connection closed"})}),H.addEventListener("message",(Q)=>{Z.onMessage(Q.data)}),this._startReading(H),Z.onOpen()})}_startReading($){return F1(this,void 0,void 0,function*(){let Z=this._stream.readable.getReader(),J="",H=0,X=new Uint8Array;try{while(!0){let{done:Q,value:Y}=yield Z.read();if(Y.length>0)if(this._protocol==="json"){J+=this._utf8decoder.decode(Y);while(H<J.length)if(J[H]===`
12
+ `){let G=J.substring(0,H);$.dispatchEvent(new MessageEvent("message",{data:G})),J=J.substring(H+1),H=0}else++H}else{let G=new Uint8Array(X.length+Y.length);G.set(X),G.set(Y,X.length),X=G;while(!0){let W=this.options.decoder.decodeReply(X);if(W.ok){let K=X.slice(0,W.pos);$.dispatchEvent(new MessageEvent("message",{data:K})),X=X.slice(W.pos);continue}break}}if(Q)break}}catch(Q){$.dispatchEvent(new Event("close"))}})}close(){return F1(this,void 0,void 0,function*(){try{if(this._writer)yield this._writer.close();this._transport.close()}catch($){}})}send($){return F1(this,void 0,void 0,function*(){let Z;if(this._protocol==="json")Z=new TextEncoder().encode($+`
13
+ `);else Z=$;try{yield this._writer.write(Z)}catch(J){this.close()}})}}var JY=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];class F4{constructor($){this.a=$,this.pos=0}haveBytes(){return this.pos<this.a.length}getByte(){let $=this.a[this.pos];if(this.pos++,this.pos>this.a.length)throw RangeError("out of bounds");return $}getChar(){return String.fromCharCode(this.getByte())}getInt(){let $=0,Z;while(this.haveBytes()&&(Z=JY[127&this.getByte()])>=0)$=($<<6)+Z;return this.pos--,$>>>0}}class z4{constructor(){this.a=[]}toByteArray($){if(Array.isArray($))return this.a;return new Uint8Array(this.a)}putArray($,Z,J){for(let H=Z;H<J;H++)this.a.push($[H])}}function HY($){let Z=0,J=0,H=0,X=0,Q=0,Y=$.length;while(Y>=16)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,X=X+$[Q+3]|0,Z=Z+$[Q+4]|0,J=J+$[Q+5]|0,H=H+$[Q+6]|0,X=X+$[Q+7]|0,Z=Z+$[Q+8]|0,J=J+$[Q+9]|0,H=H+$[Q+10]|0,X=X+$[Q+11]|0,Z=Z+$[Q+12]|0,J=J+$[Q+13]|0,H=H+$[Q+14]|0,X=X+$[Q+15]|0,Q+=16,Y-=16;while(Y>=4)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,X=X+$[Q+3]|0,Q+=4,Y-=4;switch(X=((X+(H<<8)|0)+(J<<16)|0)+(Z<<24)|0,Y){case 3:X=X+($[Q+2]<<8)|0;case 2:X=X+($[Q+1]<<16)|0;case 1:X=X+($[Q+0]<<24)|0}return X>>>0}function XY($,Z){let J=0,H=new F4(Z),X=$.length,Q=Z.length,Y=H.getInt();if(H.getChar()!==`
14
+ `)throw Error("size integer not terminated by '\\n'");let G=new z4;while(H.haveBytes()){let W=H.getInt(),K;switch(H.getChar()){case"@":if(K=H.getInt(),H.haveBytes()&&H.getChar()!==",")throw Error("copy command not terminated by ','");if(J+=W,J>Y)throw Error("copy exceeds output file size");if(K+W>X)throw Error("copy extends past end of input");G.putArray($,K,K+W);break;case":":if(J+=W,J>Y)throw Error("insert command gives an output larger than predicted");if(W>Q)throw Error("insert count exceeds size of delta");G.putArray(H.a,H.pos,H.pos+W),H.pos+=W;break;case";":{let U=G.toByteArray($);if(W!==HY(U))throw Error("bad checksum");if(J!==Y)throw Error("generated size does not match predicted size");return U}default:throw Error("unknown delta operator")}}throw Error("unterminated delta")}class v2{name(){return"json"}encodeCommands($){return $.map((Z)=>JSON.stringify(Z)).join(`
15
+ `)}decodeReplies($){return $.trim().split(`
16
+ `).map((Z)=>JSON.parse(Z))}applyDeltaIfNeeded($,Z){let J,H;if($.delta){let X=XY(Z,new TextEncoder().encode($.data));J=JSON.parse(new TextDecoder().decode(X)),H=X}else J=JSON.parse($.data),H=new TextEncoder().encode($.data);return{newData:J,newPrevValue:H}}}var QY={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:20000,timeout:5000,maxServerPingDelay:1e4,networkEventTarget:null};class l1 extends Error{constructor($){super($);this.name=this.constructor.name}}class W5 extends W4{constructor($,Z){super();if(this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=Q1.Disconnected,this._transportIsOpen=!1,this._endpoint=$,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new v2,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},QY),Z),this._configure(),this._debugEnabled)this.on("state",(J)=>{this._debug("client state",J.oldState,"->",J.newState)}),this.on("error",(J)=>{this._debug("client error",J)});else this.on("error",function(){Function.prototype()})}newSubscription($,Z){if(this.getSubscription($)!==null)throw Error("Subscription to the channel "+$+" already exists");let J=new K4(this,$,Z);return this._subs[$]=J,J}getSubscription($){return this._getSub($)}removeSubscription($){if(!$)return;if($.state!==O1.Unsubscribed)$.unsubscribe();this._removeSubscription($)}subscriptions(){return this._subs}ready($){return F1(this,void 0,void 0,function*(){switch(this.state){case Q1.Disconnected:throw{code:e.clientDisconnected,message:"client disconnected"};case Q1.Connected:return;default:return new Promise((Z,J)=>{let H={resolve:Z,reject:J};if($)H.timeout=setTimeout(()=>{J({code:e.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=H})}})}connect(){if(this._isConnected()){this._debug("connect called when already connected");return}if(this._isConnecting()){this._debug("connect called when already connecting");return}this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting()}disconnect(){this._disconnect(G5.disconnectCalled,"disconnect called",!1)}setToken($){this._token=$}setData($){this._data=$}setHeaders($){this._config.headers=$}send($){return F1(this,void 0,void 0,function*(){let Z={send:{data:$}};if(yield this._methodCall(),!this._transportSendCommands([Z]))throw this._createErrorObject(e.transportWriteError,"transport write error")})}rpc($,Z){return F1(this,void 0,void 0,function*(){let J={rpc:{method:$,data:Z}};return yield this._methodCall(),{data:(yield this._callPromise(J,(X)=>X.rpc)).data}})}publish($,Z){return F1(this,void 0,void 0,function*(){let J={publish:{channel:$,data:Z}};return yield this._methodCall(),yield this._callPromise(J,()=>({})),{}})}history($,Z){return F1(this,void 0,void 0,function*(){let J={history:this._getHistoryRequest($,Z)};yield this._methodCall();let H=yield this._callPromise(J,(Q)=>Q.history),X=[];if(H.publications)for(let Q=0;Q<H.publications.length;Q++)X.push(this._getPublicationContext($,H.publications[Q]));return{publications:X,epoch:H.epoch||"",offset:H.offset||0}})}presence($){return F1(this,void 0,void 0,function*(){let Z={presence:{channel:$}};yield this._methodCall();let H=(yield this._callPromise(Z,(X)=>X.presence)).presence;for(let X in H)if(Object.prototype.hasOwnProperty.call(H,X)){let Q=H[X],Y=Q.conn_info,G=Q.chan_info;if(Y)Q.connInfo=Y;if(G)Q.chanInfo=G}return{clients:H}})}presenceStats($){return F1(this,void 0,void 0,function*(){let Z={presence_stats:{channel:$}};yield this._methodCall();let J=yield this._callPromise(Z,(H)=>{return H.presence_stats});return{numUsers:J.num_users,numClients:J.num_clients}})}startBatching(){this._batching=!0}stopBatching(){let $=this;Promise.resolve().then(function(){Promise.resolve().then(function(){$._batching=!1,$._flush()})})}_debug(...$){if(!this._debugEnabled)return;eQ("debug",$)}_codecName(){return this._codec.name()}_formatOverride(){return}_configure(){if(!("Promise"in globalThis))throw Error("Promise polyfill required");if(!this._endpoint)throw Error("endpoint configuration required");if(this._config.token!==null)this._token=this._config.token;if(this._config.data!==null)this._data=this._config.data;if(this._codec=new v2,this._formatOverride(),this._config.debug===!0||typeof localStorage<"u"&&typeof localStorage.getItem==="function"&&localStorage.getItem("centrifuge.debug"))this._debugEnabled=!0;if(this._debug("config",this._config),typeof this._endpoint==="string");else if(Array.isArray(this._endpoint)){this._transports=this._endpoint,this._emulation=!0;for(let $ in this._transports)if(this._transports.hasOwnProperty($)){let Z=this._transports[$];if(!Z.endpoint||!Z.transport)throw Error("malformed transport configuration");let J=Z.transport;if(["websocket","http_stream","sse","sockjs","webtransport"].indexOf(J)<0)throw Error("unsupported transport name: "+J)}}else throw Error("unsupported url configuration type: only string or array of objects are supported")}_setState($){if(this.state!==$){this._reconnecting=!1;let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z}),!0}return!1}_isDisconnected(){return this.state===Q1.Disconnected}_isConnecting(){return this.state===Q1.Connecting}_isConnected(){return this.state===Q1.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let $=null;if(this._config.networkEventTarget!==null)$=this._config.networkEventTarget;else if(typeof globalThis.addEventListener<"u")$=globalThis;if($)$.addEventListener("offline",()=>{if(this._debug("offline event triggered"),this.state===Q1.Connected||this.state===Q1.Connecting)this._disconnect(J0.transportClosed,"transport closed",!0),this._deviceWentOffline=!0}),$.addEventListener("online",()=>{if(this._debug("online event triggered"),this.state!==Q1.Connecting)return;if(this._deviceWentOffline&&!this._transportClosed)this._deviceWentOffline=!1,this._transportClosed=!0;this._clearReconnectTimeout(),this._startReconnecting()}),this._networkEventsSet=!0}_getReconnectDelay(){let $=X6(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,$}_clearOutgoingRequests(){for(let $ in this._callbacks)if(this._callbacks.hasOwnProperty($)){let Z=this._callbacks[$];clearTimeout(Z.timeout);let J=Z.errback;if(!J)continue;J({error:this._createErrorObject(e.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(let $ in this._subs){if(!this._subs.hasOwnProperty($))continue;let Z=this._subs[$];if(Z.state===O1.Subscribed)Z._setSubscribing(J6.transportClosed,"transport closed")}for(let $ in this._serverSubs)if(this._serverSubs.hasOwnProperty($))this.emit("subscribing",{channel:$})}_handleWriteError($){for(let Z of $){let J=Z.id;if(!(J in this._callbacks))continue;let H=this._callbacks[J];clearTimeout(this._callbacks[J].timeout),delete this._callbacks[J];let X=H.errback;X({error:this._createErrorObject(e.transportWriteError,"transport write error")})}}_transportSendCommands($){if(!$.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands($),this._session,this._node)}catch(Z){return this._debug("error writing commands",Z),this._handleWriteError($),!1}return!0}_initializeTransport(){let $;if(this._config.websocket!==null)$=this._config.websocket;else if(!(typeof globalThis.WebSocket!=="function"&&typeof globalThis.WebSocket!=="object"))$=globalThis.WebSocket;let Z=null;if(this._config.sockjs!==null)Z=this._config.sockjs;else if(typeof globalThis.SockJS<"u")Z=globalThis.SockJS;let J=null;if(this._config.eventsource!==null)J=this._config.eventsource;else if(typeof globalThis.EventSource<"u")J=globalThis.EventSource;let H=null;if(this._config.fetch!==null)H=this._config.fetch;else if(typeof globalThis.fetch<"u")H=globalThis.fetch;let X=null;if(this._config.readableStream!==null)X=this._config.readableStream;else if(typeof globalThis.ReadableStream<"u")X=globalThis.ReadableStream;if(!this._emulation){if(tQ(this._endpoint,"http"))throw Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");else if(this._debug("client will use websocket"),this._transport=new y2(this._endpoint,{websocket:$}),!this._transport.supported())throw Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}else{if(this._currentTransportIndex>=this._transports.length)this._triedAllTransports=!0,this._currentTransportIndex=0;let M=0;while(!0){if(M>=this._transports.length)throw Error("no supported transport found");let q=this._transports[this._currentTransportIndex],A=q.transport,O=q.endpoint;if(A==="websocket"){if(this._debug("trying websocket transport"),this._transport=new y2(O,{websocket:$}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,M++;continue}}else if(A==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new B4(O,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,M++;continue}}else if(A==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new L4(O,{fetch:H,readableStream:X,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,M++;continue}}else if(A==="sse"){if(this._debug("trying sse transport"),this._transport=new M4(O,{eventsource:J,fetch:H,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,M++;continue}}else if(A==="sockjs"){if(this._debug("trying sockjs"),this._transport=new q4(O,{sockjs:Z,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,M++;continue}}else throw Error("unknown transport "+A);break}}let Q=this,Y=this._transport,G=this._nextTransportId();Q._debug("id of transport",G);let W=!1,K=[];if(this._transport.emulation()){let M=Q._sendConnect(!0);K.push(M)}this._setNetworkEvents();let U=this._codec.encodeCommands(K);this._transportClosed=!1;let L;L=setTimeout(function(){Y.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(L)clearTimeout(L),L=null;if(Q._transportId!=G){Q._debug("open callback from non-actual transport"),Y.close();return}if(W=!0,Q._debug(Y.subName(),"transport open"),Y.emulation())return;Q._transportIsOpen=!0,Q._transportWasOpen=!0,Q.startBatching(),Q._sendConnect(!1),Q._sendSubscribeCommands(),Q.stopBatching(),Q.emit("__centrifuge_debug:connect_frame_sent",{})},onError:function(M){if(Q._transportId!=G){Q._debug("error callback from non-actual transport");return}Q._debug("transport level error",M)},onClose:function(M){if(L)clearTimeout(L),L=null;if(Q._transportId!=G){Q._debug("close callback from non-actual transport");return}Q._debug(Y.subName(),"transport closed"),Q._transportClosed=!0,Q._transportIsOpen=!1;let q="connection closed",A=!0,O=0;if(M&&"code"in M&&M.code)O=M.code;if(M&&M.reason)try{let I=JSON.parse(M.reason);q=I.reason,A=I.reconnect}catch(I){if(q=M.reason,O>=3500&&O<4000||O>=4500&&O<5000)A=!1}if(O<3000){if(O===1009)O=G5.messageSizeLimit,q="message size limit exceeded",A=!1;else O=J0.transportClosed,q="transport closed";if(Q._emulation&&!Q._transportWasOpen){if(Q._currentTransportIndex++,Q._currentTransportIndex>=Q._transports.length)Q._triedAllTransports=!0,Q._currentTransportIndex=0}}else Q._transportWasOpen=!0;if(Q._isConnecting()&&!W)Q.emit("error",{type:"transport",error:{code:e.transportClosed,message:"transport closed"},transport:Y.name()});Q._reconnecting=!1,Q._disconnect(O,q,A)},onMessage:function(M){Q._dataReceived(M)}},U),Q.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect($){let Z=this._constructConnectCommand(),J=this;return this._call(Z,$).then((H)=>{let X=H.reply.connect;if(J._connectResponse(X),H.next)H.next()},(H)=>{if(J._connectError(H.error),H.next)H.next()}),Z}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting()){this._debug("stop reconnecting: client not in connecting state");return}if(this._reconnecting){this._debug("reconnect already in progress, return from reconnect routine");return}if(this._transportClosed===!1){this._debug("waiting for transport close");return}this._reconnecting=!0;let $=this._token==="";if(!(this._refreshRequired||$&&this._config.getToken!==null)){if(this._config.getData)this._config.getData().then((H)=>{if(!this._isConnecting())return;this._data=H,this._initializeTransport()}).catch((H)=>this._handleGetDataError(H));else this._initializeTransport();return}let J=this;this._getToken().then(function(H){if(!J._isConnecting())return;if(H==null||H==null){J._failUnauthorized();return}if(J._token=H,J._debug("connection token refreshed"),J._config.getData)J._config.getData().then(function(X){if(!J._isConnecting())return;J._data=X,J._initializeTransport()}).catch((X)=>J._handleGetDataError(X));else J._initializeTransport()}).catch(function(H){if(!J._isConnecting())return;if(H instanceof l1){J._failUnauthorized();return}J.emit("error",{type:"connectToken",error:{code:e.clientConnectToken,message:H!==void 0?H.toString():""}});let X=J._getReconnectDelay();J._debug("error on getting connection token, reconnect after "+X+" milliseconds",H),J._reconnecting=!1,J._reconnectTimeout=setTimeout(()=>{J._startReconnecting()},X)})}_handleGetDataError($){if($ instanceof l1){this._failUnauthorized();return}this.emit("error",{type:"connectData",error:{code:e.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}});let Z=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+Z+" milliseconds",$),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_connectError($){if(this.state!==Q1.Connecting)return;if($.code===109)this._refreshRequired=!0;if($.code<100||$.temporary===!0||$.code===109)this.emit("error",{type:"connect",error:$}),this._debug("closing transport due to connect error"),this._disconnect($.code,$.message,!0);else this._disconnect($.code,$.message,!1)}_scheduleReconnect(){if(!this._isConnecting())return;let $=!1;if(this._emulation&&!this._transportWasOpen&&!this._triedAllTransports)$=!0;let Z=this._getReconnectDelay();if($)Z=0;this._debug("reconnect after "+Z+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_constructConnectCommand(){let $={};if(this._token)$.token=this._token;if(this._data)$.data=this._data;if(this._config.name)$.name=this._config.name;if(this._config.version)$.version=this._config.version;if(Object.keys(this._config.headers).length>0)$.headers=this._config.headers;let Z={},J=!1;for(let H in this._serverSubs)if(this._serverSubs.hasOwnProperty(H)&&this._serverSubs[H].recoverable){J=!0;let X={recover:!0};if(this._serverSubs[H].offset)X.offset=this._serverSubs[H].offset;if(this._serverSubs[H].epoch)X.epoch=this._serverSubs[H].epoch;Z[H]=X}if(J)$.subs=Z;return{connect:$}}_getHistoryRequest($,Z){let J={channel:$};if(Z!==void 0){if(Z.since){if(J.since={offset:Z.since.offset},Z.since.epoch)J.since.epoch=Z.since.epoch}if(Z.limit!==void 0)J.limit=Z.limit;if(Z.reverse===!0)J.reverse=!0}return J}_methodCall(){if(this._isConnected())return Promise.resolve();return new Promise(($,Z)=>{let J=setTimeout(function(){Z({code:e.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:J,resolve:$,reject:Z}})}_callPromise($,Z){return new Promise((J,H)=>{this._call($,!1).then((X)=>{var Q;let Y=Z(X.reply);J(Y),(Q=X.next)===null||Q===void 0||Q.call(X)},(X)=>{var Q;H(X.error),(Q=X.next)===null||Q===void 0||Q.call(X)})})}_dataReceived($){if(this._serverPing>0)this._waitServerPing();let Z=this._codec.decodeReplies($);this._dispatchPromise=this._dispatchPromise.then(()=>{let J;this._dispatchPromise=new Promise((H)=>{J=H}),this._dispatchSynchronized(Z,J)})}_dispatchSynchronized($,Z){let J=Promise.resolve();for(let H in $)if($.hasOwnProperty(H))J=J.then(()=>{return this._dispatchReply($[H])});J=J.then(()=>{Z()})}_dispatchReply($){let Z,J=new Promise((X)=>{Z=X});if($===void 0||$===null)return this._debug("dispatch: got undefined or null reply"),Z(),J;let H=$.id;if(H&&H>0)this._handleReply($,Z);else if(!$.push)this._handleServerPing(Z);else this._handlePush($.push,Z);return J}_call($,Z){return new Promise((J,H)=>{if($.id=this._nextCommandId(),this._registerCall($.id,J,H),!Z)this._addCommand($)})}_startConnecting(){if(this._debug("start connecting"),this._setState(Q1.Connecting))this.emit("connecting",{code:J0.connectCalled,reason:"connect called"});this._client=null,this._startReconnecting()}_disconnect($,Z,J){if(this._isDisconnected())return;this._transportIsOpen=!1;let H=this.state;this._reconnecting=!1;let X={code:$,reason:Z},Q=!1;if(J)Q=this._setState(Q1.Connecting);else Q=this._setState(Q1.Disconnected),this._rejectPromises({code:e.clientDisconnected,message:"disconnected"});if(this._clearOutgoingRequests(),H===Q1.Connecting)this._clearReconnectTimeout();if(H===Q1.Connected)this._clearConnectedState();if(Q)if(this._isConnecting())this.emit("connecting",X);else this.emit("disconnected",X);if(this._transport){this._debug("closing existing transport");let Y=this._transport;this._transport=null,Y.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(G5.unauthorized,"unauthorized",!1)}_getToken(){if(this._debug("get connection token"),!this._config.getToken)return this.emit("error",{type:"configuration",error:{code:e.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new l1(""));return this._config.getToken({})}_refresh(){let $=this._client,Z=this;this._getToken().then(function(J){if($!==Z._client)return;if(!J){Z._failUnauthorized();return}if(Z._token=J,Z._debug("connection token refreshed"),!Z._isConnected())return;let H={refresh:{token:Z._token}};Z._call(H,!1).then((X)=>{let Q=X.reply.refresh;if(Z._refreshResponse(Q),X.next)X.next()},(X)=>{if(Z._refreshError(X.error),X.next)X.next()})}).catch(function(J){if(!Z._isConnected())return;if(J instanceof l1){Z._failUnauthorized();return}Z.emit("error",{type:"refreshToken",error:{code:e.clientRefreshToken,message:J!==void 0?J.toString():""}}),Z._refreshTimeout=setTimeout(()=>Z._refresh(),Z._getRefreshRetryDelay())})}_refreshError($){if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._disconnect($.code,$.message,!1)}_getRefreshRetryDelay(){return X6(0,5000,1e4)}_refreshResponse($){if(this._refreshTimeout)clearTimeout(this._refreshTimeout),this._refreshTimeout=null;if($.expires)this._client=$.client,this._refreshTimeout=setTimeout(()=>this._refresh(),Q6($.ttl))}_removeSubscription($){if($===null)return;delete this._subs[$.channel]}_unsubscribe($){if(!this._transportIsOpen)return Promise.resolve();let J={unsubscribe:{channel:$.channel}},H=this;return new Promise((Q,Y)=>{this._call(J,!1).then((G)=>{if(Q(),G.next)G.next()},(G)=>{if(Q(),G.next)G.next();H._disconnect(J0.unsubscribeError,"unsubscribe error",!0)})})}_getSub($,Z){if(Z&&Z>0){for(let H in this._subs)if(this._subs.hasOwnProperty(H)){let X=this._subs[H];if(X._id===Z)return X}return null}let J=this._subs[$];if(!J)return null;return J}_isServerSub($){return this._serverSubs[$]!==void 0}_sendSubscribeCommands(){let $=[];for(let Z in this._subs){if(!this._subs.hasOwnProperty(Z))continue;let J=this._subs[Z];if(J._inflight===!0)continue;if(J.state===O1.Subscribing){let H=J._subscribe();if(H)$.push(H)}}return $}_connectResponse($){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;if(this._client=$.client,this._setState(Q1.Connected),this._refreshTimeout)clearTimeout(this._refreshTimeout);if($.expires)this._refreshTimeout=setTimeout(()=>this._refresh(),Q6($.ttl));this._session=$.session,this._node=$.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();let Z={client:$.client,transport:this._transport.subName()};if($.data)Z.data=$.data;if(this.emit("connected",Z),this._resolvePromises(),this._processServerSubs($.subs||{}),$.ping&&$.ping>0)this._serverPing=$.ping*1000,this._sendPong=$.pong===!0,this._waitServerPing();else this._serverPing=0}_processServerSubs($){for(let Z in $){if(!$.hasOwnProperty(Z))continue;let J=$[Z];this._serverSubs[Z]={offset:J.offset,epoch:J.epoch,recoverable:J.recoverable||!1};let H=this._getSubscribeContext(Z,J);this.emit("subscribed",H)}for(let Z in $){if(!$.hasOwnProperty(Z))continue;let J=$[Z];if(J.recovered){let H=J.publications;if(H&&H.length>0){for(let X in H)if(H.hasOwnProperty(X))this._handlePublication(Z,H[X])}}}for(let Z in this._serverSubs){if(!this._serverSubs.hasOwnProperty(Z))continue;if(!$[Z])this.emit("unsubscribed",{channel:Z}),delete this._serverSubs[Z]}}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearReconnectTimeout(){if(this._reconnectTimeout!==null)clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null}_clearServerPingTimeout(){if(this._serverPingTimeout!==null)clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null}_waitServerPing(){if(this._config.maxServerPingDelay===0)return;if(!this._isConnected())return;this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{if(!this._isConnected())return;this._disconnect(J0.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay)}_getSubscribeContext($,Z){let J={channel:$,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};if(Z.recovered)J.recovered=!0;if(Z.positioned)J.positioned=!0;if(Z.recoverable)J.recoverable=!0;if(Z.was_recovering)J.wasRecovering=!0;let H="";if("epoch"in Z)H=Z.epoch;let X=0;if("offset"in Z)X=Z.offset;if(J.positioned||J.recoverable)J.streamPosition={offset:X,epoch:H};if(Array.isArray(Z.publications)&&Z.publications.length>0)J.hasRecoveredPublications=!0;if(Z.data)J.data=Z.data;return J}_handleReply($,Z){let J=$.id;if(!(J in this._callbacks)){Z();return}let H=this._callbacks[J];if(clearTimeout(this._callbacks[J].timeout),delete this._callbacks[J],!ZY($)){let X=H.callback;if(!X)return;X({reply:$,next:Z})}else{let X=H.errback;if(!X){Z();return}let Q={code:$.error.code,message:$.error.message||"",temporary:$.error.temporary||!1};X({error:Q,next:Z})}}_handleJoin($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let X={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("join",X)}return}H._handleJoin(Z)}_handleLeave($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let X={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("leave",X)}return}H._handleLeave(Z)}_handleUnsubscribe($,Z){let J=this._getSub($,0);if(!J&&$){if(this._isServerSub($))delete this._serverSubs[$],this.emit("unsubscribed",{channel:$});return}if(Z.code<2500)J._setUnsubscribed(Z.code,Z.reason,!1);else J._setSubscribing(Z.code,Z.reason)}_handleSubscribe($,Z){this._serverSubs[$]={offset:Z.offset,epoch:Z.epoch,recoverable:Z.recoverable||!1},this.emit("subscribed",this._getSubscribeContext($,Z))}_handleDisconnect($){let Z=$.code,J=!0;if(Z>=3500&&Z<4000||Z>=4500&&Z<5000)J=!1;this._disconnect(Z,$.reason,J)}_getPublicationContext($,Z){let J={channel:$,data:Z.data};if(Z.offset)J.offset=Z.offset;if(Z.info)J.info=this._getJoinLeaveContext(Z.info);if(Z.tags)J.tags=Z.tags;return J}_getJoinLeaveContext($){let Z={client:$.client,user:$.user},J=$.conn_info;if(J)Z.connInfo=J;let H=$.chan_info;if(H)Z.chanInfo=H;return Z}_handlePublication($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let X=this._getPublicationContext($,Z);if(this.emit("publication",X),Z.offset!==void 0)this._serverSubs[$].offset=Z.offset}return}H._handlePublication(Z)}_handleMessage($){this.emit("message",{data:$.data})}_handleServerPing($){if(this._sendPong){let Z={};this._transportSendCommands([Z])}$()}_handlePush($,Z){let{channel:J,id:H}=$;if($.pub)this._handlePublication(J,$.pub,H);else if($.message)this._handleMessage($.message);else if($.join)this._handleJoin(J,$.join,H);else if($.leave)this._handleLeave(J,$.leave,H);else if($.unsubscribe)this._handleUnsubscribe(J,$.unsubscribe);else if($.subscribe)this._handleSubscribe(J,$.subscribe);else if($.disconnect)this._handleDisconnect($.disconnect);Z()}_flush(){let $=this._commands.slice(0);this._commands=[],this._transportSendCommands($)}_createErrorObject($,Z,J){let H={code:$,message:Z};if(J)H.temporary=!0;return H}_registerCall($,Z,J){this._callbacks[$]={callback:Z,errback:J,timeout:null},this._callbacks[$].timeout=setTimeout(()=>{if(delete this._callbacks[$],U4(J))J({error:this._createErrorObject(e.timeout,"timeout")})},this._config.timeout)}_addCommand($){if(this._batching)this._commands.push($);else this._transportSendCommands([$])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}}W5.SubscriptionState=O1;W5.State=Q1;W5.UnauthorizedError=l1;var GY=YY(null),A4=GY;var m1=Object.create(null);m1.open="0";m1.close="1";m1.ping="2";m1.pong="3";m1.message="4";m1.upgrade="5";m1.noop="6";var U5=Object.create(null);Object.keys(m1).forEach(($)=>{U5[m1[$]]=$});var K5={type:"error",data:"parser error"};var R4=typeof Blob==="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",V4=typeof ArrayBuffer==="function",N4=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$&&$.buffer instanceof ArrayBuffer},q5=({type:$,data:Z},J,H)=>{if(R4&&Z instanceof Blob)if(J)return H(Z);else return O4(Z,H);else if(V4&&(Z instanceof ArrayBuffer||N4(Z)))if(J)return H(Z);else return O4(new Blob([Z]),H);return H(m1[$]+(Z||""))},O4=($,Z)=>{let J=new FileReader;return J.onload=function(){let H=J.result.split(",")[1];Z("b"+(H||""))},J.readAsDataURL($)};function D4($){if($ instanceof Uint8Array)return $;else if($ instanceof ArrayBuffer)return new Uint8Array($);else return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}var m2;function I4($,Z){if(R4&&$.data instanceof Blob)return $.data.arrayBuffer().then(D4).then(Z);else if(V4&&($.data instanceof ArrayBuffer||N4($.data)))return Z(D4($.data));q5($,!1,(J)=>{if(!m2)m2=new TextEncoder;Z(m2.encode(J))})}var L5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let $=0;$<64;$++)L5["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt($)]=$;var T4=($)=>{let Z=$.length*0.75,J=$.length,H,X=0,Q,Y,G,W;if($[$.length-1]==="="){if(Z--,$[$.length-2]==="=")Z--}let K=new ArrayBuffer(Z),U=new Uint8Array(K);for(H=0;H<J;H+=4)Q=L5[$.charCodeAt(H)],Y=L5[$.charCodeAt(H+1)],G=L5[$.charCodeAt(H+2)],W=L5[$.charCodeAt(H+3)],U[X++]=Q<<2|Y>>4,U[X++]=(Y&15)<<4|G>>2,U[X++]=(G&3)<<6|W&63;return K};var WY=typeof ArrayBuffer==="function",M5=($,Z)=>{if(typeof $!=="string")return{type:"message",data:P4($,Z)};let J=$.charAt(0);if(J==="b")return{type:"message",data:UY($.substring(1),Z)};if(!U5[J])return K5;return $.length>1?{type:U5[J],data:$.substring(1)}:{type:U5[J]}},UY=($,Z)=>{if(WY){let J=T4($);return P4(J,Z)}else return{base64:!0,data:$}},P4=($,Z)=>{switch(Z){case"blob":if($ instanceof Blob)return $;else return new Blob([$]);case"arraybuffer":default:if($ instanceof ArrayBuffer)return $;else return $.buffer}};var w4=String.fromCharCode(30),_4=($,Z)=>{let J=$.length,H=Array(J),X=0;$.forEach((Q,Y)=>{q5(Q,!1,(G)=>{if(H[Y]=G,++X===J)Z(H.join(w4))})})},C4=($,Z)=>{let J=$.split(w4),H=[];for(let X=0;X<J.length;X++){let Q=M5(J[X],Z);if(H.push(Q),Q.type==="error")break}return H};function S4(){return new TransformStream({transform($,Z){I4($,(J)=>{let H=J.length,X;if(H<126)X=new Uint8Array(1),new DataView(X.buffer).setUint8(0,H);else if(H<65536){X=new Uint8Array(3);let Q=new DataView(X.buffer);Q.setUint8(0,126),Q.setUint16(1,H)}else{X=new Uint8Array(9);let Q=new DataView(X.buffer);Q.setUint8(0,127),Q.setBigUint64(1,BigInt(H))}if($.data&&typeof $.data!=="string")X[0]|=128;Z.enqueue(X),Z.enqueue(J)})}})}var f2;function G6($){return $.reduce((Z,J)=>Z+J.length,0)}function W6($,Z){if($[0].length===Z)return $.shift();let J=new Uint8Array(Z),H=0;for(let X=0;X<Z;X++)if(J[X]=$[0][H++],H===$[0].length)$.shift(),H=0;if($.length&&H<$[0].length)$[0]=$[0].slice(H);return J}function j4($,Z){if(!f2)f2=new TextDecoder;let J=[],H=0,X=-1,Q=!1;return new TransformStream({transform(Y,G){J.push(Y);while(!0){if(H===0){if(G6(J)<1)break;let W=W6(J,1);if(Q=(W[0]&128)===128,X=W[0]&127,X<126)H=3;else if(X===126)H=1;else H=2}else if(H===1){if(G6(J)<2)break;let W=W6(J,2);X=new DataView(W.buffer,W.byteOffset,W.length).getUint16(0),H=3}else if(H===2){if(G6(J)<8)break;let W=W6(J,8),K=new DataView(W.buffer,W.byteOffset,W.length),U=K.getUint32(0);if(U>Math.pow(2,21)-1){G.enqueue(K5);break}X=U*Math.pow(2,32)+K.getUint32(4),H=3}else{if(G6(J)<X)break;let W=W6(J,X);G.enqueue(M5(Q?W:f2.decode(W),Z)),H=0}if(X===0||X>$){G.enqueue(K5);break}}}})}var u2=4;function t($){if($)return KY($)}function KY($){for(var Z in t.prototype)$[Z]=t.prototype[Z];return $}t.prototype.on=t.prototype.addEventListener=function($,Z){return this._callbacks=this._callbacks||{},(this._callbacks["$"+$]=this._callbacks["$"+$]||[]).push(Z),this};t.prototype.once=function($,Z){function J(){this.off($,J),Z.apply(this,arguments)}return J.fn=Z,this.on($,J),this};t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function($,Z){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var J=this._callbacks["$"+$];if(!J)return this;if(arguments.length==1)return delete this._callbacks["$"+$],this;var H;for(var X=0;X<J.length;X++)if(H=J[X],H===Z||H.fn===Z){J.splice(X,1);break}if(J.length===0)delete this._callbacks["$"+$];return this};t.prototype.emit=function($){this._callbacks=this._callbacks||{};var Z=Array(arguments.length-1),J=this._callbacks["$"+$];for(var H=1;H<arguments.length;H++)Z[H-1]=arguments[H];if(J){J=J.slice(0);for(var H=0,X=J.length;H<X;++H)J[H].apply(this,Z)}return this};t.prototype.emitReserved=t.prototype.emit;t.prototype.listeners=function($){return this._callbacks=this._callbacks||{},this._callbacks["$"+$]||[]};t.prototype.hasListeners=function($){return!!this.listeners($).length};var o1=(()=>{if(typeof Promise==="function"&&typeof Promise.resolve==="function")return(Z)=>Promise.resolve().then(Z);else return(Z,J)=>J(Z,0)})(),D1=(()=>{if(typeof self<"u")return self;else if(typeof window<"u")return window;else return Function("return this")()})(),E4="arraybuffer";function x4(){}function U6($,...Z){return Z.reduce((J,H)=>{if($.hasOwnProperty(H))J[H]=$[H];return J},{})}var qY=D1.setTimeout,LY=D1.clearTimeout;function t1($,Z){if(Z.useNativeTimers)$.setTimeoutFn=qY.bind(D1),$.clearTimeoutFn=LY.bind(D1);else $.setTimeoutFn=D1.setTimeout.bind(D1),$.clearTimeoutFn=D1.clearTimeout.bind(D1)}var MY=1.33;function g4($){if(typeof $==="string")return BY($);return Math.ceil(($.byteLength||$.size)*MY)}function BY($){let Z=0,J=0;for(let H=0,X=$.length;H<X;H++)if(Z=$.charCodeAt(H),Z<128)J+=1;else if(Z<2048)J+=2;else if(Z<55296||Z>=57344)J+=3;else H++,J+=4;return J}function K6(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function b4($){let Z="";for(let J in $)if($.hasOwnProperty(J)){if(Z.length)Z+="&";Z+=encodeURIComponent(J)+"="+encodeURIComponent($[J])}return Z}function h4($){let Z={},J=$.split("&");for(let H=0,X=J.length;H<X;H++){let Q=J[H].split("=");Z[decodeURIComponent(Q[0])]=decodeURIComponent(Q[1])}return Z}class p2 extends Error{constructor($,Z,J){super($);this.description=Z,this.context=J,this.type="TransportError"}}class H0 extends t{constructor($){super();this.writable=!1,t1(this,$),this.opts=$,this.query=$.query,this.socket=$.socket,this.supportsBinary=!$.forceBase64}onError($,Z,J){return super.emitReserved("error",new p2($,Z,J)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){if(this.readyState==="opening"||this.readyState==="open")this.doClose(),this.onClose();return this}send($){if(this.readyState==="open")this.write($)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData($){let Z=M5($,this.socket.binaryType);this.onPacket(Z)}onPacket($){super.emitReserved("packet",$)}onClose($){this.readyState="closed",super.emitReserved("close",$)}pause($){}createUri($,Z={}){return $+"://"+this._hostname()+this._port()+this.opts.path+this._query(Z)}_hostname(){let $=this.opts.hostname;return $.indexOf(":")===-1?$:"["+$+"]"}_port(){if(this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80))return":"+this.opts.port;else return""}_query($){let Z=b4($);return Z.length?"?"+Z:""}}class q6 extends H0{constructor(){super(...arguments);this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause($){this.readyState="pausing";let Z=()=>{this.readyState="paused",$()};if(this._polling||!this.writable){let J=0;if(this._polling)J++,this.once("pollComplete",function(){--J||Z()});if(!this.writable)J++,this.once("drain",function(){--J||Z()})}else Z()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData($){let Z=(J)=>{if(this.readyState==="opening"&&J.type==="open")this.onOpen();if(J.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(J)};if(C4($,this.socket.binaryType).forEach(Z),this.readyState!=="closed"){if(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open")this._poll()}}doClose(){let $=()=>{this.write([{type:"close"}])};if(this.readyState==="open")$();else this.once("open",$)}write($){this.writable=!1,_4($,(Z)=>{this.doWrite(Z,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let $=this.opts.secure?"https":"http",Z=this.query||{};if(this.opts.timestampRequests!==!1)Z[this.opts.timestampParam]=K6();if(!this.supportsBinary&&!Z.sid)Z.b64=1;return this.createUri($,Z)}}var y4=!1;try{y4=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch($){}var v4=y4;function FY(){}class m4 extends q6{constructor($){super($);if(typeof location<"u"){let Z=location.protocol==="https:",J=location.port;if(!J)J=Z?"443":"80";this.xd=typeof location<"u"&&$.hostname!==location.hostname||J!==$.port}}doWrite($,Z){let J=this.request({method:"POST",data:$});J.on("success",Z),J.on("error",(H,X)=>{this.onError("xhr post error",H,X)})}doPoll(){let $=this.request();$.on("data",this.onData.bind(this)),$.on("error",(Z,J)=>{this.onError("xhr poll error",Z,J)}),this.pollXhr=$}}class i1 extends t{constructor($,Z,J){super();this.createRequest=$,t1(this,J),this._opts=J,this._method=J.method||"GET",this._uri=Z,this._data=J.data!==void 0?J.data:null,this._create()}_create(){var $;let Z=U6(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");Z.xdomain=!!this._opts.xd;let J=this._xhr=this.createRequest(Z);try{J.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){J.setDisableHeaderCheck&&J.setDisableHeaderCheck(!0);for(let H in this._opts.extraHeaders)if(this._opts.extraHeaders.hasOwnProperty(H))J.setRequestHeader(H,this._opts.extraHeaders[H])}}catch(H){}if(this._method==="POST")try{J.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(H){}try{J.setRequestHeader("Accept","*/*")}catch(H){}if(($=this._opts.cookieJar)===null||$===void 0||$.addCookies(J),"withCredentials"in J)J.withCredentials=this._opts.withCredentials;if(this._opts.requestTimeout)J.timeout=this._opts.requestTimeout;J.onreadystatechange=()=>{var H;if(J.readyState===3)(H=this._opts.cookieJar)===null||H===void 0||H.parseCookies(J.getResponseHeader("set-cookie"));if(J.readyState!==4)return;if(J.status===200||J.status===1223)this._onLoad();else this.setTimeoutFn(()=>{this._onError(typeof J.status==="number"?J.status:0)},0)},J.send(this._data)}catch(H){this.setTimeoutFn(()=>{this._onError(H)},0);return}if(typeof document<"u")this._index=i1.requestsCount++,i1.requests[this._index]=this}_onError($){this.emitReserved("error",$,this._xhr),this._cleanup(!0)}_cleanup($){if(typeof this._xhr>"u"||this._xhr===null)return;if(this._xhr.onreadystatechange=FY,$)try{this._xhr.abort()}catch(Z){}if(typeof document<"u")delete i1.requests[this._index];this._xhr=null}_onLoad(){let $=this._xhr.responseText;if($!==null)this.emitReserved("data",$),this.emitReserved("success"),this._cleanup()}abort(){this._cleanup()}}i1.requestsCount=0;i1.requests={};if(typeof document<"u"){if(typeof attachEvent==="function")attachEvent("onunload",k4);else if(typeof addEventListener==="function"){let $="onpagehide"in D1?"pagehide":"unload";addEventListener($,k4,!1)}}function k4(){for(let $ in i1.requests)if(i1.requests.hasOwnProperty($))i1.requests[$].abort()}var zY=function(){let $=f4({xdomain:!1});return $&&$.responseType!==null}();class O0 extends m4{constructor($){super($);let Z=$&&$.forceBase64;this.supportsBinary=zY&&!Z}request($={}){return Object.assign($,{xd:this.xd},this.opts),new i1(f4,this.uri(),$)}}function f4($){let Z=$.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!Z||v4))return new XMLHttpRequest}catch(J){}if(!Z)try{return new D1[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(J){}}var u4=typeof navigator<"u"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class p4 extends H0{get name(){return"websocket"}doOpen(){let $=this.uri(),Z=this.opts.protocols,J=u4?{}:U6(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");if(this.opts.extraHeaders)J.headers=this.opts.extraHeaders;try{this.ws=this.createSocket($,Z,J)}catch(H){return this.emitReserved("error",H)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{if(this.opts.autoUnref)this.ws._socket.unref();this.onOpen()},this.ws.onclose=($)=>this.onClose({description:"websocket connection closed",context:$}),this.ws.onmessage=($)=>this.onData($.data),this.ws.onerror=($)=>this.onError("websocket error",$)}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let J=$[Z],H=Z===$.length-1;q5(J,this.supportsBinary,(X)=>{try{this.doWrite(J,X)}catch(Q){}if(H)o1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){if(typeof this.ws<"u")this.ws.onerror=()=>{},this.ws.close(),this.ws=null}uri(){let $=this.opts.secure?"wss":"ws",Z=this.query||{};if(this.opts.timestampRequests)Z[this.opts.timestampParam]=K6();if(!this.supportsBinary)Z.b64=1;return this.createUri($,Z)}}var l2=D1.WebSocket||D1.MozWebSocket;class D0 extends p4{createSocket($,Z,J){return!u4?Z?new l2($,Z):new l2($):new l2($,Z,J)}doWrite($,Z){this.ws.send(Z)}}class B5 extends H0{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch($){return this.emitReserved("error",$)}this._transport.closed.then(()=>{this.onClose()}).catch(($)=>{this.onError("webtransport error",$)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(($)=>{let Z=j4(Number.MAX_SAFE_INTEGER,this.socket.binaryType),J=$.readable.pipeThrough(Z).getReader(),H=S4();H.readable.pipeTo($.writable),this._writer=H.writable.getWriter();let X=()=>{J.read().then(({done:Y,value:G})=>{if(Y)return;this.onPacket(G),X()}).catch((Y)=>{})};X();let Q={type:"open"};if(this.query.sid)Q.data=`{"sid":"${this.query.sid}"}`;this._writer.write(Q).then(()=>this.onOpen())})})}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let J=$[Z],H=Z===$.length-1;this._writer.write(J).then(()=>{if(H)o1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var $;($=this._transport)===null||$===void 0||$.close()}}var i2={websocket:D0,webtransport:B5,polling:O0};var AY=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,OY=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function y0($){if($.length>8000)throw"URI too long";let Z=$,J=$.indexOf("["),H=$.indexOf("]");if(J!=-1&&H!=-1)$=$.substring(0,J)+$.substring(J,H).replace(/:/g,";")+$.substring(H,$.length);let X=AY.exec($||""),Q={},Y=14;while(Y--)Q[OY[Y]]=X[Y]||"";if(J!=-1&&H!=-1)Q.source=Z,Q.host=Q.host.substring(1,Q.host.length-1).replace(/;/g,":"),Q.authority=Q.authority.replace("[","").replace("]","").replace(/;/g,":"),Q.ipv6uri=!0;return Q.pathNames=DY(Q,Q.path),Q.queryKey=RY(Q,Q.query),Q}function DY($,Z){let J=/\/{2,9}/g,H=Z.replace(J,"/").split("/");if(Z.slice(0,1)=="/"||Z.length===0)H.splice(0,1);if(Z.slice(-1)=="/")H.splice(H.length-1,1);return H}function RY($,Z){let J={};return Z.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(H,X,Q){if(X)J[X]=Q}),J}var d2=typeof addEventListener==="function"&&typeof removeEventListener==="function",L6=[];if(d2)addEventListener("offline",()=>{L6.forEach(($)=>$())},!1);class e1 extends t{constructor($,Z){super();if(this.binaryType=E4,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,$&&typeof $==="object")Z=$,$=null;if($){let J=y0($);if(Z.hostname=J.host,Z.secure=J.protocol==="https"||J.protocol==="wss",Z.port=J.port,J.query)Z.query=J.query}else if(Z.host)Z.hostname=y0(Z.host).host;if(t1(this,Z),this.secure=Z.secure!=null?Z.secure:typeof location<"u"&&location.protocol==="https:",Z.hostname&&!Z.port)Z.port=this.secure?"443":"80";if(this.hostname=Z.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=Z.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},Z.transports.forEach((J)=>{let H=J.prototype.name;this.transports.push(H),this._transportsByName[H]=J}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},Z),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query==="string")this.opts.query=h4(this.opts.query);if(d2){if(this.opts.closeOnBeforeunload)this._beforeunloadEventListener=()=>{if(this.transport)this.transport.removeAllListeners(),this.transport.close()},addEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this.hostname!=="localhost")this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},L6.push(this._offlineEventListener)}if(this.opts.withCredentials)this._cookieJar=x4();this._open()}createTransport($){let Z=Object.assign({},this.opts.query);if(Z.EIO=u2,Z.transport=$,this.id)Z.sid=this.id;let J=Object.assign({},this.opts,{query:Z,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[$]);return new this._transportsByName[$](J)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let $=this.opts.rememberUpgrade&&e1.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let Z=this.createTransport($);Z.open(),this.setTransport(Z)}setTransport($){if(this.transport)this.transport.removeAllListeners();this.transport=$,$.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(Z)=>this._onClose("transport close",Z))}onOpen(){this.readyState="open",e1.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket($){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",$),this.emitReserved("heartbeat"),$.type){case"open":this.onHandshake(JSON.parse($.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let Z=Error("server error");Z.code=$.data,this._onError(Z);break;case"message":this.emitReserved("data",$.data),this.emitReserved("message",$.data);break}}onHandshake($){if(this.emitReserved("handshake",$),this.id=$.sid,this.transport.query.sid=$.sid,this._pingInterval=$.pingInterval,this._pingTimeout=$.pingTimeout,this._maxPayload=$.maxPayload,this.onOpen(),this.readyState==="closed")return;this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let $=this._pingInterval+this._pingTimeout;if(this._pingTimeoutTime=Date.now()+$,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},$),this.opts.autoUnref)this._pingTimeoutTimer.unref()}_onDrain(){if(this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0)this.emitReserved("drain");else this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let $=this._getWritablePackets();this.transport.send($),this._prevBufferLen=$.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let Z=1;for(let J=0;J<this.writeBuffer.length;J++){let H=this.writeBuffer[J].data;if(H)Z+=g4(H);if(J>0&&Z>this._maxPayload)return this.writeBuffer.slice(0,J);Z+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let $=Date.now()>this._pingTimeoutTime;if($)this._pingTimeoutTime=0,o1(()=>{this._onClose("ping timeout")},this.setTimeoutFn);return $}write($,Z,J){return this._sendPacket("message",$,Z,J),this}send($,Z,J){return this._sendPacket("message",$,Z,J),this}_sendPacket($,Z,J,H){if(typeof Z==="function")H=Z,Z=void 0;if(typeof J==="function")H=J,J=null;if(this.readyState==="closing"||this.readyState==="closed")return;J=J||{},J.compress=J.compress!==!1;let X={type:$,data:Z,options:J};if(this.emitReserved("packetCreate",X),this.writeBuffer.push(X),H)this.once("flush",H);this.flush()}close(){let $=()=>{this._onClose("forced close"),this.transport.close()},Z=()=>{this.off("upgrade",Z),this.off("upgradeError",Z),$()},J=()=>{this.once("upgrade",Z),this.once("upgradeError",Z)};if(this.readyState==="opening"||this.readyState==="open")if(this.readyState="closing",this.writeBuffer.length)this.once("drain",()=>{if(this.upgrading)J();else $()});else if(this.upgrading)J();else $();return this}_onError($){if(e1.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",$),this._onClose("transport error",$)}_onClose($,Z){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),d2){if(this._beforeunloadEventListener)removeEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this._offlineEventListener){let J=L6.indexOf(this._offlineEventListener);if(J!==-1)L6.splice(J,1)}}this.readyState="closed",this.id=null,this.emitReserved("close",$,Z),this.writeBuffer=[],this._prevBufferLen=0}}}e1.protocol=u2;class c2 extends e1{constructor(){super(...arguments);this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let $=0;$<this._upgrades.length;$++)this._probe(this._upgrades[$])}_probe($){let Z=this.createTransport($),J=!1;e1.priorWebsocketSuccess=!1;let H=()=>{if(J)return;Z.send([{type:"ping",data:"probe"}]),Z.once("packet",(U)=>{if(J)return;if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",Z),!Z)return;e1.priorWebsocketSuccess=Z.name==="websocket",this.transport.pause(()=>{if(J)return;if(this.readyState==="closed")return;K(),this.setTransport(Z),Z.send([{type:"upgrade"}]),this.emitReserved("upgrade",Z),Z=null,this.upgrading=!1,this.flush()})}else{let L=Error("probe error");L.transport=Z.name,this.emitReserved("upgradeError",L)}})};function X(){if(J)return;J=!0,K(),Z.close(),Z=null}let Q=(U)=>{let L=Error("probe error: "+U);L.transport=Z.name,X(),this.emitReserved("upgradeError",L)};function Y(){Q("transport closed")}function G(){Q("socket closed")}function W(U){if(Z&&U.name!==Z.name)X()}let K=()=>{Z.removeListener("open",H),Z.removeListener("error",Q),Z.removeListener("close",Y),this.off("close",G),this.off("upgrading",W)};if(Z.once("open",H),Z.once("error",Q),Z.once("close",Y),this.once("close",G),this.once("upgrading",W),this._upgrades.indexOf("webtransport")!==-1&&$!=="webtransport")this.setTimeoutFn(()=>{if(!J)Z.open()},200);else Z.open()}onHandshake($){this._upgrades=this._filterUpgrades($.upgrades),super.onHandshake($)}_filterUpgrades($){let Z=[];for(let J=0;J<$.length;J++)if(~this.transports.indexOf($[J]))Z.push($[J]);return Z}}class F5 extends c2{constructor($,Z={}){let J=typeof $==="object"?$:Z;if(!J.transports||J.transports&&typeof J.transports[0]==="string")J.transports=(J.transports||["polling","websocket","webtransport"]).map((H)=>i2[H]).filter((H)=>!!H);super($,J)}}var fO=F5.protocol;function l4($,Z="",J){let H=$;if(J=J||typeof location<"u"&&location,$==null)$=J.protocol+"//"+J.host;if(typeof $==="string"){if($.charAt(0)==="/")if($.charAt(1)==="/")$=J.protocol+$;else $=J.host+$;if(!/^(https?|wss?):\/\//.test($))if(typeof J<"u")$=J.protocol+"//"+$;else $="https://"+$;H=y0($)}if(!H.port){if(/^(http|ws)$/.test(H.protocol))H.port="80";else if(/^(http|ws)s$/.test(H.protocol))H.port="443"}H.path=H.path||"/";let Q=H.host.indexOf(":")!==-1?"["+H.host+"]":H.host;return H.id=H.protocol+"://"+Q+":"+H.port+Z,H.href=H.protocol+"://"+Q+(J&&J.port===H.port?"":":"+H.port),H}var s2={};b2(s2,{protocol:()=>a4,isPacketValid:()=>jY,PacketType:()=>v,Encoder:()=>n4,Decoder:()=>n2});var NY=typeof ArrayBuffer==="function",IY=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$.buffer instanceof ArrayBuffer},i4=Object.prototype.toString,TY=typeof Blob==="function"||typeof Blob<"u"&&i4.call(Blob)==="[object BlobConstructor]",PY=typeof File==="function"||typeof File<"u"&&i4.call(File)==="[object FileConstructor]";function A5($){return NY&&($ instanceof ArrayBuffer||IY($))||TY&&$ instanceof Blob||PY&&$ instanceof File}function z5($,Z){if(!$||typeof $!=="object")return!1;if(Array.isArray($)){for(let J=0,H=$.length;J<H;J++)if(z5($[J]))return!0;return!1}if(A5($))return!0;if($.toJSON&&typeof $.toJSON==="function"&&arguments.length===1)return z5($.toJSON(),!0);for(let J in $)if(Object.prototype.hasOwnProperty.call($,J)&&z5($[J]))return!0;return!1}function d4($){let Z=[],J=$.data,H=$;return H.data=r2(J,Z),H.attachments=Z.length,{packet:H,buffers:Z}}function r2($,Z){if(!$)return $;if(A5($)){let J={_placeholder:!0,num:Z.length};return Z.push($),J}else if(Array.isArray($)){let J=Array($.length);for(let H=0;H<$.length;H++)J[H]=r2($[H],Z);return J}else if(typeof $==="object"&&!($ instanceof Date)){let J={};for(let H in $)if(Object.prototype.hasOwnProperty.call($,H))J[H]=r2($[H],Z);return J}return $}function c4($,Z){return $.data=a2($.data,Z),delete $.attachments,$}function a2($,Z){if(!$)return $;if($&&$._placeholder===!0)if(typeof $.num==="number"&&$.num>=0&&$.num<Z.length)return Z[$.num];else throw Error("illegal attachments");else if(Array.isArray($))for(let J=0;J<$.length;J++)$[J]=a2($[J],Z);else if(typeof $==="object"){for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))$[J]=a2($[J],Z)}return $}var r4=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],a4=5,v;(function($){$[$.CONNECT=0]="CONNECT",$[$.DISCONNECT=1]="DISCONNECT",$[$.EVENT=2]="EVENT",$[$.ACK=3]="ACK",$[$.CONNECT_ERROR=4]="CONNECT_ERROR",$[$.BINARY_EVENT=5]="BINARY_EVENT",$[$.BINARY_ACK=6]="BINARY_ACK"})(v||(v={}));class n4{constructor($){this.replacer=$}encode($){if($.type===v.EVENT||$.type===v.ACK){if(z5($))return this.encodeAsBinary({type:$.type===v.EVENT?v.BINARY_EVENT:v.BINARY_ACK,nsp:$.nsp,data:$.data,id:$.id})}return[this.encodeAsString($)]}encodeAsString($){let Z=""+$.type;if($.type===v.BINARY_EVENT||$.type===v.BINARY_ACK)Z+=$.attachments+"-";if($.nsp&&$.nsp!=="/")Z+=$.nsp+",";if($.id!=null)Z+=$.id;if($.data!=null)Z+=JSON.stringify($.data,this.replacer);return Z}encodeAsBinary($){let Z=d4($),J=this.encodeAsString(Z.packet),H=Z.buffers;return H.unshift(J),H}}class n2 extends t{constructor($){super();this.reviver=$}add($){let Z;if(typeof $==="string"){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");Z=this.decodeString($);let J=Z.type===v.BINARY_EVENT;if(J||Z.type===v.BINARY_ACK){if(Z.type=J?v.EVENT:v.ACK,this.reconstructor=new s4(Z),Z.attachments===0)super.emitReserved("decoded",Z)}else super.emitReserved("decoded",Z)}else if(A5($)||$.base64){if(!this.reconstructor)throw Error("got binary data when not reconstructing a packet");else if(Z=this.reconstructor.takeBinaryData($),Z)this.reconstructor=null,super.emitReserved("decoded",Z)}else throw Error("Unknown type: "+$)}decodeString($){let Z=0,J={type:Number($.charAt(0))};if(v[J.type]===void 0)throw Error("unknown packet type "+J.type);if(J.type===v.BINARY_EVENT||J.type===v.BINARY_ACK){let X=Z+1;while($.charAt(++Z)!=="-"&&Z!=$.length);let Q=$.substring(X,Z);if(Q!=Number(Q)||$.charAt(Z)!=="-")throw Error("Illegal attachments");J.attachments=Number(Q)}if($.charAt(Z+1)==="/"){let X=Z+1;while(++Z){if($.charAt(Z)===",")break;if(Z===$.length)break}J.nsp=$.substring(X,Z)}else J.nsp="/";let H=$.charAt(Z+1);if(H!==""&&Number(H)==H){let X=Z+1;while(++Z){let Q=$.charAt(Z);if(Q==null||Number(Q)!=Q){--Z;break}if(Z===$.length)break}J.id=Number($.substring(X,Z+1))}if($.charAt(++Z)){let X=this.tryParse($.substr(Z));if(n2.isPayloadValid(J.type,X))J.data=X;else throw Error("invalid payload")}return J}tryParse($){try{return JSON.parse($,this.reviver)}catch(Z){return!1}}static isPayloadValid($,Z){switch($){case v.CONNECT:return M6(Z);case v.DISCONNECT:return Z===void 0;case v.CONNECT_ERROR:return typeof Z==="string"||M6(Z);case v.EVENT:case v.BINARY_EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&r4.indexOf(Z[0])===-1);case v.ACK:case v.BINARY_ACK:return Array.isArray(Z)}}destroy(){if(this.reconstructor)this.reconstructor.finishedReconstruction(),this.reconstructor=null}}class s4{constructor($){this.packet=$,this.buffers=[],this.reconPack=$}takeBinaryData($){if(this.buffers.push($),this.buffers.length===this.reconPack.attachments){let Z=c4(this.reconPack,this.buffers);return this.finishedReconstruction(),Z}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function wY($){return typeof $==="string"}var _Y=Number.isInteger||function($){return typeof $==="number"&&isFinite($)&&Math.floor($)===$};function CY($){return $===void 0||_Y($)}function M6($){return Object.prototype.toString.call($)==="[object Object]"}function SY($,Z){switch($){case v.CONNECT:return Z===void 0||M6(Z);case v.DISCONNECT:return Z===void 0;case v.EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&r4.indexOf(Z[0])===-1);case v.ACK:return Array.isArray(Z);case v.CONNECT_ERROR:return typeof Z==="string"||M6(Z);default:return!1}}function jY($){return wY($.nsp)&&CY($.id)&&SY($.type,$.data)}function C1($,Z,J){return $.on(Z,J),function(){$.off(Z,J)}}var EY=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class O5 extends t{constructor($,Z,J){super();if(this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=$,this.nsp=Z,J&&J.auth)this.auth=J.auth;if(this._opts=Object.assign({},J),this.io._autoConnect)this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let $=this.io;this.subs=[C1($,"open",this.onopen.bind(this)),C1($,"packet",this.onpacket.bind(this)),C1($,"error",this.onerror.bind(this)),C1($,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){if(this.connected)return this;if(this.subEvents(),!this.io._reconnecting)this.io.open();if(this.io._readyState==="open")this.onopen();return this}open(){return this.connect()}send(...$){return $.unshift("message"),this.emit.apply(this,$),this}emit($,...Z){var J,H,X;if(EY.hasOwnProperty($))throw Error('"'+$.toString()+'" is a reserved event name');if(Z.unshift($),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(Z),this;let Q={type:v.EVENT,data:Z};if(Q.options={},Q.options.compress=this.flags.compress!==!1,typeof Z[Z.length-1]==="function"){let K=this.ids++,U=Z.pop();this._registerAckCallback(K,U),Q.id=K}let Y=(H=(J=this.io.engine)===null||J===void 0?void 0:J.transport)===null||H===void 0?void 0:H.writable,G=this.connected&&!((X=this.io.engine)===null||X===void 0?void 0:X._hasPingExpired());if(this.flags.volatile&&!Y);else if(G)this.notifyOutgoingListeners(Q),this.packet(Q);else this.sendBuffer.push(Q);return this.flags={},this}_registerAckCallback($,Z){var J;let H=(J=this.flags.timeout)!==null&&J!==void 0?J:this._opts.ackTimeout;if(H===void 0){this.acks[$]=Z;return}let X=this.io.setTimeoutFn(()=>{delete this.acks[$];for(let Y=0;Y<this.sendBuffer.length;Y++)if(this.sendBuffer[Y].id===$)this.sendBuffer.splice(Y,1);Z.call(this,Error("operation has timed out"))},H),Q=(...Y)=>{this.io.clearTimeoutFn(X),Z.apply(this,Y)};Q.withError=!0,this.acks[$]=Q}emitWithAck($,...Z){return new Promise((J,H)=>{let X=(Q,Y)=>{return Q?H(Q):J(Y)};X.withError=!0,Z.push(X),this.emit($,...Z)})}_addToQueue($){let Z;if(typeof $[$.length-1]==="function")Z=$.pop();let J={id:this._queueSeq++,tryCount:0,pending:!1,args:$,flags:Object.assign({fromQueue:!0},this.flags)};$.push((H,...X)=>{if(J!==this._queue[0]);if(H!==null){if(J.tryCount>this._opts.retries){if(this._queue.shift(),Z)Z(H)}}else if(this._queue.shift(),Z)Z(null,...X);return J.pending=!1,this._drainQueue()}),this._queue.push(J),this._drainQueue()}_drainQueue($=!1){if(!this.connected||this._queue.length===0)return;let Z=this._queue[0];if(Z.pending&&!$)return;Z.pending=!0,Z.tryCount++,this.flags=Z.flags,this.emit.apply(this,Z.args)}packet($){$.nsp=this.nsp,this.io._packet($)}onopen(){if(typeof this.auth=="function")this.auth(($)=>{this._sendConnectPacket($)});else this._sendConnectPacket(this.auth)}_sendConnectPacket($){this.packet({type:v.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},$):$})}onerror($){if(!this.connected)this.emitReserved("connect_error",$)}onclose($,Z){this.connected=!1,delete this.id,this.emitReserved("disconnect",$,Z),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(($)=>{if(!this.sendBuffer.some((J)=>String(J.id)===$)){let J=this.acks[$];if(delete this.acks[$],J.withError)J.call(this,Error("socket has been disconnected"))}})}onpacket($){if($.nsp!==this.nsp)return;switch($.type){case v.CONNECT:if($.data&&$.data.sid)this.onconnect($.data.sid,$.data.pid);else this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case v.EVENT:case v.BINARY_EVENT:this.onevent($);break;case v.ACK:case v.BINARY_ACK:this.onack($);break;case v.DISCONNECT:this.ondisconnect();break;case v.CONNECT_ERROR:this.destroy();let J=Error($.data.message);J.data=$.data.data,this.emitReserved("connect_error",J);break}}onevent($){let Z=$.data||[];if($.id!=null)Z.push(this.ack($.id));if(this.connected)this.emitEvent(Z);else this.receiveBuffer.push(Object.freeze(Z))}emitEvent($){if(this._anyListeners&&this._anyListeners.length){let Z=this._anyListeners.slice();for(let J of Z)J.apply(this,$)}if(super.emit.apply(this,$),this._pid&&$.length&&typeof $[$.length-1]==="string")this._lastOffset=$[$.length-1]}ack($){let Z=this,J=!1;return function(...H){if(J)return;J=!0,Z.packet({type:v.ACK,id:$,data:H})}}onack($){let Z=this.acks[$.id];if(typeof Z!=="function")return;if(delete this.acks[$.id],Z.withError)$.data.unshift(null);Z.apply(this,$.data)}onconnect($,Z){this.id=$,this.recovered=Z&&this._pid===Z,this._pid=Z,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(($)=>this.emitEvent($)),this.receiveBuffer=[],this.sendBuffer.forEach(($)=>{this.notifyOutgoingListeners($),this.packet($)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){if(this.subs)this.subs.forEach(($)=>$()),this.subs=void 0;this.io._destroy(this)}disconnect(){if(this.connected)this.packet({type:v.DISCONNECT});if(this.destroy(),this.connected)this.onclose("io client disconnect");return this}close(){return this.disconnect()}compress($){return this.flags.compress=$,this}get volatile(){return this.flags.volatile=!0,this}timeout($){return this.flags.timeout=$,this}onAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.push($),this}prependAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift($),this}offAny($){if(!this._anyListeners)return this;if($){let Z=this._anyListeners;for(let J=0;J<Z.length;J++)if($===Z[J])return Z.splice(J,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push($),this}prependAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift($),this}offAnyOutgoing($){if(!this._anyOutgoingListeners)return this;if($){let Z=this._anyOutgoingListeners;for(let J=0;J<Z.length;J++)if($===Z[J])return Z.splice(J,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners($){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let Z=this._anyOutgoingListeners.slice();for(let J of Z)J.apply(this,$.data)}}}function R0($){$=$||{},this.ms=$.min||100,this.max=$.max||1e4,this.factor=$.factor||2,this.jitter=$.jitter>0&&$.jitter<=1?$.jitter:0,this.attempts=0}R0.prototype.duration=function(){var $=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var Z=Math.random(),J=Math.floor(Z*this.jitter*$);$=(Math.floor(Z*10)&1)==0?$-J:$+J}return Math.min($,this.max)|0};R0.prototype.reset=function(){this.attempts=0};R0.prototype.setMin=function($){this.ms=$};R0.prototype.setMax=function($){this.max=$};R0.prototype.setJitter=function($){this.jitter=$};class D5 extends t{constructor($,Z){var J;super();if(this.nsps={},this.subs=[],$&&typeof $==="object")Z=$,$=void 0;Z=Z||{},Z.path=Z.path||"/socket.io",this.opts=Z,t1(this,Z),this.reconnection(Z.reconnection!==!1),this.reconnectionAttempts(Z.reconnectionAttempts||1/0),this.reconnectionDelay(Z.reconnectionDelay||1000),this.reconnectionDelayMax(Z.reconnectionDelayMax||5000),this.randomizationFactor((J=Z.randomizationFactor)!==null&&J!==void 0?J:0.5),this.backoff=new R0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(Z.timeout==null?20000:Z.timeout),this._readyState="closed",this.uri=$;let H=Z.parser||s2;if(this.encoder=new H.Encoder,this.decoder=new H.Decoder,this._autoConnect=Z.autoConnect!==!1,this._autoConnect)this.open()}reconnection($){if(!arguments.length)return this._reconnection;if(this._reconnection=!!$,!$)this.skipReconnect=!0;return this}reconnectionAttempts($){if($===void 0)return this._reconnectionAttempts;return this._reconnectionAttempts=$,this}reconnectionDelay($){var Z;if($===void 0)return this._reconnectionDelay;return this._reconnectionDelay=$,(Z=this.backoff)===null||Z===void 0||Z.setMin($),this}randomizationFactor($){var Z;if($===void 0)return this._randomizationFactor;return this._randomizationFactor=$,(Z=this.backoff)===null||Z===void 0||Z.setJitter($),this}reconnectionDelayMax($){var Z;if($===void 0)return this._reconnectionDelayMax;return this._reconnectionDelayMax=$,(Z=this.backoff)===null||Z===void 0||Z.setMax($),this}timeout($){if(!arguments.length)return this._timeout;return this._timeout=$,this}maybeReconnectOnOpen(){if(!this._reconnecting&&this._reconnection&&this.backoff.attempts===0)this.reconnect()}open($){if(~this._readyState.indexOf("open"))return this;this.engine=new F5(this.uri,this.opts);let Z=this.engine,J=this;this._readyState="opening",this.skipReconnect=!1;let H=C1(Z,"open",function(){J.onopen(),$&&$()}),X=(Y)=>{if(this.cleanup(),this._readyState="closed",this.emitReserved("error",Y),$)$(Y);else this.maybeReconnectOnOpen()},Q=C1(Z,"error",X);if(this._timeout!==!1){let Y=this._timeout,G=this.setTimeoutFn(()=>{H(),X(Error("timeout")),Z.close()},Y);if(this.opts.autoUnref)G.unref();this.subs.push(()=>{this.clearTimeoutFn(G)})}return this.subs.push(H),this.subs.push(Q),this}connect($){return this.open($)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let $=this.engine;this.subs.push(C1($,"ping",this.onping.bind(this)),C1($,"data",this.ondata.bind(this)),C1($,"error",this.onerror.bind(this)),C1($,"close",this.onclose.bind(this)),C1(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata($){try{this.decoder.add($)}catch(Z){this.onclose("parse error",Z)}}ondecoded($){o1(()=>{this.emitReserved("packet",$)},this.setTimeoutFn)}onerror($){this.emitReserved("error",$)}socket($,Z){let J=this.nsps[$];if(!J)J=new O5(this,$,Z),this.nsps[$]=J;else if(this._autoConnect&&!J.active)J.connect();return J}_destroy($){let Z=Object.keys(this.nsps);for(let J of Z)if(this.nsps[J].active)return;this._close()}_packet($){let Z=this.encoder.encode($);for(let J=0;J<Z.length;J++)this.engine.write(Z[J],$.options)}cleanup(){this.subs.forEach(($)=>$()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose($,Z){var J;if(this.cleanup(),(J=this.engine)===null||J===void 0||J.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",$,Z),this._reconnection&&!this.skipReconnect)this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let $=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let Z=this.backoff.duration();this._reconnecting=!0;let J=this.setTimeoutFn(()=>{if($.skipReconnect)return;if(this.emitReserved("reconnect_attempt",$.backoff.attempts),$.skipReconnect)return;$.open((H)=>{if(H)$._reconnecting=!1,$.reconnect(),this.emitReserved("reconnect_error",H);else $.onreconnect()})},Z);if(this.opts.autoUnref)J.unref();this.subs.push(()=>{this.clearTimeoutFn(J)})}}onreconnect(){let $=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",$)}}var R5={};function B6($,Z){if(typeof $==="object")Z=$,$=void 0;Z=Z||{};let J=l4($,Z.path||"/socket.io"),H=J.source,X=J.id,Q=J.path,Y=R5[X]&&Q in R5[X].nsps,G=Z.forceNew||Z["force new connection"]||Z.multiplex===!1||Y,W;if(G)W=new D5(H,Z);else{if(!R5[X])R5[X]=new D5(H,Z);W=R5[X]}if(J.query&&!Z.query)Z.query=J.queryKey;return W.socket(J.path,Z)}Object.assign(B6,{Manager:D5,Socket:O5,io:B6,connect:B6});import{createContext as xY}from"react";var gY=xY(null),o4=gY;function o2($){return{all:$=$||new Map,on:function(Z,J){var H=$.get(Z);H?H.push(J):$.set(Z,[J])},off:function(Z,J){var H=$.get(Z);H&&(J?H.splice(H.indexOf(J)>>>0,1):$.set(Z,[]))},emit:function(Z,J){var H=$.get(Z);H&&H.slice().map(function(X){X(J)}),(H=$.get("*"))&&H.slice().map(function(X){X(Z,J)})}}}import{createContext as bY}from"react";var hY=o2(),yY=bY(hY),t4=yY;var vY=({card:$,data:Z,children:J,useSocketioSupport:H=!1,useCentrifugeSupport:X=!1,useMittSupport:Q=!1,centrifugeChannel:Y=void 0,methods:G=void 0})=>{if(n())console.log("[PieCard] Rendering card:",$),console.log("[PieCard] Card data:",Z),console.log("[PieCard] Component name:",Z?.name),console.log("[PieCard] Real-time support:",{socketio:H,centrifuge:X,mitt:Q,centrifugeChannel:Y}),console.log("[PieCard] Methods:",G?Object.keys(G):"none"),console.log("[PieCard] Has children:",!!J);let W=t2(o4),K=t2(A4),U=t2(t4);if(e2(()=>{if(!W||!H||!G||!Z.name){if(n()&&H)console.log("[PieCard] Socket.IO setup skipped:",{hasSocket:!!W,useSocketioSupport:H,hasMethods:!!G,hasDataName:!!Z?.name});return}return Object.entries(G).forEach(([L,M])=>{let q=`pie${L}_${Z.name}`;if(n())console.log(`[PieCard] Socket.IO registering event: ${q}`);W.on(q,M)}),()=>{Object.entries(G).forEach(([L,M])=>{let q=`pie${L}_${Z.name}`;if(n())console.log(`[PieCard] Socket.IO unregistering event: ${q}`);W.off(q,M)})}},[W,G,Z.name]),e2(()=>{if(!K||!X||!Y||!G||!Z.name){if(n()&&X)console.log("[PieCard] Centrifuge setup skipped:",{hasCentrifuge:!!K,useCentrifugeSupport:X,hasCentrifugeChannel:!!Y,hasMethods:!!G,hasDataName:!!Z?.name});return}let L=Object.entries(G).map(([M,q])=>{let A=`pie${M}_${Z.name}_${Y}`;if(n())console.log(`[PieCard] Centrifuge subscribing to channel: ${A}`);let O=K.newSubscription(A);return O.on("publication",(I)=>{if(n())console.log(`[PieCard] Centrifuge received data on ${A}:`,I.data);q(I.data)}),O.subscribe(),O});return()=>{L.forEach((M)=>{if(n())console.log("[PieCard] Centrifuge unsubscribing from channel");M.unsubscribe(),K.removeSubscription(M)})}},[K,Y,G,Z.name]),e2(()=>{if(!U||!Q||!G||!Z.name){if(n()&&Q)console.log("[PieCard] Mitt setup skipped:",{hasMitt:!!U,useMittSupport:Q,hasMethods:!!G,hasDataName:!!Z?.name});return}return Object.entries(G).forEach(([L,M])=>{let q=`pie${L}_${Z.name}`;if(n())console.log(`[PieCard] Mitt registering event: ${q}`);U.on(q,M)}),()=>{Object.entries(G).forEach(([L,M])=>{let q=`pie${L}_${Z.name}`;if(n())console.log(`[PieCard] Mitt unregistering event: ${q}`);U.off(q,M)})}},[U,G,Z.name]),n())console.log("[PieCard] Rendering complete, returning children");return J},$0=vY;var e4=new Map;var $$=($)=>{let Z=e4.get($);if(n())if(Z)console.log("[Registry] Found component:",$);else console.warn("[Registry] Component not found:",$),console.log("[Registry] Available components:",Array.from(e4.keys()));return Z};import{Suspense as pY,useContext as lY}from"react";import{createContext as kY}from"react";import{jsxDEV as uY,Fragment as fY}from"react/jsx-dev-runtime";var mY=kY(uY(fY,{},void 0,!1,void 0,this)),Z$=mY;import{jsxDEV as J$}from"react/jsx-dev-runtime";function iY({uiConfig:$,setUiAjaxConfiguration:Z}){let J=lY(Z$);if(n())console.log("[UI] Rendering component:",$.card),console.log("[UI] Component data:",$.data),console.log("[UI] Component content:",$.content),console.log("[UI] Has setUiAjaxConfiguration:",!!Z);let H=$$($.card);if(!H?.component){if(n())console.warn(`[UI] Component not found in registry: ${$.card}`),console.log("[UI] Returning fallback component");return J}if(n())console.log("[UI] Found component in registry:",{name:H.name,isLazy:H.isLazy,hasMetadata:!!H.metadata});let X=H.component,Q=J$(X,{data:$.data,content:$.content,setUiAjaxConfiguration:Z},void 0,!1,void 0,this);if(H.isLazy){if(n())console.log("[UI] Rendering lazy component with Suspense:",H.name);return J$(pY,{fallback:H.fallback??J,children:Q},`${H.name}`,!1,void 0,this)}if(n())console.log("[UI] Rendering component directly:",H.name);return Q}var V0=iY;function $9($=1000){return new Promise((Z)=>{let J=()=>{if(typeof window.sid<"u")Z(null);else setTimeout(J,$)};J()})}var F6=($,Z={},J=[],H)=>{if(n())console.log("Registering AJAX: ",H,Z,J);if(!H||!$){if(n())console.warn("Registration FAILED: pathname or setUiAjaxConfiguration is missing!");return()=>{}}return async(X={})=>{if(J.includes("sid"))await $9();let Q=new FormData;for(let[G,W]of Object.entries({...Z,...X}))Q.append(G,W);for(let G of J)if(G==="sid"){if(!window.sid)throw Error("SocketIO isn't initialized properly");Q.append("sid",window.sid)}else{let W=document.getElementsByName(G);if(!W.length){if(n())console.warn(`No input found with name ${G}`);continue}let K=W[0];if(K instanceof HTMLInputElement)if(K.type==="file"&&K.files)Array.from(K.files).forEach((U)=>Q.append(G,U));else Q.append(G,K.value);else if(K instanceof HTMLTextAreaElement)Q.append(G,K.value)}let Y=o7()+"api/ajax_content"+H;return $(null),await fetch(Y,{method:"POST",body:Q}).then(async(G)=>{let K=(G.headers.get("content-type")||"").includes("application/json");if(!!G.body?.getReader&&!K){let L=G.body.getReader(),M=new TextDecoder,q="";while(!0){let{done:A,value:O}=await L.read();if(A)break;q+=M.decode(O,{stream:!0});let I=q.split(`
17
+ `);q=I.pop()??"";for(let V of I){let w=V.trim();if(!w)continue;try{let T=JSON.parse(w);$([T])}catch(T){if(n())console.warn("Failed to parse streamed line:",w)}}}if(q.trim())try{let A=JSON.parse(q);$([A])}catch(A){if(n())console.warn("Failed to parse final streamed line:",q)}return{}}else{let L=await G.json();return $(L),L}}).catch((G)=>{if(n())console.error("AJAX request failed:",G);return $(null),G})}};import{forwardRef as GG,useEffect as WG,useImperativeHandle as UG,useRef as KG,useState as D6}from"react";import{useRef as dY,useState as cY}from"react";import{jsxDEV as rY}from"react/jsx-dev-runtime";function Z9($){let[Z,J]=cY(!1),H=dY(null);return rY("textarea",{ref:H,...$,onKeyUp:()=>{J(!1)},onKeyDown:(G)=>{if(G.key==="Enter"&&G.shiftKey){if(J(!0),H.current){let W=window.getComputedStyle(H.current),K=parseFloat(W.lineHeight);H.current.style.height=H.current.scrollHeight+K+"px"}}if(G.key==="Backspace"){if(J(!0),H.current){let W=window.getComputedStyle(H.current),K=parseFloat(W.lineHeight);if(H.current.scrollHeight>K)H.current.style.height=H.current.scrollHeight-K+"px"}}$.onKeyDown&&$.onKeyDown(G)},onBlur:(G)=>{J(!1),$.onBlur&&$.onBlur(G)},style:{resize:Z?"vertical":"none",overflowY:"auto",...$.style}},void 0,!1,void 0,this)}import{useRef as nY,useCallback as sY}from"react";import{jsxDEV as H$}from"react/jsx-dev-runtime";var aY=()=>H$("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:H$("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"},void 0,!1,void 0,this)},void 0,!1,void 0,this),X$=aY;import{jsxDEV as J9}from"react/jsx-dev-runtime";var oY=({type:$="button",onClick:Z,icons:J})=>{let H=nY(null),X=sY(()=>{let Y=H.current;if(Y)Y.style.transform="scale(0.8)",setTimeout(()=>{Y.style.transform="scale(1)"},600)},[]);return J9("button",{ref:H,type:$,onClick:(Y)=>{if(Z)Z(Y);X()},className:"mr-1.5 rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",style:{transition:"transform 300ms ease"},children:J.sendIcon?J9("img",{src:J.sendIcon,alt:""},void 0,!1,void 0,this):J9(X$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},Q$=oY;import{jsxDEV as Y$}from"react/jsx-dev-runtime";var tY=()=>Y$("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:Y$("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13"},void 0,!1,void 0,this)},void 0,!1,void 0,this),G$=tY;import{jsxDEV as z6}from"react/jsx-dev-runtime";var eY=({name:$,accept:Z,fileInputRef:J,onSelectFile:H,icons:X})=>{return z6("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:()=>{if(J.current)J.current.click()},children:[z6("input",{name:$+s7+"file",className:"hidden",type:"file",accept:Z,ref:J,onChange:(Q)=>{if(Q.target.files)H(Q.target.files[0])}},void 0,!1,void 0,this),X.attachFileIcon?z6("img",{src:X.attachFileIcon,alt:""},void 0,!1,void 0,this):z6(G$,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},W$=eY;import{jsxDEV as U$}from"react/jsx-dev-runtime";var $G=()=>U$("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5 text-gray-500",children:U$("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),K$=$G;import{jsxDEV as q$}from"react/jsx-dev-runtime";var ZG=()=>q$("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:q$("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A6=ZG;import{jsxDEV as v0}from"react/jsx-dev-runtime";var JG=({name:$,selectedFile:Z,onDropFile:J})=>{return v0("div",{className:"flex w-full cursor-default flex-row items-center gap-2",children:[v0(K$,{},void 0,!1,void 0,this),v0("span",{className:"flex-1",children:Z.name},void 0,!1,void 0,this),v0("input",{type:"hidden",name:$,value:""},void 0,!1,void 0,this),v0("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:J,children:v0(A6,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},L$=JG;import{jsxDEV as H9}from"react/jsx-dev-runtime";var HG=()=>H9("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:[H9("path",{d:"M8 5C8 2.79086 9.79086 1 12 1C14.2091 1 16 2.79086 16 5V12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12V5Z"},void 0,!1,void 0,this),H9("path",{d:"M6.25 11.8438V12C6.25 13.525 6.8558 14.9875 7.93414 16.0659C9.01247 17.1442 10.475 17.75 12 17.75C13.525 17.75 14.9875 17.1442 16.0659 16.0659C17.1442 14.9875 17.75 13.525 17.75 12V11.8438C17.75 11.2915 18.1977 10.8438 18.75 10.8438H19.25C19.8023 10.8438 20.25 11.2915 20.25 11.8437V12C20.25 14.188 19.3808 16.2865 17.8336 17.8336C16.5842 19.0831 14.9753 19.8903 13.25 20.1548V22C13.25 22.5523 12.8023 23 12.25 23H11.75C11.1977 23 10.75 22.5523 10.75 22V20.1548C9.02471 19.8903 7.41579 19.0831 6.16637 17.8336C4.61919 16.2865 3.75 14.188 3.75 12V11.8438C3.75 11.2915 4.19772 10.8438 4.75 10.8438H5.25C5.80228 10.8438 6.25 11.2915 6.25 11.8438Z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M$=HG;import{jsxDEV as V5}from"react/jsx-dev-runtime";var XG=({isListening:$,toggleListening:Z,icons:J})=>{return V5("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:Z,children:$?J.cancelIcon?V5("img",{src:J.cancelIcon,alt:""},void 0,!1,void 0,this):V5(A6,{},void 0,!1,void 0,this):J.voiceRecordingIcon?V5("img",{src:J.voiceRecordingIcon,alt:""},void 0,!1,void 0,this):V5(M$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},B$=XG;import{jsxDEV as X9}from"react/jsx-dev-runtime";var QG=({option:$,onClickOption:Z})=>{return X9("div",{className:"flex w-fit cursor-pointer flex-row place-content-center items-center gap-1 rounded-md border border-black bg-white px-2 py-1 text-black",onClick:()=>{Z($.title)},style:$.sx,children:[$.iconPosition==="start"&&X9("img",{src:$.iconUrl,alt:""},void 0,!1,void 0,this),$.title,$.iconPosition==="end"&&X9("img",{src:$.iconUrl,alt:""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},O6=QG;import{jsxDEV as F$}from"react/jsx-dev-runtime";var YG=({options:$,handleOptionClick:Z})=>{return F$("div",{className:"flex w-full flex-row flex-wrap justify-start gap-[5px]",children:$.map((J,H)=>{return F$(O6,{option:J,onClickOption:Z},H,!1,void 0,this)})},void 0,!1,void 0,this)},Q9=YG;import{jsxDEV as f1}from"react/jsx-dev-runtime";var qG=GG(({name:$,defaultValue:Z,defaultOptions:J,isArea:H,placeholder:X,fileAccept:Q,optionsPosition:Y,icons:G,handleOptionClick:W,handleSendMessage:K,sx:U},L)=>{let M=KG(null),[q,A]=D6(null),[O,I]=D6(Z),[V,w]=D6(J),[T,_]=D6(!1);UG(L,()=>({clear:()=>{if(I(""),A(null),M.current)M.current.value=""},setValue:(R)=>I(R),setOptions:(R)=>w(R)})),WG(()=>{I(Z)},[Z]);let x=()=>{};return f1("div",{className:"flex flex-col items-center gap-[0.1rem]",id:$+"_chat_input",style:U,children:[V&&Y==="top"&&f1(Q9,{options:V,handleOptionClick:W},void 0,!1,void 0,this),f1("div",{className:"stretch relative flex size-full flex-1 flex-row items-stretch gap-3 last:mb-2 md:mx-4 md:flex-col md:last:mb-6 lg:mx-auto",children:f1("div",{className:"flex w-full grow flex-row items-center rounded-md bg-transparent",children:[q?f1(L$,{name:$,selectedFile:q,onDropFile:()=>{if(A(null),M.current)M.current.value=""}},void 0,!1,void 0,this):!H?f1("input",{name:$,value:O,onChange:(R)=>I(R.target.value),onKeyDown:(R)=>{if(R.key==="Enter")R.preventDefault(),K()},tabIndex:0,placeholder:X,className:"m-0 w-full resize-none border-0 bg-transparent outline-none",style:{maxHeight:200,height:"100%",overflowY:"hidden"}},void 0,!1,void 0,this):f1(Z9,{name:$,value:O,onChange:(R)=>I(R.target.value),onKeyDown:(R)=>{if(R.key==="Enter"&&!R.shiftKey)R.preventDefault(),K()},tabIndex:0,rows:2,placeholder:X,className:"m-0 w-full resize-none border-0 bg-transparent p-0 pl-2 pr-7 outline-none md:pl-0",style:{maxHeight:200,height:"100%",minHeight:24}},void 0,!1,void 0,this),f1(B$,{isListening:T,toggleListening:x,icons:G},void 0,!1,void 0,this),f1(W$,{name:$,fileInputRef:M,accept:Q,onSelectFile:A,icons:G},void 0,!1,void 0,this),f1(Q$,{onClick:K,icons:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),V&&Y==="bottom"&&f1(Q9,{options:V,handleOptionClick:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}),z$=qG;var _9=u(w9(),1),I0=u(w9(),1),_6=_9.default.default||_9.default;import{useState as eq,useEffect as $L}from"react";function N1(){}function C6(){}function V3($,Z){let J=Z||{};return($[$.length-1]===""?[...$,""]:$).join((J.padRight?" ":"")+","+(J.padLeft===!1?"":" ")).trim()}var YU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WU={};function S6($,Z){return((Z||WU).jsx?GU:YU).test($)}var UU=/[ \t\n\f\r]/g;function C9($){return typeof $==="object"?$.type==="text"?N3($.value):!1:N3($)}function N3($){return $.replace(UU,"")===""}class Y0{constructor($,Z,J){if(this.normal=Z,this.property=$,J)this.space=J}}Y0.prototype.normal={};Y0.prototype.property={};Y0.prototype.space=void 0;function S9($,Z){let J={},H={};for(let X of $)Object.assign(J,X.property),Object.assign(H,X.normal);return new Y0(J,H,Z)}function S5($){return $.toLowerCase()}class L1{constructor($,Z){this.attribute=Z,this.property=$}}L1.prototype.attribute="";L1.prototype.booleanish=!1;L1.prototype.boolean=!1;L1.prototype.commaOrSpaceSeparated=!1;L1.prototype.commaSeparated=!1;L1.prototype.defined=!1;L1.prototype.mustUseProperty=!1;L1.prototype.number=!1;L1.prototype.overloadedBoolean=!1;L1.prototype.property="";L1.prototype.spaceSeparated=!1;L1.prototype.space=void 0;var j5={};b2(j5,{spaceSeparated:()=>a,overloadedBoolean:()=>j6,number:()=>N,commaSeparated:()=>G0,commaOrSpaceSeparated:()=>w1,booleanish:()=>J1,boolean:()=>h});var KU=0,h=T0(),J1=T0(),j6=T0(),N=T0(),a=T0(),G0=T0(),w1=T0();function T0(){return 2**++KU}var j9=Object.keys(j5);class f0 extends L1{constructor($,Z,J,H){let X=-1;super($,Z);if(I3(this,"space",H),typeof J==="number")while(++X<j9.length){let Q=j9[X];I3(this,j9[X],(J&j5[Q])===j5[Q])}}}f0.prototype.defined=!0;function I3($,Z,J){if(J)$[Z]=J}function x1($){let Z={},J={};for(let[H,X]of Object.entries($.properties)){let Q=new f0(H,$.transform($.attributes||{},H),X,$.space);if($.mustUseProperty&&$.mustUseProperty.includes(H))Q.mustUseProperty=!0;Z[H]=Q,J[S5(H)]=H,J[S5(Q.attribute)]=H}return new Y0(Z,J,$.space)}var E9=x1({properties:{ariaActiveDescendant:null,ariaAtomic:J1,ariaAutoComplete:null,ariaBusy:J1,ariaChecked:J1,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:a,ariaCurrent:null,ariaDescribedBy:a,ariaDetails:null,ariaDisabled:J1,ariaDropEffect:a,ariaErrorMessage:null,ariaExpanded:J1,ariaFlowTo:a,ariaGrabbed:J1,ariaHasPopup:null,ariaHidden:J1,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:a,ariaLevel:N,ariaLive:null,ariaModal:J1,ariaMultiLine:J1,ariaMultiSelectable:J1,ariaOrientation:null,ariaOwns:a,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:J1,ariaReadOnly:J1,ariaRelevant:null,ariaRequired:J1,ariaRoleDescription:a,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:J1,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform($,Z){return Z==="role"?Z:"aria-"+Z.slice(4).toLowerCase()}});function E6($,Z){return Z in $?$[Z]:Z}function x6($,Z){return E6($,Z.toLowerCase())}var T3=x1({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:G0,acceptCharset:a,accessKey:a,action:null,allow:null,allowFullScreen:h,allowPaymentRequest:h,allowUserMedia:h,alt:null,as:null,async:h,autoCapitalize:null,autoComplete:a,autoFocus:h,autoPlay:h,blocking:a,capture:null,charSet:null,checked:h,cite:null,className:a,cols:N,colSpan:null,content:null,contentEditable:J1,controls:h,controlsList:a,coords:N|G0,crossOrigin:null,data:null,dateTime:null,decoding:null,default:h,defer:h,dir:null,dirName:null,disabled:h,download:j6,draggable:J1,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:h,formTarget:null,headers:a,height:N,hidden:j6,high:N,href:null,hrefLang:null,htmlFor:a,httpEquiv:a,id:null,imageSizes:null,imageSrcSet:null,inert:h,inputMode:null,integrity:null,is:null,isMap:h,itemId:null,itemProp:a,itemRef:a,itemScope:h,itemType:a,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:h,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:h,muted:h,name:null,nonce:null,noModule:h,noValidate:h,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:h,optimum:N,pattern:null,ping:a,placeholder:null,playsInline:h,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:h,referrerPolicy:null,rel:a,required:h,reversed:h,rows:N,rowSpan:N,sandbox:a,scope:null,scoped:h,seamless:h,selected:h,shadowRootClonable:h,shadowRootDelegatesFocus:h,shadowRootMode:null,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:J1,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:h,useMap:null,value:J1,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:a,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:h,declare:h,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:h,noHref:h,noShade:h,noWrap:h,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:J1,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:h,disableRemotePlayback:h,prefix:null,property:null,results:N,security:null,unselectable:null},space:"html",transform:x6});var P3=x1({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:w1,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:a,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:h,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:G0,g2:G0,glyphName:G0,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:w1,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:a,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:w1,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:w1,rev:w1,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:w1,requiredFeatures:w1,requiredFonts:w1,requiredFormats:w1,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:w1,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:w1,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:w1,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E6});var x9=x1({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform($,Z){return"xlink:"+Z.slice(5).toLowerCase()}});var g9=x1({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:x6});var b9=x1({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform($,Z){return"xml:"+Z.slice(3).toLowerCase()}});var h9={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var qU=/[A-Z]/g,w3=/-[a-z]/g,LU=/^data[-\w.:]+$/i;function y9($,Z){let J=S5(Z),H=Z,X=L1;if(J in $.normal)return $.property[$.normal[J]];if(J.length>4&&J.slice(0,4)==="data"&&LU.test(Z)){if(Z.charAt(4)==="-"){let Q=Z.slice(5).replace(w3,BU);H="data"+Q.charAt(0).toUpperCase()+Q.slice(1)}else{let Q=Z.slice(4);if(!w3.test(Q)){let Y=Q.replace(qU,MU);if(Y.charAt(0)!=="-")Y="-"+Y;Z="data"+Y}}X=f0}return new X(H,Z)}function MU($){return"-"+$.toLowerCase()}function BU($){return $.charAt(1).toUpperCase()}var _3=S9([E9,T3,x9,g9,b9],"html"),g6=S9([E9,P3,x9,g9,b9],"svg");function C3($){return $.join(" ").trim()}var x3=u(N9(),1);var b6=S3("end"),u0=S3("start");function S3($){return Z;function Z(J){let H=J&&J.position&&J.position[$]||{};if(typeof H.line==="number"&&H.line>0&&typeof H.column==="number"&&H.column>0)return{line:H.line,column:H.column,offset:typeof H.offset==="number"&&H.offset>-1?H.offset:void 0}}}function v9($){let Z=u0($),J=b6($);if(Z&&J)return{start:Z,end:J}}function W0($){if(!$||typeof $!=="object")return"";if("position"in $||"type"in $)return j3($.position);if("start"in $||"end"in $)return j3($);if("line"in $||"column"in $)return k9($);return""}function k9($){return E3($&&$.line)+":"+E3($&&$.column)}function j3($){return k9($&&$.start)+"-"+k9($&&$.end)}function E3($){return $&&typeof $==="number"?$:1}class Y1 extends Error{constructor($,Z,J){super();if(typeof Z==="string")J=Z,Z=void 0;let H="",X={},Q=!1;if(Z)if("line"in Z&&"column"in Z)X={place:Z};else if("start"in Z&&"end"in Z)X={place:Z};else if("type"in Z)X={ancestors:[Z],place:Z.position};else X={...Z};if(typeof $==="string")H=$;else if(!X.cause&&$)Q=!0,H=$.message,X.cause=$;if(!X.ruleId&&!X.source&&typeof J==="string"){let G=J.indexOf(":");if(G===-1)X.ruleId=J;else X.source=J.slice(0,G),X.ruleId=J.slice(G+1)}if(!X.place&&X.ancestors&&X.ancestors){let G=X.ancestors[X.ancestors.length-1];if(G)X.place=G.position}let Y=X.place&&"start"in X.place?X.place.start:X.place;this.ancestors=X.ancestors||void 0,this.cause=X.cause||void 0,this.column=Y?Y.column:void 0,this.fatal=void 0,this.file="",this.message=H,this.line=Y?Y.line:void 0,this.name=W0(X.place)||"1:1",this.place=X.place||void 0,this.reason=this.message,this.ruleId=X.ruleId||void 0,this.source=X.source||void 0,this.stack=Q&&X.cause&&typeof X.cause.stack==="string"?X.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Y1.prototype.file="";Y1.prototype.name="";Y1.prototype.reason="";Y1.prototype.message="";Y1.prototype.stack="";Y1.prototype.column=void 0;Y1.prototype.line=void 0;Y1.prototype.ancestors=void 0;Y1.prototype.cause=void 0;Y1.prototype.fatal=void 0;Y1.prototype.place=void 0;Y1.prototype.ruleId=void 0;Y1.prototype.source=void 0;var m9={}.hasOwnProperty,FU=new Map,zU=/[A-Z]/g,AU=new Set(["table","tbody","thead","tfoot","tr"]),OU=new Set(["td","th"]),g3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function f9($,Z){if(!Z||Z.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let J=Z.filePath||void 0,H;if(Z.development){if(typeof Z.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");H=wU(J,Z.jsxDEV)}else{if(typeof Z.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof Z.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");H=PU(J,Z.jsx,Z.jsxs)}let X={Fragment:Z.Fragment,ancestors:[],components:Z.components||{},create:H,elementAttributeNameCase:Z.elementAttributeNameCase||"react",evaluater:Z.createEvaluater?Z.createEvaluater():void 0,filePath:J,ignoreInvalidStyle:Z.ignoreInvalidStyle||!1,passKeys:Z.passKeys!==!1,passNode:Z.passNode||!1,schema:Z.space==="svg"?g6:_3,stylePropertyNameCase:Z.stylePropertyNameCase||"dom",tableCellAlignToStyle:Z.tableCellAlignToStyle!==!1},Q=b3(X,$,void 0);if(Q&&typeof Q!=="string")return Q;return X.create($,X.Fragment,{children:Q||void 0},void 0)}function b3($,Z,J){if(Z.type==="element")return DU($,Z,J);if(Z.type==="mdxFlowExpression"||Z.type==="mdxTextExpression")return RU($,Z);if(Z.type==="mdxJsxFlowElement"||Z.type==="mdxJsxTextElement")return NU($,Z,J);if(Z.type==="mdxjsEsm")return VU($,Z);if(Z.type==="root")return IU($,Z,J);if(Z.type==="text")return TU($,Z)}function DU($,Z,J){let H=$.schema,X=H;if(Z.tagName.toLowerCase()==="svg"&&H.space==="html")X=g6,$.schema=X;$.ancestors.push(Z);let Q=y3($,Z.tagName,!1),Y=_U($,Z),G=p9($,Z);if(AU.has(Z.tagName))G=G.filter(function(W){return typeof W==="string"?!C9(W):!0});return h3($,Y,Q,Z),u9(Y,G),$.ancestors.pop(),$.schema=H,$.create(Z,Q,Y,J)}function RU($,Z){if(Z.data&&Z.data.estree&&$.evaluater){let H=Z.data.estree.body[0];return N1(H.type==="ExpressionStatement"),$.evaluater.evaluateExpression(H.expression)}E5($,Z.position)}function VU($,Z){if(Z.data&&Z.data.estree&&$.evaluater)return $.evaluater.evaluateProgram(Z.data.estree);E5($,Z.position)}function NU($,Z,J){let H=$.schema,X=H;if(Z.name==="svg"&&H.space==="html")X=g6,$.schema=X;$.ancestors.push(Z);let Q=Z.name===null?$.Fragment:y3($,Z.name,!0),Y=CU($,Z),G=p9($,Z);return h3($,Y,Q,Z),u9(Y,G),$.ancestors.pop(),$.schema=H,$.create(Z,Q,Y,J)}function IU($,Z,J){let H={};return u9(H,p9($,Z)),$.create(Z,$.Fragment,H,J)}function TU($,Z){return Z.value}function h3($,Z,J,H){if(typeof J!=="string"&&J!==$.Fragment&&$.passNode)Z.node=H}function u9($,Z){if(Z.length>0){let J=Z.length>1?Z:Z[0];if(J)$.children=J}}function PU($,Z,J){return H;function H(X,Q,Y,G){let K=Array.isArray(Y.children)?J:Z;return G?K(Q,Y,G):K(Q,Y)}}function wU($,Z){return J;function J(H,X,Q,Y){let G=Array.isArray(Q.children),W=u0(H);return Z(X,Q,Y,G,{columnNumber:W?W.column-1:void 0,fileName:$,lineNumber:W?W.line:void 0},void 0)}}function _U($,Z){let J={},H,X;for(X in Z.properties)if(X!=="children"&&m9.call(Z.properties,X)){let Q=SU($,X,Z.properties[X]);if(Q){let[Y,G]=Q;if($.tableCellAlignToStyle&&Y==="align"&&typeof G==="string"&&OU.has(Z.tagName))H=G;else J[Y]=G}}if(H){let Q=J.style||(J.style={});Q[$.stylePropertyNameCase==="css"?"text-align":"textAlign"]=H}return J}function CU($,Z){let J={};for(let H of Z.attributes)if(H.type==="mdxJsxExpressionAttribute")if(H.data&&H.data.estree&&$.evaluater){let Q=H.data.estree.body[0];N1(Q.type==="ExpressionStatement");let Y=Q.expression;N1(Y.type==="ObjectExpression");let G=Y.properties[0];N1(G.type==="SpreadElement"),Object.assign(J,$.evaluater.evaluateExpression(G.argument))}else E5($,Z.position);else{let X=H.name,Q;if(H.value&&typeof H.value==="object")if(H.value.data&&H.value.data.estree&&$.evaluater){let G=H.value.data.estree.body[0];N1(G.type==="ExpressionStatement"),Q=$.evaluater.evaluateExpression(G.expression)}else E5($,Z.position);else Q=H.value===null?!0:H.value;J[X]=Q}return J}function p9($,Z){let J=[],H=-1,X=$.passKeys?new Map:FU;while(++H<Z.children.length){let Q=Z.children[H],Y;if($.passKeys){let W=Q.type==="element"?Q.tagName:Q.type==="mdxJsxFlowElement"||Q.type==="mdxJsxTextElement"?Q.name:void 0;if(W){let K=X.get(W)||0;Y=W+"-"+K,X.set(W,K+1)}}let G=b3($,Q,Y);if(G!==void 0)J.push(G)}return J}function SU($,Z,J){let H=y9($.schema,Z);if(J===null||J===void 0||typeof J==="number"&&Number.isNaN(J))return;if(Array.isArray(J))J=H.commaSeparated?V3(J):C3(J);if(H.property==="style"){let X=typeof J==="object"?J:jU($,String(J));if($.stylePropertyNameCase==="css")X=EU(X);return["style",X]}return[$.elementAttributeNameCase==="react"&&H.space?h9[H.property]||H.property:H.attribute,J]}function jU($,Z){try{return x3.default(Z,{reactCompat:!0})}catch(J){if($.ignoreInvalidStyle)return{};let H=J,X=new Y1("Cannot parse `style` attribute",{ancestors:$.ancestors,cause:H,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw X.file=$.filePath||void 0,X.url=g3+"#cannot-parse-style-attribute",X}}function y3($,Z,J){let H;if(!J)H={type:"Literal",value:Z};else if(Z.includes(".")){let X=Z.split("."),Q=-1,Y;while(++Q<X.length){let G=S6(X[Q])?{type:"Identifier",name:X[Q]}:{type:"Literal",value:X[Q]};Y=Y?{type:"MemberExpression",object:Y,property:G,computed:Boolean(Q&&G.type==="Literal"),optional:!1}:G}N1(Y,"always a result"),H=Y}else H=S6(Z)&&!/^[a-z]/.test(Z)?{type:"Identifier",name:Z}:{type:"Literal",value:Z};if(H.type==="Literal"){let X=H.value;return m9.call($.components,X)?$.components[X]:X}if($.evaluater)return $.evaluater.evaluateExpression(H);E5($)}function E5($,Z){let J=new Y1("Cannot handle MDX estrees without `createEvaluater`",{ancestors:$.ancestors,place:Z,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw J.file=$.filePath||void 0,J.url=g3+"#cannot-handle-mdx-estrees-without-createevaluater",J}function EU($){let Z={},J;for(J in $)if(m9.call($,J))Z[xU(J)]=$[J];return Z}function xU($){let Z=$.replace(zU,gU);if(Z.slice(0,3)==="ms-")Z="-"+Z;return Z}function gU($){return"-"+$.toLowerCase()}var x5={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as kq,jsx as mq,jsxs as fq}from"react/jsx-runtime";import{useEffect as jC,useState as EC}from"react";var bU={};function l9($,Z){let J=Z||bU,H=typeof J.includeImageAlt==="boolean"?J.includeImageAlt:!0,X=typeof J.includeHtml==="boolean"?J.includeHtml:!0;return k3($,H,X)}function k3($,Z,J){if(hU($)){if("value"in $)return $.type==="html"&&!J?"":$.value;if(Z&&"alt"in $&&$.alt)return $.alt;if("children"in $)return v3($.children,Z,J)}if(Array.isArray($))return v3($,Z,J);return""}function v3($,Z,J){let H=[],X=-1;while(++X<$.length)H[X]=k3($[X],Z,J);return H.join("")}function hU($){return Boolean($&&typeof $==="object")}var m3=document.createElement("i");function p0($){let Z="&"+$+";";m3.innerHTML=Z;let J=m3.textContent;if(J.charCodeAt(J.length-1)===59&&$!=="semi")return!1;return J===Z?!1:J}function M1($,Z,J,H){let X=$.length,Q=0,Y;if(Z<0)Z=-Z>X?0:X+Z;else Z=Z>X?X:Z;if(J=J>0?J:0,H.length<1e4)Y=Array.from(H),Y.unshift(Z,J),$.splice(...Y);else{if(J)$.splice(Z,J);while(Q<H.length)Y=H.slice(Q,Q+1e4),Y.unshift(Z,0),$.splice(...Y),Q+=1e4,Z+=1e4}}function I1($,Z){if($.length>0)return M1($,$.length,0,Z),$;return Z}var f3={}.hasOwnProperty;function u3($){let Z={},J=-1;while(++J<$.length)yU(Z,$[J]);return Z}function yU($,Z){let J;for(J in Z){let X=(f3.call($,J)?$[J]:void 0)||($[J]={}),Q=Z[J],Y;if(Q)for(Y in Q){if(!f3.call(X,Y))X[Y]=[];let G=Q[Y];vU(X[Y],Array.isArray(G)?G:G?[G]:[])}}}function vU($,Z){let J=-1,H=[];while(++J<Z.length)(Z[J].add==="after"?$:H).push(Z[J]);M1($,0,0,H)}function h6($,Z){let J=Number.parseInt($,Z);if(J<9||J===11||J>13&&J<32||J>126&&J<160||J>55295&&J<57344||J>64975&&J<65008||(J&65535)===65535||(J&65535)===65534||J>1114111)return"�";return String.fromCodePoint(J)}function Z0($){return $.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var j1=U0(/[A-Za-z]/),W1=U0(/[\dA-Za-z]/),p3=U0(/[#-'*+\--9=?A-Z^-~]/);function g5($){return $!==null&&($<32||$===127)}var b5=U0(/\d/),l3=U0(/[\dA-Fa-f]/),i3=U0(/[!-/:-@[-`{-~]/);function C($){return $!==null&&$<-2}function X1($){return $!==null&&($<0||$===32)}function g($){return $===-2||$===-1||$===32}var d3=U0(/\p{P}|\p{S}/u),c3=U0(/\s/);function U0($){return Z;function Z(J){return J!==null&&J>-1&&$.test(String.fromCharCode(J))}}function g1($){let Z=[],J=-1,H=0,X=0;while(++J<$.length){let Q=$.charCodeAt(J),Y="";if(Q===37&&W1($.charCodeAt(J+1))&&W1($.charCodeAt(J+2)))X=2;else if(Q<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(Q)))Y=String.fromCharCode(Q)}else if(Q>55295&&Q<57344){let G=$.charCodeAt(J+1);if(Q<56320&&G>56319&&G<57344)Y=String.fromCharCode(Q,G),X=1;else Y="�"}else Y=String.fromCharCode(Q);if(Y)Z.push($.slice(H,J),encodeURIComponent(Y)),H=J+X+1,Y="";if(X)J+=X,X=0}return Z.join("")+$.slice(H)}function y($,Z,J,H){let X=H?H-1:Number.POSITIVE_INFINITY,Q=0;return Y;function Y(W){if(g(W))return $.enter(J),G(W);return Z(W)}function G(W){if(g(W)&&Q++<X)return $.consume(W),G;return $.exit(J),Z(W)}}var r3={tokenize:kU};function kU($){let Z=$.attempt(this.parser.constructs.contentInitial,H,X),J;return Z;function H(G){if(G===null){$.consume(G);return}return $.enter("lineEnding"),$.consume(G),$.exit("lineEnding"),y($,Z,"linePrefix")}function X(G){return $.enter("paragraph"),Q(G)}function Q(G){let W=$.enter("chunkText",{contentType:"text",previous:J});if(J)J.next=W;return J=W,Y(G)}function Y(G){if(G===null){$.exit("chunkText"),$.exit("paragraph"),$.consume(G);return}if(C(G))return $.consume(G),$.exit("chunkText"),Q;return $.consume(G),Y}}var n3={tokenize:mU},a3={tokenize:fU};function mU($){let Z=this,J=[],H=0,X,Q,Y;return G;function G(T){if(H<J.length){let _=J[H];return Z.containerState=_[1],$.attempt(_[0].continuation,W,K)(T)}return K(T)}function W(T){if(H++,Z.containerState._closeFlow){if(Z.containerState._closeFlow=void 0,X)w();let _=Z.events.length,x=_,R;while(x--)if(Z.events[x][0]==="exit"&&Z.events[x][1].type==="chunkFlow"){R=Z.events[x][1].end;break}V(H);let d=_;while(d<Z.events.length)Z.events[d][1].end={...R},d++;return M1(Z.events,x+1,0,Z.events.slice(_)),Z.events.length=d,K(T)}return G(T)}function K(T){if(H===J.length){if(!X)return M(T);if(X.currentConstruct&&X.currentConstruct.concrete)return A(T);Z.interrupt=Boolean(X.currentConstruct&&!X._gfmTableDynamicInterruptHack)}return Z.containerState={},$.check(a3,U,L)(T)}function U(T){if(X)w();return V(H),M(T)}function L(T){return Z.parser.lazy[Z.now().line]=H!==J.length,Y=Z.now().offset,A(T)}function M(T){return Z.containerState={},$.attempt(a3,q,A)(T)}function q(T){return H++,J.push([Z.currentConstruct,Z.containerState]),M(T)}function A(T){if(T===null){if(X)w();V(0),$.consume(T);return}return X=X||Z.parser.flow(Z.now()),$.enter("chunkFlow",{_tokenizer:X,contentType:"flow",previous:Q}),O(T)}function O(T){if(T===null){I($.exit("chunkFlow"),!0),V(0),$.consume(T);return}if(C(T))return $.consume(T),I($.exit("chunkFlow")),H=0,Z.interrupt=void 0,G;return $.consume(T),O}function I(T,_){let x=Z.sliceStream(T);if(_)x.push(null);if(T.previous=Q,Q)Q.next=T;if(Q=T,X.defineSkip(T.start),X.write(x),Z.parser.lazy[T.start.line]){let R=X.events.length;while(R--)if(X.events[R][1].start.offset<Y&&(!X.events[R][1].end||X.events[R][1].end.offset>Y))return;let d=Z.events.length,$1=d,i,r;while($1--)if(Z.events[$1][0]==="exit"&&Z.events[$1][1].type==="chunkFlow"){if(i){r=Z.events[$1][1].end;break}i=!0}V(H),R=d;while(R<Z.events.length)Z.events[R][1].end={...r},R++;M1(Z.events,$1+1,0,Z.events.slice(d)),Z.events.length=R}}function V(T){let _=J.length;while(_-- >T){let x=J[_];Z.containerState=x[1],x[0].exit.call(Z,$)}J.length=T}function w(){X.write([null]),Q=void 0,X=void 0,Z.containerState._closeFlow=void 0}}function fU($,Z,J){return y($,$.attempt(this.parser.constructs.document,Z,J),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function i9($){if($===null||X1($)||c3($))return 1;if(d3($))return 2}function l0($,Z,J){let H=[],X=-1;while(++X<$.length){let Q=$[X].resolveAll;if(Q&&!H.includes(Q))Z=Q(Z,J),H.push(Q)}return Z}var h5={name:"attention",resolveAll:uU,tokenize:pU};function uU($,Z){let J=-1,H,X,Q,Y,G,W,K,U;while(++J<$.length)if($[J][0]==="enter"&&$[J][1].type==="attentionSequence"&&$[J][1]._close){H=J;while(H--)if($[H][0]==="exit"&&$[H][1].type==="attentionSequence"&&$[H][1]._open&&Z.sliceSerialize($[H][1]).charCodeAt(0)===Z.sliceSerialize($[J][1]).charCodeAt(0)){if(($[H][1]._close||$[J][1]._open)&&($[J][1].end.offset-$[J][1].start.offset)%3&&!(($[H][1].end.offset-$[H][1].start.offset+$[J][1].end.offset-$[J][1].start.offset)%3))continue;W=$[H][1].end.offset-$[H][1].start.offset>1&&$[J][1].end.offset-$[J][1].start.offset>1?2:1;let L={...$[H][1].end},M={...$[J][1].start};if(s3(L,-W),s3(M,W),Y={type:W>1?"strongSequence":"emphasisSequence",start:L,end:{...$[H][1].end}},G={type:W>1?"strongSequence":"emphasisSequence",start:{...$[J][1].start},end:M},Q={type:W>1?"strongText":"emphasisText",start:{...$[H][1].end},end:{...$[J][1].start}},X={type:W>1?"strong":"emphasis",start:{...Y.start},end:{...G.end}},$[H][1].end={...Y.start},$[J][1].start={...G.end},K=[],$[H][1].end.offset-$[H][1].start.offset)K=I1(K,[["enter",$[H][1],Z],["exit",$[H][1],Z]]);if(K=I1(K,[["enter",X,Z],["enter",Y,Z],["exit",Y,Z],["enter",Q,Z]]),K=I1(K,l0(Z.parser.constructs.insideSpan.null,$.slice(H+1,J),Z)),K=I1(K,[["exit",Q,Z],["enter",G,Z],["exit",G,Z],["exit",X,Z]]),$[J][1].end.offset-$[J][1].start.offset)U=2,K=I1(K,[["enter",$[J][1],Z],["exit",$[J][1],Z]]);else U=0;M1($,H-1,J-H+3,K),J=H+K.length-U-2;break}}J=-1;while(++J<$.length)if($[J][1].type==="attentionSequence")$[J][1].type="data";return $}function pU($,Z){let J=this.parser.constructs.attentionMarkers.null,H=this.previous,X=i9(H),Q;return Y;function Y(W){return Q=W,$.enter("attentionSequence"),G(W)}function G(W){if(W===Q)return $.consume(W),G;let K=$.exit("attentionSequence"),U=i9(W),L=!U||U===2&&X||J.includes(W),M=!X||X===2&&U||J.includes(H);return K._open=Boolean(Q===42?L:L&&(X||!M)),K._close=Boolean(Q===42?M:M&&(U||!L)),Z(W)}}function s3($,Z){$.column+=Z,$.offset+=Z,$._bufferIndex+=Z}var d9={name:"autolink",tokenize:lU};function lU($,Z,J){let H=0;return X;function X(q){return $.enter("autolink"),$.enter("autolinkMarker"),$.consume(q),$.exit("autolinkMarker"),$.enter("autolinkProtocol"),Q}function Q(q){if(j1(q))return $.consume(q),Y;if(q===64)return J(q);return K(q)}function Y(q){if(q===43||q===45||q===46||W1(q))return H=1,G(q);return K(q)}function G(q){if(q===58)return $.consume(q),H=0,W;if((q===43||q===45||q===46||W1(q))&&H++<32)return $.consume(q),G;return H=0,K(q)}function W(q){if(q===62)return $.exit("autolinkProtocol"),$.enter("autolinkMarker"),$.consume(q),$.exit("autolinkMarker"),$.exit("autolink"),Z;if(q===null||q===32||q===60||g5(q))return J(q);return $.consume(q),W}function K(q){if(q===64)return $.consume(q),U;if(p3(q))return $.consume(q),K;return J(q)}function U(q){return W1(q)?L(q):J(q)}function L(q){if(q===46)return $.consume(q),H=0,U;if(q===62)return $.exit("autolinkProtocol").type="autolinkEmail",$.enter("autolinkMarker"),$.consume(q),$.exit("autolinkMarker"),$.exit("autolink"),Z;return M(q)}function M(q){if((q===45||W1(q))&&H++<63){let A=q===45?M:L;return $.consume(q),A}return J(q)}}var K0={partial:!0,tokenize:iU};function iU($,Z,J){return H;function H(Q){return g(Q)?y($,X,"linePrefix")(Q):X(Q)}function X(Q){return Q===null||C(Q)?Z(Q):J(Q)}}var y6={continuation:{tokenize:cU},exit:rU,name:"blockQuote",tokenize:dU};function dU($,Z,J){let H=this;return X;function X(Y){if(Y===62){let G=H.containerState;if(!G.open)$.enter("blockQuote",{_container:!0}),G.open=!0;return $.enter("blockQuotePrefix"),$.enter("blockQuoteMarker"),$.consume(Y),$.exit("blockQuoteMarker"),Q}return J(Y)}function Q(Y){if(g(Y))return $.enter("blockQuotePrefixWhitespace"),$.consume(Y),$.exit("blockQuotePrefixWhitespace"),$.exit("blockQuotePrefix"),Z;return $.exit("blockQuotePrefix"),Z(Y)}}function cU($,Z,J){let H=this;return X;function X(Y){if(g(Y))return y($,Q,"linePrefix",H.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y);return Q(Y)}function Q(Y){return $.attempt(y6,Z,J)(Y)}}function rU($){$.exit("blockQuote")}var v6={name:"characterEscape",tokenize:aU};function aU($,Z,J){return H;function H(Q){return $.enter("characterEscape"),$.enter("escapeMarker"),$.consume(Q),$.exit("escapeMarker"),X}function X(Q){if(i3(Q))return $.enter("characterEscapeValue"),$.consume(Q),$.exit("characterEscapeValue"),$.exit("characterEscape"),Z;return J(Q)}}var k6={name:"characterReference",tokenize:nU};function nU($,Z,J){let H=this,X=0,Q,Y;return G;function G(L){return $.enter("characterReference"),$.enter("characterReferenceMarker"),$.consume(L),$.exit("characterReferenceMarker"),W}function W(L){if(L===35)return $.enter("characterReferenceMarkerNumeric"),$.consume(L),$.exit("characterReferenceMarkerNumeric"),K;return $.enter("characterReferenceValue"),Q=31,Y=W1,U(L)}function K(L){if(L===88||L===120)return $.enter("characterReferenceMarkerHexadecimal"),$.consume(L),$.exit("characterReferenceMarkerHexadecimal"),$.enter("characterReferenceValue"),Q=6,Y=l3,U;return $.enter("characterReferenceValue"),Q=7,Y=b5,U(L)}function U(L){if(L===59&&X){let M=$.exit("characterReferenceValue");if(Y===W1&&!p0(H.sliceSerialize(M)))return J(L);return $.enter("characterReferenceMarker"),$.consume(L),$.exit("characterReferenceMarker"),$.exit("characterReference"),Z}if(Y(L)&&X++<Q)return $.consume(L),U;return J(L)}}var o3={partial:!0,tokenize:oU},m6={concrete:!0,name:"codeFenced",tokenize:sU};function sU($,Z,J){let H=this,X={partial:!0,tokenize:x},Q=0,Y=0,G;return W;function W(R){return K(R)}function K(R){let d=H.events[H.events.length-1];return Q=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[1],!0).length:0,G=R,$.enter("codeFenced"),$.enter("codeFencedFence"),$.enter("codeFencedFenceSequence"),U(R)}function U(R){if(R===G)return Y++,$.consume(R),U;if(Y<3)return J(R);return $.exit("codeFencedFenceSequence"),g(R)?y($,L,"whitespace")(R):L(R)}function L(R){if(R===null||C(R))return $.exit("codeFencedFence"),H.interrupt?Z(R):$.check(o3,O,_)(R);return $.enter("codeFencedFenceInfo"),$.enter("chunkString",{contentType:"string"}),M(R)}function M(R){if(R===null||C(R))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),L(R);if(g(R))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),y($,q,"whitespace")(R);if(R===96&&R===G)return J(R);return $.consume(R),M}function q(R){if(R===null||C(R))return L(R);return $.enter("codeFencedFenceMeta"),$.enter("chunkString",{contentType:"string"}),A(R)}function A(R){if(R===null||C(R))return $.exit("chunkString"),$.exit("codeFencedFenceMeta"),L(R);if(R===96&&R===G)return J(R);return $.consume(R),A}function O(R){return $.attempt(X,_,I)(R)}function I(R){return $.enter("lineEnding"),$.consume(R),$.exit("lineEnding"),V}function V(R){return Q>0&&g(R)?y($,w,"linePrefix",Q+1)(R):w(R)}function w(R){if(R===null||C(R))return $.check(o3,O,_)(R);return $.enter("codeFlowValue"),T(R)}function T(R){if(R===null||C(R))return $.exit("codeFlowValue"),w(R);return $.consume(R),T}function _(R){return $.exit("codeFenced"),Z(R)}function x(R,d,$1){let i=0;return r;function r(z){return R.enter("lineEnding"),R.consume(z),R.exit("lineEnding"),l}function l(z){return R.enter("codeFencedFence"),g(z)?y(R,c,"linePrefix",H.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):c(z)}function c(z){if(z===G)return R.enter("codeFencedFenceSequence"),S(z);return $1(z)}function S(z){if(z===G)return i++,R.consume(z),S;if(i>=Y)return R.exit("codeFencedFenceSequence"),g(z)?y(R,m,"whitespace")(z):m(z);return $1(z)}function m(z){if(z===null||C(z))return R.exit("codeFencedFence"),d(z);return $1(z)}}}function oU($,Z,J){let H=this;return X;function X(Y){if(Y===null)return J(Y);return $.enter("lineEnding"),$.consume(Y),$.exit("lineEnding"),Q}function Q(Y){return H.parser.lazy[H.now().line]?J(Y):Z(Y)}}var y5={name:"codeIndented",tokenize:eU},tU={partial:!0,tokenize:$K};function eU($,Z,J){let H=this;return X;function X(K){return $.enter("codeIndented"),y($,Q,"linePrefix",5)(K)}function Q(K){let U=H.events[H.events.length-1];return U&&U[1].type==="linePrefix"&&U[2].sliceSerialize(U[1],!0).length>=4?Y(K):J(K)}function Y(K){if(K===null)return W(K);if(C(K))return $.attempt(tU,Y,W)(K);return $.enter("codeFlowValue"),G(K)}function G(K){if(K===null||C(K))return $.exit("codeFlowValue"),Y(K);return $.consume(K),G}function W(K){return $.exit("codeIndented"),Z(K)}}function $K($,Z,J){let H=this;return X;function X(Y){if(H.parser.lazy[H.now().line])return J(Y);if(C(Y))return $.enter("lineEnding"),$.consume(Y),$.exit("lineEnding"),X;return y($,Q,"linePrefix",5)(Y)}function Q(Y){let G=H.events[H.events.length-1];return G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4?Z(Y):C(Y)?X(Y):J(Y)}}var c9={name:"codeText",previous:JK,resolve:ZK,tokenize:HK};function ZK($){let Z=$.length-4,J=3,H,X;if(($[J][1].type==="lineEnding"||$[J][1].type==="space")&&($[Z][1].type==="lineEnding"||$[Z][1].type==="space")){H=J;while(++H<Z)if($[H][1].type==="codeTextData"){$[J][1].type="codeTextPadding",$[Z][1].type="codeTextPadding",J+=2,Z-=2;break}}H=J-1,Z++;while(++H<=Z)if(X===void 0){if(H!==Z&&$[H][1].type!=="lineEnding")X=H}else if(H===Z||$[H][1].type==="lineEnding"){if($[X][1].type="codeTextData",H!==X+2)$[X][1].end=$[H-1][1].end,$.splice(X+2,H-X-2),Z-=H-X-2,H=X+2;X=void 0}return $}function JK($){return $!==96||this.events[this.events.length-1][1].type==="characterEscape"}function HK($,Z,J){let H=this,X=0,Q,Y;return G;function G(M){return $.enter("codeText"),$.enter("codeTextSequence"),W(M)}function W(M){if(M===96)return $.consume(M),X++,W;return $.exit("codeTextSequence"),K(M)}function K(M){if(M===null)return J(M);if(M===32)return $.enter("space"),$.consume(M),$.exit("space"),K;if(M===96)return Y=$.enter("codeTextSequence"),Q=0,L(M);if(C(M))return $.enter("lineEnding"),$.consume(M),$.exit("lineEnding"),K;return $.enter("codeTextData"),U(M)}function U(M){if(M===null||M===32||M===96||C(M))return $.exit("codeTextData"),K(M);return $.consume(M),U}function L(M){if(M===96)return $.consume(M),Q++,L;if(Q===X)return $.exit("codeTextSequence"),$.exit("codeText"),Z(M);return Y.type="codeTextData",U(M)}}class r9{constructor($){this.left=$?[...$]:[],this.right=[]}get($){if($<0||$>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+$+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if($<this.left.length)return this.left[$];return this.right[this.right.length-$+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice($,Z){let J=Z===null||Z===void 0?Number.POSITIVE_INFINITY:Z;if(J<this.left.length)return this.left.slice($,J);if($>this.left.length)return this.right.slice(this.right.length-J+this.left.length,this.right.length-$+this.left.length).reverse();return this.left.slice($).concat(this.right.slice(this.right.length-J+this.left.length).reverse())}splice($,Z,J){let H=Z||0;this.setCursor(Math.trunc($));let X=this.right.splice(this.right.length-H,Number.POSITIVE_INFINITY);if(J)v5(this.left,J);return X.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push($){this.setCursor(Number.POSITIVE_INFINITY),this.left.push($)}pushMany($){this.setCursor(Number.POSITIVE_INFINITY),v5(this.left,$)}unshift($){this.setCursor(0),this.right.push($)}unshiftMany($){this.setCursor(0),v5(this.right,$.reverse())}setCursor($){if($===this.left.length||$>this.left.length&&this.right.length===0||$<0&&this.left.length===0)return;if($<this.left.length){let Z=this.left.splice($,Number.POSITIVE_INFINITY);v5(this.right,Z.reverse())}else{let Z=this.right.splice(this.left.length+this.right.length-$,Number.POSITIVE_INFINITY);v5(this.left,Z.reverse())}}}function v5($,Z){let J=0;if(Z.length<1e4)$.push(...Z);else while(J<Z.length)$.push(...Z.slice(J,J+1e4)),J+=1e4}function f6($){let Z={},J=-1,H,X,Q,Y,G,W,K,U=new r9($);while(++J<U.length){while(J in Z)J=Z[J];if(H=U.get(J),J&&H[1].type==="chunkFlow"&&U.get(J-1)[1].type==="listItemPrefix"){if(W=H[1]._tokenizer.events,Q=0,Q<W.length&&W[Q][1].type==="lineEndingBlank")Q+=2;if(Q<W.length&&W[Q][1].type==="content")while(++Q<W.length){if(W[Q][1].type==="content")break;if(W[Q][1].type==="chunkText")W[Q][1]._isInFirstContentOfListItem=!0,Q++}}if(H[0]==="enter"){if(H[1].contentType)Object.assign(Z,XK(U,J)),J=Z[J],K=!0}else if(H[1]._container){Q=J,X=void 0;while(Q--)if(Y=U.get(Q),Y[1].type==="lineEnding"||Y[1].type==="lineEndingBlank"){if(Y[0]==="enter"){if(X)U.get(X)[1].type="lineEndingBlank";Y[1].type="lineEnding",X=Q}}else if(Y[1].type==="linePrefix"||Y[1].type==="listItemIndent");else break;if(X)H[1].end={...U.get(X)[1].start},G=U.slice(X,J),G.unshift(H),U.splice(X,J-X+1,G)}}return M1($,0,Number.POSITIVE_INFINITY,U.slice(0)),!K}function XK($,Z){let J=$.get(Z)[1],H=$.get(Z)[2],X=Z-1,Q=[],Y=J._tokenizer;if(!Y){if(Y=H.parser[J.contentType](J.start),J._contentTypeTextTrailing)Y._contentTypeTextTrailing=!0}let G=Y.events,W=[],K={},U,L,M=-1,q=J,A=0,O=0,I=[O];while(q){while($.get(++X)[1]!==q);if(Q.push(X),!q._tokenizer){if(U=H.sliceStream(q),!q.next)U.push(null);if(L)Y.defineSkip(q.start);if(q._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=!0;if(Y.write(U),q._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=void 0}L=q,q=q.next}q=J;while(++M<G.length)if(G[M][0]==="exit"&&G[M-1][0]==="enter"&&G[M][1].type===G[M-1][1].type&&G[M][1].start.line!==G[M][1].end.line)O=M+1,I.push(O),q._tokenizer=void 0,q.previous=void 0,q=q.next;if(Y.events=[],q)q._tokenizer=void 0,q.previous=void 0;else I.pop();M=I.length;while(M--){let V=G.slice(I[M],I[M+1]),w=Q.pop();W.push([w,w+V.length-1]),$.splice(w,2,V)}W.reverse(),M=-1;while(++M<W.length)K[A+W[M][0]]=A+W[M][1],A+=W[M][1]-W[M][0]-1;return K}var a9={resolve:YK,tokenize:GK},QK={partial:!0,tokenize:WK};function YK($){return f6($),$}function GK($,Z){let J;return H;function H(G){return $.enter("content"),J=$.enter("chunkContent",{contentType:"content"}),X(G)}function X(G){if(G===null)return Q(G);if(C(G))return $.check(QK,Y,Q)(G);return $.consume(G),X}function Q(G){return $.exit("chunkContent"),$.exit("content"),Z(G)}function Y(G){return $.consume(G),$.exit("chunkContent"),J.next=$.enter("chunkContent",{contentType:"content",previous:J}),J=J.next,X}}function WK($,Z,J){let H=this;return X;function X(Y){return $.exit("chunkContent"),$.enter("lineEnding"),$.consume(Y),$.exit("lineEnding"),y($,Q,"linePrefix")}function Q(Y){if(Y===null||C(Y))return J(Y);let G=H.events[H.events.length-1];if(!H.parser.constructs.disable.null.includes("codeIndented")&&G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4)return Z(Y);return $.interrupt(H.parser.constructs.flow,J,Z)(Y)}}function u6($,Z,J,H,X,Q,Y,G,W){let K=W||Number.POSITIVE_INFINITY,U=0;return L;function L(V){if(V===60)return $.enter(H),$.enter(X),$.enter(Q),$.consume(V),$.exit(Q),M;if(V===null||V===32||V===41||g5(V))return J(V);return $.enter(H),$.enter(Y),$.enter(G),$.enter("chunkString",{contentType:"string"}),O(V)}function M(V){if(V===62)return $.enter(Q),$.consume(V),$.exit(Q),$.exit(X),$.exit(H),Z;return $.enter(G),$.enter("chunkString",{contentType:"string"}),q(V)}function q(V){if(V===62)return $.exit("chunkString"),$.exit(G),M(V);if(V===null||V===60||C(V))return J(V);return $.consume(V),V===92?A:q}function A(V){if(V===60||V===62||V===92)return $.consume(V),q;return q(V)}function O(V){if(!U&&(V===null||V===41||X1(V)))return $.exit("chunkString"),$.exit(G),$.exit(Y),$.exit(H),Z(V);if(U<K&&V===40)return $.consume(V),U++,O;if(V===41)return $.consume(V),U--,O;if(V===null||V===32||V===40||g5(V))return J(V);return $.consume(V),V===92?I:O}function I(V){if(V===40||V===41||V===92)return $.consume(V),O;return O(V)}}function p6($,Z,J,H,X,Q){let Y=this,G=0,W;return K;function K(q){return $.enter(H),$.enter(X),$.consume(q),$.exit(X),$.enter(Q),U}function U(q){if(G>999||q===null||q===91||q===93&&!W||q===94&&!G&&"_hiddenFootnoteSupport"in Y.parser.constructs)return J(q);if(q===93)return $.exit(Q),$.enter(X),$.consume(q),$.exit(X),$.exit(H),Z;if(C(q))return $.enter("lineEnding"),$.consume(q),$.exit("lineEnding"),U;return $.enter("chunkString",{contentType:"string"}),L(q)}function L(q){if(q===null||q===91||q===93||C(q)||G++>999)return $.exit("chunkString"),U(q);if($.consume(q),!W)W=!g(q);return q===92?M:L}function M(q){if(q===91||q===92||q===93)return $.consume(q),G++,L;return L(q)}}function l6($,Z,J,H,X,Q){let Y;return G;function G(M){if(M===34||M===39||M===40)return $.enter(H),$.enter(X),$.consume(M),$.exit(X),Y=M===40?41:M,W;return J(M)}function W(M){if(M===Y)return $.enter(X),$.consume(M),$.exit(X),$.exit(H),Z;return $.enter(Q),K(M)}function K(M){if(M===Y)return $.exit(Q),W(Y);if(M===null)return J(M);if(C(M))return $.enter("lineEnding"),$.consume(M),$.exit("lineEnding"),y($,K,"linePrefix");return $.enter("chunkString",{contentType:"string"}),U(M)}function U(M){if(M===Y||M===null||C(M))return $.exit("chunkString"),K(M);return $.consume(M),M===92?L:U}function L(M){if(M===Y||M===92)return $.consume(M),U;return U(M)}}function P0($,Z){let J;return H;function H(X){if(C(X))return $.enter("lineEnding"),$.consume(X),$.exit("lineEnding"),J=!0,H;if(g(X))return y($,H,J?"linePrefix":"lineSuffix")(X);return Z(X)}}var n9={name:"definition",tokenize:KK},UK={partial:!0,tokenize:qK};function KK($,Z,J){let H=this,X;return Q;function Q(q){return $.enter("definition"),Y(q)}function Y(q){return p6.call(H,$,G,J,"definitionLabel","definitionLabelMarker","definitionLabelString")(q)}function G(q){if(X=Z0(H.sliceSerialize(H.events[H.events.length-1][1]).slice(1,-1)),q===58)return $.enter("definitionMarker"),$.consume(q),$.exit("definitionMarker"),W;return J(q)}function W(q){return X1(q)?P0($,K)(q):K(q)}function K(q){return u6($,U,J,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(q)}function U(q){return $.attempt(UK,L,L)(q)}function L(q){return g(q)?y($,M,"whitespace")(q):M(q)}function M(q){if(q===null||C(q))return $.exit("definition"),H.parser.defined.push(X),Z(q);return J(q)}}function qK($,Z,J){return H;function H(G){return X1(G)?P0($,X)(G):J(G)}function X(G){return l6($,Q,J,"definitionTitle","definitionTitleMarker","definitionTitleString")(G)}function Q(G){return g(G)?y($,Y,"whitespace")(G):Y(G)}function Y(G){return G===null||C(G)?Z(G):J(G)}}var s9={name:"hardBreakEscape",tokenize:LK};function LK($,Z,J){return H;function H(Q){return $.enter("hardBreakEscape"),$.consume(Q),X}function X(Q){if(C(Q))return $.exit("hardBreakEscape"),Z(Q);return J(Q)}}var o9={name:"headingAtx",resolve:MK,tokenize:BK};function MK($,Z){let J=$.length-2,H=3,X,Q;if($[H][1].type==="whitespace")H+=2;if(J-2>H&&$[J][1].type==="whitespace")J-=2;if($[J][1].type==="atxHeadingSequence"&&(H===J-1||J-4>H&&$[J-2][1].type==="whitespace"))J-=H+1===J?2:4;if(J>H)X={type:"atxHeadingText",start:$[H][1].start,end:$[J][1].end},Q={type:"chunkText",start:$[H][1].start,end:$[J][1].end,contentType:"text"},M1($,H,J-H+1,[["enter",X,Z],["enter",Q,Z],["exit",Q,Z],["exit",X,Z]]);return $}function BK($,Z,J){let H=0;return X;function X(U){return $.enter("atxHeading"),Q(U)}function Q(U){return $.enter("atxHeadingSequence"),Y(U)}function Y(U){if(U===35&&H++<6)return $.consume(U),Y;if(U===null||X1(U))return $.exit("atxHeadingSequence"),G(U);return J(U)}function G(U){if(U===35)return $.enter("atxHeadingSequence"),W(U);if(U===null||C(U))return $.exit("atxHeading"),Z(U);if(g(U))return y($,G,"whitespace")(U);return $.enter("atxHeadingText"),K(U)}function W(U){if(U===35)return $.consume(U),W;return $.exit("atxHeadingSequence"),G(U)}function K(U){if(U===null||U===35||X1(U))return $.exit("atxHeadingText"),G(U);return $.consume(U),K}}var t3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],t9=["pre","script","style","textarea"];var e9={concrete:!0,name:"htmlFlow",resolveTo:AK,tokenize:OK},FK={partial:!0,tokenize:RK},zK={partial:!0,tokenize:DK};function AK($){let Z=$.length;while(Z--)if($[Z][0]==="enter"&&$[Z][1].type==="htmlFlow")break;if(Z>1&&$[Z-2][1].type==="linePrefix")$[Z][1].start=$[Z-2][1].start,$[Z+1][1].start=$[Z-2][1].start,$.splice(Z-2,2);return $}function OK($,Z,J){let H=this,X,Q,Y,G,W;return K;function K(F){return U(F)}function U(F){return $.enter("htmlFlow"),$.enter("htmlFlowData"),$.consume(F),L}function L(F){if(F===33)return $.consume(F),M;if(F===47)return $.consume(F),Q=!0,O;if(F===63)return $.consume(F),X=3,H.interrupt?Z:B;if(j1(F))return $.consume(F),Y=String.fromCharCode(F),I;return J(F)}function M(F){if(F===45)return $.consume(F),X=2,q;if(F===91)return $.consume(F),X=5,G=0,A;if(j1(F))return $.consume(F),X=4,H.interrupt?Z:B;return J(F)}function q(F){if(F===45)return $.consume(F),H.interrupt?Z:B;return J(F)}function A(F){if(F==="CDATA[".charCodeAt(G++)){if($.consume(F),G===6)return H.interrupt?Z:c;return A}return J(F)}function O(F){if(j1(F))return $.consume(F),Y=String.fromCharCode(F),I;return J(F)}function I(F){if(F===null||F===47||F===62||X1(F)){let v1=F===47,F0=Y.toLowerCase();if(!v1&&!Q&&t9.includes(F0))return X=1,H.interrupt?Z(F):c(F);if(t3.includes(Y.toLowerCase())){if(X=6,v1)return $.consume(F),V;return H.interrupt?Z(F):c(F)}return X=7,H.interrupt&&!H.parser.lazy[H.now().line]?J(F):Q?w(F):T(F)}if(F===45||W1(F))return $.consume(F),Y+=String.fromCharCode(F),I;return J(F)}function V(F){if(F===62)return $.consume(F),H.interrupt?Z:c;return J(F)}function w(F){if(g(F))return $.consume(F),w;return r(F)}function T(F){if(F===47)return $.consume(F),r;if(F===58||F===95||j1(F))return $.consume(F),_;if(g(F))return $.consume(F),T;return r(F)}function _(F){if(F===45||F===46||F===58||F===95||W1(F))return $.consume(F),_;return x(F)}function x(F){if(F===61)return $.consume(F),R;if(g(F))return $.consume(F),x;return T(F)}function R(F){if(F===null||F===60||F===61||F===62||F===96)return J(F);if(F===34||F===39)return $.consume(F),W=F,d;if(g(F))return $.consume(F),R;return $1(F)}function d(F){if(F===W)return $.consume(F),W=null,i;if(F===null||C(F))return J(F);return $.consume(F),d}function $1(F){if(F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||X1(F))return x(F);return $.consume(F),$1}function i(F){if(F===47||F===62||g(F))return T(F);return J(F)}function r(F){if(F===62)return $.consume(F),l;return J(F)}function l(F){if(F===null||C(F))return c(F);if(g(F))return $.consume(F),l;return J(F)}function c(F){if(F===45&&X===2)return $.consume(F),Z1;if(F===60&&X===1)return $.consume(F),f;if(F===62&&X===4)return $.consume(F),p1;if(F===63&&X===3)return $.consume(F),B;if(F===93&&X===5)return $.consume(F),B1;if(C(F)&&(X===6||X===7))return $.exit("htmlFlowData"),$.check(FK,r1,S)(F);if(F===null||C(F))return $.exit("htmlFlowData"),S(F);return $.consume(F),c}function S(F){return $.check(zK,m,r1)(F)}function m(F){return $.enter("lineEnding"),$.consume(F),$.exit("lineEnding"),z}function z(F){if(F===null||C(F))return S(F);return $.enter("htmlFlowData"),c(F)}function Z1(F){if(F===45)return $.consume(F),B;return c(F)}function f(F){if(F===47)return $.consume(F),Y="",T1;return c(F)}function T1(F){if(F===62){let v1=Y.toLowerCase();if(t9.includes(v1))return $.consume(F),p1;return c(F)}if(j1(F)&&Y.length<8)return $.consume(F),Y+=String.fromCharCode(F),T1;return c(F)}function B1(F){if(F===93)return $.consume(F),B;return c(F)}function B(F){if(F===62)return $.consume(F),p1;if(F===45&&X===2)return $.consume(F),B;return c(F)}function p1(F){if(F===null||C(F))return $.exit("htmlFlowData"),r1(F);return $.consume(F),p1}function r1(F){return $.exit("htmlFlow"),Z(F)}}function DK($,Z,J){let H=this;return X;function X(Y){if(C(Y))return $.enter("lineEnding"),$.consume(Y),$.exit("lineEnding"),Q;return J(Y)}function Q(Y){return H.parser.lazy[H.now().line]?J(Y):Z(Y)}}function RK($,Z,J){return H;function H(X){return $.enter("lineEnding"),$.consume(X),$.exit("lineEnding"),$.attempt(K0,Z,J)}}var $8={name:"htmlText",tokenize:VK};function VK($,Z,J){let H=this,X,Q,Y;return G;function G(B){return $.enter("htmlText"),$.enter("htmlTextData"),$.consume(B),W}function W(B){if(B===33)return $.consume(B),K;if(B===47)return $.consume(B),x;if(B===63)return $.consume(B),T;if(j1(B))return $.consume(B),$1;return J(B)}function K(B){if(B===45)return $.consume(B),U;if(B===91)return $.consume(B),Q=0,A;if(j1(B))return $.consume(B),w;return J(B)}function U(B){if(B===45)return $.consume(B),q;return J(B)}function L(B){if(B===null)return J(B);if(B===45)return $.consume(B),M;if(C(B))return Y=L,f(B);return $.consume(B),L}function M(B){if(B===45)return $.consume(B),q;return L(B)}function q(B){return B===62?Z1(B):B===45?M(B):L(B)}function A(B){if(B==="CDATA[".charCodeAt(Q++))return $.consume(B),Q===6?O:A;return J(B)}function O(B){if(B===null)return J(B);if(B===93)return $.consume(B),I;if(C(B))return Y=O,f(B);return $.consume(B),O}function I(B){if(B===93)return $.consume(B),V;return O(B)}function V(B){if(B===62)return Z1(B);if(B===93)return $.consume(B),V;return O(B)}function w(B){if(B===null||B===62)return Z1(B);if(C(B))return Y=w,f(B);return $.consume(B),w}function T(B){if(B===null)return J(B);if(B===63)return $.consume(B),_;if(C(B))return Y=T,f(B);return $.consume(B),T}function _(B){return B===62?Z1(B):T(B)}function x(B){if(j1(B))return $.consume(B),R;return J(B)}function R(B){if(B===45||W1(B))return $.consume(B),R;return d(B)}function d(B){if(C(B))return Y=d,f(B);if(g(B))return $.consume(B),d;return Z1(B)}function $1(B){if(B===45||W1(B))return $.consume(B),$1;if(B===47||B===62||X1(B))return i(B);return J(B)}function i(B){if(B===47)return $.consume(B),Z1;if(B===58||B===95||j1(B))return $.consume(B),r;if(C(B))return Y=i,f(B);if(g(B))return $.consume(B),i;return Z1(B)}function r(B){if(B===45||B===46||B===58||B===95||W1(B))return $.consume(B),r;return l(B)}function l(B){if(B===61)return $.consume(B),c;if(C(B))return Y=l,f(B);if(g(B))return $.consume(B),l;return i(B)}function c(B){if(B===null||B===60||B===61||B===62||B===96)return J(B);if(B===34||B===39)return $.consume(B),X=B,S;if(C(B))return Y=c,f(B);if(g(B))return $.consume(B),c;return $.consume(B),m}function S(B){if(B===X)return $.consume(B),X=void 0,z;if(B===null)return J(B);if(C(B))return Y=S,f(B);return $.consume(B),S}function m(B){if(B===null||B===34||B===39||B===60||B===61||B===96)return J(B);if(B===47||B===62||X1(B))return i(B);return $.consume(B),m}function z(B){if(B===47||B===62||X1(B))return i(B);return J(B)}function Z1(B){if(B===62)return $.consume(B),$.exit("htmlTextData"),$.exit("htmlText"),Z;return J(B)}function f(B){return $.exit("htmlTextData"),$.enter("lineEnding"),$.consume(B),$.exit("lineEnding"),T1}function T1(B){return g(B)?y($,B1,"linePrefix",H.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):B1(B)}function B1(B){return $.enter("htmlTextData"),Y(B)}}var w0={name:"labelEnd",resolveAll:PK,resolveTo:wK,tokenize:_K},NK={tokenize:CK},IK={tokenize:SK},TK={tokenize:jK};function PK($){let Z=-1,J=[];while(++Z<$.length){let H=$[Z][1];if(J.push($[Z]),H.type==="labelImage"||H.type==="labelLink"||H.type==="labelEnd"){let X=H.type==="labelImage"?4:2;H.type="data",Z+=X}}if($.length!==J.length)M1($,0,$.length,J);return $}function wK($,Z){let J=$.length,H=0,X,Q,Y,G;while(J--)if(X=$[J][1],Q){if(X.type==="link"||X.type==="labelLink"&&X._inactive)break;if($[J][0]==="enter"&&X.type==="labelLink")X._inactive=!0}else if(Y){if($[J][0]==="enter"&&(X.type==="labelImage"||X.type==="labelLink")&&!X._balanced){if(Q=J,X.type!=="labelLink"){H=2;break}}}else if(X.type==="labelEnd")Y=J;let W={type:$[Q][1].type==="labelLink"?"link":"image",start:{...$[Q][1].start},end:{...$[$.length-1][1].end}},K={type:"label",start:{...$[Q][1].start},end:{...$[Y][1].end}},U={type:"labelText",start:{...$[Q+H+2][1].end},end:{...$[Y-2][1].start}};return G=[["enter",W,Z],["enter",K,Z]],G=I1(G,$.slice(Q+1,Q+H+3)),G=I1(G,[["enter",U,Z]]),G=I1(G,l0(Z.parser.constructs.insideSpan.null,$.slice(Q+H+4,Y-3),Z)),G=I1(G,[["exit",U,Z],$[Y-2],$[Y-1],["exit",K,Z]]),G=I1(G,$.slice(Y+1)),G=I1(G,[["exit",W,Z]]),M1($,Q,$.length,G),$}function _K($,Z,J){let H=this,X=H.events.length,Q,Y;while(X--)if((H.events[X][1].type==="labelImage"||H.events[X][1].type==="labelLink")&&!H.events[X][1]._balanced){Q=H.events[X][1];break}return G;function G(M){if(!Q)return J(M);if(Q._inactive)return L(M);return Y=H.parser.defined.includes(Z0(H.sliceSerialize({start:Q.end,end:H.now()}))),$.enter("labelEnd"),$.enter("labelMarker"),$.consume(M),$.exit("labelMarker"),$.exit("labelEnd"),W}function W(M){if(M===40)return $.attempt(NK,U,Y?U:L)(M);if(M===91)return $.attempt(IK,U,Y?K:L)(M);return Y?U(M):L(M)}function K(M){return $.attempt(TK,U,L)(M)}function U(M){return Z(M)}function L(M){return Q._balanced=!0,J(M)}}function CK($,Z,J){return H;function H(L){return $.enter("resource"),$.enter("resourceMarker"),$.consume(L),$.exit("resourceMarker"),X}function X(L){return X1(L)?P0($,Q)(L):Q(L)}function Q(L){if(L===41)return U(L);return u6($,Y,G,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(L)}function Y(L){return X1(L)?P0($,W)(L):U(L)}function G(L){return J(L)}function W(L){if(L===34||L===39||L===40)return l6($,K,J,"resourceTitle","resourceTitleMarker","resourceTitleString")(L);return U(L)}function K(L){return X1(L)?P0($,U)(L):U(L)}function U(L){if(L===41)return $.enter("resourceMarker"),$.consume(L),$.exit("resourceMarker"),$.exit("resource"),Z;return J(L)}}function SK($,Z,J){let H=this;return X;function X(G){return p6.call(H,$,Q,Y,"reference","referenceMarker","referenceString")(G)}function Q(G){return H.parser.defined.includes(Z0(H.sliceSerialize(H.events[H.events.length-1][1]).slice(1,-1)))?Z(G):J(G)}function Y(G){return J(G)}}function jK($,Z,J){return H;function H(Q){return $.enter("reference"),$.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),X}function X(Q){if(Q===93)return $.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),$.exit("reference"),Z;return J(Q)}}var Z8={name:"labelStartImage",resolveAll:w0.resolveAll,tokenize:EK};function EK($,Z,J){let H=this;return X;function X(G){return $.enter("labelImage"),$.enter("labelImageMarker"),$.consume(G),$.exit("labelImageMarker"),Q}function Q(G){if(G===91)return $.enter("labelMarker"),$.consume(G),$.exit("labelMarker"),$.exit("labelImage"),Y;return J(G)}function Y(G){return G===94&&"_hiddenFootnoteSupport"in H.parser.constructs?J(G):Z(G)}}var J8={name:"labelStartLink",resolveAll:w0.resolveAll,tokenize:xK};function xK($,Z,J){let H=this;return X;function X(Y){return $.enter("labelLink"),$.enter("labelMarker"),$.consume(Y),$.exit("labelMarker"),$.exit("labelLink"),Q}function Q(Y){return Y===94&&"_hiddenFootnoteSupport"in H.parser.constructs?J(Y):Z(Y)}}var k5={name:"lineEnding",tokenize:gK};function gK($,Z){return J;function J(H){return $.enter("lineEnding"),$.consume(H),$.exit("lineEnding"),y($,Z,"linePrefix")}}var _0={name:"thematicBreak",tokenize:bK};function bK($,Z,J){let H=0,X;return Q;function Q(K){return $.enter("thematicBreak"),Y(K)}function Y(K){return X=K,G(K)}function G(K){if(K===X)return $.enter("thematicBreakSequence"),W(K);if(H>=3&&(K===null||C(K)))return $.exit("thematicBreak"),Z(K);return J(K)}function W(K){if(K===X)return $.consume(K),H++,W;return $.exit("thematicBreakSequence"),g(K)?y($,G,"whitespace")(K):G(K)}}var z1={continuation:{tokenize:kK},exit:fK,name:"list",tokenize:vK},hK={partial:!0,tokenize:uK},yK={partial:!0,tokenize:mK};function vK($,Z,J){let H=this,X=H.events[H.events.length-1],Q=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,Y=0;return G;function G(q){let A=H.containerState.type||(q===42||q===43||q===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!H.containerState.marker||q===H.containerState.marker:b5(q)){if(!H.containerState.type)H.containerState.type=A,$.enter(A,{_container:!0});if(A==="listUnordered")return $.enter("listItemPrefix"),q===42||q===45?$.check(_0,J,K)(q):K(q);if(!H.interrupt||q===49)return $.enter("listItemPrefix"),$.enter("listItemValue"),W(q)}return J(q)}function W(q){if(b5(q)&&++Y<10)return $.consume(q),W;if((!H.interrupt||Y<2)&&(H.containerState.marker?q===H.containerState.marker:q===41||q===46))return $.exit("listItemValue"),K(q);return J(q)}function K(q){return $.enter("listItemMarker"),$.consume(q),$.exit("listItemMarker"),H.containerState.marker=H.containerState.marker||q,$.check(K0,H.interrupt?J:U,$.attempt(hK,M,L))}function U(q){return H.containerState.initialBlankLine=!0,Q++,M(q)}function L(q){if(g(q))return $.enter("listItemPrefixWhitespace"),$.consume(q),$.exit("listItemPrefixWhitespace"),M;return J(q)}function M(q){return H.containerState.size=Q+H.sliceSerialize($.exit("listItemPrefix"),!0).length,Z(q)}}function kK($,Z,J){let H=this;return H.containerState._closeFlow=void 0,$.check(K0,X,Q);function X(G){return H.containerState.furtherBlankLines=H.containerState.furtherBlankLines||H.containerState.initialBlankLine,y($,Z,"listItemIndent",H.containerState.size+1)(G)}function Q(G){if(H.containerState.furtherBlankLines||!g(G))return H.containerState.furtherBlankLines=void 0,H.containerState.initialBlankLine=void 0,Y(G);return H.containerState.furtherBlankLines=void 0,H.containerState.initialBlankLine=void 0,$.attempt(yK,Z,Y)(G)}function Y(G){return H.containerState._closeFlow=!0,H.interrupt=void 0,y($,$.attempt(z1,Z,J),"linePrefix",H.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G)}}function mK($,Z,J){let H=this;return y($,X,"listItemIndent",H.containerState.size+1);function X(Q){let Y=H.events[H.events.length-1];return Y&&Y[1].type==="listItemIndent"&&Y[2].sliceSerialize(Y[1],!0).length===H.containerState.size?Z(Q):J(Q)}}function fK($){$.exit(this.containerState.type)}function uK($,Z,J){let H=this;return y($,X,"listItemPrefixWhitespace",H.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function X(Q){let Y=H.events[H.events.length-1];return!g(Q)&&Y&&Y[1].type==="listItemPrefixWhitespace"?Z(Q):J(Q)}}var i6={name:"setextUnderline",resolveTo:pK,tokenize:lK};function pK($,Z){let J=$.length,H,X,Q;while(J--)if($[J][0]==="enter"){if($[J][1].type==="content"){H=J;break}if($[J][1].type==="paragraph")X=J}else{if($[J][1].type==="content")$.splice(J,1);if(!Q&&$[J][1].type==="definition")Q=J}let Y={type:"setextHeading",start:{...$[H][1].start},end:{...$[$.length-1][1].end}};if($[X][1].type="setextHeadingText",Q)$.splice(X,0,["enter",Y,Z]),$.splice(Q+1,0,["exit",$[H][1],Z]),$[H][1].end={...$[Q][1].end};else $[H][1]=Y;return $.push(["exit",Y,Z]),$}function lK($,Z,J){let H=this,X;return Q;function Q(K){let U=H.events.length,L;while(U--)if(H.events[U][1].type!=="lineEnding"&&H.events[U][1].type!=="linePrefix"&&H.events[U][1].type!=="content"){L=H.events[U][1].type==="paragraph";break}if(!H.parser.lazy[H.now().line]&&(H.interrupt||L))return $.enter("setextHeadingLine"),X=K,Y(K);return J(K)}function Y(K){return $.enter("setextHeadingLineSequence"),G(K)}function G(K){if(K===X)return $.consume(K),G;return $.exit("setextHeadingLineSequence"),g(K)?y($,W,"lineSuffix")(K):W(K)}function W(K){if(K===null||C(K))return $.exit("setextHeadingLine"),Z(K);return J(K)}}var e3={tokenize:iK};function iK($){let Z=this,J=$.attempt(K0,H,$.attempt(this.parser.constructs.flowInitial,X,y($,$.attempt(this.parser.constructs.flow,X,$.attempt(a9,X)),"linePrefix")));return J;function H(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEndingBlank"),$.consume(Q),$.exit("lineEndingBlank"),Z.currentConstruct=void 0,J}function X(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEnding"),$.consume(Q),$.exit("lineEnding"),Z.currentConstruct=void 0,J}}var $Z={resolveAll:XZ()},ZZ=HZ("string"),JZ=HZ("text");function HZ($){return{resolveAll:XZ($==="text"?dK:void 0),tokenize:Z};function Z(J){let H=this,X=this.parser.constructs[$],Q=J.attempt(X,Y,G);return Y;function Y(U){return K(U)?Q(U):G(U)}function G(U){if(U===null){J.consume(U);return}return J.enter("data"),J.consume(U),W}function W(U){if(K(U))return J.exit("data"),Q(U);return J.consume(U),W}function K(U){if(U===null)return!0;let L=X[U],M=-1;if(L)while(++M<L.length){let q=L[M];if(!q.previous||q.previous.call(H,H.previous))return!0}return!1}}}function XZ($){return Z;function Z(J,H){let X=-1,Q;while(++X<=J.length)if(Q===void 0){if(J[X]&&J[X][1].type==="data")Q=X,X++}else if(!J[X]||J[X][1].type!=="data"){if(X!==Q+2)J[Q][1].end=J[X-1][1].end,J.splice(Q+2,X-Q-2),X=Q+2;Q=void 0}return $?$(J,H):J}}function dK($,Z){let J=0;while(++J<=$.length)if((J===$.length||$[J][1].type==="lineEnding")&&$[J-1][1].type==="data"){let H=$[J-1][1],X=Z.sliceStream(H),Q=X.length,Y=-1,G=0,W;while(Q--){let K=X[Q];if(typeof K==="string"){Y=K.length;while(K.charCodeAt(Y-1)===32)G++,Y--;if(Y)break;Y=-1}else if(K===-2)W=!0,G++;else if(K===-1);else{Q++;break}}if(Z._contentTypeTextTrailing&&J===$.length)G=0;if(G){let K={type:J===$.length||W||G<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:Q?Y:H.start._bufferIndex+Y,_index:H.start._index+Q,line:H.end.line,column:H.end.column-G,offset:H.end.offset-G},end:{...H.end}};if(H.end={...K.start},H.start.offset===H.end.offset)Object.assign(H,K);else $.splice(J,0,["enter",K,Z],["exit",K,Z]),J+=2}J++}return $}var H8={};b2(H8,{text:()=>oK,string:()=>sK,insideSpan:()=>tK,flowInitial:()=>aK,flow:()=>nK,document:()=>cK,disable:()=>$q,contentInitial:()=>rK,attentionMarkers:()=>eK});var cK={[42]:z1,[43]:z1,[45]:z1,[48]:z1,[49]:z1,[50]:z1,[51]:z1,[52]:z1,[53]:z1,[54]:z1,[55]:z1,[56]:z1,[57]:z1,[62]:y6},rK={[91]:n9},aK={[-2]:y5,[-1]:y5,[32]:y5},nK={[35]:o9,[42]:_0,[45]:[i6,_0],[60]:e9,[61]:i6,[95]:_0,[96]:m6,[126]:m6},sK={[38]:k6,[92]:v6},oK={[-5]:k5,[-4]:k5,[-3]:k5,[33]:Z8,[38]:k6,[42]:h5,[60]:[d9,$8],[91]:J8,[92]:[s9,v6],[93]:w0,[95]:h5,[96]:c9},tK={null:[h5,$Z]},eK={null:[42,95]},$q={null:[]};function QZ($,Z,J){let H={_bufferIndex:-1,_index:0,line:J&&J.line||1,column:J&&J.column||1,offset:J&&J.offset||0},X={},Q=[],Y=[],G=[],W=!0,K={attempt:i(d),check:i($1),consume:_,enter:x,exit:R,interrupt:i($1,{interrupt:!0})},U={code:null,containerState:{},defineSkip:V,events:[],now:I,parser:$,previous:null,sliceSerialize:A,sliceStream:O,write:q},L=Z.tokenize.call(U,K),M;if(Z.resolveAll)Q.push(Z);return U;function q(S){if(Y=I1(Y,S),w(),Y[Y.length-1]!==null)return[];return r(Z,0),U.events=l0(Q,U.events,U),U.events}function A(S,m){return Jq(O(S),m)}function O(S){return Zq(Y,S)}function I(){let{_bufferIndex:S,_index:m,line:z,column:Z1,offset:f}=H;return{_bufferIndex:S,_index:m,line:z,column:Z1,offset:f}}function V(S){X[S.line]=S.column,c()}function w(){let S;while(H._index<Y.length){let m=Y[H._index];if(typeof m==="string"){if(S=H._index,H._bufferIndex<0)H._bufferIndex=0;while(H._index===S&&H._bufferIndex<m.length)T(m.charCodeAt(H._bufferIndex))}else T(m)}}function T(S){W=void 0,M=S,L=L(S)}function _(S){if(C(S))H.line++,H.column=1,H.offset+=S===-3?2:1,c();else if(S!==-1)H.column++,H.offset++;if(H._bufferIndex<0)H._index++;else if(H._bufferIndex++,H._bufferIndex===Y[H._index].length)H._bufferIndex=-1,H._index++;U.previous=S,W=!0}function x(S,m){let z=m||{};return z.type=S,z.start=I(),U.events.push(["enter",z,U]),G.push(z),z}function R(S){let m=G.pop();return m.end=I(),U.events.push(["exit",m,U]),m}function d(S,m){r(S,m.from)}function $1(S,m){m.restore()}function i(S,m){return z;function z(Z1,f,T1){let B1,B,p1,r1;return Array.isArray(Z1)?v1(Z1):("tokenize"in Z1)?v1([Z1]):F(Z1);function F(K1){return X5;function X5(a1){let z0=a1!==null&&K1[a1],g0=a1!==null&&K1.null,x2=[...Array.isArray(z0)?z0:z0?[z0]:[],...Array.isArray(g0)?g0:g0?[g0]:[]];return v1(x2)(a1)}}function v1(K1){if(B1=K1,B=0,K1.length===0)return T1;return F0(K1[B])}function F0(K1){return X5;function X5(a1){if(r1=l(),p1=K1,!K1.partial)U.currentConstruct=K1;if(K1.name&&U.parser.constructs.disable.null.includes(K1.name))return e5(a1);return K1.tokenize.call(m?Object.assign(Object.create(U),m):U,K,E2,e5)(a1)}}function E2(K1){return W=!0,S(p1,r1),f}function e5(K1){if(W=!0,r1.restore(),++B<B1.length)return F0(B1[B]);return T1}}}function r(S,m){if(S.resolveAll&&!Q.includes(S))Q.push(S);if(S.resolve)M1(U.events,m,U.events.length-m,S.resolve(U.events.slice(m),U));if(S.resolveTo)U.events=S.resolveTo(U.events,U)}function l(){let S=I(),m=U.previous,z=U.currentConstruct,Z1=U.events.length,f=Array.from(G);return{from:Z1,restore:T1};function T1(){H=S,U.previous=m,U.currentConstruct=z,U.events.length=Z1,G=f,c()}}function c(){if(H.line in X&&H.column<2)H.column=X[H.line],H.offset+=X[H.line]-1}}function Zq($,Z){let J=Z.start._index,H=Z.start._bufferIndex,X=Z.end._index,Q=Z.end._bufferIndex,Y;if(J===X)Y=[$[J].slice(H,Q)];else{if(Y=$.slice(J,X),H>-1){let G=Y[0];if(typeof G==="string")Y[0]=G.slice(H);else Y.shift()}if(Q>0)Y.push($[X].slice(0,Q))}return Y}function Jq($,Z){let J=-1,H=[],X;while(++J<$.length){let Q=$[J],Y;if(typeof Q==="string")Y=Q;else switch(Q){case-5:{Y="\r";break}case-4:{Y=`
18
+ `;break}case-3:{Y=`\r
19
+ `;break}case-2:{Y=Z?" ":"\t";break}case-1:{if(!Z&&X)continue;Y=" ";break}default:Y=String.fromCharCode(Q)}X=Q===-2,H.push(Y)}return H.join("")}function X8($){let H={constructs:u3([H8,...($||{}).extensions||[]]),content:X(r3),defined:[],document:X(n3),flow:X(e3),lazy:{},string:X(ZZ),text:X(JZ)};return H;function X(Q){return Y;function Y(G){return QZ(H,Q,G)}}}function Q8($){while(!f6($));return $}var YZ=/[\0\t\n\r]/g;function Y8(){let $=1,Z="",J=!0,H;return X;function X(Q,Y,G){let W=[],K,U,L,M,q;if(Q=Z+(typeof Q==="string"?Q.toString():new TextDecoder(Y||void 0).decode(Q)),L=0,Z="",J){if(Q.charCodeAt(0)===65279)L++;J=void 0}while(L<Q.length){if(YZ.lastIndex=L,K=YZ.exec(Q),M=K&&K.index!==void 0?K.index:Q.length,q=Q.charCodeAt(M),!K){Z=Q.slice(L);break}if(q===10&&L===M&&H)W.push(-3),H=void 0;else{if(H)W.push(-5),H=void 0;if(L<M)W.push(Q.slice(L,M)),$+=M-L;switch(q){case 0:{W.push(65533),$++;break}case 9:{U=Math.ceil($/4)*4,W.push(-2);while($++<U)W.push(-1);break}case 10:{W.push(-4),$=1;break}default:H=!0,$=1}}L=M+1}if(G){if(H)W.push(-5);if(Z)W.push(Z);W.push(null)}return W}}var Hq=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GZ($){return $.replace(Hq,Xq)}function Xq($,Z,J){if(Z)return Z;if(J.charCodeAt(0)===35){let X=J.charCodeAt(1),Q=X===120||X===88;return h6(J.slice(Q?2:1),Q?16:10)}return p0(J)||$}var UZ={}.hasOwnProperty;function G8($,Z,J){if(typeof Z!=="string")J=Z,Z=void 0;return Qq(J)(Q8(X8(J).document().write(Y8()($,Z,!0))))}function Qq($){let Z={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:Q(r7),autolinkProtocol:i,autolinkEmail:i,atxHeading:Q(i7),blockQuote:Q(a1),characterEscape:i,characterReference:i,codeFenced:Q(z0),codeFencedFenceInfo:Y,codeFencedFenceMeta:Y,codeIndented:Q(z0,Y),codeText:Q(g0,Y),codeTextData:i,data:i,codeFlowValue:i,definition:Q(x2),definitionDestinationString:Y,definitionLabelString:Y,definitionTitleString:Y,emphasis:Q(CQ),hardBreakEscape:Q(d7),hardBreakTrailing:Q(d7),htmlFlow:Q(c7,Y),htmlFlowData:i,htmlText:Q(c7,Y),htmlTextData:i,image:Q(SQ),label:Y,link:Q(r7),listItem:Q(jQ),listItemValue:M,listOrdered:Q(a7,L),listUnordered:Q(a7),paragraph:Q(EQ),reference:F,referenceString:Y,resourceDestinationString:Y,resourceTitleString:Y,setextHeading:Q(i7),strong:Q(xQ),thematicBreak:Q(bQ)},exit:{atxHeading:W(),atxHeadingSequence:x,autolink:W(),autolinkEmail:X5,autolinkProtocol:K1,blockQuote:W(),characterEscapeValue:r,characterReferenceMarkerHexadecimal:F0,characterReferenceMarkerNumeric:F0,characterReferenceValue:E2,characterReference:e5,codeFenced:W(I),codeFencedFence:O,codeFencedFenceInfo:q,codeFencedFenceMeta:A,codeFlowValue:r,codeIndented:W(V),codeText:W(z),codeTextData:r,data:r,definition:W(),definitionDestinationString:_,definitionLabelString:w,definitionTitleString:T,emphasis:W(),hardBreakEscape:W(c),hardBreakTrailing:W(c),htmlFlow:W(S),htmlFlowData:r,htmlText:W(m),htmlTextData:r,image:W(f),label:B1,labelText:T1,lineEnding:l,link:W(Z1),listItem:W(),listOrdered:W(),listUnordered:W(),paragraph:W(),referenceString:v1,resourceDestinationString:B,resourceTitleString:p1,resource:r1,setextHeading:W($1),setextHeadingLineSequence:d,setextHeadingText:R,strong:W(),thematicBreak:W()}};KZ(Z,($||{}).mdastExtensions||[]);let J={};return H;function H(D){let P={type:"root",children:[]},b={stack:[P],tokenStack:[],config:Z,enter:G,exit:K,buffer:Y,resume:U,data:J},p=[],o=-1;while(++o<D.length)if(D[o][1].type==="listOrdered"||D[o][1].type==="listUnordered")if(D[o][0]==="enter")p.push(o);else{let k1=p.pop();o=X(D,k1,o)}o=-1;while(++o<D.length){let k1=Z[D[o][0]];if(UZ.call(k1,D[o][1].type))k1[D[o][1].type].call(Object.assign({sliceSerialize:D[o][2].sliceSerialize},b),D[o][1])}if(b.tokenStack.length>0){let k1=b.tokenStack[b.tokenStack.length-1];(k1[1]||WZ).call(b,void 0,k1[0])}P.position={start:q0(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:q0(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},o=-1;while(++o<Z.transforms.length)P=Z.transforms[o](P)||P;return P}function X(D,P,b){let p=P-1,o=-1,k1=!1,A0,n1,Q5,Y5;while(++p<=b){let _1=D[p];switch(_1[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(_1[0]==="enter")o++;else o--;Y5=void 0;break}case"lineEndingBlank":{if(_1[0]==="enter"){if(A0&&!Y5&&!o&&!Q5)Q5=p;Y5=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Y5=void 0}if(!o&&_1[0]==="enter"&&_1[1].type==="listItemPrefix"||o===-1&&_1[0]==="exit"&&(_1[1].type==="listUnordered"||_1[1].type==="listOrdered")){if(A0){let b0=p;n1=void 0;while(b0--){let s1=D[b0];if(s1[1].type==="lineEnding"||s1[1].type==="lineEndingBlank"){if(s1[0]==="exit")continue;if(n1)D[n1][1].type="lineEndingBlank",k1=!0;s1[1].type="lineEnding",n1=b0}else if(s1[1].type==="linePrefix"||s1[1].type==="blockQuotePrefix"||s1[1].type==="blockQuotePrefixWhitespace"||s1[1].type==="blockQuoteMarker"||s1[1].type==="listItemIndent");else break}if(Q5&&(!n1||Q5<n1))A0._spread=!0;A0.end=Object.assign({},n1?D[n1][1].start:_1[1].end),D.splice(n1||p,0,["exit",A0,_1[2]]),p++,b++}if(_1[1].type==="listItemPrefix"){let b0={type:"listItem",_spread:!1,start:Object.assign({},_1[1].start),end:void 0};A0=b0,D.splice(p,0,["enter",b0,_1[2]]),p++,b++,Q5=void 0,Y5=!0}}}return D[P][1]._spread=k1,b}function Q(D,P){return b;function b(p){if(G.call(this,D(p),p),P)P.call(this,p)}}function Y(){this.stack.push({type:"fragment",children:[]})}function G(D,P,b){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([P,b||void 0]),D.position={start:q0(P.start),end:void 0}}function W(D){return P;function P(b){if(D)D.call(this,b);K.call(this,b)}}function K(D,P){let b=this.stack.pop(),p=this.tokenStack.pop();if(!p)throw Error("Cannot close `"+D.type+"` ("+W0({start:D.start,end:D.end})+"): it’s not open");else if(p[0].type!==D.type)if(P)P.call(this,D,p[0]);else(p[1]||WZ).call(this,D,p[0]);b.position.end=q0(D.end)}function U(){return l9(this.stack.pop())}function L(){this.data.expectingFirstListItemValue=!0}function M(D){if(this.data.expectingFirstListItemValue){let P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function q(){let D=this.resume(),P=this.stack[this.stack.length-1];P.lang=D}function A(){let D=this.resume(),P=this.stack[this.stack.length-1];P.meta=D}function O(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function I(){let D=this.resume(),P=this.stack[this.stack.length-1];P.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function V(){let D=this.resume(),P=this.stack[this.stack.length-1];P.value=D.replace(/(\r?\n|\r)$/g,"")}function w(D){let P=this.resume(),b=this.stack[this.stack.length-1];b.label=P,b.identifier=Z0(this.sliceSerialize(D)).toLowerCase()}function T(){let D=this.resume(),P=this.stack[this.stack.length-1];P.title=D}function _(){let D=this.resume(),P=this.stack[this.stack.length-1];P.url=D}function x(D){let P=this.stack[this.stack.length-1];if(!P.depth){let b=this.sliceSerialize(D).length;P.depth=b}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function d(D){let P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function $1(){this.data.setextHeadingSlurpLineEnding=void 0}function i(D){let b=this.stack[this.stack.length-1].children,p=b[b.length-1];if(!p||p.type!=="text")p=gQ(),p.position={start:q0(D.start),end:void 0},b.push(p);this.stack.push(p)}function r(D){let P=this.stack.pop();P.value+=this.sliceSerialize(D),P.position.end=q0(D.end)}function l(D){let P=this.stack[this.stack.length-1];if(this.data.atHardBreak){let b=P.children[P.children.length-1];b.position.end=q0(D.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&Z.canContainEols.includes(P.type))i.call(this,D),r.call(this,D)}function c(){this.data.atHardBreak=!0}function S(){let D=this.resume(),P=this.stack[this.stack.length-1];P.value=D}function m(){let D=this.resume(),P=this.stack[this.stack.length-1];P.value=D}function z(){let D=this.resume(),P=this.stack[this.stack.length-1];P.value=D}function Z1(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let P=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=P,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function f(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let P=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=P,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function T1(D){let P=this.sliceSerialize(D),b=this.stack[this.stack.length-2];b.label=GZ(P),b.identifier=Z0(P).toLowerCase()}function B1(){let D=this.stack[this.stack.length-1],P=this.resume(),b=this.stack[this.stack.length-1];if(this.data.inReference=!0,b.type==="link"){let p=D.children;b.children=p}else b.alt=P}function B(){let D=this.resume(),P=this.stack[this.stack.length-1];P.url=D}function p1(){let D=this.resume(),P=this.stack[this.stack.length-1];P.title=D}function r1(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function v1(D){let P=this.resume(),b=this.stack[this.stack.length-1];b.label=P,b.identifier=Z0(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function F0(D){this.data.characterReferenceType=D.type}function E2(D){let P=this.sliceSerialize(D),b=this.data.characterReferenceType,p;if(b)p=h6(P,b==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else p=p0(P);let o=this.stack[this.stack.length-1];o.value+=p}function e5(D){let P=this.stack.pop();P.position.end=q0(D.end)}function K1(D){r.call(this,D);let P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(D)}function X5(D){r.call(this,D);let P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(D)}function a1(){return{type:"blockquote",children:[]}}function z0(){return{type:"code",lang:null,meta:null,value:""}}function g0(){return{type:"inlineCode",value:""}}function x2(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function CQ(){return{type:"emphasis",children:[]}}function i7(){return{type:"heading",depth:0,children:[]}}function d7(){return{type:"break"}}function c7(){return{type:"html",value:""}}function SQ(){return{type:"image",title:null,url:"",alt:null}}function r7(){return{type:"link",title:null,url:"",children:[]}}function a7(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function jQ(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function EQ(){return{type:"paragraph",children:[]}}function xQ(){return{type:"strong",children:[]}}function gQ(){return{type:"text",value:""}}function bQ(){return{type:"thematicBreak"}}}function q0($){return{line:$.line,column:$.column,offset:$.offset}}function KZ($,Z){let J=-1;while(++J<Z.length){let H=Z[J];if(Array.isArray(H))KZ($,H);else Yq($,H)}}function Yq($,Z){let J;for(J in Z)if(UZ.call(Z,J))switch(J){case"canContainEols":{let H=Z[J];if(H)$[J].push(...H);break}case"transforms":{let H=Z[J];if(H)$[J].push(...H);break}case"enter":case"exit":{let H=Z[J];if(H)Object.assign($[J],H);break}}}function WZ($,Z){if($)throw Error("Cannot close `"+$.type+"` ("+W0({start:$.start,end:$.end})+"): a different token (`"+Z.type+"`, "+W0({start:Z.start,end:Z.end})+") is open");else throw Error("Cannot close document, a token (`"+Z.type+"`, "+W0({start:Z.start,end:Z.end})+") is still open")}function d6($){let Z=this;Z.parser=J;function J(H){return G8(H,{...Z.data("settings"),...$,extensions:Z.data("micromarkExtensions")||[],mdastExtensions:Z.data("fromMarkdownExtensions")||[]})}}function qZ($,Z){let J={type:"element",tagName:"blockquote",properties:{},children:$.wrap($.all(Z),!0)};return $.patch(Z,J),$.applyData(Z,J)}function LZ($,Z){let J={type:"element",tagName:"br",properties:{},children:[]};return $.patch(Z,J),[$.applyData(Z,J),{type:"text",value:`
20
+ `}]}function MZ($,Z){let J=Z.value?Z.value+`
21
+ `:"",H={},X=Z.lang?Z.lang.split(/\s+/):[];if(X.length>0)H.className=["language-"+X[0]];let Q={type:"element",tagName:"code",properties:H,children:[{type:"text",value:J}]};if(Z.meta)Q.data={meta:Z.meta};return $.patch(Z,Q),Q=$.applyData(Z,Q),Q={type:"element",tagName:"pre",properties:{},children:[Q]},$.patch(Z,Q),Q}function BZ($,Z){let J={type:"element",tagName:"del",properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function FZ($,Z){let J={type:"element",tagName:"em",properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function zZ($,Z){let J=typeof $.options.clobberPrefix==="string"?$.options.clobberPrefix:"user-content-",H=String(Z.identifier).toUpperCase(),X=g1(H.toLowerCase()),Q=$.footnoteOrder.indexOf(H),Y,G=$.footnoteCounts.get(H);if(G===void 0)G=0,$.footnoteOrder.push(H),Y=$.footnoteOrder.length;else Y=Q+1;G+=1,$.footnoteCounts.set(H,G);let W={type:"element",tagName:"a",properties:{href:"#"+J+"fn-"+X,id:J+"fnref-"+X+(G>1?"-"+G:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(Y)}]};$.patch(Z,W);let K={type:"element",tagName:"sup",properties:{},children:[W]};return $.patch(Z,K),$.applyData(Z,K)}function AZ($,Z){let J={type:"element",tagName:"h"+Z.depth,properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function OZ($,Z){if($.options.allowDangerousHtml){let J={type:"raw",value:Z.value};return $.patch(Z,J),$.applyData(Z,J)}return}function c6($,Z){let J=Z.referenceType,H="]";if(J==="collapsed")H+="[]";else if(J==="full")H+="["+(Z.label||Z.identifier)+"]";if(Z.type==="imageReference")return[{type:"text",value:"!["+Z.alt+H}];let X=$.all(Z),Q=X[0];if(Q&&Q.type==="text")Q.value="["+Q.value;else X.unshift({type:"text",value:"["});let Y=X[X.length-1];if(Y&&Y.type==="text")Y.value+=H;else X.push({type:"text",value:H});return X}function DZ($,Z){let J=String(Z.identifier).toUpperCase(),H=$.definitionById.get(J);if(!H)return c6($,Z);let X={src:g1(H.url||""),alt:Z.alt};if(H.title!==null&&H.title!==void 0)X.title=H.title;let Q={type:"element",tagName:"img",properties:X,children:[]};return $.patch(Z,Q),$.applyData(Z,Q)}function RZ($,Z){let J={src:g1(Z.url)};if(Z.alt!==null&&Z.alt!==void 0)J.alt=Z.alt;if(Z.title!==null&&Z.title!==void 0)J.title=Z.title;let H={type:"element",tagName:"img",properties:J,children:[]};return $.patch(Z,H),$.applyData(Z,H)}function VZ($,Z){let J={type:"text",value:Z.value.replace(/\r?\n|\r/g," ")};$.patch(Z,J);let H={type:"element",tagName:"code",properties:{},children:[J]};return $.patch(Z,H),$.applyData(Z,H)}function NZ($,Z){let J=String(Z.identifier).toUpperCase(),H=$.definitionById.get(J);if(!H)return c6($,Z);let X={href:g1(H.url||"")};if(H.title!==null&&H.title!==void 0)X.title=H.title;let Q={type:"element",tagName:"a",properties:X,children:$.all(Z)};return $.patch(Z,Q),$.applyData(Z,Q)}function IZ($,Z){let J={href:g1(Z.url)};if(Z.title!==null&&Z.title!==void 0)J.title=Z.title;let H={type:"element",tagName:"a",properties:J,children:$.all(Z)};return $.patch(Z,H),$.applyData(Z,H)}function TZ($,Z,J){let H=$.all(Z),X=J?Gq(J):PZ(Z),Q={},Y=[];if(typeof Z.checked==="boolean"){let U=H[0],L;if(U&&U.type==="element"&&U.tagName==="p")L=U;else L={type:"element",tagName:"p",properties:{},children:[]},H.unshift(L);if(L.children.length>0)L.children.unshift({type:"text",value:" "});L.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:Z.checked,disabled:!0},children:[]}),Q.className=["task-list-item"]}let G=-1;while(++G<H.length){let U=H[G];if(X||G!==0||U.type!=="element"||U.tagName!=="p")Y.push({type:"text",value:`
22
+ `});if(U.type==="element"&&U.tagName==="p"&&!X)Y.push(...U.children);else Y.push(U)}let W=H[H.length-1];if(W&&(X||W.type!=="element"||W.tagName!=="p"))Y.push({type:"text",value:`
23
+ `});let K={type:"element",tagName:"li",properties:Q,children:Y};return $.patch(Z,K),$.applyData(Z,K)}function Gq($){let Z=!1;if($.type==="list"){Z=$.spread||!1;let J=$.children,H=-1;while(!Z&&++H<J.length)Z=PZ(J[H])}return Z}function PZ($){let Z=$.spread;return Z===null||Z===void 0?$.children.length>1:Z}function wZ($,Z){let J={},H=$.all(Z),X=-1;if(typeof Z.start==="number"&&Z.start!==1)J.start=Z.start;while(++X<H.length){let Y=H[X];if(Y.type==="element"&&Y.tagName==="li"&&Y.properties&&Array.isArray(Y.properties.className)&&Y.properties.className.includes("task-list-item")){J.className=["contains-task-list"];break}}let Q={type:"element",tagName:Z.ordered?"ol":"ul",properties:J,children:$.wrap(H,!0)};return $.patch(Z,Q),$.applyData(Z,Q)}function _Z($,Z){let J={type:"element",tagName:"p",properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function CZ($,Z){let J={type:"root",children:$.wrap($.all(Z))};return $.patch(Z,J),$.applyData(Z,J)}function SZ($,Z){let J={type:"element",tagName:"strong",properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function jZ($,Z){let J=$.all(Z),H=J.shift(),X=[];if(H){let Y={type:"element",tagName:"thead",properties:{},children:$.wrap([H],!0)};$.patch(Z.children[0],Y),X.push(Y)}if(J.length>0){let Y={type:"element",tagName:"tbody",properties:{},children:$.wrap(J,!0)},G=u0(Z.children[1]),W=b6(Z.children[Z.children.length-1]);if(G&&W)Y.position={start:G,end:W};X.push(Y)}let Q={type:"element",tagName:"table",properties:{},children:$.wrap(X,!0)};return $.patch(Z,Q),$.applyData(Z,Q)}function EZ($,Z,J){let H=J?J.children:void 0,Q=(H?H.indexOf(Z):1)===0?"th":"td",Y=J&&J.type==="table"?J.align:void 0,G=Y?Y.length:Z.children.length,W=-1,K=[];while(++W<G){let L=Z.children[W],M={},q=Y?Y[W]:void 0;if(q)M.align=q;let A={type:"element",tagName:Q,properties:M,children:[]};if(L)A.children=$.all(L),$.patch(L,A),A=$.applyData(L,A);K.push(A)}let U={type:"element",tagName:"tr",properties:{},children:$.wrap(K,!0)};return $.patch(Z,U),$.applyData(Z,U)}function xZ($,Z){let J={type:"element",tagName:"td",properties:{},children:$.all(Z)};return $.patch(Z,J),$.applyData(Z,J)}function bZ($){let Z=String($),J=/\r?\n|\r/g,H=J.exec(Z),X=0,Q=[];while(H)Q.push(gZ(Z.slice(X,H.index),X>0,!0),H[0]),X=H.index+H[0].length,H=J.exec(Z);return Q.push(gZ(Z.slice(X),X>0,!1)),Q.join("")}function gZ($,Z,J){let H=0,X=$.length;if(Z){let Q=$.codePointAt(H);while(Q===9||Q===32)H++,Q=$.codePointAt(H)}if(J){let Q=$.codePointAt(X-1);while(Q===9||Q===32)X--,Q=$.codePointAt(X-1)}return X>H?$.slice(H,X):""}function hZ($,Z){let J={type:"text",value:bZ(String(Z.value))};return $.patch(Z,J),$.applyData(Z,J)}function yZ($,Z){let J={type:"element",tagName:"hr",properties:{},children:[]};return $.patch(Z,J),$.applyData(Z,J)}var vZ={blockquote:qZ,break:LZ,code:MZ,delete:BZ,emphasis:FZ,footnoteReference:zZ,heading:AZ,html:OZ,imageReference:DZ,image:RZ,inlineCode:VZ,linkReference:NZ,link:IZ,listItem:TZ,list:wZ,paragraph:_Z,root:CZ,strong:SZ,table:jZ,tableCell:xZ,tableRow:EZ,text:hZ,thematicBreak:yZ,toml:r6,yaml:r6,definition:r6,footnoteDefinition:r6};function r6(){return}var a6=-1,i0=0,C0=1,d0=2,m5=3,f5=4,u5=5,p5=6,n6=7,s6=8;var kZ=typeof self==="object"?self:globalThis,Wq=($,Z)=>{let J=(X,Q)=>{return $.set(Q,X),X},H=(X)=>{if($.has(X))return $.get(X);let[Q,Y]=Z[X];switch(Q){case i0:case a6:return J(Y,X);case C0:{let G=J([],X);for(let W of Y)G.push(H(W));return G}case d0:{let G=J({},X);for(let[W,K]of Y)G[H(W)]=H(K);return G}case m5:return J(new Date(Y),X);case f5:{let{source:G,flags:W}=Y;return J(new RegExp(G,W),X)}case u5:{let G=J(new Map,X);for(let[W,K]of Y)G.set(H(W),H(K));return G}case p5:{let G=J(new Set,X);for(let W of Y)G.add(H(W));return G}case n6:{let{name:G,message:W}=Y;return J(new kZ[G](W),X)}case s6:return J(BigInt(Y),X);case"BigInt":return J(Object(BigInt(Y)),X);case"ArrayBuffer":return J(new Uint8Array(Y).buffer,Y);case"DataView":{let{buffer:G}=new Uint8Array(Y);return J(new DataView(G),Y)}}return J(new kZ[Q](Y),X)};return H},W8=($)=>Wq(new Map,$)(0);var c0="",{toString:Uq}={},{keys:Kq}=Object,l5=($)=>{let Z=typeof $;if(Z!=="object"||!$)return[i0,Z];let J=Uq.call($).slice(8,-1);switch(J){case"Array":return[C0,c0];case"Object":return[d0,c0];case"Date":return[m5,c0];case"RegExp":return[f5,c0];case"Map":return[u5,c0];case"Set":return[p5,c0];case"DataView":return[C0,J]}if(J.includes("Array"))return[C0,J];if(J.includes("Error"))return[n6,J];return[d0,J]},o6=([$,Z])=>$===i0&&(Z==="function"||Z==="symbol"),qq=($,Z,J,H)=>{let X=(Y,G)=>{let W=H.push(Y)-1;return J.set(G,W),W},Q=(Y)=>{if(J.has(Y))return J.get(Y);let[G,W]=l5(Y);switch(G){case i0:{let U=Y;switch(W){case"bigint":G=s6,U=Y.toString();break;case"function":case"symbol":if($)throw TypeError("unable to serialize "+W);U=null;break;case"undefined":return X([a6],Y)}return X([G,U],Y)}case C0:{if(W){let M=Y;if(W==="DataView")M=new Uint8Array(Y.buffer);else if(W==="ArrayBuffer")M=new Uint8Array(Y);return X([W,[...M]],Y)}let U=[],L=X([G,U],Y);for(let M of Y)U.push(Q(M));return L}case d0:{if(W)switch(W){case"BigInt":return X([W,Y.toString()],Y);case"Boolean":case"Number":case"String":return X([W,Y.valueOf()],Y)}if(Z&&"toJSON"in Y)return Q(Y.toJSON());let U=[],L=X([G,U],Y);for(let M of Kq(Y))if($||!o6(l5(Y[M])))U.push([Q(M),Q(Y[M])]);return L}case m5:return X([G,Y.toISOString()],Y);case f5:{let{source:U,flags:L}=Y;return X([G,{source:U,flags:L}],Y)}case u5:{let U=[],L=X([G,U],Y);for(let[M,q]of Y)if($||!(o6(l5(M))||o6(l5(q))))U.push([Q(M),Q(q)]);return L}case p5:{let U=[],L=X([G,U],Y);for(let M of Y)if($||!o6(l5(M)))U.push(Q(M));return L}}let{message:K}=Y;return X([G,{name:W,message:K}],Y)};return Q},U8=($,{json:Z,lossy:J}={})=>{let H=[];return qq(!(Z||J),!!Z,new Map,H)($),H};var r0=typeof structuredClone==="function"?($,Z)=>Z&&(("json"in Z)||("lossy"in Z))?W8(U8($,Z)):structuredClone($):($,Z)=>W8(U8($,Z));function Lq($,Z){let J=[{type:"text",value:"↩"}];if(Z>1)J.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(Z)}]});return J}function Mq($,Z){return"Back to reference "+($+1)+(Z>1?"-"+Z:"")}function mZ($){let Z=typeof $.options.clobberPrefix==="string"?$.options.clobberPrefix:"user-content-",J=$.options.footnoteBackContent||Lq,H=$.options.footnoteBackLabel||Mq,X=$.options.footnoteLabel||"Footnotes",Q=$.options.footnoteLabelTagName||"h2",Y=$.options.footnoteLabelProperties||{className:["sr-only"]},G=[],W=-1;while(++W<$.footnoteOrder.length){let K=$.footnoteById.get($.footnoteOrder[W]);if(!K)continue;let U=$.all(K),L=String(K.identifier).toUpperCase(),M=g1(L.toLowerCase()),q=0,A=[],O=$.footnoteCounts.get(L);while(O!==void 0&&++q<=O){if(A.length>0)A.push({type:"text",value:" "});let w=typeof J==="string"?J:J(W,q);if(typeof w==="string")w={type:"text",value:w};A.push({type:"element",tagName:"a",properties:{href:"#"+Z+"fnref-"+M+(q>1?"-"+q:""),dataFootnoteBackref:"",ariaLabel:typeof H==="string"?H:H(W,q),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}let I=U[U.length-1];if(I&&I.type==="element"&&I.tagName==="p"){let w=I.children[I.children.length-1];if(w&&w.type==="text")w.value+=" ";else I.children.push({type:"text",value:" "});I.children.push(...A)}else U.push(...A);let V={type:"element",tagName:"li",properties:{id:Z+"fn-"+M},children:$.wrap(U,!0)};$.patch(K,V),G.push(V)}if(G.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:Q,properties:{...r0(Y),id:"footnote-label"},children:[{type:"text",value:X}]},{type:"text",value:`
24
+ `},{type:"element",tagName:"ol",properties:{},children:$.wrap(G,!0)},{type:"text",value:`
25
+ `}]}}var t6=function($){if($===null||$===void 0)return Aq;if(typeof $==="function")return e6($);if(typeof $==="object")return Array.isArray($)?Bq($):Fq($);if(typeof $==="string")return zq($);throw Error("Expected function, string, or object as test")};function Bq($){let Z=[],J=-1;while(++J<$.length)Z[J]=t6($[J]);return e6(H);function H(...X){let Q=-1;while(++Q<Z.length)if(Z[Q].apply(this,X))return!0;return!1}}function Fq($){let Z=$;return e6(J);function J(H){let X=H,Q;for(Q in $)if(X[Q]!==Z[Q])return!1;return!0}}function zq($){return e6(Z);function Z(J){return J&&J.type===$}}function e6($){return Z;function Z(J,H,X){return Boolean(Oq(J)&&$.call(this,J,typeof H==="number"?H:void 0,X||void 0))}}function Aq(){return!0}function Oq($){return $!==null&&typeof $==="object"&&"type"in $}function fZ($){return $}var uZ=[],K8=!0,$2=!1,q8="skip";function L8($,Z,J,H){let X;if(typeof Z==="function"&&typeof J!=="function")H=J,J=Z;else X=Z;let Q=t6(X),Y=H?-1:1;G($,void 0,[])();function G(W,K,U){let L=W&&typeof W==="object"?W:{};if(typeof L.type==="string"){let q=typeof L.tagName==="string"?L.tagName:typeof L.name==="string"?L.name:void 0;Object.defineProperty(M,"name",{value:"node ("+fZ(W.type+(q?"<"+q+">":""))+")"})}return M;function M(){let q=uZ,A,O,I;if(!Z||Q(W,K,U[U.length-1]||void 0)){if(q=Dq(J(W,U)),q[0]===$2)return q}if("children"in W&&W.children){let V=W;if(V.children&&q[0]!==q8){O=(H?V.children.length:-1)+Y,I=U.concat(V);while(O>-1&&O<V.children.length){let w=V.children[O];if(A=G(w,O,I)(),A[0]===$2)return A;O=typeof A[1]==="number"?A[1]:O+Y}}}return q}}}function Dq($){if(Array.isArray($))return $;if(typeof $==="number")return[K8,$];return $===null||$===void 0?uZ:[$]}function i5($,Z,J,H){let X,Q,Y;if(typeof Z==="function"&&typeof J!=="function")Q=void 0,Y=Z,X=J;else Q=Z,Y=J,X=H;L8($,Q,G,X);function G(W,K){let U=K[K.length-1],L=U?U.children.indexOf(W):void 0;return Y(W,L,U)}}var M8={}.hasOwnProperty,Rq={};function lZ($,Z){let J=Z||Rq,H=new Map,X=new Map,Q=new Map,Y={...vZ,...J.handlers},G={all:K,applyData:Nq,definitionById:H,footnoteById:X,footnoteCounts:Q,footnoteOrder:[],handlers:Y,one:W,options:J,patch:Vq,wrap:Tq};return i5($,function(U){if(U.type==="definition"||U.type==="footnoteDefinition"){let L=U.type==="definition"?H:X,M=String(U.identifier).toUpperCase();if(!L.has(M))L.set(M,U)}}),G;function W(U,L){let M=U.type,q=G.handlers[M];if(M8.call(G.handlers,M)&&q)return q(G,U,L);if(G.options.passThrough&&G.options.passThrough.includes(M)){if("children"in U){let{children:O,...I}=U,V=r0(I);return V.children=G.all(U),V}return r0(U)}return(G.options.unknownHandler||Iq)(G,U,L)}function K(U){let L=[];if("children"in U){let M=U.children,q=-1;while(++q<M.length){let A=G.one(M[q],U);if(A){if(q&&M[q-1].type==="break"){if(!Array.isArray(A)&&A.type==="text")A.value=pZ(A.value);if(!Array.isArray(A)&&A.type==="element"){let O=A.children[0];if(O&&O.type==="text")O.value=pZ(O.value)}}if(Array.isArray(A))L.push(...A);else L.push(A)}}}return L}}function Vq($,Z){if($.position)Z.position=v9($)}function Nq($,Z){let J=Z;if($&&$.data){let H=$.data.hName,X=$.data.hChildren,Q=$.data.hProperties;if(typeof H==="string")if(J.type==="element")J.tagName=H;else{let Y="children"in J?J.children:[J];J={type:"element",tagName:H,properties:{},children:Y}}if(J.type==="element"&&Q)Object.assign(J.properties,r0(Q));if("children"in J&&J.children&&X!==null&&X!==void 0)J.children=X}return J}function Iq($,Z){let J=Z.data||{},H="value"in Z&&!(M8.call(J,"hProperties")||M8.call(J,"hChildren"))?{type:"text",value:Z.value}:{type:"element",tagName:"div",properties:{},children:$.all(Z)};return $.patch(Z,H),$.applyData(Z,H)}function Tq($,Z){let J=[],H=-1;if(Z)J.push({type:"text",value:`
26
+ `});while(++H<$.length){if(H)J.push({type:"text",value:`
27
+ `});J.push($[H])}if(Z&&$.length>0)J.push({type:"text",value:`
28
+ `});return J}function pZ($){let Z=0,J=$.charCodeAt(Z);while(J===9||J===32)Z++,J=$.charCodeAt(Z);return $.slice(Z)}function Z2($,Z){let J=lZ($,Z),H=J.one($,void 0),X=mZ(J),Q=Array.isArray(H)?{type:"root",children:H}:H||{type:"root",children:[]};if(X)N1("children"in Q),Q.children.push({type:"text",value:`
29
+ `},X);return Q}function J2($,Z){if($&&"run"in $)return async function(J,H){let X=Z2(J,{file:H,...Z});await $.run(X,H)};return function(J,H){return Z2(J,{file:H,...$||Z})}}function B8($){if($)throw $}var Q2=u(tZ(),1);function d5($){if(typeof $!=="object"||$===null)return!1;let Z=Object.getPrototypeOf($);return(Z===null||Z===Object.prototype||Object.getPrototypeOf(Z)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}function F8(){let $=[],Z={run:J,use:H};return Z;function J(...X){let Q=-1,Y=X.pop();if(typeof Y!=="function")throw TypeError("Expected function as last argument, not "+Y);G(null,...X);function G(W,...K){let U=$[++Q],L=-1;if(W){Y(W);return}while(++L<X.length)if(K[L]===null||K[L]===void 0)K[L]=X[L];if(X=K,U)eZ(U,G)(...K);else Y(null,...K)}}function H(X){if(typeof X!=="function")throw TypeError("Expected `middelware` to be a function, not "+X);return $.push(X),Z}}function eZ($,Z){let J;return H;function H(...Y){let G=$.length>Y.length,W;if(G)Y.push(X);try{W=$.apply(this,Y)}catch(K){let U=K;if(G&&J)throw U;return X(U)}if(!G)if(W&&W.then&&typeof W.then==="function")W.then(Q,X);else if(W instanceof Error)X(W);else Q(W)}function X(Y,...G){if(!J)J=!0,Z(Y,...G)}function Q(Y){X(null,Y)}}var u1={basename:Pq,dirname:wq,extname:_q,join:Cq,sep:"/"};function Pq($,Z){if(Z!==void 0&&typeof Z!=="string")throw TypeError('"ext" argument must be a string');c5($);let J=0,H=-1,X=$.length,Q;if(Z===void 0||Z.length===0||Z.length>$.length){while(X--)if($.codePointAt(X)===47){if(Q){J=X+1;break}}else if(H<0)Q=!0,H=X+1;return H<0?"":$.slice(J,H)}if(Z===$)return"";let Y=-1,G=Z.length-1;while(X--)if($.codePointAt(X)===47){if(Q){J=X+1;break}}else{if(Y<0)Q=!0,Y=X+1;if(G>-1)if($.codePointAt(X)===Z.codePointAt(G--)){if(G<0)H=X}else G=-1,H=Y}if(J===H)H=Y;else if(H<0)H=$.length;return $.slice(J,H)}function wq($){if(c5($),$.length===0)return".";let Z=-1,J=$.length,H;while(--J)if($.codePointAt(J)===47){if(H){Z=J;break}}else if(!H)H=!0;return Z<0?$.codePointAt(0)===47?"/":".":Z===1&&$.codePointAt(0)===47?"//":$.slice(0,Z)}function _q($){c5($);let Z=$.length,J=-1,H=0,X=-1,Q=0,Y;while(Z--){let G=$.codePointAt(Z);if(G===47){if(Y){H=Z+1;break}continue}if(J<0)Y=!0,J=Z+1;if(G===46){if(X<0)X=Z;else if(Q!==1)Q=1}else if(X>-1)Q=-1}if(X<0||J<0||Q===0||Q===1&&X===J-1&&X===H+1)return"";return $.slice(X,J)}function Cq(...$){let Z=-1,J;while(++Z<$.length)if(c5($[Z]),$[Z])J=J===void 0?$[Z]:J+"/"+$[Z];return J===void 0?".":Sq(J)}function Sq($){c5($);let Z=$.codePointAt(0)===47,J=jq($,!Z);if(J.length===0&&!Z)J=".";if(J.length>0&&$.codePointAt($.length-1)===47)J+="/";return Z?"/"+J:J}function jq($,Z){let J="",H=0,X=-1,Q=0,Y=-1,G,W;while(++Y<=$.length){if(Y<$.length)G=$.codePointAt(Y);else if(G===47)break;else G=47;if(G===47){if(X===Y-1||Q===1);else if(X!==Y-1&&Q===2){if(J.length<2||H!==2||J.codePointAt(J.length-1)!==46||J.codePointAt(J.length-2)!==46){if(J.length>2){if(W=J.lastIndexOf("/"),W!==J.length-1){if(W<0)J="",H=0;else J=J.slice(0,W),H=J.length-1-J.lastIndexOf("/");X=Y,Q=0;continue}}else if(J.length>0){J="",H=0,X=Y,Q=0;continue}}if(Z)J=J.length>0?J+"/..":"..",H=2}else{if(J.length>0)J+="/"+$.slice(X+1,Y);else J=$.slice(X+1,Y);H=Y-X-1}X=Y,Q=0}else if(G===46&&Q>-1)Q++;else Q=-1}return J}function c5($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}var $J={cwd:Eq};function Eq(){return"/"}function a0($){return Boolean($!==null&&typeof $==="object"&&"href"in $&&$.href&&"protocol"in $&&$.protocol&&$.auth===void 0)}function ZJ($){if(typeof $==="string")$=new URL($);else if(!a0($)){let Z=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+$+"`");throw Z.code="ERR_INVALID_ARG_TYPE",Z}if($.protocol!=="file:"){let Z=TypeError("The URL must be of scheme file");throw Z.code="ERR_INVALID_URL_SCHEME",Z}return xq($)}function xq($){if($.hostname!==""){let H=TypeError('File URL host must be "localhost" or empty on darwin');throw H.code="ERR_INVALID_FILE_URL_HOST",H}let Z=$.pathname,J=-1;while(++J<Z.length)if(Z.codePointAt(J)===37&&Z.codePointAt(J+1)===50){let H=Z.codePointAt(J+2);if(H===70||H===102){let X=TypeError("File URL path must not include encoded / characters");throw X.code="ERR_INVALID_FILE_URL_PATH",X}}return decodeURIComponent(Z)}var z8=["history","path","basename","stem","extname","dirname"];class n0{constructor($){let Z;if(!$)Z={};else if(a0($))Z={path:$};else if(typeof $==="string"||gq($))Z={value:$};else Z=$;this.cwd="cwd"in Z?"":$J.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let J=-1;while(++J<z8.length){let X=z8[J];if(X in Z&&Z[X]!==void 0&&Z[X]!==null)this[X]=X==="history"?[...Z[X]]:Z[X]}let H;for(H in Z)if(!z8.includes(H))this[H]=Z[H]}get basename(){return typeof this.path==="string"?u1.basename(this.path):void 0}set basename($){O8($,"basename"),A8($,"basename"),this.path=u1.join(this.dirname||"",$)}get dirname(){return typeof this.path==="string"?u1.dirname(this.path):void 0}set dirname($){JJ(this.basename,"dirname"),this.path=u1.join($||"",this.basename)}get extname(){return typeof this.path==="string"?u1.extname(this.path):void 0}set extname($){if(A8($,"extname"),JJ(this.dirname,"extname"),$){if($.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if($.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=u1.join(this.dirname,this.stem+($||""))}get path(){return this.history[this.history.length-1]}set path($){if(a0($))$=ZJ($);if(O8($,"path"),this.path!==$)this.history.push($)}get stem(){return typeof this.path==="string"?u1.basename(this.path,this.extname):void 0}set stem($){O8($,"stem"),A8($,"stem"),this.path=u1.join(this.dirname||"",$+(this.extname||""))}fail($,Z,J){let H=this.message($,Z,J);throw H.fatal=!0,H}info($,Z,J){let H=this.message($,Z,J);return H.fatal=void 0,H}message($,Z,J){let H=new Y1($,Z,J);if(this.path)H.name=this.path+":"+H.name,H.file=this.path;return H.fatal=!1,this.messages.push(H),H}toString($){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder($||void 0).decode(this.value)}}function A8($,Z){if($&&$.includes(u1.sep))throw Error("`"+Z+"` cannot be a path: did not expect `"+u1.sep+"`")}function O8($,Z){if(!$)throw Error("`"+Z+"` cannot be empty")}function JJ($,Z){if(!$)throw Error("Setting `"+Z+"` requires `path` to be set too")}function gq($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var HJ=function($){let H=this.constructor.prototype,X=H[$],Q=function(){return X.apply(Q,arguments)};return Object.setPrototypeOf(Q,H),Q};var bq={}.hasOwnProperty;class N8 extends HJ{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=F8()}copy(){let $=new N8,Z=-1;while(++Z<this.attachers.length){let J=this.attachers[Z];$.use(...J)}return $.data(Q2.default(!0,{},this.namespace)),$}data($,Z){if(typeof $==="string"){if(arguments.length===2)return V8("data",this.frozen),this.namespace[$]=Z,this;return bq.call(this.namespace,$)&&this.namespace[$]||void 0}if($)return V8("data",this.frozen),this.namespace=$,this;return this.namespace}freeze(){if(this.frozen)return this;let $=this;while(++this.freezeIndex<this.attachers.length){let[Z,...J]=this.attachers[this.freezeIndex];if(J[0]===!1)continue;if(J[0]===!0)J[0]=void 0;let H=Z.call($,...J);if(typeof H==="function")this.transformers.use(H)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse($){this.freeze();let Z=X2($),J=this.parser||this.Parser;return D8("parse",J),J(String(Z),Z)}process($,Z){let J=this;return this.freeze(),D8("process",this.parser||this.Parser),R8("process",this.compiler||this.Compiler),Z?H(void 0,Z):new Promise(H);function H(X,Q){let Y=X2($),G=J.parse(Y);J.run(G,Y,function(K,U,L){if(K||!U||!L)return W(K);let M=U,q=J.stringify(M,L);if(yq(q))L.value=q;else L.result=q;W(K,L)});function W(K,U){if(K||!U)Q(K);else if(X)X(U);else N1(Z,"`done` is defined if `resolve` is not"),Z(void 0,U)}}}processSync($){let Z=!1,J;return this.freeze(),D8("processSync",this.parser||this.Parser),R8("processSync",this.compiler||this.Compiler),this.process($,H),QJ("processSync","process",Z),N1(J,"we either bailed on an error or have a tree"),J;function H(X,Q){Z=!0,B8(X),J=Q}}run($,Z,J){XJ($),this.freeze();let H=this.transformers;if(!J&&typeof Z==="function")J=Z,Z=void 0;return J?X(void 0,J):new Promise(X);function X(Q,Y){N1(typeof Z!=="function","`file` can’t be a `done` anymore, we checked");let G=X2(Z);H.run($,G,W);function W(K,U,L){let M=U||$;if(K)Y(K);else if(Q)Q(M);else N1(J,"`done` is defined if `resolve` is not"),J(void 0,M,L)}}}runSync($,Z){let J=!1,H;return this.run($,Z,X),QJ("runSync","run",J),N1(H,"we either bailed on an error or have a tree"),H;function X(Q,Y){B8(Q),H=Y,J=!0}}stringify($,Z){this.freeze();let J=X2(Z),H=this.compiler||this.Compiler;return R8("stringify",H),XJ($),H($,J)}use($,...Z){let J=this.attachers,H=this.namespace;if(V8("use",this.frozen),$===null||$===void 0);else if(typeof $==="function")G($,Z);else if(typeof $==="object")if(Array.isArray($))Y($);else Q($);else throw TypeError("Expected usable value, not `"+$+"`");return this;function X(W){if(typeof W==="function")G(W,[]);else if(typeof W==="object")if(Array.isArray(W)){let[K,...U]=W;G(K,U)}else Q(W);else throw TypeError("Expected usable value, not `"+W+"`")}function Q(W){if(!("plugins"in W)&&!("settings"in W))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(Y(W.plugins),W.settings)H.settings=Q2.default(!0,H.settings,W.settings)}function Y(W){let K=-1;if(W===null||W===void 0);else if(Array.isArray(W))while(++K<W.length){let U=W[K];X(U)}else throw TypeError("Expected a list of plugins, not `"+W+"`")}function G(W,K){let U=-1,L=-1;while(++U<J.length)if(J[U][0]===W){L=U;break}if(L===-1)J.push([W,...K]);else if(K.length>0){let[M,...q]=K,A=J[L][1];if(d5(A)&&d5(M))M=Q2.default(!0,A,M);J[L]=[W,M,...q]}}}}var I8=new N8().freeze();function D8($,Z){if(typeof Z!=="function")throw TypeError("Cannot `"+$+"` without `parser`")}function R8($,Z){if(typeof Z!=="function")throw TypeError("Cannot `"+$+"` without `compiler`")}function V8($,Z){if(Z)throw Error("Cannot call `"+$+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XJ($){if(!d5($)||typeof $.type!=="string")throw TypeError("Expected node, got `"+$+"`")}function QJ($,Z,J){if(!J)throw Error("`"+$+"` finished async. Use `"+Z+"` instead")}function X2($){return hq($)?$:new n0($)}function hq($){return Boolean($&&typeof $==="object"&&"message"in $&&"messages"in $)}function yq($){return typeof $==="string"||vq($)}function vq($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var uq="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",YJ=[],GJ={allowDangerousHtml:!0},pq=/^(https?|ircs?|mailto|xmpp)$/i,lq=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function T8($){let Z=iq($),J=dq($);return cq(Z.runSync(Z.parse(J),J),$)}function iq($){let Z=$.rehypePlugins||YJ,J=$.remarkPlugins||YJ,H=$.remarkRehypeOptions?{...$.remarkRehypeOptions,...GJ}:GJ;return I8().use(d6).use(J).use(J2,H).use(Z)}function dq($){let Z=$.children||"",J=new n0;if(typeof Z==="string")J.value=Z;else C6("Unexpected value `"+Z+"` for `children` prop, expected `string`");return J}function cq($,Z){let{allowedElements:J,allowElement:H,components:X,disallowedElements:Q,skipHtml:Y,unwrapDisallowed:G}=Z,W=Z.urlTransform||WJ;for(let U of lq)if(Object.hasOwn(Z,U.from))C6("Unexpected `"+U.from+"` prop, "+(U.to?"use `"+U.to+"` instead":"remove it")+" (see <"+uq+"#"+U.id+"> for more info)");if(J&&Q)C6("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");return i5($,K),f9($,{Fragment:kq,components:X,ignoreInvalidStyle:!0,jsx:mq,jsxs:fq,passKeys:!0,passNode:!0});function K(U,L,M){if(U.type==="raw"&&M&&typeof L==="number"){if(Y)M.children.splice(L,1);else M.children[L]={type:"text",value:U.value};return L}if(U.type==="element"){let q;for(q in x5)if(Object.hasOwn(x5,q)&&Object.hasOwn(U.properties,q)){let A=U.properties[q],O=x5[q];if(O===null||O.includes(U.tagName))U.properties[q]=W(String(A||""),q,U)}}if(U.type==="element"){let q=J?!J.includes(U.tagName):Q?Q.includes(U.tagName):!1;if(!q&&H&&typeof L==="number")q=!H(U,L,M);if(q&&M&&typeof L==="number"){if(G&&U.children)M.children.splice(L,1,...U.children);else M.children.splice(L,1);return L}}}}function WJ($){let Z=$.indexOf(":"),J=$.indexOf("?"),H=$.indexOf("#"),X=$.indexOf("/");if(Z===-1||X!==-1&&Z>X||J!==-1&&Z>J||H!==-1&&Z>H||pq.test($.slice(0,Z)))return $;return""}import rq from"rehype-highlight";import"highlight.js/styles/github.css";import{useEffect as aq,useState as nq}from"react";import{jsxDEV as UJ}from"react/jsx-dev-runtime";function sq({children:$}){let[Z,J]=nq($);return aq(()=>{J($)},[$]),UJ("div",{className:"max-w-full first:mt-0",children:UJ(T8,{rehypePlugins:[rq],children:Z},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var KJ=sq;import{jsxDEV as qJ}from"react/jsx-dev-runtime";var oq=()=>qJ("svg",{width:"30",height:"30",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:qJ("path",{d:"m 8 1 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 s 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m -1.5 7 c -2.492188 0 -4.5 2.007812 -4.5 4.5 v 0.5 c 0 1.109375 0.890625 2 2 2 h 8 c 1.109375 0 2 -0.890625 2 -2 v -0.5 c 0 -2.492188 -2.007812 -4.5 -4.5 -4.5 z m 0 0",fill:"#2e3436"},void 0,!1,void 0,this)},void 0,!1,void 0,this),LJ=oq;import{jsxDEV as Y2}from"react/jsx-dev-runtime";function tq({username:$,avatar:Z}){return Y2("div",{className:"w-[30px]",children:Y2("div",{className:"relative flex size-[30px] items-center justify-center rounded-sm p-1 text-white",children:Z?Y2("img",{src:Z,className:"absolute inset-0 rounded",alt:$},void 0,!1,void 0,this):Y2(LJ,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var P8=tq;import{jsxDEV as b1}from"react/jsx-dev-runtime";var ZL=({message:$,handleOptionClick:Z,setUiAjaxConfiguration:J})=>{let[H,X]=eq(!1);return $L(()=>{let Q=setTimeout(()=>{if(H)X(!1)},1000);return()=>clearTimeout(Q)},[H]),b1("div",{className:"group w-full border-b border-black/10",id:$.id,children:b1("div",{className:`flex gap-4 p-4 text-base md:max-w-2xl md:gap-6 md:py-6 lg:max-w-3xl xl:max-w-5xl ${$.align==="center"?"m-auto":""} ${$.align==="right"?"ml-auto justify-end":""} ${$.align==="left"?"mr-auto":""} `,children:[($.align==="left"||$.align==="center")&&b1("div",{className:"relative flex shrink-0 flex-col items-end",children:b1(P8,{username:$.username,avatar:$.avatar},void 0,!1,void 0,this)},void 0,!1,void 0,this),b1("div",{className:"relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]",children:[b1("div",{className:`markdown light prose w-full break-words dark:prose-invert first:mt-0 ${$.align==="right"?"flex justify-end self-end":""}`,children:typeof $.content==="string"?$.parseMode.toLowerCase()==="markdown"?b1(KJ,{children:$.content},Date.now()+Math.random(),!1,void 0,this):$.parseMode.toLowerCase()==="html"?_6($.content):$.content:b1(V0,{uiConfig:$.content,setUiAjaxConfiguration:J},void 0,!1,void 0,this)},void 0,!1,void 0,this),b1("div",{className:"flex flex-row flex-wrap justify-start gap-1",children:$.options.map((Q,Y)=>b1(O6,{onClickOption:Z,option:Q},Y,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.align==="right"&&b1("div",{className:"relative flex shrink-0 flex-col items-end",children:b1(P8,{username:$.username,avatar:$.avatar},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},MJ=ZL;import{forwardRef as JL,useEffect as HL,useImperativeHandle as XL,useRef as QL,useState as YL}from"react";import{jsxDEV as BJ}from"react/jsx-dev-runtime";var GL=JL(({name:$,handleOptionClick:Z,defaultMessages:J,sx:H,setUiAjaxConfiguration:X},Q)=>{let[Y,G]=YL(J),W=QL(null),K=()=>{if(W.current)W.current.scrollTop=W.current.scrollHeight};return HL(()=>{K()},[Y]),XL(Q,()=>({setMessages:(U)=>G(U),addMessage:(U)=>G((L)=>[...L,U]),scrollToBottom:K})),BJ("div",{id:$+"_messages",className:"flex flex-col items-center overflow-y-scroll",style:H,ref:W,children:Y.map((U)=>BJ(MJ,{message:U,handleOptionClick:Z,setUiAjaxConfiguration:X},U.id,!1,void 0,this))},void 0,!1,void 0,this)}),FJ=GL;import{useEffect as WL,useMemo as UL,useRef as zJ,useState as KL}from"react";import{jsxDEV as G2}from"react/jsx-dev-runtime";var qL=({data:$,setUiAjaxConfiguration:Z})=>{let{name:J,defaultValue:H,defaultMessages:X,defaultOptions:Q,isArea:Y,fileAccept:G,placeholder:W,icons:K,optionsPosition:U,sxMap:L={container:{},chatInput:{},messages:{}},depsNames:M,pathname:q,kwargs:A,useSocketioSupport:O,useCentrifugeSupport:I,centrifugeChannel:V}=$,w=zJ(null),T=zJ(null),[_,x]=KL(!1),R=UL(()=>F6(Z,A,M,q),[Z,A,M,q]);WL(()=>{if(_)requestAnimationFrame(()=>{R(),x(!1)})},[_]);let d=(S)=>{if(w.current)w.current.setValue(S),x(!0)},$1=()=>{if(w.current)w.current.clear()},i=(S)=>{if(w.current)w.current.setOptions(S.options)},r=(S)=>{if(T.current)T.current.addMessage(S.message)},l=(S)=>{if(T.current)T.current.setMessages(S.messages)},c=()=>{x(!0)};return G2($0,{card:"ChatCard",data:$,methods:{clearInput:$1,setOptions:i,addMessage:r,setMessages:l},useSocketioSupport:O,useCentrifugeSupport:I,centrifugeChannel:V,children:G2("div",{className:"flex size-full flex-col",style:L.container,children:[G2(FJ,{ref:T,name:J,defaultMessages:X,sx:L.messages,handleOptionClick:d,setUiAjaxConfiguration:Z},void 0,!1,void 0,this),G2(z$,{ref:w,name:J,isArea:Y,defaultOptions:Q,placeholder:W,defaultValue:H,fileAccept:G,sx:L.chatInput,handleSendMessage:c,handleOptionClick:d,optionsPosition:U,icons:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},AJ=qL;var I2=u(w8(),1),MQ=u(S8(),1);import LQ,{useState as az,useContext as HQ,useRef as nz,useEffect as XQ,forwardRef as sz}from"react";var vL={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function r5($,Z){var J=!vL[$]&&typeof Z==="number"&&Z!==0;return J?Z+"px":Z}function a5($,Z){return Object.keys($).reduce(function(J,H){return J[H]=Z($[H],H),J},{})}function j8($){return a5($,function(Z,J){return r5(J,$[J])+" !important"})}var kL=/([a-z])?([A-Z])/g,mL=function(Z,J,H){return(J||"")+"-"+H.toLowerCase()},E8=function(Z){return Z.replace(kL,mL)},fL=function(Z){return Object.keys(Z).reduce(function(J,H){var X=E8(H);if(/^ms-/.test(X))X="-".concat(X);return J[X]=Z[H],J},{})},bJ=fL;var yX=u(iJ(),1),vX=u(JH(),1),kX=u(i8(),1);var yH=u(QH(),1),vH=u(GH(),1),kH=u(UH(),1),mH=u(qH(),1),fH=u(BH(),1),uH=u(AH(),1),pH=u(RH(),1),lH=u(IH(),1),iH=u(PH(),1),dH=u(_H(),1),cH=u(SH(),1),rH=u(hH(),1),E=["Webkit"],W7=["Moz"],H1=["ms"],A1=["Webkit","Moz"],U1=["Webkit","ms"],n5=["Webkit","Moz","ms"],aH={plugins:[yH.default,vH.default,kH.default,mH.default,fH.default,uH.default,pH.default,lH.default,iH.default,dH.default,cH.default,rH.default],prefixMap:{transform:U1,transformOrigin:U1,transformOriginX:U1,transformOriginY:U1,backfaceVisibility:E,perspective:E,perspectiveOrigin:E,transformStyle:E,transformOriginZ:E,animation:E,animationDelay:E,animationDirection:E,animationFillMode:E,animationDuration:E,animationIterationCount:E,animationName:E,animationPlayState:E,animationTimingFunction:E,appearance:A1,userSelect:n5,fontKerning:E,textEmphasisPosition:E,textEmphasis:E,textEmphasisStyle:E,textEmphasisColor:E,boxDecorationBreak:E,clipPath:E,maskImage:E,maskMode:E,maskRepeat:E,maskPosition:E,maskClip:E,maskOrigin:E,maskSize:E,maskComposite:E,mask:E,maskBorderSource:E,maskBorderMode:E,maskBorderSlice:E,maskBorderWidth:E,maskBorderOutset:E,maskBorderRepeat:E,maskBorder:E,maskType:E,textDecorationStyle:A1,textDecorationSkip:A1,textDecorationLine:A1,textDecorationColor:A1,filter:E,fontFeatureSettings:A1,breakAfter:n5,breakBefore:n5,breakInside:n5,columnCount:A1,columnFill:A1,columnGap:A1,columnRule:A1,columnRuleColor:A1,columnRuleStyle:A1,columnRuleWidth:A1,columns:A1,columnSpan:A1,columnWidth:A1,writingMode:U1,flex:U1,flexBasis:E,flexDirection:U1,flexGrow:E,flexFlow:U1,flexShrink:E,flexWrap:U1,alignContent:E,alignItems:E,alignSelf:E,justifyContent:E,order:E,transitionDelay:E,transitionDuration:E,transitionProperty:E,transitionTimingFunction:E,backdropFilter:E,scrollSnapType:U1,scrollSnapPointsX:U1,scrollSnapPointsY:U1,scrollSnapDestination:U1,scrollSnapCoordinate:U1,shapeImageThreshold:E,shapeImageMargin:E,shapeImageOutside:E,hyphens:n5,flowInto:U1,flowFrom:U1,regionFragment:U1,boxSizing:W7,textAlignLast:W7,tabSize:W7,wrapFlow:H1,wrapThrough:H1,wrapMargin:H1,touchAction:H1,gridTemplateColumns:H1,gridTemplateRows:H1,gridTemplateAreas:H1,gridTemplate:H1,gridAutoColumns:H1,gridAutoRows:H1,gridAutoFlow:H1,grid:H1,gridRowStart:H1,gridColumnStart:H1,gridRowEnd:H1,gridRow:H1,gridColumn:H1,gridColumnEnd:H1,gridColumnGap:H1,gridRowGap:H1,gridArea:H1,gridGap:H1,textSizeAdjust:U1,borderImage:E,borderImageOutset:E,borderImageRepeat:E,borderImageSlice:E,borderImageSource:E,borderImageWidth:E}};var NX=u(oH(),1),IX=u(eH(),1),TX=u(JX(),1),PX=u(XX(),1),wX=u(YX(),1),_X=u(WX(),1),CX=u(KX(),1),SX=u(MX(),1),jX=u(FX(),1),EX=u(AX(),1),xX=u(DX(),1),gX=u(VX(),1),bX={plugins:[NX.default,IX.default,TX.default,PX.default,wX.default,_X.default,CX.default,SX.default,jX.default,EX.default,xX.default,gX.default],prefixMap:{chrome:{transform:35,transformOrigin:35,transformOriginX:35,transformOriginY:35,backfaceVisibility:35,perspective:35,perspectiveOrigin:35,transformStyle:35,transformOriginZ:35,animation:42,animationDelay:42,animationDirection:42,animationFillMode:42,animationDuration:42,animationIterationCount:42,animationName:42,animationPlayState:42,animationTimingFunction:42,appearance:66,userSelect:53,fontKerning:32,textEmphasisPosition:66,textEmphasis:66,textEmphasisStyle:66,textEmphasisColor:66,boxDecorationBreak:66,clipPath:54,maskImage:66,maskMode:66,maskRepeat:66,maskPosition:66,maskClip:66,maskOrigin:66,maskSize:66,maskComposite:66,mask:66,maskBorderSource:66,maskBorderMode:66,maskBorderSlice:66,maskBorderWidth:66,maskBorderOutset:66,maskBorderRepeat:66,maskBorder:66,maskType:66,textDecorationStyle:56,textDecorationSkip:56,textDecorationLine:56,textDecorationColor:56,filter:52,fontFeatureSettings:47,breakAfter:49,breakBefore:49,breakInside:49,columnCount:49,columnFill:49,columnGap:49,columnRule:49,columnRuleColor:49,columnRuleStyle:49,columnRuleWidth:49,columns:49,columnSpan:49,columnWidth:49,writingMode:47},safari:{flex:8,flexBasis:8,flexDirection:8,flexGrow:8,flexFlow:8,flexShrink:8,flexWrap:8,alignContent:8,alignItems:8,alignSelf:8,justifyContent:8,order:8,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8,transformOrigin:8,transformOriginX:8,transformOriginY:8,backfaceVisibility:8,perspective:8,perspectiveOrigin:8,transformStyle:8,transformOriginZ:8,animation:8,animationDelay:8,animationDirection:8,animationFillMode:8,animationDuration:8,animationIterationCount:8,animationName:8,animationPlayState:8,animationTimingFunction:8,appearance:11,userSelect:11,backdropFilter:11,fontKerning:9,scrollSnapType:10.1,scrollSnapPointsX:10.1,scrollSnapPointsY:10.1,scrollSnapDestination:10.1,scrollSnapCoordinate:10.1,textEmphasisPosition:7,textEmphasis:7,textEmphasisStyle:7,textEmphasisColor:7,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8,breakAfter:8,breakInside:8,regionFragment:11,columnCount:8,columnFill:8,columnGap:8,columnRule:8,columnRuleColor:8,columnRuleStyle:8,columnRuleWidth:8,columns:8,columnSpan:8,columnWidth:8,writingMode:10.1},firefox:{appearance:60,userSelect:60,boxSizing:28,textAlignLast:48,textDecorationStyle:35,textDecorationSkip:35,textDecorationLine:35,textDecorationColor:35,tabSize:60,hyphens:42,fontFeatureSettings:33,breakAfter:51,breakBefore:51,breakInside:51,columnCount:51,columnFill:51,columnGap:51,columnRule:51,columnRuleColor:51,columnRuleStyle:51,columnRuleWidth:51,columns:51,columnSpan:51,columnWidth:51},opera:{flex:16,flexBasis:16,flexDirection:16,flexGrow:16,flexFlow:16,flexShrink:16,flexWrap:16,alignContent:16,alignItems:16,alignSelf:16,justifyContent:16,order:16,transform:22,transformOrigin:22,transformOriginX:22,transformOriginY:22,backfaceVisibility:22,perspective:22,perspectiveOrigin:22,transformStyle:22,transformOriginZ:22,animation:29,animationDelay:29,animationDirection:29,animationFillMode:29,animationDuration:29,animationIterationCount:29,animationName:29,animationPlayState:29,animationTimingFunction:29,appearance:50,userSelect:40,fontKerning:19,textEmphasisPosition:50,textEmphasis:50,textEmphasisStyle:50,textEmphasisColor:50,boxDecorationBreak:50,clipPath:41,maskImage:50,maskMode:50,maskRepeat:50,maskPosition:50,maskClip:50,maskOrigin:50,maskSize:50,maskComposite:50,mask:50,maskBorderSource:50,maskBorderMode:50,maskBorderSlice:50,maskBorderWidth:50,maskBorderOutset:50,maskBorderRepeat:50,maskBorder:50,maskType:50,textDecorationStyle:43,textDecorationSkip:43,textDecorationLine:43,textDecorationColor:43,filter:39,fontFeatureSettings:34,breakAfter:36,breakBefore:36,breakInside:36,columnCount:36,columnFill:36,columnGap:36,columnRule:36,columnRuleColor:36,columnRuleStyle:36,columnRuleWidth:36,columns:36,columnSpan:36,columnWidth:36,writingMode:34},ie:{flex:10,flexDirection:10,flexFlow:10,flexWrap:10,transform:9,transformOrigin:9,transformOriginX:9,transformOriginY:9,userSelect:11,wrapFlow:11,wrapThrough:11,wrapMargin:11,scrollSnapType:11,scrollSnapPointsX:11,scrollSnapPointsY:11,scrollSnapDestination:11,scrollSnapCoordinate:11,touchAction:10,hyphens:11,flowInto:11,flowFrom:11,breakBefore:11,breakAfter:11,breakInside:11,regionFragment:11,gridTemplateColumns:11,gridTemplateRows:11,gridTemplateAreas:11,gridTemplate:11,gridAutoColumns:11,gridAutoRows:11,gridAutoFlow:11,grid:11,gridRowStart:11,gridColumnStart:11,gridRowEnd:11,gridRow:11,gridColumn:11,gridColumnEnd:11,gridColumnGap:11,gridRowGap:11,gridArea:11,gridGap:11,textSizeAdjust:11,writingMode:11},edge:{userSelect:17,wrapFlow:17,wrapThrough:17,wrapMargin:17,scrollSnapType:17,scrollSnapPointsX:17,scrollSnapPointsY:17,scrollSnapDestination:17,scrollSnapCoordinate:17,hyphens:17,flowInto:17,flowFrom:17,breakBefore:17,breakAfter:17,breakInside:17,regionFragment:17,gridTemplateColumns:15,gridTemplateRows:15,gridTemplateAreas:15,gridTemplate:15,gridAutoColumns:15,gridAutoRows:15,gridAutoFlow:15,grid:15,gridRowStart:15,gridColumnStart:15,gridRowEnd:15,gridRow:15,gridColumn:15,gridColumnEnd:15,gridColumnGap:15,gridRowGap:15,gridArea:15,gridGap:15},ios_saf:{flex:8.1,flexBasis:8.1,flexDirection:8.1,flexGrow:8.1,flexFlow:8.1,flexShrink:8.1,flexWrap:8.1,alignContent:8.1,alignItems:8.1,alignSelf:8.1,justifyContent:8.1,order:8.1,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8.1,transformOrigin:8.1,transformOriginX:8.1,transformOriginY:8.1,backfaceVisibility:8.1,perspective:8.1,perspectiveOrigin:8.1,transformStyle:8.1,transformOriginZ:8.1,animation:8.1,animationDelay:8.1,animationDirection:8.1,animationFillMode:8.1,animationDuration:8.1,animationIterationCount:8.1,animationName:8.1,animationPlayState:8.1,animationTimingFunction:8.1,appearance:11,userSelect:11,backdropFilter:11,fontKerning:11,scrollSnapType:10.3,scrollSnapPointsX:10.3,scrollSnapPointsY:10.3,scrollSnapDestination:10.3,scrollSnapCoordinate:10.3,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textSizeAdjust:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8.1,breakAfter:8.1,breakInside:8.1,regionFragment:11,columnCount:8.1,columnFill:8.1,columnGap:8.1,columnRule:8.1,columnRuleColor:8.1,columnRuleStyle:8.1,columnRuleWidth:8.1,columns:8.1,columnSpan:8.1,columnWidth:8.1,writingMode:10.3},android:{borderImage:4.2,borderImageOutset:4.2,borderImageRepeat:4.2,borderImageSlice:4.2,borderImageSource:4.2,borderImageWidth:4.2,flex:4.2,flexBasis:4.2,flexDirection:4.2,flexGrow:4.2,flexFlow:4.2,flexShrink:4.2,flexWrap:4.2,alignContent:4.2,alignItems:4.2,alignSelf:4.2,justifyContent:4.2,order:4.2,transition:4.2,transitionDelay:4.2,transitionDuration:4.2,transitionProperty:4.2,transitionTimingFunction:4.2,transform:4.4,transformOrigin:4.4,transformOriginX:4.4,transformOriginY:4.4,backfaceVisibility:4.4,perspective:4.4,perspectiveOrigin:4.4,transformStyle:4.4,transformOriginZ:4.4,animation:4.4,animationDelay:4.4,animationDirection:4.4,animationFillMode:4.4,animationDuration:4.4,animationIterationCount:4.4,animationName:4.4,animationPlayState:4.4,animationTimingFunction:4.4,appearance:62,userSelect:4.4,fontKerning:4.4,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,clipPath:4.4,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62,filter:4.4,fontFeatureSettings:4.4,breakAfter:4.4,breakBefore:4.4,breakInside:4.4,columnCount:4.4,columnFill:4.4,columnGap:4.4,columnRule:4.4,columnRuleColor:4.4,columnRuleStyle:4.4,columnRuleWidth:4.4,columns:4.4,columnSpan:4.4,columnWidth:4.4,writingMode:4.4},and_chr:{appearance:62,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62},and_uc:{flex:11.4,flexBasis:11.4,flexDirection:11.4,flexGrow:11.4,flexFlow:11.4,flexShrink:11.4,flexWrap:11.4,alignContent:11.4,alignItems:11.4,alignSelf:11.4,justifyContent:11.4,order:11.4,transform:11.4,transformOrigin:11.4,transformOriginX:11.4,transformOriginY:11.4,backfaceVisibility:11.4,perspective:11.4,perspectiveOrigin:11.4,transformStyle:11.4,transformOriginZ:11.4,animation:11.4,animationDelay:11.4,animationDirection:11.4,animationFillMode:11.4,animationDuration:11.4,animationIterationCount:11.4,animationName:11.4,animationPlayState:11.4,animationTimingFunction:11.4,appearance:11.4,userSelect:11.4,textEmphasisPosition:11.4,textEmphasis:11.4,textEmphasisStyle:11.4,textEmphasisColor:11.4,clipPath:11.4,maskImage:11.4,maskMode:11.4,maskRepeat:11.4,maskPosition:11.4,maskClip:11.4,maskOrigin:11.4,maskSize:11.4,maskComposite:11.4,mask:11.4,maskBorderSource:11.4,maskBorderMode:11.4,maskBorderSlice:11.4,maskBorderWidth:11.4,maskBorderOutset:11.4,maskBorderRepeat:11.4,maskBorder:11.4,maskType:11.4,textSizeAdjust:11.4,filter:11.4,hyphens:11.4,fontFeatureSettings:11.4,breakAfter:11.4,breakBefore:11.4,breakInside:11.4,columnCount:11.4,columnFill:11.4,columnGap:11.4,columnRule:11.4,columnRuleColor:11.4,columnRuleStyle:11.4,columnRuleWidth:11.4,columns:11.4,columnSpan:11.4,columnWidth:11.4,writingMode:11.4},op_mini:{}}};function M2($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")M2=function(J){return typeof J};else M2=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return M2($)}var mX=yX.default(aH),Uz=vX.default(bX,mX);function Kz($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))H=H.join(";"+J+":");else if(H&&M2(H)==="object"&&typeof H.toString==="function")H=H.toString();return Z[J]=H,Z},{})}function qz($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))if(kX.default.canUseDOM)H=H[H.length-1].toString();else H=H.join(";".concat(E8(J),":"));return Z[J]=H,Z},{})}var hX,L2;function fX($){var Z=$||global&&global.navigator&&global.navigator.userAgent;if(!L2||Z!==hX){if(Z==="all")L2={prefix:mX,prefixedKeyframes:"keyframes"};else L2=new Uz({userAgent:Z});hX=Z}return L2}function uX($){return fX($).prefixedKeyframes||"keyframes"}function B2($,Z){var J=Kz($),H=fX(Z),X=H.prefix(J),Q=qz(X);return Q}function Lz($){return Object.keys($).map(function(Z){return Z+": "+$[Z]+";"}).join(`
30
+ `)}function L0($,Z,J){if(!Z)return"";var H=a5(Z,function(G,W){return r5(W,G)}),X=B2(H,J),Q=bJ(X),Y=Lz(Q);return $+"{"+Y+"}"}var Mz=function(Z){return Z===null||typeof Z>"u"?"main":Z.toString()},F2=Mz;var Bz=function(Z,J,H){var X=F2(J);return!!Z&&!!Z._radiumStyleState&&!!Z._radiumStyleState[X]&&Z._radiumStyleState[X][H]},z2=Bz;var Fz=function(Z){return typeof Z.ref==="string"?Z.ref:Z.key},j0=Fz;var zz=function(Z){return Z._lastRadiumState||Z.state&&Z.state._radiumStyleState||{}},s5=zz;function o5($){if(!$)return"";var Z=5381,J=$.length-1;while(J)Z=Z*33^$.charCodeAt(J),J-=1;return(Z>>>0).toString(16)}function A2($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")A2=function(J){return typeof J};else A2=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return A2($)}function O2($){return $&&$.constructor===Object&&$.toString===Object.prototype.toString}function D2($){var Z={};return $.forEach(function(J){if(!J||A2(J)!=="object")return;if(Array.isArray(J))J=D2(J);Object.keys(J).forEach(function(H){if(!O2(J[H])||!O2(Z[H])){Z[H]=J[H];return}if(H.indexOf("@media")===0){var X=H;while(!0)if(X+=" ",!Z[X]){Z[X]=J[H];return}}Z[H]=D2([Z[H],J[H]])})}),Z}var Az=function(){};var pX=Az;function _7($){var{addCSS:Z,config:J,style:H}=$,X=function(G){var W=G,K=W.__process(J.userAgent),U=K.animationName,L=K.css;return Z(L),U},Q=Object.keys(H).reduce(function(Y,G){var W=H[G],K=Array.isArray(W);if(G==="animationName"&&W&&(W.__radiumKeyframes||K))if(K)W=W.map(X).join(", ");else W=X(W);return Y[G]=W,Y},{});return{style:Q}}var Oz=function(Z){var{style:J,mergeStyles:H}=Z,X=Array.isArray(J)?H(J):J;return{style:X}},lX=Oz;function C7($){var{config:Z,style:J}=$,H=B2(J,Z.userAgent);return{style:H}}function S7($){var{isNestedStyle:Z,style:J}=$,H=Object.keys(J).reduce(function(X,Q){var Y=J[Q];if(!Z(Y))X[Q]=Y;return X},{});return{style:H}}var o0=[],R2=!1;function j7(){o0.forEach(function($){$()})}var Dz=function(Z){if(o0.indexOf(Z)===-1)o0.push(Z);if(!R2)window.addEventListener("mouseup",j7),R2=!0;return{remove:function(){var H=o0.indexOf(Z);if(o0.splice(H,1),o0.length===0&&R2)window.removeEventListener("mouseup",j7),R2=!1}}},iX={subscribe:Dz,__triggerForTests:j7};var dX=function(Z){return Z===":hover"||Z===":active"||Z===":focus"},Rz=function(Z){var{ExecutionEnvironment:J,getComponentField:H,getState:X,mergeStyles:Q,props:Y,setState:G,style:W}=Z,K={},U={};if(W[":hover"]){var L=Y.onMouseEnter;U.onMouseEnter=function(_){L&&L(_),G(":hover",!0)};var M=Y.onMouseLeave;U.onMouseLeave=function(_){M&&M(_),G(":hover",!1)}}if(W[":active"]){var q=Y.onMouseDown;U.onMouseDown=function(_){q&&q(_),K._lastMouseDown=Date.now(),G(":active","viamousedown")};var A=Y.onKeyDown;U.onKeyDown=function(_){if(A&&A(_),_.key===" "||_.key==="Enter")G(":active","viakeydown")};var O=Y.onKeyUp;U.onKeyUp=function(_){if(O&&O(_),_.key===" "||_.key==="Enter")G(":active",!1)}}if(W[":focus"]){var I=Y.onFocus;U.onFocus=function(_){I&&I(_),G(":focus",!0)};var V=Y.onBlur;U.onBlur=function(_){V&&V(_),G(":focus",!1)}}if(W[":active"]&&!H("_radiumMouseUpListener")&&J.canUseEventListeners)K._radiumMouseUpListener=iX.subscribe(function(){Object.keys(H("state")._radiumStyleState).forEach(function(_){if(X(":active",_)==="viamousedown")G(":active",!1,_)})});var w=Y.disabled?[W[":disabled"]]:Object.keys(W).filter(function(_){return dX(_)&&X(_)}).map(function(_){return W[_]}),T=Q([W].concat(w));return T=Object.keys(T).reduce(function(_,x){if(!dX(x)&&x!==":disabled")_[x]=T[x];return _},{}),{componentFields:K,props:U,style:T}},cX=Rz;function Vz($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{},H=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")H=H.concat(Object.getOwnPropertySymbols(J).filter(function(X){return Object.getOwnPropertyDescriptor(J,X).enumerable}));H.forEach(function(X){Nz($,X,J[X])})}return $}function Nz($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}var E7;function Iz($){if(E7===void 0)E7=!!$.canUseDOM&&!!window&&!!window.matchMedia&&function(Z){return window.matchMedia(Z)}||null;return E7}function rX($,Z){return Object.keys($).filter(function(J){return Z($[J],J)}).reduce(function(J,H){return J[H]=$[H],J},{})}function Tz($){return Object.keys($).reduce(function(Z,J){if(J.indexOf("@media")!==0)Z[J]=$[J];return Z},{})}function Pz($){var{addCSS:Z,appendImportantToEachValue:J,cssRuleSetToString:H,hash:X,isNestedStyle:Q,style:Y,userAgent:G}=$,W="";return Object.keys(Y).filter(function(K){return K.indexOf("@media")===0}).map(function(K){var U=J(rX(Y[K],function(A){return!Q(A)}));if(!Object.keys(U).length)return;var L=H("",U,G),M="rmq-"+X(K+L),q=K+"{ ."+M+L+"}";Z(q),W+=(W?" ":"")+M}),W}function wz($){var{listener:Z,listenersByQuery:J,matchMedia:H,mediaQueryListsByQuery:X,query:Q}=$;Q=Q.replace("@media ","");var Y=X[Q];if(!Y&&H)X[Q]=Y=H(Q);if(!J||!J[Q])Y.addListener(Z),J[Q]={remove:function(){Y.removeListener(Z)}};return Y}function x7($){var{ExecutionEnvironment:Z,addCSS:J,appendImportantToEachValue:H,config:X,cssRuleSetToString:Q,getComponentField:Y,getGlobalState:G,hash:W,isNestedStyle:K,mergeStyles:U,props:L,setState:M,style:q}=$,A=Tz(q),O=Pz({addCSS:J,appendImportantToEachValue:H,cssRuleSetToString:Q,hash:W,isNestedStyle:K,style:q,userAgent:X.userAgent}),I=O?{className:O+(L.className?" "+L.className:"")}:null,V=X.matchMedia||Iz(Z);if(!V)return{props:I,style:A};var w=Vz({},Y("_radiumMediaQueryListenersByQuery")),T=G("mediaQueryListsByQuery")||{};return Object.keys(q).filter(function(_){return _.indexOf("@media")===0}).map(function(_){var x=rX(q[_],K);if(!Object.keys(x).length)return;var R=wz({listener:function(){return M(_,R.matches,"_all")},listenersByQuery:w,matchMedia:V,mediaQueryListsByQuery:T,query:_});if(R.matches)A=U([A,x])}),{componentFields:{_radiumMediaQueryListenersByQuery:w},globalState:{mediaQueryListsByQuery:T},props:I,style:A}}function g7($){var{addCSS:Z,appendImportantToEachValue:J,config:H,cssRuleSetToString:X,hash:Q,props:Y,style:G}=$,W=Y.className,K=Object.keys(G).reduce(function(U,L){var M=G[L];if(L===":visited"){M=J(M);var q=X("",M,H.userAgent),A="rad-"+Q(q),O="."+A+":visited"+q;Z(O),W=(W?W+" ":"")+A}else U[L]=M;return U},{});return{props:W===Y.className?null:{className:W},style:K}}var y1={checkProps:pX,keyframes:_7,mergeStyleArray:lX,prefix:C7,removeNestedStyles:S7,resolveInteractionStyles:cX,resolveMediaQueries:x7,visited:g7};var oX=u(i8(),1);import M0 from"react";function _z($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function aX($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function Cz($,Z,J){if(Z)aX($.prototype,Z);if(J)aX($,J);return $}var nX=function(){function $(Z){_z(this,$),this._userAgent=void 0,this._listeners=void 0,this._cssSet=void 0,this._userAgent=Z,this._listeners=[],this._cssSet={}}return Cz($,[{key:"subscribe",value:function(J){var H=this;if(this._listeners.indexOf(J)===-1)this._listeners.push(J);return{remove:function(){var Q=H._listeners.indexOf(J);if(Q>-1)H._listeners.splice(Q,1)}}}},{key:"addCSS",value:function(J){var H=this;if(!this._cssSet[J])this._cssSet[J]=!0,this._emitChange();return{remove:function(){delete H._cssSet[J],H._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join(`
31
+ `)}},{key:"_emitChange",value:function(){this._listeners.forEach(function(J){return J()})}}]),$}();function t0($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{},H=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")H=H.concat(Object.getOwnPropertySymbols(J).filter(function(X){return Object.getOwnPropertyDescriptor(J,X).enumerable}));H.forEach(function(X){Sz($,X,J[X])})}return $}function Sz($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function V2($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")V2=function(J){return typeof J};else V2=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return V2($)}var tX={plugins:[y1.mergeStyleArray,y1.checkProps,y1.resolveMediaQueries,y1.resolveInteractionStyles,y1.keyframes,y1.visited,y1.removeNestedStyles,y1.prefix,y1.checkProps]},sX={},jz=!1,E0=null,Ez=function(Z){return Z.type&&!Z.type._isRadiumEnhanced},xz=function(Z){var{children:J,component:H,config:X,existingKeyMap:Q,extraStateKeyMap:Y}=Z;if(!J)return J;var G=V2(J);if(G==="string"||G==="number")return J;if(G==="function")return function(){var M=J.apply(this,arguments);if(M0.isValidElement(M)){var q=j0(M);delete Y[q];var A=E0(H,M,X,Q,!0,Y),O=A.element;return O}return M};if(M0.Children.count(J)===1&&J.type){var W=M0.Children.only(J),K=j0(W);delete Y[K];var U=E0(H,W,X,Q,!0,Y),L=U.element;return L}return M0.Children.map(J,function(M){if(M0.isValidElement(M)){var q=j0(M);delete Y[q];var A=E0(H,M,X,Q,!0,Y),O=A.element;return O}return M})},gz=function(Z){var{component:J,config:H,existingKeyMap:X,props:Q,extraStateKeyMap:Y}=Z,G=Q;return Object.keys(Q).forEach(function(W){if(W==="children")return;var K=Q[W];if(M0.isValidElement(K)){var U=j0(K);delete Y[U],G=t0({},G);var L=E0(J,K,H,X,!0,Y),M=L.element;G[W]=M}}),G},bz=function(Z){var{componentName:J,existingKeyMap:H,renderedElement:X}=Z,Q=j0(X),Y=F2(Q),G=!1,W=function(){if(G)return Y;if(G=!0,H[Y]){var U;if(typeof X.type==="string")U=X.type;else if(X.type.constructor)U=X.type.constructor.displayName||X.type.constructor.name;throw Error("Radium requires each element with interactive styles to have a unique key, set using either the ref or key prop. "+(Q?'Key "'+Q+'" is a duplicate.':"Multiple elements have no key specified.")+' Component: "'+J+'". '+(U?'Element: "'+U+'".':""))}return H[Y]=!0,Y};return W},hz=function(Z,J,H,X){if(!Z._radiumIsMounted)return;var Q=s5(Z),Y={_radiumStyleState:t0({},Q)};Y._radiumStyleState[J]=t0({},Y._radiumStyleState[J]),Y._radiumStyleState[J][H]=X,Z._lastRadiumState=Y._radiumStyleState,Z.setState(Y)},yz=function(Z){var{component:J,config:H,existingKeyMap:X,props:Q,renderedElement:Y}=Z;if(!M0.isValidElement(Y)||typeof Y.type!=="string"||!Q.style)return Q;var G=Q,W=H.plugins||tX.plugins,K=J.constructor.displayName||J.constructor.name,U=bz({renderedElement:Y,existingKeyMap:X,componentName:K}),L=function(w){return J[w]},M=function(w){return sX[w]},q=function(w,T){return z2(J.state,T||U(),w)},A=function(w,T,_){return hz(J,_||U(),w,T)},O=function(w){var T=J._radiumStyleKeeper;if(!T){if(jz)return{remove:function(){}};throw Error("To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name: `"+K+"`.")}return T.addCSS(w)},I=Q.style;if(W.forEach(function(V){var w=V({ExecutionEnvironment:oX.default,addCSS:O,appendImportantToEachValue:j8,componentName:K,config:H,cssRuleSetToString:L0,getComponentField:L,getGlobalState:M,getState:q,hash:o5,mergeStyles:D2,props:G,setState:A,isNestedStyle:O2,style:I})||{};I=w.style||I,G=w.props&&Object.keys(w.props).length?t0({},G,w.props):G;var T=w.componentFields||{};Object.keys(T).forEach(function(x){J[x]=T[x]});var _=w.globalState||{};Object.keys(_).forEach(function(x){sX[x]=_[x]})}),I!==Q.style)G=t0({},G,{style:I});return G},vz=function(Z,J,H){if(typeof Z.type==="string")J=t0({},J,{"data-radium":!0});return M0.cloneElement(Z,J,H)};E0=function(Z,J){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tX,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,Y=arguments.length>5?arguments[5]:void 0;if(!Y){var G=s5(Z);Y=Object.keys(G).reduce(function(q,A){if(A!=="main")q[A]=!0;return q},{})}if(Array.isArray(J)&&!J.props){var W=J.map(function(q){if(Y){var A=j0(q);delete Y[A]}return E0(Z,q,H,X,Q,Y).element});return{extraStateKeyMap:Y,element:W}}if(!J||J.props&&J.props["data-radium"]||Q&&!Ez(J))return{extraStateKeyMap:Y,element:J};var K=J.props.children,U=xz({children:K,component:Z,config:H,existingKeyMap:X,extraStateKeyMap:Y}),L=gz({component:Z,config:H,existingKeyMap:X,extraStateKeyMap:Y,props:J.props});if(L=yz({component:Z,config:H,existingKeyMap:X,props:L,renderedElement:J}),U===K&&L===J.props)return{extraStateKeyMap:Y,element:J};var M=vz(J,L!==J.props?L:{},U);return{extraStateKeyMap:Y,element:M}};var eX=E0;var ZQ=u(S8(),1);import N2,{useContext as $Q}from"react";function b7(){return b7=Object.assign||function($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z];for(var H in J)if(Object.prototype.hasOwnProperty.call(J,H))$[H]=J[H]}return $},b7.apply(this,arguments)}var t5=N2.createContext(void 0),e0=N2.createContext(void 0);function $5($){var Z=N2.forwardRef(function(J,H){var X=$Q(e0),Q=$Q(t5);return N2.createElement($,b7({ref:H},J,{radiumConfigContext:X,styleKeeperContext:Q}))});return Z.displayName="withRadiumContexts(".concat($.displayName||$.name||"Component",")"),ZQ.default(Z,$)}function x0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")x0=function(J){return typeof J};else x0=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return x0($)}function GQ($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function JQ($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function kz($,Z,J){if(Z)JQ($.prototype,Z);if(J)JQ($,J);return $}function WQ($,Z){if(Z&&(x0(Z)==="object"||typeof Z==="function"))return Z;return UQ($)}function UQ($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function B0($,Z,J){if(typeof Reflect<"u"&&Reflect.get)B0=Reflect.get;else B0=function(X,Q,Y){var G=mz(X,Q);if(!G)return;var W=Object.getOwnPropertyDescriptor(G,Q);if(W.get)return W.get.call(Y);return W.value};return B0($,Z,J||$)}function mz($,Z){while(!Object.prototype.hasOwnProperty.call($,Z))if($=c1($),$===null)break;return $}function c1($){return c1=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},c1($)}function KQ($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)h7($,Z)}function h7($,Z){return h7=Object.setPrototypeOf||function(H,X){return H.__proto__=X,H},h7($,Z)}function fz($,Z){return lz($)||pz($,Z)||uz()}function uz(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function pz($,Z){var J=[],H=!0,X=!1,Q=void 0;try{for(var Y=$[Symbol.iterator](),G;!(H=(G=Y.next()).done);H=!0)if(J.push(G.value),Z&&J.length===Z)break}catch(W){X=!0,Q=W}finally{try{if(!H&&Y.return!=null)Y.return()}finally{if(X)throw Q}}return J}function lz($){if(Array.isArray($))return $}function y7($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{},H=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")H=H.concat(Object.getOwnPropertySymbols(J).filter(function(X){return Object.getOwnPropertyDescriptor(J,X).enumerable}));H.forEach(function(X){iz($,X,J[X])})}return $}function iz($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function qQ($,Z){if($==null)return{};var J=dz($,Z),H,X;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(X=0;X<Q.length;X++){if(H=Q[X],Z.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,H))continue;J[H]=$[H]}}return J}function dz($,Z){if($==null)return{};var J={},H=Object.keys($),X,Q;for(Q=0;Q<H.length;Q++){if(X=H[Q],Z.indexOf(X)>=0)continue;J[X]=$[X]}return J}function cz($){var Z=rz($,"string");return x0(Z)==="symbol"?Z:String(Z)}function rz($,Z){if(x0($)!=="object"||$===null)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var H=J.call($,Z||"default");if(x0(H)!=="object")return H;throw TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)($)}var oz=["arguments","callee","caller","length","name","prototype","type"],T2,BQ;function tz($,Z){Object.getOwnPropertyNames($).forEach(function(J){if(oz.indexOf(J)<0&&!Z.hasOwnProperty(J)){var H=Object.getOwnPropertyDescriptor($,J);H&&Object.defineProperty(Z,J,H)}})}function ez($){var Z=$.prototype||{};return!$.isReactComponent&&!Z.isReactComponent&&!$.render&&!Z.render}function $A($){return typeof $==="function"&&/^\s*class\s+/.test($.toString())}function ZA($,Z){BQ.forEach(function(J){var H=Object.getOwnPropertyDescriptor($,J),X=(H||{}).value;if(!X)return;var Q=Object.getOwnPropertyDescriptor(T2,J),Y=(Q||{}).value,G=Z.prototype[J];if(!G&&X!==Y)H&&Object.defineProperty(Z.prototype,J,H),delete $[J]})}function FQ($){if($._extraRadiumStateKeys&&$._extraRadiumStateKeys.length>0){var Z=$._extraRadiumStateKeys.reduce(function(J,H){var X=J[H],Q=qQ(J,[H].map(cz));return Q},s5($));$._lastRadiumState=Z,$.setState({_radiumStyleState:Z})}}function zQ($){var{_radiumMouseUpListener:Z,_radiumMediaQueryListenersByQuery:J}=$;if($._radiumIsMounted=!1,Z)Z.remove();if(J)Object.keys(J).forEach(function(H){J[H].remove()},$)}function AQ($,Z,J){var H=$||Z||J;if(J&&H!==J)H=y7({},J,H);return H}function OQ($,Z,J,H){var X=eX($,Z,J),Q=X.extraStateKeyMap,Y=X.element;if($._extraRadiumStateKeys=Object.keys(Q),H)return LQ.createElement(e0.Provider,{value:H},Y);return Y}function QQ($,Z){var J=LQ.forwardRef(function(H,X){var Q=H.radiumConfig,Y=qQ(H,["radiumConfig"]),G=HQ(e0),W=HQ(t5),K=az({_radiumStyleState:{}}),U=fz(K,2),L=U[0],M=U[1],q=nz({state:L,setState:M,_radiumMediaQueryListenersByQuery:void 0,_radiumMouseUpListener:void 0,_radiumIsMounted:!0,_lastRadiumState:void 0,_extraRadiumStateKeys:void 0,_radiumStyleKeeper:W}).current;q.state=L,XQ(function(){return function(){zQ(q)}},[q]);var A=q._extraRadiumStateKeys&&q._extraRadiumStateKeys.length>0;XQ(function(){FQ(q)},[A,q]);var O=$(Y,X),I=AQ(Q,G,Z);return OQ(q,O,I,Q)});return J._isRadiumEnhanced=!0,J.defaultProps=$.defaultProps,MQ.default(J,$)}function JA($,Z,J){var H=function(X){KQ(Q,X);function Q(){var Y;GQ(this,Q),Y=WQ(this,c1(Q).apply(this,arguments)),Y.state=Y.state||{},Y._radiumStyleKeeper=Y.props.styleKeeperContext,Y._radiumMediaQueryListenersByQuery=Y._radiumMediaQueryListenersByQuery,Y._radiumMouseUpListener=Y._radiumMouseUpListener,Y._radiumIsMounted=!0,Y._lastRadiumState=void 0,Y._extraRadiumStateKeys=void 0,Y.state._radiumStyleState={};var G=UQ(Y);return ZA(G,Z),Y}return kz(Q,[{key:"componentDidUpdate",value:function(G,W,K){if(B0(c1(Q.prototype),"componentDidUpdate",this))B0(c1(Q.prototype),"componentDidUpdate",this).call(this,G,W,K);FQ(this)}},{key:"componentWillUnmount",value:function(){if(B0(c1(Q.prototype),"componentWillUnmount",this))B0(c1(Q.prototype),"componentWillUnmount",this).call(this);zQ(this)}},{key:"render",value:function(){var G=B0(c1(Q.prototype),"render",this).call(this),W=AQ(this.props.radiumConfig,this.props.radiumConfigContext,J);return OQ(this,G,W,this.props.radiumConfig)}}]),Q}(Z);if(H._isRadiumEnhanced=!0,T2=H.prototype,BQ=Object.getOwnPropertyNames(T2).filter(function(X){return X!=="constructor"&&typeof T2[X]==="function"}),tz($,H),H.propTypes&&H.propTypes.style)H.propTypes=y7({},H.propTypes,{style:I2.default.oneOfType([I2.default.array,I2.default.object])});return H.displayName=$.displayName||$.name||"Component",$5(H)}function HA($){return $=function(Z){function J(){var H=Reflect.construct(Z,arguments,this.constructor);return H}return Reflect.setPrototypeOf(J.prototype,Z.prototype),Reflect.setPrototypeOf(J,Z),J}($),$}var YQ=sz(function(){return null}).$$typeof;function Z5($){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(YQ&&$.$$typeof===YQ)return QQ($.render,Z);if(typeof $!=="function")return XA(Z,$);var J=$;if(ez(J))return QQ(J,Z);var H=J;if($A(H))H=HA(H);if(H===J)H=function(X){KQ(Q,X);function Q(){return GQ(this,Q),WQ(this,c1(Q).apply(this,arguments))}return Q}(H);return JA(J,H,Z)}function XA($,Z){var J=y7({},$,Z);return function(H){return Z5(H,J)}}var P2=u(w8(),1);import KA,{PureComponent as qA}from"react";function J5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")J5=function(J){return typeof J};else J5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return J5($)}function QA($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function DQ($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function YA($,Z,J){if(Z)DQ($.prototype,Z);if(J)DQ($,J);return $}function GA($,Z){if(Z&&(J5(Z)==="object"||typeof Z==="function"))return Z;return WA($)}function WA($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function v7($){return v7=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},v7($)}function UA($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)k7($,Z)}function k7($,Z){return k7=Object.setPrototypeOf||function(H,X){return H.__proto__=X,H},k7($,Z)}var m7=function($){UA(Z,$);function Z(){return QA(this,Z),GA(this,v7(Z).apply(this,arguments))}return YA(Z,[{key:"_buildStyles",value:function(H){var X=this,Q=this.props.radiumConfig&&this.props.radiumConfig.userAgent||this.props.radiumConfigContext&&this.props.radiumConfigContext.userAgent,Y=this.props.scopeSelector,G=Object.keys(H).reduce(function(K,U){if(J5(H[U])!=="object")K[U]=H[U];return K},{}),W=Object.keys(G).length?L0(Y||"",G,Q):"";return W+Object.keys(H).reduce(function(K,U){var L=H[U];if(U==="mediaQueries")K+=X._buildMediaQueryString(L);else if(J5(H[U])==="object"){var M=Y?U.split(",").map(function(q){return Y+" "+q.trim()}).join(","):U;K+=L0(M,L,Q)}return K},"")}},{key:"_buildMediaQueryString",value:function(H){var X=this,Q="";return Object.keys(H).forEach(function(Y){Q+="@media "+Y+"{"+X._buildStyles(H[Y])+"}"}),Q}},{key:"render",value:function(){if(!this.props.rules)return null;var H=this._buildStyles(this.props.rules);return KA.createElement("style",{dangerouslySetInnerHTML:{__html:H}})}}]),Z}(qA);m7.propTypes={radiumConfig:P2.default.object,rules:P2.default.object,scopeSelector:P2.default.string};m7.defaultProps={scopeSelector:""};var RQ=$5(m7);import _2,{useContext as NA,useRef as IA}from"react";import AA,{Component as OA}from"react";function w2($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")w2=function(J){return typeof J};else w2=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return w2($)}function LA($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function VQ($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function MA($,Z,J){if(Z)VQ($.prototype,Z);if(J)VQ($,J);return $}function BA($,Z){if(Z&&(w2(Z)==="object"||typeof Z==="function"))return Z;return FA($)}function FA($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function f7($){return f7=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},f7($)}function zA($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)u7($,Z)}function u7($,Z){return u7=Object.setPrototypeOf||function(H,X){return H.__proto__=X,H},u7($,Z)}var DA=function($){zA(Z,$);function Z(){var J;if(LA(this,Z),J=BA(this,f7(Z).apply(this,arguments)),J.styleKeeper=void 0,J._subscription=void 0,J._root=void 0,J._css=void 0,J._onChange=function(){var H=J.styleKeeper.getCSS();if(H!==J._css){if(J._root)J._root.innerHTML=H;else throw Error("No root style object found, even after StyleSheet mount.");J._css=H}},!J.props.styleKeeperContext)throw Error("StyleRoot is required to use StyleSheet");return J.styleKeeper=J.props.styleKeeperContext,J._css=J.styleKeeper.getCSS(),J}return MA(Z,[{key:"componentDidMount",value:function(){this._subscription=this.styleKeeper.subscribe(this._onChange),this._onChange()}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillUnmount",value:function(){if(this._subscription)this._subscription.remove()}},{key:"render",value:function(){var H=this;return AA.createElement("style",{dangerouslySetInnerHTML:{__html:this._css},ref:function(Q){H._root=Q}})}}]),Z}(OA),NQ=$5(DA);function RA($,Z){if($==null)return{};var J=VA($,Z),H,X;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(X=0;X<Q.length;X++){if(H=Q[X],Z.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,H))continue;J[H]=$[H]}}return J}function VA($,Z){if($==null)return{};var J={},H=Object.keys($),X,Q;for(Q=0;Q<H.length;Q++){if(X=H[Q],Z.indexOf(X)>=0)continue;J[X]=$[X]}return J}function TA($,Z){var J=$&&$.userAgent||Z&&Z.userAgent;return new nX(J)}var PA=Z5(function($){var Z=$.children,J=RA($,["children"]);return _2.createElement("div",J,Z,_2.createElement(NQ,null))}),wA=function(Z){var J=Z.radiumConfig,H=NA(e0),X=IA(TA(J,H));return _2.createElement(t5.Provider,{value:X.current},_2.createElement(PA,Z))},IQ=wA;function p7($,Z){return{__radiumKeyframes:!0,__process:function(H){var X=uX(H),Q=Object.keys($).map(function(W){return L0(W,$[W],H)}).join(`
32
+ `),Y=(Z?Z+"-":"")+"radium-animation-"+o5(Q),G="@"+X+" "+Y+` {
33
+ `+Q+`
34
+ }
35
+ `;return{css:G,animationName:Y}}}}function H5($){return Z5($)}H5.Plugins=y1;H5.Style=RQ;H5.StyleRoot=IQ;H5.getState=z2;H5.keyframes=p7;var C2=H5;function S2($){if(!$)return{};let Z={...$};if("animationName"in Z&&typeof Z.animationName==="object"){let J="radiumAnimation_"+Math.random().toString(36).substring(2,8);Z.animationName=C2.keyframes(Z.animationName,J)}return Z}import{useMemo as _A}from"react";import{jsxDEV as j2}from"react/jsx-dev-runtime";var CA=({data:$,setUiAjaxConfiguration:Z})=>{let{name:J,title:H,iconUrl:X,iconPosition:Q,sx:Y,pathname:G,kwargs:W,depsNames:K}=$,U=_A(()=>F6(Z,W,K,G),[Z,W,K,G]);return j2($0,{card:"AjaxButtonCard",data:$,children:j2("button",{id:J,className:"box-border flex min-h-12 w-full min-w-min cursor-pointer items-center justify-center rounded-[16px] border border-[#080318] bg-white text-center font-[TTForsTrial] text-[#080318] hover:bg-neutral-300",value:J,onClick:()=>U(),style:S2(Y),type:"button",children:[X&&Q==="start"&&j2("img",{src:X,alt:""},void 0,!1,void 0,this),_6(H),X&&Q==="end"&&j2("img",{src:X,alt:""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},TQ=CA;import{jsxDEV as l7}from"react/jsx-dev-runtime";var SA=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H,sx:X}=$;return l7($0,{card:H,data:$,children:l7("div",{style:S2(X),id:H,children:Z.map((Q,Y)=>{return l7(V0,{uiConfig:Q,setUiAjaxConfiguration:J},`children-${Y}`,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this)},PQ=C2(SA);import{jsxDEV as wQ}from"react/jsx-dev-runtime";var jA=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H}=$;return wQ($0,{card:H,data:$,children:Z.map((X,Q)=>{return wQ(V0,{uiConfig:X,setUiAjaxConfiguration:J},`children-${Q}`,!1,void 0,this)})},void 0,!1,void 0,this)},_Q=jA;export{_Q as UnionCard,V0 as UI,PQ as SequenceCard,$0 as PieCard,AJ as ChatCard,TQ as AjaxButtonCard};