import{s as e,t}from"./rolldown-runtime-Bjp52BOI.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{Lr as n}from"./initial-vendor-CbfHqnih.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{a as r}from"./utils-DRi8JwoB.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{t as i}from"./style-to-object-BY3JEAdk.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{B as a,H as o,I as s,L as c,Q as l,V as u,k as d}from"./utils-D6b6ny2H.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";var f=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(t=e.ElementType||={});function n(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})),p=t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=n&&n.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(o);e.NodeWithChildren=d;var p=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);e.CDATA=p;var m=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);e.Document=m;var h=function(e){r(t,e);function t(t,n,r,i){r===void 0&&(r=[]),i===void 0&&(i=t===`script`?a.ElementType.Script:t===`style`?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){return{name:t,value:e.attribs[t],namespace:e[`x-attribsNamespace`]?.[t],prefix:e[`x-attribsPrefix`]?.[t]}})},enumerable:!1,configurable:!0}),t}(d);e.Element=h;function g(e){return(0,a.isTag)(e)}e.isTag=g;function _(e){return e.type===a.ElementType.CDATA}e.isCDATA=_;function v(e){return e.type===a.ElementType.Text}e.isText=v;function y(e){return e.type===a.ElementType.Comment}e.isComment=y;function b(e){return e.type===a.ElementType.Directive}e.isDirective=b;function x(e){return e.type===a.ElementType.Root}e.isDocument=x;function S(e){return Object.prototype.hasOwnProperty.call(e,`children`)}e.hasChildren=S;function C(e,t){t===void 0&&(t=!1);var n;if(v(e))n=new c(e.data);else if(y(e))n=new l(e.data);else if(g(e)){var r=t?w(e.children):[],a=new h(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e[`x-attribsNamespace`]&&(a[`x-attribsNamespace`]=i({},e[`x-attribsNamespace`])),e[`x-attribsPrefix`]&&(a[`x-attribsPrefix`]=i({},e[`x-attribsPrefix`])),n=a}else if(_(e)){var r=t?w(e.children):[],o=new p(r);r.forEach(function(e){return e.parent=o}),n=o}else if(x(e)){var r=t?w(e.children):[],s=new m(r);r.forEach(function(e){return e.parent=s}),e[`x-mode`]&&(s[`x-mode`]=e[`x-mode`]),n=s}else if(b(e)){var d=new u(e.name,e.data);e[`x-name`]!=null&&(d[`x-name`]=e[`x-name`],d[`x-publicId`]=e[`x-publicId`],d[`x-systemId`]=e[`x-systemId`]),n=d}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}e.cloneNode=C;function w(e){for(var t=e.map(function(e){return C(e,!0)}),n=1;n{var r=n&&n.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=n&&n.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var a=f(),o=p();i(p(),e);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof t==`function`&&(n=t,t=s),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??s,this.elementCB=n??null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new o.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(``),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=c,e.default=c})),h=t(((e,t)=>{var n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/,o=//i,s=//i,c=function(){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},u=typeof window==`object`&&window.DOMParser;if(typeof u==`function`){var d=new u,f=`text/html`;l=function(e,t){return t&&(e=`<`+t+`>`+e+``),d.parseFromString(e,f)},c=l}if(typeof document==`object`&&document.implementation){var p=document.implementation.createHTMLDocument();c=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n.innerHTML=e,p}return p.documentElement.innerHTML=e,p}}var m=typeof document==`object`?document.createElement(`template`):{},h;m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes});function g(e){var t,u=e.match(a);u&&u[1]&&(t=u[1].toLowerCase());var d,f,p;switch(t){case n:return d=l(e),o.test(e)||(f=d.querySelector(r),f&&f.parentNode.removeChild(f)),s.test(e)||(f=d.querySelector(i),f&&f.parentNode.removeChild(f)),d.querySelectorAll(n);case r:case i:return d=c(e),p=d.querySelectorAll(t),s.test(e)&&o.test(e)?p[0].parentNode.childNodes:p;default:return h?h(e):(f=c(e,i).querySelector(i),f.childNodes)}}t.exports=g})),g=t((e=>{e.CASE_SENSITIVE_TAG_NAMES=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussainBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`)})),_=t((e=>{for(var t=m(),n=g().CASE_SENSITIVE_TAG_NAMES,r=t.Comment,i=t.Element,a=t.ProcessingInstruction,o=t.Text,s={},c,l=0,u=n.length;l{var n=h(),r=_().formatDOM,i=/<(![a-zA-Z\s]+)>/;function a(e){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(e===``)return[];var t=e.match(i),a;return t&&t[1]&&(a=t[1]),r(n(e),null,a)}t.exports=a})),y=t((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),b=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){return n(e)||r(e,t)||i(e,t)||o()}function n(e){if(Array.isArray(e))return e}function r(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function i(e,t){if(e){if(typeof e==`string`)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}function a(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{e.__esModule=!0,e.camelCase=void 0;var t=/^--[a-zA-Z0-9-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),S=t(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};e.__esModule=!0;var a=r(i()),o=x();function s(e,t){var n={};return!e||typeof e!=`string`||(0,a.default)(e,function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)}),n}e.default=s})),C=t(((e,t)=>{var r=n(),i=S().default;function a(e,t){if(!e||typeof e!=`object`)throw TypeError(`First argument must be an object`);var n,r,i=typeof t==`function`,a={},o={};for(n in e)r=e[n],i&&(a=t(n,r),a&&a.length===2)?o[a[0]]=a[1]:typeof r==`string`&&(o[r]=n);return o}function o(e,t){if(e.indexOf(`-`)===-1)return t&&typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var s={reactCompat:!0};function c(e,t){if(e!=null)try{t.style=i(e,s)}catch{t.style={}}}var l=r.version.split(`.`)[0]>=16,u=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]);function d(e){return!u.has(e.name)}t.exports={PRESERVE_CUSTOM_ATTRIBUTES:l,invertObject:a,isCustomComponent:o,setStyleProp:c,canTextBeChildOfNode:d,elementsWithNoTextChildren:u}})),w=t(((e,t)=>{var n=b(),r=C(),i=[`checked`,`value`],a=[`input`,`select`,`textarea`],o={reset:!0,submit:!0};t.exports=function(e,t){e||={};var c,l,u,d,f,p={},m=e.type&&o[e.type];for(c in e)if(u=e[c],n.isCustomAttribute(c))p[c]=u;else if(l=c.toLowerCase(),d=s(l),d)switch(f=n.getPropertyInfo(d),i.indexOf(d)!==-1&&a.indexOf(t)!==-1&&!m&&(d=s(`default`+l)),p[d]=u,f&&f.type){case n.BOOLEAN:p[d]=!0;break;case n.OVERLOADED_BOOLEAN:u===``&&(p[d]=!0)}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(p[c]=u);return r.setStyleProp(e.style,p),p};function s(e){return n.possibleStandardNames[e]}})),T=t(((e,t)=>{var r=n(),i=w(),a=C(),o=a.setStyleProp,s=a.canTextBeChildOfNode;function c(e,t){t||={};for(var n=t.library||r,a=n.cloneElement,u=n.createElement,d=n.isValidElement,f=[],p,m,h=typeof t.replace==`function`,g,_,v,y=t.trim,b=0,x=e.length;b1&&(g=a(g,{key:g.key||b})),f.push(g);else if(p.type===`text`){if(m=!p.data.trim().length,m&&p.parent&&!s(p.parent)||y&&m)continue;f.push(p.data)}else{switch(_=p.attribs,l(p)?o(_.style,_):_&&=i(_,p.name),v=null,p.type){case`script`:case`style`:p.children[0]&&(_.dangerouslySetInnerHTML={__html:p.children[0].data});break;case`tag`:p.name===`textarea`&&p.children[0]?_.defaultValue=p.children[0].data:p.children&&p.children.length&&(v=c(p.children,t));break;default:continue}x>1&&(_.key=b),f.push(u(p.name,_,v))}return f.length===1?f[0]:f}function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&a.isCustomComponent(e.name,e.attribs)}t.exports=c})),E=e(t(((e,t)=>{var n=m(),r=v(),i=w(),a=T();r=typeof r.default==`function`?r.default:r;var o={lowerCaseAttributeNames:!1};function s(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);return e===``?[]:(t||={},a(r(e,t.htmlparser2||o),t))}s.domToReact=a,s.htmlToDOM=r,s.attributesToProps=i,s.Comment=n.Comment,s.Element=n.Element,s.ProcessingInstruction=n.ProcessingInstruction,s.Text=n.Text,t.exports=s,s.default=s}))(),1);E.default.domToReact,E.default.htmlToDOM,E.default.attributesToProps,E.default.Comment,E.default.Element,E.default.ProcessingInstruction,E.default.Text;var D=E.default;function O(e,t){let n=/language-(\w+)/.exec(e??``);return n?n[1]??`text`:t??`text`}var k=e=>{var t;let n=[],r=e.attributes?.some(e=>e.name===`dropdown`&&e.value!==`false`);return(t=e.children)==null||t.map(e=>{let t=D(e.html??``),i=typeof t==`object`&&!Array.isArray(t)&&t.type===`pre`?t.props.language??O(t.props.className,e.filename):void 0;n.push({dropdown:r,language:i,code:t,filename:e.filename})}),n},A=(e,t=`request`)=>{let n=`generated`;return Object.entries(e).forEach(([r,i])=>{let a={},s=t=>{let n=e[r];n&&(n.examples=a,n.exampleType=t)};if(i.examples&&Object.keys(i.examples).length>0)Object.entries(i.examples).forEach(([e,t])=>{`$ref`in t||(a[e]=o(e,t,r,i))}),s(`examples`),n=`examples`;else if(i.example)a.Example=o(`Example`,{value:i.example},r,i),s(`examples`),n=`examples`;else if(`itemSchema`in i&&d(i.itemSchema)){let e=P(i.itemSchema,t);a.Example=Object.assign(Object.assign({},e),e.value!==void 0&&{serializedValue:l(e.value,r,i)}),s(`generated`)}else d(i.schema)&&(a.Example=P(i.schema,t),s(`generated`))}),{content:e,exampleType:n}},j=(e,t)=>(t===void 0?void 0:e?.content[t]?.exampleType)??e?.exampleType,M=(e,t)=>Object.fromEntries(Object.entries(e).filter(([,e])=>(e.exampleType??t)===`generated`)),N=(e,t,n=`request`)=>{let r=M(e,t);Object.values(r).forEach(e=>{delete e.examples,delete e.example}),A(r,n)},P=(e,t=`request`)=>{let n={title:`Example`,value:void 0};if(e.example!==void 0)return n.value=e.example,n;if(`examples`in e&&e.examples?.[0]!==void 0)return n.value=e.examples[0],n;if(e.default!==void 0)return n.value=e.default,n;if(`const`in e&&e.const!==void 0)return n.value=e.const,n;if(e.enum)return(t===`response`||e.enum.length===1)&&(n.value=e.enum[0]),n;let r=L(e);if(r)return P(r,t);switch(e.type){case`string`:return n.value=B(e),n;case`boolean`:return n.value=!0,n;case`number`:case`integer`:return n.value=z(e),n;case`object`:let r=Object.fromEntries(Object.entries(e.properties??{}).filter(([n,r])=>t!==`request`||!d(r)||F(e,n,r)||I(r)?!0:!(r.type===`object`&&Array.isArray(r.required)&&r.required.length>0)).map(([e,n])=>d(n)?[e,P(n,t).value,n]:[e,``,void 0]).filter(([n,r,i])=>{if(c(e))return!0;if(r===void 0)return!1;if(t!==`request`||i===void 0||F(e,n,i))return!0;let a=R(i);return I(a)||typeof a.minProperties!=`number`||typeof r!=`object`||!r||Array.isArray(r)?!0:Object.keys(r).length>=a.minProperties}).map(([e,t])=>[e,t]));return n.value=c(e)?s(r):r,n;case`array`:if(d(e.items)){let r=P(e.items,t).value;n.value=r===void 0?[]:[r]}else n.value=``;return n;case`null`:return n.value=null,n;default:return n.value=``,n}},F=(e,t,n)=>`isRequired`in n&&n.isRequired===!0||Array.isArray(e.required)&&e.required.includes(t),I=e=>e.example!==void 0||`examples`in e&&e.examples?.[0]!==void 0||e.default!==void 0||`const`in e&&e.const!==void 0||e.enum?.length===1,L=e=>{if(!Array.isArray(e.oneOf)||e.oneOf.length===0)return;let t=e.oneOf.find(e=>d(e)&&e.type!==`null`)??e.oneOf[0];return d(t)?t:void 0},R=e=>{if(I(e)||e.enum)return e;let t=L(e);return t?R(t):e},z=e=>{let t=e.type===`integer`?Math.floor:e=>e;return e.minimum!==void 0&&e.maximum!==void 0?t((e.minimum+e.maximum)/2):e.minimum===void 0?e.maximum===void 0||123{switch(e.format?.toLowerCase()){case`byte`:case`base64`:return`aSDinaTvuI8gbWludGxpZnk=`;case`date`:return`2023-12-25`;case`date-time`:return`2023-11-07T05:31:56Z`;case`email`:return`jsmith@example.com`;case`uuid`:return`3c90c3cc-0d44-4b50-8888-8dd25736052a`;case`ipv4`:return`127.0.0.1`;case`ipv6`:return`2606:4700:3108::ac42:2835`;default:return``}},V=(e,t)=>{let n=Object.keys(e)[t];if(n){let t=e[n];for(let e of Object.values(t?.examples??{})){if(`$ref`in e)continue;let r=a(e,n,t);if(r!==void 0)return r}}},H=(e,t)=>V(e,t)?.value,U=(e,t)=>{let n=[];if(e.dependencies?.requestBody?.content){let i=Object.keys(e.dependencies.requestBody.content)[t],a=(i===void 0?void 0:e.dependencies.requestBody.content[i])?.examples??{},o=Object.entries(a);if(o.length===0){let r=H(e.dependencies.requestBody.content,t);r&&n.push({language:`json`,filename:`Example Request Body`,code:JSON.stringify(r,null,2)})}else for(let[e,t]of o){if(`$ref`in t)continue;let a=`serializedValue`in t&&typeof t.serializedValue==`string`?t.serializedValue:void 0;a!==void 0&&i&&(t.value===void 0||!r(i))?n.push({language:u(i),filename:e,code:a}):t.value!==void 0&&n.push({language:`json`,filename:e,code:JSON.stringify(t.value,null,2)})}}return n},W=[{key:`bash`,aliases:[`curl`,`sh`,`shell`],displayName:`cURL`,shikiLanguage:`bash`,httpSnippet:{target:`shell`}},{key:`python`,aliases:[`py`],displayName:`Python`,shikiLanguage:`python`,httpSnippet:{target:`python`,client:`requests`}},{key:`javascript`,aliases:[`js`],displayName:`JavaScript`,shikiLanguage:`javascript`,httpSnippet:{target:`javascript`,client:`fetch`}},{key:`node`,aliases:[`nodejs`,`node.js`],displayName:`Node.js`,iconKey:`node`,shikiLanguage:`javascript`,httpSnippet:{target:`node`,client:`fetch`}},{key:`php`,displayName:`PHP`,shikiLanguage:`php`,httpSnippet:{target:`php`,client:`curl`}},{key:`go`,aliases:[`golang`],displayName:`Go`,shikiLanguage:`go`,httpSnippet:{target:`go`}},{key:`java`,displayName:`Java`,shikiLanguage:`java`,httpSnippet:{target:`java`}},{key:`ruby`,aliases:[`rb`],displayName:`Ruby`,shikiLanguage:`ruby`,httpSnippet:{target:`ruby`}},{key:`powershell`,displayName:`PowerShell`,shikiLanguage:`bash`,httpSnippet:{target:`powershell`}},{key:`swift`,displayName:`Swift`,shikiLanguage:`swift`,httpSnippet:{target:`swift`}},{key:`csharp`,aliases:[`c#`],displayName:`C#`,shikiLanguage:`csharp`,httpSnippet:{target:`csharp`,client:`restsharp`}},{key:`dotnet`,aliases:[`.net`,`.NET`,`dotnet`,`dot-net`],displayName:`.NET`,iconKey:`dot-net`,shikiLanguage:`csharp`,httpSnippet:{target:`csharp`,client:`restsharp`}},{key:`typescript`,aliases:[`ts`],displayName:`TypeScript`,shikiLanguage:`typescript`,httpSnippet:{target:`javascript`,client:`fetch`}},{key:`c`,displayName:`C`,shikiLanguage:`c`,httpSnippet:{target:`c`}},{key:`c++`,aliases:[`cpp`],displayName:`C++`,shikiLanguage:`c++`,iconKey:`cplusplus`,httpSnippet:{target:`c`}},{key:`kotlin`,aliases:[`kt`],displayName:`Kotlin`,shikiLanguage:`kotlin`,httpSnippet:{target:`kotlin`}},{key:`rust`,aliases:[`rs`],displayName:`Rust`,shikiLanguage:`rust`,httpSnippet:{target:`rust`}},{key:`dart`,aliases:[`flutter`],displayName:`Dart`,shikiLanguage:`dart`,httpSnippet:{target:`dart`}}],G=new Map;for(let e of W){G.set(e.key.toLowerCase(),e);for(let t of e.aliases??[])G.set(t.toLowerCase(),e)}var K=e=>G.get(e.toLowerCase()),q=W.filter(e=>[`bash`,`python`,`javascript`,`php`,`go`,`java`,`ruby`].includes(e.key)),J=Object.fromEntries(W.flatMap(e=>[[e.key,e],...(e.aliases??[]).map(t=>[t,e])])),Y=e=>K(e)?.key??e.toLowerCase(),X=Object.fromEntries(W.flatMap(e=>[[e.key,e.displayName],...(e.aliases??[]).map(t=>[t,e.displayName])]));export{V as a,N as c,Y as i,j as l,X as n,U as o,q as r,k as s,J as t,D as u};