satori 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/experimental.cjs +1 -1
- package/dist/experimental.cjs.map +1 -1
- package/dist/experimental.js +1 -1
- package/dist/experimental.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/standalone.cjs +1 -1
- package/dist/standalone.cjs.map +1 -1
- package/dist/standalone.js +1 -1
- package/dist/standalone.js.map +1 -1
- package/package.json +1 -1
package/dist/experimental.cjs
CHANGED
|
@@ -3,6 +3,6 @@ var wl=Object.create;var qr=Object.defineProperty;var Dl=Object.getOwnPropertyDe
|
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return t=A[Symbol.iterator](),t.next.bind(t)}function iB(A,e){if(A){if(typeof A=="string")return Xg(A,e);var t=Object.prototype.toString.call(A).slice(8,-1);if(t==="Object"&&A.constructor&&(t=A.constructor.name),t==="Map"||t==="Set")return Array.from(A);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xg(A,e)}}function Xg(A,e){(e==null||e>A.length)&&(e=A.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=A[t];return r}function Vg(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function oB(A,e,t){return e&&Vg(A.prototype,e),t&&Vg(A,t),A}function sB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,Ao(A,e)}function Ao(A,e){return Ao=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Ao(A,e)}var aB=function(A){sB(e,A);function e(r){var n;return n=A.call(this,r)||this,n.nodes||(n.nodes=[]),n}var t=e.prototype;return t.append=function(n){return n.parent=this,this.nodes.push(n),this},t.prepend=function(n){return n.parent=this,this.nodes.unshift(n),this},t.at=function(n){return this.nodes[n]},t.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},t.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var i;for(var o in this.indexes)i=this.indexes[o],i>=n&&(this.indexes[o]=i-1);return this},t.removeAll=function(){for(var n=nB(this.nodes),i;!(i=n()).done;){var o=i.value;o.parent=void 0}return this.nodes=[],this},t.empty=function(){return this.removeAll()},t.insertAfter=function(n,i){i.parent=this;var o=this.index(n);this.nodes.splice(o+1,0,i),i.parent=this;var s;for(var a in this.indexes)s=this.indexes[a],o<=s&&(this.indexes[a]=s+1);return this},t.insertBefore=function(n,i){i.parent=this;var o=this.index(n);this.nodes.splice(o,0,i),i.parent=this;var s;for(var a in this.indexes)s=this.indexes[a],s<=o&&(this.indexes[a]=s+1);return this},t._findChildAtPosition=function(n,i){var o=void 0;return this.each(function(s){if(s.atPosition){var a=s.atPosition(n,i);if(a)return o=a,!1}else if(s.isAtPosition(n,i))return o=s,!1}),o},t.atPosition=function(n,i){if(this.isAtPosition(n,i))return this._findChildAtPosition(n,i)||this},t._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},t.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var i=this.lastEach;if(this.indexes[i]=0,!!this.length){for(var o,s;this.indexes[i]<this.length&&(o=this.indexes[i],s=n(this.at(o),o),s!==!1);)this.indexes[i]+=1;if(delete this.indexes[i],s===!1)return!1}},t.walk=function(n){return this.each(function(i,o){var s=n(i,o);if(s!==!1&&i.length&&(s=i.walk(n)),s===!1)return!1})},t.walkAttributes=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.ATTRIBUTE)return n.call(i,o)})},t.walkClasses=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.CLASS)return n.call(i,o)})},t.walkCombinators=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.COMBINATOR)return n.call(i,o)})},t.walkComments=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.COMMENT)return n.call(i,o)})},t.walkIds=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.ID)return n.call(i,o)})},t.walkNesting=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.NESTING)return n.call(i,o)})},t.walkPseudos=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.PSEUDO)return n.call(i,o)})},t.walkTags=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.TAG)return n.call(i,o)})},t.walkUniversals=function(n){var i=this;return this.walk(function(o){if(o.type===Ye.UNIVERSAL)return n.call(i,o)})},t.split=function(n){var i=this,o=[];return this.reduce(function(s,a,g){var u=n.call(i,a);return o.push(a),u?(s.push(o),o=[]):g===i.length-1&&s.push(o),s},[])},t.map=function(n){return this.nodes.map(n)},t.reduce=function(n,i){return this.nodes.reduce(n,i)},t.every=function(n){return this.nodes.every(n)},t.some=function(n){return this.nodes.some(n)},t.filter=function(n){return this.nodes.filter(n)},t.sort=function(n){return this.nodes.sort(n)},t.toString=function(){return this.map(String).join("")},oB(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e}(eB.default);ur.default=aB;Zg.exports=ur.default});var to=J((Ir,$g)=>{"use strict";Ir.__esModule=!0;Ir.default=void 0;var gB=IB(kn()),uB=_A();function IB(A){return A&&A.__esModule?A:{default:A}}function jg(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function lB(A,e,t){return e&&jg(A.prototype,e),t&&jg(A,t),A}function cB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,eo(A,e)}function eo(A,e){return eo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},eo(A,e)}var fB=function(A){cB(e,A);function e(r){var n;return n=A.call(this,r)||this,n.type=uB.ROOT,n}var t=e.prototype;return t.toString=function(){var n=this.reduce(function(i,o){return i.push(String(o)),i},[]).join(",");return this.trailingComma?n+",":n},t.error=function(n,i){return this._error?this._error(n,i):new Error(n)},lB(e,[{key:"errorGenerator",set:function(n){this._error=n}}]),e}(gB.default);Ir.default=fB;$g.exports=Ir.default});var no=J((lr,Au)=>{"use strict";lr.__esModule=!0;lr.default=void 0;var BB=QB(kn()),EB=_A();function QB(A){return A&&A.__esModule?A:{default:A}}function CB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,ro(A,e)}function ro(A,e){return ro=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},ro(A,e)}var dB=function(A){CB(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=EB.SELECTOR,r}return e}(BB.default);lr.default=dB;Au.exports=lr.default});var Rn=J((Pm,eu)=>{"use strict";var pB={},hB=pB.hasOwnProperty,mB=function(e,t){if(!e)return t;var r={};for(var n in t)r[n]=hB.call(e,n)?e[n]:t[n];return r},yB=/[ -,\.\/:-@\[-\^`\{-~]/,wB=/[ -,\.\/:-@\[\]\^`\{-~]/,DB=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,io=function A(e,t){t=mB(t,A.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var r=t.quotes=="double"?'"':"'",n=t.isIdentifier,i=e.charAt(0),o="",s=0,a=e.length;s<a;){var g=e.charAt(s++),u=g.charCodeAt(),I=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&s<a){var B=e.charCodeAt(s++);(B&64512)==56320?u=((u&1023)<<10)+(B&1023)+65536:s--}I="\\"+u.toString(16).toUpperCase()+" "}else t.escapeEverything?yB.test(g)?I="\\"+g:I="\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(g)?I="\\"+u.toString(16).toUpperCase()+" ":g=="\\"||!n&&(g=='"'&&r==g||g=="'"&&r==g)||n&&wB.test(g)?I="\\"+g:I=g;o+=I}return n&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(i)&&(o="\\3"+i+" "+o.slice(1))),o=o.replace(DB,function(f,E,C){return E&&E.length%2?f:(E||"")+C}),!n&&t.wrap?r+o+r:o};io.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};io.version="3.0.0";eu.exports=io});var so=J((cr,nu)=>{"use strict";cr.__esModule=!0;cr.default=void 0;var bB=ru(Rn()),SB=ar(),xB=ru(Ke()),kB=_A();function ru(A){return A&&A.__esModule?A:{default:A}}function tu(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function RB(A,e,t){return e&&tu(A.prototype,e),t&&tu(A,t),A}function vB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,oo(A,e)}function oo(A,e){return oo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},oo(A,e)}var FB=function(A){vB(e,A);function e(r){var n;return n=A.call(this,r)||this,n.type=kB.CLASS,n._constructed=!0,n}var t=e.prototype;return t.valueToString=function(){return"."+A.prototype.valueToString.call(this)},RB(e,[{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var i=(0,bB.default)(n,{isIdentifier:!0});i!==n?((0,SB.ensureObject)(this,"raws"),this.raws.value=i):this.raws&&delete this.raws.value}this._value=n}}]),e}(xB.default);cr.default=FB;nu.exports=cr.default});var go=J((fr,iu)=>{"use strict";fr.__esModule=!0;fr.default=void 0;var NB=LB(Ke()),MB=_A();function LB(A){return A&&A.__esModule?A:{default:A}}function GB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,ao(A,e)}function ao(A,e){return ao=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},ao(A,e)}var UB=function(A){GB(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=MB.COMMENT,r}return e}(NB.default);fr.default=UB;iu.exports=fr.default});var Io=J((Br,ou)=>{"use strict";Br.__esModule=!0;Br.default=void 0;var HB=TB(Ke()),OB=_A();function TB(A){return A&&A.__esModule?A:{default:A}}function PB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,uo(A,e)}function uo(A,e){return uo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},uo(A,e)}var _B=function(A){PB(e,A);function e(r){var n;return n=A.call(this,r)||this,n.type=OB.ID,n}var t=e.prototype;return t.valueToString=function(){return"#"+A.prototype.valueToString.call(this)},e}(HB.default);Br.default=_B;ou.exports=Br.default});var vn=J((Er,gu)=>{"use strict";Er.__esModule=!0;Er.default=void 0;var JB=au(Rn()),WB=ar(),KB=au(Ke());function au(A){return A&&A.__esModule?A:{default:A}}function su(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function YB(A,e,t){return e&&su(A.prototype,e),t&&su(A,t),A}function qB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,lo(A,e)}function lo(A,e){return lo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},lo(A,e)}var XB=function(A){qB(e,A);function e(){return A.apply(this,arguments)||this}var t=e.prototype;return t.qualifiedName=function(n){return this.namespace?this.namespaceString+"|"+n:n},t.valueToString=function(){return this.qualifiedName(A.prototype.valueToString.call(this))},YB(e,[{key:"namespace",get:function(){return this._namespace},set:function(n){if(n===!0||n==="*"||n==="&"){this._namespace=n,this.raws&&delete this.raws.namespace;return}var i=(0,JB.default)(n,{isIdentifier:!0});this._namespace=n,i!==n?((0,WB.ensureObject)(this,"raws"),this.raws.namespace=i):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(n){this.namespace=n}},{key:"namespaceString",get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""}}]),e}(KB.default);Er.default=XB;gu.exports=Er.default});var fo=J((Qr,uu)=>{"use strict";Qr.__esModule=!0;Qr.default=void 0;var VB=ZB(vn()),zB=_A();function ZB(A){return A&&A.__esModule?A:{default:A}}function jB(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,co(A,e)}function co(A,e){return co=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},co(A,e)}var $B=function(A){jB(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=zB.TAG,r}return e}(VB.default);Qr.default=$B;uu.exports=Qr.default});var Eo=J((Cr,Iu)=>{"use strict";Cr.__esModule=!0;Cr.default=void 0;var AE=tE(Ke()),eE=_A();function tE(A){return A&&A.__esModule?A:{default:A}}function rE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,Bo(A,e)}function Bo(A,e){return Bo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Bo(A,e)}var nE=function(A){rE(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=eE.STRING,r}return e}(AE.default);Cr.default=nE;Iu.exports=Cr.default});var Co=J((dr,lu)=>{"use strict";dr.__esModule=!0;dr.default=void 0;var iE=sE(kn()),oE=_A();function sE(A){return A&&A.__esModule?A:{default:A}}function aE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,Qo(A,e)}function Qo(A,e){return Qo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Qo(A,e)}var gE=function(A){aE(e,A);function e(r){var n;return n=A.call(this,r)||this,n.type=oE.PSEUDO,n}var t=e.prototype;return t.toString=function(){var n=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),n,this.rawSpaceAfter].join("")},e}(iE.default);dr.default=gE;lu.exports=dr.default});var fu=J((_m,cu)=>{cu.exports=function(e,t){return function(...r){return console.warn(t),e(...r)}}});var Do=J(mr=>{"use strict";mr.__esModule=!0;mr.unescapeValue=wo;mr.default=void 0;var pr=yo(Rn()),uE=yo($i()),IE=yo(vn()),lE=_A(),po;function yo(A){return A&&A.__esModule?A:{default:A}}function Bu(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function cE(A,e,t){return e&&Bu(A.prototype,e),t&&Bu(A,t),A}function fE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,mo(A,e)}function mo(A,e){return mo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},mo(A,e)}var hr=fu(),BE=/^('|")([^]*)\1$/,EE=hr(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),QE=hr(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),CE=hr(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function wo(A){var e=!1,t=null,r=A,n=r.match(BE);return n&&(t=n[1],r=n[2]),r=(0,uE.default)(r),r!==A&&(e=!0),{deprecatedUsage:e,unescaped:r,quoteMark:t}}function dE(A){if(A.quoteMark!==void 0||A.value===void 0)return A;CE();var e=wo(A.value),t=e.quoteMark,r=e.unescaped;return A.raws||(A.raws={}),A.raws.value===void 0&&(A.raws.value=A.value),A.value=r,A.quoteMark=t,A}var Fn=function(A){fE(e,A);function e(r){var n;return r===void 0&&(r={}),n=A.call(this,dE(r))||this,n.type=lE.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:hr(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:hr(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}var t=e.prototype;return t.getQuotedValue=function(n){n===void 0&&(n={});var i=this._determineQuoteMark(n),o=ho[i],s=(0,pr.default)(this._value,o);return s},t._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},t.setValue=function(n,i){i===void 0&&(i={}),this._value=n,this._quoteMark=this._determineQuoteMark(i),this._syncRawValue()},t.smartQuoteMark=function(n){var i=this.value,o=i.replace(/[^']/g,"").length,s=i.replace(/[^"]/g,"").length;if(o+s===0){var a=(0,pr.default)(i,{isIdentifier:!0});if(a===i)return e.NO_QUOTE;var g=this.preferredQuoteMark(n);if(g===e.NO_QUOTE){var u=this.quoteMark||n.quoteMark||e.DOUBLE_QUOTE,I=ho[u],B=(0,pr.default)(i,I);if(B.length<a.length)return u}return g}else return s===o?this.preferredQuoteMark(n):s<o?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},t.preferredQuoteMark=function(n){var i=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return i===void 0&&(i=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),i===void 0&&(i=e.DOUBLE_QUOTE),i},t._syncRawValue=function(){var n=(0,pr.default)(this._value,ho[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},t._handleEscapes=function(n,i){if(this._constructed){var o=(0,pr.default)(i,{isIdentifier:!0});o!==i?this.raws[n]=o:delete this.raws[n]}},t._spacesFor=function(n){var i={before:"",after:""},o=this.spaces[n]||{},s=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(i,o,s)},t._stringFor=function(n,i,o){i===void 0&&(i=n),o===void 0&&(o=Eu);var s=this._spacesFor(i);return o(this.stringifyProperty(n),s)},t.offsetOf=function(n){var i=1,o=this._spacesFor("attribute");if(i+=o.before.length,n==="namespace"||n==="ns")return this.namespace?i:-1;if(n==="attributeNS"||(i+=this.namespaceString.length,this.namespace&&(i+=1),n==="attribute"))return i;i+=this.stringifyProperty("attribute").length,i+=o.after.length;var s=this._spacesFor("operator");i+=s.before.length;var a=this.stringifyProperty("operator");if(n==="operator")return a?i:-1;i+=a.length,i+=s.after.length;var g=this._spacesFor("value");i+=g.before.length;var u=this.stringifyProperty("value");if(n==="value")return u?i:-1;i+=u.length,i+=g.after.length;var I=this._spacesFor("insensitive");return i+=I.before.length,n==="insensitive"&&this.insensitive?i:-1},t.toString=function(){var n=this,i=[this.rawSpaceBefore,"["];return i.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(i.push(this._stringFor("operator")),i.push(this._stringFor("value")),i.push(this._stringFor("insensitiveFlag","insensitive",function(o,s){return o.length>0&&!n.quoted&&s.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(s.before=" "),Eu(o,s)}))),i.push("]"),i.push(this.rawSpaceAfter),i.join("")},cE(e,[{key:"quoted",get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){QE()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var i=wo(n),o=i.deprecatedUsage,s=i.unescaped,a=i.quoteMark;if(o&&EE(),s===this._value&&a===this._quoteMark)return;this._value=s,this._quoteMark=a,this._syncRawValue()}else this._value=n}},{key:"attribute",get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n}}]),e}(IE.default);mr.default=Fn;Fn.NO_QUOTE=null;Fn.SINGLE_QUOTE="'";Fn.DOUBLE_QUOTE='"';var ho=(po={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},po[null]={isIdentifier:!0},po);function Eu(A,e){return""+e.before+A+e.after}});var So=J((yr,Qu)=>{"use strict";yr.__esModule=!0;yr.default=void 0;var pE=mE(vn()),hE=_A();function mE(A){return A&&A.__esModule?A:{default:A}}function yE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,bo(A,e)}function bo(A,e){return bo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},bo(A,e)}var wE=function(A){yE(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=hE.UNIVERSAL,r.value="*",r}return e}(pE.default);yr.default=wE;Qu.exports=yr.default});var ko=J((wr,Cu)=>{"use strict";wr.__esModule=!0;wr.default=void 0;var DE=SE(Ke()),bE=_A();function SE(A){return A&&A.__esModule?A:{default:A}}function xE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,xo(A,e)}function xo(A,e){return xo=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},xo(A,e)}var kE=function(A){xE(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=bE.COMBINATOR,r}return e}(DE.default);wr.default=kE;Cu.exports=wr.default});var vo=J((Dr,du)=>{"use strict";Dr.__esModule=!0;Dr.default=void 0;var RE=FE(Ke()),vE=_A();function FE(A){return A&&A.__esModule?A:{default:A}}function NE(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,Ro(A,e)}function Ro(A,e){return Ro=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Ro(A,e)}var ME=function(A){NE(e,A);function e(t){var r;return r=A.call(this,t)||this,r.type=vE.NESTING,r.value="&",r}return e}(RE.default);Dr.default=ME;du.exports=Dr.default});var hu=J((Nn,pu)=>{"use strict";Nn.__esModule=!0;Nn.default=LE;function LE(A){return A.sort(function(e,t){return e-t})}pu.exports=Nn.default});var Fo=J(P=>{"use strict";P.__esModule=!0;P.combinator=P.word=P.comment=P.str=P.tab=P.newline=P.feed=P.cr=P.backslash=P.bang=P.slash=P.doubleQuote=P.singleQuote=P.space=P.greaterThan=P.pipe=P.equals=P.plus=P.caret=P.tilde=P.dollar=P.closeSquare=P.openSquare=P.closeParenthesis=P.openParenthesis=P.semicolon=P.colon=P.comma=P.at=P.asterisk=P.ampersand=void 0;var GE=38;P.ampersand=GE;var UE=42;P.asterisk=UE;var HE=64;P.at=HE;var OE=44;P.comma=OE;var TE=58;P.colon=TE;var PE=59;P.semicolon=PE;var _E=40;P.openParenthesis=_E;var JE=41;P.closeParenthesis=JE;var WE=91;P.openSquare=WE;var KE=93;P.closeSquare=KE;var YE=36;P.dollar=YE;var qE=126;P.tilde=qE;var XE=94;P.caret=XE;var VE=43;P.plus=VE;var zE=61;P.equals=zE;var ZE=124;P.pipe=ZE;var jE=62;P.greaterThan=jE;var $E=32;P.space=$E;var mu=39;P.singleQuote=mu;var AQ=34;P.doubleQuote=AQ;var eQ=47;P.slash=eQ;var tQ=33;P.bang=tQ;var rQ=92;P.backslash=rQ;var nQ=13;P.cr=nQ;var iQ=12;P.feed=iQ;var oQ=10;P.newline=oQ;var sQ=9;P.tab=sQ;var aQ=mu;P.str=aQ;var gQ=-1;P.comment=gQ;var uQ=-2;P.word=uQ;var IQ=-3;P.combinator=IQ});var Du=J(br=>{"use strict";br.__esModule=!0;br.default=CQ;br.FIELDS=void 0;var H=lQ(Fo()),Nt,lA;function wu(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return wu=function(){return A},A}function lQ(A){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var e=wu();if(e&&e.has(A))return e.get(A);var t={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in A)if(Object.prototype.hasOwnProperty.call(A,n)){var i=r?Object.getOwnPropertyDescriptor(A,n):null;i&&(i.get||i.set)?Object.defineProperty(t,n,i):t[n]=A[n]}return t.default=A,e&&e.set(A,t),t}var cQ=(Nt={},Nt[H.tab]=!0,Nt[H.newline]=!0,Nt[H.cr]=!0,Nt[H.feed]=!0,Nt),fQ=(lA={},lA[H.space]=!0,lA[H.tab]=!0,lA[H.newline]=!0,lA[H.cr]=!0,lA[H.feed]=!0,lA[H.ampersand]=!0,lA[H.asterisk]=!0,lA[H.bang]=!0,lA[H.comma]=!0,lA[H.colon]=!0,lA[H.semicolon]=!0,lA[H.openParenthesis]=!0,lA[H.closeParenthesis]=!0,lA[H.openSquare]=!0,lA[H.closeSquare]=!0,lA[H.singleQuote]=!0,lA[H.doubleQuote]=!0,lA[H.plus]=!0,lA[H.pipe]=!0,lA[H.tilde]=!0,lA[H.greaterThan]=!0,lA[H.equals]=!0,lA[H.dollar]=!0,lA[H.caret]=!0,lA[H.slash]=!0,lA),No={},yu="0123456789abcdefABCDEF";for(Mn=0;Mn<yu.length;Mn++)No[yu.charCodeAt(Mn)]=!0;var Mn;function BQ(A,e){var t=e,r;do{if(r=A.charCodeAt(t),fQ[r])return t-1;r===H.backslash?t=EQ(A,t)+1:t++}while(t<A.length);return t-1}function EQ(A,e){var t=e,r=A.charCodeAt(t+1);if(!cQ[r])if(No[r]){var n=0;do t++,n++,r=A.charCodeAt(t+1);while(No[r]&&n<6);n<6&&r===H.space&&t++}else t++;return t}var QQ={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};br.FIELDS=QQ;function CQ(A){var e=[],t=A.css.valueOf(),r=t,n=r.length,i=-1,o=1,s=0,a=0,g,u,I,B,f,E,C,p,y,w,S,x,b;function m(R,F){if(A.safe)t+=F,y=t.length-1;else throw A.error("Unclosed "+R,o,s-i,s)}for(;s<n;){switch(g=t.charCodeAt(s),g===H.newline&&(i=s,o+=1),g){case H.space:case H.tab:case H.newline:case H.cr:case H.feed:y=s;do y+=1,g=t.charCodeAt(y),g===H.newline&&(i=y,o+=1);while(g===H.space||g===H.newline||g===H.tab||g===H.cr||g===H.feed);b=H.space,B=o,I=y-i-1,a=y;break;case H.plus:case H.greaterThan:case H.tilde:case H.pipe:y=s;do y+=1,g=t.charCodeAt(y);while(g===H.plus||g===H.greaterThan||g===H.tilde||g===H.pipe);b=H.combinator,B=o,I=s-i,a=y;break;case H.asterisk:case H.ampersand:case H.bang:case H.comma:case H.equals:case H.dollar:case H.caret:case H.openSquare:case H.closeSquare:case H.colon:case H.semicolon:case H.openParenthesis:case H.closeParenthesis:y=s,b=g,B=o,I=s-i,a=y+1;break;case H.singleQuote:case H.doubleQuote:x=g===H.singleQuote?"'":'"',y=s;do for(f=!1,y=t.indexOf(x,y+1),y===-1&&m("quote",x),E=y;t.charCodeAt(E-1)===H.backslash;)E-=1,f=!f;while(f);b=H.str,B=o,I=s-i,a=y+1;break;default:g===H.slash&&t.charCodeAt(s+1)===H.asterisk?(y=t.indexOf("*/",s+2)+1,y===0&&m("comment","*/"),u=t.slice(s,y+1),p=u.split(`
|
|
4
4
|
`),C=p.length-1,C>0?(w=o+C,S=y-p[C].length):(w=o,S=i),b=H.comment,o=w,B=w,I=y-S):g===H.slash?(y=s,b=g,B=o,I=s-i,a=y+1):(y=BQ(t,s),b=H.word,B=o,I=y-i),a=y+1;break}e.push([b,o,s-i,B,I,s,a]),S&&(i=S,S=null),s=a}return e}});var Nu=J((Sr,Fu)=>{"use strict";Sr.__esModule=!0;Sr.default=void 0;var dQ=Be(to()),Mo=Be(no()),pQ=Be(so()),bu=Be(go()),hQ=Be(Io()),mQ=Be(fo()),Lo=Be(Eo()),yQ=Be(Co()),Su=Ln(Do()),wQ=Be(So()),Go=Be(ko()),DQ=Be(vo()),bQ=Be(hu()),L=Ln(Du()),T=Ln(Fo()),SQ=Ln(_A()),wA=ar(),ct,Uo;function vu(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return vu=function(){return A},A}function Ln(A){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var e=vu();if(e&&e.has(A))return e.get(A);var t={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in A)if(Object.prototype.hasOwnProperty.call(A,n)){var i=r?Object.getOwnPropertyDescriptor(A,n):null;i&&(i.get||i.set)?Object.defineProperty(t,n,i):t[n]=A[n]}return t.default=A,e&&e.set(A,t),t}function Be(A){return A&&A.__esModule?A:{default:A}}function xu(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}function xQ(A,e,t){return e&&xu(A.prototype,e),t&&xu(A,t),A}var To=(ct={},ct[T.space]=!0,ct[T.cr]=!0,ct[T.feed]=!0,ct[T.newline]=!0,ct[T.tab]=!0,ct),kQ=Object.assign({},To,(Uo={},Uo[T.comment]=!0,Uo));function ku(A){return{line:A[L.FIELDS.START_LINE],column:A[L.FIELDS.START_COL]}}function Ru(A){return{line:A[L.FIELDS.END_LINE],column:A[L.FIELDS.END_COL]}}function ft(A,e,t,r){return{start:{line:A,column:e},end:{line:t,column:r}}}function Mt(A){return ft(A[L.FIELDS.START_LINE],A[L.FIELDS.START_COL],A[L.FIELDS.END_LINE],A[L.FIELDS.END_COL])}function Ho(A,e){if(A)return ft(A[L.FIELDS.START_LINE],A[L.FIELDS.START_COL],e[L.FIELDS.END_LINE],e[L.FIELDS.END_COL])}function Lt(A,e){var t=A[e];if(typeof t=="string")return t.indexOf("\\")!==-1&&((0,wA.ensureObject)(A,"raws"),A[e]=(0,wA.unesc)(t),A.raws[e]===void 0&&(A.raws[e]=t)),A}function Oo(A,e){for(var t=-1,r=[];(t=A.indexOf(e,t+1))!==-1;)r.push(t);return r}function RQ(){var A=Array.prototype.concat.apply([],arguments);return A.filter(function(e,t){return t===A.indexOf(e)})}var vQ=function(){function A(t,r){r===void 0&&(r={}),this.rule=t,this.options=Object.assign({lossy:!1,safe:!1},r),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,L.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=Ho(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new dQ.default({source:n}),this.root.errorGenerator=this._errorGenerator();var i=new Mo.default({source:{start:{line:1,column:1}}});this.root.append(i),this.current=i,this.loop()}var e=A.prototype;return e._errorGenerator=function(){var r=this;return function(n,i){return typeof r.rule=="string"?new Error(n):r.rule.error(n,i)}},e.attribute=function(){var r=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[L.FIELDS.TYPE]!==T.closeSquare;)r.push(this.currToken),this.position++;if(this.currToken[L.FIELDS.TYPE]!==T.closeSquare)return this.expected("closing square bracket",this.currToken[L.FIELDS.START_POS]);var i=r.length,o={source:ft(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[L.FIELDS.START_POS]};if(i===1&&!~[T.word].indexOf(r[0][L.FIELDS.TYPE]))return this.expected("attribute",r[0][L.FIELDS.START_POS]);for(var s=0,a="",g="",u=null,I=!1;s<i;){var B=r[s],f=this.content(B),E=r[s+1];switch(B[L.FIELDS.TYPE]){case T.space:if(I=!0,this.options.lossy)break;if(u){(0,wA.ensureObject)(o,"spaces",u);var C=o.spaces[u].after||"";o.spaces[u].after=C+f;var p=(0,wA.getProp)(o,"raws","spaces",u,"after")||null;p&&(o.raws.spaces[u].after=p+f)}else a=a+f,g=g+f;break;case T.asterisk:if(E[L.FIELDS.TYPE]===T.equals)o.operator=f,u="operator";else if((!o.namespace||u==="namespace"&&!I)&&E){a&&((0,wA.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=a,a=""),g&&((0,wA.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=a,g=""),o.namespace=(o.namespace||"")+f;var y=(0,wA.getProp)(o,"raws","namespace")||null;y&&(o.raws.namespace+=f),u="namespace"}I=!1;break;case T.dollar:if(u==="value"){var w=(0,wA.getProp)(o,"raws","value");o.value+="$",w&&(o.raws.value=w+"$");break}case T.caret:E[L.FIELDS.TYPE]===T.equals&&(o.operator=f,u="operator"),I=!1;break;case T.combinator:if(f==="~"&&E[L.FIELDS.TYPE]===T.equals&&(o.operator=f,u="operator"),f!=="|"){I=!1;break}E[L.FIELDS.TYPE]===T.equals?(o.operator=f,u="operator"):!o.namespace&&!o.attribute&&(o.namespace=!0),I=!1;break;case T.word:if(E&&this.content(E)==="|"&&r[s+2]&&r[s+2][L.FIELDS.TYPE]!==T.equals&&!o.operator&&!o.namespace)o.namespace=f,u="namespace";else if(!o.attribute||u==="attribute"&&!I){a&&((0,wA.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=a,a=""),g&&((0,wA.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=g,g=""),o.attribute=(o.attribute||"")+f;var S=(0,wA.getProp)(o,"raws","attribute")||null;S&&(o.raws.attribute+=f),u="attribute"}else if(!o.value&&o.value!==""||u==="value"&&!I){var x=(0,wA.unesc)(f),b=(0,wA.getProp)(o,"raws","value")||"",m=o.value||"";o.value=m+x,o.quoteMark=null,(x!==f||b)&&((0,wA.ensureObject)(o,"raws"),o.raws.value=(b||m)+f),u="value"}else{var R=f==="i"||f==="I";(o.value||o.value==="")&&(o.quoteMark||I)?(o.insensitive=R,(!R||f==="I")&&((0,wA.ensureObject)(o,"raws"),o.raws.insensitiveFlag=f),u="insensitive",a&&((0,wA.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=a,a=""),g&&((0,wA.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=g,g="")):(o.value||o.value==="")&&(u="value",o.value+=f,o.raws.value&&(o.raws.value+=f))}I=!1;break;case T.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:B[L.FIELDS.START_POS]});var F=(0,Su.unescapeValue)(f),W=F.unescaped,Y=F.quoteMark;o.value=W,o.quoteMark=Y,u="value",(0,wA.ensureObject)(o,"raws"),o.raws.value=f,I=!1;break;case T.equals:if(!o.attribute)return this.expected("attribute",B[L.FIELDS.START_POS],f);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:B[L.FIELDS.START_POS]});o.operator=o.operator?o.operator+f:f,u="operator",I=!1;break;case T.comment:if(u)if(I||E&&E[L.FIELDS.TYPE]===T.space||u==="insensitive"){var $=(0,wA.getProp)(o,"spaces",u,"after")||"",cA=(0,wA.getProp)(o,"raws","spaces",u,"after")||$;(0,wA.ensureObject)(o,"raws","spaces",u),o.raws.spaces[u].after=cA+f}else{var eA=o[u]||"",IA=(0,wA.getProp)(o,"raws",u)||eA;(0,wA.ensureObject)(o,"raws"),o.raws[u]=IA+f}else g=g+f;break;default:return this.error('Unexpected "'+f+'" found.',{index:B[L.FIELDS.START_POS]})}s++}Lt(o,"attribute"),Lt(o,"namespace"),this.newNode(new Su.default(o)),this.position++},e.parseWhitespaceEquivalentTokens=function(r){r<0&&(r=this.tokens.length);var n=this.position,i=[],o="",s=void 0;do if(To[this.currToken[L.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[L.FIELDS.TYPE]===T.comment){var a={};o&&(a.before=o,o=""),s=new bu.default({value:this.content(),source:Mt(this.currToken),sourceIndex:this.currToken[L.FIELDS.START_POS],spaces:a}),i.push(s)}while(++this.position<r);if(o){if(s)s.spaces.after=o;else if(!this.options.lossy){var g=this.tokens[n],u=this.tokens[this.position-1];i.push(new Lo.default({value:"",source:ft(g[L.FIELDS.START_LINE],g[L.FIELDS.START_COL],u[L.FIELDS.END_LINE],u[L.FIELDS.END_COL]),sourceIndex:g[L.FIELDS.START_POS],spaces:{before:o,after:""}}))}}return i},e.convertWhitespaceNodesToSpace=function(r,n){var i=this;n===void 0&&(n=!1);var o="",s="";r.forEach(function(g){var u=i.lossySpace(g.spaces.before,n),I=i.lossySpace(g.rawSpaceBefore,n);o+=u+i.lossySpace(g.spaces.after,n&&u.length===0),s+=u+g.value+i.lossySpace(g.rawSpaceAfter,n&&I.length===0)}),s===o&&(s=void 0);var a={space:o,rawSpace:s};return a},e.isNamedCombinator=function(r){return r===void 0&&(r=this.position),this.tokens[r+0]&&this.tokens[r+0][L.FIELDS.TYPE]===T.slash&&this.tokens[r+1]&&this.tokens[r+1][L.FIELDS.TYPE]===T.word&&this.tokens[r+2]&&this.tokens[r+2][L.FIELDS.TYPE]===T.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var r=this.content(this.tokens[this.position+1]),n=(0,wA.unesc)(r).toLowerCase(),i={};n!==r&&(i.value="/"+r+"/");var o=new Go.default({value:"/"+n+"/",source:ft(this.currToken[L.FIELDS.START_LINE],this.currToken[L.FIELDS.START_COL],this.tokens[this.position+2][L.FIELDS.END_LINE],this.tokens[this.position+2][L.FIELDS.END_COL]),sourceIndex:this.currToken[L.FIELDS.START_POS],raws:i});return this.position=this.position+3,o}else this.unexpected()},e.combinator=function(){var r=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][L.FIELDS.TYPE]===T.comma){var i=this.parseWhitespaceEquivalentTokens(n);if(i.length>0){var o=this.current.last;if(o){var s=this.convertWhitespaceNodesToSpace(i),a=s.space,g=s.rawSpace;g!==void 0&&(o.rawSpaceAfter+=g),o.spaces.after+=a}else i.forEach(function(b){return r.newNode(b)})}return}var u=this.currToken,I=void 0;n>this.position&&(I=this.parseWhitespaceEquivalentTokens(n));var B;if(this.isNamedCombinator()?B=this.namedCombinator():this.currToken[L.FIELDS.TYPE]===T.combinator?(B=new Go.default({value:this.content(),source:Mt(this.currToken),sourceIndex:this.currToken[L.FIELDS.START_POS]}),this.position++):To[this.currToken[L.FIELDS.TYPE]]||I||this.unexpected(),B){if(I){var f=this.convertWhitespaceNodesToSpace(I),E=f.space,C=f.rawSpace;B.spaces.before=E,B.rawSpaceBefore=C}}else{var p=this.convertWhitespaceNodesToSpace(I,!0),y=p.space,w=p.rawSpace;w||(w=y);var S={},x={spaces:{}};y.endsWith(" ")&&w.endsWith(" ")?(S.before=y.slice(0,y.length-1),x.spaces.before=w.slice(0,w.length-1)):y.startsWith(" ")&&w.startsWith(" ")?(S.after=y.slice(1),x.spaces.after=w.slice(1)):x.value=w,B=new Go.default({value:" ",source:Ho(u,this.tokens[this.position-1]),sourceIndex:u[L.FIELDS.START_POS],spaces:S,raws:x})}return this.currToken&&this.currToken[L.FIELDS.TYPE]===T.space&&(B.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(B)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var r=new Mo.default({source:{start:ku(this.tokens[this.position+1])}});this.current.parent.append(r),this.current=r,this.position++},e.comment=function(){var r=this.currToken;this.newNode(new bu.default({value:this.content(),source:Mt(r),sourceIndex:r[L.FIELDS.START_POS]})),this.position++},e.error=function(r,n){throw this.root.error(r,n)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[L.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[L.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[L.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[L.FIELDS.START_POS])},e.namespace=function(){var r=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[L.FIELDS.TYPE]===T.word)return this.position++,this.word(r);if(this.nextToken[L.FIELDS.TYPE]===T.asterisk)return this.position++,this.universal(r)},e.nesting=function(){if(this.nextToken){var r=this.content(this.nextToken);if(r==="|"){this.position++;return}}var n=this.currToken;this.newNode(new DQ.default({value:this.content(),source:Mt(n),sourceIndex:n[L.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var r=this.current.last,n=1;if(this.position++,r&&r.type===SQ.PSEUDO){var i=new Mo.default({source:{start:ku(this.tokens[this.position-1])}}),o=this.current;for(r.append(i),this.current=i;this.position<this.tokens.length&&n;)this.currToken[L.FIELDS.TYPE]===T.openParenthesis&&n++,this.currToken[L.FIELDS.TYPE]===T.closeParenthesis&&n--,n?this.parse():(this.current.source.end=Ru(this.currToken),this.current.parent.source.end=Ru(this.currToken),this.position++);this.current=o}else{for(var s=this.currToken,a="(",g;this.position<this.tokens.length&&n;)this.currToken[L.FIELDS.TYPE]===T.openParenthesis&&n++,this.currToken[L.FIELDS.TYPE]===T.closeParenthesis&&n--,g=this.currToken,a+=this.parseParenthesisToken(this.currToken),this.position++;r?r.appendToPropertyAndEscape("value",a,a):this.newNode(new Lo.default({value:a,source:ft(s[L.FIELDS.START_LINE],s[L.FIELDS.START_COL],g[L.FIELDS.END_LINE],g[L.FIELDS.END_COL]),sourceIndex:s[L.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",this.currToken[L.FIELDS.START_POS])},e.pseudo=function(){for(var r=this,n="",i=this.currToken;this.currToken&&this.currToken[L.FIELDS.TYPE]===T.colon;)n+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[L.FIELDS.TYPE]===T.word)this.splitWord(!1,function(o,s){n+=o,r.newNode(new yQ.default({value:n,source:Ho(i,r.currToken),sourceIndex:i[L.FIELDS.START_POS]})),s>1&&r.nextToken&&r.nextToken[L.FIELDS.TYPE]===T.openParenthesis&&r.error("Misplaced parenthesis.",{index:r.nextToken[L.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[L.FIELDS.START_POS])},e.space=function(){var r=this.content();this.position===0||this.prevToken[L.FIELDS.TYPE]===T.comma||this.prevToken[L.FIELDS.TYPE]===T.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(r),this.position++):this.position===this.tokens.length-1||this.nextToken[L.FIELDS.TYPE]===T.comma||this.nextToken[L.FIELDS.TYPE]===T.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(r),this.position++):this.combinator()},e.string=function(){var r=this.currToken;this.newNode(new Lo.default({value:this.content(),source:Mt(r),sourceIndex:r[L.FIELDS.START_POS]})),this.position++},e.universal=function(r){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var i=this.currToken;this.newNode(new wQ.default({value:this.content(),source:Mt(i),sourceIndex:i[L.FIELDS.START_POS]}),r),this.position++},e.splitWord=function(r,n){for(var i=this,o=this.nextToken,s=this.content();o&&~[T.dollar,T.caret,T.equals,T.word].indexOf(o[L.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var g=this.nextToken;g&&g[L.FIELDS.TYPE]===T.space&&(s+=this.requiredSpace(this.content(g)),this.position++)}o=this.nextToken}var u=Oo(s,".").filter(function(E){var C=s[E-1]==="\\",p=/^\d+\.\d+%$/.test(s);return!C&&!p}),I=Oo(s,"#").filter(function(E){return s[E-1]!=="\\"}),B=Oo(s,"#{");B.length&&(I=I.filter(function(E){return!~B.indexOf(E)}));var f=(0,bQ.default)(RQ([0].concat(u,I)));f.forEach(function(E,C){var p=f[C+1]||s.length,y=s.slice(E,p);if(C===0&&n)return n.call(i,y,f.length);var w,S=i.currToken,x=S[L.FIELDS.START_POS]+f[C],b=ft(S[1],S[2]+E,S[3],S[2]+(p-1));if(~u.indexOf(E)){var m={value:y.slice(1),source:b,sourceIndex:x};w=new pQ.default(Lt(m,"value"))}else if(~I.indexOf(E)){var R={value:y.slice(1),source:b,sourceIndex:x};w=new hQ.default(Lt(R,"value"))}else{var F={value:y,source:b,sourceIndex:x};Lt(F,"value"),w=new mQ.default(F)}i.newNode(w,r),r=null}),this.position++},e.word=function(r){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(r)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(r){switch(this.currToken[L.FIELDS.TYPE]){case T.space:this.space();break;case T.comment:this.comment();break;case T.openParenthesis:this.parentheses();break;case T.closeParenthesis:r&&this.missingParenthesis();break;case T.openSquare:this.attribute();break;case T.dollar:case T.caret:case T.equals:case T.word:this.word();break;case T.colon:this.pseudo();break;case T.comma:this.comma();break;case T.asterisk:this.universal();break;case T.ampersand:this.nesting();break;case T.slash:case T.combinator:this.combinator();break;case T.str:this.string();break;case T.closeSquare:this.missingSquareBracket();case T.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(r,n,i){if(Array.isArray(r)){var o=r.pop();r=r.join(", ")+" or "+o}var s=/^[aeiou]/.test(r[0])?"an":"a";return i?this.error("Expected "+s+" "+r+', found "'+i+'" instead.',{index:n}):this.error("Expected "+s+" "+r+".",{index:n})},e.requiredSpace=function(r){return this.options.lossy?" ":r},e.optionalSpace=function(r){return this.options.lossy?"":r},e.lossySpace=function(r,n){return this.options.lossy?n?" ":"":r},e.parseParenthesisToken=function(r){var n=this.content(r);return r[L.FIELDS.TYPE]===T.space?this.requiredSpace(n):n},e.newNode=function(r,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),r.namespace=n,Lt(r,"namespace")),this.spaces&&(r.spaces.before=this.spaces,this.spaces=""),this.current.append(r)},e.content=function(r){return r===void 0&&(r=this.currToken),this.css.slice(r[L.FIELDS.START_POS],r[L.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(r){r===void 0&&(r=this.position+1);for(var n=r;n<this.tokens.length;)if(kQ[this.tokens[n][L.FIELDS.TYPE]]){n++;continue}else return n;return-1},xQ(A,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),A}();Sr.default=vQ;Fu.exports=Sr.default});var Lu=J((xr,Mu)=>{"use strict";xr.__esModule=!0;xr.default=void 0;var FQ=NQ(Nu());function NQ(A){return A&&A.__esModule?A:{default:A}}var MQ=function(){function A(t,r){this.func=t||function(){},this.funcRes=null,this.options=r}var e=A.prototype;return e._shouldUpdateSelector=function(r,n){n===void 0&&(n={});var i=Object.assign({},this.options,n);return i.updateSelector===!1?!1:typeof r!="string"},e._isLossy=function(r){r===void 0&&(r={});var n=Object.assign({},this.options,r);return n.lossless===!1},e._root=function(r,n){n===void 0&&(n={});var i=new FQ.default(r,this._parseOptions(n));return i.root},e._parseOptions=function(r){return{lossy:this._isLossy(r)}},e._run=function(r,n){var i=this;return n===void 0&&(n={}),new Promise(function(o,s){try{var a=i._root(r,n);Promise.resolve(i.func(a)).then(function(g){var u=void 0;return i._shouldUpdateSelector(r,n)&&(u=a.toString(),r.selector=u),{transform:g,root:a,string:u}}).then(o,s)}catch(g){s(g);return}})},e._runSync=function(r,n){n===void 0&&(n={});var i=this._root(r,n),o=this.func(i);if(o&&typeof o.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var s=void 0;return n.updateSelector&&typeof r!="string"&&(s=i.toString(),r.selector=s),{transform:o,root:i,string:s}},e.ast=function(r,n){return this._run(r,n).then(function(i){return i.root})},e.astSync=function(r,n){return this._runSync(r,n).root},e.transform=function(r,n){return this._run(r,n).then(function(i){return i.transform})},e.transformSync=function(r,n){return this._runSync(r,n).transform},e.process=function(r,n){return this._run(r,n).then(function(i){return i.string||i.root.toString()})},e.processSync=function(r,n){var i=this._runSync(r,n);return i.string||i.root.toString()},A}();xr.default=MQ;Mu.exports=xr.default});var Gu=J(QA=>{"use strict";QA.__esModule=!0;QA.universal=QA.tag=QA.string=QA.selector=QA.root=QA.pseudo=QA.nesting=QA.id=QA.comment=QA.combinator=QA.className=QA.attribute=void 0;var LQ=Ee(Do()),GQ=Ee(so()),UQ=Ee(ko()),HQ=Ee(go()),OQ=Ee(Io()),TQ=Ee(vo()),PQ=Ee(Co()),_Q=Ee(to()),JQ=Ee(no()),WQ=Ee(Eo()),KQ=Ee(fo()),YQ=Ee(So());function Ee(A){return A&&A.__esModule?A:{default:A}}var qQ=function(e){return new LQ.default(e)};QA.attribute=qQ;var XQ=function(e){return new GQ.default(e)};QA.className=XQ;var VQ=function(e){return new UQ.default(e)};QA.combinator=VQ;var zQ=function(e){return new HQ.default(e)};QA.comment=zQ;var ZQ=function(e){return new OQ.default(e)};QA.id=ZQ;var jQ=function(e){return new TQ.default(e)};QA.nesting=jQ;var $Q=function(e){return new PQ.default(e)};QA.pseudo=$Q;var AC=function(e){return new _Q.default(e)};QA.root=AC;var eC=function(e){return new JQ.default(e)};QA.selector=eC;var tC=function(e){return new WQ.default(e)};QA.string=tC;var rC=function(e){return new KQ.default(e)};QA.tag=rC;var nC=function(e){return new YQ.default(e)};QA.universal=nC});var Tu=J(iA=>{"use strict";iA.__esModule=!0;iA.isNode=Po;iA.isPseudoElement=Ou;iA.isPseudoClass=BC;iA.isContainer=EC;iA.isNamespace=QC;iA.isUniversal=iA.isTag=iA.isString=iA.isSelector=iA.isRoot=iA.isPseudo=iA.isNesting=iA.isIdentifier=iA.isComment=iA.isCombinator=iA.isClassName=iA.isAttribute=void 0;var DA=_A(),Ae,iC=(Ae={},Ae[DA.ATTRIBUTE]=!0,Ae[DA.CLASS]=!0,Ae[DA.COMBINATOR]=!0,Ae[DA.COMMENT]=!0,Ae[DA.ID]=!0,Ae[DA.NESTING]=!0,Ae[DA.PSEUDO]=!0,Ae[DA.ROOT]=!0,Ae[DA.SELECTOR]=!0,Ae[DA.STRING]=!0,Ae[DA.TAG]=!0,Ae[DA.UNIVERSAL]=!0,Ae);function Po(A){return typeof A=="object"&&iC[A.type]}function Qe(A,e){return Po(e)&&e.type===A}var Uu=Qe.bind(null,DA.ATTRIBUTE);iA.isAttribute=Uu;var oC=Qe.bind(null,DA.CLASS);iA.isClassName=oC;var sC=Qe.bind(null,DA.COMBINATOR);iA.isCombinator=sC;var aC=Qe.bind(null,DA.COMMENT);iA.isComment=aC;var gC=Qe.bind(null,DA.ID);iA.isIdentifier=gC;var uC=Qe.bind(null,DA.NESTING);iA.isNesting=uC;var _o=Qe.bind(null,DA.PSEUDO);iA.isPseudo=_o;var IC=Qe.bind(null,DA.ROOT);iA.isRoot=IC;var lC=Qe.bind(null,DA.SELECTOR);iA.isSelector=lC;var cC=Qe.bind(null,DA.STRING);iA.isString=cC;var Hu=Qe.bind(null,DA.TAG);iA.isTag=Hu;var fC=Qe.bind(null,DA.UNIVERSAL);iA.isUniversal=fC;function Ou(A){return _o(A)&&A.value&&(A.value.startsWith("::")||A.value.toLowerCase()===":before"||A.value.toLowerCase()===":after"||A.value.toLowerCase()===":first-letter"||A.value.toLowerCase()===":first-line")}function BC(A){return _o(A)&&!Ou(A)}function EC(A){return!!(Po(A)&&A.walk)}function QC(A){return Uu(A)||Hu(A)}});var Pu=J(ke=>{"use strict";ke.__esModule=!0;var Jo=_A();Object.keys(Jo).forEach(function(A){A==="default"||A==="__esModule"||A in ke&&ke[A]===Jo[A]||(ke[A]=Jo[A])});var Wo=Gu();Object.keys(Wo).forEach(function(A){A==="default"||A==="__esModule"||A in ke&&ke[A]===Wo[A]||(ke[A]=Wo[A])});var Ko=Tu();Object.keys(Ko).forEach(function(A){A==="default"||A==="__esModule"||A in ke&&ke[A]===Ko[A]||(ke[A]=Ko[A])})});var Wu=J((kr,Ju)=>{"use strict";kr.__esModule=!0;kr.default=void 0;var CC=hC(Lu()),dC=pC(Pu());function _u(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return _u=function(){return A},A}function pC(A){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var e=_u();if(e&&e.has(A))return e.get(A);var t={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in A)if(Object.prototype.hasOwnProperty.call(A,n)){var i=r?Object.getOwnPropertyDescriptor(A,n):null;i&&(i.get||i.set)?Object.defineProperty(t,n,i):t[n]=A[n]}return t.default=A,e&&e.set(A,t),t}function hC(A){return A&&A.__esModule?A:{default:A}}var Yo=function(e){return new CC.default(e)};Object.assign(Yo,dC);delete Yo.__esModule;var mC=Yo;kr.default=mC;Ju.exports=kr.default});var Ku=J(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});Object.defineProperty(qo,"default",{enumerable:!0,get:()=>yC});function yC(A){return A.replace(/\\,/g,"\\2c ")}});var qu=J((zm,Yu)=>{"use strict";Yu.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Vo=J(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});function wC(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}wC(Xo,{parseColor:()=>RC,formatColor:()=>vC});var Xu=DC(qu());function DC(A){return A&&A.__esModule?A:{default:A}}var bC=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,SC=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$e=/(?:\d+|\d*\.\d+)%?/,Gn=/(?:\s*,\s*|\s+)/,Vu=/\s*[,/]\s*/,At=/var\(--(?:[^ )]*?)\)/,xC=new RegExp(`^(rgb)a?\\(\\s*(${$e.source}|${At.source})(?:${Gn.source}(${$e.source}|${At.source}))?(?:${Gn.source}(${$e.source}|${At.source}))?(?:${Vu.source}(${$e.source}|${At.source}))?\\s*\\)$`),kC=new RegExp(`^(hsl)a?\\(\\s*((?:${$e.source})(?:deg|rad|grad|turn)?|${At.source})(?:${Gn.source}(${$e.source}|${At.source}))?(?:${Gn.source}(${$e.source}|${At.source}))?(?:${Vu.source}(${$e.source}|${At.source}))?\\s*\\)$`);function RC(A,{loose:e=!1}={}){var t,r;if(typeof A!="string")return null;if(A=A.trim(),A==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(A in Xu.default)return{mode:"rgb",color:Xu.default[A].map(a=>a.toString())};let n=A.replace(SC,(a,g,u,I,B)=>["#",g,g,u,u,I,I,B?B+B:""].join("")).match(bC);if(n!==null)return{mode:"rgb",color:[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)].map(a=>a.toString()),alpha:n[4]?(parseInt(n[4],16)/255).toString():void 0};var i;let o=(i=A.match(xC))!==null&&i!==void 0?i:A.match(kC);if(o===null)return null;let s=[o[2],o[3],o[4]].filter(Boolean).map(a=>a.toString());return!e&&s.length!==3||s.length<3&&!s.some(a=>/^var\(.*?\)$/.test(a))?null:{mode:o[1],color:s,alpha:(t=o[5])===null||t===void 0||(r=t.toString)===null||r===void 0?void 0:r.call(t)}}function vC({mode:A,color:e,alpha:t}){let r=t!==void 0;return`${A}(${e.join(" ")}${r?` / ${t}`:""})`}});var Zo=J(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});function FC(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}FC(zo,{withAlphaValue:()=>NC,default:()=>MC});var Un=Vo();function NC(A,e,t){if(typeof A=="function")return A({opacityValue:e});let r=(0,Un.parseColor)(A,{loose:!0});return r===null?t:(0,Un.formatColor)({...r,alpha:e})}function MC({color:A,property:e,variable:t}){let r=[].concat(e);if(typeof A=="function")return{[t]:"1",...Object.fromEntries(r.map(i=>[i,A({opacityVariable:t,opacityValue:`var(${t})`})]))};let n=(0,Un.parseColor)(A);return n===null?Object.fromEntries(r.map(i=>[i,A])):n.alpha!==void 0?Object.fromEntries(r.map(i=>[i,A])):{[t]:"1",...Object.fromEntries(r.map(i=>[i,(0,Un.formatColor)({...n,alpha:`var(${t})`})]))}}});var AI=J(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});function LC(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}LC(jo,{pattern:()=>UC,withoutCapturing:()=>Zu,any:()=>ju,optional:()=>HC,zeroOrMore:()=>OC,nestedBrackets:()=>$u,escape:()=>Bt});var zu=/[\\^$.*+?()[\]{}|]/g,GC=RegExp(zu.source);function Rr(A){return A=Array.isArray(A)?A:[A],A=A.map(e=>e instanceof RegExp?e.source:e),A.join("")}function UC(A){return new RegExp(Rr(A),"g")}function Zu(A){return new RegExp(`(?:${Rr(A)})`,"g")}function ju(A){return`(?:${A.map(Rr).join("|")})`}function HC(A){return`(?:${Rr(A)})?`}function OC(A){return`(?:${Rr(A)})*`}function $u(A,e,t=1){return Zu([Bt(A),/[^\s]*/,t===1?`[^${Bt(A)}${Bt(e)}s]*`:ju([`[^${Bt(A)}${Bt(e)}s]*`,$u(A,e,t-1)]),/[^\s]*/,Bt(e)])}function Bt(A){return A&&GC.test(A)?A.replace(zu,"\\$&"):A||""}});var tI=J($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});Object.defineProperty($o,"splitAtTopLevelOnly",{enumerable:!0,get:()=>_C});var TC=PC(AI());function eI(A){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(eI=function(r){return r?t:e})(A)}function PC(A,e){if(!e&&A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var t=eI(e);if(t&&t.has(A))return t.get(A);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in A)if(i!=="default"&&Object.prototype.hasOwnProperty.call(A,i)){var o=n?Object.getOwnPropertyDescriptor(A,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=A[i]}return r.default=A,t&&t.set(A,r),r}function*_C(A,e){let t=new RegExp(`[(){}\\[\\]${TC.escape(e)}]`,"g"),r=0,n=0,i=!1,o=0,s=0,a=e.length;for(let g of A.matchAll(t)){let u=g[0]===e[o],I=o===a-1,B=u&&I;g[0]==="("&&r++,g[0]===")"&&r--,g[0]==="["&&r++,g[0]==="]"&&r--,g[0]==="{"&&r++,g[0]==="}"&&r--,u&&r===0&&(s===0&&(s=g.index),o++),B&&r===0&&(i=!0,yield A.substring(n,s),n=s+a),o===a&&(o=0,s=0)}i?yield A.substring(n):yield A}});var nI=J(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});function JC(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}JC(As,{parseBoxShadowValue:()=>qC,formatBoxShadowValue:()=>XC});var WC=tI(),KC=new Set(["inset","inherit","initial","revert","unset"]),YC=/\ +(?![^(]*\))/g,rI=/^-?(\d+|\.\d+)(.*?)$/g;function qC(A){return Array.from((0,WC.splitAtTopLevelOnly)(A,",")).map(t=>{let r=t.trim(),n={raw:r},i=r.split(YC),o=new Set;for(let s of i)rI.lastIndex=0,!o.has("KEYWORD")&&KC.has(s)?(n.keyword=s,o.add("KEYWORD")):rI.test(s)?o.has("X")?o.has("Y")?o.has("BLUR")?o.has("SPREAD")||(n.spread=s,o.add("SPREAD")):(n.blur=s,o.add("BLUR")):(n.y=s,o.add("Y")):(n.x=s,o.add("X")):n.color?(n.unknown||(n.unknown=[]),n.unknown.push(s)):n.color=s;return n.valid=n.x!==void 0&&n.y!==void 0,n})}function XC(A){return A.map(e=>e.valid?[e.keyword,e.x,e.y,e.blur,e.spread,e.color].filter(Boolean).join(" "):e.raw).join(", ")}});var II=J(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});function VC(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}VC(ts,{normalize:()=>et,url:()=>sI,number:()=>jC,percentage:()=>aI,length:()=>gI,lineWidth:()=>ed,shadow:()=>td,color:()=>rd,image:()=>nd,gradient:()=>uI,position:()=>sd,familyName:()=>ad,genericName:()=>ud,absoluteSize:()=>ld,relativeSize:()=>fd});var zC=Vo(),ZC=nI(),es=["min","max","clamp","calc"],oI=/,(?![^(]*\))/g,Hn=/_(?![^(]*\))/g;function et(A,e=!0){return A.includes("url(")?A.split(/(url\(.*?\))/g).filter(Boolean).map(t=>/^url\(.*?\)$/.test(t)?t:et(t,!1)).join(""):(A=A.replace(/([^\\])_+/g,(t,r)=>r+" ".repeat(t.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),e&&(A=A.trim()),A=A.replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),A)}function sI(A){return A.startsWith("url(")}function jC(A){return!isNaN(Number(A))||es.some(e=>new RegExp(`^${e}\\(.+?`).test(A))}function aI(A){return A.split(Hn).every(e=>/%$/g.test(e)||es.some(t=>new RegExp(`^${t}\\(.+?%`).test(e)))}var $C=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","vw","vh","vmin","vmax"],iI=`(?:${$C.join("|")})`;function gI(A){return A.split(Hn).every(e=>e==="0"||new RegExp(`${iI}$`).test(e)||es.some(t=>new RegExp(`^${t}\\(.+?${iI}`).test(e)))}var Ad=new Set(["thin","medium","thick"]);function ed(A){return Ad.has(A)}function td(A){let e=(0,ZC.parseBoxShadowValue)(et(A));for(let t of e)if(!t.valid)return!1;return!0}function rd(A){let e=0;return A.split(Hn).every(r=>(r=et(r),r.startsWith("var(")?!0:(0,zC.parseColor)(r,{loose:!0})!==null?(e++,!0):!1))?e>0:!1}function nd(A){let e=0;return A.split(oI).every(r=>(r=et(r),r.startsWith("var(")?!0:sI(r)||uI(r)||["element(","image(","cross-fade(","image-set("].some(n=>r.startsWith(n))?(e++,!0):!1))?e>0:!1}var id=new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","conic-gradient"]);function uI(A){A=et(A);for(let e of id)if(A.startsWith(`${e}(`))return!0;return!1}var od=new Set(["center","top","right","bottom","left"]);function sd(A){let e=0;return A.split(Hn).every(r=>(r=et(r),r.startsWith("var(")?!0:od.has(r)||gI(r)||aI(r)?(e++,!0):!1))?e>0:!1}function ad(A){let e=0;return A.split(oI).every(r=>(r=et(r),r.startsWith("var(")?!0:r.includes(" ")&&!/(['"])([^"']+)\1/g.test(r)||/^\d/g.test(r)?!1:(e++,!0)))?e>0:!1}var gd=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function ud(A){return gd.has(A)}var Id=new Set(["xx-small","x-small","small","medium","large","x-large","x-large","xxx-large"]);function ld(A){return Id.has(A)}var cd=new Set(["larger","smaller"]);function fd(A){return cd.has(A)}});var dI=J(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});function Bd(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}Bd(is,{updateAllClasses:()=>Cd,asValue:()=>Fr,parseColorFormat:()=>rs,asColor:()=>EI,asLookupValue:()=>QI,coerceValue:()=>md});var Ed=ns(Wu()),Qd=ns(Ku()),lI=Zo(),ee=II(),cI=ns(_i());function ns(A){return A&&A.__esModule?A:{default:A}}function Cd(A,e){return(0,Ed.default)(n=>{n.walkClasses(i=>{let o=e(i.value);i.value=o,i.raws&&i.raws.value&&(i.raws.value=(0,Qd.default)(i.raws.value))})}).processSync(A)}function BI(A,e){if(!vr(A))return;let t=A.slice(1,-1);if(e(t))return(0,ee.normalize)(t)}function dd(A,e={},t){let r=e[A];if(r!==void 0)return(0,cI.default)(r);if(vr(A)){let n=BI(A,t);return n===void 0?void 0:(0,cI.default)(n)}}function Fr(A,e={},{validate:t=()=>!0}={}){var r;let n=(r=e.values)===null||r===void 0?void 0:r[A];return n!==void 0?n:e.supportsNegativeValues&&A.startsWith("-")?dd(A.slice(1),e.values,t):BI(A,t)}function vr(A){return A.startsWith("[")&&A.endsWith("]")}function pd(A){let e=A.lastIndexOf("/");return e===-1||e===A.length-1?[A]:[A.slice(0,e),A.slice(e+1)]}function rs(A){if(typeof A=="string"&&A.includes("<alpha-value>")){let e=A;return({opacityValue:t=1})=>e.replace("<alpha-value>",t)}return A}function EI(A,e={},{tailwindConfig:t={}}={}){var r;if(((r=e.values)===null||r===void 0?void 0:r[A])!==void 0){var n;return rs((n=e.values)===null||n===void 0?void 0:n[A])}let[i,o]=pd(A);if(o!==void 0){var s,a,g,u;let I=(u=(s=e.values)===null||s===void 0?void 0:s[i])!==null&&u!==void 0?u:vr(i)?i.slice(1,-1):void 0;return I===void 0?void 0:(I=rs(I),vr(o)?(0,lI.withAlphaValue)(I,o.slice(1,-1)):((a=t.theme)===null||a===void 0||(g=a.opacity)===null||g===void 0?void 0:g[o])===void 0?void 0:(0,lI.withAlphaValue)(I,t.theme.opacity[o]))}return Fr(A,e,{validate:ee.color})}function QI(A,e={}){var t;return(t=e.values)===null||t===void 0?void 0:t[A]}function Ce(A){return(e,t)=>Fr(e,t,{validate:A})}var CI={any:Fr,color:EI,url:Ce(ee.url),image:Ce(ee.image),length:Ce(ee.length),percentage:Ce(ee.percentage),position:Ce(ee.position),lookup:QI,"generic-name":Ce(ee.genericName),"family-name":Ce(ee.familyName),number:Ce(ee.number),"line-width":Ce(ee.lineWidth),"absolute-size":Ce(ee.absoluteSize),"relative-size":Ce(ee.relativeSize),shadow:Ce(ee.shadow)},fI=Object.keys(CI);function hd(A,e){let t=A.indexOf(e);return t===-1?[void 0,A]:[A.slice(0,t),A.slice(t+1)]}function md(A,e,t,r){if(vr(e)){let n=e.slice(1,-1),[i,o]=hd(n,":");if(!/^[\w-_]+$/g.test(i))o=n;else if(i!==void 0&&!fI.includes(i))return[];if(o.length>0&&fI.includes(i))return[Fr(`[${o}]`,t),i]}for(let n of[].concat(A)){let i=CI[n](e,t,{tailwindConfig:r});if(i!==void 0)return[i,n]}return[]}});var pI=J(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});Object.defineProperty(os,"default",{enumerable:!0,get:()=>yd});function yd(A){return typeof A=="function"?A({}):A}});var DI=J(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});Object.defineProperty(as,"default",{enumerable:!0,get:()=>Jd});var wd=Et(_i()),Dd=Et(xg()),bd=Et(kg()),Sd=Et(Ki()),xd=Et(vg()),yI=Fg(),hI=Ng(),kd=Lg(),Rd=Et(Gg()),vd=Ug(),Fd=dI(),Nd=Zo(),Md=Et(pI());function Et(A){return A&&A.__esModule?A:{default:A}}function Gt(A){return typeof A=="function"}function Nr(A){return typeof A=="object"&&A!==null}function Mr(A,...e){let t=e.pop();for(let r of e)for(let n in r){let i=t(A[n],r[n]);i===void 0?Nr(A[n])&&Nr(r[n])?A[n]=Mr(A[n],r[n],t):A[n]=r[n]:A[n]=i}return A}var ss={colors:xd.default,negative(A){return Object.keys(A).filter(e=>A[e]!=="0").reduce((e,t)=>{let r=(0,wd.default)(A[t]);return r!==void 0&&(e[`-${t}`]=r),e},{})},breakpoints(A){return Object.keys(A).filter(e=>typeof A[e]=="string").reduce((e,t)=>({...e,[`screen-${t}`]:A[t]}),{})}};function Ld(A,...e){return Gt(A)?A(...e):A}function Gd(A){return A.reduce((e,{extend:t})=>Mr(e,t,(r,n)=>r===void 0?[n]:Array.isArray(r)?[n,...r]:[n,r]),{})}function Ud(A){return{...A.reduce((e,t)=>(0,yI.defaults)(e,t),{}),extend:Gd(A)}}function mI(A,e){if(Array.isArray(A)&&Nr(A[0]))return A.concat(e);if(Array.isArray(e)&&Nr(e[0])&&Nr(A))return[A,...e];if(Array.isArray(e))return e}function Hd({extend:A,...e}){return Mr(e,A,(t,r)=>!Gt(t)&&!r.some(Gt)?Mr({},t,...r,mI):(n,i)=>Mr({},...[t,...r].map(o=>Ld(o,n,i)),mI))}function*Od(A){let e=(0,hI.toPath)(A);if(e.length===0||(yield e,Array.isArray(A)))return;let t=/^(.*?)\s*\/\s*([^/]+)$/,r=A.match(t);if(r!==null){let[,n,i]=r,o=(0,hI.toPath)(n);o.alpha=i,yield o}}function Td(A){let e=(t,r)=>{for(let n of Od(t)){let i=0,o=A;for(;o!=null&&i<n.length;)o=o[n[i++]],o=Gt(o)&&(n.alpha===void 0||i<=n.length-1)?o(e,ss):o;if(o!==void 0){if(n.alpha!==void 0){let s=(0,Fd.parseColorFormat)(o);return(0,Nd.withAlphaValue)(s,n.alpha,(0,Md.default)(s))}return(0,Rd.default)(o)?(0,vd.cloneDeep)(o):o}}return r};return Object.assign(e,{theme:e,...ss}),Object.keys(A).reduce((t,r)=>(t[r]=Gt(A[r])?A[r](e,ss):A[r],t),{})}function wI(A){let e=[];return A.forEach(t=>{e=[...e,t];var r;let n=(r=t==null?void 0:t.plugins)!==null&&r!==void 0?r:[];n.length!==0&&n.forEach(i=>{i.__isOptionsFunction&&(i=i());var o;e=[...e,...wI([(o=i==null?void 0:i.config)!==null&&o!==void 0?o:{}])]})}),e}function Pd(A){return[...A].reduceRight((t,r)=>Gt(r)?r({corePlugins:t}):(0,bd.default)(r,t),Dd.default)}function _d(A){return[...A].reduceRight((t,r)=>[...t,...r],[])}function Jd(A){let e=[...wI(A),{prefix:"",important:!1,separator:":",variantOrder:Sd.default.variantOrder}];var t,r;return(0,kd.normalizeConfig)((0,yI.defaults)({theme:Td(Hd(Ud(e.map(n=>(t=n==null?void 0:n.theme)!==null&&t!==void 0?t:{})))),corePlugins:Pd(e.map(n=>n.corePlugins)),plugins:_d(A.map(n=>(r=n==null?void 0:n.plugins)!==null&&r!==void 0?r:[]))},...e))}});var bI={};Wt(bI,{default:()=>Wd});var Wd,SI=at(()=>{Wd={yellow:A=>A}});var vI=J(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});function Kd(A,e){for(var t in e)Object.defineProperty(A,t,{enumerable:!0,get:e[t]})}Kd(gs,{flagEnabled:()=>Xd,issueFlagNotices:()=>Vd,default:()=>zd});var Yd=RI((SI(),Kt(bI))),qd=RI((yn(),Kt(mn)));function RI(A){return A&&A.__esModule?A:{default:A}}var xI={optimizeUniversalDefaults:!1},Lr={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity"],experimental:["optimizeUniversalDefaults","matchVariant"]};function Xd(A,e){if(Lr.future.includes(e)){var t,r,n;return A.future==="all"||((n=(r=A==null||(t=A.future)===null||t===void 0?void 0:t[e])!==null&&r!==void 0?r:xI[e])!==null&&n!==void 0?n:!1)}if(Lr.experimental.includes(e)){var i,o,s;return A.experimental==="all"||((s=(o=A==null||(i=A.experimental)===null||i===void 0?void 0:i[e])!==null&&o!==void 0?o:xI[e])!==null&&s!==void 0?s:!1)}return!1}function kI(A){if(A.experimental==="all")return Lr.experimental;var e;return Object.keys((e=A==null?void 0:A.experimental)!==null&&e!==void 0?e:{}).filter(t=>Lr.experimental.includes(t)&&A.experimental[t])}function Vd(A){if(process.env.JEST_WORKER_ID===void 0&&kI(A).length>0){let e=kI(A).map(t=>Yd.default.yellow(t)).join(", ");qd.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${e}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var zd=Lr});var NI=J(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});Object.defineProperty(us,"default",{enumerable:!0,get:()=>FI});var Zd=$d(Ki()),jd=vI();function $d(A){return A&&A.__esModule?A:{default:A}}function FI(A){var e;let t=((e=A==null?void 0:A.presets)!==null&&e!==void 0?e:[Zd.default]).slice().reverse().flatMap(i=>FI(typeof i=="function"?i():i)),r={respectDefaultRingColorOpacity:{theme:{ringColor:{DEFAULT:"#3b82f67f"}}}},n=Object.keys(r).filter(i=>(0,jd.flagEnabled)(A,i)).map(i=>r[i]);return[A,...n,...t]}});var LI=J(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Object.defineProperty(Is,"default",{enumerable:!0,get:()=>tp});var Ap=MI(DI()),ep=MI(NI());function MI(A){return A&&A.__esModule?A:{default:A}}function tp(...A){let[,...e]=(0,ep.default)(A[0]);return(0,Ap.default)([...A,...e])}});var UI=J((gy,GI)=>{var ls=LI();GI.exports=(ls.__esModule?ls:{default:ls}).default});var Mp={};Wt(Mp,{default:()=>Cl,init:()=>ca});module.exports=Kt(Mp);var Xn=se(require("escape-html"),1),Ks=se(require("linebreak"),1);var Yt=(A,e)=>()=>(e||A((e={exports:{}}).exports,e),e.exports),kl=Yt((A,e)=>{e.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),Rl=Yt((A,e)=>{e.exports=["deg","grad","rad","turn"]}),vl=Yt((A,e)=>{e.exports=["dpi","dpcm","dppx"]}),Fl=Yt((A,e)=>{e.exports=["Hz","kHz"]}),Nl=Yt((A,e)=>{e.exports=["s","ms"]}),Ml=kl(),Os=Rl(),Ts=vl(),Ps=Fl(),_s=Nl();function Kn(A){if(/\.\D?$/.test(A))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(A))throw new Error("Only one leading +/- is allowed");if(Ll(A)>1)throw new Error("Only one dot is allowed");if(/%$/.test(A)){this.type="percentage",this.value=Wn(A),this.unit="%";return}var e=Ul(A);if(!e){this.type="number",this.value=Wn(A);return}this.type=Ol(e),this.value=Wn(A.substr(0,A.length-e.length)),this.unit=e}Kn.prototype.valueOf=function(){return this.value};Kn.prototype.toString=function(){return this.value+(this.unit||"")};function be(A){return new Kn(A)}function Ll(A){var e=A.match(/\./g);return e?e.length:0}function Wn(A){var e=parseFloat(A);if(isNaN(e))throw new Error("Invalid number: "+A);return e}var Gl=[].concat(Os,Ps,Ml,Ts,_s);function Ul(A){var e=A.match(/\D+$/),t=e&&e[0];if(t&&Gl.indexOf(t)===-1)throw new Error("Invalid unit: "+t);return t}var Hl=Object.assign(Xr(Os,"angle"),Xr(Ps,"frequency"),Xr(Ts,"resolution"),Xr(_s,"time"));function Xr(A,e){return Object.fromEntries(A.map(t=>[t,e]))}function Ol(A){return Hl[A]||"length"}function wt(A){let e=typeof A;return!(e==="number"||e==="bigint"||e==="string"||e==="boolean")}function Ys(A){return/^class\s/.test(A.toString())}function Vn(A){return A&&A.$$typeof===Symbol.for("react.forward_ref")}function qs(A){return typeof A=="function"||Vn(A)}function Xs(A){return"dangerouslySetInnerHTML"in A}function Vs(A){let e=typeof A>"u"?[]:[].concat(A).flat(1/0),t=[];for(let r=0;r<e.length;r++){let n=e[r];typeof n>"u"||typeof n=="boolean"||n===null||(typeof n=="number"&&(n=String(n)),typeof n=="string"&&t.length&&typeof t[t.length-1]=="string"?t[t.length-1]+=n:t.push(n))}return t}function V(A,e,t,r,n=!1){if(typeof A=="number")return A;try{if(A=A.trim(),/[ /\(,]/.test(A))return;if(A===String(+A))return+A;let i=new be(A);if(i.type==="length")switch(i.unit){case"em":return i.value*e;case"rem":return i.value*16;case"vw":return~~(i.value*r._viewportWidth/100);case"vh":return~~(i.value*r._viewportHeight/100);default:return i.value}else{if(i.type==="angle")return gt(A);if(i.type==="percentage"&&n)return i.value/100*t}}catch{}}function gt(A){let e=new be(A);switch(e.unit){case"deg":return e.value;case"rad":return e.value*180/Math.PI;case"turn":return e.value*360;case"grad":return .9*e.value}}function qt(A,e){return[A[0]*e[0]+A[2]*e[1],A[1]*e[0]+A[3]*e[1],A[0]*e[2]+A[2]*e[3],A[1]*e[2]+A[3]*e[3],A[0]*e[4]+A[2]*e[5]+A[4],A[1]*e[4]+A[3]*e[5]+A[5]]}function ZA(A,e,t,r){let n=e[A];if(typeof n>"u"){if(r&&typeof A<"u")throw new Error(`Invalid value for CSS property "${r}". Allowed values: ${Object.keys(e).map(i=>`"${i}"`).join(" | ")}. Received: "${A}".`);n=t}return n}var Yn,qn,zs=[32,160,4961,65792,65793,4153,4241,10].map(A=>String.fromCodePoint(A)),yt=new Map,Tl=500;function OA(A,e,t){let r=`${e}:${t||""}:${A}`;if(yt.has(r))return yt.get(r);if(!Yn||!qn){if(!(typeof Intl<"u"&&"Segmenter"in Intl))throw new Error("Intl.Segmenter does not exist, please use import a polyfill.");Yn=new Intl.Segmenter(t,{granularity:"word"}),qn=new Intl.Segmenter(t,{granularity:"grapheme"})}let n;if(e==="grapheme")n=[...qn.segment(A)].map(i=>i.segment);else{let i=[...Yn.segment(A)].map(a=>a.segment),o=[],s=0;for(;s<i.length;){let a=i[s];if(a=="\xA0"){let g=s===0?"":o.pop(),u=s===i.length-1?"":i[s+1];o.push(g+"\xA0"+u),s+=2}else o.push(a),s++}n=o}if(yt.size>=Tl){let i=yt.keys().next().value;yt.delete(i)}return yt.set(r,n),n}function v(A,e,t){Ws(A,"element");let r="";for(let[n,i]of Object.entries(e))typeof i<"u"&&(Ws(n,"attribute"),r+=` ${n}="${Jl(i)}"`);return t?`<${A}${r}>${t}</${A}>`:`<${A}${r}/>`}var Zs=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Pl=Zs+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_l=new RegExp("^["+Zs+"]["+Pl+"]*$","u"),Js=new Set;function Ws(A,e){if(!Js.has(A)){if(!_l.test(A))throw new Error(`Invalid XML ${e} name: ${JSON.stringify(A)}`);Js.add(A)}}function Jl(A){return typeof A=="number"||typeof A=="bigint"||typeof A=="boolean"?""+A:(0,Xn.default)(String(A))}function js(A){return(0,Xn.default)(String(A))}function $s(A=20){let e=new Map;function t(i){let o=e.get(i);if(o!==void 0)return e.delete(i),e.set(i,o),o}function r(i,o){if(e.has(i))e.delete(i);else if(e.size>=A){let s=e.keys().next().value;e.delete(s)}e.set(i,o)}function n(){e.clear()}return{set:r,get:t,clear:n}}function Dt(A){return A?A.split(/[, ]/).filter(Boolean).map(Number):null}function Vr(A){return typeof A=="string"}function Aa(A){return typeof A=="number"}function ea(A){return typeof A>"u"}function Te(A,e){if(typeof A=="number")return A;if(A.endsWith("%")){let t=parseFloat(A.slice(0,-1));if(isNaN(t)){console.warn(`Invalid value "${A}"${typeof e=="string"?` for "${e}"`:""}. Expected a percentage value (e.g., "50%").`);return}return`${t}%`}console.warn(`Invalid value "${A}"${typeof e=="string"?` for "${e}"`:""}. Expected a number or a percentage value (e.g., "50%").`)}function Ve(A,e){if(typeof A=="number")return A;if(A==="auto")return"auto";if(A.endsWith("%")){let t=parseFloat(A.slice(0,-1));if(isNaN(t)){console.warn(`Invalid value "${A}"${typeof e=="string"?` for "${e}"`:""}. Expected a percentage value (e.g., "50%").`);return}return`${t}%`}console.warn(`Invalid value "${A}"${typeof e=="string"?` for "${e}"`:""}. Expected a number, "auto", or a percentage value (e.g., "50%").`)}function ta(A,e){if(e==="break-all")return{words:OA(A,"grapheme"),requiredBreaks:[]};if(e==="keep-all")return{words:OA(A,"word"),requiredBreaks:[]};let t=new Ks.default(A),r=0,n=t.nextBreak(),i=[],o=[!1];for(;n;){let s=A.slice(r,n.position);i.push(s),n.required?o.push(!0):o.push(!1),r=n.position,n=t.nextBreak()}return{words:i,requiredBreaks:o}}var ra=A=>A.replaceAll(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`);function Pe(A,e=","){let t=[],r=0,n=0;e=new RegExp(e);for(let i=0;i<A.length;i++)A[i]==="("?n++:A[i]===")"&&n--,n===0&&e.test(A[i])&&(t.push(A.slice(r,i).trim()),r=i+1);return t.push(A.slice(r).trim()),t}function ca(A){}function ze(){return Promise.resolve().then(()=>(ni(),ri)).then(A=>A.getYoga())}Promise.resolve().then(()=>ni());var fa=Symbol.for("react.fragment");var $r=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;var Zl=new Set([301,302,303,307,308]);function ii(A){let e=A.split(".").map(i=>Number.parseInt(i,10));if(e.length!==4||e.some(i=>!Number.isInteger(i)||i<0||i>255))return!0;let[t,r,n]=e;return t===0||t===10||t===100&&r>=64&&r<=127||t===127||t===169&&r===254||t===172&&r>=16&&r<=31||t===192&&r===0&&n===0||t===192&&r===168||t===198&&(r===18||r===19)||t>=224}function jl(A){let e=A,t=e.indexOf("%");t!==-1&&(e=e.slice(0,t));let r=e.split("::");if(r.length>2)return null;let n=o=>{if(o==="")return[];let s=[],a=o.split(":");for(let g=0;g<a.length;g++){let u=a[g];if(u.includes(".")){if(g!==a.length-1||!$r.test(u))return null;let[I,B,f,E]=u.split(".").map(C=>Number.parseInt(C,10));if([I,B,f,E].some(C=>!Number.isInteger(C)||C<0||C>255))return null;s.push(I<<8|B,f<<8|E);continue}if(!/^[0-9a-f]{1,4}$/.test(u))return null;s.push(Number.parseInt(u,16))}return s},i=n(r[0]);if(i===null)return null;if(r.length===2){let o=n(r[1]);if(o===null)return null;let s=8-i.length-o.length;return s<0?null:[...i,...new Array(s).fill(0),...o]}return i.length===8?i:null}function $l(A){let e=s=>A.slice(0,s).every(a=>a===0);if(!(e(6)||e(5)&&A[5]===65535||e(4)&&A[4]===65535&&A[5]===0||A[0]===100&&A[1]===65435&&A[2]===0&&A[3]===0&&A[4]===0&&A[5]===0||A[0]===100&&A[1]===65435&&A[2]===1))return null;let r=A[6]>>8&255,n=A[6]&255,i=A[7]>>8&255,o=A[7]&255;return`${r}.${n}.${i}.${o}`}function Ea(A){let e=jl(A);if(e===null)return!0;let t=$l(e);return t?ii(t):!!(e.every(r=>r===0)||e.slice(0,7).every(r=>r===0)&&e[7]===1||(e[0]&65024)===64512||(e[0]&65472)===65152||(e[0]&65472)===65216||(e[0]&65280)===65280||e[0]===8193&&e[1]===3512)}function Ac(A){let e=A.toLowerCase().replace(/^\[|\]$/g,"");return $r.test(e)?ii(e):e.includes(":")?Ea(e):!0}function Qa(A){let e;try{e=new URL(A)}catch{return null}if(e.protocol!=="http:"&&e.protocol!=="https:")return null;let t=e.hostname.toLowerCase().replace(/\.+$/,"");return t.startsWith("[")&&t.endsWith("]")&&(t=t.slice(1,-1)),t?{url:e,host:t}:null}function ec(A){let e=Qa(A);if(!e)return!0;let{host:t}=e;return t==="localhost"||t.endsWith(".localhost")||t==="local"||t.endsWith(".local")||t==="internal"||t.endsWith(".internal")?!0:$r.test(t)?ii(t):t.includes(":")?Ea(t):!1}function jr(A){return new Error(`Image source resolves to a blocked address (SSRF protection): ${A}`)}function tc(A){if(ec(A))throw jr(A)}var kt;async function rc(){if(kt!==void 0)return kt;if(typeof window<"u")return kt=null,null;try{let e=await new Function("s","return import(s)")("node:dns/promises");return kt=(t,r)=>e.lookup(t,r),kt}catch{return kt=null,null}}async function nc(A,e){tc(A);let t=Qa(A);if(!t)throw jr(A);let{host:r}=t;if($r.test(r)||r.includes(":"))return;let n=e&&"lookup"in e?e.lookup:await rc();if(!n)return;let i;try{i=await n(r,{all:!0})}catch{throw new Error(`Can't resolve image host: ${A}`)}if(i.length===0)throw new Error(`Can't resolve image host: ${A}`);for(let{address:o}of i)if(Ac(o))throw jr(A)}async function Ba(A){try{A.body&&typeof A.body.cancel=="function"?await A.body.cancel():typeof A.arrayBuffer=="function"&&await A.arrayBuffer()}catch{}}async function Ca(A,e){let t=(e==null?void 0:e.fetch)??globalThis.fetch,r=A;for(let n=0;n<=10;n++){await nc(r,e);let i=await t(r,{redirect:"manual"});if(i.type==="opaqueredirect")throw await Ba(i),jr(r);let o=i.headers.get("location");if(Zl.has(i.status)&&o){await Ba(i),r=new URL(o,r).href;continue}return i}throw new Error(`Image source redirected too many times (SSRF protection): ${A}`)}var ic="image/avif",An="image/webp",en="image/apng",tn="image/png",rn="image/jpeg",nn="image/gif",oi="image/svg+xml";function ha(A){let e=new DataView(A),t=4,r=e.byteLength;for(;t<r;){let n=e.getUint16(t,!1);if(n>r)throw new TypeError("Invalid JPEG");let i=e.getUint8(n+1+t);if(i===192||i===193||i===194)return[e.getUint16(n+7+t,!1),e.getUint16(n+5+t,!1)];t+=n+2}throw new TypeError("Invalid JPEG")}function ma(A){let e=new DataView(A),t=new Uint8Array(A);if(e.byteLength<20||e.getUint32(0)!==1380533830||e.getUint32(8)!==1464156752)throw new TypeError("Invalid WebP");let r=e.getUint32(4,!0)+8;if(r<20||r>e.byteLength)throw new TypeError("Invalid WebP");let n=12;for(;n+8<=r;){let i=e.getUint32(n),o=e.getUint32(n+4,!0),s=n+8,a=s+o;if(a>r)throw new TypeError("Invalid WebP");if(i===1448097824){if(o<10||t[s+3]!==157||t[s+4]!==1||t[s+5]!==42)throw new TypeError("Invalid WebP");let g=e.getUint16(s+6,!0)&16383,u=e.getUint16(s+8,!0)&16383;if(!g||!u)throw new TypeError("Invalid WebP");return[g,u]}if(i===1448097868){if(o<5||t[s]!==47)throw new TypeError("Invalid WebP");let g=e.getUint32(s+1,!0);return[(g&16383)+1,(g>>>14&16383)+1]}if(i===1448097880){if(o<10)throw new TypeError("Invalid WebP");return[t[s+4]+(t[s+5]<<8)+(t[s+6]<<16)+1,t[s+7]+(t[s+8]<<8)+(t[s+9]<<16)+1]}n=a+o%2}throw new TypeError("Invalid WebP")}function ya(A){let e=new Uint8Array(A.slice(6,10));return[e[0]|e[1]<<8,e[2]|e[3]<<8]}function wa(A){let e=new DataView(A);return[e.getUint16(18,!1),e.getUint16(22,!1)]}var Fe=$s(500),Vt=new Map,oc=[tn,en,rn,nn,oi,An],sc=/<svg[^>]*>/i,ac=/viewBox=['"]([^'"]+)['"]/,gc=/width=['"](\d*\.?\d+)['"]/,uc=/height=['"](\d*\.?\d+)['"]/;function si(A){let e=new Uint8Array(A),t=32768,r="";for(let n=0;n<e.length;n+=t){let i=e.subarray(n,Math.min(n+t,e.length));r+=String.fromCharCode(...i)}return btoa(r)}function Ic(A){let e=atob(A),t=e.length,r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e.charCodeAt(n);return r.buffer}function da(A,e){let t=e.match(sc);if(!t)throw new Error(`Failed to parse SVG from ${A}`);let r=t[0],n=ac.exec(r),i=gc.exec(r),o=uc.exec(r),s=n?Dt(n[1]):null;if(!s&&(!i||!o))throw new Error(`Failed to parse SVG from ${A}: missing "viewBox"`);let a=s?[s[2],s[3]]:[+i[1],+o[1]],g=a[0]/a[1];return i&&o?[+i[1],+o[1]]:i?[+i[1],+i[1]/g]:o?[+o[1]*g,+o[1]]:[a[0],a[1]]}function pa(A){let e,t=lc(new Uint8Array(A));switch(t){case tn:case en:e=wa(A);break;case nn:e=ya(A);break;case rn:e=ha(A);break;case An:e=ma(A);break}if(!oc.includes(t))throw new Error(`Unsupported image type: ${t||"unknown"}`);return[`data:${t};base64,${si(A)}`,e]}async function Rt(A){if(!A)throw new Error("Image source is not provided.");if(typeof A=="object"){let[i,o]=pa(A);return[i,...o]}if((A.startsWith('"')&&A.endsWith('"')||A.startsWith("'")&&A.endsWith("'"))&&(A=A.slice(1,-1)),typeof window>"u"&&!A.startsWith("http")&&!A.startsWith("data:"))throw new Error(`Image source must be an absolute URL: ${A}`);if(A.startsWith("data:")){let i;try{i=/data:(?<imageType>[a-z/+]+)(;[^;=]+=[^;=]+)*?(;(?<encodingType>[^;,]+))?,(?<dataString>.*)/g.exec(A).groups}catch{return console.warn("Image data URI resolved without size:"+A),[A]}let{imageType:o,encodingType:s,dataString:a}=i;if(o===oi){let g=s==="base64"?atob(a):decodeURIComponent(a.replace(/ /g,"%20")),u=s==="base64"?A:`data:image/svg+xml;base64,${btoa(g)}`,I=da(A,g);return Fe.set(A,[u,...I]),[u,...I]}else if(s==="base64"){let g,u=Ic(a);switch(o){case tn:case en:g=wa(u);break;case nn:g=ya(u);break;case rn:g=ha(u);break;case An:g=ma(u);break}return Fe.set(A,[A,...g]),[A,...g]}else return console.warn("Image data URI resolved without size:"+A),Fe.set(A,[A]),[A]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(Vt.has(A))return Vt.get(A);let e=Fe.get(A);if(e)return e;let t=A,n=(typeof window>"u"?()=>Ca(t):()=>fetch(t))().then(i=>{let o=i.headers.get("content-type");return o==="image/svg+xml"||o==="application/svg+xml"?i.text():i.arrayBuffer()}).then(i=>{if(typeof i=="string")try{let a=`data:image/svg+xml;base64,${btoa(i)}`,g=da(t,i);return[a,...g]}catch(a){throw new Error(`Failed to parse SVG image: ${a.message}`)}let[o,s]=pa(i);return[o,...s]}).then(i=>(Fe.set(t,i),i)).catch(i=>{if(i instanceof Error&&i.message.includes("SSRF protection"))throw i;return console.error(`Can't load image ${t}: `+i.message),Fe.set(t,[]),[]});return Vt.set(t,n),n}function lc(A){return[255,216,255].every((e,t)=>A[t]===e)?rn:[137,80,78,71,13,10,26,10].every((e,t)=>A[t]===e)?cc(A)?en:tn:[71,73,70,56].every((e,t)=>A[t]===e)?nn:[82,73,70,70,0,0,0,0,87,69,66,80].every((e,t)=>!e||A[t]===e)?An:[60,63,120,109,108].every((e,t)=>A[t]===e)?oi:[0,0,0,0,102,116,121,112,97,118,105,102].every((e,t)=>!e||A[t]===e)?ic:null}function cc(A){let e=new DataView(A.buffer),t,r,n=8,i=!1;for(;!i&&t!=="IEND"&&n<A.length;){r=e.getUint32(n);let o=A.subarray(n+4,n+8);t=String.fromCharCode(...o),i=t==="acTL",n+=12+r}return i}var Da={accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",href:"href",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink"},fc=/[\r\n%#()<>?[\\\]^`{|}"'&]/g;function on(A,e){if(!A)return"";if(Array.isArray(A))return A.map(a=>on(a,e)).join("");if(typeof A!="object")return js(A);let t=A.type;if(t==="text")throw new Error("<text> nodes are not currently supported, please convert them to <path>");let{children:r,style:n,...i}=A.props||{},o=(n==null?void 0:n.color)||e;if(t===fa)return on(r,o);if(typeof t!="string")throw new Error("Only intrinsic elements are supported inside <svg>");let s={};for(let[a,g]of Object.entries(i)){let u=g;typeof u=="string"&&u.toLowerCase()==="currentcolor"&&(u=o),(a==="href"||a==="xlinkHref")&&t==="image"&&(u=Fe.get(u)[0]);let I=Da[a]||a;s[I]=u}return n&&(s.style=Object.entries(n).map(([a,g])=>`${ra(a)}:${g}`).join(";")),v(t,s,on(r,o))}async function ba(A){let e=new Set,t=r=>{if(r&&wt(r)){if(Array.isArray(r)){r.forEach(n=>t(n));return}else if(typeof r=="object")if(r.type==="image"){let n=r.props.href||r.props.xlinkHref;n&&(e.has(n)||e.add(n))}else r.type==="img"&&(e.has(r.props.src)||e.add(r.props.src));Array.isArray(r.props.children)?r.props.children.map(n=>t(n)):t(r.props.children)}};return t(A),Promise.all(Array.from(e).map(r=>Rt(r)))}async function Sa(A,e){let{viewBox:t,viewbox:r,width:n,height:i,className:o,style:s,children:a,...g}=A.props||{};t||=r,g.xmlns="http://www.w3.org/2000/svg";let u=(s==null?void 0:s.color)||e,I=Dt(t),B=I?I[3]/I[2]:null;n=n||B&&i?i/B:null,i=i||B&&n?n*B:null,g.width=n,g.height=i,t&&(g.viewBox=t);let f={};for(let[C,p]of Object.entries(g)){let y=Da[C]||C;f[y]=typeof p=="string"&&p.toLowerCase()==="currentcolor"?u:p}return`data:image/svg+xml;utf8,${v("svg",f,on(a,u)).replace(fc,encodeURIComponent)}`}var ce="flex",xa={p:{display:ce,marginTop:"1em",marginBottom:"1em"},div:{display:ce},blockquote:{display:ce,marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:ce,textAlign:"center"},hr:{display:ce,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"solid"},h1:{display:ce,fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:ce,fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:ce,fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:ce,marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:ce,fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:ce,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:ce,fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var Bc=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","fontFeatureSettings","letterSpacing","lineHeight","textAlign","textIndent","textTransform","textShadowOffset","textShadowColor","textShadowRadius","WebkitTextStrokeWidth","WebkitTextStrokeColor","textDecorationLine","textDecorationStyle","textDecorationColor","textDecorationSkipInk","whiteSpace","transform","wordBreak","tabSize","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedMaskId","_inheritedBackgroundClipTextPath","_inheritedBackgroundClipTextHasBackground"]);function ai(A){let e={};for(let t in A)(Bc.has(t)||t.startsWith("--"))&&(e[t]=A[t]);return e}var xe=require("css-to-react-native"),Ta=require("css-background-parser"),Pa=require("css-box-shadow"),_a=se(require("parse-css-color"),1);var ka=se(require("postcss-value-parser"),1);function Ec(A,e){try{let t=new be(A);switch(t.unit){case"px":return{absolute:t.value};case"em":return{absolute:t.value*e};case"rem":return{absolute:t.value*16};case"%":return{relative:t.value};default:return{}}}catch{return{}}}function gi(A,e,t){switch(A){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=Ec(A,e);return r.absolute?{[t?"xAbsolute":"yAbsolute"]:r.absolute}:r.relative?{[t?"xRelative":"yRelative"]:r.relative}:{}}}}function ui(A,e){if(typeof A=="number")return{xAbsolute:A};let t;try{t=(0,ka.default)(A).nodes.filter(r=>r.type==="word").map(r=>r.value)}catch{return{}}return t.length===1?gi(t[0],e,!0):t.length===2?((t[0]==="top"||t[0]==="bottom"||t[1]==="left"||t[1]==="right")&&t.reverse(),{...gi(t[0],e,!0),...gi(t[1],e,!1)}):{}}var Ra=require("css-to-react-native");function zt(A,e){let t=(0,Ra.getPropertyName)(`mask-${e}`);return A[t]||A[`WebkitM${t.substring(1)}`]}function va(A){let e=A.maskImage||A.WebkitMaskImage,t={position:zt(A,"position")||"0% 0%",size:zt(A,"size")||"100% 100%",repeat:zt(A,"repeat")||"repeat",origin:zt(A,"origin")||"border-box",clip:zt(A,"origin")||"border-box"};return Pe(e).filter(n=>n&&n!=="none").reverse().map(n=>({image:n,...t}))}var Qc={round:1,squircle:2,square:1/0,bevel:0,scoop:-1,notch:-1/0};function Ii(A){let e=A.trim().toLowerCase(),t=Qc[e];if(typeof t<"u")return t;let r=e.match(/^superellipse\(\s*(-?infinity|[-+]?(?:\d*\.)?\d+(?:e[-+]?\d+)?)\s*\)$/);if(!r)throw new Error('Invalid corner shape value: "'+A+'".');if(r[1]==="infinity")return 1/0;if(r[1]==="-infinity")return-1/0;let n=Number(r[1]);if(!Number.isFinite(n))throw new Error('Invalid corner shape value: "'+A+'".');return n}function sn(A,e=4){let t=A.match(/superellipse\([^)]*\)|[^\s]+/gi)||[];if(t.length<1||t.length>e)throw new Error('Invalid corner shape value: "'+A+'".');for(let r of t)Ii(r);return t}var Na=se(require("parse-css-color"),1);var Fa={brightness:1,contrast:1,grayscale:1,invert:1,opacity:1,saturate:1,sepia:1};function Ma(A,e,t="black"){if(A==="none")return[];if(typeof A!="string")throw new Error('Invalid `backdropFilter` value: "'+A+'".');let r=Pe(A,/\s/).filter(Boolean);if(!r.length)throw new Error('Invalid `backdropFilter` value: "'+A+'".');return r.map(n=>{let i=n.match(/^([a-z-]+)\((.*)\)$/i);if(!i)throw new Error("Invalid filter function in `backdropFilter`.");let o=i[1].toLowerCase(),s=i[2].trim();if(o==="blur"){let a=s?an(s,e,"blur()"):0;if(a<0)throw new Error("Invalid `blur()` radius in `backdropFilter`.");return{type:"blur",value:a}}if(o==="hue-rotate"){let a=s==="0"||!s?0:gt(s);if(typeof a>"u")throw new Error("Invalid `hue-rotate()` angle in `backdropFilter`.");return{type:"hue-rotate",value:a}}if(o==="drop-shadow")return Cc(s,e,t);if(o in Fa){let a=o,g=s?dc(s,`${a}()`):Fa[a],u=["grayscale","invert","opacity","sepia"].includes(a)?Math.min(g,1):g;return{type:a,value:u}}throw new Error(`Unsupported \`${o}()\` in \`backdropFilter\`.`)})}function Cc(A,e,t){let r=Pe(A,/\s/).filter(Boolean),n=t,i=[];for(let g of r)(0,Na.default)(g)?n=g:i.push(g);if(i.length<2||i.length>3)throw new Error("Invalid `drop-shadow()` value in `backdropFilter`.");let o=an(i[0],e,"drop-shadow()"),s=an(i[1],e,"drop-shadow()"),a=i[2]?an(i[2],e,"drop-shadow()"):0;if(a<0)throw new Error("Invalid `drop-shadow()` blur radius in `backdropFilter`.");return{type:"drop-shadow",offsetX:o,offsetY:s,blurRadius:a,color:n}}function an(A,e,t){let r=V(A,e.fontSize,0,e);if(typeof r>"u")throw new Error(`Invalid length \`${A}\` in \`${t}\` for \`backdropFilter\`.`);return r}function dc(A,e){let t=A.match(/^([+-]?(?:\d+\.?\d*|\.\d+))%$/),r=t?Number(t[1])/100:Number(A);if(!Number.isFinite(r)||r<0)throw new Error(`Invalid amount \`${A}\` in \`${e}\` for \`backdropFilter\`.`);return r}var li=se(require("postcss-value-parser"),1);function La(A){let e={},t={};for(let r in A)r.startsWith("--")?e[r]=String(A[r]):t[r]=A[r];return{variables:e,remainingStyle:t}}function Ga(A,e){return{...A,...e}}function jt(A,e,t=new Set){if(typeof A!="string"||!A.includes("var("))return A;try{let r=(0,li.default)(A),n=!1;if(r.walk(i=>{if(i.type==="function"&&i.value==="var"){n=!0;let o=pc(i);if(!o)return;let{varName:s,fallback:a}=o;if(t.has(s)){console.warn(`Circular reference detected for CSS variable: ${s}`),a!==void 0?Zt(i,a):Zt(i,"initial");return}let g=e[s];if(g!==void 0){let u=new Set(t);u.add(s);let I=jt(g,e,u);Zt(i,String(I))}else if(a!==void 0){let u=jt(a,e,t);Zt(i,String(u))}else Zt(i,"initial")}}),n)return r.toString()}catch{console.warn(`Failed to parse CSS value for variable resolution: ${A}`)}return A}function pc(A){if(!A.nodes||A.nodes.length===0)return null;let e,t=-1;for(let n=0;n<A.nodes.length;n++){let i=A.nodes[n];if(i.type==="word"&&!e)e=i;else if(i.type==="div"&&i.value===","){t=n;break}}if(!e||e.type!=="word")return null;let r=e.value.trim();if(t!==-1&&t<A.nodes.length-1){let n=A.nodes.slice(t+1),i=li.default.stringify(n).trim();return{varName:r,fallback:i}}return{varName:r}}function Zt(A,e){A.type="word",A.value=e,delete A.nodes}var hc=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),mc=new Set(["lineHeight"]);function yc(A,e,t,r){return A==="textDecoration"&&!t.includes(e.textDecorationColor)&&(e.textDecorationColor=r),e}function ut(A,e){let t=Number(e);return isNaN(t)?e:hc.has(A)?mc.has(A)?t:String(e):t+"px"}function wc(A,e,t,r){if(A==="zIndex")return console.warn("`z-index` is currently not supported."),{[A]:e};if(A==="lineHeight")return{lineHeight:ut(A,e)};if(A==="fontFamily")return{fontFamily:e.split(",").map(i=>i.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())};if(A==="borderRadius"){if(typeof e!="string"||!e.includes("/"))return;let[i,o]=e.split("/"),s=(0,xe.getStylesForProperty)(A,i,!0),a=(0,xe.getStylesForProperty)(A,o,!0);for(let g in s)a[g]=ut(A,s[g])+" "+ut(A,a[g]);return a}if(A==="cornerShape"){if(typeof e!="string")throw new Error('Invalid `cornerShape` value: "'+e+'".');let i=sn(e),o=i[0],s=i[1]||o,a=i[2]||o,g=i[3]||s;return{cornerTopLeftShape:o,cornerTopRightShape:s,cornerBottomRightShape:a,cornerBottomLeftShape:g}}if(/^corner(TopLeft|TopRight|BottomRight|BottomLeft)Shape$/.test(A)){if(typeof e!="string"||sn(e,1).length!==1)throw new Error("Invalid `"+A+'` value: "'+e+'".');return{[A]:e}}let n=A.match(/^corner(Top|Right|Bottom|Left)Shape$/);if(n){if(typeof e!="string")throw new Error("Invalid `"+A+'` value: "'+e+'".');let i=sn(e,2),o=i[0],s=i[1]||o,a={Top:["cornerTopLeftShape","cornerTopRightShape"],Right:["cornerTopRightShape","cornerBottomRightShape"],Bottom:["cornerBottomLeftShape","cornerBottomRightShape"],Left:["cornerTopLeftShape","cornerBottomLeftShape"]}[n[1]];return{[a[0]]:o,[a[1]]:s}}if(/^border(Top|Right|Bottom|Left)?$/.test(A)){let i=(0,xe.getStylesForProperty)("border",e,!0);i.borderWidth===1&&!String(e).includes("1px")&&(i.borderWidth=3),i.borderColor==="black"&&!String(e).includes("black")&&(i.borderColor=t);let o={Width:ut(A+"Width",i.borderWidth),Style:ZA(i.borderStyle,{solid:"solid",dashed:"dashed"},"solid",A+"Style"),Color:i.borderColor},s={};for(let a of A==="border"?["Top","Right","Bottom","Left"]:[A.slice(6)])for(let g in o)s["border"+a+g]=o[g];return s}if(A==="boxShadow"){if(!e)throw new Error('Invalid `boxShadow` value: "'+e+'".');return{[A]:typeof e=="string"?(0,Pa.parse)(e):e}}if(A==="backdropFilter"||A==="WebkitBackdropFilter")return{_backdropFilters:Ma(e,r,t)};if(A==="transform"){if(typeof e!="string")throw new Error("Invalid `transform` value.");let i={},o=e.replace(/(-?[\d.]+%)/g,(a,g)=>{let u=~~(Math.random()*1e9);return i[u]=g,u+"px"}),s=(0,xe.getStylesForProperty)("transform",o,!0);for(let a of s.transform)for(let g in a)i[a[g]]&&(a[g]=i[a[g]]);return s}if(A==="background")return e=e.toString().trim(),/^(linear-gradient|radial-gradient|url|repeating-linear-gradient|repeating-radial-gradient)\(/.test(e)?(0,xe.getStylesForProperty)("backgroundImage",e,!0):(0,xe.getStylesForProperty)("background",e,!0);if(A==="textShadow"){e=e.toString().trim();let i={},o=Pe(e);for(let s of o){let a=(0,xe.getStylesForProperty)("textShadow",s,!0);for(let g in a)i[g]?i[g].push(a[g]):i[g]=[a[g]]}return i}if(A==="WebkitTextStroke"){e=e.toString().trim();let i=e.split(" ");if(i.length!==2)throw new Error("Invalid `WebkitTextStroke` value.");return{WebkitTextStrokeWidth:ut(A,i[0]),WebkitTextStrokeColor:ut(A,i[1])}}if(A==="textDecorationSkipInk"){let i=e.toString().trim().toLowerCase();if(!["auto","none","all"].includes(i))throw new Error("Invalid `textDecorationSkipInk` value.");return{textDecorationSkipInk:i}}}function Ua(A){return A==="transform"?" Only absolute lengths such as `10px` are supported.":""}var Ha=/rgb\((\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\.\d]+)\)/;function Ja(A){if(typeof A=="string"&&Ha.test(A.trim()))return A.trim().replace(Ha,(e,t,r,n,i)=>`rgba(${t}, ${r}, ${n}, ${i})`);if(typeof A=="object"&&A!==null){for(let e in A)A[e]=Ja(A[e]);return A}return A}function gn(A,e){let t={},r={};for(let a in e)a.startsWith("--")&&(r[a]=String(e[a]));let n={},i=A;if(A){let{variables:a,remainingStyle:g}=La(A);n=a,i=g}let o=Ga(r,n);for(let a in o)t[a]=o[a];if(i){let a=i.color?jt(i.color,o):void 0,g=bc(a,e.color);t.color=g;for(let u in i){if(u.startsWith("_"))throw new Error(`Invalid style property: ${JSON.stringify(u)}`);if(u==="color")continue;let I=(0,xe.getPropertyName)(u),B=jt(i[u],o),f=xc(B,g);try{let E=wc(I,f,g,e)||yc(I,(0,xe.getStylesForProperty)(I,ut(I,f),!0),f,g);Object.assign(t,E)}catch(E){throw new Error(E.message+(E.message.includes(f)?`
|
|
5
5
|
`+Ua(I):`
|
|
6
|
-
in CSS rule \`${I}: ${f}\`.${Ua(I)}`))}}}if(t.backgroundImage){let{backgrounds:a}=(0,Ta.parseElementStyle)(t);t.backgroundImage=a}(t.maskImage||t.WebkitMaskImage)&&(t.maskImage=va(t));let s=Dc(t.fontSize,e.fontSize);typeof t.fontSize<"u"&&(t.fontSize=s),t.transformOrigin&&(t.transformOrigin=ui(t.transformOrigin,s));for(let a in t){let g=t[a];if(a==="lineHeight")typeof g=="string"&&g!=="normal"&&(g=t[a]=V(g,s,s,e,!0)/s);else{if(typeof g=="string"){let u=V(g,s,s,e);typeof u<"u"&&(t[a]=u),g=t[a]}if(typeof g=="string"||typeof g=="object"){let u=Ja(g);u&&(t[a]=u),g=t[a]}}if(a==="opacity"&&typeof g=="number"&&(t.opacity=g*e.opacity),a==="transform"){let u=g;for(let I of u){let B=Object.keys(I)[0],f=I[B],E=typeof f=="string"?V(f,s,s,e)??f:f;I[B]=E}}if(a==="textShadowRadius"){let u=g;t.textShadowRadius=u.map(I=>V(I,s,0,e,!1))}if(a==="textShadowOffset"){let u=g;t.textShadowOffset=u.map(({height:I,width:B})=>({height:V(I,s,0,e,!1),width:V(B,s,0,e,!1)}))}}return t}function Dc(A,e){if(typeof A=="number")return A;try{let t=new be(A);switch(t.unit){case"em":return t.value*e;case"rem":return t.value*16}}catch{return e}}function Oa(A){if(A.startsWith("hsl")){let e=(0,_a.default)(A),[t,r,n]=e.values;return`hsl(${[t,`${r}%`,`${n}%`].concat(e.alpha===1?[]:[e.alpha]).join(",")})`}return A}function bc(A,e){return A&&A.toLowerCase()!=="currentcolor"?Oa(A):Oa(e)}function Sc(A,e){return A.replace(/currentcolor/gi,e)}function xc(A,e){return Vr(A)&&(A=Sc(A,e)),A}function ci(A,e,t,r,n,i){let o=r/t,s=(e.borderLeftWidth||0)+(e.borderRightWidth||0)+(e.paddingLeft||0)+(e.paddingRight||0),a=(e.borderTopWidth||0)+(e.borderBottomWidth||0)+(e.paddingTop||0)+(e.paddingBottom||0),g=e.width||n,u=e.height||i,I=typeof g=="number"&&typeof u=="number";I&&(g=g-s,u=u-a),g===void 0&&u===void 0?(g="100%",A.setAspectRatio(1/o)):g===void 0?typeof u=="number"?g=u/o:A.setAspectRatio(1/o):u===void 0&&(typeof g=="number"?u=g*o:A.setAspectRatio(1/o)),e.width=I?g+s:g,e.height=I?u+a:u,e.__naturalWidth=t,e.__naturalHeight=r}async function fi(A,e,t,r,n,i){var a;let o=await ze(),s=Object.assign({},t,gn(xa[e],t),gn(r,t));if(e==="img"){let[g,u,I]=await Rt(n.src);if(u===void 0&&I===void 0){if(n.width===void 0||n.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");u=parseInt(n.width),I=parseInt(n.height)}ci(A,s,u,I,n.width,n.height),s.__src=g}if(await((a=i==null?void 0:i[e])==null?void 0:a.call(i,A,s,n)),e==="svg"){let g=n.viewBox||n.viewbox,u=Dt(g),I=u?u[3]/u[2]:null,{width:B,height:f}=n;typeof B>"u"&&f?I==null?B=0:typeof f=="string"&&f.endsWith("%")?B=parseInt(f)/I+"%":(f=V(f,t.fontSize,1,t),B=f/I):typeof f>"u"&&B?I==null?B=0:typeof B=="string"&&B.endsWith("%")?f=parseInt(B)*I+"%":(B=V(B,t.fontSize,1,t),f=B*I):(typeof B<"u"&&(B=V(B,t.fontSize,1,t)||B),typeof f<"u"&&(f=V(f,t.fontSize,1,t)||f),B||=u==null?void 0:u[2],f||=u==null?void 0:u[3]),!s.width&&B&&(s.width=B),!s.height&&f&&(s.height=f)}return A.setDisplay(ZA(s.display,{flex:o.DISPLAY_FLEX,block:o.DISPLAY_FLEX,contents:o.DISPLAY_CONTENTS,none:o.DISPLAY_NONE,"-webkit-box":o.DISPLAY_FLEX},o.DISPLAY_FLEX,"display")),A.setAlignContent(ZA(s.alignContent,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,"space-between":o.ALIGN_SPACE_BETWEEN,"space-around":o.ALIGN_SPACE_AROUND,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO,"alignContent")),A.setAlignItems(ZA(s.alignItems,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_STRETCH,"alignItems")),A.setAlignSelf(ZA(s.alignSelf,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO,"alignSelf")),A.setJustifyContent(ZA(s.justifyContent,{center:o.JUSTIFY_CENTER,"flex-start":o.JUSTIFY_FLEX_START,"flex-end":o.JUSTIFY_FLEX_END,"space-between":o.JUSTIFY_SPACE_BETWEEN,"space-around":o.JUSTIFY_SPACE_AROUND},o.JUSTIFY_FLEX_START,"justifyContent")),A.setFlexDirection(ZA(s.flexDirection,{row:o.FLEX_DIRECTION_ROW,column:o.FLEX_DIRECTION_COLUMN,"row-reverse":o.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":o.FLEX_DIRECTION_COLUMN_REVERSE},o.FLEX_DIRECTION_ROW,"flexDirection")),A.setFlexWrap(ZA(s.flexWrap,{wrap:o.WRAP_WRAP,nowrap:o.WRAP_NO_WRAP,"wrap-reverse":o.WRAP_WRAP_REVERSE},o.WRAP_NO_WRAP,"flexWrap")),typeof s.gap<"u"&&A.setGap(o.GUTTER_ALL,s.gap),typeof s.rowGap<"u"&&A.setGap(o.GUTTER_ROW,s.rowGap),typeof s.columnGap<"u"&&A.setGap(o.GUTTER_COLUMN,s.columnGap),typeof s.flexBasis<"u"&&A.setFlexBasis(Ve(s.flexBasis,"flexBasis")),A.setFlexGrow(typeof s.flexGrow>"u"?0:s.flexGrow),A.setFlexShrink(typeof s.flexShrink>"u"?0:s.flexShrink),typeof s.maxHeight<"u"&&A.setMaxHeight(Te(s.maxHeight,"maxHeight")),typeof s.maxWidth<"u"&&A.setMaxWidth(Te(s.maxWidth,"maxWidth")),typeof s.minHeight<"u"&&A.setMinHeight(Te(s.minHeight,"minHeight")),typeof s.minWidth<"u"&&A.setMinWidth(Te(s.minWidth,"minWidth")),A.setOverflow(ZA(s.overflow,{visible:o.OVERFLOW_VISIBLE,hidden:o.OVERFLOW_HIDDEN},o.OVERFLOW_VISIBLE,"overflow")),A.setMargin(o.EDGE_TOP,Ve(s.marginTop||0)),A.setMargin(o.EDGE_BOTTOM,Ve(s.marginBottom||0)),A.setMargin(o.EDGE_LEFT,Ve(s.marginLeft||0)),A.setMargin(o.EDGE_RIGHT,Ve(s.marginRight||0)),A.setBorder(o.EDGE_TOP,s.borderTopWidth||0),A.setBorder(o.EDGE_BOTTOM,s.borderBottomWidth||0),A.setBorder(o.EDGE_LEFT,s.borderLeftWidth||0),A.setBorder(o.EDGE_RIGHT,s.borderRightWidth||0),A.setPadding(o.EDGE_TOP,s.paddingTop||0),A.setPadding(o.EDGE_BOTTOM,s.paddingBottom||0),A.setPadding(o.EDGE_LEFT,s.paddingLeft||0),A.setPadding(o.EDGE_RIGHT,s.paddingRight||0),A.setBoxSizing(ZA(s.boxSizing,{"border-box":o.BOX_SIZING_BORDER_BOX,"content-box":o.BOX_SIZING_CONTENT_BOX},o.BOX_SIZING_BORDER_BOX,"boxSizing")),A.setPositionType(ZA(s.position,{absolute:o.POSITION_TYPE_ABSOLUTE,relative:o.POSITION_TYPE_RELATIVE,static:o.POSITION_TYPE_STATIC},o.POSITION_TYPE_RELATIVE,"position")),typeof s.top<"u"&&A.setPosition(o.EDGE_TOP,Te(s.top,"top")),typeof s.bottom<"u"&&A.setPosition(o.EDGE_BOTTOM,Te(s.bottom,"bottom")),typeof s.left<"u"&&A.setPosition(o.EDGE_LEFT,Te(s.left,"left")),typeof s.right<"u"&&A.setPosition(o.EDGE_RIGHT,Te(s.right,"right")),typeof s.height<"u"?A.setHeight(Ve(s.height,"height")):A.setHeightAuto(),typeof s.width<"u"?A.setWidth(Ve(s.width,"width")):A.setWidthAuto(),[s,ai(s)]}var Bi=se(require("escape-html"),1);var Wa=[1,0,0,1,0,0];function kc(A,e,t){let r=[...Wa];for(let n of A){let i=Object.keys(n)[0],o=n[i];if(typeof o=="string")if(i==="translateX")o=parseFloat(o)/100*e,n[i]=o;else if(i==="translateY")o=parseFloat(o)/100*t,n[i]=o;else throw new Error(`Invalid transform: "${i}: ${o}".`);let s=o,a=[...Wa];switch(i){case"translateX":a[4]=s;break;case"translateY":a[5]=s;break;case"scale":a[0]=s,a[3]=s;break;case"scaleX":a[0]=s;break;case"scaleY":a[3]=s;break;case"rotate":{let g=s*Math.PI/180,u=Math.cos(g),I=Math.sin(g);a[0]=u,a[1]=I,a[2]=-I,a[3]=u;break}case"skewX":a[2]=Math.tan(s*Math.PI/180);break;case"skewY":a[1]=Math.tan(s*Math.PI/180);break}r=qt(a,r)}A.splice(0,A.length),A.push(...r),A.__resolved=!0}function $t({left:A,top:e,width:t,height:r},n,i,o){let s;n.__resolved||kc(n,t,r);let a=n;if(i)s=a;else{let g=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*t/100,u=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,I=A+g,B=e+u;s=qt([1,0,0,1,I,B],qt(a,[1,0,0,1,-I,-B])),a.__parent&&(s=qt(a.__parent,s)),a.splice(0,6,...s)}return`matrix(${s.map(g=>g.toFixed(2)).join(",")})`}function Ka({left:A,top:e,width:t,height:r,isInheritingTransform:n},i){let o="",s=1;return i.transform&&(o=$t({left:A,top:e,width:t,height:r},i.transform,n,i.transformOrigin)),i.opacity!==void 0&&(s=+i.opacity),{matrix:o,opacity:s}}function Ei({id:A,content:e,filter:t,left:r,top:n,width:i,height:o,matrix:s,opacity:a,image:g,clipPathId:u,debug:I,shape:B,decorationShape:f},E){let C="";if(I&&(C=v("rect",{x:r,y:n-o,width:i,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0})),g){let w={href:g,x:r,y:n,width:i,height:o,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0,style:E.filter?`filter:${E.filter}`:void 0},S=v("image",{...w,opacity:a!==1?a:void 0})+(f||"");return[(t?t+v("g",{filter:`url(#satori_s-${A})`},S):S)+C,""]}let p={x:r,y:n,width:i,height:o,"font-weight":E.fontWeight,"font-style":E.fontStyle,"font-size":E.fontSize,"font-family":E.fontFamily,"letter-spacing":E.letterSpacing||void 0,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0,style:E.filter?`filter:${E.filter}`:void 0,"stroke-width":E.WebkitTextStrokeWidth?`${E.WebkitTextStrokeWidth}px`:void 0,stroke:E.WebkitTextStrokeWidth?E.WebkitTextStrokeColor:void 0,"stroke-linejoin":E.WebkitTextStrokeWidth?"round":void 0,"paint-order":E.WebkitTextStrokeWidth?"stroke":void 0},y=v("text",{...p,fill:E.color,opacity:a!==1?a:void 0},(0,Bi.default)(e))+(f||"");return[(t?t+v("g",{filter:`url(#satori_s-${A})`},y):y)+C,B?v("text",p,(0,Bi.default)(e)):""]}function Rc(A,e,t){return A.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,n,i,o){return n+(parseFloat(i)+e)+","+(parseFloat(o)+t)})}var un=1.1;function Ya({id:A,width:e,height:t},r,n=!1){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowColor.length,o="",s="",a=0,g=e,u=0,I=t;for(let B=0;B<i;B++){let f=r.shadowRadius[B]*r.shadowRadius[B]/4;if(a=Math.min(r.shadowOffset[B].width-f,a),g=Math.max(r.shadowOffset[B].width+f+e,g),u=Math.min(r.shadowOffset[B].height-f,u),I=Math.max(r.shadowOffset[B].height+f+t,I),n){let E=`satori_s-${A}-result-${B}`;o+=v("feGaussianBlur",{in:"SourceAlpha",stdDeviation:r.shadowRadius[B]/2,result:`${E}-blur`})+v("feOffset",{in:`${E}-blur`,dx:r.shadowOffset[B].width,dy:r.shadowOffset[B].height,result:`${E}-offset`})+v("feFlood",{"flood-color":r.shadowColor[B],"flood-opacity":1,result:`${E}-color`})+v("feComposite",{in:`${E}-color`,in2:`${E}-offset`,operator:"in",result:i>1?E:void 0})}else o+=v("feDropShadow",{dx:r.shadowOffset[B].width,dy:r.shadowOffset[B].height,stdDeviation:r.shadowRadius[B]/2,"flood-color":r.shadowColor[B],"flood-opacity":1,...i>1?{in:"SourceGraphic",result:`satori_s-${A}-result-${B}`}:{}});i>1&&(s=v("feMergeNode",{in:`satori_s-${A}-result-${B}`})+s)}return v("filter",{id:`satori_s-${A}`,x:(a/e*100*un).toFixed(2)+"%",y:(u/t*100*un).toFixed(2)+"%",width:((g-a)/e*100*un).toFixed(2)+"%",height:((I-u)/t*100*un).toFixed(2)+"%"},o+(s?v("feMerge",{},s):""))}function qa({width:A,height:e,shape:t,opacity:r,id:n},i){if(!i.boxShadow)return null;let o="",s="";for(let a=i.boxShadow.length-1;a>=0;a--){let g="",u=i.boxShadow[a];u.spreadRadius&&u.inset&&(u.spreadRadius=-u.spreadRadius);let I=u.blurRadius*u.blurRadius/4+(u.spreadRadius||0),B=Math.min(-I-(u.inset?u.offsetX:0),0),f=Math.max(I+A-(u.inset?u.offsetX:0),A),E=Math.min(-I-(u.inset?u.offsetY:0),0),C=Math.max(I+e-(u.inset?u.offsetY:0),e),p=`satori_s-${n}-${a}`,y=`satori_ms-${n}-${a}`,w=u.spreadRadius?t.replace('stroke-width="0"',`stroke-width="${u.spreadRadius*2}"`):t;g+=v("mask",{id:y,maskUnits:"userSpaceOnUse"},v("rect",{x:0,y:0,width:i._viewportWidth||"100%",height:i._viewportHeight||"100%",fill:u.inset?"#000":"#fff"})+w.replace('fill="#fff"',u.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let S=w.replace(/d="([^"]+)"/,(x,b)=>'d="'+Rc(b,u.offsetX,u.offsetY)+'"').replace(/x="([^"]+)"/,(x,b)=>'x="'+(parseFloat(b)+u.offsetX)+'"').replace(/y="([^"]+)"/,(x,b)=>'y="'+(parseFloat(b)+u.offsetY)+'"');u.spreadRadius&&u.spreadRadius<0&&(g+=v("mask",{id:y+"-neg",maskUnits:"userSpaceOnUse"},S.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-u.spreadRadius*2}"`))),u.spreadRadius&&u.spreadRadius<0&&(S=v("g",{mask:`url(#${y}-neg)`},S)),g+=v("defs",{},v("filter",{id:p,x:`${B/A*100}%`,y:`${E/e*100}%`,width:`${(f-B)/A*100}%`,height:`${(C-E)/e*100}%`},v("feGaussianBlur",{stdDeviation:u.blurRadius/2,result:"b"})+v("feFlood",{"flood-color":u.color,in:"SourceGraphic",result:"f"})+v("feComposite",{in:"f",in2:"b",operator:u.inset?"out":"in"})))+v("g",{mask:`url(#${y})`,filter:`url(#${p})`,opacity:r},S),u.inset?s+=g:o+=g}return[o,s]}function vc(A,e,t,r,n,i){let o=n/2,s=Math.max(o,n*1.25),a=[];for(let I of t){if(I.y2<i+o||I.y1>r+o)continue;let B=Math.max(A,I.x1-s),f=Math.min(e,I.x2+s);if(B>=f)continue;if(a.length===0){a.push([B,f]);continue}let E=a[a.length-1];B<=E[1]?E[1]=Math.max(E[1],f):a.push([B,f])}if(!a.length)return[[A,e]];let g=[],u=A;for(let[I,B]of a)if(I>u&&g.push([u,I]),u=Math.max(u,B),u>=e)break;return u<e&&g.push([u,e]),g}function Qi({width:A,left:e,top:t,ascender:r,clipPathId:n,matrix:i,glyphBoxes:o},s){let{textDecorationColor:a,textDecorationStyle:g,textDecorationLine:u,textDecorationSkipInk:I,fontSize:B,color:f}=s;if(!u||u==="none")return"";let E=Math.max(1,B*.1),C=u==="line-through"?t+r*.7:u==="underline"?t+r*1.1:t,p=g==="dashed"?`${E*1.2} ${E*2}`:g==="dotted"?`0 ${E*2}`:void 0,y=u==="underline"&&(I||"auto")!=="none"&&(o==null?void 0:o.length),w=t+r,S=y?vc(e,e+A,o,C,E,w):[[e,e+A]],x=g==="double"?S.map(([m,R])=>v("line",{x1:m,y1:C+E+1,x2:R,y2:C+E+1,stroke:a||f,"stroke-width":E,"stroke-dasharray":p,"stroke-linecap":g==="dotted"?"round":"square",transform:i})).join(""):"",b=S.map(([m,R])=>v("line",{x1:m,y1:C,x2:R,y2:C,stroke:a||f,"stroke-width":E,"stroke-dasharray":p,"stroke-linecap":g==="dotted"?"round":"square",transform:i})).join("")+x;return n?v("g",{"clip-path":`url(#${n})`},b):b}function Ci(A){return A=A.replace("U+","0x"),String.fromCodePoint(Number(A))}var It=Ci("U+0020"),di=Ci("U+0009"),vt=Ci("U+2026");function Xa(A,e,t){let{fontSize:r,letterSpacing:n,fontFeatureSettings:i}=t,o=new Map;function s(I){let B=o.get(I);return B===void 0&&(B=A.measure(I,{fontSize:r,letterSpacing:n,fontFeatureSettings:i}),o.set(I,B)),B}function a(I){return s(I)}function g(I){let B=0,f="",E=()=>{f&&(B+=s(f),f="")};for(let C of I)e(C)?(E(),B+=r):f+=C;return E(),B}function u(I){return g(OA(I,"grapheme"))}return{measureGrapheme:a,measureGraphemeArray:g,measureText:u}}function Va(A,e,t){let{textTransform:r,whiteSpace:n,wordBreak:i}=e;A=Fc(A,r,t);let{content:o,shouldCollapseTabsAndSpaces:s,allowSoftWrap:a}=Lc(A,n),{words:g,requiredBreaks:u,allowBreakWord:I}=Mc(o,i),[B,f]=Nc(e,a);return{words:g,requiredBreaks:u,allowSoftWrap:a,allowBreakWord:I,processedContent:o,shouldCollapseTabsAndSpaces:s,lineLimit:B,blockEllipsis:f}}function Fc(A,e,t){return e==="uppercase"?A=A.toLocaleUpperCase(t):e==="lowercase"?A=A.toLocaleLowerCase(t):e==="capitalize"&&(A=OA(A,"word",t).map(r=>OA(r,"grapheme",t).map((n,i)=>i===0?n.toLocaleUpperCase(t):n).join("")).join("")),A}function Nc(A,e){let{textOverflow:t,lineClamp:r,WebkitLineClamp:n,WebkitBoxOrient:i,overflow:o,display:s}=A;if(s==="block"&&r){let[a,g=vt]=Gc(r);if(a)return[a,g]}return t==="ellipsis"&&s==="-webkit-box"&&i==="vertical"&&Aa(n)&&n>0?[n,vt]:t==="ellipsis"&&o==="hidden"&&!e?[1,vt]:[1/0]}function Mc(A,e){let t=["break-all","break-word"].includes(e),{words:r,requiredBreaks:n}=ta(A,e);return{words:r,requiredBreaks:n,allowBreakWord:t}}function Lc(A,e){let t=["pre","pre-wrap","pre-line"].includes(e),r=["normal","nowrap","pre-line"].includes(e),n=!["pre","nowrap"].includes(e);return t||(A=A.replace(/\n/g,It)),r&&(A=A.replace(/([ ]|\t)+/g,It).replace(/^[ ]|[ ]$/g,"")),{content:A,shouldCollapseTabsAndSpaces:r,allowSoftWrap:n}}function Gc(A){if(typeof A=="number")return[A];let e=/^(\d+)\s*"(.*)"$/,t=/^(\d+)\s*'(.*)'$/,r=e.exec(A),n=t.exec(A);if(r){let i=+r[1],o=r[2];return[i,o]}else if(n){let i=+n[1],o=n[2];return[i,o]}return[]}var hi=se(require("parse-css-color"),1),Uc=new Set([di]);function Hc(A){return Uc.has(A)}function pi(A){if(A==="transparent")return!0;let e=(0,hi.default)(A);return e?e.alpha===0:!1}function za(A){if(!A)return!1;let e=(0,hi.default)(A);if(!e)return!1;let[t,r,n,i]=e.values;return t===255&&r===255&&n===255&&(i===void 0||i===1)}async function*mi(A,e){let t=await ze(),{parentStyle:r,inheritedStyle:n,parent:i,font:o,id:s,isInheritingTransform:a,debug:g,embedFont:u,graphemeImages:I,locale:B,canLoadAdditionalAssets:f}=e,{textAlign:E,textIndent:C=0,lineHeight:p,textWrap:y,fontSize:w,filter:S,tabSize:x=8,letterSpacing:b,fontFeatureSettings:m,_inheritedBackgroundClipTextPath:R,_inheritedBackgroundClipTextHasBackground:F,flexShrink:W}=r,{words:Y,requiredBreaks:$,allowSoftWrap:cA,allowBreakWord:eA,processedContent:IA,shouldCollapseTabsAndSpaces:re,lineLimit:pA,blockEllipsis:UA}=Va(A,r,B),CA=Oc(t,E);i.insertChild(CA,i.getChildCount()),ea(W)&&i.setFlexShrink(1);let AA=o.getEngine(w,p,r,B),fA=f?OA(IA,"grapheme").filter(z=>!Hc(z)&&!AA.has(z)):[];yield fA.map(z=>({word:z,locale:B})),fA.length&&(AA=o.getEngine(w,p,r,B));function ne(z){return!!(I&&Object.prototype.hasOwnProperty.call(I,z)&&I[z])}let{measureGrapheme:PA,measureGraphemeArray:FA,measureText:hA}=Xa(AA,ne,{fontSize:w,letterSpacing:b,fontFeatureSettings:m}),NA=Vr(x)?V(x,w,1,r):PA(It)*x,LA=(z,X)=>{if(z.length===0)return{originWidth:0,endingSpacesWidth:0,text:z};let{index:gA,tabCount:Z}=Tc(z),dA=0;if(Z>0){let mA=z.slice(0,gA),tA=z.slice(gA+Z),rA=hA(mA),ue=rA+X;dA=(NA===0?rA:(Math.floor(ue/NA)+Z)*NA)+hA(tA)}else dA=hA(z);let aA=z.trimEnd()===z?dA:hA(z.trimEnd());return{originWidth:dA,endingSpacesWidth:dA-aA,text:z}},K=[],sA=[],_=[],RA=[],SA=[];function GA(z){let X=0,gA=0,Z=-1,dA=0,aA=0,mA=0,tA=0;K=[],_=[0],RA=[],SA=[];let rA=0,ue=0;for(;rA<Y.length&&X<pA;){let j=Y[rA],HA=$[rA],VA=0,{originWidth:Tt,endingSpacesWidth:kA,text:st}=LA(j,aA);j=st,VA=Tt;let WA=kA;HA&&mA===0&&(mA=AA.height(j));let Ue=E==="justify",yA=rA&&aA+VA>z+WA&&cA;if(eA&&VA>z&&(!aA||yA||HA)){let $A=OA(j,"grapheme");Y.splice(rA,1,...$A),aA>0&&(K.push(aA-ue),sA.push(tA),X++,dA+=mA,aA=0,mA=0,tA=0,_.push(1),Z=-1),ue=WA;continue}if(HA||yA)re&&j===It&&(VA=0),K.push(aA-ue),sA.push(tA),X++,dA+=mA,aA=VA,mA=VA?Math.round(AA.height(j)):0,tA=VA?Math.round(AA.baseline(j)):0,_.push(1),Z=-1,HA||(gA=Math.max(gA,z));else{aA+=VA;let $A=Math.round(AA.height(j));$A>mA&&(mA=$A,tA=Math.round(AA.baseline(j))),Ue&&_[_.length-1]++}Ue&&Z++,gA=Math.max(gA,aA);let jA=aA-VA;if(VA===0)SA.push({y:dA,x:jA,width:0,line:X,lineIndex:Z,isImage:!1});else{let $A=OA(j,"word");for(let Ie=0;Ie<$A.length;Ie++){let we=$A[Ie],zA=0,le=!1;ne(we)?(zA=w,le=!0):!u&&we.length>1?zA=hA(we):zA=PA(we),RA.push(we),SA.push({y:dA,x:jA,width:zA,line:X,lineIndex:Z,isImage:le}),jA+=zA,Ie<$A.length-1&&b>0&&(jA+=b)}}rA++,ue=WA}return aA&&(X<pA&&(dA+=mA),X++,K.push(aA),sA.push(tA)),{width:gA,height:dA}}let KA={width:0,height:0};CA.setMeasureFunc(z=>{let{width:X,height:gA}=GA(z);if(y==="balance"){let dA=X/2,aA=X,mA=X;for(;dA+1<aA;){mA=(dA+aA)/2;let{height:rA}=GA(mA);rA>gA?dA=mA:aA=mA}GA(aA);let tA=Math.ceil(aA);return KA={width:tA,height:gA},{width:tA,height:gA}}if(y==="pretty"&&K[K.length-1]<X/3){let mA=X*.9,tA=GA(mA);if(tA.height<=gA*1.3)return KA={width:X,height:tA.height},{width:X,height:tA.height}}let Z=Math.ceil(X);return KA={width:Z,height:gA},{width:Z,height:gA}});let[BA,YA]=yield,JA="",xA="",vA=n._inheritedClipPathId,dt=n._inheritedMaskId,{left:Re,top:Ot,width:rt,height:pt}=CA.getComputedLayout(),ht=typeof C=="string"?V(C,w,rt,r,!0)||0:C,nt=i.getComputedWidth()-i.getComputedPadding(t.EDGE_LEFT)-i.getComputedPadding(t.EDGE_RIGHT)-i.getComputedBorder(t.EDGE_LEFT)-i.getComputedBorder(t.EDGE_RIGHT),ve=BA+Re,pe=YA+Ot,{matrix:ae,opacity:it}=Ka({left:Re,top:Ot,width:rt,height:pt,isInheritingTransform:a},r),qA="";if(r.textShadowOffset){let{textShadowColor:z,textShadowOffset:X,textShadowRadius:gA}=r;qA=Ya({width:KA.width,height:KA.height,id:s},{shadowColor:z,shadowOffset:X,shadowRadius:gA},pi(r.color)||F&&za(r.color)),qA=v("defs",{},qA)}let he="",me="",ot="",Xe=-1,XA={},ge={},ie=null,ye=0;for(let z=0;z<RA.length;z++){let X=SA[z],gA=SA[z+1];if(!X)continue;let Z=RA[z],dA=null,aA=!1,mA=I&&Object.prototype.hasOwnProperty.call(I,Z)?I[Z]:null,tA=X.y,rA=X.x,ue=X.width,j=X.line,HA=r.textDecorationLine==="underline"&&(r.textDecorationSkipInk||"auto")!=="none";if(j===Xe)continue;let VA=!1;if(j===0&&ht!==0&&(rA+=ht),K.length>1){let yA=rt-K[j];if(E==="right"||E==="end")rA+=yA;else if(E==="center")rA+=yA/2;else if(E==="justify"&&j<K.length-1){let bA=_[j],jA=bA>1?yA/(bA-1):0;rA+=jA*X.lineIndex,VA=!0}u&&(rA=Math.round(rA))}let Tt=sA[j],kA=AA.baseline(Z),st=AA.height(Z),WA=Tt-kA,Ue=yA=>!HA||r.textDecorationLine!=="underline"?void 0:{underlineY:pe+yA+WA+kA+kA*.1,strokeWidth:Math.max(1,w*.1)};if(XA[j]||(XA[j]={left:rA,top:pe+tA+WA,ascender:kA,width:VA?rt:K[j]}),pA!==1/0){let we=function(zA,le){let Pt=OA(le,"grapheme",B),mt="",_r=0;for(let Jr of Pt){let _t=zA+FA([mt+Jr]);if(mt&&_t+bA>nt)break;mt+=Jr,_r=_t}return{subset:mt,resolvedWidth:_r}},yA=UA,bA=PA(UA);bA>nt&&(yA=vt,bA=PA(yA));let jA=PA(It),$A=j<K.length-1;if(j+1===pA&&($A||K[j]>nt)){if(rA+ue+bA+jA>nt){let{subset:zA,resolvedWidth:le}=we(rA,Z);Z=zA+yA,Xe=j,XA[j].width=Math.max(0,le-XA[j].left),aA=!0}else if(gA&&gA.line!==j)if(E==="center"){let{subset:zA,resolvedWidth:le}=we(rA,Z);Z=zA+yA,Xe=j,XA[j].width=Math.max(0,le-XA[j].left),aA=!0}else{let zA=RA[z+1],{subset:le,resolvedWidth:Pt}=we(ue+rA,zA);Z=Z+le+yA,Xe=j,XA[j].width=Math.max(0,Pt-XA[j].left),aA=!0}}}if(mA)tA+=0;else if(u){if(!Z.includes(di)&&!zs.includes(Z)&&RA[z+1]&&gA&&!gA.isImage&&tA===gA.y&&!aA){ie===null&&(ye=rA),ie=ie===null?Z:ie+Z;continue}let yA=ie===null?Z:ie+Z,bA=ie===null?rA:ye,jA=X.width+rA-bA,$A=Ue(tA),Ie=AA.getSVG(yA.replace(/(\t)+/g,""),{fontSize:w,left:ve+bA,top:pe+tA+kA+WA,letterSpacing:b,fontFeatureSettings:m},$A);dA=Ie.path,HA&&Ie.boxes&&Ie.boxes.length&&(ge[j]||(ge[j]=[])).push(...Ie.boxes),ie=null,g&&(ot+=v("rect",{x:ve+bA,y:pe+tA+WA,width:jA,height:st,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:ae||void 0,"clip-path":vA?`url(#${vA})`:void 0})+v("line",{x1:ve+rA,x2:ve+rA+X.width,y1:pe+tA+WA+kA,y2:pe+tA+WA+kA,stroke:"#14c000","stroke-width":1,transform:ae||void 0,"clip-path":vA?`url(#${vA})`:void 0}))}else if(tA+=kA+WA,HA&&!mA){let yA=Ue(tA),bA=AA.getSVG(Z.replace(/(\t)+/g,""),{fontSize:w,left:ve+rA,top:pe+tA,letterSpacing:b,fontFeatureSettings:m},yA);bA.boxes&&bA.boxes.length&&(ge[j]||(ge[j]=[])).push(...bA.boxes)}if(dA!==null)me+=dA+" ";else{let[yA,bA]=Ei({content:Z,filter:qA,id:s,left:ve+rA,top:pe+tA,width:ue,height:st,matrix:ae,opacity:it,image:mA,clipPathId:vA,debug:g,shape:!!R},r);JA+=yA,xA+=bA}if(aA)break}if(r.textDecorationLine&&(he=Object.entries(XA).map(([z,X])=>{if(!X)return"";let gA=ge[z]||[];return Qi({left:ve+X.left,top:X.top,width:X.width,ascender:X.ascender,clipPathId:vA,matrix:ae,glyphBoxes:gA},r)}).join("")),me){let z=(!pi(r.color)||qA)&&it!==0?v("path",{fill:qA&&(pi(r.color)||F&&za(r.color))?"black":r.color,d:me,transform:ae||void 0,[n.WebkitTextStrokeWidth||S||qA?"opacity":"fill-opacity"]:it!==1?it:void 0,style:S?`filter:${S}`:void 0,"stroke-width":n.WebkitTextStrokeWidth?`${n.WebkitTextStrokeWidth}px`:void 0,stroke:n.WebkitTextStrokeWidth?n.WebkitTextStrokeColor:void 0,"stroke-linejoin":n.WebkitTextStrokeWidth?"round":void 0,"paint-order":n.WebkitTextStrokeWidth?"stroke":void 0}):"",X=z?v("g",{mask:dt?`url(#${dt})`:void 0,"clip-path":vA?`url(#${vA})`:void 0},z):"";R&&(xA=v("path",{d:me,transform:ae||void 0})),JA+=(qA?qA+v("g",{filter:`url(#satori_s-${s})`},X+he):X+he)+ot}else he&&(JA+=qA?v("g",{filter:`url(#satori_s-${s})`},he):he);return xA&&(r._inheritedBackgroundClipTextPath.value+=xA),JA}function Oc(A,e){let t=A.Node.create();return t.setAlignItems(A.ALIGN_BASELINE),t.setJustifyContent(ZA(e,{left:A.JUSTIFY_FLEX_START,right:A.JUSTIFY_FLEX_END,center:A.JUSTIFY_CENTER,justify:A.JUSTIFY_SPACE_BETWEEN,start:A.JUSTIFY_FLEX_START,end:A.JUSTIFY_FLEX_END},A.JUSTIFY_FLEX_START,"textAlign")),t}function Tc(A){let e=/(\t)+/.exec(A);return e?{index:e.index,tabCount:e[0].length}:{index:null,tabCount:0}}var ja=require("css-gradient-parser");var Za=se(require("parse-css-color"),1);function In(A,e,t,r,n){let i=[],o=e.at(-1),s=o&&o.offset&&o.offset.unit==="%"&&r?+o.offset.value:100;for(let I of e){let{color:B}=I;if(!i.length&&(i.push({offset:0,color:B}),!I.offset||I.offset.value==="0"))continue;let f=typeof I.offset>"u"?void 0:I.offset.unit==="%"?+I.offset.value/s:Number(V(`${I.offset.value}${I.offset.unit}`,t.fontSize,A,t,!0))/A;i.push({offset:f,color:B})}i.length||i.push({offset:0,color:"transparent"});let a=i[i.length-1];a.offset!==1&&(typeof a.offset>"u"?a.offset=1:r?i[i.length-1]={offset:1,color:a.color}:i.push({offset:1,color:a.color}));let g=0,u=1;for(let I=0;I<i.length;I++)if(typeof i[I].offset>"u"){for(u<I&&(u=I);typeof i[u].offset>"u";)u++;i[I].offset=(i[u].offset-i[g].offset)/(u-g)*(I-g)+i[g].offset}else g=I;return n==="mask"?i.map(I=>{let B=(0,Za.default)(I.color);return B?B.alpha===0?{...I,color:"rgba(0, 0, 0, 1)"}:{...I,color:`rgba(255, 255, 255, ${B.alpha})`}:I}):i}function $a({id:A,width:e,height:t,repeatX:r,repeatY:n},i,o,s,a,g){let u=(0,ja.parseLinearGradient)(i),[I,B]=o,f=i.startsWith("repeating"),E,C,p;if(u.orientation.type==="directional")E=_c(u.orientation.value),C=Math.sqrt(Math.pow((E.x2-E.x1)*I,2)+Math.pow((E.y2-E.y1)*B,2));else if(u.orientation.type==="angular"){let{length:b,...m}=Jc(gt(`${u.orientation.value.value}${u.orientation.value.unit}`)/180*Math.PI,I,B);C=b,E=m}p=f?Wc(u.stops,C,E,a):E;let y=In(f?Pc(u.stops,C):C,u.stops,a,f,g),w=`satori_bi${A}`,S=`satori_pattern_${A}`,x=v("pattern",{id:S,x:s[0]/e,y:s[1]/t,width:r?I/e:"1",height:n?B/t:"1",patternUnits:"objectBoundingBox"},v("linearGradient",{id:w,...p,spreadMethod:f?"repeat":"pad"},y.map(b=>v("stop",{offset:(b.offset??0)*100+"%","stop-color":b.color})).join(""))+v("rect",{x:0,y:0,width:I,height:B,fill:`url(#${w})`}));return[S,x]}function Pc(A,e){let t=A[A.length-1],{offset:r}=t;return r?r.unit==="%"?Number(r.value)/100*e:Number(r.value):e}function _c(A){let e=0,t=0,r=0,n=0;return A.includes("top")?t=1:A.includes("bottom")&&(n=1),A.includes("left")?e=1:A.includes("right")&&(r=1),!e&&!r&&!t&&!n&&(t=1),{x1:e,y1:t,x2:r,y2:n}}function Jc(A,e,t){let r=Math.pow(t/e,2);A=(A%(Math.PI*2)+Math.PI*2)%(Math.PI*2);let n,i,o,s,a,g,u,I,B=f=>{if(f===0){n=0,i=t,o=0,s=0,a=t;return}else if(f===Math.PI/2){n=0,i=0,o=e,s=0,a=e;return}if(f>0&&f<Math.PI/2){n=(r*e/2/Math.tan(f)-t/2)/(Math.tan(f)+r/Math.tan(f)),i=Math.tan(f)*n+t,o=Math.abs(e/2-n)+e/2,s=t/2-Math.abs(i-t/2),a=Math.sqrt(Math.pow(o-n,2)+Math.pow(s-i,2)),u=(e/2/Math.tan(f)-t/2)/(Math.tan(f)+1/Math.tan(f)),I=Math.tan(f)*u+t,a=2*Math.sqrt(Math.pow(e/2-u,2)+Math.pow(t/2-I,2));return}else if(f>Math.PI/2&&f<Math.PI){n=(t/2+r*e/2/Math.tan(f))/(Math.tan(f)+r/Math.tan(f)),i=Math.tan(f)*n,o=Math.abs(e/2-n)+e/2,s=t/2+Math.abs(i-t/2),u=(e/2/Math.tan(f)+t/2)/(Math.tan(f)+1/Math.tan(f)),I=Math.tan(f)*u,a=2*Math.sqrt(Math.pow(e/2-u,2)+Math.pow(t/2-I,2));return}else f>=Math.PI&&(B(f-Math.PI),g=n,n=o,o=g,g=i,i=s,s=g)};return B(A),{x1:n/e,y1:i/t,x2:o/e,y2:s/t,length:a}}function Wc(A,e,t,r){let{x1:n,x2:i,y1:o,y2:s}=t,a=A[0].offset?A[0].offset.unit==="%"?Number(A[0].offset.value)/100:V(`${A[0].offset.value}${A[0].offset.unit}`,r.fontSize,e,r,!0)/e:0,g=A.at(-1).offset?A.at(-1).offset.unit==="%"?Number(A.at(-1).offset.value)/100:V(`${A.at(-1).offset.value}${A.at(-1).offset.unit}`,r.fontSize,e,r,!0)/e:1,u=(i-n)*a+n,I=(s-o)*a+o,B=(i-n)*g+n,f=(s-o)*g+o;return{x1:u,y1:I,x2:B,y2:f}}var eg=require("css-gradient-parser");function tg({id:A,width:e,height:t,repeatX:r,repeatY:n},i,o,s,a,g){var eA;let{shape:u,stops:I,position:B,size:f,repeating:E}=(0,eg.parseRadialGradient)(i),[C,p]=o,y=C/2,w=p/2,S=Yc(B.x,B.y,C,p,a.fontSize,a);y=S.x,w=S.y;let x=Kc(e,I,E,a),b=In(x,I,a,E,g),m=`satori_radial_${A}`,R=`satori_pattern_${A}`,F=`satori_mask_${A}`,W=Xc(u,f,a.fontSize,{x:y,y:w},[C,p],a,E),Y=qc(u,a.fontSize,I,[C,p],a,E,W),$=v("pattern",{id:R,x:s[0]/e,y:s[1]/t,width:r?C/e:"1",height:n?p/t:"1",patternUnits:"objectBoundingBox"},v("radialGradient",{id:m,...Y},b.map(IA=>v("stop",{offset:IA.offset||0,"stop-color":IA.color})).join(""))+v("mask",{id:F},v("rect",{x:0,y:0,width:C,height:p,fill:"#fff"}))+v("rect",{x:0,y:0,width:C,height:p,fill:((eA=b.at(-1))==null?void 0:eA.color)||"transparent"})+v(u,{cx:y,cy:w,width:C,height:p,...W,fill:`url(#${m})`,mask:`url(#${F})`}));return[R,$]}function Kc(A,e,t,r){if(!t)return A;let n=e.at(-1);return!n||!n.offset||n.offset.unit==="%"?A:V(`${n.offset.value}${n.offset.unit}`,+r.fontSize,A,r,!0)}function Yc(A,e,t,r,n,i){let o={x:t/2,y:r/2};return A.type==="keyword"?Object.assign(o,Ag(A.value,t,r,"x")):o.x=V(`${A.value.value}${A.value.unit}`,n,t,i,!0)??t/2,e.type==="keyword"?Object.assign(o,Ag(e.value,t,r,"y")):o.y=V(`${e.value.value}${e.value.unit}`,n,r,i,!0)??r/2,o}function Ag(A,e,t,r){switch(A){case"center":return{[r]:r==="x"?e/2:t/2};case"left":return{x:0};case"top":return{y:0};case"right":return{x:e};case"bottom":return{y:t}}}function qc(A,e,t,[r,n],i,o,s){let{r:a,rx:g,ratio:u=1}=s;if(!o)return{spreadMethod:"pad"};let I=t.at(-1),B=A==="circle"?a*2:g*2;return{spreadMethod:"repeat",cx:"50%",cy:"50%",r:I.offset.unit==="%"?`${Number(I.offset.value)*Math.min(n/r,1)/u}%`:Number(V(`${I.offset.value}${I.offset.unit}`,e,r,i,!0)/B)}}function Xc(A,e,t,r,n,i,o){let[s,a]=n,{x:g,y:u}=r,I={},B=0,f=0;if(Vc(e)){if(e.some(E=>E.value.value.startsWith("-")))throw new Error("disallow setting negative values to the size of the shape. Check https://w3c.github.io/csswg-drafts/css-images/#valdef-rg-size-length-0");return A==="circle"?Object.assign(I,{r:Number(V(`${e[0].value.value}${e[0].value.unit}`,t,s,i,!0))}):Object.assign(I,{rx:Number(V(`${e[0].value.value}${e[0].value.unit}`,t,s,i,!0)),ry:Number(V(`${e[1].value.value}${e[1].value.unit}`,t,a,i,!0))}),ln(I,s,a,g,u,o,A),I}switch(e[0].value){case"farthest-corner":B=Math.max(Math.abs(s-g),Math.abs(g)),f=Math.max(Math.abs(a-u),Math.abs(u));break;case"closest-corner":B=Math.min(Math.abs(s-g),Math.abs(g)),f=Math.min(Math.abs(a-u),Math.abs(u));break;case"farthest-side":return A==="circle"?I.r=Math.max(Math.abs(s-g),Math.abs(g),Math.abs(a-u),Math.abs(u)):(I.rx=Math.max(Math.abs(s-g),Math.abs(g)),I.ry=Math.max(Math.abs(a-u),Math.abs(u))),ln(I,s,a,g,u,o,A),I;case"closest-side":return A==="circle"?I.r=Math.min(Math.abs(s-g),Math.abs(g),Math.abs(a-u),Math.abs(u)):(I.rx=Math.min(Math.abs(s-g),Math.abs(g)),I.ry=Math.min(Math.abs(a-u),Math.abs(u))),ln(I,s,a,g,u,o,A),I}return A==="circle"?I.r=Math.sqrt(B*B+f*f):Object.assign(I,rg(B,f)),ln(I,s,a,g,u,o,A),I}function ln(A,e,t,r,n,i,o){if(i)if(o==="ellipse"){let s=Math.max(Math.abs(e-r),Math.abs(r)),a=Math.max(Math.abs(t-n),Math.abs(n)),{rx:g,ry:u}=rg(s,a);A.ratio=Math.max(g/A.rx,u/A.ry),A.ratio>1&&(A.rx*=A.ratio,A.ry*=A.ratio)}else{let s=Math.max(Math.abs(e-r),Math.abs(r)),a=Math.max(Math.abs(t-n),Math.abs(n)),g=Math.sqrt(s*s+a*a);A.ratio=g/A.r,A.ratio>1&&(A.r=g)}}function rg(A,e){let t=e!==0?A/e:1;if(A===0)return{rx:0,ry:0};{let r=Math.sqrt(A*A+e*e*t*t)/t;return{ry:r,rx:r*t}}}function Vc(A){return!A.some(e=>e.type==="keyword")}var wi=se(require("parse-css-color"),1);function Di(A,e){return typeof A=="string"&&A.endsWith("%")?e*parseFloat(A)/100:+A}function zc(A,e,t,r,n){if(!r||!n)return[e,t];if(A==="cover"){let i=e/r,o=t/n,s=Math.max(i,o);return[r*s,n*s]}if(A==="contain"){let i=e/r,o=t/n,s=Math.min(i,o);return[r*s,n*s]}if(A==="auto"||A.includes("auto")){let i=A.split(" "),o=i[0]||"auto",s=i[1]||i[0]||"auto",a=r,g=n;if(o==="auto"&&s!=="auto"){let u=Di(s,t);g=u,a=r/n*u}else if(s==="auto"&&o!=="auto"){let u=Di(o,e);a=u,g=n/r*u}return[a,g]}return[e,t]}function yi(A,{x:e,y:t,defaultX:r,defaultY:n}){return(A?A.split(" ").map(i=>{try{let o=new be(i);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(i=>i!==null):[r,n]).map((i,o)=>Di(i,[e,t][o]))}async function Ar({id:A,width:e,height:t,left:r,top:n},{image:i,size:o,position:s,repeat:a},g,u){a=a||"repeat",u=u||"background";let I=a==="repeat-x"||a==="repeat",B=a==="repeat-y"||a==="repeat",f=o&&(o==="cover"||o==="contain"||o==="auto"||o.includes("auto")),E=i.startsWith("linear-gradient(")||i.startsWith("repeating-linear-gradient(")||i.startsWith("radial-gradient(")||i.startsWith("repeating-radial-gradient("),C=f&&E?[e,t]:f?[0,0]:yi(o,{x:e,y:t,defaultX:e,defaultY:t}),p=yi(s,{x:e,y:t,defaultX:0,defaultY:0});if(i.startsWith("linear-gradient(")||i.startsWith("repeating-linear-gradient("))return $a({id:A,width:e,height:t,repeatX:I,repeatY:B},i,C,p,g,u);if(i.startsWith("radial-gradient(")||i.startsWith("repeating-radial-gradient("))return tg({id:A,width:e,height:t,repeatX:I,repeatY:B},i,C,p,g,u);if(i.startsWith("url(")){let[y,w,S]=await Rt(i.slice(4,-1)),x,b;if(f){let[m,R]=zc(o,e,t,w,S);x=m,b=R}else{let m=yi(o,{x:e,y:t,defaultX:0,defaultY:0});x=u==="mask"?w||m[0]:m[0]||w,b=u==="mask"?S||m[1]:m[1]||S}return[`satori_bi${A}`,v("pattern",{id:`satori_bi${A}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:p[0]+r,y:p[1]+n,width:I?x:"100%",height:B?b:"100%"},v("image",{x:0,y:0,width:x,height:b,preserveAspectRatio:"none",href:y}))]}if((0,wi.default)(i)){let y=(0,wi.default)(i),[w,S,x,b]=y.values,R=`rgba(${w},${S},${x},${b!==void 0?b:1})`;return[`satori_bi${A}`,v("pattern",{id:`satori_bi${A}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:r,y:n,width:e,height:t},v("rect",{x:0,y:0,width:e,height:t,fill:R}))]}throw new Error(`Invalid background image: "${i}"`)}function Zc([A,e]){return Math.round(A*1e3)===0&&Math.round(e*1e3)===0?0:Math.round(A*e/Math.sqrt(A*A+e*e)*1e3)/1e3}function cn(A,e,t){return t<A+e&&(t/2<A&&t/2<e?A=e=t/2:t/2<A?A=t-e:t/2<e&&(e=t-A)),[A,e]}function fn(A){A[0]=A[1]=Math.min(A[0],A[1])}function Bn(A,e,t,r,n){if(typeof A=="string"){let i=A.split(" ").map(s=>s.trim()),o=!i[1]&&!i[0].endsWith("%");return i[1]=i[1]||i[0],[o,[Math.min(V(i[0],r,e,n,!0),e),Math.min(V(i[1],r,t,n,!0),t)]]}return typeof A=="number"?[!0,[Math.min(A,e),Math.min(A,t)]]:[!0,void 0]}var En=A=>A&&A[0]!==0&&A[1]!==0;function Qn(A){return typeof A!="string"?1:Ii(A)}function Cn(A,e,t,r,n){if(n===1/0)return[A,t,e];if(n===-1/0)return[A,r,e];if(n===0)return[A,[(A[0]+e[0])/2,(A[1]+e[1])/2],e];let i=n<0?t:r,o=Math.pow(2,1-Math.abs(n));if(o===0)return n>0?[A,t,e]:[A,r,e];let s=[],a=16;for(let g=0;g<=a;g++){let u=Math.PI*g/a/2,I=Math.pow(Math.sin(u),o),B=Math.pow(Math.cos(u),o);s.push([i[0]+(e[0]-i[0])*I+(A[0]-i[0])*B,i[1]+(e[1]-i[1])*I+(A[1]-i[1])*B])}return s}function lt(A){return`${Math.round(A[0]*1e3)/1e3},${Math.round(A[1]*1e3)/1e3}`}function ng(A,e,t,r){return Math.min(1,t/(A[0]+e[0]||t),r/(A[1]+e[1]||r))}function jc(A,e,t,r,n,i,o){o!=null&&o.every(Boolean)&&(o=void 0);let s=A+t,a=e+r,[g,u,I,B]=n,f=[Cn([A,e+g[1]],[A+g[0],e],[A,e],[A+g[0],e+g[1]],i[0]),Cn([s-u[0],e],[s,e+u[1]],[s,e],[s-u[0],e+u[1]],i[1]),Cn([s,a-I[1]],[s-I[0],a],[s,a],[s-I[0],a-I[1]],i[2]),Cn([A+B[0],a],[A,a-B[1]],[A,a],[A+B[0],a-B[1]],i[3])];if(o){let C=o.indexOf(!0);if(C===-1)throw new Error("Invalid `partialSides`.");for(;o[(C+3)%4];)C=(C+3)%4;let p=f[C],y=Math.floor(p.length/2),w=`M${lt(p[y])}`,S=C;do{let x=f[S],b=Math.floor(x.length/2);for(let F=b+1;F<x.length;F++)w+=` L${lt(x[F])}`;let m=f[(S+1)%4];w+=` L${lt(m[0])}`;let R=Math.floor(m.length/2);for(let F=1;F<=R;F++)w+=` L${lt(m[F])}`;S=(S+1)%4}while(o[S]&&S!==C);return w}let E=`M${lt(f[0][f[0].length-1])}`;for(let C=0;C<4;C++){let p=f[(C+1)%4];E+=` L${lt(p[0])}`;for(let y=1;y<p.length;y++)E+=` L${lt(p[y])}`}return E+" Z"}function ig({id:A,borderRadiusPath:e,borderType:t,left:r,top:n,width:i,height:o},s){let a=`satori_brc-${A}`;return[v("clipPath",{id:a},v(t,{x:r,y:n,width:i,height:o,d:e||void 0})),a]}function Ze({left:A,top:e,width:t,height:r},n,i){let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:a,borderBottomRightRadius:g,fontSize:u}=n,I=[Qn(n.cornerTopLeftShape),Qn(n.cornerTopRightShape),Qn(n.cornerBottomRightShape),Qn(n.cornerBottomLeftShape)],B,f,E,C;if([B,o]=Bn(o,t,r,u,n),[f,s]=Bn(s,t,r,u,n),[E,a]=Bn(a,t,r,u,n),[C,g]=Bn(g,t,r,u,n),!i&&!En(o)&&!En(s)&&!En(a)&&!En(g))return"";if(o||=[0,0],s||=[0,0],a||=[0,0],g||=[0,0],[o[0],s[0]]=cn(o[0],s[0],t),[a[0],g[0]]=cn(a[0],g[0],t),[o[1],a[1]]=cn(o[1],a[1],r),[s[1],g[1]]=cn(s[1],g[1],r),B&&fn(o),f&&fn(s),E&&fn(a),C&&fn(g),I.some(b=>b<0)){let b=Math.min(ng(o,g,t,r),ng(s,a,t,r));if(b<1)for(let m of[o,s,g,a])m[0]*=b,m[1]*=b}if(I.some(b=>b!==1))return jc(A,e,t,r,[o,s,g,a],I,i);let p=[];p[0]=[s,s],p[1]=[g,[-g[0],g[1]]],p[2]=[a,[-a[0],-a[1]]],p[3]=[o,[o[0],-o[1]]];let y=`h${t-o[0]-s[0]} a${p[0][0]} 0 0 1 ${p[0][1]}`,w=`v${r-s[1]-g[1]} a${p[1][0]} 0 0 1 ${p[1][1]}`,S=`h${g[0]+a[0]-t} a${p[2][0]} 0 0 1 ${p[2][1]}`,x=`v${a[1]+o[1]-r} a${p[3][0]} 0 0 1 ${p[3][1]}`;if(i){let m=function(eA){let IA=Zc([o,s,g,a][eA]);return eA===0?[[A+o[0]-IA,e+o[1]-IA],[A+o[0],e]]:eA===1?[[A+t-s[0]+IA,e+s[1]-IA],[A+t,e+s[1]]]:eA===2?[[A+t-g[0]+IA,e+r-g[1]+IA],[A+t-g[0],e+r]]:[[A+a[0]-IA,e+r-a[1]+IA],[A,e+r-a[1]]]},b=i.indexOf(!1);if(!i.includes(!0))throw new Error("Invalid `partialSides`.");if(b===-1)b=0;else for(;!i[b];)b=(b+1)%4;let R="",F=m(b),W=`M${F[0]} A${p[(b+3)%4][0]} 0 0 1 ${F[1]}`,Y=0;for(;Y<4&&i[(b+Y)%4];Y++)R+=W+" ",W=[y,w,S,x][(b+Y)%4];let $=(b+Y)%4;R+=W.split(" ")[0];let cA=m($);return R+=` A${p[($+3)%4][0]} 0 0 1 ${cA[0]}`,R}return`M${A+o[0]},${e} ${y} ${w} ${S} ${x}`}function og(A,e,t){return t[A+"Width"]===t[e+"Width"]&&t[A+"Style"]===t[e+"Style"]&&t[A+"Color"]===t[e+"Color"]}function sg({id:A,currentClipPathId:e,borderPath:t,borderType:r,left:n,top:i,width:o,height:s},a){if(!(a.borderTopWidth||a.borderRightWidth||a.borderBottomWidth||a.borderLeftWidth))return null;let u=`satori_bc-${A}`;return[v("clipPath",{id:u,"clip-path":e?`url(#${e})`:void 0},v(r,{x:n,y:i,width:o,height:s,d:t||void 0})),u]}function er({left:A,top:e,width:t,height:r,props:n,asContentMask:i,maskBorderOnly:o},s){let a=["borderTop","borderRight","borderBottom","borderLeft"];if(!i&&!a.some(f=>s[f+"Width"]))return"";let g="",u=0;for(;u>0&&og(a[u],a[(u+3)%4],s);)u=(u+3)%4;let I=[!1,!1,!1,!1],B=[];for(let f=0;f<4;f++){let E=(u+f)%4,C=(u+f+1)%4,p=a[E],y=a[C];if(I[E]=!0,B=[s[p+"Width"],s[p+"Style"],s[p+"Color"],p],!og(p,y,s)){let w=(B[0]||0)+(i&&!o&&s[p.replace("border","padding")]||0);w&&(g+=v("path",{width:t,height:r,...n,fill:"none",stroke:i?"#000":B[2],"stroke-width":w*2,"stroke-dasharray":!i&&B[1]==="dashed"?w*2+" "+w:void 0,d:Ze({left:A,top:e,width:t,height:r},s,I)})),I=[!1,!1,!1,!1]}}if(I.some(Boolean)){let f=(B[0]||0)+(i&&!o&&s[B[3].replace("border","padding")]||0);f&&(g+=v("path",{width:t,height:r,...n,fill:"none",stroke:i?"#000":B[2],"stroke-width":f*2,"stroke-dasharray":!i&&B[1]==="dashed"?f*2+" "+f:void 0,d:Ze({left:A,top:e,width:t,height:r},s,I)}))}return g}function bi({id:A,left:e,top:t,width:r,height:n,matrix:i,borderOnly:o},s){let a=(s.borderLeftWidth||0)+(o?0:s.paddingLeft||0),g=(s.borderTopWidth||0)+(o?0:s.paddingTop||0),u=(s.borderRightWidth||0)+(o?0:s.paddingRight||0),I=(s.borderBottomWidth||0)+(o?0:s.paddingBottom||0),B={x:e+a,y:t+g,width:r-a-u,height:n-g-I};return v("mask",{id:A},v("rect",{...B,fill:"#fff",transform:s.overflow==="hidden"&&s.transform&&i?i:void 0,mask:s._inheritedMaskId?`url(#${s._inheritedMaskId})`:void 0})+er({left:e,top:t,width:r,height:n,props:{transform:i||void 0},asContentMask:!0,maskBorderOnly:o},s))}var Fi=require("css-to-react-native");var ki={left:0,"x-start":0,center:.5,right:1,"x-end":1},Ri={top:0,"y-start":0,center:.5,bottom:1,"y-end":1};function Ne(A){return Math.round(A*1e3)/1e3}function gg(A,e,t,r){let n=A.match(/^shape\((.*)\)$/s);if(!n)return null;let i=Pe(n[1]),o=i.shift();if(!o)throw new Error("Invalid `shape()` value.");let s=o.match(/^(?:(nonzero|evenodd)\s+)?from\s+(.+)$/);if(!s)throw new Error("Invalid `shape()` starting point.");let a=s[1]||"nonzero",g=vi(ag(s[2]),e,t,r),u=g,I=`M${Ne(g[0])},${Ne(g[1])}`;for(let B of i){let f=ag(B),E=f.shift();if(E==="close"){if(f.length)throw new Error("Invalid `close` command in `shape()`.");I+=" Z",g=u;continue}if(E==="move"||E==="line"){let C=Si(f,g,e,t,r);I+=` ${E==="move"?"M":"L"}${Ne(C[0])},${Ne(C[1])}`,g=C,E==="move"&&(u=C);continue}if(E==="hline"||E==="vline"){let C=E==="hline"?0:1,p=f.shift(),y=f.shift();if(p!=="to"&&p!=="by"||!y||f.length)throw new Error(`Invalid \`${E}\` command in \`shape()\`.`);let w=C===0?e:t,S=C===0?ki:Ri,x=p==="to"&&y in S?S[y]*w:je(y,w,r);g=[...g],g[C]=p==="by"?g[C]+x:x,I+=` ${C===0?"H":"V"}${Ne(g[C])}`;continue}if(E==="curve"||E==="smooth"){let C=f.indexOf("with"),p=C===-1?f:f.slice(0,C),y=C===-1?[]:f.slice(C+1),w=p[0],S=Si(p,g,e,t,r);if(E==="curve"&&C===-1)throw new Error("A `curve` command requires a control point.");let x=$c(y).map(b=>Af(b,g,S,e,t,r));if(E==="curve")if(x.length===1)I+=` Q${We(x[0])} ${We(S)}`;else if(x.length===2)I+=` C${We(x[0])} ${We(x[1])} ${We(S)}`;else throw new Error("A `curve` command accepts one or two control points.");else if(!x.length)I+=` T${We(S)}`;else if(x.length===1)I+=` S${We(x[0])} ${We(S)}`;else throw new Error("A `smooth` command accepts at most one control point.");g=S;continue}if(E==="arc"){let C=f.findIndex(F=>["of","cw","ccw","large","small","rotate"].includes(F)),p=C===-1?f:f.slice(0,C),y=C===-1?[]:f.slice(C),w=Si(p,g,e,t,r),S=0,x=0,b=0,m=0,R=0;for(let F=0;F<y.length;F++){let W=y[F];if(W==="of"){let Y=y[++F];if(!Y)throw new Error("Invalid `arc` radius in `shape()`.");let $=y[F+1],cA=$&&!["cw","ccw","large","small","rotate"].includes($);if(cA&&F++,cA)S=je(Y,e,r),x=je($,t,r);else{let eA=Math.sqrt(e*e+t*t)/Math.sqrt(2);S=x=je(Y,eA,r)}}else if(W==="cw"||W==="ccw")R=W==="cw"?1:0;else if(W==="large"||W==="small")m=W==="large"?1:0;else if(W==="rotate"){let Y=y[++F];if(!Y)throw new Error("Invalid `arc` rotation in `shape()`.");let $=gt(Y);if(typeof $>"u")throw new Error("Invalid `arc` rotation in `shape()`.");b=$}else throw new Error("Invalid `arc` option in `shape()`.")}I+=` A${Ne(Math.abs(S))},${Ne(Math.abs(x))} ${Ne(b)} ${m} ${R} ${We(w)}`,g=w;continue}throw new Error(`Unsupported \`${E}\` command in \`shape()\`.`)}return{type:"path",d:I,"fill-rule":a}}function ag(A){return A.trim().replace(/\//g," / ").split(/\s+/).filter(Boolean)}function $c(A){if(!A.length)return[];let e=A.indexOf("/");return e===-1?[A]:[A.slice(0,e),A.slice(e+1)]}function Si(A,e,t,r,n){let i=A[0];if(i!=="to"&&i!=="by")throw new Error("A `shape()` command must use `to` or `by`.");let o=vi(A.slice(1),t,r,n);return i==="by"?[e[0]+o[0],e[1]+o[1]]:o}function Af(A,e,t,r,n,i){let o=A.indexOf("from"),s=o===-1?A:A.slice(0,o),a=o===-1?void 0:A[o+1];if(o!==-1&&(o+2!==A.length||!a))throw new Error("Invalid control point reference in `shape()`.");let g=vi(s,r,n,i,!0);return a==="start"||!a&&!ef(A)?[e[0]+g[0],e[1]+g[1]]:a==="end"?[t[0]+g[0],t[1]+g[1]]:g}function vi(A,e,t,r,n=!1){if(!A.length||A.length>4)throw new Error("Invalid position in `shape()`.");let i,o,s=[...A];for(let a=0;a<s.length;a++){let g=s[a];if(g==="left"||g==="right"||g==="x-start"||g==="x-end"){let u=s[a+1];if(u&&!xi(u)){let I=je(u,e,r);i=g==="left"||g==="x-start"?I:e-I,a++}else i=ki[g]*e}else if(g==="top"||g==="bottom"||g==="y-start"||g==="y-end"){let u=s[a+1];if(u&&!xi(u)){let I=je(u,t,r);o=g==="top"||g==="y-start"?I:t-I,a++}else o=Ri[g]*t}else if(g==="center")if(i===void 0)i=e/2;else if(o===void 0)o=t/2;else throw new Error("Invalid position in `shape()`.");else if(i===void 0)i=je(g,e,r);else if(o===void 0)o=je(g,t,r);else throw new Error("Invalid position in `shape()`.")}return!n&&A.length===1&&o===void 0&&(o=t/2),[i??(n?0:e/2),o??(n?0:t/2)]}function xi(A){return A in ki||A in Ri}function ef(A){return A.some(xi)}function je(A,e,t){let r=V(A,t.fontSize,e,t,!0);if(typeof r>"u")throw new Error(`Invalid length \`${A}\` in \`shape()\`.`);return r}function We(A){return`${Ne(A[0])},${Ne(A[1])}`}var Ft={circle:/circle\((.+)\)/,ellipse:/ellipse\((.+)\)/,path:/path\((.+)\)/,polygon:/polygon\((.+)\)/,inset:/inset\((.+)\)/,shape:/shape\((.+)\)/};function lg({width:A,height:e},t,r){function n(u){let I=u.match(Ft.circle);if(!I)return null;let[,B]=I,[f,E=""]=B.split("at").map(y=>y.trim()),{x:C,y:p}=Ig(E,A,e);return{type:"circle",r:V(f,r.fontSize,Math.sqrt(Math.pow(A,2)+Math.pow(e,2))/Math.sqrt(2),r,!0),cx:V(C,r.fontSize,A,r,!0),cy:V(p,r.fontSize,e,r,!0)}}function i(u){let I=u.match(Ft.ellipse);if(!I)return null;let[,B]=I,[f,E=""]=B.split("at").map(S=>S.trim()),[C,p]=f.split(" "),{x:y,y:w}=Ig(E,A,e);return{type:"ellipse",rx:V(C||"50%",r.fontSize,A,r,!0),ry:V(p||"50%",r.fontSize,e,r,!0),cx:V(y,r.fontSize,A,r,!0),cy:V(w,r.fontSize,e,r,!0)}}function o(u){let I=u.match(Ft.path);if(!I)return null;let[B,f]=ug(I[1]);return{type:"path",d:f,"fill-rule":B}}function s(u){let I=u.match(Ft.polygon);if(!I)return null;let[B,f]=ug(I[1]);return{type:"polygon","fill-rule":B,points:f.split(",").map(E=>E.split(" ").map((C,p)=>V(C,r.fontSize,p===0?A:e,r,!0)).join(" ")).join(",")}}function a(u){let I=u.match(Ft.inset);if(!I)return null;let[B,f]=(I[1].includes("round")?I[1]:`${I[1].trim()} round 0`).split("round"),E=(0,Fi.getStylesForProperty)("borderRadius",f,!0),C=Object.values(E).map(b=>String(b)).map((b,m)=>V(b,r.fontSize,m===0||m===2?e:A,r,!0)||0),p=Object.values((0,Fi.getStylesForProperty)("margin",B,!0)).map(b=>String(b)).map((b,m)=>V(b,r.fontSize,m===0||m===2?e:A,r,!0)||0),y=p[3],w=p[0],S=A-(p[1]+p[3]),x=e-(p[0]+p[2]);return C.some(b=>b>0)?{type:"path",d:Ze({left:y,top:w,width:S,height:x},{...t,...E})}:{type:"rect",x:y,y:w,width:S,height:x}}function g(u){return Ft.shape.test(u)?gg(u,A,e,r):null}return{parseCircle:n,parseEllipse:i,parsePath:o,parsePolygon:s,parseInset:a,parseShape:g}}function ug(A){let[,e="nonzero",t]=A.replace(/('|")/g,"").match(/^(nonzero|evenodd)?,?(.+)/)||[];return[e,t]}function Ig(A,e,t){let r=A.split(" "),n={x:r[0]||"50%",y:r[1]||"50%"};return r.forEach(i=>{i==="top"?n.y=0:i==="bottom"?n.y=t:i==="left"?n.x=0:i==="right"?n.x=e:i==="center"&&(n.x=e/2,n.y=t/2)}),n}function dn(A){return`satori_cp-${A}`}function cg(A){return`url(#${dn(A)})`}function fg(A,e,t){if(e.clipPath==="none")return"";let r=lg(A,e,t),n=e.clipPath,i={type:""};for(let o of Object.keys(r))if(i=r[o](n),i)break;if(i){let{type:o,...s}=i;return v("clipPath",{id:dn(A.id),"clip-path":A.currentClipPath,transform:`translate(${A.left}, ${A.top})`},v(o,s))}return""}function Ni({left:A,top:e,width:t,height:r,path:n,matrix:i,id:o,currentClipPath:s,src:a},g,u){let I="",B=g.clipPath&&g.clipPath!=="none"?fg({left:A,top:e,width:t,height:r,path:n,id:o,matrix:i,currentClipPath:s,src:a},g,u):"";if(g.overflow!=="hidden"&&!a)I="";else{let E=B?`satori_ocp-${o}`:dn(o);I=v("clipPath",{id:E,"clip-path":s},v(n?"path":"rect",{x:A,y:e,width:t,height:r,d:n||void 0,transform:g.overflow==="hidden"&&g.transform&&i?i:void 0}))}let f=bi({id:`satori_om-${o}`,left:A,top:e,width:t,height:r,matrix:i,borderOnly:!a},g);return B+I+f}var tf=A=>`satori_mi-${A}`;async function Mi(A,e,t){if(!e.maskImage)return["",""];let{left:r,top:n,width:i,height:o,id:s}=A,a=e.maskImage,g=a.length;if(!g)return["",""];let u=tf(s),I="";for(let B=0;B<g;B++){let f=a[B],[E,C]=await Ar({id:`${u}-${B}`,left:r,top:n,width:i,height:o},f,t,"mask");I+=C+v("rect",{x:r,y:n,width:i,height:o,fill:`url(#${E})`})}return I=v("mask",{id:u},I),[u,I]}function Bg({id:A,left:e,top:t,width:r,height:n,path:i,type:o,matrix:s,currentClipPath:a,mask:g,filters:u}){if(!u.length)return["",""];let I=`satori_bf-${A}`,B=`satori_bfc-${A}`,f=nf(u),E="BackgroundImage",C="";u.forEach((w,S)=>{let x=`${I}-${S}`;C+=rf(w,E,x),E=x});let p=v("filter",{id:I,x:e-f.left,y:t-f.top,width:r+f.left+f.right,height:n+f.top+f.bottom,filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},C)+v("clipPath",{id:B,"clip-path":a},v(o,{x:e,y:t,width:r,height:n,d:i||void 0,transform:s||void 0})),y=v(o,{x:e,y:t,width:r,height:n,d:i||void 0,fill:"#000",transform:s||void 0,filter:`url(#${I})`,"clip-path":`url(#${B})`,mask:g});return[p,y]}function rf(A,e,t){if(A.type==="blur")return v("feGaussianBlur",{in:e,stdDeviation:A.value,result:t});if(A.type==="hue-rotate")return v("feColorMatrix",{in:e,type:"hueRotate",values:A.value,result:t});if(A.type==="saturate"||A.type==="grayscale")return v("feColorMatrix",{in:e,type:"saturate",values:A.type==="grayscale"?1-A.value:A.value,result:t});if(A.type==="sepia"){let o=A.value,s=1-o;return v("feColorMatrix",{in:e,type:"matrix",values:[s+.393*o,.769*o,.189*o,0,0,.349*o,s+.686*o,.168*o,0,0,.272*o,.534*o,s+.131*o,0,0,0,0,0,1,0].join(" "),result:t})}if(A.type==="drop-shadow"){let o=`${t}-input`;return v("feComposite",{in:e,in2:"SourceAlpha",operator:"in",result:o})+v("feDropShadow",{in:o,dx:A.offsetX,dy:A.offsetY,stdDeviation:A.blurRadius,"flood-color":A.color,result:t})}let r=A.value,n=A.type==="brightness"?{slope:r}:A.type==="contrast"?{slope:r,intercept:.5-.5*r}:A.type==="invert"?{slope:1-2*r,intercept:r}:{slope:r},i=A.type==="opacity"?["A"]:["R","G","B"];return v("feComponentTransfer",{in:e,result:t},i.map(o=>v(`feFunc${o}`,{type:"linear",...n})).join(""))}function nf(A){let e=0,t=0,r=0,n=0;for(let i of A)if(i.type==="blur"){let o=i.value*3;e=Math.max(e,o),t=Math.max(t,o),r=Math.max(r,o),n=Math.max(n,o)}else if(i.type==="drop-shadow"){let o=i.blurRadius*3;e=Math.max(e,o-i.offsetX),t=Math.max(t,o-i.offsetY),r=Math.max(r,o+i.offsetX),n=Math.max(n,o+i.offsetY)}return{left:e,top:t,right:r,bottom:n}}function of(A,e,t){let r=A.toLowerCase().trim().split(/\s+/),n=(a,g)=>({left:"0%",center:"50%",right:"100%",top:"0%",bottom:"100%"})[a]||a,i,o;if(r.length===1){let a=r[0];a==="left"||a==="center"||a==="right"?(i=n(a,"x"),o="50%"):a==="top"||a==="bottom"?(i="50%",o=n(a,"y")):(i=a,o="50%")}else{let a=r[0],g=r[1];a==="top"||a==="bottom"?(o=n(a,"y"),g==="left"||g==="right"||g==="center"?i=n(g,"x"):(i="50%",o=a==="top"||a==="bottom"?n(a,"y"):g)):(i=n(a,"x"),o=n(g,"y"))}let s=(a,g)=>{try{if(a.endsWith("%"))return g*parseFloat(a)/100;let u=new be(a);return u.type==="length"||u.type==="number"?u.value:0}catch{return 0}};return[s(i,e),s(o,t)]}async function tr({id:A,left:e,top:t,width:r,height:n,isInheritingTransform:i,src:o,debug:s},a,g){if(a.display==="none")return"";let u=!!o,I="rect",B="",f="",E=[],C=1,p="";a.backgroundColor&&E.push(a.backgroundColor),a.opacity!==void 0&&(C=+a.opacity),a.transform&&(B=$t({left:e,top:t,width:r,height:n},a.transform,i,a.transformOrigin));let y="";if(a.backgroundImage){let AA=[];for(let fA=0;fA<a.backgroundImage.length;fA++){let ne=a.backgroundImage[fA],PA=await Ar({id:A+"_"+fA,width:r,height:n,left:e,top:t},ne,g);PA&&AA.unshift(PA)}for(let fA of AA)E.push(`url(#${fA[0]})`),f+=fA[1],fA[2]&&(y+=fA[2])}let[w,S]=await Mi({id:A,left:e,top:t,width:r,height:n},a,g);f+=S;let x=w?`url(#${w})`:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0,b=Ze({left:e,top:t,width:r,height:n},a);b&&(I="path");let m=a._inheritedClipPathId;s&&(p=v("rect",{x:e,y:t,width:r,height:n,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:B||void 0,"clip-path":m?`url(#${m})`:void 0}));let{backgroundClip:R,filter:F}=a,W=R==="text"?`url(#satori_bct-${A})`:m?`url(#${m})`:a.clipPath?cg(A):void 0,Y=Ni({left:e,top:t,width:r,height:n,path:b,id:A,matrix:B,currentClipPath:W,src:o},a,g),[$,cA]=Bg({id:A,left:e,top:t,width:r,height:n,path:b,type:I,matrix:B||void 0,currentClipPath:W,mask:x,filters:a._backdropFilters||[]});f+=$;let eA=C!==1&&!u&&E.length===1&&!cA&&!y&&!F&&!x&&!a.boxShadow&&!(a.borderTopWidth||a.borderRightWidth||a.borderBottomWidth||a.borderLeftWidth),IA=E.map(AA=>v(I,{x:e,y:t,width:r,height:n,fill:AA,"fill-opacity":eA?C:void 0,d:b||void 0,transform:B||void 0,"clip-path":a.transform?void 0:W,style:F?`filter:${F}`:void 0,mask:a.transform?void 0:x})).join(""),re=sg({id:A,left:e,top:t,width:r,height:n,currentClipPathId:m,borderPath:b,borderType:I},a),pA;if(u){let AA=(a.borderLeftWidth||0)+(a.paddingLeft||0),fA=(a.borderTopWidth||0)+(a.paddingTop||0),ne=(a.borderRightWidth||0)+(a.paddingRight||0),PA=(a.borderBottomWidth||0)+(a.paddingBottom||0),FA=r-AA-ne,hA=n-fA-PA,NA=(a.objectPosition||"center").toString(),[LA,K]=of(NA,FA,hA),sA=a.__naturalWidth||FA,_=a.__naturalHeight||hA,RA,SA=FA,GA=hA,KA=e+AA,BA=t+fA;if(a.objectFit==="contain"){let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else if(a.objectFit==="cover"){let YA=FA/sA,JA=hA/_,xA=Math.max(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else if(a.objectFit==="fill")RA="none";else if(a.objectFit==="scale-down")if(sA&&_){let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);if(xA>=1)SA=sA,GA=_,RA="none",KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA;else{let vA=xA;SA=sA*vA,GA=_*vA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}}else{let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else RA="none";a.transform&&(pA=ig({id:A,borderRadiusPath:b,borderType:I,left:e,top:t,width:r,height:n},a)),IA+=v("image",{x:KA,y:BA,width:SA,height:GA,href:o,preserveAspectRatio:RA,transform:B||void 0,style:F?`filter:${F}`:void 0,"clip-path":a.transform?pA?`url(#${pA[1]})`:void 0:`url(#satori_cp-${A})`,mask:a.transform?void 0:w?`url(#${w})`:`url(#satori_om-${A})`})}if(re){f+=re[0];let AA=re[1];IA+=er({left:e,top:t,width:r,height:n,props:{transform:B||void 0,"clip-path":`url(#${AA})`}},a)}let UA=qa({width:r,height:n,id:A,opacity:C,shape:v(I,{x:e,y:t,width:r,height:n,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:B||void 0,"clip-path":W,mask:x})},a),CA=cA+(y||IA);return a.transform&&(W||x)&&(CA=v("g",{"clip-path":W||void 0,mask:x||void 0},CA)),C!==1&&!eA&&(CA=v("g",{opacity:C},CA)),(f?v("defs",{},f):"")+(UA?UA[0]:"")+(pA?pA[0]:"")+Y+CA+(UA?UA[1]:"")+p}var Qg=String.raw,Eg=Qg`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Cg=()=>new RegExp(Qg`\p{RI}{2}|(?)${Eg}(?:\u200D${Eg})*`,"gu");var sf=new RegExp(Cg(),"u"),Li={emoji:sf,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Gi={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},pn=Object.keys({...Gi,...Li});function dg(A){return pn.includes(A)}function pg(A,e){for(let r of Object.keys(Li))if(Li[r].test(A))return[r];let t=Object.keys(Gi).filter(r=>Gi[r].test(A));if(t.length===0)return["unknown"];if(e){let r=t.findIndex(n=>n===e);r!==-1&&(t.splice(r,1),t.unshift(e))}return t}function hg(A){if(A)return pn.find(e=>e.toLowerCase().startsWith(A.toLowerCase()))}async function*rr(A,e){var NA,LA;let t=await ze(),{id:r,inheritedStyle:n,parent:i,font:o,debug:s,locale:a,embedFont:g=!0,graphemeImages:u,canLoadAdditionalAssets:I,getTwStyles:B}=e;if(A===null||typeof A>"u")return yield,yield,"";if(!wt(A)||qs(A.type)){let K;if(!wt(A))K=mi(String(A),e),yield(await K.next()).value;else{if(Ys(A.type))throw new Error("Class component is not supported.");let _;Vn(A.type)?_=A.type.render:_=A.type,K=rr(await _(A.props),e),yield(await K.next()).value}await K.next();let sA=yield;return(await K.next(sA)).value}let{type:f,props:E}=A,C=f;if(E&&Xs(E))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:p,children:y,tw:w,lang:S=a}=E||{},x=hg(S);if(w){let K=B(w,p);p=Object.assign(K,p)}let b=t.Node.create();i.insertChild(b,i.getChildCount());let[m,R]=await fi(b,C,n,p,E,e.replacedElements),F=m.transform===n.transform;if(F||(m.transform.__parent=n.transform),(m.overflow==="hidden"||m.clipPath&&m.clipPath!=="none")&&(R._inheritedClipPathId=`satori_cp-${r}`,R._inheritedMaskId=`satori_om-${r}`),m.maskImage&&(R._inheritedMaskId=`satori_mi-${r}`),m.backgroundClip==="text"){let K={value:""};R._inheritedBackgroundClipTextPath=K,m._inheritedBackgroundClipTextPath=K,m.backgroundImage&&(R._inheritedBackgroundClipTextHasBackground="true",m._inheritedBackgroundClipTextHasBackground="true")}let W=!!((NA=e.replacedElements)!=null&&NA[C]),Y=W?[]:Vs(y),$=[],cA=0,eA=[];for(let K of Y){let sA=rr(K,{id:r+"-"+cA++,parentStyle:m,inheritedStyle:R,isInheritingTransform:!0,parent:b,font:o,embedFont:g,debug:s,graphemeImages:u,canLoadAdditionalAssets:I,locale:x,getTwStyles:B,onNodeDetected:e.onNodeDetected,replacedElements:e.replacedElements});I?eA.push(...(await sA.next()).value||[]):await sA.next(),$.push(sA)}yield eA;for(let K of $)await K.next();let[IA,re]=yield,{left:pA,top:UA,width:CA,height:AA}=b.getComputedLayout();pA+=IA,UA+=re;let fA="",ne="",PA="",{children:FA,...hA}=E;if((LA=e.onNodeDetected)==null||LA.call(e,{left:pA,top:UA,width:CA,height:AA,type:C,props:hA,key:A.key,textContent:wt(FA)?void 0:FA}),C==="img"||W){let K=m.__src;ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,src:K,isInheritingTransform:F,debug:s},m,R)}else if(C==="svg"){let K=m.color,sA=await Sa(A,K);ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,src:sA,isInheritingTransform:F,debug:s},m,R)}else{let K=p==null?void 0:p.display;if(C==="div"&&y&&typeof y!="string"&&K!=="flex"&&K!=="none"&&K!=="contents")throw new Error('Expected <div> to have explicit "display: flex", "display: contents", or "display: none" if it has more than one child node.');ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,isInheritingTransform:F,debug:s},m,R)}for(let K of $)fA+=(await K.next([pA,UA])).value;return m._inheritedBackgroundClipTextPath&&(PA+=v("clipPath",{id:`satori_bct-${r}`,"clip-path":m._inheritedClipPathId?`url(#${m._inheritedClipPathId})`:void 0},m._inheritedBackgroundClipTextPath.value)),PA+ne+fA}var nr=se(require("@shuding/opentype.js"),1),bg=require("fflate");var mg=se(require("harfbuzzjs"),1),fe=null,hn=null,Ui=new WeakMap,Hi=typeof FinalizationRegistry=="function"?new FinalizationRegistry(A=>A.destroy()):null;async function yg(){if(!fe){if(hn){await hn;return}hn=(async()=>{if(fe=await mg.default,!fe||typeof fe.createBlob!="function")throw new Error("HarfBuzz module loaded but API is not available")})(),await hn}}function af(A){if(!fe)throw new Error("HarfBuzz not initialized. Call initHarfBuzz() first.");if(Ui.has(A))return Ui.get(A);let e=A._rawFontData;if(!e)throw new Error("Font does not have _rawFontData. Make sure to store the original ArrayBuffer when loading fonts.");let t=fe.createBlob(new Uint8Array(e)),r=fe.createFace(t,0),n=fe.createFont(r);r.destroy(),t.destroy();let i=A.unitsPerEm;return n.setScale(i,i),Ui.set(A,n),Hi==null||Hi.register(A,n),n}function wg(A,e,t={}){if(!fe)throw new Error("HarfBuzz not initialized");if(!e||e.length===0)return[];let{features:r,language:n,script:i,direction:o}=t,s=af(A),a=fe.createBuffer();try{a.addText(e),a.guessSegmentProperties(),n&&a.setLanguage(n),i&&a.setScript(i),o&&a.setDirection(o);let g;if(r&&Object.keys(r).length>0){let I=[];for(let[B,f]of Object.entries(r))typeof f=="boolean"?I.push(f?`+${B}`:`-${B}`):I.push(`${B}=${f}`);g=I.join(",")}return g?fe.shape(s,a,g):fe.shape(s,a),a.json(s)}finally{a.destroy()}}function Dg(A){if(!A||A==="normal")return{};let e={},t=A.split(",").map(r=>r.trim());for(let r of t){let n=r.match(/["']([a-z0-9]{4})["']\s*(?:(on|off|[0-9]+))?/i);if(n){let i=n[1],o=n[2];if(!o||o==="on"||o==="1")e[i]=!0;else if(o==="off"||o==="0")e[i]=!1;else{let s=parseInt(o,10);isNaN(s)||(e[i]=s)}}}return e}var gf=256;function uf(A){return/^\s$/.test(A)}function If(A,e){if(!A)return[];let t=OA(A,"grapheme"),r=[],n="",i=null;for(let o of t){let s;uf(o)&&i!==null&&i.charToGlyphIndex(o)?s=i:s=e(o),i===null?(i=s,n=o):s===i?n+=o:(r.push([n,i]),n=o,i=s)}return n&&i&&r.push([n,i]),r}function lf(A){let e=new DataView(A),t=e.getUint16(12),r=e.getUint32(16),n=new ArrayBuffer(r),i=new DataView(n),o=new Uint8Array(n);i.setUint32(0,e.getUint32(4)),i.setUint16(4,t);let s=Math.floor(Math.log2(t)),a=(1<<s)*16;i.setUint16(6,a),i.setUint16(8,s),i.setUint16(10,t*16-a);let g=12+t*16;for(let u=0;u<t;u++){let I=44+u*20,B=e.getUint32(I),f=e.getUint32(I+4),E=e.getUint32(I+8),C=e.getUint32(I+12),p=e.getUint32(I+16),y=12+u*16;if(i.setUint32(y,B),i.setUint32(y+4,p),i.setUint32(y+8,g),i.setUint32(y+12,C),E<C){let w=new Uint8Array(A,f+2,E-2),S=new Uint8Array(C);(0,bg.inflateSync)(w,S),o.set(S,g)}else o.set(new Uint8Array(A,f,C),g);g+=C+3&-4}return n}var Sg="unknown";function cf(A){let e=[],t=[0,0],r=[0,0],n=(i,o)=>{let s=i[0];for(let a=1;a<=o;a++){let g=a/o,u=ff(i,g);e.push({from:s,to:u}),s=u}r=i[i.length-1]};for(let i of A){if(i.type==="M"){t=r=[i.x,i.y];continue}if(i.type==="L"){let o=[i.x,i.y];e.push({from:r,to:o}),r=o;continue}if(i.type==="Q"){n([r,[i.x1,i.y1],[i.x,i.y]],12);continue}if(i.type==="C"){n([r,[i.x1,i.y1],[i.x2,i.y2],[i.x,i.y]],16);continue}i.type==="Z"&&(e.push({from:r,to:t}),r=t)}return e}function ff(A,e){let t=A;for(;t.length>1;){let r=[];for(let n=0;n<t.length-1;n++)r.push([t[n][0]+(t[n+1][0]-t[n][0])*e,t[n][1]+(t[n+1][1]-t[n][1])*e]);t=r}return t[0]}function Bf(A,e){if(!e)return[];let t=e.strokeWidth,r=e.underlineY-t*.25,n=e.underlineY+t*2.5,i=cf(A);if(!i.length)return[];let o=n-r,s=Math.max(12,Math.ceil(o/.25)),a=o/s,g=r+a/2,u=new Set;for(let S=0;S<s;S++){let x=g+a*S,b=[];for(let m of i){let[R,F]=m.from,[W,Y]=m.to;if(F===Y)continue;let $=Math.min(F,Y),cA=Math.max(F,Y);if(x<$||x>=cA)continue;let eA=(x-F)/(Y-F),IA=R+(W-R)*eA;b.push(IA)}if(b.length){b.sort((m,R)=>m-R);for(let m=0;m<b.length-1;m+=2){let R=Math.min(b[m],b[m+1]),F=Math.max(b[m],b[m+1]),W=Math.floor(R),Y=Math.ceil(F);for(let $=W;$<Y;$++)u.add($)}}}if(!u.size)return[];let I=Array.from(u.values()).sort((S,x)=>S-x),B=[],f=I[0],E=I[0];for(let S=1;S<I.length;S++){let x=I[S];x>E+1&&(B.push([f,E+1]),f=x),E=x}B.push([f,E+1]);let C=[],p=t*.6,y=B[0][0],w=B[B.length-1][1];for(let[S,x]of B){let b=Math.min(S,y)-p,m=Math.max(x,w)+p;C.push({x1:b,x2:m,y1:r,y2:n})}return C}function Ef(A,e,[t,r],[n,i]){if(t!==n)return t?!n||t===A?-1:n===A?1:A===400&&t===500||A===500&&t===400?-1:A===400&&n===500||A===500&&n===400?1:A<400?t<A&&n<A?n-t:t<A?-1:n<A?1:t-n:A<t&&A<n?t-n:A<t?-1:A<n?1:n-t:1;if(r!==i){if(r===e)return-1;if(i===e)return 1}return-1}var Oi=new WeakMap,ir=class{constructor(e){this.fonts=new Map;this.shapedRunCache=new Map;this.addFonts(e)}get({name:e,weight:t,style:r}){if(!this.fonts.has(e))return null;t==="normal"&&(t=400),t==="bold"&&(t=700),typeof t=="string"&&(t=Number.parseInt(t,10));let n=[...this.fonts.get(e)],i=n[0];for(let o=1;o<n.length;o++){let[,s,a]=i,[,g,u]=n[o];Ef(t,r,[s,a],[g,u])>0&&(i=n[o])}return i[0]}addFonts(e){e.length&&this.fonts.size&&this.shapedRunCache.clear();for(let t of e){let{name:r,data:n,lang:i}=t;if(i&&!dg(i))throw new Error(`Invalid value for props \`lang\`: "${i}". The value must be one of the following: ${pn.join(", ")}.`);let o=i??Sg,s;if(Oi.has(n))s=Oi.get(n);else{let g="buffer"in n?n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength):n;s=nr.default.parse(g,{lowMemory:!0});let u=new Uint8Array(g),I=u[0]===119&&u[1]===79&&u[2]===70&&u[3]===70;s._rawFontData=I?lf(g):g;let B=s.charToGlyphIndex;s.charToGlyphIndex=f=>{let E=B.call(s,f);return E===0&&s._trackBrokenChars&&s._trackBrokenChars.push(f),E},Oi.set(n,s)}this.defaultFont||(this.defaultFont=s);let a=`${r.toLowerCase()}_${o}`;this.fonts.has(a)||this.fonts.set(a,[]),this.fonts.get(a).push([s,t.weight,t.style])}}getEngine(e=16,t="normal",{fontFamily:r="sans-serif",fontWeight:n=400,fontStyle:i="normal"},o){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(m=>m.toLowerCase());let s=[];r.forEach(m=>{let R=this.get({name:m,weight:n,style:i});if(R){s.push(R);return}let F=this.get({name:m+"_unknown",weight:n,style:i});if(F){s.push(F);return}});let a=Array.from(this.fonts.keys()),g=[],u=[],I=[];for(let m of a)if(!r.includes(m))if(o){let R=Qf(m);R?R===o?g.push(this.get({name:m,weight:n,style:i})):u.push(this.get({name:m,weight:n,style:i})):I.push(this.get({name:m,weight:n,style:i}))}else I.push(this.get({name:m,weight:n,style:i}));let B=new Map,f=(m,R=!0)=>{let F=[...s,...I,...g,...R?u:[]];if(typeof m>"u")return R?F[F.length-1]:void 0;let W=m.charCodeAt(0);if(B.has(W))return B.get(W);let Y=F.find(($,cA)=>!!$.charToGlyphIndex(m)||R&&cA===F.length-1);return Y&&B.set(W,Y),Y},E=(m,R=!1)=>{var W,Y;return((R?(Y=(W=m.tables)==null?void 0:W.os2)==null?void 0:Y.sTypoAscender:0)||m.ascender)/m.unitsPerEm*e},C=(m,R=!1)=>{var W,Y;return((R?(Y=(W=m.tables)==null?void 0:W.os2)==null?void 0:Y.sTypoDescender:0)||m.descender)/m.unitsPerEm*e},p=(m,R=!1)=>{var F,W;if(typeof t=="string"&&t==="normal"){let Y=(R?(W=(F=m.tables)==null?void 0:F.os2)==null?void 0:W.sTypoLineGap:0)||0;return E(m,R)-C(m,R)+Y/m.unitsPerEm*e}else if(typeof t=="number")return e*t},y=m=>f(m,!1),w=this.shapedRunCache,S=`${r.join(",")}|${n}|${i}|${o||""}`,x=(m,R)=>{let F=`${S}\0${R||""}\0${m}`,W=w.get(F);if(W!==void 0)return w.delete(F),w.set(F,W),W;let Y=R?Dg(R):{},$=If(m,f).map(([cA,eA])=>[cA,eA,wg(eA,cA,{features:Y})]);if(w.size>=gf){let cA=w.keys().next().value;cA!==void 0&&w.delete(cA)}return w.set(F,$),$};return{has:m=>{if(m===`
|
|
6
|
+
in CSS rule \`${I}: ${f}\`.${Ua(I)}`))}}}if(t.backgroundImage){let{backgrounds:a}=(0,Ta.parseElementStyle)(t);t.backgroundImage=a}(t.maskImage||t.WebkitMaskImage)&&(t.maskImage=va(t));let s=Dc(t.fontSize,e.fontSize);typeof t.fontSize<"u"&&(t.fontSize=s),t.transformOrigin&&(t.transformOrigin=ui(t.transformOrigin,s));for(let a in t){let g=t[a];if(a==="lineHeight")typeof g=="string"&&g!=="normal"&&(g=t[a]=V(g,s,s,e,!0)/s);else{if(typeof g=="string"){let u=V(g,s,s,e);typeof u<"u"&&(t[a]=u),g=t[a]}if(typeof g=="string"||typeof g=="object"){let u=Ja(g);u&&(t[a]=u),g=t[a]}}if(a==="opacity"&&typeof g=="number"&&(t.opacity=g*e.opacity),a==="transform"){let u=g;for(let I of u){let B=Object.keys(I)[0],f=I[B],E=typeof f=="string"?V(f,s,s,e)??f:f;I[B]=E}}if(a==="textShadowRadius"){let u=g;t.textShadowRadius=u.map(I=>V(I,s,0,e,!1))}if(a==="textShadowOffset"){let u=g;t.textShadowOffset=u.map(({height:I,width:B})=>({height:V(I,s,0,e,!1),width:V(B,s,0,e,!1)}))}}return t}function Dc(A,e){if(typeof A=="number")return A;try{let t=new be(A);switch(t.unit){case"em":return t.value*e;case"rem":return t.value*16}}catch{return e}}function Oa(A){if(A.startsWith("hsl")){let e=(0,_a.default)(A),[t,r,n]=e.values;return`hsl(${[t,`${r}%`,`${n}%`].concat(e.alpha===1?[]:[e.alpha]).join(",")})`}return A}function bc(A,e){return A&&A.toLowerCase()!=="currentcolor"?Oa(A):Oa(e)}function Sc(A,e){return A.replace(/currentcolor/gi,e)}function xc(A,e){return Vr(A)&&(A=Sc(A,e)),A}function ci(A,e,t,r,n,i){let o=r/t,s=(e.borderLeftWidth||0)+(e.borderRightWidth||0)+(e.paddingLeft||0)+(e.paddingRight||0),a=(e.borderTopWidth||0)+(e.borderBottomWidth||0)+(e.paddingTop||0)+(e.paddingBottom||0),g=e.width||n,u=e.height||i,I=typeof g=="number"&&typeof u=="number";I&&(g=g-s,u=u-a),g===void 0&&u===void 0?(g="100%",A.setAspectRatio(1/o)):g===void 0?typeof u=="number"?g=u/o:A.setAspectRatio(1/o):u===void 0&&(typeof g=="number"?u=g*o:A.setAspectRatio(1/o)),e.width=I?g+s:g,e.height=I?u+a:u,e.__naturalWidth=t,e.__naturalHeight=r}async function fi(A,e,t,r,n,i){var a;let o=await ze(),s=Object.assign({},t,gn(xa[e],t),gn(r,t));if(e==="img"){let[g,u,I]=await Rt(n.src);if(u===void 0&&I===void 0){if(n.width===void 0||n.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");u=parseInt(n.width),I=parseInt(n.height)}ci(A,s,u,I,n.width,n.height),s.__src=g}if(await((a=i==null?void 0:i[e])==null?void 0:a.call(i,A,s,n)),e==="svg"){let g=n.viewBox||n.viewbox,u=Dt(g),I=u?u[3]/u[2]:null,{width:B,height:f}=n;typeof B>"u"&&f?I==null?B=0:typeof f=="string"&&f.endsWith("%")?B=parseInt(f)/I+"%":(f=V(f,t.fontSize,1,t),B=f/I):typeof f>"u"&&B?I==null?B=0:typeof B=="string"&&B.endsWith("%")?f=parseInt(B)*I+"%":(B=V(B,t.fontSize,1,t),f=B*I):(typeof B<"u"&&(B=V(B,t.fontSize,1,t)||B),typeof f<"u"&&(f=V(f,t.fontSize,1,t)||f),B||=u==null?void 0:u[2],f||=u==null?void 0:u[3]),!s.width&&B&&(s.width=B),!s.height&&f&&(s.height=f)}return A.setDisplay(ZA(s.display,{flex:o.DISPLAY_FLEX,block:o.DISPLAY_FLEX,contents:o.DISPLAY_CONTENTS,none:o.DISPLAY_NONE,"-webkit-box":o.DISPLAY_FLEX},o.DISPLAY_FLEX,"display")),A.setAlignContent(ZA(s.alignContent,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,"space-between":o.ALIGN_SPACE_BETWEEN,"space-around":o.ALIGN_SPACE_AROUND,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO,"alignContent")),A.setAlignItems(ZA(s.alignItems,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_STRETCH,"alignItems")),A.setAlignSelf(ZA(s.alignSelf,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO,"alignSelf")),A.setJustifyContent(ZA(s.justifyContent,{center:o.JUSTIFY_CENTER,"flex-start":o.JUSTIFY_FLEX_START,"flex-end":o.JUSTIFY_FLEX_END,"space-between":o.JUSTIFY_SPACE_BETWEEN,"space-around":o.JUSTIFY_SPACE_AROUND},o.JUSTIFY_FLEX_START,"justifyContent")),A.setFlexDirection(ZA(s.flexDirection,{row:o.FLEX_DIRECTION_ROW,column:o.FLEX_DIRECTION_COLUMN,"row-reverse":o.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":o.FLEX_DIRECTION_COLUMN_REVERSE},o.FLEX_DIRECTION_ROW,"flexDirection")),A.setFlexWrap(ZA(s.flexWrap,{wrap:o.WRAP_WRAP,nowrap:o.WRAP_NO_WRAP,"wrap-reverse":o.WRAP_WRAP_REVERSE},o.WRAP_NO_WRAP,"flexWrap")),typeof s.gap<"u"&&A.setGap(o.GUTTER_ALL,s.gap),typeof s.rowGap<"u"&&A.setGap(o.GUTTER_ROW,s.rowGap),typeof s.columnGap<"u"&&A.setGap(o.GUTTER_COLUMN,s.columnGap),typeof s.flexBasis<"u"&&A.setFlexBasis(Ve(s.flexBasis,"flexBasis")),A.setFlexGrow(typeof s.flexGrow>"u"?0:s.flexGrow),A.setFlexShrink(typeof s.flexShrink>"u"?0:s.flexShrink),typeof s.maxHeight<"u"&&A.setMaxHeight(Te(s.maxHeight,"maxHeight")),typeof s.maxWidth<"u"&&A.setMaxWidth(Te(s.maxWidth,"maxWidth")),typeof s.minHeight<"u"&&A.setMinHeight(Te(s.minHeight,"minHeight")),typeof s.minWidth<"u"&&A.setMinWidth(Te(s.minWidth,"minWidth")),A.setOverflow(ZA(s.overflow,{visible:o.OVERFLOW_VISIBLE,hidden:o.OVERFLOW_HIDDEN},o.OVERFLOW_VISIBLE,"overflow")),A.setMargin(o.EDGE_TOP,Ve(s.marginTop||0)),A.setMargin(o.EDGE_BOTTOM,Ve(s.marginBottom||0)),A.setMargin(o.EDGE_LEFT,Ve(s.marginLeft||0)),A.setMargin(o.EDGE_RIGHT,Ve(s.marginRight||0)),A.setBorder(o.EDGE_TOP,s.borderTopWidth||0),A.setBorder(o.EDGE_BOTTOM,s.borderBottomWidth||0),A.setBorder(o.EDGE_LEFT,s.borderLeftWidth||0),A.setBorder(o.EDGE_RIGHT,s.borderRightWidth||0),A.setPadding(o.EDGE_TOP,s.paddingTop||0),A.setPadding(o.EDGE_BOTTOM,s.paddingBottom||0),A.setPadding(o.EDGE_LEFT,s.paddingLeft||0),A.setPadding(o.EDGE_RIGHT,s.paddingRight||0),A.setBoxSizing(ZA(s.boxSizing,{"border-box":o.BOX_SIZING_BORDER_BOX,"content-box":o.BOX_SIZING_CONTENT_BOX},o.BOX_SIZING_BORDER_BOX,"boxSizing")),A.setPositionType(ZA(s.position,{absolute:o.POSITION_TYPE_ABSOLUTE,relative:o.POSITION_TYPE_RELATIVE,static:o.POSITION_TYPE_STATIC},o.POSITION_TYPE_RELATIVE,"position")),typeof s.top<"u"&&A.setPosition(o.EDGE_TOP,Te(s.top,"top")),typeof s.bottom<"u"&&A.setPosition(o.EDGE_BOTTOM,Te(s.bottom,"bottom")),typeof s.left<"u"&&A.setPosition(o.EDGE_LEFT,Te(s.left,"left")),typeof s.right<"u"&&A.setPosition(o.EDGE_RIGHT,Te(s.right,"right")),typeof s.height<"u"?A.setHeight(Ve(s.height,"height")):A.setHeightAuto(),typeof s.width<"u"?A.setWidth(Ve(s.width,"width")):A.setWidthAuto(),[s,ai(s)]}var Bi=se(require("escape-html"),1);var Wa=[1,0,0,1,0,0];function kc(A,e,t){let r=[...Wa];for(let n of A){let i=Object.keys(n)[0],o=n[i];if(typeof o=="string")if(i==="translateX")o=parseFloat(o)/100*e,n[i]=o;else if(i==="translateY")o=parseFloat(o)/100*t,n[i]=o;else throw new Error(`Invalid transform: "${i}: ${o}".`);let s=o,a=[...Wa];switch(i){case"translateX":a[4]=s;break;case"translateY":a[5]=s;break;case"scale":a[0]=s,a[3]=s;break;case"scaleX":a[0]=s;break;case"scaleY":a[3]=s;break;case"rotate":{let g=s*Math.PI/180,u=Math.cos(g),I=Math.sin(g);a[0]=u,a[1]=I,a[2]=-I,a[3]=u;break}case"skewX":a[2]=Math.tan(s*Math.PI/180);break;case"skewY":a[1]=Math.tan(s*Math.PI/180);break}r=qt(a,r)}A.splice(0,A.length),A.push(...r),A.__resolved=!0}function $t({left:A,top:e,width:t,height:r},n,i,o){let s;n.__resolved||kc(n,t,r);let a=n;if(i)s=a;else{let g=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*t/100,u=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,I=A+g,B=e+u;s=qt([1,0,0,1,I,B],qt(a,[1,0,0,1,-I,-B])),a.__parent&&(s=qt(a.__parent,s)),a.splice(0,6,...s)}return`matrix(${s.map(g=>+g.toFixed(6)).join(",")})`}function Ka({left:A,top:e,width:t,height:r,isInheritingTransform:n},i){let o="",s=1;return i.transform&&(o=$t({left:A,top:e,width:t,height:r},i.transform,n,i.transformOrigin)),i.opacity!==void 0&&(s=+i.opacity),{matrix:o,opacity:s}}function Ei({id:A,content:e,filter:t,left:r,top:n,width:i,height:o,matrix:s,opacity:a,image:g,clipPathId:u,debug:I,shape:B,decorationShape:f},E){let C="";if(I&&(C=v("rect",{x:r,y:n-o,width:i,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0})),g){let w={href:g,x:r,y:n,width:i,height:o,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0,style:E.filter?`filter:${E.filter}`:void 0},S=v("image",{...w,opacity:a!==1?a:void 0})+(f||"");return[(t?t+v("g",{filter:`url(#satori_s-${A})`},S):S)+C,""]}let p={x:r,y:n,width:i,height:o,"font-weight":E.fontWeight,"font-style":E.fontStyle,"font-size":E.fontSize,"font-family":E.fontFamily,"letter-spacing":E.letterSpacing||void 0,transform:s||void 0,"clip-path":u?`url(#${u})`:void 0,style:E.filter?`filter:${E.filter}`:void 0,"stroke-width":E.WebkitTextStrokeWidth?`${E.WebkitTextStrokeWidth}px`:void 0,stroke:E.WebkitTextStrokeWidth?E.WebkitTextStrokeColor:void 0,"stroke-linejoin":E.WebkitTextStrokeWidth?"round":void 0,"paint-order":E.WebkitTextStrokeWidth?"stroke":void 0},y=v("text",{...p,fill:E.color,opacity:a!==1?a:void 0},(0,Bi.default)(e))+(f||"");return[(t?t+v("g",{filter:`url(#satori_s-${A})`},y):y)+C,B?v("text",p,(0,Bi.default)(e)):""]}function Rc(A,e,t){return A.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,n,i,o){return n+(parseFloat(i)+e)+","+(parseFloat(o)+t)})}var un=1.1;function Ya({id:A,width:e,height:t},r,n=!1){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowColor.length,o="",s="",a=0,g=e,u=0,I=t;for(let B=0;B<i;B++){let f=r.shadowRadius[B]*r.shadowRadius[B]/4;if(a=Math.min(r.shadowOffset[B].width-f,a),g=Math.max(r.shadowOffset[B].width+f+e,g),u=Math.min(r.shadowOffset[B].height-f,u),I=Math.max(r.shadowOffset[B].height+f+t,I),n){let E=`satori_s-${A}-result-${B}`;o+=v("feGaussianBlur",{in:"SourceAlpha",stdDeviation:r.shadowRadius[B]/2,result:`${E}-blur`})+v("feOffset",{in:`${E}-blur`,dx:r.shadowOffset[B].width,dy:r.shadowOffset[B].height,result:`${E}-offset`})+v("feFlood",{"flood-color":r.shadowColor[B],"flood-opacity":1,result:`${E}-color`})+v("feComposite",{in:`${E}-color`,in2:`${E}-offset`,operator:"in",result:i>1?E:void 0})}else o+=v("feDropShadow",{dx:r.shadowOffset[B].width,dy:r.shadowOffset[B].height,stdDeviation:r.shadowRadius[B]/2,"flood-color":r.shadowColor[B],"flood-opacity":1,...i>1?{in:"SourceGraphic",result:`satori_s-${A}-result-${B}`}:{}});i>1&&(s=v("feMergeNode",{in:`satori_s-${A}-result-${B}`})+s)}return v("filter",{id:`satori_s-${A}`,x:(a/e*100*un).toFixed(2)+"%",y:(u/t*100*un).toFixed(2)+"%",width:((g-a)/e*100*un).toFixed(2)+"%",height:((I-u)/t*100*un).toFixed(2)+"%"},o+(s?v("feMerge",{},s):""))}function qa({width:A,height:e,shape:t,opacity:r,id:n},i){if(!i.boxShadow)return null;let o="",s="";for(let a=i.boxShadow.length-1;a>=0;a--){let g="",u=i.boxShadow[a];u.spreadRadius&&u.inset&&(u.spreadRadius=-u.spreadRadius);let I=u.blurRadius*u.blurRadius/4+(u.spreadRadius||0),B=Math.min(-I-(u.inset?u.offsetX:0),0),f=Math.max(I+A-(u.inset?u.offsetX:0),A),E=Math.min(-I-(u.inset?u.offsetY:0),0),C=Math.max(I+e-(u.inset?u.offsetY:0),e),p=`satori_s-${n}-${a}`,y=`satori_ms-${n}-${a}`,w=u.spreadRadius?t.replace('stroke-width="0"',`stroke-width="${u.spreadRadius*2}"`):t;g+=v("mask",{id:y,maskUnits:"userSpaceOnUse"},v("rect",{x:0,y:0,width:i._viewportWidth||"100%",height:i._viewportHeight||"100%",fill:u.inset?"#000":"#fff"})+w.replace('fill="#fff"',u.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let S=w.replace(/d="([^"]+)"/,(x,b)=>'d="'+Rc(b,u.offsetX,u.offsetY)+'"').replace(/x="([^"]+)"/,(x,b)=>'x="'+(parseFloat(b)+u.offsetX)+'"').replace(/y="([^"]+)"/,(x,b)=>'y="'+(parseFloat(b)+u.offsetY)+'"');u.spreadRadius&&u.spreadRadius<0&&(g+=v("mask",{id:y+"-neg",maskUnits:"userSpaceOnUse"},S.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-u.spreadRadius*2}"`))),u.spreadRadius&&u.spreadRadius<0&&(S=v("g",{mask:`url(#${y}-neg)`},S)),g+=v("defs",{},v("filter",{id:p,x:`${B/A*100}%`,y:`${E/e*100}%`,width:`${(f-B)/A*100}%`,height:`${(C-E)/e*100}%`},v("feGaussianBlur",{stdDeviation:u.blurRadius/2,result:"b"})+v("feFlood",{"flood-color":u.color,in:"SourceGraphic",result:"f"})+v("feComposite",{in:"f",in2:"b",operator:u.inset?"out":"in"})))+v("g",{mask:`url(#${y})`,filter:`url(#${p})`,opacity:r},S),u.inset?s+=g:o+=g}return[o,s]}function vc(A,e,t,r,n,i){let o=n/2,s=Math.max(o,n*1.25),a=[];for(let I of t){if(I.y2<i+o||I.y1>r+o)continue;let B=Math.max(A,I.x1-s),f=Math.min(e,I.x2+s);if(B>=f)continue;if(a.length===0){a.push([B,f]);continue}let E=a[a.length-1];B<=E[1]?E[1]=Math.max(E[1],f):a.push([B,f])}if(!a.length)return[[A,e]];let g=[],u=A;for(let[I,B]of a)if(I>u&&g.push([u,I]),u=Math.max(u,B),u>=e)break;return u<e&&g.push([u,e]),g}function Qi({width:A,left:e,top:t,ascender:r,clipPathId:n,matrix:i,glyphBoxes:o},s){let{textDecorationColor:a,textDecorationStyle:g,textDecorationLine:u,textDecorationSkipInk:I,fontSize:B,color:f}=s;if(!u||u==="none")return"";let E=Math.max(1,B*.1),C=u==="line-through"?t+r*.7:u==="underline"?t+r*1.1:t,p=g==="dashed"?`${E*1.2} ${E*2}`:g==="dotted"?`0 ${E*2}`:void 0,y=u==="underline"&&(I||"auto")!=="none"&&(o==null?void 0:o.length),w=t+r,S=y?vc(e,e+A,o,C,E,w):[[e,e+A]],x=g==="double"?S.map(([m,R])=>v("line",{x1:m,y1:C+E+1,x2:R,y2:C+E+1,stroke:a||f,"stroke-width":E,"stroke-dasharray":p,"stroke-linecap":g==="dotted"?"round":"square",transform:i})).join(""):"",b=S.map(([m,R])=>v("line",{x1:m,y1:C,x2:R,y2:C,stroke:a||f,"stroke-width":E,"stroke-dasharray":p,"stroke-linecap":g==="dotted"?"round":"square",transform:i})).join("")+x;return n?v("g",{"clip-path":`url(#${n})`},b):b}function Ci(A){return A=A.replace("U+","0x"),String.fromCodePoint(Number(A))}var It=Ci("U+0020"),di=Ci("U+0009"),vt=Ci("U+2026");function Xa(A,e,t){let{fontSize:r,letterSpacing:n,fontFeatureSettings:i}=t,o=new Map;function s(I){let B=o.get(I);return B===void 0&&(B=A.measure(I,{fontSize:r,letterSpacing:n,fontFeatureSettings:i}),o.set(I,B)),B}function a(I){return s(I)}function g(I){let B=0,f="",E=()=>{f&&(B+=s(f),f="")};for(let C of I)e(C)?(E(),B+=r):f+=C;return E(),B}function u(I){return g(OA(I,"grapheme"))}return{measureGrapheme:a,measureGraphemeArray:g,measureText:u}}function Va(A,e,t){let{textTransform:r,whiteSpace:n,wordBreak:i}=e;A=Fc(A,r,t);let{content:o,shouldCollapseTabsAndSpaces:s,allowSoftWrap:a}=Lc(A,n),{words:g,requiredBreaks:u,allowBreakWord:I}=Mc(o,i),[B,f]=Nc(e,a);return{words:g,requiredBreaks:u,allowSoftWrap:a,allowBreakWord:I,processedContent:o,shouldCollapseTabsAndSpaces:s,lineLimit:B,blockEllipsis:f}}function Fc(A,e,t){return e==="uppercase"?A=A.toLocaleUpperCase(t):e==="lowercase"?A=A.toLocaleLowerCase(t):e==="capitalize"&&(A=OA(A,"word",t).map(r=>OA(r,"grapheme",t).map((n,i)=>i===0?n.toLocaleUpperCase(t):n).join("")).join("")),A}function Nc(A,e){let{textOverflow:t,lineClamp:r,WebkitLineClamp:n,WebkitBoxOrient:i,overflow:o,display:s}=A;if(s==="block"&&r){let[a,g=vt]=Gc(r);if(a)return[a,g]}return t==="ellipsis"&&s==="-webkit-box"&&i==="vertical"&&Aa(n)&&n>0?[n,vt]:t==="ellipsis"&&o==="hidden"&&!e?[1,vt]:[1/0]}function Mc(A,e){let t=["break-all","break-word"].includes(e),{words:r,requiredBreaks:n}=ta(A,e);return{words:r,requiredBreaks:n,allowBreakWord:t}}function Lc(A,e){let t=["pre","pre-wrap","pre-line"].includes(e),r=["normal","nowrap","pre-line"].includes(e),n=!["pre","nowrap"].includes(e);return t||(A=A.replace(/\n/g,It)),r&&(A=A.replace(/([ ]|\t)+/g,It).replace(/^[ ]|[ ]$/g,"")),{content:A,shouldCollapseTabsAndSpaces:r,allowSoftWrap:n}}function Gc(A){if(typeof A=="number")return[A];let e=/^(\d+)\s*"(.*)"$/,t=/^(\d+)\s*'(.*)'$/,r=e.exec(A),n=t.exec(A);if(r){let i=+r[1],o=r[2];return[i,o]}else if(n){let i=+n[1],o=n[2];return[i,o]}return[]}var hi=se(require("parse-css-color"),1),Uc=new Set([di]);function Hc(A){return Uc.has(A)}function pi(A){if(A==="transparent")return!0;let e=(0,hi.default)(A);return e?e.alpha===0:!1}function za(A){if(!A)return!1;let e=(0,hi.default)(A);if(!e)return!1;let[t,r,n,i]=e.values;return t===255&&r===255&&n===255&&(i===void 0||i===1)}async function*mi(A,e){let t=await ze(),{parentStyle:r,inheritedStyle:n,parent:i,font:o,id:s,isInheritingTransform:a,debug:g,embedFont:u,graphemeImages:I,locale:B,canLoadAdditionalAssets:f}=e,{textAlign:E,textIndent:C=0,lineHeight:p,textWrap:y,fontSize:w,filter:S,tabSize:x=8,letterSpacing:b,fontFeatureSettings:m,_inheritedBackgroundClipTextPath:R,_inheritedBackgroundClipTextHasBackground:F,flexShrink:W}=r,{words:Y,requiredBreaks:$,allowSoftWrap:cA,allowBreakWord:eA,processedContent:IA,shouldCollapseTabsAndSpaces:re,lineLimit:pA,blockEllipsis:UA}=Va(A,r,B),CA=Oc(t,E);i.insertChild(CA,i.getChildCount()),ea(W)&&i.setFlexShrink(1);let AA=o.getEngine(w,p,r,B),fA=f?OA(IA,"grapheme").filter(z=>!Hc(z)&&!AA.has(z)):[];yield fA.map(z=>({word:z,locale:B})),fA.length&&(AA=o.getEngine(w,p,r,B));function ne(z){return!!(I&&Object.prototype.hasOwnProperty.call(I,z)&&I[z])}let{measureGrapheme:PA,measureGraphemeArray:FA,measureText:hA}=Xa(AA,ne,{fontSize:w,letterSpacing:b,fontFeatureSettings:m}),NA=Vr(x)?V(x,w,1,r):PA(It)*x,LA=(z,X)=>{if(z.length===0)return{originWidth:0,endingSpacesWidth:0,text:z};let{index:gA,tabCount:Z}=Tc(z),dA=0;if(Z>0){let mA=z.slice(0,gA),tA=z.slice(gA+Z),rA=hA(mA),ue=rA+X;dA=(NA===0?rA:(Math.floor(ue/NA)+Z)*NA)+hA(tA)}else dA=hA(z);let aA=z.trimEnd()===z?dA:hA(z.trimEnd());return{originWidth:dA,endingSpacesWidth:dA-aA,text:z}},K=[],sA=[],_=[],RA=[],SA=[];function GA(z){let X=0,gA=0,Z=-1,dA=0,aA=0,mA=0,tA=0;K=[],_=[0],RA=[],SA=[];let rA=0,ue=0;for(;rA<Y.length&&X<pA;){let j=Y[rA],HA=$[rA],VA=0,{originWidth:Tt,endingSpacesWidth:kA,text:st}=LA(j,aA);j=st,VA=Tt;let WA=kA;HA&&mA===0&&(mA=AA.height(j));let Ue=E==="justify",yA=rA&&aA+VA>z+WA&&cA;if(eA&&VA>z&&(!aA||yA||HA)){let $A=OA(j,"grapheme");Y.splice(rA,1,...$A),aA>0&&(K.push(aA-ue),sA.push(tA),X++,dA+=mA,aA=0,mA=0,tA=0,_.push(1),Z=-1),ue=WA;continue}if(HA||yA)re&&j===It&&(VA=0),K.push(aA-ue),sA.push(tA),X++,dA+=mA,aA=VA,mA=VA?Math.round(AA.height(j)):0,tA=VA?Math.round(AA.baseline(j)):0,_.push(1),Z=-1,HA||(gA=Math.max(gA,z));else{aA+=VA;let $A=Math.round(AA.height(j));$A>mA&&(mA=$A,tA=Math.round(AA.baseline(j))),Ue&&_[_.length-1]++}Ue&&Z++,gA=Math.max(gA,aA);let jA=aA-VA;if(VA===0)SA.push({y:dA,x:jA,width:0,line:X,lineIndex:Z,isImage:!1});else{let $A=OA(j,"word");for(let Ie=0;Ie<$A.length;Ie++){let we=$A[Ie],zA=0,le=!1;ne(we)?(zA=w,le=!0):!u&&we.length>1?zA=hA(we):zA=PA(we),RA.push(we),SA.push({y:dA,x:jA,width:zA,line:X,lineIndex:Z,isImage:le}),jA+=zA,Ie<$A.length-1&&b>0&&(jA+=b)}}rA++,ue=WA}return aA&&(X<pA&&(dA+=mA),X++,K.push(aA),sA.push(tA)),{width:gA,height:dA}}let KA={width:0,height:0};CA.setMeasureFunc(z=>{let{width:X,height:gA}=GA(z);if(y==="balance"){let dA=X/2,aA=X,mA=X;for(;dA+1<aA;){mA=(dA+aA)/2;let{height:rA}=GA(mA);rA>gA?dA=mA:aA=mA}GA(aA);let tA=Math.ceil(aA);return KA={width:tA,height:gA},{width:tA,height:gA}}if(y==="pretty"&&K[K.length-1]<X/3){let mA=X*.9,tA=GA(mA);if(tA.height<=gA*1.3)return KA={width:X,height:tA.height},{width:X,height:tA.height}}let Z=Math.ceil(X);return KA={width:Z,height:gA},{width:Z,height:gA}});let[BA,YA]=yield,JA="",xA="",vA=n._inheritedClipPathId,dt=n._inheritedMaskId,{left:Re,top:Ot,width:rt,height:pt}=CA.getComputedLayout(),ht=typeof C=="string"?V(C,w,rt,r,!0)||0:C,nt=i.getComputedWidth()-i.getComputedPadding(t.EDGE_LEFT)-i.getComputedPadding(t.EDGE_RIGHT)-i.getComputedBorder(t.EDGE_LEFT)-i.getComputedBorder(t.EDGE_RIGHT),ve=BA+Re,pe=YA+Ot,{matrix:ae,opacity:it}=Ka({left:Re,top:Ot,width:rt,height:pt,isInheritingTransform:a},r),qA="";if(r.textShadowOffset){let{textShadowColor:z,textShadowOffset:X,textShadowRadius:gA}=r;qA=Ya({width:KA.width,height:KA.height,id:s},{shadowColor:z,shadowOffset:X,shadowRadius:gA},pi(r.color)||F&&za(r.color)),qA=v("defs",{},qA)}let he="",me="",ot="",Xe=-1,XA={},ge={},ie=null,ye=0;for(let z=0;z<RA.length;z++){let X=SA[z],gA=SA[z+1];if(!X)continue;let Z=RA[z],dA=null,aA=!1,mA=I&&Object.prototype.hasOwnProperty.call(I,Z)?I[Z]:null,tA=X.y,rA=X.x,ue=X.width,j=X.line,HA=r.textDecorationLine==="underline"&&(r.textDecorationSkipInk||"auto")!=="none";if(j===Xe)continue;let VA=!1;if(j===0&&ht!==0&&(rA+=ht),K.length>1){let yA=rt-K[j];if(E==="right"||E==="end")rA+=yA;else if(E==="center")rA+=yA/2;else if(E==="justify"&&j<K.length-1){let bA=_[j],jA=bA>1?yA/(bA-1):0;rA+=jA*X.lineIndex,VA=!0}u&&(rA=Math.round(rA))}let Tt=sA[j],kA=AA.baseline(Z),st=AA.height(Z),WA=Tt-kA,Ue=yA=>!HA||r.textDecorationLine!=="underline"?void 0:{underlineY:pe+yA+WA+kA+kA*.1,strokeWidth:Math.max(1,w*.1)};if(XA[j]||(XA[j]={left:rA,top:pe+tA+WA,ascender:kA,width:VA?rt:K[j]}),pA!==1/0){let we=function(zA,le){let Pt=OA(le,"grapheme",B),mt="",_r=0;for(let Jr of Pt){let _t=zA+FA([mt+Jr]);if(mt&&_t+bA>nt)break;mt+=Jr,_r=_t}return{subset:mt,resolvedWidth:_r}},yA=UA,bA=PA(UA);bA>nt&&(yA=vt,bA=PA(yA));let jA=PA(It),$A=j<K.length-1;if(j+1===pA&&($A||K[j]>nt)){if(rA+ue+bA+jA>nt){let{subset:zA,resolvedWidth:le}=we(rA,Z);Z=zA+yA,Xe=j,XA[j].width=Math.max(0,le-XA[j].left),aA=!0}else if(gA&&gA.line!==j)if(E==="center"){let{subset:zA,resolvedWidth:le}=we(rA,Z);Z=zA+yA,Xe=j,XA[j].width=Math.max(0,le-XA[j].left),aA=!0}else{let zA=RA[z+1],{subset:le,resolvedWidth:Pt}=we(ue+rA,zA);Z=Z+le+yA,Xe=j,XA[j].width=Math.max(0,Pt-XA[j].left),aA=!0}}}if(mA)tA+=0;else if(u){if(!Z.includes(di)&&!zs.includes(Z)&&RA[z+1]&&gA&&!gA.isImage&&tA===gA.y&&!aA){ie===null&&(ye=rA),ie=ie===null?Z:ie+Z;continue}let yA=ie===null?Z:ie+Z,bA=ie===null?rA:ye,jA=X.width+rA-bA,$A=Ue(tA),Ie=AA.getSVG(yA.replace(/(\t)+/g,""),{fontSize:w,left:ve+bA,top:pe+tA+kA+WA,letterSpacing:b,fontFeatureSettings:m},$A);dA=Ie.path,HA&&Ie.boxes&&Ie.boxes.length&&(ge[j]||(ge[j]=[])).push(...Ie.boxes),ie=null,g&&(ot+=v("rect",{x:ve+bA,y:pe+tA+WA,width:jA,height:st,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:ae||void 0,"clip-path":vA?`url(#${vA})`:void 0})+v("line",{x1:ve+rA,x2:ve+rA+X.width,y1:pe+tA+WA+kA,y2:pe+tA+WA+kA,stroke:"#14c000","stroke-width":1,transform:ae||void 0,"clip-path":vA?`url(#${vA})`:void 0}))}else if(tA+=kA+WA,HA&&!mA){let yA=Ue(tA),bA=AA.getSVG(Z.replace(/(\t)+/g,""),{fontSize:w,left:ve+rA,top:pe+tA,letterSpacing:b,fontFeatureSettings:m},yA);bA.boxes&&bA.boxes.length&&(ge[j]||(ge[j]=[])).push(...bA.boxes)}if(dA!==null)me+=dA+" ";else{let[yA,bA]=Ei({content:Z,filter:qA,id:s,left:ve+rA,top:pe+tA,width:ue,height:st,matrix:ae,opacity:it,image:mA,clipPathId:vA,debug:g,shape:!!R},r);JA+=yA,xA+=bA}if(aA)break}if(r.textDecorationLine&&(he=Object.entries(XA).map(([z,X])=>{if(!X)return"";let gA=ge[z]||[];return Qi({left:ve+X.left,top:X.top,width:X.width,ascender:X.ascender,clipPathId:vA,matrix:ae,glyphBoxes:gA},r)}).join("")),me){let z=(!pi(r.color)||qA)&&it!==0?v("path",{fill:qA&&(pi(r.color)||F&&za(r.color))?"black":r.color,d:me,transform:ae||void 0,[n.WebkitTextStrokeWidth||S||qA?"opacity":"fill-opacity"]:it!==1?it:void 0,style:S?`filter:${S}`:void 0,"stroke-width":n.WebkitTextStrokeWidth?`${n.WebkitTextStrokeWidth}px`:void 0,stroke:n.WebkitTextStrokeWidth?n.WebkitTextStrokeColor:void 0,"stroke-linejoin":n.WebkitTextStrokeWidth?"round":void 0,"paint-order":n.WebkitTextStrokeWidth?"stroke":void 0}):"",X=z?v("g",{mask:dt?`url(#${dt})`:void 0,"clip-path":vA?`url(#${vA})`:void 0},z):"";R&&(xA=v("path",{d:me,transform:ae||void 0})),JA+=(qA?qA+v("g",{filter:`url(#satori_s-${s})`},X+he):X+he)+ot}else he&&(JA+=qA?v("g",{filter:`url(#satori_s-${s})`},he):he);return xA&&(r._inheritedBackgroundClipTextPath.value+=xA),JA}function Oc(A,e){let t=A.Node.create();return t.setAlignItems(A.ALIGN_BASELINE),t.setJustifyContent(ZA(e,{left:A.JUSTIFY_FLEX_START,right:A.JUSTIFY_FLEX_END,center:A.JUSTIFY_CENTER,justify:A.JUSTIFY_SPACE_BETWEEN,start:A.JUSTIFY_FLEX_START,end:A.JUSTIFY_FLEX_END},A.JUSTIFY_FLEX_START,"textAlign")),t}function Tc(A){let e=/(\t)+/.exec(A);return e?{index:e.index,tabCount:e[0].length}:{index:null,tabCount:0}}var ja=require("css-gradient-parser");var Za=se(require("parse-css-color"),1);function In(A,e,t,r,n){let i=[],o=e.at(-1),s=o&&o.offset&&o.offset.unit==="%"&&r?+o.offset.value:100;for(let I of e){let{color:B}=I;if(!i.length&&(i.push({offset:0,color:B}),!I.offset||I.offset.value==="0"))continue;let f=typeof I.offset>"u"?void 0:I.offset.unit==="%"?+I.offset.value/s:Number(V(`${I.offset.value}${I.offset.unit}`,t.fontSize,A,t,!0))/A;i.push({offset:f,color:B})}i.length||i.push({offset:0,color:"transparent"});let a=i[i.length-1];a.offset!==1&&(typeof a.offset>"u"?a.offset=1:r?i[i.length-1]={offset:1,color:a.color}:i.push({offset:1,color:a.color}));let g=0,u=1;for(let I=0;I<i.length;I++)if(typeof i[I].offset>"u"){for(u<I&&(u=I);typeof i[u].offset>"u";)u++;i[I].offset=(i[u].offset-i[g].offset)/(u-g)*(I-g)+i[g].offset}else g=I;return n==="mask"?i.map(I=>{let B=(0,Za.default)(I.color);return B?B.alpha===0?{...I,color:"rgba(0, 0, 0, 1)"}:{...I,color:`rgba(255, 255, 255, ${B.alpha})`}:I}):i}function $a({id:A,width:e,height:t,repeatX:r,repeatY:n},i,o,s,a,g){let u=(0,ja.parseLinearGradient)(i),[I,B]=o,f=i.startsWith("repeating"),E,C,p;if(u.orientation.type==="directional")E=_c(u.orientation.value),C=Math.sqrt(Math.pow((E.x2-E.x1)*I,2)+Math.pow((E.y2-E.y1)*B,2));else if(u.orientation.type==="angular"){let{length:b,...m}=Jc(gt(`${u.orientation.value.value}${u.orientation.value.unit}`)/180*Math.PI,I,B);C=b,E=m}p=f?Wc(u.stops,C,E,a):E;let y=In(f?Pc(u.stops,C):C,u.stops,a,f,g),w=`satori_bi${A}`,S=`satori_pattern_${A}`,x=v("pattern",{id:S,x:s[0]/e,y:s[1]/t,width:r?I/e:"1",height:n?B/t:"1",patternUnits:"objectBoundingBox"},v("linearGradient",{id:w,...p,spreadMethod:f?"repeat":"pad"},y.map(b=>v("stop",{offset:(b.offset??0)*100+"%","stop-color":b.color})).join(""))+v("rect",{x:0,y:0,width:I,height:B,fill:`url(#${w})`}));return[S,x]}function Pc(A,e){let t=A[A.length-1],{offset:r}=t;return r?r.unit==="%"?Number(r.value)/100*e:Number(r.value):e}function _c(A){let e=0,t=0,r=0,n=0;return A.includes("top")?t=1:A.includes("bottom")&&(n=1),A.includes("left")?e=1:A.includes("right")&&(r=1),!e&&!r&&!t&&!n&&(t=1),{x1:e,y1:t,x2:r,y2:n}}function Jc(A,e,t){let r=Math.pow(t/e,2);A=(A%(Math.PI*2)+Math.PI*2)%(Math.PI*2);let n,i,o,s,a,g,u,I,B=f=>{if(f===0){n=0,i=t,o=0,s=0,a=t;return}else if(f===Math.PI/2){n=0,i=0,o=e,s=0,a=e;return}if(f>0&&f<Math.PI/2){n=(r*e/2/Math.tan(f)-t/2)/(Math.tan(f)+r/Math.tan(f)),i=Math.tan(f)*n+t,o=Math.abs(e/2-n)+e/2,s=t/2-Math.abs(i-t/2),a=Math.sqrt(Math.pow(o-n,2)+Math.pow(s-i,2)),u=(e/2/Math.tan(f)-t/2)/(Math.tan(f)+1/Math.tan(f)),I=Math.tan(f)*u+t,a=2*Math.sqrt(Math.pow(e/2-u,2)+Math.pow(t/2-I,2));return}else if(f>Math.PI/2&&f<Math.PI){n=(t/2+r*e/2/Math.tan(f))/(Math.tan(f)+r/Math.tan(f)),i=Math.tan(f)*n,o=Math.abs(e/2-n)+e/2,s=t/2+Math.abs(i-t/2),u=(e/2/Math.tan(f)+t/2)/(Math.tan(f)+1/Math.tan(f)),I=Math.tan(f)*u,a=2*Math.sqrt(Math.pow(e/2-u,2)+Math.pow(t/2-I,2));return}else f>=Math.PI&&(B(f-Math.PI),g=n,n=o,o=g,g=i,i=s,s=g)};return B(A),{x1:n/e,y1:i/t,x2:o/e,y2:s/t,length:a}}function Wc(A,e,t,r){let{x1:n,x2:i,y1:o,y2:s}=t,a=A[0].offset?A[0].offset.unit==="%"?Number(A[0].offset.value)/100:V(`${A[0].offset.value}${A[0].offset.unit}`,r.fontSize,e,r,!0)/e:0,g=A.at(-1).offset?A.at(-1).offset.unit==="%"?Number(A.at(-1).offset.value)/100:V(`${A.at(-1).offset.value}${A.at(-1).offset.unit}`,r.fontSize,e,r,!0)/e:1,u=(i-n)*a+n,I=(s-o)*a+o,B=(i-n)*g+n,f=(s-o)*g+o;return{x1:u,y1:I,x2:B,y2:f}}var eg=require("css-gradient-parser");function tg({id:A,width:e,height:t,repeatX:r,repeatY:n},i,o,s,a,g){var eA;let{shape:u,stops:I,position:B,size:f,repeating:E}=(0,eg.parseRadialGradient)(i),[C,p]=o,y=C/2,w=p/2,S=Yc(B.x,B.y,C,p,a.fontSize,a);y=S.x,w=S.y;let x=Kc(e,I,E,a),b=In(x,I,a,E,g),m=`satori_radial_${A}`,R=`satori_pattern_${A}`,F=`satori_mask_${A}`,W=Xc(u,f,a.fontSize,{x:y,y:w},[C,p],a,E),Y=qc(u,a.fontSize,I,[C,p],a,E,W),$=v("pattern",{id:R,x:s[0]/e,y:s[1]/t,width:r?C/e:"1",height:n?p/t:"1",patternUnits:"objectBoundingBox"},v("radialGradient",{id:m,...Y},b.map(IA=>v("stop",{offset:IA.offset||0,"stop-color":IA.color})).join(""))+v("mask",{id:F},v("rect",{x:0,y:0,width:C,height:p,fill:"#fff"}))+v("rect",{x:0,y:0,width:C,height:p,fill:((eA=b.at(-1))==null?void 0:eA.color)||"transparent"})+v(u,{cx:y,cy:w,width:C,height:p,...W,fill:`url(#${m})`,mask:`url(#${F})`}));return[R,$]}function Kc(A,e,t,r){if(!t)return A;let n=e.at(-1);return!n||!n.offset||n.offset.unit==="%"?A:V(`${n.offset.value}${n.offset.unit}`,+r.fontSize,A,r,!0)}function Yc(A,e,t,r,n,i){let o={x:t/2,y:r/2};return A.type==="keyword"?Object.assign(o,Ag(A.value,t,r,"x")):o.x=V(`${A.value.value}${A.value.unit}`,n,t,i,!0)??t/2,e.type==="keyword"?Object.assign(o,Ag(e.value,t,r,"y")):o.y=V(`${e.value.value}${e.value.unit}`,n,r,i,!0)??r/2,o}function Ag(A,e,t,r){switch(A){case"center":return{[r]:r==="x"?e/2:t/2};case"left":return{x:0};case"top":return{y:0};case"right":return{x:e};case"bottom":return{y:t}}}function qc(A,e,t,[r,n],i,o,s){let{r:a,rx:g,ratio:u=1}=s;if(!o)return{spreadMethod:"pad"};let I=t.at(-1),B=A==="circle"?a*2:g*2;return{spreadMethod:"repeat",cx:"50%",cy:"50%",r:I.offset.unit==="%"?`${Number(I.offset.value)*Math.min(n/r,1)/u}%`:Number(V(`${I.offset.value}${I.offset.unit}`,e,r,i,!0)/B)}}function Xc(A,e,t,r,n,i,o){let[s,a]=n,{x:g,y:u}=r,I={},B=0,f=0;if(Vc(e)){if(e.some(E=>E.value.value.startsWith("-")))throw new Error("disallow setting negative values to the size of the shape. Check https://w3c.github.io/csswg-drafts/css-images/#valdef-rg-size-length-0");return A==="circle"?Object.assign(I,{r:Number(V(`${e[0].value.value}${e[0].value.unit}`,t,s,i,!0))}):Object.assign(I,{rx:Number(V(`${e[0].value.value}${e[0].value.unit}`,t,s,i,!0)),ry:Number(V(`${e[1].value.value}${e[1].value.unit}`,t,a,i,!0))}),ln(I,s,a,g,u,o,A),I}switch(e[0].value){case"farthest-corner":B=Math.max(Math.abs(s-g),Math.abs(g)),f=Math.max(Math.abs(a-u),Math.abs(u));break;case"closest-corner":B=Math.min(Math.abs(s-g),Math.abs(g)),f=Math.min(Math.abs(a-u),Math.abs(u));break;case"farthest-side":return A==="circle"?I.r=Math.max(Math.abs(s-g),Math.abs(g),Math.abs(a-u),Math.abs(u)):(I.rx=Math.max(Math.abs(s-g),Math.abs(g)),I.ry=Math.max(Math.abs(a-u),Math.abs(u))),ln(I,s,a,g,u,o,A),I;case"closest-side":return A==="circle"?I.r=Math.min(Math.abs(s-g),Math.abs(g),Math.abs(a-u),Math.abs(u)):(I.rx=Math.min(Math.abs(s-g),Math.abs(g)),I.ry=Math.min(Math.abs(a-u),Math.abs(u))),ln(I,s,a,g,u,o,A),I}return A==="circle"?I.r=Math.sqrt(B*B+f*f):Object.assign(I,rg(B,f)),ln(I,s,a,g,u,o,A),I}function ln(A,e,t,r,n,i,o){if(i)if(o==="ellipse"){let s=Math.max(Math.abs(e-r),Math.abs(r)),a=Math.max(Math.abs(t-n),Math.abs(n)),{rx:g,ry:u}=rg(s,a);A.ratio=Math.max(g/A.rx,u/A.ry),A.ratio>1&&(A.rx*=A.ratio,A.ry*=A.ratio)}else{let s=Math.max(Math.abs(e-r),Math.abs(r)),a=Math.max(Math.abs(t-n),Math.abs(n)),g=Math.sqrt(s*s+a*a);A.ratio=g/A.r,A.ratio>1&&(A.r=g)}}function rg(A,e){let t=e!==0?A/e:1;if(A===0)return{rx:0,ry:0};{let r=Math.sqrt(A*A+e*e*t*t)/t;return{ry:r,rx:r*t}}}function Vc(A){return!A.some(e=>e.type==="keyword")}var wi=se(require("parse-css-color"),1);function Di(A,e){return typeof A=="string"&&A.endsWith("%")?e*parseFloat(A)/100:+A}function zc(A,e,t,r,n){if(!r||!n)return[e,t];if(A==="cover"){let i=e/r,o=t/n,s=Math.max(i,o);return[r*s,n*s]}if(A==="contain"){let i=e/r,o=t/n,s=Math.min(i,o);return[r*s,n*s]}if(A==="auto"||A.includes("auto")){let i=A.split(" "),o=i[0]||"auto",s=i[1]||i[0]||"auto",a=r,g=n;if(o==="auto"&&s!=="auto"){let u=Di(s,t);g=u,a=r/n*u}else if(s==="auto"&&o!=="auto"){let u=Di(o,e);a=u,g=n/r*u}return[a,g]}return[e,t]}function yi(A,{x:e,y:t,defaultX:r,defaultY:n}){return(A?A.split(" ").map(i=>{try{let o=new be(i);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(i=>i!==null):[r,n]).map((i,o)=>Di(i,[e,t][o]))}async function Ar({id:A,width:e,height:t,left:r,top:n},{image:i,size:o,position:s,repeat:a},g,u){a=a||"repeat",u=u||"background";let I=a==="repeat-x"||a==="repeat",B=a==="repeat-y"||a==="repeat",f=o&&(o==="cover"||o==="contain"||o==="auto"||o.includes("auto")),E=i.startsWith("linear-gradient(")||i.startsWith("repeating-linear-gradient(")||i.startsWith("radial-gradient(")||i.startsWith("repeating-radial-gradient("),C=f&&E?[e,t]:f?[0,0]:yi(o,{x:e,y:t,defaultX:e,defaultY:t}),p=yi(s,{x:e,y:t,defaultX:0,defaultY:0});if(i.startsWith("linear-gradient(")||i.startsWith("repeating-linear-gradient("))return $a({id:A,width:e,height:t,repeatX:I,repeatY:B},i,C,p,g,u);if(i.startsWith("radial-gradient(")||i.startsWith("repeating-radial-gradient("))return tg({id:A,width:e,height:t,repeatX:I,repeatY:B},i,C,p,g,u);if(i.startsWith("url(")){let[y,w,S]=await Rt(i.slice(4,-1)),x,b;if(f){let[m,R]=zc(o,e,t,w,S);x=m,b=R}else{let m=yi(o,{x:e,y:t,defaultX:0,defaultY:0});x=u==="mask"?w||m[0]:m[0]||w,b=u==="mask"?S||m[1]:m[1]||S}return[`satori_bi${A}`,v("pattern",{id:`satori_bi${A}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:p[0]+r,y:p[1]+n,width:I?x:"100%",height:B?b:"100%"},v("image",{x:0,y:0,width:x,height:b,preserveAspectRatio:"none",href:y}))]}if((0,wi.default)(i)){let y=(0,wi.default)(i),[w,S,x,b]=y.values,R=`rgba(${w},${S},${x},${b!==void 0?b:1})`;return[`satori_bi${A}`,v("pattern",{id:`satori_bi${A}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:r,y:n,width:e,height:t},v("rect",{x:0,y:0,width:e,height:t,fill:R}))]}throw new Error(`Invalid background image: "${i}"`)}function Zc([A,e]){return Math.round(A*1e3)===0&&Math.round(e*1e3)===0?0:Math.round(A*e/Math.sqrt(A*A+e*e)*1e3)/1e3}function cn(A,e,t){return t<A+e&&(t/2<A&&t/2<e?A=e=t/2:t/2<A?A=t-e:t/2<e&&(e=t-A)),[A,e]}function fn(A){A[0]=A[1]=Math.min(A[0],A[1])}function Bn(A,e,t,r,n){if(typeof A=="string"){let i=A.split(" ").map(s=>s.trim()),o=!i[1]&&!i[0].endsWith("%");return i[1]=i[1]||i[0],[o,[Math.min(V(i[0],r,e,n,!0),e),Math.min(V(i[1],r,t,n,!0),t)]]}return typeof A=="number"?[!0,[Math.min(A,e),Math.min(A,t)]]:[!0,void 0]}var En=A=>A&&A[0]!==0&&A[1]!==0;function Qn(A){return typeof A!="string"?1:Ii(A)}function Cn(A,e,t,r,n){if(n===1/0)return[A,t,e];if(n===-1/0)return[A,r,e];if(n===0)return[A,[(A[0]+e[0])/2,(A[1]+e[1])/2],e];let i=n<0?t:r,o=Math.pow(2,1-Math.abs(n));if(o===0)return n>0?[A,t,e]:[A,r,e];let s=[],a=16;for(let g=0;g<=a;g++){let u=Math.PI*g/a/2,I=Math.pow(Math.sin(u),o),B=Math.pow(Math.cos(u),o);s.push([i[0]+(e[0]-i[0])*I+(A[0]-i[0])*B,i[1]+(e[1]-i[1])*I+(A[1]-i[1])*B])}return s}function lt(A){return`${Math.round(A[0]*1e3)/1e3},${Math.round(A[1]*1e3)/1e3}`}function ng(A,e,t,r){return Math.min(1,t/(A[0]+e[0]||t),r/(A[1]+e[1]||r))}function jc(A,e,t,r,n,i,o){o!=null&&o.every(Boolean)&&(o=void 0);let s=A+t,a=e+r,[g,u,I,B]=n,f=[Cn([A,e+g[1]],[A+g[0],e],[A,e],[A+g[0],e+g[1]],i[0]),Cn([s-u[0],e],[s,e+u[1]],[s,e],[s-u[0],e+u[1]],i[1]),Cn([s,a-I[1]],[s-I[0],a],[s,a],[s-I[0],a-I[1]],i[2]),Cn([A+B[0],a],[A,a-B[1]],[A,a],[A+B[0],a-B[1]],i[3])];if(o){let C=o.indexOf(!0);if(C===-1)throw new Error("Invalid `partialSides`.");for(;o[(C+3)%4];)C=(C+3)%4;let p=f[C],y=Math.floor(p.length/2),w=`M${lt(p[y])}`,S=C;do{let x=f[S],b=Math.floor(x.length/2);for(let F=b+1;F<x.length;F++)w+=` L${lt(x[F])}`;let m=f[(S+1)%4];w+=` L${lt(m[0])}`;let R=Math.floor(m.length/2);for(let F=1;F<=R;F++)w+=` L${lt(m[F])}`;S=(S+1)%4}while(o[S]&&S!==C);return w}let E=`M${lt(f[0][f[0].length-1])}`;for(let C=0;C<4;C++){let p=f[(C+1)%4];E+=` L${lt(p[0])}`;for(let y=1;y<p.length;y++)E+=` L${lt(p[y])}`}return E+" Z"}function ig({id:A,borderRadiusPath:e,borderType:t,left:r,top:n,width:i,height:o},s){let a=`satori_brc-${A}`;return[v("clipPath",{id:a},v(t,{x:r,y:n,width:i,height:o,d:e||void 0})),a]}function Ze({left:A,top:e,width:t,height:r},n,i){let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:a,borderBottomRightRadius:g,fontSize:u}=n,I=[Qn(n.cornerTopLeftShape),Qn(n.cornerTopRightShape),Qn(n.cornerBottomRightShape),Qn(n.cornerBottomLeftShape)],B,f,E,C;if([B,o]=Bn(o,t,r,u,n),[f,s]=Bn(s,t,r,u,n),[E,a]=Bn(a,t,r,u,n),[C,g]=Bn(g,t,r,u,n),!i&&!En(o)&&!En(s)&&!En(a)&&!En(g))return"";if(o||=[0,0],s||=[0,0],a||=[0,0],g||=[0,0],[o[0],s[0]]=cn(o[0],s[0],t),[a[0],g[0]]=cn(a[0],g[0],t),[o[1],a[1]]=cn(o[1],a[1],r),[s[1],g[1]]=cn(s[1],g[1],r),B&&fn(o),f&&fn(s),E&&fn(a),C&&fn(g),I.some(b=>b<0)){let b=Math.min(ng(o,g,t,r),ng(s,a,t,r));if(b<1)for(let m of[o,s,g,a])m[0]*=b,m[1]*=b}if(I.some(b=>b!==1))return jc(A,e,t,r,[o,s,g,a],I,i);let p=[];p[0]=[s,s],p[1]=[g,[-g[0],g[1]]],p[2]=[a,[-a[0],-a[1]]],p[3]=[o,[o[0],-o[1]]];let y=`h${t-o[0]-s[0]} a${p[0][0]} 0 0 1 ${p[0][1]}`,w=`v${r-s[1]-g[1]} a${p[1][0]} 0 0 1 ${p[1][1]}`,S=`h${g[0]+a[0]-t} a${p[2][0]} 0 0 1 ${p[2][1]}`,x=`v${a[1]+o[1]-r} a${p[3][0]} 0 0 1 ${p[3][1]}`;if(i){let m=function(eA){let IA=Zc([o,s,g,a][eA]);return eA===0?[[A+o[0]-IA,e+o[1]-IA],[A+o[0],e]]:eA===1?[[A+t-s[0]+IA,e+s[1]-IA],[A+t,e+s[1]]]:eA===2?[[A+t-g[0]+IA,e+r-g[1]+IA],[A+t-g[0],e+r]]:[[A+a[0]-IA,e+r-a[1]+IA],[A,e+r-a[1]]]},b=i.indexOf(!1);if(!i.includes(!0))throw new Error("Invalid `partialSides`.");if(b===-1)b=0;else for(;!i[b];)b=(b+1)%4;let R="",F=m(b),W=`M${F[0]} A${p[(b+3)%4][0]} 0 0 1 ${F[1]}`,Y=0;for(;Y<4&&i[(b+Y)%4];Y++)R+=W+" ",W=[y,w,S,x][(b+Y)%4];let $=(b+Y)%4;R+=W.split(" ")[0];let cA=m($);return R+=` A${p[($+3)%4][0]} 0 0 1 ${cA[0]}`,R}return`M${A+o[0]},${e} ${y} ${w} ${S} ${x}`}function og(A,e,t){return t[A+"Width"]===t[e+"Width"]&&t[A+"Style"]===t[e+"Style"]&&t[A+"Color"]===t[e+"Color"]}function sg({id:A,currentClipPathId:e,borderPath:t,borderType:r,left:n,top:i,width:o,height:s},a){if(!(a.borderTopWidth||a.borderRightWidth||a.borderBottomWidth||a.borderLeftWidth))return null;let u=`satori_bc-${A}`;return[v("clipPath",{id:u,"clip-path":e?`url(#${e})`:void 0},v(r,{x:n,y:i,width:o,height:s,d:t||void 0})),u]}function er({left:A,top:e,width:t,height:r,props:n,asContentMask:i,maskBorderOnly:o},s){let a=["borderTop","borderRight","borderBottom","borderLeft"];if(!i&&!a.some(f=>s[f+"Width"]))return"";let g="",u=0;for(;u>0&&og(a[u],a[(u+3)%4],s);)u=(u+3)%4;let I=[!1,!1,!1,!1],B=[];for(let f=0;f<4;f++){let E=(u+f)%4,C=(u+f+1)%4,p=a[E],y=a[C];if(I[E]=!0,B=[s[p+"Width"],s[p+"Style"],s[p+"Color"],p],!og(p,y,s)){let w=(B[0]||0)+(i&&!o&&s[p.replace("border","padding")]||0);w&&(g+=v("path",{width:t,height:r,...n,fill:"none",stroke:i?"#000":B[2],"stroke-width":w*2,"stroke-dasharray":!i&&B[1]==="dashed"?w*2+" "+w:void 0,d:Ze({left:A,top:e,width:t,height:r},s,I)})),I=[!1,!1,!1,!1]}}if(I.some(Boolean)){let f=(B[0]||0)+(i&&!o&&s[B[3].replace("border","padding")]||0);f&&(g+=v("path",{width:t,height:r,...n,fill:"none",stroke:i?"#000":B[2],"stroke-width":f*2,"stroke-dasharray":!i&&B[1]==="dashed"?f*2+" "+f:void 0,d:Ze({left:A,top:e,width:t,height:r},s,I)}))}return g}function bi({id:A,left:e,top:t,width:r,height:n,matrix:i,borderOnly:o},s){let a=(s.borderLeftWidth||0)+(o?0:s.paddingLeft||0),g=(s.borderTopWidth||0)+(o?0:s.paddingTop||0),u=(s.borderRightWidth||0)+(o?0:s.paddingRight||0),I=(s.borderBottomWidth||0)+(o?0:s.paddingBottom||0),B={x:e+a,y:t+g,width:r-a-u,height:n-g-I};return v("mask",{id:A},v("rect",{...B,fill:"#fff",transform:s.overflow==="hidden"&&s.transform&&i?i:void 0,mask:s._inheritedMaskId?`url(#${s._inheritedMaskId})`:void 0})+er({left:e,top:t,width:r,height:n,props:{transform:i||void 0},asContentMask:!0,maskBorderOnly:o},s))}var Fi=require("css-to-react-native");var ki={left:0,"x-start":0,center:.5,right:1,"x-end":1},Ri={top:0,"y-start":0,center:.5,bottom:1,"y-end":1};function Ne(A){return Math.round(A*1e3)/1e3}function gg(A,e,t,r){let n=A.match(/^shape\((.*)\)$/s);if(!n)return null;let i=Pe(n[1]),o=i.shift();if(!o)throw new Error("Invalid `shape()` value.");let s=o.match(/^(?:(nonzero|evenodd)\s+)?from\s+(.+)$/);if(!s)throw new Error("Invalid `shape()` starting point.");let a=s[1]||"nonzero",g=vi(ag(s[2]),e,t,r),u=g,I=`M${Ne(g[0])},${Ne(g[1])}`;for(let B of i){let f=ag(B),E=f.shift();if(E==="close"){if(f.length)throw new Error("Invalid `close` command in `shape()`.");I+=" Z",g=u;continue}if(E==="move"||E==="line"){let C=Si(f,g,e,t,r);I+=` ${E==="move"?"M":"L"}${Ne(C[0])},${Ne(C[1])}`,g=C,E==="move"&&(u=C);continue}if(E==="hline"||E==="vline"){let C=E==="hline"?0:1,p=f.shift(),y=f.shift();if(p!=="to"&&p!=="by"||!y||f.length)throw new Error(`Invalid \`${E}\` command in \`shape()\`.`);let w=C===0?e:t,S=C===0?ki:Ri,x=p==="to"&&y in S?S[y]*w:je(y,w,r);g=[...g],g[C]=p==="by"?g[C]+x:x,I+=` ${C===0?"H":"V"}${Ne(g[C])}`;continue}if(E==="curve"||E==="smooth"){let C=f.indexOf("with"),p=C===-1?f:f.slice(0,C),y=C===-1?[]:f.slice(C+1),w=p[0],S=Si(p,g,e,t,r);if(E==="curve"&&C===-1)throw new Error("A `curve` command requires a control point.");let x=$c(y).map(b=>Af(b,g,S,e,t,r));if(E==="curve")if(x.length===1)I+=` Q${We(x[0])} ${We(S)}`;else if(x.length===2)I+=` C${We(x[0])} ${We(x[1])} ${We(S)}`;else throw new Error("A `curve` command accepts one or two control points.");else if(!x.length)I+=` T${We(S)}`;else if(x.length===1)I+=` S${We(x[0])} ${We(S)}`;else throw new Error("A `smooth` command accepts at most one control point.");g=S;continue}if(E==="arc"){let C=f.findIndex(F=>["of","cw","ccw","large","small","rotate"].includes(F)),p=C===-1?f:f.slice(0,C),y=C===-1?[]:f.slice(C),w=Si(p,g,e,t,r),S=0,x=0,b=0,m=0,R=0;for(let F=0;F<y.length;F++){let W=y[F];if(W==="of"){let Y=y[++F];if(!Y)throw new Error("Invalid `arc` radius in `shape()`.");let $=y[F+1],cA=$&&!["cw","ccw","large","small","rotate"].includes($);if(cA&&F++,cA)S=je(Y,e,r),x=je($,t,r);else{let eA=Math.sqrt(e*e+t*t)/Math.sqrt(2);S=x=je(Y,eA,r)}}else if(W==="cw"||W==="ccw")R=W==="cw"?1:0;else if(W==="large"||W==="small")m=W==="large"?1:0;else if(W==="rotate"){let Y=y[++F];if(!Y)throw new Error("Invalid `arc` rotation in `shape()`.");let $=gt(Y);if(typeof $>"u")throw new Error("Invalid `arc` rotation in `shape()`.");b=$}else throw new Error("Invalid `arc` option in `shape()`.")}I+=` A${Ne(Math.abs(S))},${Ne(Math.abs(x))} ${Ne(b)} ${m} ${R} ${We(w)}`,g=w;continue}throw new Error(`Unsupported \`${E}\` command in \`shape()\`.`)}return{type:"path",d:I,"fill-rule":a}}function ag(A){return A.trim().replace(/\//g," / ").split(/\s+/).filter(Boolean)}function $c(A){if(!A.length)return[];let e=A.indexOf("/");return e===-1?[A]:[A.slice(0,e),A.slice(e+1)]}function Si(A,e,t,r,n){let i=A[0];if(i!=="to"&&i!=="by")throw new Error("A `shape()` command must use `to` or `by`.");let o=vi(A.slice(1),t,r,n);return i==="by"?[e[0]+o[0],e[1]+o[1]]:o}function Af(A,e,t,r,n,i){let o=A.indexOf("from"),s=o===-1?A:A.slice(0,o),a=o===-1?void 0:A[o+1];if(o!==-1&&(o+2!==A.length||!a))throw new Error("Invalid control point reference in `shape()`.");let g=vi(s,r,n,i,!0);return a==="start"||!a&&!ef(A)?[e[0]+g[0],e[1]+g[1]]:a==="end"?[t[0]+g[0],t[1]+g[1]]:g}function vi(A,e,t,r,n=!1){if(!A.length||A.length>4)throw new Error("Invalid position in `shape()`.");let i,o,s=[...A];for(let a=0;a<s.length;a++){let g=s[a];if(g==="left"||g==="right"||g==="x-start"||g==="x-end"){let u=s[a+1];if(u&&!xi(u)){let I=je(u,e,r);i=g==="left"||g==="x-start"?I:e-I,a++}else i=ki[g]*e}else if(g==="top"||g==="bottom"||g==="y-start"||g==="y-end"){let u=s[a+1];if(u&&!xi(u)){let I=je(u,t,r);o=g==="top"||g==="y-start"?I:t-I,a++}else o=Ri[g]*t}else if(g==="center")if(i===void 0)i=e/2;else if(o===void 0)o=t/2;else throw new Error("Invalid position in `shape()`.");else if(i===void 0)i=je(g,e,r);else if(o===void 0)o=je(g,t,r);else throw new Error("Invalid position in `shape()`.")}return!n&&A.length===1&&o===void 0&&(o=t/2),[i??(n?0:e/2),o??(n?0:t/2)]}function xi(A){return A in ki||A in Ri}function ef(A){return A.some(xi)}function je(A,e,t){let r=V(A,t.fontSize,e,t,!0);if(typeof r>"u")throw new Error(`Invalid length \`${A}\` in \`shape()\`.`);return r}function We(A){return`${Ne(A[0])},${Ne(A[1])}`}var Ft={circle:/circle\((.+)\)/,ellipse:/ellipse\((.+)\)/,path:/path\((.+)\)/,polygon:/polygon\((.+)\)/,inset:/inset\((.+)\)/,shape:/shape\((.+)\)/};function lg({width:A,height:e},t,r){function n(u){let I=u.match(Ft.circle);if(!I)return null;let[,B]=I,[f,E=""]=B.split("at").map(y=>y.trim()),{x:C,y:p}=Ig(E,A,e);return{type:"circle",r:V(f,r.fontSize,Math.sqrt(Math.pow(A,2)+Math.pow(e,2))/Math.sqrt(2),r,!0),cx:V(C,r.fontSize,A,r,!0),cy:V(p,r.fontSize,e,r,!0)}}function i(u){let I=u.match(Ft.ellipse);if(!I)return null;let[,B]=I,[f,E=""]=B.split("at").map(S=>S.trim()),[C,p]=f.split(" "),{x:y,y:w}=Ig(E,A,e);return{type:"ellipse",rx:V(C||"50%",r.fontSize,A,r,!0),ry:V(p||"50%",r.fontSize,e,r,!0),cx:V(y,r.fontSize,A,r,!0),cy:V(w,r.fontSize,e,r,!0)}}function o(u){let I=u.match(Ft.path);if(!I)return null;let[B,f]=ug(I[1]);return{type:"path",d:f,"fill-rule":B}}function s(u){let I=u.match(Ft.polygon);if(!I)return null;let[B,f]=ug(I[1]);return{type:"polygon","fill-rule":B,points:f.split(",").map(E=>E.split(" ").map((C,p)=>V(C,r.fontSize,p===0?A:e,r,!0)).join(" ")).join(",")}}function a(u){let I=u.match(Ft.inset);if(!I)return null;let[B,f]=(I[1].includes("round")?I[1]:`${I[1].trim()} round 0`).split("round"),E=(0,Fi.getStylesForProperty)("borderRadius",f,!0),C=Object.values(E).map(b=>String(b)).map((b,m)=>V(b,r.fontSize,m===0||m===2?e:A,r,!0)||0),p=Object.values((0,Fi.getStylesForProperty)("margin",B,!0)).map(b=>String(b)).map((b,m)=>V(b,r.fontSize,m===0||m===2?e:A,r,!0)||0),y=p[3],w=p[0],S=A-(p[1]+p[3]),x=e-(p[0]+p[2]);return C.some(b=>b>0)?{type:"path",d:Ze({left:y,top:w,width:S,height:x},{...t,...E})}:{type:"rect",x:y,y:w,width:S,height:x}}function g(u){return Ft.shape.test(u)?gg(u,A,e,r):null}return{parseCircle:n,parseEllipse:i,parsePath:o,parsePolygon:s,parseInset:a,parseShape:g}}function ug(A){let[,e="nonzero",t]=A.replace(/('|")/g,"").match(/^(nonzero|evenodd)?,?(.+)/)||[];return[e,t]}function Ig(A,e,t){let r=A.split(" "),n={x:r[0]||"50%",y:r[1]||"50%"};return r.forEach(i=>{i==="top"?n.y=0:i==="bottom"?n.y=t:i==="left"?n.x=0:i==="right"?n.x=e:i==="center"&&(n.x=e/2,n.y=t/2)}),n}function dn(A){return`satori_cp-${A}`}function cg(A){return`url(#${dn(A)})`}function fg(A,e,t){if(e.clipPath==="none")return"";let r=lg(A,e,t),n=e.clipPath,i={type:""};for(let o of Object.keys(r))if(i=r[o](n),i)break;if(i){let{type:o,...s}=i;return v("clipPath",{id:dn(A.id),"clip-path":A.currentClipPath,transform:`translate(${A.left}, ${A.top})`},v(o,s))}return""}function Ni({left:A,top:e,width:t,height:r,path:n,matrix:i,id:o,currentClipPath:s,src:a},g,u){let I="",B=g.clipPath&&g.clipPath!=="none"?fg({left:A,top:e,width:t,height:r,path:n,id:o,matrix:i,currentClipPath:s,src:a},g,u):"";if(g.overflow!=="hidden"&&!a)I="";else{let E=B?`satori_ocp-${o}`:dn(o);I=v("clipPath",{id:E,"clip-path":s},v(n?"path":"rect",{x:A,y:e,width:t,height:r,d:n||void 0,transform:g.overflow==="hidden"&&g.transform&&i?i:void 0}))}let f=bi({id:`satori_om-${o}`,left:A,top:e,width:t,height:r,matrix:i,borderOnly:!a},g);return B+I+f}var tf=A=>`satori_mi-${A}`;async function Mi(A,e,t){if(!e.maskImage)return["",""];let{left:r,top:n,width:i,height:o,id:s}=A,a=e.maskImage,g=a.length;if(!g)return["",""];let u=tf(s),I="";for(let B=0;B<g;B++){let f=a[B],[E,C]=await Ar({id:`${u}-${B}`,left:r,top:n,width:i,height:o},f,t,"mask");I+=C+v("rect",{x:r,y:n,width:i,height:o,fill:`url(#${E})`})}return I=v("mask",{id:u},I),[u,I]}function Bg({id:A,left:e,top:t,width:r,height:n,path:i,type:o,matrix:s,currentClipPath:a,mask:g,filters:u}){if(!u.length)return["",""];let I=`satori_bf-${A}`,B=`satori_bfc-${A}`,f=nf(u),E="BackgroundImage",C="";u.forEach((w,S)=>{let x=`${I}-${S}`;C+=rf(w,E,x),E=x});let p=v("filter",{id:I,x:e-f.left,y:t-f.top,width:r+f.left+f.right,height:n+f.top+f.bottom,filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},C)+v("clipPath",{id:B,"clip-path":a},v(o,{x:e,y:t,width:r,height:n,d:i||void 0,transform:s||void 0})),y=v(o,{x:e,y:t,width:r,height:n,d:i||void 0,fill:"#000",transform:s||void 0,filter:`url(#${I})`,"clip-path":`url(#${B})`,mask:g});return[p,y]}function rf(A,e,t){if(A.type==="blur")return v("feGaussianBlur",{in:e,stdDeviation:A.value,result:t});if(A.type==="hue-rotate")return v("feColorMatrix",{in:e,type:"hueRotate",values:A.value,result:t});if(A.type==="saturate"||A.type==="grayscale")return v("feColorMatrix",{in:e,type:"saturate",values:A.type==="grayscale"?1-A.value:A.value,result:t});if(A.type==="sepia"){let o=A.value,s=1-o;return v("feColorMatrix",{in:e,type:"matrix",values:[s+.393*o,.769*o,.189*o,0,0,.349*o,s+.686*o,.168*o,0,0,.272*o,.534*o,s+.131*o,0,0,0,0,0,1,0].join(" "),result:t})}if(A.type==="drop-shadow"){let o=`${t}-input`;return v("feComposite",{in:e,in2:"SourceAlpha",operator:"in",result:o})+v("feDropShadow",{in:o,dx:A.offsetX,dy:A.offsetY,stdDeviation:A.blurRadius,"flood-color":A.color,result:t})}let r=A.value,n=A.type==="brightness"?{slope:r}:A.type==="contrast"?{slope:r,intercept:.5-.5*r}:A.type==="invert"?{slope:1-2*r,intercept:r}:{slope:r},i=A.type==="opacity"?["A"]:["R","G","B"];return v("feComponentTransfer",{in:e,result:t},i.map(o=>v(`feFunc${o}`,{type:"linear",...n})).join(""))}function nf(A){let e=0,t=0,r=0,n=0;for(let i of A)if(i.type==="blur"){let o=i.value*3;e=Math.max(e,o),t=Math.max(t,o),r=Math.max(r,o),n=Math.max(n,o)}else if(i.type==="drop-shadow"){let o=i.blurRadius*3;e=Math.max(e,o-i.offsetX),t=Math.max(t,o-i.offsetY),r=Math.max(r,o+i.offsetX),n=Math.max(n,o+i.offsetY)}return{left:e,top:t,right:r,bottom:n}}function of(A,e,t){let r=A.toLowerCase().trim().split(/\s+/),n=(a,g)=>({left:"0%",center:"50%",right:"100%",top:"0%",bottom:"100%"})[a]||a,i,o;if(r.length===1){let a=r[0];a==="left"||a==="center"||a==="right"?(i=n(a,"x"),o="50%"):a==="top"||a==="bottom"?(i="50%",o=n(a,"y")):(i=a,o="50%")}else{let a=r[0],g=r[1];a==="top"||a==="bottom"?(o=n(a,"y"),g==="left"||g==="right"||g==="center"?i=n(g,"x"):(i="50%",o=a==="top"||a==="bottom"?n(a,"y"):g)):(i=n(a,"x"),o=n(g,"y"))}let s=(a,g)=>{try{if(a.endsWith("%"))return g*parseFloat(a)/100;let u=new be(a);return u.type==="length"||u.type==="number"?u.value:0}catch{return 0}};return[s(i,e),s(o,t)]}async function tr({id:A,left:e,top:t,width:r,height:n,isInheritingTransform:i,src:o,debug:s},a,g){if(a.display==="none")return"";let u=!!o,I="rect",B="",f="",E=[],C=1,p="";a.backgroundColor&&E.push(a.backgroundColor),a.opacity!==void 0&&(C=+a.opacity),a.transform&&(B=$t({left:e,top:t,width:r,height:n},a.transform,i,a.transformOrigin));let y="";if(a.backgroundImage){let AA=[];for(let fA=0;fA<a.backgroundImage.length;fA++){let ne=a.backgroundImage[fA],PA=await Ar({id:A+"_"+fA,width:r,height:n,left:e,top:t},ne,g);PA&&AA.unshift(PA)}for(let fA of AA)E.push(`url(#${fA[0]})`),f+=fA[1],fA[2]&&(y+=fA[2])}let[w,S]=await Mi({id:A,left:e,top:t,width:r,height:n},a,g);f+=S;let x=w?`url(#${w})`:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0,b=Ze({left:e,top:t,width:r,height:n},a);b&&(I="path");let m=a._inheritedClipPathId;s&&(p=v("rect",{x:e,y:t,width:r,height:n,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:B||void 0,"clip-path":m?`url(#${m})`:void 0}));let{backgroundClip:R,filter:F}=a,W=R==="text"?`url(#satori_bct-${A})`:m?`url(#${m})`:a.clipPath?cg(A):void 0,Y=Ni({left:e,top:t,width:r,height:n,path:b,id:A,matrix:B,currentClipPath:W,src:o},a,g),[$,cA]=Bg({id:A,left:e,top:t,width:r,height:n,path:b,type:I,matrix:B||void 0,currentClipPath:W,mask:x,filters:a._backdropFilters||[]});f+=$;let eA=C!==1&&!u&&E.length===1&&!cA&&!y&&!F&&!x&&!a.boxShadow&&!(a.borderTopWidth||a.borderRightWidth||a.borderBottomWidth||a.borderLeftWidth),IA=E.map(AA=>v(I,{x:e,y:t,width:r,height:n,fill:AA,"fill-opacity":eA?C:void 0,d:b||void 0,transform:B||void 0,"clip-path":a.transform?void 0:W,style:F?`filter:${F}`:void 0,mask:a.transform?void 0:x})).join(""),re=sg({id:A,left:e,top:t,width:r,height:n,currentClipPathId:m,borderPath:b,borderType:I},a),pA;if(u){let AA=(a.borderLeftWidth||0)+(a.paddingLeft||0),fA=(a.borderTopWidth||0)+(a.paddingTop||0),ne=(a.borderRightWidth||0)+(a.paddingRight||0),PA=(a.borderBottomWidth||0)+(a.paddingBottom||0),FA=r-AA-ne,hA=n-fA-PA,NA=(a.objectPosition||"center").toString(),[LA,K]=of(NA,FA,hA),sA=a.__naturalWidth||FA,_=a.__naturalHeight||hA,RA,SA=FA,GA=hA,KA=e+AA,BA=t+fA;if(a.objectFit==="contain"){let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else if(a.objectFit==="cover"){let YA=FA/sA,JA=hA/_,xA=Math.max(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else if(a.objectFit==="fill")RA="none";else if(a.objectFit==="scale-down")if(sA&&_){let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);if(xA>=1)SA=sA,GA=_,RA="none",KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA;else{let vA=xA;SA=sA*vA,GA=_*vA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}}else{let YA=FA/sA,JA=hA/_,xA=Math.min(YA,JA);SA=sA*xA,GA=_*xA,KA=e+AA+LA-SA*LA/FA,BA=t+fA+K-GA*K/hA,RA="none"}else RA="none";a.transform&&(pA=ig({id:A,borderRadiusPath:b,borderType:I,left:e,top:t,width:r,height:n},a)),IA+=v("image",{x:KA,y:BA,width:SA,height:GA,href:o,preserveAspectRatio:RA,transform:B||void 0,style:F?`filter:${F}`:void 0,"clip-path":a.transform?pA?`url(#${pA[1]})`:void 0:`url(#satori_cp-${A})`,mask:a.transform?void 0:w?`url(#${w})`:`url(#satori_om-${A})`})}if(re){f+=re[0];let AA=re[1];IA+=er({left:e,top:t,width:r,height:n,props:{transform:B||void 0,"clip-path":`url(#${AA})`}},a)}let UA=qa({width:r,height:n,id:A,opacity:C,shape:v(I,{x:e,y:t,width:r,height:n,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:B||void 0,"clip-path":W,mask:x})},a),CA=cA+(y||IA);return a.transform&&(W||x)&&(CA=v("g",{"clip-path":W||void 0,mask:x||void 0},CA)),C!==1&&!eA&&(CA=v("g",{opacity:C},CA)),(f?v("defs",{},f):"")+(UA?UA[0]:"")+(pA?pA[0]:"")+Y+CA+(UA?UA[1]:"")+p}var Qg=String.raw,Eg=Qg`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Cg=()=>new RegExp(Qg`\p{RI}{2}|(?)${Eg}(?:\u200D${Eg})*`,"gu");var sf=new RegExp(Cg(),"u"),Li={emoji:sf,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Gi={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},pn=Object.keys({...Gi,...Li});function dg(A){return pn.includes(A)}function pg(A,e){for(let r of Object.keys(Li))if(Li[r].test(A))return[r];let t=Object.keys(Gi).filter(r=>Gi[r].test(A));if(t.length===0)return["unknown"];if(e){let r=t.findIndex(n=>n===e);r!==-1&&(t.splice(r,1),t.unshift(e))}return t}function hg(A){if(A)return pn.find(e=>e.toLowerCase().startsWith(A.toLowerCase()))}async function*rr(A,e){var NA,LA;let t=await ze(),{id:r,inheritedStyle:n,parent:i,font:o,debug:s,locale:a,embedFont:g=!0,graphemeImages:u,canLoadAdditionalAssets:I,getTwStyles:B}=e;if(A===null||typeof A>"u")return yield,yield,"";if(!wt(A)||qs(A.type)){let K;if(!wt(A))K=mi(String(A),e),yield(await K.next()).value;else{if(Ys(A.type))throw new Error("Class component is not supported.");let _;Vn(A.type)?_=A.type.render:_=A.type,K=rr(await _(A.props),e),yield(await K.next()).value}await K.next();let sA=yield;return(await K.next(sA)).value}let{type:f,props:E}=A,C=f;if(E&&Xs(E))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:p,children:y,tw:w,lang:S=a}=E||{},x=hg(S);if(w){let K=B(w,p);p=Object.assign(K,p)}let b=t.Node.create();i.insertChild(b,i.getChildCount());let[m,R]=await fi(b,C,n,p,E,e.replacedElements),F=m.transform===n.transform;if(F||(m.transform.__parent=n.transform),(m.overflow==="hidden"||m.clipPath&&m.clipPath!=="none")&&(R._inheritedClipPathId=`satori_cp-${r}`,R._inheritedMaskId=`satori_om-${r}`),m.maskImage&&(R._inheritedMaskId=`satori_mi-${r}`),m.backgroundClip==="text"){let K={value:""};R._inheritedBackgroundClipTextPath=K,m._inheritedBackgroundClipTextPath=K,m.backgroundImage&&(R._inheritedBackgroundClipTextHasBackground="true",m._inheritedBackgroundClipTextHasBackground="true")}let W=!!((NA=e.replacedElements)!=null&&NA[C]),Y=W?[]:Vs(y),$=[],cA=0,eA=[];for(let K of Y){let sA=rr(K,{id:r+"-"+cA++,parentStyle:m,inheritedStyle:R,isInheritingTransform:!0,parent:b,font:o,embedFont:g,debug:s,graphemeImages:u,canLoadAdditionalAssets:I,locale:x,getTwStyles:B,onNodeDetected:e.onNodeDetected,replacedElements:e.replacedElements});I?eA.push(...(await sA.next()).value||[]):await sA.next(),$.push(sA)}yield eA;for(let K of $)await K.next();let[IA,re]=yield,{left:pA,top:UA,width:CA,height:AA}=b.getComputedLayout();pA+=IA,UA+=re;let fA="",ne="",PA="",{children:FA,...hA}=E;if((LA=e.onNodeDetected)==null||LA.call(e,{left:pA,top:UA,width:CA,height:AA,type:C,props:hA,key:A.key,textContent:wt(FA)?void 0:FA}),C==="img"||W){let K=m.__src;ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,src:K,isInheritingTransform:F,debug:s},m,R)}else if(C==="svg"){let K=m.color,sA=await Sa(A,K);ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,src:sA,isInheritingTransform:F,debug:s},m,R)}else{let K=p==null?void 0:p.display;if(C==="div"&&y&&typeof y!="string"&&K!=="flex"&&K!=="none"&&K!=="contents")throw new Error('Expected <div> to have explicit "display: flex", "display: contents", or "display: none" if it has more than one child node.');ne=await tr({id:r,left:pA,top:UA,width:CA,height:AA,isInheritingTransform:F,debug:s},m,R)}for(let K of $)fA+=(await K.next([pA,UA])).value;return m._inheritedBackgroundClipTextPath&&(PA+=v("clipPath",{id:`satori_bct-${r}`,"clip-path":m._inheritedClipPathId?`url(#${m._inheritedClipPathId})`:void 0},m._inheritedBackgroundClipTextPath.value)),PA+ne+fA}var nr=se(require("@shuding/opentype.js"),1),bg=require("fflate");var mg=se(require("harfbuzzjs"),1),fe=null,hn=null,Ui=new WeakMap,Hi=typeof FinalizationRegistry=="function"?new FinalizationRegistry(A=>A.destroy()):null;async function yg(){if(!fe){if(hn){await hn;return}hn=(async()=>{if(fe=await mg.default,!fe||typeof fe.createBlob!="function")throw new Error("HarfBuzz module loaded but API is not available")})(),await hn}}function af(A){if(!fe)throw new Error("HarfBuzz not initialized. Call initHarfBuzz() first.");if(Ui.has(A))return Ui.get(A);let e=A._rawFontData;if(!e)throw new Error("Font does not have _rawFontData. Make sure to store the original ArrayBuffer when loading fonts.");let t=fe.createBlob(new Uint8Array(e)),r=fe.createFace(t,0),n=fe.createFont(r);r.destroy(),t.destroy();let i=A.unitsPerEm;return n.setScale(i,i),Ui.set(A,n),Hi==null||Hi.register(A,n),n}function wg(A,e,t={}){if(!fe)throw new Error("HarfBuzz not initialized");if(!e||e.length===0)return[];let{features:r,language:n,script:i,direction:o}=t,s=af(A),a=fe.createBuffer();try{a.addText(e),a.guessSegmentProperties(),n&&a.setLanguage(n),i&&a.setScript(i),o&&a.setDirection(o);let g;if(r&&Object.keys(r).length>0){let I=[];for(let[B,f]of Object.entries(r))typeof f=="boolean"?I.push(f?`+${B}`:`-${B}`):I.push(`${B}=${f}`);g=I.join(",")}return g?fe.shape(s,a,g):fe.shape(s,a),a.json(s)}finally{a.destroy()}}function Dg(A){if(!A||A==="normal")return{};let e={},t=A.split(",").map(r=>r.trim());for(let r of t){let n=r.match(/["']([a-z0-9]{4})["']\s*(?:(on|off|[0-9]+))?/i);if(n){let i=n[1],o=n[2];if(!o||o==="on"||o==="1")e[i]=!0;else if(o==="off"||o==="0")e[i]=!1;else{let s=parseInt(o,10);isNaN(s)||(e[i]=s)}}}return e}var gf=256;function uf(A){return/^\s$/.test(A)}function If(A,e){if(!A)return[];let t=OA(A,"grapheme"),r=[],n="",i=null;for(let o of t){let s;uf(o)&&i!==null&&i.charToGlyphIndex(o)?s=i:s=e(o),i===null?(i=s,n=o):s===i?n+=o:(r.push([n,i]),n=o,i=s)}return n&&i&&r.push([n,i]),r}function lf(A){let e=new DataView(A),t=e.getUint16(12),r=e.getUint32(16),n=new ArrayBuffer(r),i=new DataView(n),o=new Uint8Array(n);i.setUint32(0,e.getUint32(4)),i.setUint16(4,t);let s=Math.floor(Math.log2(t)),a=(1<<s)*16;i.setUint16(6,a),i.setUint16(8,s),i.setUint16(10,t*16-a);let g=12+t*16;for(let u=0;u<t;u++){let I=44+u*20,B=e.getUint32(I),f=e.getUint32(I+4),E=e.getUint32(I+8),C=e.getUint32(I+12),p=e.getUint32(I+16),y=12+u*16;if(i.setUint32(y,B),i.setUint32(y+4,p),i.setUint32(y+8,g),i.setUint32(y+12,C),E<C){let w=new Uint8Array(A,f+2,E-2),S=new Uint8Array(C);(0,bg.inflateSync)(w,S),o.set(S,g)}else o.set(new Uint8Array(A,f,C),g);g+=C+3&-4}return n}var Sg="unknown";function cf(A){let e=[],t=[0,0],r=[0,0],n=(i,o)=>{let s=i[0];for(let a=1;a<=o;a++){let g=a/o,u=ff(i,g);e.push({from:s,to:u}),s=u}r=i[i.length-1]};for(let i of A){if(i.type==="M"){t=r=[i.x,i.y];continue}if(i.type==="L"){let o=[i.x,i.y];e.push({from:r,to:o}),r=o;continue}if(i.type==="Q"){n([r,[i.x1,i.y1],[i.x,i.y]],12);continue}if(i.type==="C"){n([r,[i.x1,i.y1],[i.x2,i.y2],[i.x,i.y]],16);continue}i.type==="Z"&&(e.push({from:r,to:t}),r=t)}return e}function ff(A,e){let t=A;for(;t.length>1;){let r=[];for(let n=0;n<t.length-1;n++)r.push([t[n][0]+(t[n+1][0]-t[n][0])*e,t[n][1]+(t[n+1][1]-t[n][1])*e]);t=r}return t[0]}function Bf(A,e){if(!e)return[];let t=e.strokeWidth,r=e.underlineY-t*.25,n=e.underlineY+t*2.5,i=cf(A);if(!i.length)return[];let o=n-r,s=Math.max(12,Math.ceil(o/.25)),a=o/s,g=r+a/2,u=new Set;for(let S=0;S<s;S++){let x=g+a*S,b=[];for(let m of i){let[R,F]=m.from,[W,Y]=m.to;if(F===Y)continue;let $=Math.min(F,Y),cA=Math.max(F,Y);if(x<$||x>=cA)continue;let eA=(x-F)/(Y-F),IA=R+(W-R)*eA;b.push(IA)}if(b.length){b.sort((m,R)=>m-R);for(let m=0;m<b.length-1;m+=2){let R=Math.min(b[m],b[m+1]),F=Math.max(b[m],b[m+1]),W=Math.floor(R),Y=Math.ceil(F);for(let $=W;$<Y;$++)u.add($)}}}if(!u.size)return[];let I=Array.from(u.values()).sort((S,x)=>S-x),B=[],f=I[0],E=I[0];for(let S=1;S<I.length;S++){let x=I[S];x>E+1&&(B.push([f,E+1]),f=x),E=x}B.push([f,E+1]);let C=[],p=t*.6,y=B[0][0],w=B[B.length-1][1];for(let[S,x]of B){let b=Math.min(S,y)-p,m=Math.max(x,w)+p;C.push({x1:b,x2:m,y1:r,y2:n})}return C}function Ef(A,e,[t,r],[n,i]){if(t!==n)return t?!n||t===A?-1:n===A?1:A===400&&t===500||A===500&&t===400?-1:A===400&&n===500||A===500&&n===400?1:A<400?t<A&&n<A?n-t:t<A?-1:n<A?1:t-n:A<t&&A<n?t-n:A<t?-1:A<n?1:n-t:1;if(r!==i){if(r===e)return-1;if(i===e)return 1}return-1}var Oi=new WeakMap,ir=class{constructor(e){this.fonts=new Map;this.shapedRunCache=new Map;this.addFonts(e)}get({name:e,weight:t,style:r}){if(!this.fonts.has(e))return null;t==="normal"&&(t=400),t==="bold"&&(t=700),typeof t=="string"&&(t=Number.parseInt(t,10));let n=[...this.fonts.get(e)],i=n[0];for(let o=1;o<n.length;o++){let[,s,a]=i,[,g,u]=n[o];Ef(t,r,[s,a],[g,u])>0&&(i=n[o])}return i[0]}addFonts(e){e.length&&this.fonts.size&&this.shapedRunCache.clear();for(let t of e){let{name:r,data:n,lang:i}=t;if(i&&!dg(i))throw new Error(`Invalid value for props \`lang\`: "${i}". The value must be one of the following: ${pn.join(", ")}.`);let o=i??Sg,s;if(Oi.has(n))s=Oi.get(n);else{let g="buffer"in n?n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength):n;s=nr.default.parse(g,{lowMemory:!0});let u=new Uint8Array(g),I=u[0]===119&&u[1]===79&&u[2]===70&&u[3]===70;s._rawFontData=I?lf(g):g;let B=s.charToGlyphIndex;s.charToGlyphIndex=f=>{let E=B.call(s,f);return E===0&&s._trackBrokenChars&&s._trackBrokenChars.push(f),E},Oi.set(n,s)}this.defaultFont||(this.defaultFont=s);let a=`${r.toLowerCase()}_${o}`;this.fonts.has(a)||this.fonts.set(a,[]),this.fonts.get(a).push([s,t.weight,t.style])}}getEngine(e=16,t="normal",{fontFamily:r="sans-serif",fontWeight:n=400,fontStyle:i="normal"},o){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(m=>m.toLowerCase());let s=[];r.forEach(m=>{let R=this.get({name:m,weight:n,style:i});if(R){s.push(R);return}let F=this.get({name:m+"_unknown",weight:n,style:i});if(F){s.push(F);return}});let a=Array.from(this.fonts.keys()),g=[],u=[],I=[];for(let m of a)if(!r.includes(m))if(o){let R=Qf(m);R?R===o?g.push(this.get({name:m,weight:n,style:i})):u.push(this.get({name:m,weight:n,style:i})):I.push(this.get({name:m,weight:n,style:i}))}else I.push(this.get({name:m,weight:n,style:i}));let B=new Map,f=(m,R=!0)=>{let F=[...s,...I,...g,...R?u:[]];if(typeof m>"u")return R?F[F.length-1]:void 0;let W=m.charCodeAt(0);if(B.has(W))return B.get(W);let Y=F.find(($,cA)=>!!$.charToGlyphIndex(m)||R&&cA===F.length-1);return Y&&B.set(W,Y),Y},E=(m,R=!1)=>{var W,Y;return((R?(Y=(W=m.tables)==null?void 0:W.os2)==null?void 0:Y.sTypoAscender:0)||m.ascender)/m.unitsPerEm*e},C=(m,R=!1)=>{var W,Y;return((R?(Y=(W=m.tables)==null?void 0:W.os2)==null?void 0:Y.sTypoDescender:0)||m.descender)/m.unitsPerEm*e},p=(m,R=!1)=>{var F,W;if(typeof t=="string"&&t==="normal"){let Y=(R?(W=(F=m.tables)==null?void 0:F.os2)==null?void 0:W.sTypoLineGap:0)||0;return E(m,R)-C(m,R)+Y/m.unitsPerEm*e}else if(typeof t=="number")return e*t},y=m=>f(m,!1),w=this.shapedRunCache,S=`${r.join(",")}|${n}|${i}|${o||""}`,x=(m,R)=>{let F=`${S}\0${R||""}\0${m}`,W=w.get(F);if(W!==void 0)return w.delete(F),w.set(F,W),W;let Y=R?Dg(R):{},$=If(m,f).map(([cA,eA])=>[cA,eA,wg(eA,cA,{features:Y})]);if(w.size>=gf){let cA=w.keys().next().value;cA!==void 0&&w.delete(cA)}return w.set(F,$),$};return{has:m=>{if(m===`
|
|
7
7
|
`)return!0;let R=y(m);if(!R)return!1;for(let F of OA(m,"grapheme"))if(!R.charToGlyphIndex(F))return!1;return!0},baseline:(m,R=typeof m>"u"?s[0]:f(m))=>{let F=E(R),W=C(R),Y=F-W;return F+(p(R)-Y)/2},height:(m,R=typeof m>"u"?s[0]:f(m))=>p(R),measure:(m,R)=>this.measure(m,R,x),getSVG:(m,R,F)=>this.getSVG(m,R,x,F)}}patchFontFallbackResolver(e,t){let r=[];e._trackBrokenChars=r;let n=e.stringToGlyphs;return e.stringToGlyphs=(i,...o)=>{let s=n.call(e,i,...o);for(let a=0;a<s.length;a++)if(s[a].unicode===void 0){let g=r.shift(),u=t(g);if(u!==e){let I=u.charToGlyph(g),B=e.unitsPerEm/u.unitsPerEm,f=new nr.default.Path;f.unitsPerEm=e.unitsPerEm,f.commands=I.path.commands.map(C=>{let p={...C};for(let y in p)typeof p[y]=="number"&&(p[y]*=B);return p});let E=new nr.default.Glyph({...I,advanceWidth:I.advanceWidth*B,xMin:I.xMin*B,xMax:I.xMax*B,yMin:I.yMin*B,yMax:I.yMax*B,path:f});s[a]=E}}return s},()=>{e.stringToGlyphs=n,e._trackBrokenChars=void 0}}measure(e,{fontSize:t,letterSpacing:r=0,fontFeatureSettings:n},i){let o=i(e,n),s=0,a=0;for(let[,u,I]of o){let B=0;for(let f of I)B+=f.ax;s+=B/u.unitsPerEm*t,a+=I.length}let g=r*Math.max(0,a-1);return s+g}getSVG(e,{fontSize:t,top:r,left:n,letterSpacing:i=0,fontFeatureSettings:o},s,a){if(t===0)return{path:"",boxes:[]};let g=s(e.replace(/\n/g,""),o),u=[],I=n,B=r,f=!1,E=new nr.default.Path;for(let[,C,p]of g){let y=t/C.unitsPerEm;for(let w=0;w<p.length;w++){let S=p[w];f&&(I+=i);let x=C.glyphs.get(S.g);if(x&&x.path){let b=I+S.dx*y,m=B+S.dy*y,R=x.getPath(b,m,t,{}),F=a?Bf(R.commands,a):[];F.length&&u.push(...F),E.extend(R)}I+=S.ax*y,f=!0}}return{path:E.toPathData(1),boxes:u}}};function Qf(A){let e=A.split("_"),t=e[e.length-1];return t===Sg?void 0:t}function Ti({width:A,height:e,content:t}){return v("svg",{width:A,height:e,viewBox:`0 0 ${A} ${e}`,xmlns:"http://www.w3.org/2000/svg","enable-background":t.includes('in="BackgroundImage"')?"new":void 0},t)}var ol=se(UI());var rp=["ios","android","windows","macos","web"];function OI(A){return rp.includes(A)}var np=["portrait","landscape"];function TI(A){return np.includes(A)}var HI;(function(A){A.fontSize="fontSize",A.lineHeight="lineHeight"})(HI||(HI={}));var oA;(function(A){A.rem="rem",A.em="em",A.px="px",A.percent="%",A.vw="vw",A.vh="vh",A.none="<no-css-unit>"})(oA||(oA={}));function cs(A){return typeof A=="string"}function fs(A){return typeof A=="object"}var Bs;function D(A){return{kind:"complete",style:A}}function TA(A,e={}){let{fractions:t}=e;if(t&&A.includes("/")){let[i="",o=""]=A.split("/",2),s=TA(i),a=TA(o);return!s||!a?null:[s[0]/a[0],a[1]]}let r=parseFloat(A);if(Number.isNaN(r))return null;let n=A.match(/(([a-z]{2,}|%))$/);if(!n)return[r,oA.none];switch(n==null?void 0:n[1]){case"rem":return[r,oA.rem];case"px":return[r,oA.px];case"em":return[r,oA.em];case"%":return[r,oA.percent];case"vw":return[r,oA.vw];case"vh":return[r,oA.vh];default:return null}}function qe(A,e,t={}){let r=Le(e,t);return r===null?null:D({[A]:r})}function On(A,e,t){let r=Le(e);return r!==null&&(t[A]=r),t}function _I(A,e){let t=Le(e);return t===null?null:{[A]:t}}function Le(A,e={}){if(A===void 0)return null;let t=TA(String(A),e);return t?tt(...t,e):null}function tt(A,e,t={}){let{isNegative:r,device:n}=t;switch(e){case oA.rem:return A*16*(r?-1:1);case oA.px:return A*(r?-1:1);case oA.percent:return`${r?"-":""}${A}%`;case oA.none:return A*(r?-1:1);case oA.vw:return n!=null&&n.windowDimensions?n.windowDimensions.width*(A/100):(te("`vw` CSS unit requires configuration with `useDeviceContext()`"),null);case oA.vh:return n!=null&&n.windowDimensions?n.windowDimensions.height*(A/100):(te("`vh` CSS unit requires configuration with `useDeviceContext()`"),null);default:return null}}function Es(A){let e=TA(A);if(!e)return null;let[t,r]=e;switch(r){case oA.rem:return t*16;case oA.px:return t;default:return null}}var ip={t:"Top",tr:"TopRight",tl:"TopLeft",b:"Bottom",br:"BottomRight",bl:"BottomLeft",l:"Left",r:"Right",x:"Horizontal",y:"Vertical"};function Qs(A){return ip[A??""]||"All"}function Cs(A){let e="All";return[A.replace(/^-(t|b|r|l|tr|tl|br|bl)(-|$)/,(r,n)=>(e=Qs(n),"")),e]}function Qt(A,e={}){if(A.includes("/")){let t=PI(A,{...e,fractions:!0});if(t)return t}return A[0]==="["&&(A=A.slice(1,-1)),PI(A,e)}function de(A,e,t={}){let r=Qt(e,t);return r===null?null:D({[A]:r})}function PI(A,e={}){if(A==="px")return 1;let t=TA(A,e);if(!t)return null;let[r,n]=t;return e.fractions&&(n=oA.percent,r*=100),n===oA.none&&(r=r/4,n=oA.rem),tt(r,n,e)}function op(...A){console.warn(...A)}function sp(...A){}var te=typeof process>"u"||((Bs=process==null?void 0:process.env)===null||Bs===void 0?void 0:Bs.JEST_WORKER_ID)===void 0?op:sp;var ap=[["aspect-square",D({aspectRatio:1})],["aspect-video",D({aspectRatio:16/9})],["items-center",D({alignItems:"center"})],["items-start",D({alignItems:"flex-start"})],["items-end",D({alignItems:"flex-end"})],["items-baseline",D({alignItems:"baseline"})],["items-stretch",D({alignItems:"stretch"})],["justify-start",D({justifyContent:"flex-start"})],["justify-end",D({justifyContent:"flex-end"})],["justify-center",D({justifyContent:"center"})],["justify-between",D({justifyContent:"space-between"})],["justify-around",D({justifyContent:"space-around"})],["justify-evenly",D({justifyContent:"space-evenly"})],["content-start",D({alignContent:"flex-start"})],["content-end",D({alignContent:"flex-end"})],["content-between",D({alignContent:"space-between"})],["content-around",D({alignContent:"space-around"})],["content-stretch",D({alignContent:"stretch"})],["content-center",D({alignContent:"center"})],["self-auto",D({alignSelf:"auto"})],["self-start",D({alignSelf:"flex-start"})],["self-end",D({alignSelf:"flex-end"})],["self-center",D({alignSelf:"center"})],["self-stretch",D({alignSelf:"stretch"})],["self-baseline",D({alignSelf:"baseline"})],["direction-inherit",D({direction:"inherit"})],["direction-ltr",D({direction:"ltr"})],["direction-rtl",D({direction:"rtl"})],["hidden",D({display:"none"})],["flex",D({display:"flex"})],["flex-row",D({flexDirection:"row"})],["flex-row-reverse",D({flexDirection:"row-reverse"})],["flex-col",D({flexDirection:"column"})],["flex-col-reverse",D({flexDirection:"column-reverse"})],["flex-wrap",D({flexWrap:"wrap"})],["flex-wrap-reverse",D({flexWrap:"wrap-reverse"})],["flex-nowrap",D({flexWrap:"nowrap"})],["flex-auto",D({flexGrow:1,flexShrink:1,flexBasis:"auto"})],["flex-initial",D({flexGrow:0,flexShrink:1,flexBasis:"auto"})],["flex-none",D({flexGrow:0,flexShrink:0,flexBasis:"auto"})],["overflow-hidden",D({overflow:"hidden"})],["overflow-visible",D({overflow:"visible"})],["overflow-scroll",D({overflow:"scroll"})],["absolute",D({position:"absolute"})],["relative",D({position:"relative"})],["italic",D({fontStyle:"italic"})],["not-italic",D({fontStyle:"normal"})],["oldstyle-nums",Gr("oldstyle-nums")],["small-caps",Gr("small-caps")],["lining-nums",Gr("lining-nums")],["tabular-nums",Gr("tabular-nums")],["proportional-nums",Gr("proportional-nums")],["font-thin",D({fontWeight:"100"})],["font-100",D({fontWeight:"100"})],["font-extralight",D({fontWeight:"200"})],["font-200",D({fontWeight:"200"})],["font-light",D({fontWeight:"300"})],["font-300",D({fontWeight:"300"})],["font-normal",D({fontWeight:"normal"})],["font-400",D({fontWeight:"400"})],["font-medium",D({fontWeight:"500"})],["font-500",D({fontWeight:"500"})],["font-semibold",D({fontWeight:"600"})],["font-600",D({fontWeight:"600"})],["font-bold",D({fontWeight:"bold"})],["font-700",D({fontWeight:"700"})],["font-extrabold",D({fontWeight:"800"})],["font-800",D({fontWeight:"800"})],["font-black",D({fontWeight:"900"})],["font-900",D({fontWeight:"900"})],["include-font-padding",D({includeFontPadding:!0})],["remove-font-padding",D({includeFontPadding:!1})],["max-w-none",D({maxWidth:"99999%"})],["text-left",D({textAlign:"left"})],["text-center",D({textAlign:"center"})],["text-right",D({textAlign:"right"})],["text-justify",D({textAlign:"justify"})],["text-auto",D({textAlign:"auto"})],["underline",D({textDecorationLine:"underline"})],["line-through",D({textDecorationLine:"line-through"})],["no-underline",D({textDecorationLine:"none"})],["uppercase",D({textTransform:"uppercase"})],["lowercase",D({textTransform:"lowercase"})],["capitalize",D({textTransform:"capitalize"})],["normal-case",D({textTransform:"none"})],["w-auto",D({width:"auto"})],["h-auto",D({height:"auto"})],["shadow-sm",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.025,elevation:1})],["shadow",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.075,elevation:2})],["shadow-md",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:3,shadowOpacity:.125,elevation:3})],["shadow-lg",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.15,shadowRadius:8,elevation:8})],["shadow-xl",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.19,shadowRadius:20,elevation:12})],["shadow-2xl",D({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.25,shadowRadius:30,elevation:16})],["shadow-none",D({shadowOffset:{width:0,height:0},shadowColor:"#000",shadowRadius:0,shadowOpacity:0,elevation:0})]],ds=ap;function Gr(A){return{kind:"dependent",complete(e){(!e.fontVariant||!Array.isArray(e.fontVariant))&&(e.fontVariant=[]),e.fontVariant.push(A)}}}var Ur=class{constructor(e){this.ir=new Map(ds),this.styles=new Map,this.prefixes=new Map,this.ir=new Map([...ds,...e??[]])}getStyle(e){return this.styles.get(e)}setStyle(e,t){this.styles.set(e,t)}getIr(e){return this.ir.get(e)}setIr(e,t){this.ir.set(e,t)}getPrefixMatch(e){return this.prefixes.get(e)}setPrefixMatch(e,t){this.prefixes.set(e,t)}};function ps(A,e,t={}){let r=e==null?void 0:e[A];if(!r)return de("fontSize",A,t);if(typeof r=="string")return qe("fontSize",r);let n={},[i,o]=r,s=_I("fontSize",i);if(s&&(n=s),typeof o=="string")return D(On("lineHeight",JI(o,n),n));let{lineHeight:a,letterSpacing:g}=o;return a&&On("lineHeight",JI(a,n),n),g&&On("letterSpacing",g,n),D(n)}function JI(A,e){let t=TA(A);if(t){let[r,n]=t;if((n===oA.none||n===oA.em)&&typeof e.fontSize=="number")return e.fontSize*r}return A}function hs(A,e){var t;let r=(t=e==null?void 0:e[A])!==null&&t!==void 0?t:A.startsWith("[")?A.slice(1,-1):A,n=TA(r);if(!n)return null;let[i,o]=n;if(o===oA.none)return{kind:"dependent",complete(a){if(typeof a.fontSize!="number")return"relative line-height utilities require that font-size be set";a.lineHeight=a.fontSize*i}};let s=tt(i,o);return s!==null?D({lineHeight:s}):null}function ms(A,e,t,r,n){let i="";if(r[0]==="[")i=r.slice(1,-1);else{let g=n==null?void 0:n[r];if(g)i=g;else{let u=Qt(r);return u&&typeof u=="number"?WI(u,oA.px,e,A):null}}if(i==="auto")return KI(e,A,"auto");let o=TA(i);if(!o)return null;let[s,a]=o;return t&&(s=-s),WI(s,a,e,A)}function WI(A,e,t,r){let n=tt(A,e);return n===null?null:KI(t,r,n)}function KI(A,e,t){switch(A){case"All":return{kind:"complete",style:{[`${e}Top`]:t,[`${e}Right`]:t,[`${e}Bottom`]:t,[`${e}Left`]:t}};case"Bottom":case"Top":case"Left":case"Right":return{kind:"complete",style:{[`${e}${A}`]:t}};case"Vertical":return{kind:"complete",style:{[`${e}Top`]:t,[`${e}Bottom`]:t}};case"Horizontal":return{kind:"complete",style:{[`${e}Left`]:t,[`${e}Right`]:t}};default:return null}}function ys(A){if(!A)return{};let e=Object.entries(A).reduce((n,[i,o])=>{let s=[0,1/0,0],a=typeof o=="string"?{min:o}:o,g=a.min?Es(a.min):0;g===null?te(`invalid screen config value: ${i}->min: ${a.min}`):s[0]=g;let u=a.max?Es(a.max):1/0;return u===null?te(`invalid screen config value: ${i}->max: ${a.max}`):s[1]=u,n[i]=s,n},{}),t=Object.values(e);t.sort((n,i)=>{let[o,s]=n,[a,g]=i;return s===1/0||g===1/0?o-a:s-g});let r=0;return t.forEach(n=>n[2]=r++),e}function ws(A,e){let t=e==null?void 0:e[A];if(!t)return null;if(typeof t=="string")return D({fontFamily:t});let r=t[0];return r?D({fontFamily:r}):null}function Ct(A,e,t){if(!t)return null;let r;e.includes("/")&&([e="",r]=e.split("/",2));let n="";if(e.startsWith("[#")||e.startsWith("[rgb")?n=e.slice(1,-1):n=XI(e,t),!n)return null;if(r){let i=Number(r);if(!Number.isNaN(i))return n=YI(n,i/100),D({[Tn[A].color]:n})}return{kind:"dependent",complete(i){let o=Tn[A].opacity,s=i[o];typeof s=="number"&&(n=YI(n,s)),i[Tn[A].color]=n}}}function Hr(A,e){let t=parseInt(e,10);if(Number.isNaN(t))return null;let r=t/100;return{kind:"complete",style:{[Tn[A].opacity]:r}}}function YI(A,e){return A.startsWith("#")?A=gp(A):A.startsWith("rgb(")&&(A=A.replace(/^rgb\(/,"rgba(").replace(/\)$/,", 1)")),A.replace(/, ?\d*\.?(\d+)\)$/,`, ${e})`)}function qI(A){for(let e in A)e.startsWith("__opacity_")&&delete A[e]}var Tn={bg:{opacity:"__opacity_bg",color:"backgroundColor"},text:{opacity:"__opacity_text",color:"color"},border:{opacity:"__opacity_border",color:"borderColor"},borderTop:{opacity:"__opacity_border",color:"borderTopColor"},borderBottom:{opacity:"__opacity_border",color:"borderBottomColor"},borderLeft:{opacity:"__opacity_border",color:"borderLeftColor"},borderRight:{opacity:"__opacity_border",color:"borderRightColor"},shadow:{opacity:"__opacity_shadow",color:"shadowColor"},tint:{opacity:"__opacity_tint",color:"tintColor"}};function gp(A){let e=A;A=A.replace(up,(o,s,a,g)=>s+s+a+a+g+g);let t=Ip.exec(A);if(!t)return te(`invalid config hex color value: ${e}`),"rgba(0, 0, 0, 1)";let r=parseInt(t[1],16),n=parseInt(t[2],16),i=parseInt(t[3],16);return`rgba(${r}, ${n}, ${i}, 1)`}function XI(A,e){let t=e[A];if(cs(t))return t;if(fs(t)&&cs(t.DEFAULT))return t.DEFAULT;let[r="",...n]=A.split("-");for(;r!==A;){let i=e[r];if(fs(i))return XI(n.join("-"),i);if(n.length===0)return"";r=`${r}-${n.shift()}`}return""}var up=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Ip=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function zI(A,e){let[t,r]=Cs(A);if(t.match(/^(-?(\d)+)?$/))return lp(t,r,e==null?void 0:e.borderWidth);if(t=t.replace(/^-/,""),["dashed","solid","dotted"].includes(t))return D({borderStyle:t});let i="border";switch(r){case"Bottom":i="borderBottom";break;case"Top":i="borderTop";break;case"Left":i="borderLeft";break;case"Right":i="borderRight";break}let o=Ct(i,t,e==null?void 0:e.borderColor);if(o)return o;let s=`border${r==="All"?"":r}Width`;t=t.replace(/^-/,"");let a=t.slice(1,-1),g=de(s,a);return typeof(g==null?void 0:g.style[s])!="number"?null:g}function lp(A,e,t){if(!t)return null;A=A.replace(/^-/,"");let n=t[A===""?"DEFAULT":A];if(n===void 0)return null;let i=`border${e==="All"?"":e}Width`;return qe(i,n)}function ZI(A,e){if(!e)return null;let[t,r]=Cs(A);t=t.replace(/^-/,""),t===""&&(t="DEFAULT");let n=`border${r==="All"?"":r}Radius`,i=e[t];if(i)return VI(qe(n,i));let o=de(n,t);return typeof(o==null?void 0:o.style[n])!="number"?null:VI(o)}function VI(A){if((A==null?void 0:A.kind)!=="complete")return A;let e=A.style.borderTopRadius;e!==void 0&&(A.style.borderTopLeftRadius=e,A.style.borderTopRightRadius=e,delete A.style.borderTopRadius);let t=A.style.borderBottomRadius;t!==void 0&&(A.style.borderBottomLeftRadius=t,A.style.borderBottomRightRadius=t,delete A.style.borderBottomRadius);let r=A.style.borderLeftRadius;r!==void 0&&(A.style.borderBottomLeftRadius=r,A.style.borderTopLeftRadius=r,delete A.style.borderLeftRadius);let n=A.style.borderRightRadius;return n!==void 0&&(A.style.borderBottomRightRadius=n,A.style.borderTopRightRadius=n,delete A.style.borderRightRadius),A}function Ut(A,e,t,r){let n=null;A==="inset"&&(e=e.replace(/^(x|y)-/,(s,a)=>(n=a==="x"?"x":"y","")));let i=r==null?void 0:r[e];if(i){let s=Le(i,{isNegative:t});if(s!==null)return jI(A,n,s)}let o=Qt(e,{isNegative:t});return o!==null?jI(A,n,o):null}function jI(A,e,t){if(A!=="inset")return D({[A]:t});switch(e){case null:return D({top:t,left:t,right:t,bottom:t});case"y":return D({top:t,bottom:t});case"x":return D({left:t,right:t})}}function Or(A,e,t){var r;e=e.replace(/^-/,"");let n=e===""?"DEFAULT":e,i=Number((r=t==null?void 0:t[n])!==null&&r!==void 0?r:e);return Number.isNaN(i)?null:D({[`flex${A}`]:i})}function $I(A,e){var t,r;if(A=(e==null?void 0:e[A])||A,["min-content","revert","unset"].includes(A))return null;if(A.match(/^\d+(\.\d+)?$/))return D({flexGrow:Number(A),flexBasis:"0%"});let n=A.match(/^(\d+)\s+(\d+)$/);if(n)return D({flexGrow:Number(n[1]),flexShrink:Number(n[2])});if(n=A.match(/^(\d+)\s+([^ ]+)$/),n){let i=Le((t=n[2])!==null&&t!==void 0?t:"");return i?D({flexGrow:Number(n[1]),flexBasis:i}):null}if(n=A.match(/^(\d+)\s+(\d+)\s+(.+)$/),n){let i=Le((r=n[3])!==null&&r!==void 0?r:"");return i?D({flexGrow:Number(n[1]),flexShrink:Number(n[2]),flexBasis:i}):null}return null}function Ds(A,e,t={},r){let n=r==null?void 0:r[e];return n!==void 0?qe(A,n,t):de(A,e,t)}function Tr(A,e,t={},r){let n=Le(r==null?void 0:r[e],t);return n?D({[A]:n}):(e==="screen"&&(e=A.includes("Width")?"100vw":"100vh"),de(A,e,t))}function Al(A,e,t){let r=t==null?void 0:t[A];if(r){let n=TA(r,{isNegative:e});if(!n)return null;let[i,o]=n;if(o===oA.em)return cp(i);if(o===oA.percent)return te("percentage-based letter-spacing configuration currently unsupported, switch to `em`s, or open an issue if you'd like to see support added."),null;let s=tt(i,o,{isNegative:e});return s!==null?D({letterSpacing:s}):null}return de("letterSpacing",A,{isNegative:e})}function cp(A){return{kind:"dependent",complete(e){let t=e.fontSize;if(typeof t!="number"||Number.isNaN(t))return"tracking-X relative letter spacing classes require font-size to be set";e.letterSpacing=Math.round((A*t+Number.EPSILON)*100)/100}}}function el(A,e){let t=e==null?void 0:e[A];if(t){let n=TA(String(t));if(n)return D({opacity:n[0]})}let r=TA(A);return r?D({opacity:r[0]/100}):null}function tl(A){let e=parseInt(A,10);return Number.isNaN(e)?null:{kind:"complete",style:{shadowOpacity:e/100}}}function rl(A){if(A.includes("/")){let[t="",r=""]=A.split("/",2),n=bs(t),i=bs(r);return n===null||i===null?null:{kind:"complete",style:{shadowOffset:{width:n,height:i}}}}let e=bs(A);return e===null?null:{kind:"complete",style:{shadowOffset:{width:e,height:e}}}}function bs(A){let e=Qt(A);return typeof e=="number"?e:null}var Ht=class{constructor(e,t={},r,n,i){var o,s,a,g,u,I;this.config=t,this.cache=r,this.position=0,this.isNull=!1,this.isNegative=!1,this.context={},this.context.device=n;let B=e.trim().split(":"),f=[];B.length===1?this.string=e:(this.string=(o=B.pop())!==null&&o!==void 0?o:"",f=B),this.char=this.string[0];let E=ys((s=this.config.theme)===null||s===void 0?void 0:s.screens);for(let C of f)if(E[C]){let p=(a=E[C])===null||a===void 0?void 0:a[2];p!==void 0&&(this.order=((g=this.order)!==null&&g!==void 0?g:0)+p);let y=(u=n.windowDimensions)===null||u===void 0?void 0:u.width;if(y){let[w,S]=(I=E[C])!==null&&I!==void 0?I:[0,0];(y<=w||y>S)&&(this.isNull=!0)}else this.isNull=!0}else OI(C)?this.isNull=C!==i:TI(C)?n.windowDimensions?(n.windowDimensions.width>n.windowDimensions.height?"landscape":"portrait")!==C?this.isNull=!0:this.incrementOrder():this.isNull=!0:C==="retina"?n.pixelDensity===2?this.incrementOrder():this.isNull=!0:C==="dark"?n.colorScheme!=="dark"?this.isNull=!0:this.incrementOrder():this.handlePossibleArbitraryBreakpointPrefix(C)||(this.isNull=!0)}parse(){if(this.isNull)return{kind:"null"};let e=this.cache.getIr(this.rest);if(e)return e;this.parseIsNegative();let t=this.parseUtility();return t?this.order!==void 0?{kind:"ordered",order:this.order,styleIr:t}:t:{kind:"null"}}parseUtility(){var e,t,r,n,i;let o=this.config.theme,s=null;switch(this.char){case"m":case"p":{let a=this.peekSlice(1,3).match(/^(t|b|r|l|x|y)?-/);if(a){let g=this.char==="m"?"margin":"padding";this.advance(((t=(e=a[0])===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+1);let u=Qs(a[1]),I=ms(g,u,this.isNegative,this.rest,(r=this.config.theme)===null||r===void 0?void 0:r[g]);if(I)return I}}}if(this.consumePeeked("h-")&&(s=Ds("height",this.rest,this.context,o==null?void 0:o.height),s)||this.consumePeeked("w-")&&(s=Ds("width",this.rest,this.context,o==null?void 0:o.width),s)||this.consumePeeked("min-w-")&&(s=Tr("minWidth",this.rest,this.context,o==null?void 0:o.minWidth),s)||this.consumePeeked("min-h-")&&(s=Tr("minHeight",this.rest,this.context,o==null?void 0:o.minHeight),s)||this.consumePeeked("max-w-")&&(s=Tr("maxWidth",this.rest,this.context,o==null?void 0:o.maxWidth),s)||this.consumePeeked("max-h-")&&(s=Tr("maxHeight",this.rest,this.context,o==null?void 0:o.maxHeight),s)||this.consumePeeked("leading-")&&(s=hs(this.rest,o==null?void 0:o.lineHeight),s)||this.consumePeeked("text-")&&(s=ps(this.rest,o==null?void 0:o.fontSize,this.context),s||(s=Ct("text",this.rest,o==null?void 0:o.textColor),s)||this.consumePeeked("opacity-")&&(s=Hr("text",this.rest),s))||this.consumePeeked("font-")&&(s=ws(this.rest,o==null?void 0:o.fontFamily),s)||this.consumePeeked("aspect-")&&(this.consumePeeked("ratio-")&&te("`aspect-ratio-{ratio}` is deprecated, use `aspect-{ratio}` instead"),s=qe("aspectRatio",this.rest,{fractions:!0}),s)||this.consumePeeked("tint-")&&(s=Ct("tint",this.rest,o==null?void 0:o.colors),s)||this.consumePeeked("bg-")&&(s=Ct("bg",this.rest,o==null?void 0:o.backgroundColor),s||this.consumePeeked("opacity-")&&(s=Hr("bg",this.rest),s))||this.consumePeeked("border")&&(s=zI(this.rest,o),s||this.consumePeeked("-opacity-")&&(s=Hr("border",this.rest),s))||this.consumePeeked("rounded")&&(s=ZI(this.rest,o==null?void 0:o.borderRadius),s)||this.consumePeeked("bottom-")&&(s=Ut("bottom",this.rest,this.isNegative,o==null?void 0:o.inset),s)||this.consumePeeked("top-")&&(s=Ut("top",this.rest,this.isNegative,o==null?void 0:o.inset),s)||this.consumePeeked("left-")&&(s=Ut("left",this.rest,this.isNegative,o==null?void 0:o.inset),s)||this.consumePeeked("right-")&&(s=Ut("right",this.rest,this.isNegative,o==null?void 0:o.inset),s)||this.consumePeeked("inset-")&&(s=Ut("inset",this.rest,this.isNegative,o==null?void 0:o.inset),s)||this.consumePeeked("flex-")&&(this.consumePeeked("grow")?s=Or("Grow",this.rest,o==null?void 0:o.flexGrow):this.consumePeeked("shrink")?s=Or("Shrink",this.rest,o==null?void 0:o.flexShrink):s=$I(this.rest,o==null?void 0:o.flex),s)||this.consumePeeked("grow")&&(s=Or("Grow",this.rest,o==null?void 0:o.flexGrow),s)||this.consumePeeked("shrink")&&(s=Or("Shrink",this.rest,o==null?void 0:o.flexShrink),s)||this.consumePeeked("shadow-color-opacity-")&&(s=Hr("shadow",this.rest),s)||this.consumePeeked("shadow-opacity-")&&(s=tl(this.rest),s)||this.consumePeeked("shadow-offset-")&&(s=rl(this.rest),s)||this.consumePeeked("shadow-radius-")&&(s=de("shadowRadius",this.rest),s)||this.consumePeeked("shadow-")&&(s=Ct("shadow",this.rest,o==null?void 0:o.colors),s))return s;if(this.consumePeeked("elevation-")){let a=parseInt(this.rest,10);if(!Number.isNaN(a))return D({elevation:a})}if(this.consumePeeked("opacity-")&&(s=el(this.rest,o==null?void 0:o.opacity),s)||this.consumePeeked("tracking-")&&(s=Al(this.rest,this.isNegative,o==null?void 0:o.letterSpacing),s))return s;if(this.consumePeeked("z-")){let a=Number((i=(n=o==null?void 0:o.zIndex)===null||n===void 0?void 0:n[this.rest])!==null&&i!==void 0?i:this.rest);if(!Number.isNaN(a))return D({zIndex:a})}return te(`\`${this.rest}\` unknown or invalid utility`),null}handlePossibleArbitraryBreakpointPrefix(e){var t;if(e[0]!=="m")return!1;let r=e.match(/^(min|max)-(w|h)-\[([^\]]+)\]$/);if(!r)return!1;if(!(!((t=this.context.device)===null||t===void 0)&&t.windowDimensions))return this.isNull=!0,!0;let n=this.context.device.windowDimensions,[,i="",o="",s=""]=r,a=o==="w"?n.width:n.height,g=TA(s,this.context);if(g===null)return this.isNull=!0,!0;let[u,I]=g;return I!=="px"&&(this.isNull=!0),(i==="min"?a>=u:a<=u)?this.incrementOrder():this.isNull=!0,!0}advance(e=1){this.position+=e,this.char=this.string[this.position]}get rest(){return this.peekSlice(0,this.string.length)}peekSlice(e,t){return this.string.slice(this.position+e,this.position+t)}consumePeeked(e){return this.peekSlice(0,e.length)===e?(this.advance(e.length),!0):!1}parseIsNegative(){this.char==="-"&&(this.advance(),this.isNegative=!0,this.context.isNegative=!0)}incrementOrder(){var e;this.order=((e=this.order)!==null&&e!==void 0?e:0)+1}};function nl(A){let e=[],t=null;return A.forEach(r=>{if(typeof r=="string")e=[...e,...Ss(r)];else if(Array.isArray(r))e=[...e,...r.flatMap(Ss)];else if(typeof r=="object"&&r!==null)for(let[n,i]of Object.entries(r))typeof i=="boolean"?e=[...e,...i?Ss(n):[]]:t?t[n]=i:t={[n]:i}}),[e.filter(Boolean).filter(fp),t]}function Ss(A){return A.trim().split(/\s+/)}function fp(A,e,t){return t.indexOf(A)===e}function il(A){var e;return(e=A==null?void 0:A.reduce((t,r)=>({...t,...Bp(r.handler)}),{}))!==null&&e!==void 0?e:{}}function Bp(A){let e={};return A({addUtilities:t=>{e=t},...Ep}),e}function Ge(A){throw new Error(`tailwindcss plugin function argument object prop "${A}" not implemented`)}var Ep={addComponents:Ge,addBase:Ge,addVariant:Ge,e:Ge,prefix:Ge,theme:Ge,variants:Ge,config:Ge,corePlugins:Ge,matchUtilities:Ge,postcss:null};function sl(A,e){let t=(0,ol.default)(Qp(A)),r={},n=il(t.plugins),i={},o=Object.entries(n).map(([E,C])=>typeof C=="string"?(i[E]=C,[E,{kind:"null"}]):[E,D(C)]).filter(([,E])=>E.kind!=="null");function s(){return[r.windowDimensions?`w${r.windowDimensions.width}`:!1,r.windowDimensions?`h${r.windowDimensions.height}`:!1,r.fontScale?`fs${r.fontScale}`:!1,r.colorScheme==="dark"?"dark":!1,r.pixelDensity===2?"retina":!1].filter(Boolean).join("--")||"default"}let a=s(),g={};function u(){let E=g[a];if(E)return E;let C=new Ur(o);return g[a]=C,C}function I(...E){let C=u(),p={},y=[],w=[],[S,x]=nl(E),b=S.join(" "),m=C.getStyle(b);if(m)return{...m,...x||{}};for(let R of S){let F=C.getIr(R);if(!F&&R in i){let Y=I(i[R]);C.setIr(R,D(Y)),p={...p,...Y};continue}switch(F=new Ht(R,t,C,r,e).parse(),F.kind){case"complete":p={...p,...F.style},C.setIr(R,F);break;case"dependent":y.push(F);break;case"ordered":w.push(F);break;case"null":C.setIr(R,F);break}}if(w.length>0){w.sort((R,F)=>R.order-F.order);for(let R of w)switch(R.styleIr.kind){case"complete":p={...p,...R.styleIr.style};break;case"dependent":y.push(R.styleIr);break}}if(y.length>0){for(let R of y){let F=R.complete(p);F&&te(F)}qI(p)}return b!==""&&C.setStyle(b,p),x&&(p={...p,...x}),p}function B(E){let C=I(E.split(/\s+/g).map(p=>p.replace(/^(bg|text|border)-/,"")).map(p=>`bg-${p}`).join(" "));return typeof C.backgroundColor=="string"?C.backgroundColor:void 0}let f=(E,...C)=>{let p="";return E.forEach((y,w)=>{var S;p+=y+((S=C[w])!==null&&S!==void 0?S:"")}),I(p)};return f.style=I,f.color=B,f.prefixMatch=(...E)=>{let C=E.sort().join(":"),p=u(),y=p.getPrefixMatch(C);if(y!==void 0)return y;let x=new Ht(`${C}:flex`,t,p,r,e).parse().kind!=="null";return p.setPrefixMatch(C,x),x},f.setWindowDimensions=E=>{r.windowDimensions=E,a=s()},f.setFontScale=E=>{r.fontScale=E,a=s()},f.setPixelDensity=E=>{r.pixelDensity=E,a=s()},f.setColorScheme=E=>{r.colorScheme=E,a=s()},f}function Qp(A){return{...A,content:["_no_warnings_please"]}}var dp={handler:({addUtilities:A})=>{A({"shadow-sm":{boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},shadow:{boxShadow:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-md":{boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},"shadow-lg":{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},"shadow-xl":{boxShadow:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},"shadow-2xl":{boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},"shadow-inner":{boxShadow:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},"shadow-none":{boxShadow:"0 0 #0000"}})}};function pp(A){return sl({...A,plugins:[...(A==null?void 0:A.plugins)??[],dp]},"web")}var Pn;function xs({width:A,height:e,config:t}){return Pn||(Pn=pp(t)),Pn.setWindowDimensions({width:+A,height:+e}),Pn}var ks=new WeakMap,al=new WeakMap,hp=0,mp=8,Pr=new Map;function yp(A){let e="";for(let t of A){let r=al.get(t.data);r===void 0&&(r=++hp,al.set(t.data,r)),e+=`${r}:${t.name}:${t.weight??""}:${t.style??""}:${t.lang??""};`}return e}function wp(A){if(ks.has(A))return ks.get(A);let e=yp(A),t=Pr.get(e);if(!t){if(t=new ir(A),Pr.size>=mp){let r=Pr.keys().next().value;r!==void 0&&Pr.delete(r)}Pr.set(e,t)}return ks.set(A,t),t}async function ul(A,e,t){let[r]=await Promise.all([ze(),yg()]);if(!r||!r.Node)throw new Error("Satori is not initialized: expect `yoga` to be loaded, got "+r);e.fonts=e.fonts||[];let n=wp(e.fonts),i="width"in e?e.width:void 0,o="height"in e?e.height:void 0,s=Dp(r,e.pointScaleFactor);i&&s.setWidth(i),o&&s.setHeight(o),s.setFlexDirection(r.FLEX_DIRECTION_ROW),s.setFlexWrap(r.WRAP_WRAP),s.setAlignContent(r.ALIGN_AUTO),s.setAlignItems(r.ALIGN_FLEX_START),s.setJustifyContent(r.JUSTIFY_FLEX_START),s.setOverflow(r.OVERFLOW_HIDDEN);let a=Object.assign(Object.create(null),e.graphemeImages),g=new Set;Fe.clear(),Vt.clear(),await ba(A);let u=rr(A,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:"normal",color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:i,_viewportHeight:o},parent:s,font:n,embedFont:e.embedFont,debug:e.debug,graphemeImages:a,canLoadAdditionalAssets:!!e.loadAdditionalAsset,onNodeDetected:e.onNodeDetected,replacedElements:t,getTwStyles:(C,p)=>{let w={...xs({width:i,height:o,config:e.tailwindConfig})([C])};return typeof w.lineHeight=="number"&&(w.lineHeight=w.lineHeight/(+w.fontSize||p.fontSize||16)),w.shadowColor&&w.boxShadow&&(w.boxShadow=w.boxShadow.replace(/rgba?\([^)]+\)/,w.shadowColor)),w}}),I=(await u.next()).value;if(e.loadAdditionalAsset&&I.length){let C=bp(I),p=[],y={};await Promise.all(Object.entries(C).flatMap(([w,S])=>S.map(x=>{let b=`${w}_${x}`;return g.has(b)?null:(g.add(b),e.loadAdditionalAsset(w,x).then(m=>{typeof m=="string"?y[x]=m:m&&(Array.isArray(m)?p.push(...m):p.push(m))}))}))),n.addFonts(p),Object.assign(a,y)}await u.next(),s.calculateLayout(i,o,r.DIRECTION_LTR);let B=(await u.next([0,0])).value,f=s.getComputedWidth(),E=s.getComputedHeight();return s.freeRecursive(),Ti({width:f,height:E,content:B})}function Dp(A,e){if(e){let t=A.Config.create();return t.setPointScaleFactor(e),A.Node.createWithConfig(t)}else return A.Node.create()}function bp(A){let e={},t={};for(let{word:r,locale:n}of A){let i=pg(r,n).join("|");t[i]=t[i]||"",t[i]+=r}return Object.keys(t).forEach(r=>{e[r]=e[r]||[],r==="emoji"?e[r].push(...gl(OA(t[r],"grapheme"))):(e[r][0]=e[r][0]||"",e[r][0]+=gl(OA(t[r],"grapheme",r==="unknown"?void 0:r)).join(""))}),e}function gl(A){return Array.from(new Set(A))}var Il=require("fflate"),Rs=[137,80,78,71,13,10,26,10],_n;function Sp(A,e,t){if(!_n){_n=new Int32Array(256);for(let n=0;n<256;n++){let i=n;for(let o=0;o<8;o++)i=i&1?3988292384^i>>>1:i>>>1;_n[n]=i}}let r=-1;for(let n=e;n<t;n++)r=_n[(r^A[n])&255]^r>>>8;return(r^-1)>>>0}function vs(A,e,t,r,n){e.setUint32(t,n.length);for(let o=0;o<4;o++)A[t+4+o]=r.charCodeAt(o);A.set(n,t+8);let i=t+8+n.length;return e.setUint32(i,Sp(A,t+4,i)),i+4}function ll(A,e,t){let r=e*4,n=new Uint8Array((r+1)*t);for(let I=0;I<t;I++){let B=I*r,f=I*(r+1)+1;n[f-1]=1;for(let E=0;E<4;E++)n[f+E]=A[B+E];for(let E=4;E<r;E++)n[f+E]=A[B+E]-A[B+E-4]}let i=new Uint8Array(13),o=new DataView(i.buffer);o.setUint32(0,e),o.setUint32(4,t),i[8]=8,i[9]=6;let s=(0,Il.zlibSync)(n,{level:1}),a=new Uint8Array(Rs.length+12+i.length+12+s.length+12),g=new DataView(a.buffer);a.set(Rs);let u=Rs.length;return u=vs(a,g,u,"IHDR",i),u=vs(a,g,u,"IDAT",s),vs(a,g,u,"IEND",new Uint8Array(0)),a}var cl,fl="Rendering `<canvas webgl={...}>` needs a WebGL2 context. Satori uses OffscreenCanvas in browsers and Web Workers, and the `gl` package (a WebGL2 build of headless-gl, such as github:encharm/headless-gl) in Node.js 20.16+. Install it in your project, or pass the `createWebGLContext` option.";function xp(){var r,n;let A=(n=(r=globalThis.process)==null?void 0:r.getBuiltinModule)==null?void 0:n.call(r,"module");if(!A)throw new Error(fl);let e=A.createRequire(process.cwd()+"/"),t;try{t=e.resolve("gl")}catch{throw new Error(fl)}return e(t)}function kp(A,e){if(typeof OffscreenCanvas<"u"){let n=new OffscreenCanvas(A,e).getContext("webgl2",{preserveDrawingBuffer:!0});if(!n)throw new Error("Failed to create a WebGL2 context.");return[n,()=>{var i;return(i=n.getExtension("WEBGL_lose_context"))==null?void 0:i.loseContext()}]}cl??=xp();let t=cl(A,e,{createWebGL2Context:!0,useSwiftShader:!0});if(!t)throw new Error("Failed to create a WebGL2 context.");let r=()=>{var n;return(n=t.getExtension("STACKGL_destroy_context"))==null?void 0:n.destroy()};if(!/WebGL 2|OpenGL ES 3/.test(t.getParameter(t.VERSION)))throw r(),new Error("The installed `gl` package only supports WebGL1. Install a WebGL2 build of headless-gl, such as github:encharm/headless-gl, or pass the `createWebGLContext` option.");return[t,r]}async function Bl(A,e,t){let[r,n]=kp(A,e);try{return await t(r)}finally{n()}}var Rp=300,vp=150;function El(A,e){let t=typeof A=="number"?Math.floor(A):typeof A=="string"?parseInt(A,10):NaN;return t>=0?t:e}function Ql(A){return async(e,t,r)=>{let n=El(r.width,Rp),i=El(r.height,vp);if(!n||!i){t.width===void 0&&(t.width=n),t.height===void 0&&(t.height=i);return}let o=t.width===void 0&&t.height===void 0;ci(e,t,n,i,o?n:void 0,o?i:void 0),typeof r.webgl=="function"&&t.display!=="none"&&(t.__src=await Fp(r.webgl,n,i,A))}}async function Fp(A,e,t,r){let n=async o=>(o.bindFramebuffer(o.FRAMEBUFFER,null),o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.disable(o.SCISSOR_TEST),o.colorMask(!0,!0,!0,!0),o.depthMask(!0),o.stencilMask(4294967295),o.clearColor(0,0,0,0),o.clearDepth(1),o.clearStencil(0),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT|o.STENCIL_BUFFER_BIT),await A(o,{width:e,height:t}),Np(o));if(!r)return Bl(e,t,n);let i=await r(e,t);if(!i)throw new Error(`Failed to create a ${e}x${t} WebGL context for <canvas>: \`createWebGLContext\` returned ${i}.`);return n(i)}function Np(A){A.bindFramebuffer(A.FRAMEBUFFER,null),typeof A.PIXEL_PACK_BUFFER=="number"&&A.bindBuffer(A.PIXEL_PACK_BUFFER,null);let e=A.drawingBufferWidth,t=A.drawingBufferHeight,r=e*4,n=new Uint8Array(r*t);A.readPixels(0,0,e,t,A.RGBA,A.UNSIGNED_BYTE,n);let i=new Uint8Array(n.length);for(let s=0;s<t;s++){let a=(t-1-s)*r;i.set(n.subarray(a,a+r),s*r)}let o=A.getContextAttributes();if((o==null?void 0:o.alpha)===!1)for(let s=3;s<i.length;s+=4)i[s]=255;else if((o==null?void 0:o.premultipliedAlpha)!==!1)for(let s=0;s<i.length;s+=4){let a=i[s+3];a!==0&&a!==255&&(i[s]=Math.min(255,Math.round(i[s]*255/a)),i[s+1]=Math.min(255,Math.round(i[s+1]*255/a)),i[s+2]=Math.min(255,Math.round(i[s+2]*255/a)))}return`data:image/png;base64,${si(ll(i,e,t))}`}function Cl(A,e){return ul(A,e,{canvas:Ql(e.createWebGLContext)})}0&&(module.exports={init});
|
|
8
8
|
//# sourceMappingURL=experimental.cjs.map
|