Socket
Socket
Sign inDemoInstall

satori

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satori - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

9

dist/esm/index.js

@@ -1,5 +0,6 @@

var At=Object.defineProperty,kt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var dt=Object.getOwnPropertySymbols;var $t=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable;var ct=(e,r,t)=>r in e?At(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,G=(e,r)=>{for(var t in r||(r={}))$t.call(r,t)&&ct(e,t,r[t]);if(dt)for(var t of dt(r))Ft.call(r,t)&&ct(e,t,r[t]);return e},se=(e,r)=>kt(e,Ot(r));import{guessLanguage as pr}from"guesslanguage";import*as Pt from"yoga-layout-prebuilt";var pt=Pt;var Pe;Pe=pt.default;function Wt(e){Pe=e}function te(){return Pe}import{LineBreaker as Nt}from"css-line-break";import{splitGraphemes as Mt}from"text-segmentation";function We(e){let r=typeof e;return!(r==="number"||r==="bigint"||r==="string"||r==="boolean")}function mt(e){return/^class\s/.test(Function.prototype.toString.call(e))}function ge(e,r){return[e[0]*r[0]+e[2]*r[1],e[1]*r[0]+e[3]*r[1],e[0]*r[2]+e[2]*r[3],e[1]*r[2]+e[3]*r[3],e[0]*r[4]+e[2]*r[5]+e[4],e[1]*r[4]+e[3]*r[5]+e[5]]}function q(e,r,t){let i=r[e];return typeof i=="undefined"?t:i}var gt=void 0,Ne=typeof Intl!="undefined"&&"Segmenter"in Intl&&process.env.NODE_ENV!=="test",Gt=Ne?new Intl.Segmenter(gt,{granularity:"word"}):null,Dt=Ne?new Intl.Segmenter(gt,{granularity:"grapheme"}):null,ye=[32,160,4961,65792,65793,4153,4241,10].map(e=>String.fromCodePoint(e)),Bt=e=>{let r=Nt(e,{lineBreak:"strict",wordBreak:"normal"}),t=[],i;for(;!(i=r.next()).done;)if(i.value){let a=i.value.slice(),n="";for(let o=0;o<a.length;o++){let s=a[o];ye.includes(s)?(n.length&&t.push(n),t.push(s),n=""):n+=s}n.length&&t.push(n)}return t};function le(e,r){return Ne?r==="word"?[...Gt.segment(e)].map(t=>t.segment):[...Dt.segment(e)].map(t=>t.segment):r==="word"?Bt(e):Mt(e)}function y(e,r,t){let i="";for(let[a,n]of Object.entries(r))typeof n!="undefined"&&(i+=` ${a}="${n}"`);return t?`<${e}${i}>${t}</${e}>`:`<${e}${i}/>`}var ht={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var Yt=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedBackgroundClipTextPath"]);function Me(e){let r={};for(let t in e)Yt.has(t)&&(r[t]=e[t]);return r}import{getPropertyName as rr,getStylesForProperty as nr}from"css-to-react-native";import{parseElementStyle as ir}from"css-background-parser";var xe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ht=xe((e,r)=>{r.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),Xt=xe((e,r)=>{r.exports=["deg","grad","rad","turn"]}),Ut=xe((e,r)=>{r.exports=["dpi","dpcm","dppx"]}),zt=xe((e,r)=>{r.exports=["Hz","kHz"]}),Vt=xe((e,r)=>{r.exports=["s","ms"]}),jt=Ht(),bt=Xt(),yt=Ut(),xt=zt(),Et=Vt();function De(e){if(/\.\D?$/.test(e))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(e))throw new Error("Only one leading +/- is allowed");if(Jt(e)>1)throw new Error("Only one dot is allowed");if(/%$/.test(e)){this.type="percentage",this.value=Ge(e),this.unit="%";return}var r=Kt(e);if(!r){this.type="number",this.value=Ge(e);return}this.type=Qt(r),this.value=Ge(e.substr(0,e.length-r.length)),this.unit=r}De.prototype.valueOf=function(){return this.value};De.prototype.toString=function(){return this.value+(this.unit||"")};function fe(e){return new De(e)}function Jt(e){var r=e.match(/\./g);return r?r.length:0}function Ge(e){var r=parseFloat(e);if(isNaN(r))throw new Error("Invalid number: "+e);return r}var qt=[].concat(bt,xt,jt,yt,Et);function Kt(e){var r=e.match(/\D+$/),t=r&&r[0];if(t&&qt.indexOf(t)===-1)throw new Error("Invalid unit: "+t);return t}var Zt=Object.assign(Ce(bt,"angle"),Ce(xt,"frequency"),Ce(yt,"resolution"),Ce(Et,"time"));function Ce(e,r){return Object.fromEntries(e.map(t=>[t,r]))}function Qt(e){return Zt[e]||"length"}import er from"postcss-value-parser";function tr(e,r){try{let t=new fe(e);switch(t.unit){case"px":return{absolute:t.value};case"em":return{absolute:t.value*r};case"rem":return{absolute:t.value*16};case"%":return{relative:t.value};default:return{}}}catch{return{}}}function Be(e,r,t){switch(e){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:let i=tr(e,r);return i.absolute?{[t?"xAbsolute":"yAbsolute"]:i.absolute}:i.relative?{[t?"xRelative":"yRelative"]:i.relative}:{}}}function Ye(e,r){if(typeof e=="number")return{xAbsolute:e};let t;try{t=er(e).nodes.filter(i=>i.type==="word").map(i=>i.value)}catch{return{}}return t.length===1?Be(t[0],r,!0):t.length===2?((t[0]==="top"||t[0]==="bottom"||t[1]==="left"||t[1]==="right")&&t.reverse(),G(G({},Be(t[0],r,!0)),Be(t[1],r,!1))):{}}var or=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),ar=new Set(["lineHeight"]),St=[1,0,0,1,0,0];function sr(e,r,t,i){return e==="border"&&!t.includes(r.borderColor)?r.borderColor=i:e==="textDecoration"&&!t.includes(r.textDecorationColor)&&(r.textDecorationColor=i),r}function _t(e,r){return typeof r=="number"?or.has(e)?ar.has(e)?r:String(r):r+"px":r}function lr(e,r){return e==="lineHeight"?{lineHeight:_t(e,r)}:e==="fontFamily"?{fontFamily:r.split(",").map(t=>t.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())}:null}function He(e,r,t,{percentage:i}={percentage:!1}){if(typeof e=="number")return e;try{let a=new fe(e);if(a.type==="length")switch(a.unit){case"em":return a.value*r;case"rem":return a.value*16;case"vw":return~~(a.value*t._viewportWidth/100);case"vh":return~~(a.value*t._viewportHeight/100);default:return a.value}else if(a.type==="angle")switch(a.unit){case"deg":return a.value;case"rad":return a.value*180/Math.PI;default:return a.value}else if(a.type==="percentage"&&i)return a.value/100*r}catch{}}function Ie(e,r){let t={};for(let a in e){if(a.startsWith("_")){t[a]=e[a];continue}let n=rr(a);Object.assign(t,lr(n,e[a])||sr(n,nr(n,_t(n,e[a]),!0),e[a],e.color||r.color))}if(t.backgroundImage){let{backgrounds:a}=ir(t);t.backgroundImage=a}let i=t.fontSize||r.fontSize;if(typeof i=="string")try{let a=new fe(i);switch(a.unit){case"em":i=a.value*r.fontSize;break;case"rem":i=a.value*16;break}}catch{i=16}typeof t.fontSize!="undefined"&&(t.fontSize=i),t.transformOrigin&&(t.transformOrigin=Ye(t.transformOrigin,i));for(let a in t){let n=t[a];if(a==="lineHeight")typeof n=="string"&&(n=t[a]=He(n,i,r,{percentage:!0})/i);else if(typeof n=="string"){let o=He(n,i,r);typeof o!="undefined"&&(t[a]=o),n=t[a]}if(a==="opacity"&&(n=t[a]=n*r.opacity),a==="transform"){let o=[...St],s=n;for(let f of s){let h=Object.keys(f)[0],g=f[h],p=typeof g=="string"?He(g,i,r):g,l=[...St];switch(h){case"translateX":l[4]=p;break;case"translateY":l[5]=p;break;case"scale":l[0]=p,l[3]=p;break;case"scaleX":l[0]=p;break;case"scaleY":l[3]=p;break;case"rotate":let c=p*Math.PI/180,u=Math.cos(c),d=Math.sin(c);l[0]=u,l[1]=d,l[2]=-d,l[3]=u;break;case"skewX":l[2]=Math.tan(p*Math.PI/180);break;case"skewY":l[1]=Math.tan(p*Math.PI/180);break}o=ge(l,o)}t.transform=o}}return t}function Xe(e,r,t,i,a){let n=te(),o=G(G(G({},t),Ie(ht[r],t)),Ie(i,t));if(r==="img"){let s=parseInt(a.width),h=parseInt(a.height)/s;o.width||(o.width=s),o.height||(o.height=h*o.width)}return e.setDisplay(q(o.display,{flex:n.DISPLAY_FLEX,none:n.DISPLAY_NONE},n.DISPLAY_FLEX)),e.setAlignContent(q(o.alignContent,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,"space-between":n.ALIGN_SPACE_BETWEEN,"space-around":n.ALIGN_SPACE_AROUND,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),e.setAlignItems(q(o.alignItems,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_FLEX_START)),e.setAlignSelf(q(o.alignSelf,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),e.setJustifyContent(q(o.justifyContent,{center:n.JUSTIFY_CENTER,"flex-start":n.JUSTIFY_FLEX_START,"flex-end":n.JUSTIFY_FLEX_END,"space-between":n.JUSTIFY_SPACE_BETWEEN,"space-around":n.JUSTIFY_SPACE_AROUND},n.JUSTIFY_FLEX_START)),e.setFlexDirection(q(o.flexDirection,{row:n.FLEX_DIRECTION_ROW,column:n.FLEX_DIRECTION_COLUMN,"row-reverse":n.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":n.FLEX_DIRECTION_COLUMN_REVERSE},n.FLEX_DIRECTION_ROW)),e.setFlexWrap(q(o.flexWrap,{wrap:n.WRAP_WRAP,nowrap:n.WRAP_NO_WRAP,"wrap-reverse":n.WRAP_WRAP_REVERSE},n.WRAP_WRAP)),typeof o.flexBasis!="undefined"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow=="undefined"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink=="undefined"?0:o.flexShrink),typeof o.maxHeight!="undefined"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth!="undefined"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight!="undefined"&&e.setMinHeight(o.minHeight),typeof o.minWidth!="undefined"&&e.setMinWidth(o.minWidth),e.setOverflow(q(o.overflow,{visible:n.OVERFLOW_VISIBLE,hidden:n.OVERFLOW_HIDDEN},n.OVERFLOW_VISIBLE)),e.setMargin(n.EDGE_TOP,o.marginTop||0),e.setMargin(n.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(n.EDGE_LEFT,o.marginLeft||0),e.setMargin(n.EDGE_RIGHT,o.marginRight||0),e.setBorder(n.EDGE_TOP,o.borderWidth||0),e.setBorder(n.EDGE_BOTTOM,o.borderWidth||0),e.setBorder(n.EDGE_LEFT,o.borderWidth||0),e.setBorder(n.EDGE_RIGHT,o.borderWidth||0),e.setPadding(n.EDGE_TOP,o.paddingTop||0),e.setPadding(n.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(n.EDGE_LEFT,o.paddingLeft||0),e.setPadding(n.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(q(o.position,{absolute:n.POSITION_TYPE_ABSOLUTE,relative:n.POSITION_TYPE_RELATIVE},n.POSITION_TYPE_RELATIVE)),typeof o.top!="undefined"&&e.setPosition(n.EDGE_TOP,o.top),typeof o.bottom!="undefined"&&e.setPosition(n.EDGE_BOTTOM,o.bottom),typeof o.left!="undefined"&&e.setPosition(n.EDGE_LEFT,o.left),typeof o.right!="undefined"&&e.setPosition(n.EDGE_RIGHT,o.right),typeof o.height!="undefined"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width!="undefined"?e.setWidth(o.width):e.setWidthAuto(),[o,Me(o)]}function ue({left:e,top:r,width:t,height:i},a,n,o){var f,h,g,p;let s;if(n)s=a;else{let l=(h=o==null?void 0:o.xAbsolute)!=null?h:((f=o==null?void 0:o.xRelative)!=null?f:50)*t/100,c=(p=o==null?void 0:o.yAbsolute)!=null?p:((g=o==null?void 0:o.yRelative)!=null?g:50)*i/100,u=e+l,d=r+c;s=ge([1,0,0,1,u,d],ge(a,[1,0,0,1,-u,-d])),a.__parent&&(s=ge(a.__parent,s)),a.splice(0,6,...s)}return`matrix(${s.map(l=>l.toFixed(2)).join(",")})`}function wt({left:e,top:r,width:t,height:i,isInheritingTransform:a},n){let o="",s=1;return n.transform&&(o=ue({left:e,top:r,width:t,height:i},n.transform,a,n.transformOrigin)),n.opacity&&(s=+n.opacity),{matrix:o,opacity:s}}function Ue({id:e,content:r,filter:t,left:i,top:a,width:n,height:o,matrix:s,opacity:f,image:h,clipPathId:g,debug:p,shape:l,decorationShape:c},u){let d="";if(p&&(d=y("rect",{x:i,y:a-o,width:n,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0})),h){let x={href:h,x:i,y:a,width:n,height:o,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0,style:u.filter?`filter:${u.filter}`:void 0};return[(t?`${t}<g filter="url(#satori_s-${e})">`:"")+y("image",se(G({},x),{opacity:f!==1?f:void 0}))+(c||"")+(t?"</g>":"")+d,""]}let b={x:i,y:a,width:n,height:o,"font-weight":u.fontWeight,"font-style":u.fontStyle,"font-size":u.fontSize,"font-family":u.fontFamily,"letter-spacing":u.letterSpacing||void 0,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0,style:u.filter?`filter:${u.filter}`:void 0};return[(t?`${t}<g filter="url(#satori_s-${e})">`:"")+y("text",se(G({},b),{fill:u.color,opacity:f!==1?f:void 0}),r)+(c||"")+(t?"</g>":"")+d,l?y("text",b,r):""]}function de({id:e,width:r,height:t},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let a=i.shadowRadius*i.shadowRadius/4,n=Math.min(i.shadowOffset.width-a,0),o=Math.max(i.shadowOffset.width+a+r,r),s=Math.min(i.shadowOffset.height-a,0),f=Math.max(i.shadowOffset.height+a+t,t);return`<defs><filter id="satori_s-${e}" x="${n/r*100}%" y="${s/t*100}%" width="${(o-n)/r*100}%" height="${(f-s)/t*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius/2}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function ze({width:e,left:r,top:t,ascender:i,clipPathId:a},n){let{textDecorationColor:o,textDecorationStyle:s,textDecorationLine:f,fontSize:h}=n;if(!f||f==="none")return"";let g=Math.max(1,h*.1),p=f==="line-through"?t+i*.5:f==="underline"?t+i*1.1:t,l=s==="dashed"?`${g*1.2} ${g*2}`:s==="dotted"?`0 ${g*2}`:void 0;return y("line",{x1:r,y1:p,x2:r+e,y2:p,stroke:o,"stroke-width":g,"stroke-dasharray":l,"stroke-linecap":s==="dotted"?"round":"square","clip-path":a?`url(#${a})`:void 0})}var Ve=void 0;function*je(e,r){var lt;let t=te(),{parentStyle:i,inheritedStyle:a,parent:n,font:o,id:s,isInheritingTransform:f,debug:h,embedFont:g,graphemeImages:p,canLoadAdditionalAssets:l}=r;i.textTransform==="uppercase"?e=e.toLocaleUpperCase(Ve):i.textTransform==="lowercase"?e=e.toLocaleLowerCase(Ve):i.textTransform==="capitalize"&&(e=le(e,"word").map(C=>le(C,"grapheme").map((I,A)=>A===0?I.toLocaleUpperCase(Ve):I).join("")).join(""));let c=q(i.wordBreak,{normal:"word","break-all":"grapheme","break-word":"grapheme","keep-all":"word"},"word"),u=le(e,c),d=t.Node.create();d.setAlignItems(t.ALIGN_BASELINE),i.textAlign==="left"?d.setJustifyContent(t.JUSTIFY_FLEX_START):i.textAlign==="center"?d.setJustifyContent(t.JUSTIFY_CENTER):i.textAlign==="right"?d.setJustifyContent(t.JUSTIFY_FLEX_END):i.textAlign==="justify"&&d.setJustifyContent(t.JUSTIFY_SPACE_BETWEEN),n.insertChild(d,n.getChildCount());let{textAlign:b,textOverflow:x,whiteSpace:F,lineHeight:v,filter:N,_inheritedBackgroundClipTextPath:W}=i,M=i.fontSize,S=o.getEngine(M,v,i),H=l?u.filter(C=>!S.resolve(C)):[];yield H,H.length&&(S=o.getEngine(M,v,i));let _=[],T=[],X=[],K=[],Q=new Map,w=C=>{let I=0;for(let A of C){if(Q.has(A)){I+=Q.get(A);continue}let Y=S.measure(A,i);Q.set(A,Y),I+=Y}return I},$=0,R=[],m=0;for(let C of u){let I=!1,A=p&&p[C];F==="pre"?I=C[0]===`
`:F!=="nowrap"&&(A||ye.includes(C[0]))&&(I=!0),I?(F==="nowrap"?m+=w(R)+i.fontSize:($=Math.max($,w(R)),A&&($=Math.max($,i.fontSize))),R=[]):(!ye.includes(C[0])||!R.length)&&R.push(C===`
`?" ":C)}$=Math.max($,w(R)+m);let E=n.getMinWidth(),L=n.getMaxWidth(),Z=n.getWidth();isNaN(Z.value)&&(isNaN(E.value)||E.unit===1&&E.value>$)&&(isNaN(L.value)||L.unit===1&&($=Math.min($,L.value)),n.setMinWidth($)),typeof i.flexShrink=="undefined"&&n.setFlexShrink(1);let he=F==="pre-wrap"||F==="pre";d.setMeasureFunc(C=>{let I=0,A="",Y=0,U=0,z=0,V=-1,ie=0,P=0,oe=0;_=[],X=[0];for(let ne=0;ne<u.length;ne++){let D=u[ne];if(!he&&ye.includes(D[0]))A||(A=" "),Y=w([A]),K[ne]=null;else{let ae=he&&D===`
`,j=ae?0:p&&p[D]?i.fontSize:w([D]);U||(A="",Y=0);let B=Y||",.!?:-@)>]}%#".indexOf(D[0])<0,J=!U||!!Y;if(ae||ne&&B&&U+Y+j>C&&F!=="nowrap"&&F!=="pre")_.push(U),T.push(oe),I++,ie+=P,U=j,P=j?S.glyphHeight(D):0,oe=j?S.baseline(D):0,X.push(1),V=-1,ae||(z=Math.max(z,C));else{U+=Y+j;let me=S.glyphHeight(D);me>P&&(P=me,oe=S.baseline(D)),J&&X[X.length-1]++}A="",Y=0,J&&V++,z=Math.max(z,U),K[ne]={y:ie,x:U-j,width:j,line:I,lineIndex:V}}}return U&&(I++,_.push(U),T.push(oe),ie+=P),{width:z,height:ie}});let[Lt,Ct]=yield,Oe="",_e="",re=a._inheritedClipPathId,{left:nt,top:it,width:we,height:ot}=d.getComputedLayout(),$e=n.getComputedWidth()-n.getComputedPadding(t.EDGE_LEFT)-n.getComputedPadding(t.EDGE_RIGHT)-n.getComputedBorder(t.EDGE_LEFT)-n.getComputedBorder(t.EDGE_RIGHT),ce=Lt+nt,pe=Ct+it,{matrix:ee,opacity:Re}=wt({left:nt,top:it,width:we,height:ot,isInheritingTransform:f},i),be="";i.textShadowOffset&&(be=de({width:we,height:ot,id:s},{shadowColor:i.textShadowColor,shadowOffset:i.textShadowOffset,shadowRadius:i.textShadowRadius}));let ve="",Te="",at="",Fe=-1,st=x==="ellipsis"?w(["\u2026"]):0,It=x==="ellipsis"?w([" "]):0,Le={};for(let C=0;C<u.length;C++){if(!K[C])continue;let I=K[C],A=u[C],Y=null,U=p?p[A]:null,z=I.y,V=I.x,ie=I.width,P=I.line;if(P===Fe)continue;let oe=!1;if(_.length>1){let B=we-_[P];if(b==="right"||b==="end")V+=B;else if(b==="center")V+=B/2;else if(b==="justify"&&P<_.length-1){let J=X[P];V+=(J>1?B/(J-1):0)*I.lineIndex,oe=!0}}if(Le[P]||(Le[P]=[V,oe?we:_[P]]),x==="ellipsis"&&_[P]>$e&&I.x+ie+st+It>$e){let B=le(A,"grapheme"),J="",me=0;for(let ft of B){let ut=I.x+w([J+ft]);if(J&&ut+st>$e)break;J+=ft,me=ut}A=J+"\u2026",Fe=P,Le[P][1]=me}let ne=T[P],D=S.baseline(A),ae=S.glyphHeight(A),j=ne-D;if(U?z+=0:g?(Y=S.getSVG(A,se(G({},i),{left:ce+V,top:pe+z+D+j,letterSpacing:i.letterSpacing})),h&&(at+=y("rect",{x:ce+V,y:pe+z+j,width:I.width,height:ae,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:ee||void 0,"clip-path":re?`url(#${re})`:void 0})+y("line",{x1:ce+V,x2:ce+V+I.width,y1:pe+z+j+D,y2:pe+z+j+D,stroke:"#14c000","stroke-width":1,transform:ee||void 0,"clip-path":re?`url(#${re})`:void 0}))):z+=D+j,i.textDecorationLine&&(P!==((lt=K[C+1])==null?void 0:lt.line)||Fe===P)){let B=Le[P];B&&!B[2]&&(ve+=ze({left:ce+B[0],top:pe+ae*+P,width:B[1],ascender:S.baseline(A),clipPathId:re},i),B[2]=1)}if(Y!==null)Te+=Y+" ";else{let[B,J]=Ue({content:A,filter:be,id:s,left:ce+V,top:pe+z,width:ie,height:ae,matrix:ee,opacity:Re,image:U,clipPathId:re,debug:h,shape:!!W,decorationShape:ve},i);Oe+=B,_e+=J,ve=""}}if(Te){let C=i.color!=="transparent"&&Re!==0?y("path",{fill:i.color,d:Te,transform:ee||void 0,opacity:Re!==1?Re:void 0,"clip-path":re?`url(#${re})`:void 0,style:N?`filter:${N}`:void 0}):"";W&&(_e=y("path",{d:Te,transform:ee||void 0})),Oe+=(be?`${be}<g filter="url(#satori_s-${s})">`:"")+C+ve+(be?"</g>":"")+at}return _e&&(i._inheritedBackgroundClipTextPath.value+=_e),Oe}var Je=Je||{};Je.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},r="";function t(m){var E=new Error(r+": "+m);throw E.source=r,E}function i(){var m=a();return r.length>0&&t("Invalid input not EOF"),m}function a(){return v(n)}function n(){return o("linear-gradient",e.linearGradient,f)||o("repeating-linear-gradient",e.repeatingLinearGradient,f)||o("radial-gradient",e.radialGradient,p)||o("repeating-radial-gradient",e.repeatingRadialGradient,p)}function o(m,E,L){return s(E,function(Z){var he=L();return he&&($(e.comma)||t("Missing comma before color stops")),{type:m,orientation:he,colorStops:v(N)}})}function s(m,E){var L=$(m);if(L){$(e.startCall)||t("Missing (");var Z=E(L);return $(e.endCall)||t("Missing )"),Z}}function f(){return h()||g()}function h(){return w("directional",e.sideOrCorner,1)}function g(){return w("angular",e.angleValue,1)}function p(){var m,E=l(),L;return E&&(m=[],m.push(E),L=r,$(e.comma)&&(E=l(),E?m.push(E):r=L)),m}function l(){var m=c()||u();if(m)m.at=b();else{var E=d();if(E){m=E;var L=b();L&&(m.at=L)}else{var Z=x();Z&&(m={type:"default-radial",at:Z})}}return m}function c(){var m=w("shape",/^(circle)/i,0);return m&&(m.style=Q()||d()),m}function u(){var m=w("shape",/^(ellipse)/i,0);return m&&(m.style=X()||d()),m}function d(){return w("extent-keyword",e.extentKeywords,1)}function b(){if(w("position",/^at/,0)){var m=x();return m||t("Missing positioning value"),m}}function x(){var m=F();if(m.x||m.y)return{type:"position",value:m}}function F(){return{x:X(),y:X()}}function v(m){var E=m(),L=[];if(E)for(L.push(E);$(e.comma);)E=m(),E?L.push(E):t("One extra comma");return L}function N(){var m=W();return m||t("Expected color definition"),m.length=X(),m}function W(){return S()||_()||H()||M()}function M(){return w("literal",e.literalColor,0)}function S(){return w("hex",e.hexColor,1)}function H(){return s(e.rgbColor,function(){return{type:"rgb",value:v(T)}})}function _(){return s(e.rgbaColor,function(){return{type:"rgba",value:v(T)}})}function T(){return $(e.number)[1]}function X(){return w("%",e.percentageValue,1)||K()||Q()}function K(){return w("position-keyword",e.positionKeywords,1)}function Q(){return w("px",e.pixelValue,1)||w("em",e.emValue,1)}function w(m,E,L){var Z=$(E);if(Z)return{type:m,value:Z[L]}}function $(m){var E,L;return L=/^[\n\r\t\s]+/.exec(r),L&&R(L[0].length),E=m.exec(r),E&&R(E[0].length),E}function R(m){r=r.substr(m)}return function(m){return r=m.toString(),i()}}();var qe=Je;function fr(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function ur(e,r){return typeof e=="string"&&e.endsWith("%")?r*parseFloat(e)/100:+e}function Rt(e,{x:r,y:t,defaultX:i,defaultY:a}){return(e?e.split(" ").map(n=>{try{let o=new fe(n);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(n=>n!==null):[i,a]).map((n,o)=>ur(n,[r,t][o]))}function vt(e,r){let t=[];for(let o of r){let s=fr(o);if(!t.length&&(t.push({offset:0,color:s}),typeof o.length=="undefined"||o.length.value==="0"))continue;let f=typeof o.length=="undefined"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;t.push({offset:f,color:s})}t.length||t.push({offset:0,color:"transparent"});let i=t[t.length-1];i.offset!==1&&(typeof i.offset=="undefined"?i.offset=1:t.push({offset:1,color:i.color}));let a=0,n=1;for(let o=0;o<t.length;o++)if(typeof t[o].offset=="undefined"){for(n<o&&(n=o);typeof t[n].offset=="undefined";)n++;t[o].offset=(t[n].offset-t[a].offset)/(n-a)*(o-a)+t[a].offset}else a=o;return t}function Ke({id:e,width:r,height:t},{image:i,size:a,position:n,repeat:o}){o=o||"repeat";let s=o==="repeat-x"||o==="repeat",f=o==="repeat-y"||o==="repeat",h=Rt(a,{x:r,y:t,defaultX:r,defaultY:t}),g=Rt(n,{x:r,y:t,defaultX:0,defaultY:0});if(i.startsWith("linear-gradient(")){let p=qe.parse(i)[0],l,c,u,d;if(p.orientation.type==="directional")[l,c,u,d]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[p.orientation.value];else if(p.orientation.type==="angular"){let x=+p.orientation.value/180*Math.PI-Math.PI/2,F=Math.cos(x),v=Math.sin(x);l=0,c=0,u=F,d=v,u<0&&(l-=u,u=0),d<0&&(c-=d,d=0)}let b=vt(r,p.colorStops);return[`satori_bi${e}`,`<linearGradient id="satori_bi${e}" x1="${l}" y1="${c}" x2="${u}" y2="${d}">${b.map(x=>`<stop offset="${x.offset*100}%" stop-color="${x.color}"/>`).join("")}</linearGradient>`]}if(i.startsWith("radial-gradient(")){let p=qe.parse(i)[0],l=p.orientation[0],[c,u]=h,d="circle",b=c/2,x=u/2;if(l.type==="shape"){if(d=l.value,l.at)if(l.at.type==="position")b=l.at.value.x.value,x=l.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+l.at.type)}else throw new Error("orientation.type not implemented: "+l.type);let F=vt(r,p.colorStops),v=`satori_radial_${e}`,N=`satori_pattern_${e}`,W={},M=Math.max(Math.abs(c-b),Math.abs(b)),S=Math.max(Math.abs(u-x),Math.abs(x));if(d==="circle")W.r=Math.sqrt(M*M+S*S);else if(d==="ellipse"){let T=S!==0?M/S:1;W.ry=Math.sqrt(M*M+S*S*T*T)/T,W.rx=W.ry*T}let H=y("pattern",{id:N,x:g[0],y:g[1],width:s?c:"100%",height:f?u:"100%",patternUnits:"userSpaceOnUse"},y("radialGradient",{id:v},F.map(T=>y("stop",{offset:T.offset,"stop-color":T.color})).join(""))+y(d,se(G({cx:b,cy:x,width:c,height:u},W),{fill:`url(#${v})`})));return[N,H]}if(i.startsWith("url(")){let p=i.slice(4,-1);return[`satori_bi${e}`,y("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0],y:g[1],width:s?h[0]:"100%",height:f?h[1]:"100%"},y("image",{x:0,y:0,width:h[0],height:h[1],href:p}))]}}function Ae(e,r,t){return t<e+r&&(t/2<e&&t/2<r?e=r=t/2:t/2<e?e=t-r:t/2<r&&(r=t-e)),[e,r]}function Ee({left:e,top:r,width:t,height:i},a){let{borderTopLeftRadius:n,borderTopRightRadius:o,borderBottomLeftRadius:s,borderBottomRightRadius:f}=a;return n=Math.min(n||0,t,i),o=Math.min(o||0,t,i),s=Math.min(s||0,t,i),f=Math.min(f||0,t,i),!n&&!o&&!s&&!f?"":([n,o]=Ae(n,o,t),[n,s]=Ae(n,s,i),[o,f]=Ae(o,f,i),[s,f]=Ae(s,f,t),`M${e+n},${r} h${t-n-o} a${o},${o} 0 0 1 ${o},${o} v${i-o-f} a${f},${f} 0 0 1 ${-f},${f} h${f+s-t} a${s},${s} 0 0 1 ${-s},${-s} v${s+n-i} a${n},${n} 0 0 1 ${n},${-n}`)}function Ze({left:e,top:r,width:t,height:i,path:a,id:n},o){return o.overflow!=="hidden"?"":a?y("clipPath",{id:`satori_cp-${n}`,"clip-path":o._inheritedClipPathId?`url(#${o._inheritedClipPathId})`:void 0},y("path",{x:e,y:r,width:t,height:i,d:a})):y("clipPath",{id:`satori_cp-${n}`,"clip-path":o._inheritedClipPathId?`url(#${o._inheritedClipPathId})`:void 0},y("rect",{x:e,y:r,width:t,height:i}))}function Qe({id:e,left:r,top:t,width:i,height:a,isInheritingTransform:n,debug:o},s){if(s.display==="none")return"";let f="rect",h="transparent",g=0,p="",l="",c=[],u=1,d="";s.backgroundColor&&c.push(s.backgroundColor),s.borderWidth&&(g=s.borderWidth,h=s.borderColor),s.opacity&&(u=+s.opacity),s.transform&&(p=ue({left:r,top:t,width:i,height:a},s.transform,n,s.transformOrigin));let b="";if(s.backgroundImage){let H=s.backgroundImage.map((_,T)=>Ke({id:e+"_"+T,width:i,height:a},_)).filter(Boolean);for(let _ of H)c.push(`url(#${_[0]})`),l+=_[1],_[2]&&(b+=_[2])}let x=Ee({left:r,top:t,width:i,height:a},s);x&&(f="path");let F=Ze({left:r,top:t,width:i,height:a,path:x,id:e},s),v=s._inheritedClipPathId,N=de({width:i,height:a,id:e},s);o&&(d=y("rect",{x:r,y:t,width:i,height:a,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:p||void 0,"clip-path":v?`url(#${v})`:void 0})),c.length||c.push("transparent");let{backgroundClip:W,filter:M}=s,S=c.map((H,_)=>{if(H==="transparent"&&!(_===c.length-1&&g))return"";let T=_===c.length-1&&g&&W!=="text";return y(f,{x:r,y:t,width:i,height:a,fill:H,stroke:T?h:void 0,"stroke-width":T?g:void 0,d:x||void 0,transform:p||void 0,"clip-path":W==="text"?`url(#satori_bct-${e})`:v?`url(#${v})`:void 0,style:M?`filter:${M}`:void 0})}).join("");return W==="text"&&g&&(S=y(f,{x:r,y:t,width:i,height:a,fill:"transparent",stroke:h,"stroke-width":g,d:x||void 0,transform:p||void 0,"clip-path":v?`url(#${v})`:void 0})+S),(l?`<defs>${l}</defs>`:"")+F+(N?`${N}<g filter="url(#satori_s-${e})">`:"")+(u!==1?`<g opacity="${u}">`:"")+(b||S)+(u!==1?"</g>":"")+(N?"</g>":"")+d}function et({id:e,left:r,top:t,width:i,height:a,src:n,debug:o,isInheritingTransform:s},f){if(f.display==="none")return"";let h="",g=1,p="",l=f.objectFit==="contain"?"xMidYMid":f.objectFit==="cover"?"xMidYMid slice":"none",c=Ee({left:r,top:t,width:i,height:a},f),u=f._inheritedClipPathId;c&&(h=y("clipPath",{id:`satori_c-${e}`,"clip-path":u?`url(#${u})`:void 0},y("path",{x:r,y:t,width:i,height:a,d:c}))),f.opacity&&(g=+f.opacity);let d=de({width:i,height:a,id:e},f);return f.transform&&(p=ue({left:r,top:t,width:i,height:a},f.transform,s,f.transformOrigin)),d+(d?`<g filter="url(#satori_s-${e})">`:"")+h+y("image",{x:r,y:t,width:i,height:a,href:n,preserveAspectRatio:l,transform:p||void 0,"clip-path":h?`url(#satori_c-${e})`:u?`url(#${u})`:void 0})+(d?"</g>":"")}function*Se(e,r){let t=te(),{id:i,inheritedStyle:a,parent:n,font:o,debug:s,embedFont:f=!0,graphemeImages:h,canLoadAdditionalAssets:g}=r;if(e===null||typeof e=="undefined")return yield,yield,"";if(!We(e)||typeof e.type=="function"){let R;if(!We(e))R=je(String(e),r),yield R.next().value;else{if(mt(e.type))throw new Error("Class component is not supported.");R=Se(e.type(e.props),r),yield R.next().value}R.next();let m=yield;return R.next(m).value}let{type:p,props:l}=e,{style:c,children:u}=l,d=t.Node.create();n.insertChild(d,n.getChildCount());let[b,x]=Xe(d,p,a,c,l),F=b.transform===a.transform;if(F||(b.transform.__parent=a.transform),b.overflow==="hidden"&&(x._inheritedClipPathId=`satori_cp-${i}`),b.backgroundClip==="text"){let R={value:""};x._inheritedBackgroundClipTextPath=R,b._inheritedBackgroundClipTextPath=R}let v=typeof u=="undefined"?[]:[].concat(u),N=[],W=0,M=[];for(let R of v){let m=Se(R,{id:i+"-"+W++,parentStyle:b,inheritedStyle:x,isInheritingTransform:!0,parent:d,font:o,embedFont:f,debug:s,graphemeImages:h,canLoadAdditionalAssets:g});g?M.push(...m.next().value||[]):m.next(),N.push(m)}yield M;for(let R of N)R.next();let[S,H]=yield;b.position==="absolute"&&d.calculateLayout();let{left:_,top:T,width:X,height:K}=d.getComputedLayout();_+=S,T+=H;let Q="",w="",$="";p==="img"?w=et({id:i,left:_,top:T,width:X,height:K,src:l.src,isInheritingTransform:F,debug:s},b):w=Qe({id:i,left:_,top:T,width:X,height:K,isInheritingTransform:F,debug:s},b);for(let R of N)Q+=R.next([_,T]).value;return b._inheritedBackgroundClipTextPath&&($+=y("clipPath",{id:`satori_bct-${i}`,"clip-path":b._inheritedClipPathId?`url(#${b._inheritedClipPathId})`:void 0},b._inheritedBackgroundClipTextPath.value)),$+w+Q}import dr from"@shuding/opentype.js";function cr(e,r,[t,i],[a,n]){if(t!==a)return t?!a||t===e?-1:a===e?1:e===400&&t===500||e===500&&t===400?-1:e===400&&a===500||e===500&&a===400?1:e<400?t<e&&a<e?a-t:t<e?-1:a<e?1:t-a:e<t&&e<a?t-a:e<t?-1:e<a?1:a-t:1;if(i!==n){if(i===r)return-1;if(n===r)return 1}return-1}var ke=class{constructor(r){this.fonts=new Map;this.addFonts(r)}get({name:r,weight:t,style:i}){if(!this.fonts.has(r))return null;t==="normal"&&(t=400),t==="bold"&&(t=700);let a=[...this.fonts.get(r)],n=a[0];for(let o=1;o<a.length;o++){let[,s,f]=n,[,h,g]=a[o];cr(t,i,[s,f],[h,g])>0&&(n=a[o])}return n[0]}addFonts(r){for(let t of r){let i=t.data,a=dr.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0});this.defaultFont||(this.defaultFont=a);let n=t.name.toLowerCase();this.fonts.has(n)||this.fonts.set(n,[]),this.fonts.get(n).push([a,t.weight,t.style])}}getEngine(r=16,t=1.2,{fontFamily:i,fontWeight:a=400,fontStyle:n="normal"}){i=Array.isArray(i)?i:[i];let o=i.map(l=>this.get({name:l,weight:a,style:n})).filter(Boolean);for(let l of this.fonts.keys())i.includes(l)||o.push(this.get({name:l,weight:a,style:n}));let s=new Map,f=(l,c=!0)=>{let u=l.charCodeAt(0);if(s.has(u))return s.get(u);let d=o.find((b,x)=>!!b.charToGlyphIndex(l)||c&&x===o.length-1);return d&&s.set(u,d),d},h=(l,c=!1)=>{var d,b;return((c?(b=(d=l.tables)==null?void 0:d.os2)==null?void 0:b.sTypoAscender:0)||l.ascender)/l.unitsPerEm*r},g=(l,c=!1)=>{var d,b;return((c?(b=(d=l.tables)==null?void 0:d.os2)==null?void 0:b.sTypoDescender:0)||l.descender)/l.unitsPerEm*r},p={resolve:l=>f(l,!1),baseline:(l,c=typeof l=="undefined"?o[0]:f(l))=>{let u=h(c,!0),d=g(c,!0),b=u-d,x=p.glyphHeight(l,c),F=(x-b)/2,{yMax:v,yMin:N}=c.tables.head,W=v/(v-N);return F+W*x},glyphHeight:(l,c=typeof l=="undefined"?o[0]:f(l))=>(h(c)-g(c))*t/1.2,measure:(l,c)=>{let u=f(l);return this.measure(u,l,c)},getSVG:(l,c)=>{let u=f(l);return this.getSVG(u,l,c)}};return p}measure(r,t,{fontSize:i,letterSpacing:a=0}){return r.getAdvanceWidth(t,i,{letterSpacing:a/i})}getSVG(r,t,{fontSize:i,top:a,left:n,letterSpacing:o=0}){return r.getPath(t,n,a,i,{letterSpacing:o/i}).toPathData(1)}};function tt({width:e,height:r,content:t}){return y("svg",{width:e,height:r,viewBox:`0 0 ${e} ${r}`,xmlns:"http://www.w3.org/2000/svg"},t)}var rt=new WeakMap;async function Tt(e,r){let t=te();if(!t)throw new Error("Satori is not initialized.");let i;rt.has(r.fonts)?i=rt.get(r.fonts):rt.set(r.fonts,i=new ke(r.fonts));let a=t.Node.create();a.setWidth(r.width),a.setHeight(r.height),a.setFlexDirection(t.FLEX_DIRECTION_ROW),a.setFlexWrap(t.WRAP_WRAP),a.setAlignContent(t.ALIGN_AUTO),a.setAlignItems(t.ALIGN_FLEX_START),a.setJustifyContent(t.JUSTIFY_FLEX_START),a.setOverflow(t.OVERFLOW_HIDDEN);let n=G({},r.graphemeImages),o=Se(e,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:r.width,_viewportHeight:r.height},parent:a,font:i,embedFont:r.embedFont,debug:r.debug,graphemeImages:n,canLoadAdditionalAssets:!!r.loadAdditionalAsset}),s=o.next().value;if(r.loadAdditionalAsset&&s.length){s=Array.from(new Set(le(s.join(""),"grapheme")));let h={};s.forEach(l=>pr.detect(l,c=>{h[c]=h[c]||[],c==="unknown"?h[c].push(l):h[c][0]=(h[c][0]||"")+l}));let g=[],p={};await Promise.all(Object.entries(h).flatMap(([l,c])=>c.map(u=>r.loadAdditionalAsset(l,u).then(d=>{typeof d=="string"?p[u]=d:d&&g.push(d)})))),i.addFonts(g),Object.assign(n,p)}o.next(),a.calculateLayout(r.width,r.height,t.DIRECTION_LTR);let f=o.next([0,0]).value;return a.freeRecursive(),tt({width:r.width,height:r.height,content:f})}export{Tt as default,Wt as init};
var Ae=Object.defineProperty,Oe=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var le=(d,u,e)=>u in d?Ae(d,u,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[u]=e,M=(d,u)=>{for(var e in u||(u={}))$e.call(u,e)&&le(d,e,u[e]);if(se)for(var e of se(u))Pe.call(u,e)&&le(d,e,u[e]);return d},id=(d,u)=>Oe(d,Fe(u));import{guessLanguage as gu}from"guesslanguage";import*as We from"yoga-layout-prebuilt";var pe=We;var Pd;Pd=pe.default;function Ne(d){Pd=d}function ed(){return Pd}import{LineBreaker as Ge}from"css-line-break";import{splitGraphemes as Me}from"text-segmentation";function Wd(d){let u=typeof d;return!(u==="number"||u==="bigint"||u==="string"||u==="boolean")}function me(d){return/^class\s/.test(Function.prototype.toString.call(d))}function gd(d,u){return[d[0]*u[0]+d[2]*u[1],d[1]*u[0]+d[3]*u[1],d[0]*u[2]+d[2]*u[3],d[1]*u[2]+d[3]*u[3],d[0]*u[4]+d[2]*u[5]+d[4],d[1]*u[4]+d[3]*u[5]+d[5]]}function q(d,u,e){let n=u[d];return typeof n=="undefined"?e:n}var ge=void 0,Nd=typeof Intl!="undefined"&&"Segmenter"in Intl&&process.env.NODE_ENV!=="test",De=Nd?new Intl.Segmenter(ge,{granularity:"word"}):null,Be=Nd?new Intl.Segmenter(ge,{granularity:"grapheme"}):null,yd=[32,160,4961,65792,65793,4153,4241,10].map(d=>String.fromCodePoint(d)),Ye=d=>{let u=Ge(d,{lineBreak:"strict",wordBreak:"normal"}),e=[],n;for(;!(n=u.next()).done;)if(n.value){let f=n.value.slice(),t="";for(let r=0;r<f.length;r++){let i=f[r];yd.includes(i)?(t.length&&e.push(t),e.push(i),t=""):t+=i}t.length&&e.push(t)}return e};function od(d,u){return Nd?u==="word"?[...De.segment(d)].map(e=>e.segment):[...Be.segment(d)].map(e=>e.segment):u==="word"?Ye(d):Me(d)}function x(d,u,e){let n="";for(let[f,t]of Object.entries(u))typeof t!="undefined"&&(n+=` ${f}="${t}"`);return e?`<${d}${n}>${e}</${d}>`:`<${d}${n}/>`}var be={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var He=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedBackgroundClipTextPath"]);function Gd(d){let u={};for(let e in d)He.has(e)&&(u[e]=d[e]);return u}import{getPropertyName as tu,getStylesForProperty as ru}from"css-to-react-native";import{parseElementStyle as nu}from"css-background-parser";var xd=(d,u)=>()=>(u||d((u={exports:{}}).exports,u),u.exports),Xe=xd((d,u)=>{u.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),Ue=xd((d,u)=>{u.exports=["deg","grad","rad","turn"]}),ze=xd((d,u)=>{u.exports=["dpi","dpcm","dppx"]}),je=xd((d,u)=>{u.exports=["Hz","kHz"]}),Ve=xd((d,u)=>{u.exports=["s","ms"]}),Je=Xe(),he=Ue(),ye=ze(),xe=je(),Ee=Ve();function Dd(d){if(/\.\D?$/.test(d))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(d))throw new Error("Only one leading +/- is allowed");if(qe(d)>1)throw new Error("Only one dot is allowed");if(/%$/.test(d)){this.type="percentage",this.value=Md(d),this.unit="%";return}var u=Ze(d);if(!u){this.type="number",this.value=Md(d);return}this.type=du(u),this.value=Md(d.substr(0,d.length-u.length)),this.unit=u}Dd.prototype.valueOf=function(){return this.value};Dd.prototype.toString=function(){return this.value+(this.unit||"")};function ad(d){return new Dd(d)}function qe(d){var u=d.match(/\./g);return u?u.length:0}function Md(d){var u=parseFloat(d);if(isNaN(u))throw new Error("Invalid number: "+d);return u}var Ke=[].concat(he,xe,Je,ye,Ee);function Ze(d){var u=d.match(/\D+$/),e=u&&u[0];if(e&&Ke.indexOf(e)===-1)throw new Error("Invalid unit: "+e);return e}var Qe=Object.assign(Ld(he,"angle"),Ld(xe,"frequency"),Ld(ye,"resolution"),Ld(Ee,"time"));function Ld(d,u){return Object.fromEntries(d.map(e=>[e,u]))}function du(d){return Qe[d]||"length"}import eu from"postcss-value-parser";function uu(d,u){try{let e=new ad(d);switch(e.unit){case"px":return{absolute:e.value};case"em":return{absolute:e.value*u};case"rem":return{absolute:e.value*16};case"%":return{relative:e.value};default:return{}}}catch{return{}}}function Bd(d,u,e){switch(d){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:let n=uu(d,u);return n.absolute?{[e?"xAbsolute":"yAbsolute"]:n.absolute}:n.relative?{[e?"xRelative":"yRelative"]:n.relative}:{}}}function Yd(d,u){if(typeof d=="number")return{xAbsolute:d};let e;try{e=eu(d).nodes.filter(n=>n.type==="word").map(n=>n.value)}catch{return{}}return e.length===1?Bd(e[0],u,!0):e.length===2?((e[0]==="top"||e[0]==="bottom"||e[1]==="left"||e[1]==="right")&&e.reverse(),M(M({},Bd(e[0],u,!0)),Bd(e[1],u,!1))):{}}var fu=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),iu=new Set(["lineHeight"]),_e=[1,0,0,1,0,0];function ou(d,u,e,n){return d==="border"&&!e.includes(u.borderColor)?u.borderColor=n:d==="textDecoration"&&!e.includes(u.textDecorationColor)&&(u.textDecorationColor=n),u}function Se(d,u){return typeof u=="number"?fu.has(d)?iu.has(d)?u:String(u):u+"px":u}function au(d,u){return d==="lineHeight"?{lineHeight:Se(d,u)}:d==="fontFamily"?{fontFamily:u.split(",").map(e=>e.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())}:null}function Hd(d,u,e,{percentage:n}={percentage:!1}){if(typeof d=="number")return d;try{let f=new ad(d);if(f.type==="length")switch(f.unit){case"em":return f.value*u;case"rem":return f.value*16;case"vw":return~~(f.value*e._viewportWidth/100);case"vh":return~~(f.value*e._viewportHeight/100);default:return f.value}else if(f.type==="angle")switch(f.unit){case"deg":return f.value;case"rad":return f.value*180/Math.PI;default:return f.value}else if(f.type==="percentage"&&n)return f.value/100*u}catch{}}function kd(d,u){let e={};for(let f in d){if(f.startsWith("_")){e[f]=d[f];continue}let t=tu(f);Object.assign(e,au(t,d[f])||ou(t,ru(t,Se(t,d[f]),!0),d[f],d.color||u.color))}if(e.backgroundImage){let{backgrounds:f}=nu(e);e.backgroundImage=f}let n=e.fontSize||u.fontSize;if(typeof n=="string")try{let f=new ad(n);switch(f.unit){case"em":n=f.value*u.fontSize;break;case"rem":n=f.value*16;break}}catch{n=16}typeof e.fontSize!="undefined"&&(e.fontSize=n),e.transformOrigin&&(e.transformOrigin=Yd(e.transformOrigin,n));for(let f in e){let t=e[f];if(f==="lineHeight")typeof t=="string"&&(t=e[f]=Hd(t,n,u,{percentage:!0})/n);else if(typeof t=="string"){let r=Hd(t,n,u);typeof r!="undefined"&&(e[f]=r),t=e[f]}if(f==="opacity"&&(t=e[f]=t*u.opacity),f==="transform"){let r=[..._e],i=t;for(let a of i){let m=Object.keys(a)[0],g=a[m],l=typeof g=="string"?Hd(g,n,u):g,s=[..._e];switch(m){case"translateX":s[4]=l;break;case"translateY":s[5]=l;break;case"scale":s[0]=l,s[3]=l;break;case"scaleX":s[0]=l;break;case"scaleY":s[3]=l;break;case"rotate":let b=l*Math.PI/180,o=Math.cos(b),c=Math.sin(b);s[0]=o,s[1]=c,s[2]=-c,s[3]=o;break;case"skewX":s[2]=Math.tan(l*Math.PI/180);break;case"skewY":s[1]=Math.tan(l*Math.PI/180);break}r=gd(s,r)}e.transform=r}}return e}function Xd(d,u,e,n,f){let t=ed(),r=M(M(M({},e),kd(be[u],e)),kd(n,e));if(u==="img"){let i=parseInt(f.width),m=parseInt(f.height)/i;r.width||(r.width=i),r.height||(r.height=m*r.width)}return d.setDisplay(q(r.display,{flex:t.DISPLAY_FLEX,none:t.DISPLAY_NONE},t.DISPLAY_FLEX)),d.setAlignContent(q(r.alignContent,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,"space-between":t.ALIGN_SPACE_BETWEEN,"space-around":t.ALIGN_SPACE_AROUND,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_AUTO)),d.setAlignItems(q(r.alignItems,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_FLEX_START)),d.setAlignSelf(q(r.alignSelf,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_AUTO)),d.setJustifyContent(q(r.justifyContent,{center:t.JUSTIFY_CENTER,"flex-start":t.JUSTIFY_FLEX_START,"flex-end":t.JUSTIFY_FLEX_END,"space-between":t.JUSTIFY_SPACE_BETWEEN,"space-around":t.JUSTIFY_SPACE_AROUND},t.JUSTIFY_FLEX_START)),d.setFlexDirection(q(r.flexDirection,{row:t.FLEX_DIRECTION_ROW,column:t.FLEX_DIRECTION_COLUMN,"row-reverse":t.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":t.FLEX_DIRECTION_COLUMN_REVERSE},t.FLEX_DIRECTION_ROW)),d.setFlexWrap(q(r.flexWrap,{wrap:t.WRAP_WRAP,nowrap:t.WRAP_NO_WRAP,"wrap-reverse":t.WRAP_WRAP_REVERSE},t.WRAP_WRAP)),typeof r.flexBasis!="undefined"&&d.setFlexBasis(r.flexBasis),d.setFlexGrow(typeof r.flexGrow=="undefined"?0:r.flexGrow),d.setFlexShrink(typeof r.flexShrink=="undefined"?0:r.flexShrink),typeof r.maxHeight!="undefined"&&d.setMaxHeight(r.maxHeight),typeof r.maxWidth!="undefined"&&d.setMaxWidth(r.maxWidth),typeof r.minHeight!="undefined"&&d.setMinHeight(r.minHeight),typeof r.minWidth!="undefined"&&d.setMinWidth(r.minWidth),d.setOverflow(q(r.overflow,{visible:t.OVERFLOW_VISIBLE,hidden:t.OVERFLOW_HIDDEN},t.OVERFLOW_VISIBLE)),d.setMargin(t.EDGE_TOP,r.marginTop||0),d.setMargin(t.EDGE_BOTTOM,r.marginBottom||0),d.setMargin(t.EDGE_LEFT,r.marginLeft||0),d.setMargin(t.EDGE_RIGHT,r.marginRight||0),d.setBorder(t.EDGE_TOP,r.borderWidth||0),d.setBorder(t.EDGE_BOTTOM,r.borderWidth||0),d.setBorder(t.EDGE_LEFT,r.borderWidth||0),d.setBorder(t.EDGE_RIGHT,r.borderWidth||0),d.setPadding(t.EDGE_TOP,r.paddingTop||0),d.setPadding(t.EDGE_BOTTOM,r.paddingBottom||0),d.setPadding(t.EDGE_LEFT,r.paddingLeft||0),d.setPadding(t.EDGE_RIGHT,r.paddingRight||0),d.setPositionType(q(r.position,{absolute:t.POSITION_TYPE_ABSOLUTE,relative:t.POSITION_TYPE_RELATIVE},t.POSITION_TYPE_RELATIVE)),typeof r.top!="undefined"&&d.setPosition(t.EDGE_TOP,r.top),typeof r.bottom!="undefined"&&d.setPosition(t.EDGE_BOTTOM,r.bottom),typeof r.left!="undefined"&&d.setPosition(t.EDGE_LEFT,r.left),typeof r.right!="undefined"&&d.setPosition(t.EDGE_RIGHT,r.right),typeof r.height!="undefined"?d.setHeight(r.height):d.setHeightAuto(),typeof r.width!="undefined"?d.setWidth(r.width):d.setWidthAuto(),[r,Gd(r)]}function cd({left:d,top:u,width:e,height:n},f,t,r){var a,m,g,l;let i;if(t)i=f;else{let s=(m=r==null?void 0:r.xAbsolute)!=null?m:((a=r==null?void 0:r.xRelative)!=null?a:50)*e/100,b=(l=r==null?void 0:r.yAbsolute)!=null?l:((g=r==null?void 0:r.yRelative)!=null?g:50)*n/100,o=d+s,c=u+b;i=gd([1,0,0,1,o,c],gd(f,[1,0,0,1,-o,-c])),f.__parent&&(i=gd(f.__parent,i)),f.splice(0,6,...i)}return`matrix(${i.map(s=>s.toFixed(2)).join(",")})`}function we({left:d,top:u,width:e,height:n,isInheritingTransform:f},t){let r="",i=1;return t.transform&&(r=cd({left:d,top:u,width:e,height:n},t.transform,f,t.transformOrigin)),t.opacity&&(i=+t.opacity),{matrix:r,opacity:i}}function Ud({id:d,content:u,filter:e,left:n,top:f,width:t,height:r,matrix:i,opacity:a,image:m,clipPathId:g,debug:l,shape:s,decorationShape:b},o){let c="";if(l&&(c=x("rect",{x:n,y:f-r,width:t,height:r,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0})),m){let y={href:m,x:n,y:f,width:t,height:r,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0,style:o.filter?`filter:${o.filter}`:void 0};return[(e?`${e}<g filter="url(#satori_s-${d})">`:"")+x("image",id(M({},y),{opacity:a!==1?a:void 0}))+(b||"")+(e?"</g>":"")+c,""]}let h={x:n,y:f,width:t,height:r,"font-weight":o.fontWeight,"font-style":o.fontStyle,"font-size":o.fontSize,"font-family":o.fontFamily,"letter-spacing":o.letterSpacing||void 0,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0,style:o.filter?`filter:${o.filter}`:void 0};return[(e?`${e}<g filter="url(#satori_s-${d})">`:"")+x("text",id(M({},h),{fill:o.color,opacity:a!==1?a:void 0}),u)+(b||"")+(e?"</g>":"")+c,s?x("text",h,u):""]}function sd({id:d,width:u,height:e},n){if(!n.shadowColor||!n.shadowOffset||typeof n.shadowRadius=="undefined")return"";let f=n.shadowRadius*n.shadowRadius/4,t=Math.min(n.shadowOffset.width-f,0),r=Math.max(n.shadowOffset.width+f+u,u),i=Math.min(n.shadowOffset.height-f,0),a=Math.max(n.shadowOffset.height+f+e,e);return`<defs><filter id="satori_s-${d}" x="${t/u*100}%" y="${i/e*100}%" width="${(r-t)/u*100}%" height="${(a-i)/e*100}%"><feDropShadow dx="${n.shadowOffset.width}" dy="${n.shadowOffset.height}" stdDeviation="${n.shadowRadius/2}" flood-color="${n.shadowColor}" flood-opacity="1"/></filter></defs>`}function zd({width:d,left:u,top:e,ascender:n,clipPathId:f},t){let{textDecorationColor:r,textDecorationStyle:i,textDecorationLine:a,fontSize:m}=t;if(!a||a==="none")return"";let g=Math.max(1,m*.1),l=a==="line-through"?e+n*.5:a==="underline"?e+n*1.1:e,s=i==="dashed"?`${g*1.2} ${g*2}`:i==="dotted"?`0 ${g*2}`:void 0;return x("line",{x1:u,y1:l,x2:u+d,y2:l,stroke:r,"stroke-width":g,"stroke-dasharray":s,"stroke-linecap":i==="dotted"?"round":"square","clip-path":f?`url(#${f})`:void 0})}var jd=void 0;function*Vd(d,u){var oe;let e=ed(),{parentStyle:n,inheritedStyle:f,parent:t,font:r,id:i,isInheritingTransform:a,debug:m,embedFont:g,graphemeImages:l,canLoadAdditionalAssets:s}=u;n.textTransform==="uppercase"?d=d.toLocaleUpperCase(jd):n.textTransform==="lowercase"?d=d.toLocaleLowerCase(jd):n.textTransform==="capitalize"&&(d=od(d,"word").map(A=>od(A,"grapheme").map((O,F)=>F===0?O.toLocaleUpperCase(jd):O).join("")).join(""));let b=q(n.wordBreak,{normal:"word","break-all":"grapheme","break-word":"grapheme","keep-all":"word"},"word"),o=od(d,b),c=e.Node.create();c.setAlignItems(e.ALIGN_BASELINE),n.textAlign==="left"?c.setJustifyContent(e.JUSTIFY_FLEX_START):n.textAlign==="center"?c.setJustifyContent(e.JUSTIFY_CENTER):n.textAlign==="right"?c.setJustifyContent(e.JUSTIFY_FLEX_END):n.textAlign==="justify"&&c.setJustifyContent(e.JUSTIFY_SPACE_BETWEEN),t.insertChild(c,t.getChildCount());let{textAlign:h,textOverflow:y,whiteSpace:_,lineHeight:w,filter:G,_inheritedBackgroundClipTextPath:W}=n,N=n.fontSize,S=r.getEngine(N,w,n),H=s?o.filter(A=>!S.check(A)):[];yield H,H.length&&(S=r.getEngine(N,w,n));let T=[],k=[],X=[],K=[],Q=new Map,R=A=>{let O=0;for(let F of A){if(Q.has(F)){O+=Q.get(F);continue}let Y=S.measure(F,n);Q.set(F,Y),O+=Y}return O},$=0,v=[],p=0;for(let A of o){let O=!1,F=l&&l[A];_==="pre"?O=A[0]===`
`:_!=="nowrap"&&(F||yd.includes(A[0]))&&(O=!0),O?(_==="nowrap"?p+=R(v)+n.fontSize:($=Math.max($,R(v)),F&&($=Math.max($,n.fontSize))),v=[]):(!yd.includes(A[0])||!v.length)&&v.push(A===`
`?" ":A)}$=Math.max($,R(v)+p);let E=t.getMinWidth(),I=t.getMaxWidth(),Z=t.getWidth();isNaN(Z.value)&&(isNaN(E.value)||E.unit===1&&E.value>$)&&(isNaN(I.value)||I.unit===1&&($=Math.min($,I.value)),t.setMinWidth($)),typeof n.flexShrink=="undefined"&&t.setFlexShrink(1);let bd=_==="pre-wrap"||_==="pre";c.setMeasureFunc(A=>{let O=0,F="",Y=0,U=0,z=0,j=-1,rd=0,P=0,nd=0;T=[],X=[0];for(let td=0;td<o.length;td++){let D=o[td];if(!bd&&yd.includes(D[0]))F||(F=" "),Y=R([F]),K[td]=null;else{let fd=bd&&D===`
`,V=fd?0:l&&l[D]?n.fontSize:R([D]);U||(F="",Y=0);let B=Y||",.!?:-@)>]}%#".indexOf(D[0])<0,J=!U||!!Y;if(fd||td&&B&&U+Y+V>A&&_!=="nowrap"&&_!=="pre")T.push(U),k.push(nd),O++,rd+=P,U=V,P=V?S.glyphHeight(D):0,nd=V?S.baseline(D):0,X.push(1),j=-1,fd||(z=Math.max(z,A));else{U+=Y+V;let md=S.glyphHeight(D);md>P&&(P=md,nd=S.baseline(D)),J&&X[X.length-1]++}F="",Y=0,J&&j++,z=Math.max(z,U),K[td]={y:rd,x:U-V,width:V,line:O,lineIndex:j}}}return U&&(O++,T.push(U),k.push(nd),rd+=P),{width:z,height:rd}});let[Le,ke]=yield,Od="",Sd="",ud=f._inheritedClipPathId,{left:te,top:re,width:wd,height:ne}=c.getComputedLayout(),Fd=t.getComputedWidth()-t.getComputedPadding(e.EDGE_LEFT)-t.getComputedPadding(e.EDGE_RIGHT)-t.getComputedBorder(e.EDGE_LEFT)-t.getComputedBorder(e.EDGE_RIGHT),ld=Le+te,pd=ke+re,{matrix:dd,opacity:Td}=we({left:te,top:re,width:wd,height:ne,isInheritingTransform:a},n),hd="";n.textShadowOffset&&(hd=sd({width:wd,height:ne,id:i},{shadowColor:n.textShadowColor,shadowOffset:n.textShadowOffset,shadowRadius:n.textShadowRadius}));let Rd="",vd="",fe="",$d=-1,ie=y==="ellipsis"?R(["\u2026"]):0,Ie=y==="ellipsis"?R([" "]):0,Cd={};for(let A=0;A<o.length;A++){if(!K[A])continue;let O=K[A],F=o[A],Y=null,U=l?l[F]:null,z=O.y,j=O.x,rd=O.width,P=O.line;if(P===$d)continue;let nd=!1;if(T.length>1){let B=wd-T[P];if(h==="right"||h==="end")j+=B;else if(h==="center")j+=B/2;else if(h==="justify"&&P<T.length-1){let J=X[P];j+=(J>1?B/(J-1):0)*O.lineIndex,nd=!0}}if(Cd[P]||(Cd[P]=[j,nd?wd:T[P]]),y==="ellipsis"&&T[P]>Fd&&O.x+rd+ie+Ie>Fd){let B=od(F,"grapheme"),J="",md=0;for(let ae of B){let ce=O.x+R([J+ae]);if(J&&ce+ie>Fd)break;J+=ae,md=ce}F=J+"\u2026",$d=P,Cd[P][1]=md}let td=k[P],D=S.baseline(F),fd=S.glyphHeight(F),V=td-D;if(U?z+=0:g?(Y=S.getSVG(F,id(M({},n),{left:ld+j,top:pd+z+D+V,letterSpacing:n.letterSpacing})),m&&(fe+=x("rect",{x:ld+j,y:pd+z+V,width:O.width,height:fd,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:dd||void 0,"clip-path":ud?`url(#${ud})`:void 0})+x("line",{x1:ld+j,x2:ld+j+O.width,y1:pd+z+V+D,y2:pd+z+V+D,stroke:"#14c000","stroke-width":1,transform:dd||void 0,"clip-path":ud?`url(#${ud})`:void 0}))):z+=D+V,n.textDecorationLine&&(P!==((oe=K[A+1])==null?void 0:oe.line)||$d===P)){let B=Cd[P];B&&!B[2]&&(Rd+=zd({left:ld+B[0],top:pd+fd*+P,width:B[1],ascender:S.baseline(F),clipPathId:ud},n),B[2]=1)}if(Y!==null)vd+=Y+" ";else{let[B,J]=Ud({content:F,filter:hd,id:i,left:ld+j,top:pd+z,width:rd,height:fd,matrix:dd,opacity:Td,image:U,clipPathId:ud,debug:m,shape:!!W,decorationShape:Rd},n);Od+=B,Sd+=J,Rd=""}}if(vd){let A=n.color!=="transparent"&&Td!==0?x("path",{fill:n.color,d:vd,transform:dd||void 0,opacity:Td!==1?Td:void 0,"clip-path":ud?`url(#${ud})`:void 0,style:G?`filter:${G}`:void 0}):"";W&&(Sd=x("path",{d:vd,transform:dd||void 0})),Od+=(hd?`${hd}<g filter="url(#satori_s-${i})">`:"")+A+Rd+(hd?"</g>":"")+fe}return Sd&&(n._inheritedBackgroundClipTextPath.value+=Sd),Od}var Jd=Jd||{};Jd.parse=function(){var d={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},u="";function e(p){var E=new Error(u+": "+p);throw E.source=u,E}function n(){var p=f();return u.length>0&&e("Invalid input not EOF"),p}function f(){return w(t)}function t(){return r("linear-gradient",d.linearGradient,a)||r("repeating-linear-gradient",d.repeatingLinearGradient,a)||r("radial-gradient",d.radialGradient,l)||r("repeating-radial-gradient",d.repeatingRadialGradient,l)}function r(p,E,I){return i(E,function(Z){var bd=I();return bd&&($(d.comma)||e("Missing comma before color stops")),{type:p,orientation:bd,colorStops:w(G)}})}function i(p,E){var I=$(p);if(I){$(d.startCall)||e("Missing (");var Z=E(I);return $(d.endCall)||e("Missing )"),Z}}function a(){return m()||g()}function m(){return R("directional",d.sideOrCorner,1)}function g(){return R("angular",d.angleValue,1)}function l(){var p,E=s(),I;return E&&(p=[],p.push(E),I=u,$(d.comma)&&(E=s(),E?p.push(E):u=I)),p}function s(){var p=b()||o();if(p)p.at=h();else{var E=c();if(E){p=E;var I=h();I&&(p.at=I)}else{var Z=y();Z&&(p={type:"default-radial",at:Z})}}return p}function b(){var p=R("shape",/^(circle)/i,0);return p&&(p.style=Q()||c()),p}function o(){var p=R("shape",/^(ellipse)/i,0);return p&&(p.style=X()||c()),p}function c(){return R("extent-keyword",d.extentKeywords,1)}function h(){if(R("position",/^at/,0)){var p=y();return p||e("Missing positioning value"),p}}function y(){var p=_();if(p.x||p.y)return{type:"position",value:p}}function _(){return{x:X(),y:X()}}function w(p){var E=p(),I=[];if(E)for(I.push(E);$(d.comma);)E=p(),E?I.push(E):e("One extra comma");return I}function G(){var p=W();return p||e("Expected color definition"),p.length=X(),p}function W(){return S()||T()||H()||N()}function N(){return R("literal",d.literalColor,0)}function S(){return R("hex",d.hexColor,1)}function H(){return i(d.rgbColor,function(){return{type:"rgb",value:w(k)}})}function T(){return i(d.rgbaColor,function(){return{type:"rgba",value:w(k)}})}function k(){return $(d.number)[1]}function X(){return R("%",d.percentageValue,1)||K()||Q()}function K(){return R("position-keyword",d.positionKeywords,1)}function Q(){return R("px",d.pixelValue,1)||R("em",d.emValue,1)}function R(p,E,I){var Z=$(E);if(Z)return{type:p,value:Z[I]}}function $(p){var E,I;return I=/^[\n\r\t\s]+/.exec(u),I&&v(I[0].length),E=p.exec(u),E&&v(E[0].length),E}function v(p){u=u.substr(p)}return function(p){return u=p.toString(),n()}}();var qd=Jd;function cu(d){return d.type==="literal"?d.value:d.type==="hex"?`#${d.value}`:d.type==="rgb"?`rgb(${d.value.join(",")})`:d.type==="rgba"?`rgba(${d.value.join(",")})`:"transparent"}function su(d,u){return typeof d=="string"&&d.endsWith("%")?u*parseFloat(d)/100:+d}function Te(d,{x:u,y:e,defaultX:n,defaultY:f}){return(d?d.split(" ").map(t=>{try{let r=new ad(t);return r.type==="length"||r.type==="number"?r.value:r.value+r.unit}catch{return null}}).filter(t=>t!==null):[n,f]).map((t,r)=>su(t,[u,e][r]))}function Re(d,u){let e=[];for(let r of u){let i=cu(r);if(!e.length&&(e.push({offset:0,color:i}),typeof r.length=="undefined"||r.length.value==="0"))continue;let a=typeof r.length=="undefined"?void 0:r.length.type==="%"?r.length.value/100:r.length.value/d;e.push({offset:a,color:i})}e.length||e.push({offset:0,color:"transparent"});let n=e[e.length-1];n.offset!==1&&(typeof n.offset=="undefined"?n.offset=1:e.push({offset:1,color:n.color}));let f=0,t=1;for(let r=0;r<e.length;r++)if(typeof e[r].offset=="undefined"){for(t<r&&(t=r);typeof e[t].offset=="undefined";)t++;e[r].offset=(e[t].offset-e[f].offset)/(t-f)*(r-f)+e[f].offset}else f=r;return e}function Kd({id:d,width:u,height:e},{image:n,size:f,position:t,repeat:r}){r=r||"repeat";let i=r==="repeat-x"||r==="repeat",a=r==="repeat-y"||r==="repeat",m=Te(f,{x:u,y:e,defaultX:u,defaultY:e}),g=Te(t,{x:u,y:e,defaultX:0,defaultY:0});if(n.startsWith("linear-gradient(")){let l=qd.parse(n)[0],s,b,o,c;if(l.orientation.type==="directional")[s,b,o,c]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[l.orientation.value];else if(l.orientation.type==="angular"){let y=+l.orientation.value/180*Math.PI-Math.PI/2,_=Math.cos(y),w=Math.sin(y);s=0,b=0,o=_,c=w,o<0&&(s-=o,o=0),c<0&&(b-=c,c=0)}let h=Re(u,l.colorStops);return[`satori_bi${d}`,`<linearGradient id="satori_bi${d}" x1="${s}" y1="${b}" x2="${o}" y2="${c}">${h.map(y=>`<stop offset="${y.offset*100}%" stop-color="${y.color}"/>`).join("")}</linearGradient>`]}if(n.startsWith("radial-gradient(")){let l=qd.parse(n)[0],s=l.orientation[0],[b,o]=m,c="circle",h=b/2,y=o/2;if(s.type==="shape"){if(c=s.value,s.at)if(s.at.type==="position")h=s.at.value.x.value,y=s.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+s.at.type)}else throw new Error("orientation.type not implemented: "+s.type);let _=Re(u,l.colorStops),w=`satori_radial_${d}`,G=`satori_pattern_${d}`,W={},N=Math.max(Math.abs(b-h),Math.abs(h)),S=Math.max(Math.abs(o-y),Math.abs(y));if(c==="circle")W.r=Math.sqrt(N*N+S*S);else if(c==="ellipse"){let k=S!==0?N/S:1;W.ry=Math.sqrt(N*N+S*S*k*k)/k,W.rx=W.ry*k}let H=x("pattern",{id:G,x:g[0],y:g[1],width:i?b:"100%",height:a?o:"100%",patternUnits:"userSpaceOnUse"},x("radialGradient",{id:w},_.map(k=>x("stop",{offset:k.offset,"stop-color":k.color})).join(""))+x(c,id(M({cx:h,cy:y,width:b,height:o},W),{fill:`url(#${w})`})));return[G,H]}if(n.startsWith("url(")){let l=n.slice(4,-1);return[`satori_bi${d}`,x("pattern",{id:`satori_bi${d}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0],y:g[1],width:i?m[0]:"100%",height:a?m[1]:"100%"},x("image",{x:0,y:0,width:m[0],height:m[1],href:l}))]}}function Id(d,u,e){return e<d+u&&(e/2<d&&e/2<u?d=u=e/2:e/2<d?d=e-u:e/2<u&&(u=e-d)),[d,u]}function Ed({left:d,top:u,width:e,height:n},f){let{borderTopLeftRadius:t,borderTopRightRadius:r,borderBottomLeftRadius:i,borderBottomRightRadius:a}=f;return t=Math.min(t||0,e,n),r=Math.min(r||0,e,n),i=Math.min(i||0,e,n),a=Math.min(a||0,e,n),!t&&!r&&!i&&!a?"":([t,r]=Id(t,r,e),[t,i]=Id(t,i,n),[r,a]=Id(r,a,n),[i,a]=Id(i,a,e),`M${d+t},${u} h${e-t-r} a${r},${r} 0 0 1 ${r},${r} v${n-r-a} a${a},${a} 0 0 1 ${-a},${a} h${a+i-e} a${i},${i} 0 0 1 ${-i},${-i} v${i+t-n} a${t},${t} 0 0 1 ${t},${-t}`)}function Zd({left:d,top:u,width:e,height:n,path:f,id:t},r){return r.overflow!=="hidden"?"":f?x("clipPath",{id:`satori_cp-${t}`,"clip-path":r._inheritedClipPathId?`url(#${r._inheritedClipPathId})`:void 0},x("path",{x:d,y:u,width:e,height:n,d:f})):x("clipPath",{id:`satori_cp-${t}`,"clip-path":r._inheritedClipPathId?`url(#${r._inheritedClipPathId})`:void 0},x("rect",{x:d,y:u,width:e,height:n}))}function Qd({id:d,left:u,top:e,width:n,height:f,isInheritingTransform:t,debug:r},i){if(i.display==="none")return"";let a="rect",m="transparent",g=0,l="",s="",b=[],o=1,c="";i.backgroundColor&&b.push(i.backgroundColor),i.borderWidth&&(g=i.borderWidth,m=i.borderColor),i.opacity&&(o=+i.opacity),i.transform&&(l=cd({left:u,top:e,width:n,height:f},i.transform,t,i.transformOrigin));let h="";if(i.backgroundImage){let H=i.backgroundImage.map((T,k)=>Kd({id:d+"_"+k,width:n,height:f},T)).filter(Boolean);for(let T of H)b.push(`url(#${T[0]})`),s+=T[1],T[2]&&(h+=T[2])}let y=Ed({left:u,top:e,width:n,height:f},i);y&&(a="path");let _=Zd({left:u,top:e,width:n,height:f,path:y,id:d},i),w=i._inheritedClipPathId,G=sd({width:n,height:f,id:d},i);r&&(c=x("rect",{x:u,y:e,width:n,height:f,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:l||void 0,"clip-path":w?`url(#${w})`:void 0})),b.length||b.push("transparent");let{backgroundClip:W,filter:N}=i,S=b.map((H,T)=>{if(H==="transparent"&&!(T===b.length-1&&g))return"";let k=T===b.length-1&&g&&W!=="text";return x(a,{x:u,y:e,width:n,height:f,fill:H,stroke:k?m:void 0,"stroke-width":k?g:void 0,d:y||void 0,transform:l||void 0,"clip-path":W==="text"?`url(#satori_bct-${d})`:w?`url(#${w})`:void 0,style:N?`filter:${N}`:void 0})}).join("");return W==="text"&&g&&(S=x(a,{x:u,y:e,width:n,height:f,fill:"transparent",stroke:m,"stroke-width":g,d:y||void 0,transform:l||void 0,"clip-path":w?`url(#${w})`:void 0})+S),(s?`<defs>${s}</defs>`:"")+_+(G?`${G}<g filter="url(#satori_s-${d})">`:"")+(o!==1?`<g opacity="${o}">`:"")+(h||S)+(o!==1?"</g>":"")+(G?"</g>":"")+c}function de({id:d,left:u,top:e,width:n,height:f,src:t,debug:r,isInheritingTransform:i},a){if(a.display==="none")return"";let m="",g=1,l="",s=a.objectFit==="contain"?"xMidYMid":a.objectFit==="cover"?"xMidYMid slice":"none",b=Ed({left:u,top:e,width:n,height:f},a),o=a._inheritedClipPathId;b&&(m=x("clipPath",{id:`satori_c-${d}`,"clip-path":o?`url(#${o})`:void 0},x("path",{x:u,y:e,width:n,height:f,d:b}))),a.opacity&&(g=+a.opacity);let c=sd({width:n,height:f,id:d},a);return a.transform&&(l=cd({left:u,top:e,width:n,height:f},a.transform,i,a.transformOrigin)),c+(c?`<g filter="url(#satori_s-${d})">`:"")+m+x("image",{x:u,y:e,width:n,height:f,href:t,preserveAspectRatio:s,transform:l||void 0,"clip-path":m?`url(#satori_c-${d})`:o?`url(#${o})`:void 0})+(c?"</g>":"")}function*_d(d,u){let e=ed(),{id:n,inheritedStyle:f,parent:t,font:r,debug:i,embedFont:a=!0,graphemeImages:m,canLoadAdditionalAssets:g}=u;if(d===null||typeof d=="undefined")return yield,yield,"";if(!Wd(d)||typeof d.type=="function"){let v;if(!Wd(d))v=Vd(String(d),u),yield v.next().value;else{if(me(d.type))throw new Error("Class component is not supported.");v=_d(d.type(d.props),u),yield v.next().value}v.next();let p=yield;return v.next(p).value}let{type:l,props:s}=d,{style:b,children:o}=s,c=e.Node.create();t.insertChild(c,t.getChildCount());let[h,y]=Xd(c,l,f,b,s),_=h.transform===f.transform;if(_||(h.transform.__parent=f.transform),h.overflow==="hidden"&&(y._inheritedClipPathId=`satori_cp-${n}`),h.backgroundClip==="text"){let v={value:""};y._inheritedBackgroundClipTextPath=v,h._inheritedBackgroundClipTextPath=v}let w=typeof o=="undefined"?[]:[].concat(o),G=[],W=0,N=[];for(let v of w){let p=_d(v,{id:n+"-"+W++,parentStyle:h,inheritedStyle:y,isInheritingTransform:!0,parent:c,font:r,embedFont:a,debug:i,graphemeImages:m,canLoadAdditionalAssets:g});g?N.push(...p.next().value||[]):p.next(),G.push(p)}yield N;for(let v of G)v.next();let[S,H]=yield;h.position==="absolute"&&c.calculateLayout();let{left:T,top:k,width:X,height:K}=c.getComputedLayout();T+=S,k+=H;let Q="",R="",$="";l==="img"?R=de({id:n,left:T,top:k,width:X,height:K,src:s.src,isInheritingTransform:_,debug:i},h):R=Qd({id:n,left:T,top:k,width:X,height:K,isInheritingTransform:_,debug:i},h);for(let v of G)Q+=v.next([T,k]).value;return h._inheritedBackgroundClipTextPath&&($+=x("clipPath",{id:`satori_bct-${n}`,"clip-path":h._inheritedClipPathId?`url(#${h._inheritedClipPathId})`:void 0},h._inheritedBackgroundClipTextPath.value)),$+R+Q}import lu from"@shuding/opentype.js";function pu(d,u,[e,n],[f,t]){if(e!==f)return e?!f||e===d?-1:f===d?1:d===400&&e===500||d===500&&e===400?-1:d===400&&f===500||d===500&&f===400?1:d<400?e<d&&f<d?f-e:e<d?-1:f<d?1:e-f:d<e&&d<f?e-f:d<e?-1:d<f?1:f-e:1;if(n!==t){if(n===u)return-1;if(t===u)return 1}return-1}var Ad=class{constructor(u){this.fonts=new Map;this.addFonts(u)}get({name:u,weight:e,style:n}){if(!this.fonts.has(u))return null;e==="normal"&&(e=400),e==="bold"&&(e=700);let f=[...this.fonts.get(u)],t=f[0];for(let r=1;r<f.length;r++){let[,i,a]=t,[,m,g]=f[r];pu(e,n,[i,a],[m,g])>0&&(t=f[r])}return t[0]}addFonts(u){for(let e of u){let n=e.data,f=lu.parse("buffer"in n?n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength):n,{lowMemory:!0}),t=f.charToGlyphIndex;f.charToGlyphIndex=i=>{let a=t.call(f,i);return a===0&&f._trackBrokenChars&&f._trackBrokenChars.push(i),a},this.defaultFont||(this.defaultFont=f);let r=e.name.toLowerCase();this.fonts.has(r)||this.fonts.set(r,[]),this.fonts.get(r).push([f,e.weight,e.style])}}getEngine(u=16,e=1.2,{fontFamily:n,fontWeight:f=400,fontStyle:t="normal"}){n=Array.isArray(n)?n:[n];let r=n.map(o=>this.get({name:o,weight:f,style:t})).filter(Boolean),i=Array.from(this.fonts.keys());for(let o of i)n.includes(o)||r.push(this.get({name:o,weight:f,style:t}));let a=new Map,m=(o,c=!0)=>{let h=o.charCodeAt(0);if(a.has(h))return a.get(h);let y=r.find((_,w)=>!!_.charToGlyphIndex(o)||c&&w===r.length-1);return y&&a.set(h,y),y},g=(o,c=!1)=>{var y,_;return((c?(_=(y=o.tables)==null?void 0:y.os2)==null?void 0:_.sTypoAscender:0)||o.ascender)/o.unitsPerEm*u},l=(o,c=!1)=>{var y,_;return((c?(_=(y=o.tables)==null?void 0:y.os2)==null?void 0:_.sTypoDescender:0)||o.descender)/o.unitsPerEm*u},s=o=>m(o,!1),b={check:o=>{let c=s(o);return c?(c._trackBrokenChars=[],c.stringToGlyphs(o),c._trackBrokenChars.length?(c._trackBrokenChars=void 0,!1):!0):!1},baseline:(o,c=typeof o=="undefined"?r[0]:m(o))=>{let h=g(c,!0),y=l(c,!0),_=h-y,w=b.glyphHeight(o,c),G=(w-_)/2,{yMax:W,yMin:N}=c.tables.head,S=W/(W-N);return G+S*w},glyphHeight:(o,c=typeof o=="undefined"?r[0]:m(o))=>(g(c)-l(c))*e/1.2,measure:(o,c)=>this.measure(m,o,c),getSVG:(o,c)=>this.getSVG(m,o,c)};return b}patchFontFallbackResolver(u,e){let n=[];u._trackBrokenChars=n;let f=u.stringToGlyphs;return u.stringToGlyphs=(t,...r)=>{let i=f.call(u,t,...r);for(let a=0;a<i.length;a++)if(i[a].unicode===void 0){let m=n.shift(),g=e(m);g!==u&&(i[a]=g.charToGlyph(m))}return i},()=>{u.stringToGlyphs=f,u._trackBrokenChars=void 0}}measure(u,e,{fontSize:n,letterSpacing:f=0}){let t=u(e),r=this.patchFontFallbackResolver(t,u);try{return t.getAdvanceWidth(e,n,{letterSpacing:f/n})}finally{r()}}getSVG(u,e,{fontSize:n,top:f,left:t,letterSpacing:r=0}){let i=u(e),a=this.patchFontFallbackResolver(i,u);try{return i.getPath(e,t,f,n,{letterSpacing:r/n}).toPathData(1)}finally{a()}}};function ee({width:d,height:u,content:e}){return x("svg",{width:d,height:u,viewBox:`0 0 ${d} ${u}`,xmlns:"http://www.w3.org/2000/svg"},e)}var mu=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g;function ve(d){return d.match(mu)}var ue=new WeakMap;async function Ce(d,u){let e=ed();if(!e)throw new Error("Satori is not initialized.");let n;ue.has(u.fonts)?n=ue.get(u.fonts):ue.set(u.fonts,n=new Ad(u.fonts));let f=e.Node.create();f.setWidth(u.width),f.setHeight(u.height),f.setFlexDirection(e.FLEX_DIRECTION_ROW),f.setFlexWrap(e.WRAP_WRAP),f.setAlignContent(e.ALIGN_AUTO),f.setAlignItems(e.ALIGN_FLEX_START),f.setJustifyContent(e.JUSTIFY_FLEX_START),f.setOverflow(e.OVERFLOW_HIDDEN);let t=M({},u.graphemeImages),r=_d(d,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:u.width,_viewportHeight:u.height},parent:f,font:n,embedFont:u.embedFont,debug:u.debug,graphemeImages:t,canLoadAdditionalAssets:!!u.loadAdditionalAsset}),i=r.next().value;if(u.loadAdditionalAsset&&i.length){i=Array.from(new Set(od(i.join(""),"grapheme")));let m={};i.forEach(s=>gu.detect(s,b=>{b==="unknown"&&ve(s)&&(b="emoji"),m[b]=m[b]||[],b==="emoji"?m[b].push(s):m[b][0]=(m[b][0]||"")+s}));let g=[],l={};await Promise.all(Object.entries(m).flatMap(([s,b])=>b.map(o=>u.loadAdditionalAsset(s,o).then(c=>{typeof c=="string"?l[o]=c:c&&g.push(c)})))),n.addFonts(g),Object.assign(t,l)}r.next(),f.calculateLayout(u.width,u.height,e.DIRECTION_LTR);let a=r.next([0,0]).value;return f.freeRecursive(),ee({width:u.width,height:u.height,content:a})}export{Ce as default,Ne as init};
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
//# sourceMappingURL=index.js.map

@@ -1,5 +0,6 @@

var At=Object.defineProperty,kt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var dt=Object.getOwnPropertySymbols;var $t=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable;var ct=(e,r,t)=>r in e?At(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,G=(e,r)=>{for(var t in r||(r={}))$t.call(r,t)&&ct(e,t,r[t]);if(dt)for(var t of dt(r))Ft.call(r,t)&&ct(e,t,r[t]);return e},se=(e,r)=>kt(e,Ot(r));import{guessLanguage as cr}from"guesslanguage";var pt={};var Pe;Pe=pt.default;function Pt(e){Pe=e}function te(){return Pe}import{LineBreaker as Wt}from"css-line-break";import{splitGraphemes as Nt}from"text-segmentation";function We(e){let r=typeof e;return!(r==="number"||r==="bigint"||r==="string"||r==="boolean")}function mt(e){return/^class\s/.test(Function.prototype.toString.call(e))}function ge(e,r){return[e[0]*r[0]+e[2]*r[1],e[1]*r[0]+e[3]*r[1],e[0]*r[2]+e[2]*r[3],e[1]*r[2]+e[3]*r[3],e[0]*r[4]+e[2]*r[5]+e[4],e[1]*r[4]+e[3]*r[5]+e[5]]}function q(e,r,t){let i=r[e];return typeof i=="undefined"?t:i}var gt=void 0,Ne=typeof Intl!="undefined"&&"Segmenter"in Intl&&process.env.NODE_ENV!=="test",Mt=Ne?new Intl.Segmenter(gt,{granularity:"word"}):null,Gt=Ne?new Intl.Segmenter(gt,{granularity:"grapheme"}):null,ye=[32,160,4961,65792,65793,4153,4241,10].map(e=>String.fromCodePoint(e)),Dt=e=>{let r=Wt(e,{lineBreak:"strict",wordBreak:"normal"}),t=[],i;for(;!(i=r.next()).done;)if(i.value){let a=i.value.slice(),n="";for(let o=0;o<a.length;o++){let s=a[o];ye.includes(s)?(n.length&&t.push(n),t.push(s),n=""):n+=s}n.length&&t.push(n)}return t};function le(e,r){return Ne?r==="word"?[...Mt.segment(e)].map(t=>t.segment):[...Gt.segment(e)].map(t=>t.segment):r==="word"?Dt(e):Nt(e)}function y(e,r,t){let i="";for(let[a,n]of Object.entries(r))typeof n!="undefined"&&(i+=` ${a}="${n}"`);return t?`<${e}${i}>${t}</${e}>`:`<${e}${i}/>`}var ht={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var Bt=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedBackgroundClipTextPath"]);function Me(e){let r={};for(let t in e)Bt.has(t)&&(r[t]=e[t]);return r}import{getPropertyName as tr,getStylesForProperty as rr}from"css-to-react-native";import{parseElementStyle as nr}from"css-background-parser";var xe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Yt=xe((e,r)=>{r.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),Ht=xe((e,r)=>{r.exports=["deg","grad","rad","turn"]}),Xt=xe((e,r)=>{r.exports=["dpi","dpcm","dppx"]}),Ut=xe((e,r)=>{r.exports=["Hz","kHz"]}),zt=xe((e,r)=>{r.exports=["s","ms"]}),Vt=Yt(),bt=Ht(),yt=Xt(),xt=Ut(),Et=zt();function De(e){if(/\.\D?$/.test(e))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(e))throw new Error("Only one leading +/- is allowed");if(jt(e)>1)throw new Error("Only one dot is allowed");if(/%$/.test(e)){this.type="percentage",this.value=Ge(e),this.unit="%";return}var r=qt(e);if(!r){this.type="number",this.value=Ge(e);return}this.type=Zt(r),this.value=Ge(e.substr(0,e.length-r.length)),this.unit=r}De.prototype.valueOf=function(){return this.value};De.prototype.toString=function(){return this.value+(this.unit||"")};function fe(e){return new De(e)}function jt(e){var r=e.match(/\./g);return r?r.length:0}function Ge(e){var r=parseFloat(e);if(isNaN(r))throw new Error("Invalid number: "+e);return r}var Jt=[].concat(bt,xt,Vt,yt,Et);function qt(e){var r=e.match(/\D+$/),t=r&&r[0];if(t&&Jt.indexOf(t)===-1)throw new Error("Invalid unit: "+t);return t}var Kt=Object.assign(Ce(bt,"angle"),Ce(xt,"frequency"),Ce(yt,"resolution"),Ce(Et,"time"));function Ce(e,r){return Object.fromEntries(e.map(t=>[t,r]))}function Zt(e){return Kt[e]||"length"}import Qt from"postcss-value-parser";function er(e,r){try{let t=new fe(e);switch(t.unit){case"px":return{absolute:t.value};case"em":return{absolute:t.value*r};case"rem":return{absolute:t.value*16};case"%":return{relative:t.value};default:return{}}}catch{return{}}}function Be(e,r,t){switch(e){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:let i=er(e,r);return i.absolute?{[t?"xAbsolute":"yAbsolute"]:i.absolute}:i.relative?{[t?"xRelative":"yRelative"]:i.relative}:{}}}function Ye(e,r){if(typeof e=="number")return{xAbsolute:e};let t;try{t=Qt(e).nodes.filter(i=>i.type==="word").map(i=>i.value)}catch{return{}}return t.length===1?Be(t[0],r,!0):t.length===2?((t[0]==="top"||t[0]==="bottom"||t[1]==="left"||t[1]==="right")&&t.reverse(),G(G({},Be(t[0],r,!0)),Be(t[1],r,!1))):{}}var ir=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),or=new Set(["lineHeight"]),St=[1,0,0,1,0,0];function ar(e,r,t,i){return e==="border"&&!t.includes(r.borderColor)?r.borderColor=i:e==="textDecoration"&&!t.includes(r.textDecorationColor)&&(r.textDecorationColor=i),r}function _t(e,r){return typeof r=="number"?ir.has(e)?or.has(e)?r:String(r):r+"px":r}function sr(e,r){return e==="lineHeight"?{lineHeight:_t(e,r)}:e==="fontFamily"?{fontFamily:r.split(",").map(t=>t.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())}:null}function He(e,r,t,{percentage:i}={percentage:!1}){if(typeof e=="number")return e;try{let a=new fe(e);if(a.type==="length")switch(a.unit){case"em":return a.value*r;case"rem":return a.value*16;case"vw":return~~(a.value*t._viewportWidth/100);case"vh":return~~(a.value*t._viewportHeight/100);default:return a.value}else if(a.type==="angle")switch(a.unit){case"deg":return a.value;case"rad":return a.value*180/Math.PI;default:return a.value}else if(a.type==="percentage"&&i)return a.value/100*r}catch{}}function Ie(e,r){let t={};for(let a in e){if(a.startsWith("_")){t[a]=e[a];continue}let n=tr(a);Object.assign(t,sr(n,e[a])||ar(n,rr(n,_t(n,e[a]),!0),e[a],e.color||r.color))}if(t.backgroundImage){let{backgrounds:a}=nr(t);t.backgroundImage=a}let i=t.fontSize||r.fontSize;if(typeof i=="string")try{let a=new fe(i);switch(a.unit){case"em":i=a.value*r.fontSize;break;case"rem":i=a.value*16;break}}catch{i=16}typeof t.fontSize!="undefined"&&(t.fontSize=i),t.transformOrigin&&(t.transformOrigin=Ye(t.transformOrigin,i));for(let a in t){let n=t[a];if(a==="lineHeight")typeof n=="string"&&(n=t[a]=He(n,i,r,{percentage:!0})/i);else if(typeof n=="string"){let o=He(n,i,r);typeof o!="undefined"&&(t[a]=o),n=t[a]}if(a==="opacity"&&(n=t[a]=n*r.opacity),a==="transform"){let o=[...St],s=n;for(let f of s){let h=Object.keys(f)[0],g=f[h],p=typeof g=="string"?He(g,i,r):g,l=[...St];switch(h){case"translateX":l[4]=p;break;case"translateY":l[5]=p;break;case"scale":l[0]=p,l[3]=p;break;case"scaleX":l[0]=p;break;case"scaleY":l[3]=p;break;case"rotate":let c=p*Math.PI/180,u=Math.cos(c),d=Math.sin(c);l[0]=u,l[1]=d,l[2]=-d,l[3]=u;break;case"skewX":l[2]=Math.tan(p*Math.PI/180);break;case"skewY":l[1]=Math.tan(p*Math.PI/180);break}o=ge(l,o)}t.transform=o}}return t}function Xe(e,r,t,i,a){let n=te(),o=G(G(G({},t),Ie(ht[r],t)),Ie(i,t));if(r==="img"){let s=parseInt(a.width),h=parseInt(a.height)/s;o.width||(o.width=s),o.height||(o.height=h*o.width)}return e.setDisplay(q(o.display,{flex:n.DISPLAY_FLEX,none:n.DISPLAY_NONE},n.DISPLAY_FLEX)),e.setAlignContent(q(o.alignContent,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,"space-between":n.ALIGN_SPACE_BETWEEN,"space-around":n.ALIGN_SPACE_AROUND,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),e.setAlignItems(q(o.alignItems,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_FLEX_START)),e.setAlignSelf(q(o.alignSelf,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),e.setJustifyContent(q(o.justifyContent,{center:n.JUSTIFY_CENTER,"flex-start":n.JUSTIFY_FLEX_START,"flex-end":n.JUSTIFY_FLEX_END,"space-between":n.JUSTIFY_SPACE_BETWEEN,"space-around":n.JUSTIFY_SPACE_AROUND},n.JUSTIFY_FLEX_START)),e.setFlexDirection(q(o.flexDirection,{row:n.FLEX_DIRECTION_ROW,column:n.FLEX_DIRECTION_COLUMN,"row-reverse":n.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":n.FLEX_DIRECTION_COLUMN_REVERSE},n.FLEX_DIRECTION_ROW)),e.setFlexWrap(q(o.flexWrap,{wrap:n.WRAP_WRAP,nowrap:n.WRAP_NO_WRAP,"wrap-reverse":n.WRAP_WRAP_REVERSE},n.WRAP_WRAP)),typeof o.flexBasis!="undefined"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow=="undefined"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink=="undefined"?0:o.flexShrink),typeof o.maxHeight!="undefined"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth!="undefined"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight!="undefined"&&e.setMinHeight(o.minHeight),typeof o.minWidth!="undefined"&&e.setMinWidth(o.minWidth),e.setOverflow(q(o.overflow,{visible:n.OVERFLOW_VISIBLE,hidden:n.OVERFLOW_HIDDEN},n.OVERFLOW_VISIBLE)),e.setMargin(n.EDGE_TOP,o.marginTop||0),e.setMargin(n.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(n.EDGE_LEFT,o.marginLeft||0),e.setMargin(n.EDGE_RIGHT,o.marginRight||0),e.setBorder(n.EDGE_TOP,o.borderWidth||0),e.setBorder(n.EDGE_BOTTOM,o.borderWidth||0),e.setBorder(n.EDGE_LEFT,o.borderWidth||0),e.setBorder(n.EDGE_RIGHT,o.borderWidth||0),e.setPadding(n.EDGE_TOP,o.paddingTop||0),e.setPadding(n.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(n.EDGE_LEFT,o.paddingLeft||0),e.setPadding(n.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(q(o.position,{absolute:n.POSITION_TYPE_ABSOLUTE,relative:n.POSITION_TYPE_RELATIVE},n.POSITION_TYPE_RELATIVE)),typeof o.top!="undefined"&&e.setPosition(n.EDGE_TOP,o.top),typeof o.bottom!="undefined"&&e.setPosition(n.EDGE_BOTTOM,o.bottom),typeof o.left!="undefined"&&e.setPosition(n.EDGE_LEFT,o.left),typeof o.right!="undefined"&&e.setPosition(n.EDGE_RIGHT,o.right),typeof o.height!="undefined"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width!="undefined"?e.setWidth(o.width):e.setWidthAuto(),[o,Me(o)]}function ue({left:e,top:r,width:t,height:i},a,n,o){var f,h,g,p;let s;if(n)s=a;else{let l=(h=o==null?void 0:o.xAbsolute)!=null?h:((f=o==null?void 0:o.xRelative)!=null?f:50)*t/100,c=(p=o==null?void 0:o.yAbsolute)!=null?p:((g=o==null?void 0:o.yRelative)!=null?g:50)*i/100,u=e+l,d=r+c;s=ge([1,0,0,1,u,d],ge(a,[1,0,0,1,-u,-d])),a.__parent&&(s=ge(a.__parent,s)),a.splice(0,6,...s)}return`matrix(${s.map(l=>l.toFixed(2)).join(",")})`}function wt({left:e,top:r,width:t,height:i,isInheritingTransform:a},n){let o="",s=1;return n.transform&&(o=ue({left:e,top:r,width:t,height:i},n.transform,a,n.transformOrigin)),n.opacity&&(s=+n.opacity),{matrix:o,opacity:s}}function Ue({id:e,content:r,filter:t,left:i,top:a,width:n,height:o,matrix:s,opacity:f,image:h,clipPathId:g,debug:p,shape:l,decorationShape:c},u){let d="";if(p&&(d=y("rect",{x:i,y:a-o,width:n,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0})),h){let x={href:h,x:i,y:a,width:n,height:o,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0,style:u.filter?`filter:${u.filter}`:void 0};return[(t?`${t}<g filter="url(#satori_s-${e})">`:"")+y("image",se(G({},x),{opacity:f!==1?f:void 0}))+(c||"")+(t?"</g>":"")+d,""]}let b={x:i,y:a,width:n,height:o,"font-weight":u.fontWeight,"font-style":u.fontStyle,"font-size":u.fontSize,"font-family":u.fontFamily,"letter-spacing":u.letterSpacing||void 0,transform:s||void 0,"clip-path":g?`url(#${g})`:void 0,style:u.filter?`filter:${u.filter}`:void 0};return[(t?`${t}<g filter="url(#satori_s-${e})">`:"")+y("text",se(G({},b),{fill:u.color,opacity:f!==1?f:void 0}),r)+(c||"")+(t?"</g>":"")+d,l?y("text",b,r):""]}function de({id:e,width:r,height:t},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let a=i.shadowRadius*i.shadowRadius/4,n=Math.min(i.shadowOffset.width-a,0),o=Math.max(i.shadowOffset.width+a+r,r),s=Math.min(i.shadowOffset.height-a,0),f=Math.max(i.shadowOffset.height+a+t,t);return`<defs><filter id="satori_s-${e}" x="${n/r*100}%" y="${s/t*100}%" width="${(o-n)/r*100}%" height="${(f-s)/t*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius/2}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function ze({width:e,left:r,top:t,ascender:i,clipPathId:a},n){let{textDecorationColor:o,textDecorationStyle:s,textDecorationLine:f,fontSize:h}=n;if(!f||f==="none")return"";let g=Math.max(1,h*.1),p=f==="line-through"?t+i*.5:f==="underline"?t+i*1.1:t,l=s==="dashed"?`${g*1.2} ${g*2}`:s==="dotted"?`0 ${g*2}`:void 0;return y("line",{x1:r,y1:p,x2:r+e,y2:p,stroke:o,"stroke-width":g,"stroke-dasharray":l,"stroke-linecap":s==="dotted"?"round":"square","clip-path":a?`url(#${a})`:void 0})}var Ve=void 0;function*je(e,r){var lt;let t=te(),{parentStyle:i,inheritedStyle:a,parent:n,font:o,id:s,isInheritingTransform:f,debug:h,embedFont:g,graphemeImages:p,canLoadAdditionalAssets:l}=r;i.textTransform==="uppercase"?e=e.toLocaleUpperCase(Ve):i.textTransform==="lowercase"?e=e.toLocaleLowerCase(Ve):i.textTransform==="capitalize"&&(e=le(e,"word").map(C=>le(C,"grapheme").map((I,A)=>A===0?I.toLocaleUpperCase(Ve):I).join("")).join(""));let c=q(i.wordBreak,{normal:"word","break-all":"grapheme","break-word":"grapheme","keep-all":"word"},"word"),u=le(e,c),d=t.Node.create();d.setAlignItems(t.ALIGN_BASELINE),i.textAlign==="left"?d.setJustifyContent(t.JUSTIFY_FLEX_START):i.textAlign==="center"?d.setJustifyContent(t.JUSTIFY_CENTER):i.textAlign==="right"?d.setJustifyContent(t.JUSTIFY_FLEX_END):i.textAlign==="justify"&&d.setJustifyContent(t.JUSTIFY_SPACE_BETWEEN),n.insertChild(d,n.getChildCount());let{textAlign:b,textOverflow:x,whiteSpace:F,lineHeight:v,filter:N,_inheritedBackgroundClipTextPath:W}=i,M=i.fontSize,S=o.getEngine(M,v,i),H=l?u.filter(C=>!S.resolve(C)):[];yield H,H.length&&(S=o.getEngine(M,v,i));let _=[],T=[],X=[],K=[],Q=new Map,w=C=>{let I=0;for(let A of C){if(Q.has(A)){I+=Q.get(A);continue}let Y=S.measure(A,i);Q.set(A,Y),I+=Y}return I},$=0,R=[],m=0;for(let C of u){let I=!1,A=p&&p[C];F==="pre"?I=C[0]===`
`:F!=="nowrap"&&(A||ye.includes(C[0]))&&(I=!0),I?(F==="nowrap"?m+=w(R)+i.fontSize:($=Math.max($,w(R)),A&&($=Math.max($,i.fontSize))),R=[]):(!ye.includes(C[0])||!R.length)&&R.push(C===`
`?" ":C)}$=Math.max($,w(R)+m);let E=n.getMinWidth(),L=n.getMaxWidth(),Z=n.getWidth();isNaN(Z.value)&&(isNaN(E.value)||E.unit===1&&E.value>$)&&(isNaN(L.value)||L.unit===1&&($=Math.min($,L.value)),n.setMinWidth($)),typeof i.flexShrink=="undefined"&&n.setFlexShrink(1);let he=F==="pre-wrap"||F==="pre";d.setMeasureFunc(C=>{let I=0,A="",Y=0,U=0,z=0,V=-1,ie=0,P=0,oe=0;_=[],X=[0];for(let ne=0;ne<u.length;ne++){let D=u[ne];if(!he&&ye.includes(D[0]))A||(A=" "),Y=w([A]),K[ne]=null;else{let ae=he&&D===`
`,j=ae?0:p&&p[D]?i.fontSize:w([D]);U||(A="",Y=0);let B=Y||",.!?:-@)>]}%#".indexOf(D[0])<0,J=!U||!!Y;if(ae||ne&&B&&U+Y+j>C&&F!=="nowrap"&&F!=="pre")_.push(U),T.push(oe),I++,ie+=P,U=j,P=j?S.glyphHeight(D):0,oe=j?S.baseline(D):0,X.push(1),V=-1,ae||(z=Math.max(z,C));else{U+=Y+j;let me=S.glyphHeight(D);me>P&&(P=me,oe=S.baseline(D)),J&&X[X.length-1]++}A="",Y=0,J&&V++,z=Math.max(z,U),K[ne]={y:ie,x:U-j,width:j,line:I,lineIndex:V}}}return U&&(I++,_.push(U),T.push(oe),ie+=P),{width:z,height:ie}});let[Lt,Ct]=yield,Oe="",_e="",re=a._inheritedClipPathId,{left:nt,top:it,width:we,height:ot}=d.getComputedLayout(),$e=n.getComputedWidth()-n.getComputedPadding(t.EDGE_LEFT)-n.getComputedPadding(t.EDGE_RIGHT)-n.getComputedBorder(t.EDGE_LEFT)-n.getComputedBorder(t.EDGE_RIGHT),ce=Lt+nt,pe=Ct+it,{matrix:ee,opacity:Re}=wt({left:nt,top:it,width:we,height:ot,isInheritingTransform:f},i),be="";i.textShadowOffset&&(be=de({width:we,height:ot,id:s},{shadowColor:i.textShadowColor,shadowOffset:i.textShadowOffset,shadowRadius:i.textShadowRadius}));let ve="",Te="",at="",Fe=-1,st=x==="ellipsis"?w(["\u2026"]):0,It=x==="ellipsis"?w([" "]):0,Le={};for(let C=0;C<u.length;C++){if(!K[C])continue;let I=K[C],A=u[C],Y=null,U=p?p[A]:null,z=I.y,V=I.x,ie=I.width,P=I.line;if(P===Fe)continue;let oe=!1;if(_.length>1){let B=we-_[P];if(b==="right"||b==="end")V+=B;else if(b==="center")V+=B/2;else if(b==="justify"&&P<_.length-1){let J=X[P];V+=(J>1?B/(J-1):0)*I.lineIndex,oe=!0}}if(Le[P]||(Le[P]=[V,oe?we:_[P]]),x==="ellipsis"&&_[P]>$e&&I.x+ie+st+It>$e){let B=le(A,"grapheme"),J="",me=0;for(let ft of B){let ut=I.x+w([J+ft]);if(J&&ut+st>$e)break;J+=ft,me=ut}A=J+"\u2026",Fe=P,Le[P][1]=me}let ne=T[P],D=S.baseline(A),ae=S.glyphHeight(A),j=ne-D;if(U?z+=0:g?(Y=S.getSVG(A,se(G({},i),{left:ce+V,top:pe+z+D+j,letterSpacing:i.letterSpacing})),h&&(at+=y("rect",{x:ce+V,y:pe+z+j,width:I.width,height:ae,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:ee||void 0,"clip-path":re?`url(#${re})`:void 0})+y("line",{x1:ce+V,x2:ce+V+I.width,y1:pe+z+j+D,y2:pe+z+j+D,stroke:"#14c000","stroke-width":1,transform:ee||void 0,"clip-path":re?`url(#${re})`:void 0}))):z+=D+j,i.textDecorationLine&&(P!==((lt=K[C+1])==null?void 0:lt.line)||Fe===P)){let B=Le[P];B&&!B[2]&&(ve+=ze({left:ce+B[0],top:pe+ae*+P,width:B[1],ascender:S.baseline(A),clipPathId:re},i),B[2]=1)}if(Y!==null)Te+=Y+" ";else{let[B,J]=Ue({content:A,filter:be,id:s,left:ce+V,top:pe+z,width:ie,height:ae,matrix:ee,opacity:Re,image:U,clipPathId:re,debug:h,shape:!!W,decorationShape:ve},i);Oe+=B,_e+=J,ve=""}}if(Te){let C=i.color!=="transparent"&&Re!==0?y("path",{fill:i.color,d:Te,transform:ee||void 0,opacity:Re!==1?Re:void 0,"clip-path":re?`url(#${re})`:void 0,style:N?`filter:${N}`:void 0}):"";W&&(_e=y("path",{d:Te,transform:ee||void 0})),Oe+=(be?`${be}<g filter="url(#satori_s-${s})">`:"")+C+ve+(be?"</g>":"")+at}return _e&&(i._inheritedBackgroundClipTextPath.value+=_e),Oe}var Je=Je||{};Je.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},r="";function t(m){var E=new Error(r+": "+m);throw E.source=r,E}function i(){var m=a();return r.length>0&&t("Invalid input not EOF"),m}function a(){return v(n)}function n(){return o("linear-gradient",e.linearGradient,f)||o("repeating-linear-gradient",e.repeatingLinearGradient,f)||o("radial-gradient",e.radialGradient,p)||o("repeating-radial-gradient",e.repeatingRadialGradient,p)}function o(m,E,L){return s(E,function(Z){var he=L();return he&&($(e.comma)||t("Missing comma before color stops")),{type:m,orientation:he,colorStops:v(N)}})}function s(m,E){var L=$(m);if(L){$(e.startCall)||t("Missing (");var Z=E(L);return $(e.endCall)||t("Missing )"),Z}}function f(){return h()||g()}function h(){return w("directional",e.sideOrCorner,1)}function g(){return w("angular",e.angleValue,1)}function p(){var m,E=l(),L;return E&&(m=[],m.push(E),L=r,$(e.comma)&&(E=l(),E?m.push(E):r=L)),m}function l(){var m=c()||u();if(m)m.at=b();else{var E=d();if(E){m=E;var L=b();L&&(m.at=L)}else{var Z=x();Z&&(m={type:"default-radial",at:Z})}}return m}function c(){var m=w("shape",/^(circle)/i,0);return m&&(m.style=Q()||d()),m}function u(){var m=w("shape",/^(ellipse)/i,0);return m&&(m.style=X()||d()),m}function d(){return w("extent-keyword",e.extentKeywords,1)}function b(){if(w("position",/^at/,0)){var m=x();return m||t("Missing positioning value"),m}}function x(){var m=F();if(m.x||m.y)return{type:"position",value:m}}function F(){return{x:X(),y:X()}}function v(m){var E=m(),L=[];if(E)for(L.push(E);$(e.comma);)E=m(),E?L.push(E):t("One extra comma");return L}function N(){var m=W();return m||t("Expected color definition"),m.length=X(),m}function W(){return S()||_()||H()||M()}function M(){return w("literal",e.literalColor,0)}function S(){return w("hex",e.hexColor,1)}function H(){return s(e.rgbColor,function(){return{type:"rgb",value:v(T)}})}function _(){return s(e.rgbaColor,function(){return{type:"rgba",value:v(T)}})}function T(){return $(e.number)[1]}function X(){return w("%",e.percentageValue,1)||K()||Q()}function K(){return w("position-keyword",e.positionKeywords,1)}function Q(){return w("px",e.pixelValue,1)||w("em",e.emValue,1)}function w(m,E,L){var Z=$(E);if(Z)return{type:m,value:Z[L]}}function $(m){var E,L;return L=/^[\n\r\t\s]+/.exec(r),L&&R(L[0].length),E=m.exec(r),E&&R(E[0].length),E}function R(m){r=r.substr(m)}return function(m){return r=m.toString(),i()}}();var qe=Je;function lr(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function fr(e,r){return typeof e=="string"&&e.endsWith("%")?r*parseFloat(e)/100:+e}function Rt(e,{x:r,y:t,defaultX:i,defaultY:a}){return(e?e.split(" ").map(n=>{try{let o=new fe(n);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(n=>n!==null):[i,a]).map((n,o)=>fr(n,[r,t][o]))}function vt(e,r){let t=[];for(let o of r){let s=lr(o);if(!t.length&&(t.push({offset:0,color:s}),typeof o.length=="undefined"||o.length.value==="0"))continue;let f=typeof o.length=="undefined"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;t.push({offset:f,color:s})}t.length||t.push({offset:0,color:"transparent"});let i=t[t.length-1];i.offset!==1&&(typeof i.offset=="undefined"?i.offset=1:t.push({offset:1,color:i.color}));let a=0,n=1;for(let o=0;o<t.length;o++)if(typeof t[o].offset=="undefined"){for(n<o&&(n=o);typeof t[n].offset=="undefined";)n++;t[o].offset=(t[n].offset-t[a].offset)/(n-a)*(o-a)+t[a].offset}else a=o;return t}function Ke({id:e,width:r,height:t},{image:i,size:a,position:n,repeat:o}){o=o||"repeat";let s=o==="repeat-x"||o==="repeat",f=o==="repeat-y"||o==="repeat",h=Rt(a,{x:r,y:t,defaultX:r,defaultY:t}),g=Rt(n,{x:r,y:t,defaultX:0,defaultY:0});if(i.startsWith("linear-gradient(")){let p=qe.parse(i)[0],l,c,u,d;if(p.orientation.type==="directional")[l,c,u,d]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[p.orientation.value];else if(p.orientation.type==="angular"){let x=+p.orientation.value/180*Math.PI-Math.PI/2,F=Math.cos(x),v=Math.sin(x);l=0,c=0,u=F,d=v,u<0&&(l-=u,u=0),d<0&&(c-=d,d=0)}let b=vt(r,p.colorStops);return[`satori_bi${e}`,`<linearGradient id="satori_bi${e}" x1="${l}" y1="${c}" x2="${u}" y2="${d}">${b.map(x=>`<stop offset="${x.offset*100}%" stop-color="${x.color}"/>`).join("")}</linearGradient>`]}if(i.startsWith("radial-gradient(")){let p=qe.parse(i)[0],l=p.orientation[0],[c,u]=h,d="circle",b=c/2,x=u/2;if(l.type==="shape"){if(d=l.value,l.at)if(l.at.type==="position")b=l.at.value.x.value,x=l.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+l.at.type)}else throw new Error("orientation.type not implemented: "+l.type);let F=vt(r,p.colorStops),v=`satori_radial_${e}`,N=`satori_pattern_${e}`,W={},M=Math.max(Math.abs(c-b),Math.abs(b)),S=Math.max(Math.abs(u-x),Math.abs(x));if(d==="circle")W.r=Math.sqrt(M*M+S*S);else if(d==="ellipse"){let T=S!==0?M/S:1;W.ry=Math.sqrt(M*M+S*S*T*T)/T,W.rx=W.ry*T}let H=y("pattern",{id:N,x:g[0],y:g[1],width:s?c:"100%",height:f?u:"100%",patternUnits:"userSpaceOnUse"},y("radialGradient",{id:v},F.map(T=>y("stop",{offset:T.offset,"stop-color":T.color})).join(""))+y(d,se(G({cx:b,cy:x,width:c,height:u},W),{fill:`url(#${v})`})));return[N,H]}if(i.startsWith("url(")){let p=i.slice(4,-1);return[`satori_bi${e}`,y("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0],y:g[1],width:s?h[0]:"100%",height:f?h[1]:"100%"},y("image",{x:0,y:0,width:h[0],height:h[1],href:p}))]}}function Ae(e,r,t){return t<e+r&&(t/2<e&&t/2<r?e=r=t/2:t/2<e?e=t-r:t/2<r&&(r=t-e)),[e,r]}function Ee({left:e,top:r,width:t,height:i},a){let{borderTopLeftRadius:n,borderTopRightRadius:o,borderBottomLeftRadius:s,borderBottomRightRadius:f}=a;return n=Math.min(n||0,t,i),o=Math.min(o||0,t,i),s=Math.min(s||0,t,i),f=Math.min(f||0,t,i),!n&&!o&&!s&&!f?"":([n,o]=Ae(n,o,t),[n,s]=Ae(n,s,i),[o,f]=Ae(o,f,i),[s,f]=Ae(s,f,t),`M${e+n},${r} h${t-n-o} a${o},${o} 0 0 1 ${o},${o} v${i-o-f} a${f},${f} 0 0 1 ${-f},${f} h${f+s-t} a${s},${s} 0 0 1 ${-s},${-s} v${s+n-i} a${n},${n} 0 0 1 ${n},${-n}`)}function Ze({left:e,top:r,width:t,height:i,path:a,id:n},o){return o.overflow!=="hidden"?"":a?y("clipPath",{id:`satori_cp-${n}`,"clip-path":o._inheritedClipPathId?`url(#${o._inheritedClipPathId})`:void 0},y("path",{x:e,y:r,width:t,height:i,d:a})):y("clipPath",{id:`satori_cp-${n}`,"clip-path":o._inheritedClipPathId?`url(#${o._inheritedClipPathId})`:void 0},y("rect",{x:e,y:r,width:t,height:i}))}function Qe({id:e,left:r,top:t,width:i,height:a,isInheritingTransform:n,debug:o},s){if(s.display==="none")return"";let f="rect",h="transparent",g=0,p="",l="",c=[],u=1,d="";s.backgroundColor&&c.push(s.backgroundColor),s.borderWidth&&(g=s.borderWidth,h=s.borderColor),s.opacity&&(u=+s.opacity),s.transform&&(p=ue({left:r,top:t,width:i,height:a},s.transform,n,s.transformOrigin));let b="";if(s.backgroundImage){let H=s.backgroundImage.map((_,T)=>Ke({id:e+"_"+T,width:i,height:a},_)).filter(Boolean);for(let _ of H)c.push(`url(#${_[0]})`),l+=_[1],_[2]&&(b+=_[2])}let x=Ee({left:r,top:t,width:i,height:a},s);x&&(f="path");let F=Ze({left:r,top:t,width:i,height:a,path:x,id:e},s),v=s._inheritedClipPathId,N=de({width:i,height:a,id:e},s);o&&(d=y("rect",{x:r,y:t,width:i,height:a,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:p||void 0,"clip-path":v?`url(#${v})`:void 0})),c.length||c.push("transparent");let{backgroundClip:W,filter:M}=s,S=c.map((H,_)=>{if(H==="transparent"&&!(_===c.length-1&&g))return"";let T=_===c.length-1&&g&&W!=="text";return y(f,{x:r,y:t,width:i,height:a,fill:H,stroke:T?h:void 0,"stroke-width":T?g:void 0,d:x||void 0,transform:p||void 0,"clip-path":W==="text"?`url(#satori_bct-${e})`:v?`url(#${v})`:void 0,style:M?`filter:${M}`:void 0})}).join("");return W==="text"&&g&&(S=y(f,{x:r,y:t,width:i,height:a,fill:"transparent",stroke:h,"stroke-width":g,d:x||void 0,transform:p||void 0,"clip-path":v?`url(#${v})`:void 0})+S),(l?`<defs>${l}</defs>`:"")+F+(N?`${N}<g filter="url(#satori_s-${e})">`:"")+(u!==1?`<g opacity="${u}">`:"")+(b||S)+(u!==1?"</g>":"")+(N?"</g>":"")+d}function et({id:e,left:r,top:t,width:i,height:a,src:n,debug:o,isInheritingTransform:s},f){if(f.display==="none")return"";let h="",g=1,p="",l=f.objectFit==="contain"?"xMidYMid":f.objectFit==="cover"?"xMidYMid slice":"none",c=Ee({left:r,top:t,width:i,height:a},f),u=f._inheritedClipPathId;c&&(h=y("clipPath",{id:`satori_c-${e}`,"clip-path":u?`url(#${u})`:void 0},y("path",{x:r,y:t,width:i,height:a,d:c}))),f.opacity&&(g=+f.opacity);let d=de({width:i,height:a,id:e},f);return f.transform&&(p=ue({left:r,top:t,width:i,height:a},f.transform,s,f.transformOrigin)),d+(d?`<g filter="url(#satori_s-${e})">`:"")+h+y("image",{x:r,y:t,width:i,height:a,href:n,preserveAspectRatio:l,transform:p||void 0,"clip-path":h?`url(#satori_c-${e})`:u?`url(#${u})`:void 0})+(d?"</g>":"")}function*Se(e,r){let t=te(),{id:i,inheritedStyle:a,parent:n,font:o,debug:s,embedFont:f=!0,graphemeImages:h,canLoadAdditionalAssets:g}=r;if(e===null||typeof e=="undefined")return yield,yield,"";if(!We(e)||typeof e.type=="function"){let R;if(!We(e))R=je(String(e),r),yield R.next().value;else{if(mt(e.type))throw new Error("Class component is not supported.");R=Se(e.type(e.props),r),yield R.next().value}R.next();let m=yield;return R.next(m).value}let{type:p,props:l}=e,{style:c,children:u}=l,d=t.Node.create();n.insertChild(d,n.getChildCount());let[b,x]=Xe(d,p,a,c,l),F=b.transform===a.transform;if(F||(b.transform.__parent=a.transform),b.overflow==="hidden"&&(x._inheritedClipPathId=`satori_cp-${i}`),b.backgroundClip==="text"){let R={value:""};x._inheritedBackgroundClipTextPath=R,b._inheritedBackgroundClipTextPath=R}let v=typeof u=="undefined"?[]:[].concat(u),N=[],W=0,M=[];for(let R of v){let m=Se(R,{id:i+"-"+W++,parentStyle:b,inheritedStyle:x,isInheritingTransform:!0,parent:d,font:o,embedFont:f,debug:s,graphemeImages:h,canLoadAdditionalAssets:g});g?M.push(...m.next().value||[]):m.next(),N.push(m)}yield M;for(let R of N)R.next();let[S,H]=yield;b.position==="absolute"&&d.calculateLayout();let{left:_,top:T,width:X,height:K}=d.getComputedLayout();_+=S,T+=H;let Q="",w="",$="";p==="img"?w=et({id:i,left:_,top:T,width:X,height:K,src:l.src,isInheritingTransform:F,debug:s},b):w=Qe({id:i,left:_,top:T,width:X,height:K,isInheritingTransform:F,debug:s},b);for(let R of N)Q+=R.next([_,T]).value;return b._inheritedBackgroundClipTextPath&&($+=y("clipPath",{id:`satori_bct-${i}`,"clip-path":b._inheritedClipPathId?`url(#${b._inheritedClipPathId})`:void 0},b._inheritedBackgroundClipTextPath.value)),$+w+Q}import ur from"@shuding/opentype.js";function dr(e,r,[t,i],[a,n]){if(t!==a)return t?!a||t===e?-1:a===e?1:e===400&&t===500||e===500&&t===400?-1:e===400&&a===500||e===500&&a===400?1:e<400?t<e&&a<e?a-t:t<e?-1:a<e?1:t-a:e<t&&e<a?t-a:e<t?-1:e<a?1:a-t:1;if(i!==n){if(i===r)return-1;if(n===r)return 1}return-1}var ke=class{constructor(r){this.fonts=new Map;this.addFonts(r)}get({name:r,weight:t,style:i}){if(!this.fonts.has(r))return null;t==="normal"&&(t=400),t==="bold"&&(t=700);let a=[...this.fonts.get(r)],n=a[0];for(let o=1;o<a.length;o++){let[,s,f]=n,[,h,g]=a[o];dr(t,i,[s,f],[h,g])>0&&(n=a[o])}return n[0]}addFonts(r){for(let t of r){let i=t.data,a=ur.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0});this.defaultFont||(this.defaultFont=a);let n=t.name.toLowerCase();this.fonts.has(n)||this.fonts.set(n,[]),this.fonts.get(n).push([a,t.weight,t.style])}}getEngine(r=16,t=1.2,{fontFamily:i,fontWeight:a=400,fontStyle:n="normal"}){i=Array.isArray(i)?i:[i];let o=i.map(l=>this.get({name:l,weight:a,style:n})).filter(Boolean);for(let l of this.fonts.keys())i.includes(l)||o.push(this.get({name:l,weight:a,style:n}));let s=new Map,f=(l,c=!0)=>{let u=l.charCodeAt(0);if(s.has(u))return s.get(u);let d=o.find((b,x)=>!!b.charToGlyphIndex(l)||c&&x===o.length-1);return d&&s.set(u,d),d},h=(l,c=!1)=>{var d,b;return((c?(b=(d=l.tables)==null?void 0:d.os2)==null?void 0:b.sTypoAscender:0)||l.ascender)/l.unitsPerEm*r},g=(l,c=!1)=>{var d,b;return((c?(b=(d=l.tables)==null?void 0:d.os2)==null?void 0:b.sTypoDescender:0)||l.descender)/l.unitsPerEm*r},p={resolve:l=>f(l,!1),baseline:(l,c=typeof l=="undefined"?o[0]:f(l))=>{let u=h(c,!0),d=g(c,!0),b=u-d,x=p.glyphHeight(l,c),F=(x-b)/2,{yMax:v,yMin:N}=c.tables.head,W=v/(v-N);return F+W*x},glyphHeight:(l,c=typeof l=="undefined"?o[0]:f(l))=>(h(c)-g(c))*t/1.2,measure:(l,c)=>{let u=f(l);return this.measure(u,l,c)},getSVG:(l,c)=>{let u=f(l);return this.getSVG(u,l,c)}};return p}measure(r,t,{fontSize:i,letterSpacing:a=0}){return r.getAdvanceWidth(t,i,{letterSpacing:a/i})}getSVG(r,t,{fontSize:i,top:a,left:n,letterSpacing:o=0}){return r.getPath(t,n,a,i,{letterSpacing:o/i}).toPathData(1)}};function tt({width:e,height:r,content:t}){return y("svg",{width:e,height:r,viewBox:`0 0 ${e} ${r}`,xmlns:"http://www.w3.org/2000/svg"},t)}var rt=new WeakMap;async function Tt(e,r){let t=te();if(!t)throw new Error("Satori is not initialized.");let i;rt.has(r.fonts)?i=rt.get(r.fonts):rt.set(r.fonts,i=new ke(r.fonts));let a=t.Node.create();a.setWidth(r.width),a.setHeight(r.height),a.setFlexDirection(t.FLEX_DIRECTION_ROW),a.setFlexWrap(t.WRAP_WRAP),a.setAlignContent(t.ALIGN_AUTO),a.setAlignItems(t.ALIGN_FLEX_START),a.setJustifyContent(t.JUSTIFY_FLEX_START),a.setOverflow(t.OVERFLOW_HIDDEN);let n=G({},r.graphemeImages),o=Se(e,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:r.width,_viewportHeight:r.height},parent:a,font:i,embedFont:r.embedFont,debug:r.debug,graphemeImages:n,canLoadAdditionalAssets:!!r.loadAdditionalAsset}),s=o.next().value;if(r.loadAdditionalAsset&&s.length){s=Array.from(new Set(le(s.join(""),"grapheme")));let h={};s.forEach(l=>cr.detect(l,c=>{h[c]=h[c]||[],c==="unknown"?h[c].push(l):h[c][0]=(h[c][0]||"")+l}));let g=[],p={};await Promise.all(Object.entries(h).flatMap(([l,c])=>c.map(u=>r.loadAdditionalAsset(l,u).then(d=>{typeof d=="string"?p[u]=d:d&&g.push(d)})))),i.addFonts(g),Object.assign(n,p)}o.next(),a.calculateLayout(r.width,r.height,t.DIRECTION_LTR);let f=o.next([0,0]).value;return a.freeRecursive(),tt({width:r.width,height:r.height,content:f})}export{Tt as default,Pt as init};
var Ae=Object.defineProperty,Oe=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var le=(d,u,e)=>u in d?Ae(d,u,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[u]=e,M=(d,u)=>{for(var e in u||(u={}))$e.call(u,e)&&le(d,e,u[e]);if(se)for(var e of se(u))Pe.call(u,e)&&le(d,e,u[e]);return d},id=(d,u)=>Oe(d,Fe(u));import{guessLanguage as mu}from"guesslanguage";var pe={};var Pd;Pd=pe.default;function We(d){Pd=d}function ed(){return Pd}import{LineBreaker as Ne}from"css-line-break";import{splitGraphemes as Ge}from"text-segmentation";function Wd(d){let u=typeof d;return!(u==="number"||u==="bigint"||u==="string"||u==="boolean")}function me(d){return/^class\s/.test(Function.prototype.toString.call(d))}function gd(d,u){return[d[0]*u[0]+d[2]*u[1],d[1]*u[0]+d[3]*u[1],d[0]*u[2]+d[2]*u[3],d[1]*u[2]+d[3]*u[3],d[0]*u[4]+d[2]*u[5]+d[4],d[1]*u[4]+d[3]*u[5]+d[5]]}function q(d,u,e){let r=u[d];return typeof r=="undefined"?e:r}var ge=void 0,Nd=typeof Intl!="undefined"&&"Segmenter"in Intl&&process.env.NODE_ENV!=="test",Me=Nd?new Intl.Segmenter(ge,{granularity:"word"}):null,De=Nd?new Intl.Segmenter(ge,{granularity:"grapheme"}):null,yd=[32,160,4961,65792,65793,4153,4241,10].map(d=>String.fromCodePoint(d)),Be=d=>{let u=Ne(d,{lineBreak:"strict",wordBreak:"normal"}),e=[],r;for(;!(r=u.next()).done;)if(r.value){let f=r.value.slice(),t="";for(let n=0;n<f.length;n++){let i=f[n];yd.includes(i)?(t.length&&e.push(t),e.push(i),t=""):t+=i}t.length&&e.push(t)}return e};function od(d,u){return Nd?u==="word"?[...Me.segment(d)].map(e=>e.segment):[...De.segment(d)].map(e=>e.segment):u==="word"?Be(d):Ge(d)}function x(d,u,e){let r="";for(let[f,t]of Object.entries(u))typeof t!="undefined"&&(r+=` ${f}="${t}"`);return e?`<${d}${r}>${e}</${d}>`:`<${d}${r}/>`}var be={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var Ye=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedBackgroundClipTextPath"]);function Gd(d){let u={};for(let e in d)Ye.has(e)&&(u[e]=d[e]);return u}import{getPropertyName as uu,getStylesForProperty as tu}from"css-to-react-native";import{parseElementStyle as nu}from"css-background-parser";var xd=(d,u)=>()=>(u||d((u={exports:{}}).exports,u),u.exports),He=xd((d,u)=>{u.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),Xe=xd((d,u)=>{u.exports=["deg","grad","rad","turn"]}),Ue=xd((d,u)=>{u.exports=["dpi","dpcm","dppx"]}),ze=xd((d,u)=>{u.exports=["Hz","kHz"]}),je=xd((d,u)=>{u.exports=["s","ms"]}),Ve=He(),he=Xe(),ye=Ue(),xe=ze(),Ee=je();function Dd(d){if(/\.\D?$/.test(d))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(d))throw new Error("Only one leading +/- is allowed");if(Je(d)>1)throw new Error("Only one dot is allowed");if(/%$/.test(d)){this.type="percentage",this.value=Md(d),this.unit="%";return}var u=Ke(d);if(!u){this.type="number",this.value=Md(d);return}this.type=Qe(u),this.value=Md(d.substr(0,d.length-u.length)),this.unit=u}Dd.prototype.valueOf=function(){return this.value};Dd.prototype.toString=function(){return this.value+(this.unit||"")};function ad(d){return new Dd(d)}function Je(d){var u=d.match(/\./g);return u?u.length:0}function Md(d){var u=parseFloat(d);if(isNaN(u))throw new Error("Invalid number: "+d);return u}var qe=[].concat(he,xe,Ve,ye,Ee);function Ke(d){var u=d.match(/\D+$/),e=u&&u[0];if(e&&qe.indexOf(e)===-1)throw new Error("Invalid unit: "+e);return e}var Ze=Object.assign(Ld(he,"angle"),Ld(xe,"frequency"),Ld(ye,"resolution"),Ld(Ee,"time"));function Ld(d,u){return Object.fromEntries(d.map(e=>[e,u]))}function Qe(d){return Ze[d]||"length"}import du from"postcss-value-parser";function eu(d,u){try{let e=new ad(d);switch(e.unit){case"px":return{absolute:e.value};case"em":return{absolute:e.value*u};case"rem":return{absolute:e.value*16};case"%":return{relative:e.value};default:return{}}}catch{return{}}}function Bd(d,u,e){switch(d){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:let r=eu(d,u);return r.absolute?{[e?"xAbsolute":"yAbsolute"]:r.absolute}:r.relative?{[e?"xRelative":"yRelative"]:r.relative}:{}}}function Yd(d,u){if(typeof d=="number")return{xAbsolute:d};let e;try{e=du(d).nodes.filter(r=>r.type==="word").map(r=>r.value)}catch{return{}}return e.length===1?Bd(e[0],u,!0):e.length===2?((e[0]==="top"||e[0]==="bottom"||e[1]==="left"||e[1]==="right")&&e.reverse(),M(M({},Bd(e[0],u,!0)),Bd(e[1],u,!1))):{}}var ru=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),fu=new Set(["lineHeight"]),_e=[1,0,0,1,0,0];function iu(d,u,e,r){return d==="border"&&!e.includes(u.borderColor)?u.borderColor=r:d==="textDecoration"&&!e.includes(u.textDecorationColor)&&(u.textDecorationColor=r),u}function Se(d,u){return typeof u=="number"?ru.has(d)?fu.has(d)?u:String(u):u+"px":u}function ou(d,u){return d==="lineHeight"?{lineHeight:Se(d,u)}:d==="fontFamily"?{fontFamily:u.split(",").map(e=>e.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())}:null}function Hd(d,u,e,{percentage:r}={percentage:!1}){if(typeof d=="number")return d;try{let f=new ad(d);if(f.type==="length")switch(f.unit){case"em":return f.value*u;case"rem":return f.value*16;case"vw":return~~(f.value*e._viewportWidth/100);case"vh":return~~(f.value*e._viewportHeight/100);default:return f.value}else if(f.type==="angle")switch(f.unit){case"deg":return f.value;case"rad":return f.value*180/Math.PI;default:return f.value}else if(f.type==="percentage"&&r)return f.value/100*u}catch{}}function kd(d,u){let e={};for(let f in d){if(f.startsWith("_")){e[f]=d[f];continue}let t=uu(f);Object.assign(e,ou(t,d[f])||iu(t,tu(t,Se(t,d[f]),!0),d[f],d.color||u.color))}if(e.backgroundImage){let{backgrounds:f}=nu(e);e.backgroundImage=f}let r=e.fontSize||u.fontSize;if(typeof r=="string")try{let f=new ad(r);switch(f.unit){case"em":r=f.value*u.fontSize;break;case"rem":r=f.value*16;break}}catch{r=16}typeof e.fontSize!="undefined"&&(e.fontSize=r),e.transformOrigin&&(e.transformOrigin=Yd(e.transformOrigin,r));for(let f in e){let t=e[f];if(f==="lineHeight")typeof t=="string"&&(t=e[f]=Hd(t,r,u,{percentage:!0})/r);else if(typeof t=="string"){let n=Hd(t,r,u);typeof n!="undefined"&&(e[f]=n),t=e[f]}if(f==="opacity"&&(t=e[f]=t*u.opacity),f==="transform"){let n=[..._e],i=t;for(let a of i){let m=Object.keys(a)[0],g=a[m],l=typeof g=="string"?Hd(g,r,u):g,s=[..._e];switch(m){case"translateX":s[4]=l;break;case"translateY":s[5]=l;break;case"scale":s[0]=l,s[3]=l;break;case"scaleX":s[0]=l;break;case"scaleY":s[3]=l;break;case"rotate":let b=l*Math.PI/180,o=Math.cos(b),c=Math.sin(b);s[0]=o,s[1]=c,s[2]=-c,s[3]=o;break;case"skewX":s[2]=Math.tan(l*Math.PI/180);break;case"skewY":s[1]=Math.tan(l*Math.PI/180);break}n=gd(s,n)}e.transform=n}}return e}function Xd(d,u,e,r,f){let t=ed(),n=M(M(M({},e),kd(be[u],e)),kd(r,e));if(u==="img"){let i=parseInt(f.width),m=parseInt(f.height)/i;n.width||(n.width=i),n.height||(n.height=m*n.width)}return d.setDisplay(q(n.display,{flex:t.DISPLAY_FLEX,none:t.DISPLAY_NONE},t.DISPLAY_FLEX)),d.setAlignContent(q(n.alignContent,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,"space-between":t.ALIGN_SPACE_BETWEEN,"space-around":t.ALIGN_SPACE_AROUND,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_AUTO)),d.setAlignItems(q(n.alignItems,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_FLEX_START)),d.setAlignSelf(q(n.alignSelf,{stretch:t.ALIGN_STRETCH,center:t.ALIGN_CENTER,"flex-start":t.ALIGN_FLEX_START,"flex-end":t.ALIGN_FLEX_END,baseline:t.ALIGN_BASELINE,normal:t.ALIGN_AUTO},t.ALIGN_AUTO)),d.setJustifyContent(q(n.justifyContent,{center:t.JUSTIFY_CENTER,"flex-start":t.JUSTIFY_FLEX_START,"flex-end":t.JUSTIFY_FLEX_END,"space-between":t.JUSTIFY_SPACE_BETWEEN,"space-around":t.JUSTIFY_SPACE_AROUND},t.JUSTIFY_FLEX_START)),d.setFlexDirection(q(n.flexDirection,{row:t.FLEX_DIRECTION_ROW,column:t.FLEX_DIRECTION_COLUMN,"row-reverse":t.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":t.FLEX_DIRECTION_COLUMN_REVERSE},t.FLEX_DIRECTION_ROW)),d.setFlexWrap(q(n.flexWrap,{wrap:t.WRAP_WRAP,nowrap:t.WRAP_NO_WRAP,"wrap-reverse":t.WRAP_WRAP_REVERSE},t.WRAP_WRAP)),typeof n.flexBasis!="undefined"&&d.setFlexBasis(n.flexBasis),d.setFlexGrow(typeof n.flexGrow=="undefined"?0:n.flexGrow),d.setFlexShrink(typeof n.flexShrink=="undefined"?0:n.flexShrink),typeof n.maxHeight!="undefined"&&d.setMaxHeight(n.maxHeight),typeof n.maxWidth!="undefined"&&d.setMaxWidth(n.maxWidth),typeof n.minHeight!="undefined"&&d.setMinHeight(n.minHeight),typeof n.minWidth!="undefined"&&d.setMinWidth(n.minWidth),d.setOverflow(q(n.overflow,{visible:t.OVERFLOW_VISIBLE,hidden:t.OVERFLOW_HIDDEN},t.OVERFLOW_VISIBLE)),d.setMargin(t.EDGE_TOP,n.marginTop||0),d.setMargin(t.EDGE_BOTTOM,n.marginBottom||0),d.setMargin(t.EDGE_LEFT,n.marginLeft||0),d.setMargin(t.EDGE_RIGHT,n.marginRight||0),d.setBorder(t.EDGE_TOP,n.borderWidth||0),d.setBorder(t.EDGE_BOTTOM,n.borderWidth||0),d.setBorder(t.EDGE_LEFT,n.borderWidth||0),d.setBorder(t.EDGE_RIGHT,n.borderWidth||0),d.setPadding(t.EDGE_TOP,n.paddingTop||0),d.setPadding(t.EDGE_BOTTOM,n.paddingBottom||0),d.setPadding(t.EDGE_LEFT,n.paddingLeft||0),d.setPadding(t.EDGE_RIGHT,n.paddingRight||0),d.setPositionType(q(n.position,{absolute:t.POSITION_TYPE_ABSOLUTE,relative:t.POSITION_TYPE_RELATIVE},t.POSITION_TYPE_RELATIVE)),typeof n.top!="undefined"&&d.setPosition(t.EDGE_TOP,n.top),typeof n.bottom!="undefined"&&d.setPosition(t.EDGE_BOTTOM,n.bottom),typeof n.left!="undefined"&&d.setPosition(t.EDGE_LEFT,n.left),typeof n.right!="undefined"&&d.setPosition(t.EDGE_RIGHT,n.right),typeof n.height!="undefined"?d.setHeight(n.height):d.setHeightAuto(),typeof n.width!="undefined"?d.setWidth(n.width):d.setWidthAuto(),[n,Gd(n)]}function cd({left:d,top:u,width:e,height:r},f,t,n){var a,m,g,l;let i;if(t)i=f;else{let s=(m=n==null?void 0:n.xAbsolute)!=null?m:((a=n==null?void 0:n.xRelative)!=null?a:50)*e/100,b=(l=n==null?void 0:n.yAbsolute)!=null?l:((g=n==null?void 0:n.yRelative)!=null?g:50)*r/100,o=d+s,c=u+b;i=gd([1,0,0,1,o,c],gd(f,[1,0,0,1,-o,-c])),f.__parent&&(i=gd(f.__parent,i)),f.splice(0,6,...i)}return`matrix(${i.map(s=>s.toFixed(2)).join(",")})`}function we({left:d,top:u,width:e,height:r,isInheritingTransform:f},t){let n="",i=1;return t.transform&&(n=cd({left:d,top:u,width:e,height:r},t.transform,f,t.transformOrigin)),t.opacity&&(i=+t.opacity),{matrix:n,opacity:i}}function Ud({id:d,content:u,filter:e,left:r,top:f,width:t,height:n,matrix:i,opacity:a,image:m,clipPathId:g,debug:l,shape:s,decorationShape:b},o){let c="";if(l&&(c=x("rect",{x:r,y:f-n,width:t,height:n,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0})),m){let y={href:m,x:r,y:f,width:t,height:n,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0,style:o.filter?`filter:${o.filter}`:void 0};return[(e?`${e}<g filter="url(#satori_s-${d})">`:"")+x("image",id(M({},y),{opacity:a!==1?a:void 0}))+(b||"")+(e?"</g>":"")+c,""]}let h={x:r,y:f,width:t,height:n,"font-weight":o.fontWeight,"font-style":o.fontStyle,"font-size":o.fontSize,"font-family":o.fontFamily,"letter-spacing":o.letterSpacing||void 0,transform:i||void 0,"clip-path":g?`url(#${g})`:void 0,style:o.filter?`filter:${o.filter}`:void 0};return[(e?`${e}<g filter="url(#satori_s-${d})">`:"")+x("text",id(M({},h),{fill:o.color,opacity:a!==1?a:void 0}),u)+(b||"")+(e?"</g>":"")+c,s?x("text",h,u):""]}function sd({id:d,width:u,height:e},r){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius=="undefined")return"";let f=r.shadowRadius*r.shadowRadius/4,t=Math.min(r.shadowOffset.width-f,0),n=Math.max(r.shadowOffset.width+f+u,u),i=Math.min(r.shadowOffset.height-f,0),a=Math.max(r.shadowOffset.height+f+e,e);return`<defs><filter id="satori_s-${d}" x="${t/u*100}%" y="${i/e*100}%" width="${(n-t)/u*100}%" height="${(a-i)/e*100}%"><feDropShadow dx="${r.shadowOffset.width}" dy="${r.shadowOffset.height}" stdDeviation="${r.shadowRadius/2}" flood-color="${r.shadowColor}" flood-opacity="1"/></filter></defs>`}function zd({width:d,left:u,top:e,ascender:r,clipPathId:f},t){let{textDecorationColor:n,textDecorationStyle:i,textDecorationLine:a,fontSize:m}=t;if(!a||a==="none")return"";let g=Math.max(1,m*.1),l=a==="line-through"?e+r*.5:a==="underline"?e+r*1.1:e,s=i==="dashed"?`${g*1.2} ${g*2}`:i==="dotted"?`0 ${g*2}`:void 0;return x("line",{x1:u,y1:l,x2:u+d,y2:l,stroke:n,"stroke-width":g,"stroke-dasharray":s,"stroke-linecap":i==="dotted"?"round":"square","clip-path":f?`url(#${f})`:void 0})}var jd=void 0;function*Vd(d,u){var oe;let e=ed(),{parentStyle:r,inheritedStyle:f,parent:t,font:n,id:i,isInheritingTransform:a,debug:m,embedFont:g,graphemeImages:l,canLoadAdditionalAssets:s}=u;r.textTransform==="uppercase"?d=d.toLocaleUpperCase(jd):r.textTransform==="lowercase"?d=d.toLocaleLowerCase(jd):r.textTransform==="capitalize"&&(d=od(d,"word").map(A=>od(A,"grapheme").map((O,F)=>F===0?O.toLocaleUpperCase(jd):O).join("")).join(""));let b=q(r.wordBreak,{normal:"word","break-all":"grapheme","break-word":"grapheme","keep-all":"word"},"word"),o=od(d,b),c=e.Node.create();c.setAlignItems(e.ALIGN_BASELINE),r.textAlign==="left"?c.setJustifyContent(e.JUSTIFY_FLEX_START):r.textAlign==="center"?c.setJustifyContent(e.JUSTIFY_CENTER):r.textAlign==="right"?c.setJustifyContent(e.JUSTIFY_FLEX_END):r.textAlign==="justify"&&c.setJustifyContent(e.JUSTIFY_SPACE_BETWEEN),t.insertChild(c,t.getChildCount());let{textAlign:h,textOverflow:y,whiteSpace:_,lineHeight:w,filter:G,_inheritedBackgroundClipTextPath:W}=r,N=r.fontSize,S=n.getEngine(N,w,r),H=s?o.filter(A=>!S.check(A)):[];yield H,H.length&&(S=n.getEngine(N,w,r));let T=[],k=[],X=[],K=[],Q=new Map,R=A=>{let O=0;for(let F of A){if(Q.has(F)){O+=Q.get(F);continue}let Y=S.measure(F,r);Q.set(F,Y),O+=Y}return O},$=0,v=[],p=0;for(let A of o){let O=!1,F=l&&l[A];_==="pre"?O=A[0]===`
`:_!=="nowrap"&&(F||yd.includes(A[0]))&&(O=!0),O?(_==="nowrap"?p+=R(v)+r.fontSize:($=Math.max($,R(v)),F&&($=Math.max($,r.fontSize))),v=[]):(!yd.includes(A[0])||!v.length)&&v.push(A===`
`?" ":A)}$=Math.max($,R(v)+p);let E=t.getMinWidth(),I=t.getMaxWidth(),Z=t.getWidth();isNaN(Z.value)&&(isNaN(E.value)||E.unit===1&&E.value>$)&&(isNaN(I.value)||I.unit===1&&($=Math.min($,I.value)),t.setMinWidth($)),typeof r.flexShrink=="undefined"&&t.setFlexShrink(1);let bd=_==="pre-wrap"||_==="pre";c.setMeasureFunc(A=>{let O=0,F="",Y=0,U=0,z=0,j=-1,nd=0,P=0,rd=0;T=[],X=[0];for(let td=0;td<o.length;td++){let D=o[td];if(!bd&&yd.includes(D[0]))F||(F=" "),Y=R([F]),K[td]=null;else{let fd=bd&&D===`
`,V=fd?0:l&&l[D]?r.fontSize:R([D]);U||(F="",Y=0);let B=Y||",.!?:-@)>]}%#".indexOf(D[0])<0,J=!U||!!Y;if(fd||td&&B&&U+Y+V>A&&_!=="nowrap"&&_!=="pre")T.push(U),k.push(rd),O++,nd+=P,U=V,P=V?S.glyphHeight(D):0,rd=V?S.baseline(D):0,X.push(1),j=-1,fd||(z=Math.max(z,A));else{U+=Y+V;let md=S.glyphHeight(D);md>P&&(P=md,rd=S.baseline(D)),J&&X[X.length-1]++}F="",Y=0,J&&j++,z=Math.max(z,U),K[td]={y:nd,x:U-V,width:V,line:O,lineIndex:j}}}return U&&(O++,T.push(U),k.push(rd),nd+=P),{width:z,height:nd}});let[Le,ke]=yield,Od="",Sd="",ud=f._inheritedClipPathId,{left:te,top:ne,width:wd,height:re}=c.getComputedLayout(),Fd=t.getComputedWidth()-t.getComputedPadding(e.EDGE_LEFT)-t.getComputedPadding(e.EDGE_RIGHT)-t.getComputedBorder(e.EDGE_LEFT)-t.getComputedBorder(e.EDGE_RIGHT),ld=Le+te,pd=ke+ne,{matrix:dd,opacity:Td}=we({left:te,top:ne,width:wd,height:re,isInheritingTransform:a},r),hd="";r.textShadowOffset&&(hd=sd({width:wd,height:re,id:i},{shadowColor:r.textShadowColor,shadowOffset:r.textShadowOffset,shadowRadius:r.textShadowRadius}));let Rd="",vd="",fe="",$d=-1,ie=y==="ellipsis"?R(["\u2026"]):0,Ie=y==="ellipsis"?R([" "]):0,Cd={};for(let A=0;A<o.length;A++){if(!K[A])continue;let O=K[A],F=o[A],Y=null,U=l?l[F]:null,z=O.y,j=O.x,nd=O.width,P=O.line;if(P===$d)continue;let rd=!1;if(T.length>1){let B=wd-T[P];if(h==="right"||h==="end")j+=B;else if(h==="center")j+=B/2;else if(h==="justify"&&P<T.length-1){let J=X[P];j+=(J>1?B/(J-1):0)*O.lineIndex,rd=!0}}if(Cd[P]||(Cd[P]=[j,rd?wd:T[P]]),y==="ellipsis"&&T[P]>Fd&&O.x+nd+ie+Ie>Fd){let B=od(F,"grapheme"),J="",md=0;for(let ae of B){let ce=O.x+R([J+ae]);if(J&&ce+ie>Fd)break;J+=ae,md=ce}F=J+"\u2026",$d=P,Cd[P][1]=md}let td=k[P],D=S.baseline(F),fd=S.glyphHeight(F),V=td-D;if(U?z+=0:g?(Y=S.getSVG(F,id(M({},r),{left:ld+j,top:pd+z+D+V,letterSpacing:r.letterSpacing})),m&&(fe+=x("rect",{x:ld+j,y:pd+z+V,width:O.width,height:fd,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:dd||void 0,"clip-path":ud?`url(#${ud})`:void 0})+x("line",{x1:ld+j,x2:ld+j+O.width,y1:pd+z+V+D,y2:pd+z+V+D,stroke:"#14c000","stroke-width":1,transform:dd||void 0,"clip-path":ud?`url(#${ud})`:void 0}))):z+=D+V,r.textDecorationLine&&(P!==((oe=K[A+1])==null?void 0:oe.line)||$d===P)){let B=Cd[P];B&&!B[2]&&(Rd+=zd({left:ld+B[0],top:pd+fd*+P,width:B[1],ascender:S.baseline(F),clipPathId:ud},r),B[2]=1)}if(Y!==null)vd+=Y+" ";else{let[B,J]=Ud({content:F,filter:hd,id:i,left:ld+j,top:pd+z,width:nd,height:fd,matrix:dd,opacity:Td,image:U,clipPathId:ud,debug:m,shape:!!W,decorationShape:Rd},r);Od+=B,Sd+=J,Rd=""}}if(vd){let A=r.color!=="transparent"&&Td!==0?x("path",{fill:r.color,d:vd,transform:dd||void 0,opacity:Td!==1?Td:void 0,"clip-path":ud?`url(#${ud})`:void 0,style:G?`filter:${G}`:void 0}):"";W&&(Sd=x("path",{d:vd,transform:dd||void 0})),Od+=(hd?`${hd}<g filter="url(#satori_s-${i})">`:"")+A+Rd+(hd?"</g>":"")+fe}return Sd&&(r._inheritedBackgroundClipTextPath.value+=Sd),Od}var Jd=Jd||{};Jd.parse=function(){var d={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},u="";function e(p){var E=new Error(u+": "+p);throw E.source=u,E}function r(){var p=f();return u.length>0&&e("Invalid input not EOF"),p}function f(){return w(t)}function t(){return n("linear-gradient",d.linearGradient,a)||n("repeating-linear-gradient",d.repeatingLinearGradient,a)||n("radial-gradient",d.radialGradient,l)||n("repeating-radial-gradient",d.repeatingRadialGradient,l)}function n(p,E,I){return i(E,function(Z){var bd=I();return bd&&($(d.comma)||e("Missing comma before color stops")),{type:p,orientation:bd,colorStops:w(G)}})}function i(p,E){var I=$(p);if(I){$(d.startCall)||e("Missing (");var Z=E(I);return $(d.endCall)||e("Missing )"),Z}}function a(){return m()||g()}function m(){return R("directional",d.sideOrCorner,1)}function g(){return R("angular",d.angleValue,1)}function l(){var p,E=s(),I;return E&&(p=[],p.push(E),I=u,$(d.comma)&&(E=s(),E?p.push(E):u=I)),p}function s(){var p=b()||o();if(p)p.at=h();else{var E=c();if(E){p=E;var I=h();I&&(p.at=I)}else{var Z=y();Z&&(p={type:"default-radial",at:Z})}}return p}function b(){var p=R("shape",/^(circle)/i,0);return p&&(p.style=Q()||c()),p}function o(){var p=R("shape",/^(ellipse)/i,0);return p&&(p.style=X()||c()),p}function c(){return R("extent-keyword",d.extentKeywords,1)}function h(){if(R("position",/^at/,0)){var p=y();return p||e("Missing positioning value"),p}}function y(){var p=_();if(p.x||p.y)return{type:"position",value:p}}function _(){return{x:X(),y:X()}}function w(p){var E=p(),I=[];if(E)for(I.push(E);$(d.comma);)E=p(),E?I.push(E):e("One extra comma");return I}function G(){var p=W();return p||e("Expected color definition"),p.length=X(),p}function W(){return S()||T()||H()||N()}function N(){return R("literal",d.literalColor,0)}function S(){return R("hex",d.hexColor,1)}function H(){return i(d.rgbColor,function(){return{type:"rgb",value:w(k)}})}function T(){return i(d.rgbaColor,function(){return{type:"rgba",value:w(k)}})}function k(){return $(d.number)[1]}function X(){return R("%",d.percentageValue,1)||K()||Q()}function K(){return R("position-keyword",d.positionKeywords,1)}function Q(){return R("px",d.pixelValue,1)||R("em",d.emValue,1)}function R(p,E,I){var Z=$(E);if(Z)return{type:p,value:Z[I]}}function $(p){var E,I;return I=/^[\n\r\t\s]+/.exec(u),I&&v(I[0].length),E=p.exec(u),E&&v(E[0].length),E}function v(p){u=u.substr(p)}return function(p){return u=p.toString(),r()}}();var qd=Jd;function au(d){return d.type==="literal"?d.value:d.type==="hex"?`#${d.value}`:d.type==="rgb"?`rgb(${d.value.join(",")})`:d.type==="rgba"?`rgba(${d.value.join(",")})`:"transparent"}function cu(d,u){return typeof d=="string"&&d.endsWith("%")?u*parseFloat(d)/100:+d}function Te(d,{x:u,y:e,defaultX:r,defaultY:f}){return(d?d.split(" ").map(t=>{try{let n=new ad(t);return n.type==="length"||n.type==="number"?n.value:n.value+n.unit}catch{return null}}).filter(t=>t!==null):[r,f]).map((t,n)=>cu(t,[u,e][n]))}function Re(d,u){let e=[];for(let n of u){let i=au(n);if(!e.length&&(e.push({offset:0,color:i}),typeof n.length=="undefined"||n.length.value==="0"))continue;let a=typeof n.length=="undefined"?void 0:n.length.type==="%"?n.length.value/100:n.length.value/d;e.push({offset:a,color:i})}e.length||e.push({offset:0,color:"transparent"});let r=e[e.length-1];r.offset!==1&&(typeof r.offset=="undefined"?r.offset=1:e.push({offset:1,color:r.color}));let f=0,t=1;for(let n=0;n<e.length;n++)if(typeof e[n].offset=="undefined"){for(t<n&&(t=n);typeof e[t].offset=="undefined";)t++;e[n].offset=(e[t].offset-e[f].offset)/(t-f)*(n-f)+e[f].offset}else f=n;return e}function Kd({id:d,width:u,height:e},{image:r,size:f,position:t,repeat:n}){n=n||"repeat";let i=n==="repeat-x"||n==="repeat",a=n==="repeat-y"||n==="repeat",m=Te(f,{x:u,y:e,defaultX:u,defaultY:e}),g=Te(t,{x:u,y:e,defaultX:0,defaultY:0});if(r.startsWith("linear-gradient(")){let l=qd.parse(r)[0],s,b,o,c;if(l.orientation.type==="directional")[s,b,o,c]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[l.orientation.value];else if(l.orientation.type==="angular"){let y=+l.orientation.value/180*Math.PI-Math.PI/2,_=Math.cos(y),w=Math.sin(y);s=0,b=0,o=_,c=w,o<0&&(s-=o,o=0),c<0&&(b-=c,c=0)}let h=Re(u,l.colorStops);return[`satori_bi${d}`,`<linearGradient id="satori_bi${d}" x1="${s}" y1="${b}" x2="${o}" y2="${c}">${h.map(y=>`<stop offset="${y.offset*100}%" stop-color="${y.color}"/>`).join("")}</linearGradient>`]}if(r.startsWith("radial-gradient(")){let l=qd.parse(r)[0],s=l.orientation[0],[b,o]=m,c="circle",h=b/2,y=o/2;if(s.type==="shape"){if(c=s.value,s.at)if(s.at.type==="position")h=s.at.value.x.value,y=s.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+s.at.type)}else throw new Error("orientation.type not implemented: "+s.type);let _=Re(u,l.colorStops),w=`satori_radial_${d}`,G=`satori_pattern_${d}`,W={},N=Math.max(Math.abs(b-h),Math.abs(h)),S=Math.max(Math.abs(o-y),Math.abs(y));if(c==="circle")W.r=Math.sqrt(N*N+S*S);else if(c==="ellipse"){let k=S!==0?N/S:1;W.ry=Math.sqrt(N*N+S*S*k*k)/k,W.rx=W.ry*k}let H=x("pattern",{id:G,x:g[0],y:g[1],width:i?b:"100%",height:a?o:"100%",patternUnits:"userSpaceOnUse"},x("radialGradient",{id:w},_.map(k=>x("stop",{offset:k.offset,"stop-color":k.color})).join(""))+x(c,id(M({cx:h,cy:y,width:b,height:o},W),{fill:`url(#${w})`})));return[G,H]}if(r.startsWith("url(")){let l=r.slice(4,-1);return[`satori_bi${d}`,x("pattern",{id:`satori_bi${d}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0],y:g[1],width:i?m[0]:"100%",height:a?m[1]:"100%"},x("image",{x:0,y:0,width:m[0],height:m[1],href:l}))]}}function Id(d,u,e){return e<d+u&&(e/2<d&&e/2<u?d=u=e/2:e/2<d?d=e-u:e/2<u&&(u=e-d)),[d,u]}function Ed({left:d,top:u,width:e,height:r},f){let{borderTopLeftRadius:t,borderTopRightRadius:n,borderBottomLeftRadius:i,borderBottomRightRadius:a}=f;return t=Math.min(t||0,e,r),n=Math.min(n||0,e,r),i=Math.min(i||0,e,r),a=Math.min(a||0,e,r),!t&&!n&&!i&&!a?"":([t,n]=Id(t,n,e),[t,i]=Id(t,i,r),[n,a]=Id(n,a,r),[i,a]=Id(i,a,e),`M${d+t},${u} h${e-t-n} a${n},${n} 0 0 1 ${n},${n} v${r-n-a} a${a},${a} 0 0 1 ${-a},${a} h${a+i-e} a${i},${i} 0 0 1 ${-i},${-i} v${i+t-r} a${t},${t} 0 0 1 ${t},${-t}`)}function Zd({left:d,top:u,width:e,height:r,path:f,id:t},n){return n.overflow!=="hidden"?"":f?x("clipPath",{id:`satori_cp-${t}`,"clip-path":n._inheritedClipPathId?`url(#${n._inheritedClipPathId})`:void 0},x("path",{x:d,y:u,width:e,height:r,d:f})):x("clipPath",{id:`satori_cp-${t}`,"clip-path":n._inheritedClipPathId?`url(#${n._inheritedClipPathId})`:void 0},x("rect",{x:d,y:u,width:e,height:r}))}function Qd({id:d,left:u,top:e,width:r,height:f,isInheritingTransform:t,debug:n},i){if(i.display==="none")return"";let a="rect",m="transparent",g=0,l="",s="",b=[],o=1,c="";i.backgroundColor&&b.push(i.backgroundColor),i.borderWidth&&(g=i.borderWidth,m=i.borderColor),i.opacity&&(o=+i.opacity),i.transform&&(l=cd({left:u,top:e,width:r,height:f},i.transform,t,i.transformOrigin));let h="";if(i.backgroundImage){let H=i.backgroundImage.map((T,k)=>Kd({id:d+"_"+k,width:r,height:f},T)).filter(Boolean);for(let T of H)b.push(`url(#${T[0]})`),s+=T[1],T[2]&&(h+=T[2])}let y=Ed({left:u,top:e,width:r,height:f},i);y&&(a="path");let _=Zd({left:u,top:e,width:r,height:f,path:y,id:d},i),w=i._inheritedClipPathId,G=sd({width:r,height:f,id:d},i);n&&(c=x("rect",{x:u,y:e,width:r,height:f,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:l||void 0,"clip-path":w?`url(#${w})`:void 0})),b.length||b.push("transparent");let{backgroundClip:W,filter:N}=i,S=b.map((H,T)=>{if(H==="transparent"&&!(T===b.length-1&&g))return"";let k=T===b.length-1&&g&&W!=="text";return x(a,{x:u,y:e,width:r,height:f,fill:H,stroke:k?m:void 0,"stroke-width":k?g:void 0,d:y||void 0,transform:l||void 0,"clip-path":W==="text"?`url(#satori_bct-${d})`:w?`url(#${w})`:void 0,style:N?`filter:${N}`:void 0})}).join("");return W==="text"&&g&&(S=x(a,{x:u,y:e,width:r,height:f,fill:"transparent",stroke:m,"stroke-width":g,d:y||void 0,transform:l||void 0,"clip-path":w?`url(#${w})`:void 0})+S),(s?`<defs>${s}</defs>`:"")+_+(G?`${G}<g filter="url(#satori_s-${d})">`:"")+(o!==1?`<g opacity="${o}">`:"")+(h||S)+(o!==1?"</g>":"")+(G?"</g>":"")+c}function de({id:d,left:u,top:e,width:r,height:f,src:t,debug:n,isInheritingTransform:i},a){if(a.display==="none")return"";let m="",g=1,l="",s=a.objectFit==="contain"?"xMidYMid":a.objectFit==="cover"?"xMidYMid slice":"none",b=Ed({left:u,top:e,width:r,height:f},a),o=a._inheritedClipPathId;b&&(m=x("clipPath",{id:`satori_c-${d}`,"clip-path":o?`url(#${o})`:void 0},x("path",{x:u,y:e,width:r,height:f,d:b}))),a.opacity&&(g=+a.opacity);let c=sd({width:r,height:f,id:d},a);return a.transform&&(l=cd({left:u,top:e,width:r,height:f},a.transform,i,a.transformOrigin)),c+(c?`<g filter="url(#satori_s-${d})">`:"")+m+x("image",{x:u,y:e,width:r,height:f,href:t,preserveAspectRatio:s,transform:l||void 0,"clip-path":m?`url(#satori_c-${d})`:o?`url(#${o})`:void 0})+(c?"</g>":"")}function*_d(d,u){let e=ed(),{id:r,inheritedStyle:f,parent:t,font:n,debug:i,embedFont:a=!0,graphemeImages:m,canLoadAdditionalAssets:g}=u;if(d===null||typeof d=="undefined")return yield,yield,"";if(!Wd(d)||typeof d.type=="function"){let v;if(!Wd(d))v=Vd(String(d),u),yield v.next().value;else{if(me(d.type))throw new Error("Class component is not supported.");v=_d(d.type(d.props),u),yield v.next().value}v.next();let p=yield;return v.next(p).value}let{type:l,props:s}=d,{style:b,children:o}=s,c=e.Node.create();t.insertChild(c,t.getChildCount());let[h,y]=Xd(c,l,f,b,s),_=h.transform===f.transform;if(_||(h.transform.__parent=f.transform),h.overflow==="hidden"&&(y._inheritedClipPathId=`satori_cp-${r}`),h.backgroundClip==="text"){let v={value:""};y._inheritedBackgroundClipTextPath=v,h._inheritedBackgroundClipTextPath=v}let w=typeof o=="undefined"?[]:[].concat(o),G=[],W=0,N=[];for(let v of w){let p=_d(v,{id:r+"-"+W++,parentStyle:h,inheritedStyle:y,isInheritingTransform:!0,parent:c,font:n,embedFont:a,debug:i,graphemeImages:m,canLoadAdditionalAssets:g});g?N.push(...p.next().value||[]):p.next(),G.push(p)}yield N;for(let v of G)v.next();let[S,H]=yield;h.position==="absolute"&&c.calculateLayout();let{left:T,top:k,width:X,height:K}=c.getComputedLayout();T+=S,k+=H;let Q="",R="",$="";l==="img"?R=de({id:r,left:T,top:k,width:X,height:K,src:s.src,isInheritingTransform:_,debug:i},h):R=Qd({id:r,left:T,top:k,width:X,height:K,isInheritingTransform:_,debug:i},h);for(let v of G)Q+=v.next([T,k]).value;return h._inheritedBackgroundClipTextPath&&($+=x("clipPath",{id:`satori_bct-${r}`,"clip-path":h._inheritedClipPathId?`url(#${h._inheritedClipPathId})`:void 0},h._inheritedBackgroundClipTextPath.value)),$+R+Q}import su from"@shuding/opentype.js";function lu(d,u,[e,r],[f,t]){if(e!==f)return e?!f||e===d?-1:f===d?1:d===400&&e===500||d===500&&e===400?-1:d===400&&f===500||d===500&&f===400?1:d<400?e<d&&f<d?f-e:e<d?-1:f<d?1:e-f:d<e&&d<f?e-f:d<e?-1:d<f?1:f-e:1;if(r!==t){if(r===u)return-1;if(t===u)return 1}return-1}var Ad=class{constructor(u){this.fonts=new Map;this.addFonts(u)}get({name:u,weight:e,style:r}){if(!this.fonts.has(u))return null;e==="normal"&&(e=400),e==="bold"&&(e=700);let f=[...this.fonts.get(u)],t=f[0];for(let n=1;n<f.length;n++){let[,i,a]=t,[,m,g]=f[n];lu(e,r,[i,a],[m,g])>0&&(t=f[n])}return t[0]}addFonts(u){for(let e of u){let r=e.data,f=su.parse("buffer"in r?r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength):r,{lowMemory:!0}),t=f.charToGlyphIndex;f.charToGlyphIndex=i=>{let a=t.call(f,i);return a===0&&f._trackBrokenChars&&f._trackBrokenChars.push(i),a},this.defaultFont||(this.defaultFont=f);let n=e.name.toLowerCase();this.fonts.has(n)||this.fonts.set(n,[]),this.fonts.get(n).push([f,e.weight,e.style])}}getEngine(u=16,e=1.2,{fontFamily:r,fontWeight:f=400,fontStyle:t="normal"}){r=Array.isArray(r)?r:[r];let n=r.map(o=>this.get({name:o,weight:f,style:t})).filter(Boolean),i=Array.from(this.fonts.keys());for(let o of i)r.includes(o)||n.push(this.get({name:o,weight:f,style:t}));let a=new Map,m=(o,c=!0)=>{let h=o.charCodeAt(0);if(a.has(h))return a.get(h);let y=n.find((_,w)=>!!_.charToGlyphIndex(o)||c&&w===n.length-1);return y&&a.set(h,y),y},g=(o,c=!1)=>{var y,_;return((c?(_=(y=o.tables)==null?void 0:y.os2)==null?void 0:_.sTypoAscender:0)||o.ascender)/o.unitsPerEm*u},l=(o,c=!1)=>{var y,_;return((c?(_=(y=o.tables)==null?void 0:y.os2)==null?void 0:_.sTypoDescender:0)||o.descender)/o.unitsPerEm*u},s=o=>m(o,!1),b={check:o=>{let c=s(o);return c?(c._trackBrokenChars=[],c.stringToGlyphs(o),c._trackBrokenChars.length?(c._trackBrokenChars=void 0,!1):!0):!1},baseline:(o,c=typeof o=="undefined"?n[0]:m(o))=>{let h=g(c,!0),y=l(c,!0),_=h-y,w=b.glyphHeight(o,c),G=(w-_)/2,{yMax:W,yMin:N}=c.tables.head,S=W/(W-N);return G+S*w},glyphHeight:(o,c=typeof o=="undefined"?n[0]:m(o))=>(g(c)-l(c))*e/1.2,measure:(o,c)=>this.measure(m,o,c),getSVG:(o,c)=>this.getSVG(m,o,c)};return b}patchFontFallbackResolver(u,e){let r=[];u._trackBrokenChars=r;let f=u.stringToGlyphs;return u.stringToGlyphs=(t,...n)=>{let i=f.call(u,t,...n);for(let a=0;a<i.length;a++)if(i[a].unicode===void 0){let m=r.shift(),g=e(m);g!==u&&(i[a]=g.charToGlyph(m))}return i},()=>{u.stringToGlyphs=f,u._trackBrokenChars=void 0}}measure(u,e,{fontSize:r,letterSpacing:f=0}){let t=u(e),n=this.patchFontFallbackResolver(t,u);try{return t.getAdvanceWidth(e,r,{letterSpacing:f/r})}finally{n()}}getSVG(u,e,{fontSize:r,top:f,left:t,letterSpacing:n=0}){let i=u(e),a=this.patchFontFallbackResolver(i,u);try{return i.getPath(e,t,f,r,{letterSpacing:n/r}).toPathData(1)}finally{a()}}};function ee({width:d,height:u,content:e}){return x("svg",{width:d,height:u,viewBox:`0 0 ${d} ${u}`,xmlns:"http://www.w3.org/2000/svg"},e)}var pu=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g;function ve(d){return d.match(pu)}var ue=new WeakMap;async function Ce(d,u){let e=ed();if(!e)throw new Error("Satori is not initialized.");let r;ue.has(u.fonts)?r=ue.get(u.fonts):ue.set(u.fonts,r=new Ad(u.fonts));let f=e.Node.create();f.setWidth(u.width),f.setHeight(u.height),f.setFlexDirection(e.FLEX_DIRECTION_ROW),f.setFlexWrap(e.WRAP_WRAP),f.setAlignContent(e.ALIGN_AUTO),f.setAlignItems(e.ALIGN_FLEX_START),f.setJustifyContent(e.JUSTIFY_FLEX_START),f.setOverflow(e.OVERFLOW_HIDDEN);let t=M({},u.graphemeImages),n=_d(d,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:u.width,_viewportHeight:u.height},parent:f,font:r,embedFont:u.embedFont,debug:u.debug,graphemeImages:t,canLoadAdditionalAssets:!!u.loadAdditionalAsset}),i=n.next().value;if(u.loadAdditionalAsset&&i.length){i=Array.from(new Set(od(i.join(""),"grapheme")));let m={};i.forEach(s=>mu.detect(s,b=>{b==="unknown"&&ve(s)&&(b="emoji"),m[b]=m[b]||[],b==="emoji"?m[b].push(s):m[b][0]=(m[b][0]||"")+s}));let g=[],l={};await Promise.all(Object.entries(m).flatMap(([s,b])=>b.map(o=>u.loadAdditionalAsset(s,o).then(c=>{typeof c=="string"?l[o]=c:c&&g.push(c)})))),r.addFonts(g),Object.assign(t,l)}n.next(),f.calculateLayout(u.width,u.height,e.DIRECTION_LTR);let a=n.next([0,0]).value;return f.freeRecursive(),ee({width:u.width,height:u.height,content:a})}export{Ce as default,We as init};
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
//# sourceMappingURL=index.wasm.js.map

@@ -27,3 +27,4 @@ import { ReactNode } from 'react';

graphemeImages?: Record<string, string>;
loadAdditionalAsset?: (code: string, segment: string) => Promise<FontOptions | string | undefined>;
detectLanguage?: (segment: string) => Promise<string> | string;
loadAdditionalAsset?: (languageCode: string, segment: string) => Promise<FontOptions | string | undefined>;
}

@@ -30,0 +31,0 @@

{
"name": "satori",
"version": "0.0.20",
"version": "0.0.21",
"description": "Satori converts HTML JSX to SVG string.",

@@ -5,0 +5,0 @@ "module": "./dist/esm/index.js",

@@ -185,3 +185,3 @@ <h1 align="center">

{
// `code` will be the detected language code, or `unknwon` if not able to tell.
// `code` will be the detected language code, `emoji` if it's an Emoji, or `unknwon` if not able to tell.
// `segment` will be the content to render.

@@ -188,0 +188,0 @@ loadAdditionalAsset: async (code: string, segment: string) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc