@workflow/web 4.0.1-beta.20 → 4.0.1-beta.21
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +17 -17
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +32 -17
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/page/server-reference-manifest.json +32 -17
- package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js.map +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js.map +1 -1
- package/.next/server/chunks/ssr/_bff7cae2._.js +9 -0
- package/.next/server/chunks/ssr/_bff7cae2._.js.map +1 -0
- package/.next/server/chunks/ssr/_c8bf1458._.js +9 -0
- package/.next/server/chunks/ssr/_c8bf1458._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js → node_modules__pnpm_1053b681._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js.map +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +5 -1
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js +6 -6
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js +1 -1
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js.map +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +40 -18
- package/.next/static/chunks/080d73f6a8a7055f.js +1 -0
- package/.next/static/chunks/0bf0e3b66b375058.js +2 -0
- package/.next/static/chunks/1633a4677cb7eacd.js +7 -0
- package/.next/static/chunks/19288057adbbaf16.css +2 -0
- package/.next/static/chunks/7993564ea9cd3862.js +60 -0
- package/.next/static/chunks/826c531268249b18.js +1 -0
- package/.next/static/chunks/915c48af605695f8.js +5 -0
- package/.next/static/chunks/a2fdd31ef7d1ed50.js +154 -0
- package/.next/static/chunks/b39dd1bd2af229c0.css +3 -0
- package/.next/static/chunks/{f860cef1a19defc2.js → c41b2f1bfdc5f91e.js} +1 -1
- package/.next/static/chunks/d3781b000675e89a.js +7 -0
- package/.next/static/chunks/ebaf4c277606b4fc.js +14 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +4 -4
- package/.next/server/chunks/ssr/_5587a26a._.js +0 -3
- package/.next/server/chunks/ssr/_5587a26a._.js.map +0 -1
- package/.next/server/chunks/ssr/_905b4948._.js +0 -3
- package/.next/server/chunks/ssr/_905b4948._.js.map +0 -1
- package/.next/static/chunks/0ba5474f4ed4a8c8.js +0 -154
- package/.next/static/chunks/3cf543bacb44cfb5.js +0 -1
- package/.next/static/chunks/65a1beec565c5452.js +0 -1
- package/.next/static/chunks/74dc45834647aebe.css +0 -3
- package/.next/static/chunks/a6a14ee8e38e3e97.js +0 -14
- package/.next/static/chunks/e1532e8c78b14240.js +0 -1
- package/.next/static/chunks/e834043d5d00c377.js +0 -60
- package/.next/static/chunks/ed676821fd9c42fe.js +0 -1
- package/.next/static/chunks/f00878722fec5692.js +0 -2
- /package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js.map → node_modules__pnpm_1053b681._.js.map} +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_buildManifest.js +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_ssgManifest.js +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51379,e=>{"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var r=t(),n={exec:()=>null};function s(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(l.caret,"$1"),r=r.replace(e,s),n},getRegex:()=>new RegExp(r,t)};return n}var l={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,i=/(?:[*+-]|\d{1,9}[.)])/,o=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c=s(o).replace(/bull/g,i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),u=s(o).replace(/bull/g,i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,p=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,h=s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",p).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),f=s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,i).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x=s("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k=s(d).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),b={blockquote:s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:h,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:x,lheading:c,list:f,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:k,table:n,text:/^[^\n]+/},v=s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),y={...b,lheading:u,table:v,paragraph:s(d).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()},w={...b,html:s(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:s(d).replace("hr",a).replace("heading",` *#{1,6} *[^
|
|
2
|
-
]`).replace("lheading",c).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},S=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,j=/[\s\p{P}\p{S}]/u,R=/[^\s\p{P}\p{S}]/u,T=s(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,j).getRegex(),N=/(?!~)[\p{P}\p{S}]/u,E=s(/link|code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code",/(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$=s(L,"u").replace(/punct/g,C).getRegex(),P=s(L,"u").replace(/punct/g,N).getRegex(),A="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I=s(A,"gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),z=s(A,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,N).getRegex(),M=s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),H=s(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),_=s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D=s(m).replace("(?:-->|$)","-->").getRegex(),q=s("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,V=s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=s(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",p).getRegex(),F=s(/^!?\[(ref)\](?:\[\])?/).replace("ref",p).getRegex(),U=s("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",F).getRegex(),Z=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W={_backpedal:n,anyPunctuation:H,autolink:_,blockSkip:E,br:S,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:$,emStrongRDelimAst:I,emStrongRDelimUnd:M,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:F,punctuation:T,reflink:O,reflinkSearch:U,tag:q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},K={...W,link:s(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()},Q={...W,emStrongRDelimAst:z,emStrongLDelim:P,url:s(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Z).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:s(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Z).getRegex()},G={...Q,br:s(S).replace("{2,}","*").getRegex(),text:s(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},X={normal:b,gfm:y,pedantic:w},Y={normal:W,gfm:Q,breaks:G,pedantic:K},J={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=e=>J[e];function et(e,t){if(t){if(l.escapeTest.test(e))return e.replace(l.escapeReplace,ee)}else if(l.escapeTestNoEncode.test(e))return e.replace(l.escapeReplaceNoEncode,ee);return e}function er(e){try{e=encodeURI(e).replace(l.percentDecode,"%")}catch{return null}return e}function en(e,t){let r=e.replace(l.findPipe,(e,t,r)=>{let n=!1,s=t;for(;--s>=0&&"\\"===r[s];)n=!n;return n?"|":" |"}).split(l.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(l.slashPipe,"|");return r}function es(e,t,r){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let l=e.charAt(n-s-1);if(l!==t||r)if(l!==t&&r)s++;else break;else s++}return e.slice(0,n-s)}function el(e,t,r,n,s){let l=t.href,a=t.title||null,i=e[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let o={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:l,title:a,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,o}var ea=class{options;rules;lexer;constructor(e){this.options=e||r}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:es(e,`
|
|
3
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let s=n[1];return t.split(`
|
|
4
|
-
`).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=s.length?e.slice(s.length):e}).join(`
|
|
5
|
-
`)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=es(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:es(t[0],`
|
|
6
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=es(t[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),r="",n="",s=[];for(;e.length>0;){let t=!1,l=[],a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))l.push(e[a]),t=!0;else if(t)break;else l.push(e[a]);e=e.slice(a);let i=l.join(`
|
|
9
|
-
`),o=i.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
11
|
-
${i}`:i,n=n?`${n}
|
|
12
|
-
${o}`:o;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,s,!0),this.lexer.state.top=c,0===e.length)break;let u=s.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let t=u.raw+`
|
|
13
|
-
`+e.join(`
|
|
14
|
-
`),l=this.blockquote(t);s[s.length-1]=l,r=r.substring(0,r.length-u.raw.length)+l.raw,n=n.substring(0,n.length-u.text.length)+l.text;break}if(u?.type==="list"){let t=u.raw+`
|
|
15
|
-
`+e.join(`
|
|
16
|
-
`),l=this.list(t);s[s.length-1]=l,r=r.substring(0,r.length-u.raw.length)+l.raw,n=n.substring(0,n.length-u.raw.length)+l.raw,e=t.substring(s.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let l=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",i="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let o=t[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split(`
|
|
19
|
-
`,1)[0],u=!o.trim(),d=0;if(this.options.pedantic?(d=2,i=o.trimStart()):u?d=t[1].length+1:(d=(d=t[2].search(this.rules.other.nonSpaceChar))>4?1:d,i=o.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(n+=c+`
|
|
20
|
-
`,e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),s=this.rules.other.fencesBeginRegex(d),l=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let p=e.split(`
|
|
21
|
-
`,1)[0],h;if(c=p,h=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting," "):c.replace(this.rules.other.tabCharGlobal," "),s.test(c)||l.test(c)||a.test(c)||t.test(c)||r.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!c.trim())i+=`
|
|
22
|
-
`+h.slice(d);else{if(u||o.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(o)||l.test(o)||r.test(o))break;i+=`
|
|
23
|
-
`+c}u||c.trim()||(u=!0),n+=p+`
|
|
24
|
-
`,e=e.substring(p.length+1),o=h.slice(d)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let p=null,h;this.options.gfm&&(p=this.rules.other.listIsTask.exec(i))&&(h="[ ] "!==p[0],i=i.replace(this.rules.other.listReplaceTask,"")),s.items.push({type:"list_item",raw:n,task:!!p,checked:h,loose:!1,text:i,tokens:[]}),s.raw+=n}let i=s.items.at(-1);if(!i)return;i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){let t=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=en(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
-
`):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let e of n)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<r.length;e++)l.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:l.align[e]});for(let e of s)l.rows.push(en(e,l.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
26
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=es(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let r=0;for(let t=0;t<e.length;t++)if("\\"===e[t])t++;else if("("===e[t])r++;else if(")"===e[t]&&--r<0)return t;return r>0?-2:-1}(t[2],0);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),el(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return el(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let r=[...n[0]].length-1,s,l,a=r,i=0,o="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=o.exec(t));){if(!(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(l=[...s].length,n[3]||n[4]){a+=l;continue}if((n[5]||n[6])&&r%3&&!((r+l)%3)){i+=l;continue}if((a-=l)>0)continue;l=Math.min(l,l+a+i);let t=[...n[0]][0].length,o=e.slice(0,r+n.index+t+l);if(Math.min(r,l)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ei=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.options.tokenizer=this.options.tokenizer||new ea,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:l,block:X.normal,inline:Y.normal};this.options.pedantic?(t.block=X.pedantic,t.inline=Y.pedantic):this.options.gfm&&(t.block=X.gfm,this.options.breaks?t.inline=Y.breaks:t.inline=Y.gfm),this.tokenizer.rules=t}static get rules(){return{block:X,inline:Y}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(l.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.options.pedantic&&(e=e.replace(l.tabCharGlobal," ").replace(l.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let r=t.at(-1);1===n.raw.length&&void 0!==r?r.raw+=`
|
|
28
|
-
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
|
|
29
|
-
`)?"":`
|
|
30
|
-
`)+n.raw,r.text+=`
|
|
31
|
-
`+n.text,this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
|
|
32
|
-
`)?"":`
|
|
33
|
-
`)+n.raw,r.text+=`
|
|
34
|
-
`+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}let s=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){let l=t.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
35
|
-
`)?"":`
|
|
36
|
-
`)+n.raw,l.text+=`
|
|
37
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n),r=s.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(`
|
|
38
|
-
`)?"":`
|
|
39
|
-
`)+n.raw,r.text+=`
|
|
40
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,n.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,l="";for(;e;){let n;if(s||(l=""),s=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if((n=this.tokenizer.escape(e))||(n=this.tokenizer.tag(e))||(n=this.tokenizer.link(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if((n=this.tokenizer.emStrong(e,r,l))||(n=this.tokenizer.codespan(e))||(n=this.tokenizer.br(e))||(n=this.tokenizer.del(e))||(n=this.tokenizer.autolink(e))||!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let a=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),s=!0;let r=t.at(-1);r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},eo=class{options;parser;constructor(e){this.options=e||r}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(l.notSpaceStart)?.[0],s=e.replace(l.endingNewline,"")+`
|
|
41
|
-
`;return n?'<pre><code class="language-'+et(n)+'">'+(r?s:et(s,!0))+`</code></pre>
|
|
42
|
-
`:"<pre><code>"+(r?s:et(s,!0))+`</code></pre>
|
|
43
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
44
|
-
${this.parser.parse(e)}</blockquote>
|
|
45
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
46
|
-
`}hr(e){return`<hr>
|
|
47
|
-
`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){let r=e.items[t];n+=this.listitem(r)}let s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+`>
|
|
48
|
-
`+n+"</"+s+`>
|
|
49
|
-
`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+et(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
50
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
51
|
-
`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];r="";for(let e=0;e<s.length;e++)r+=this.tablecell(s[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
52
|
-
<thead>
|
|
53
|
-
`+t+`</thead>
|
|
54
|
-
`+n+`</table>
|
|
55
|
-
`}tablerow({text:e}){return`<tr>
|
|
56
|
-
${e}</tr>
|
|
57
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
58
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${et(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),s=er(e);if(null===s)return n;let l='<a href="'+(e=s)+'"';return t&&(l+=' title="'+et(t)+'"'),l+=">"+n+"</a>"}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=er(e);if(null===s)return et(r);e=s;let l=`<img src="${e}" alt="${r}"`;return t&&(l+=` title="${et(t)}"`),l+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:et(e.text)}},ec=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},eu=class e{options;renderer;textRenderer;constructor(e){this.options=e||r,this.options.renderer=this.options.renderer||new eo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ec}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=e||"";continue}}switch(s.type){case"space":r+=this.renderer.space(s);continue;case"hr":r+=this.renderer.hr(s);continue;case"heading":r+=this.renderer.heading(s);continue;case"code":r+=this.renderer.code(s);continue;case"table":r+=this.renderer.table(s);continue;case"blockquote":r+=this.renderer.blockquote(s);continue;case"list":r+=this.renderer.list(s);continue;case"html":r+=this.renderer.html(s);continue;case"def":r+=this.renderer.def(s);continue;case"paragraph":r+=this.renderer.paragraph(s);continue;case"text":{let l=s,a=this.renderer.text(l);for(;n+1<e.length&&"text"===e[n+1].type;)l=e[++n],a+=`
|
|
59
|
-
`+this.renderer.text(l);t?r+=this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):r+=a;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}parseInline(e,t=this.renderer){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=e||"";continue}}switch(s.type){case"escape":case"text":r+=t.text(s);break;case"html":r+=t.html(s);break;case"link":r+=t.link(s);break;case"image":r+=t.image(s);break;case"strong":r+=t.strong(s);break;case"em":r+=t.em(s);break;case"codespan":r+=t.codespan(s);break;case"br":r+=t.br(s);break;case"del":r+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}},ed=class{options;block;constructor(e){this.options=e||r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ei.lex:ei.lexInline}provideParser(){return this.block?eu.parse:eu.parseInline}},ep=new class{defaults=t();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=eu;Renderer=eo;TextRenderer=ec;Lexer=ei;Tokenizer=ea;Hooks=ed;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":for(let e of n.header)r=r.concat(this.walkTokens(e.tokens,t));for(let e of n.rows)for(let n of e)r=r.concat(this.walkTokens(n.tokens,t));break;case"list":r=r.concat(this.walkTokens(n.items,t));break;default:{let e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{let s=e[n].flat(1/0);r=r.concat(this.walkTokens(s,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new eo(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=e.renderer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ea(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ed;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=e.hooks[r],s=t[r];ed.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&ed.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(t,e);return s.call(t,r)})();let l=n.call(t,e);return s.call(t,l)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(t,e);return!1===r&&(r=await s.apply(t,e)),r})();let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ei.lex(e,t??this.defaults)}parser(e,t){return eu.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},s={...this.defaults,...n},l=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===n.async)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let r=s.hooks?await s.hooks.preprocess(t):t,n=await (s.hooks?await s.hooks.provideLexer():e?ei.lex:ei.lexInline)(r,s),l=s.hooks?await s.hooks.processAllTokens(n):n;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let a=await (s.hooks?await s.hooks.provideParser():e?eu.parse:eu.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(a):a})().catch(l);try{s.hooks&&(t=s.hooks.preprocess(t));let r=(s.hooks?s.hooks.provideLexer():e?ei.lex:ei.lexInline)(t,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let n=(s.hooks?s.hooks.provideParser():e?eu.parse:eu.parseInline)(r,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(e){return l(e)}}}onError(e,t){return r=>{if(r.message+=`
|
|
60
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+et(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function eh(e,t){return ep.parse(e,t)}eh.options=eh.setOptions=function(e){return ep.setOptions(e),eh.defaults=ep.defaults,r=eh.defaults,eh},eh.getDefaults=t,eh.defaults=r,eh.use=function(...e){return ep.use(...e),eh.defaults=ep.defaults,r=eh.defaults,eh},eh.walkTokens=function(e,t){return ep.walkTokens(e,t)},eh.parseInline=ep.parseInline,eh.Parser=eu,eh.parser=eu.parse,eh.Renderer=eo,eh.TextRenderer=ec,eh.Lexer=ei,eh.lexer=ei.lex,eh.Tokenizer=ea,eh.Hooks=ed,eh.parse=eh,eh.options,eh.setOptions,eh.use,eh.walkTokens,eh.parseInline,eu.parse,ei.lex,e.s(["Lexer",()=>ei,"marked",()=>eh])},170349,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},809737,e=>{e.v("/_next/static/media/worker.e575ad4f.js")},346131,e=>{"use strict";let t;var r=e.i(666426),n=e.i(686107),s=e.i(571577);function l(e,[t,r]){return Math.min(r,Math.max(t,e))}var a=e.i(291967),i=e.i(177779),o=e.i(221588),c=e.i(810096),u=e.i(92581),d=e.i(975287),p=0;function h(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var f=e.i(692792),g=e.i(852947),m="focusScope.autoFocusOnMount",x="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},b=n.forwardRef((e,t)=>{let{loop:s=!1,trapped:l=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=n.useState(null),p=(0,g.useCallbackRef)(a),h=(0,g.useCallbackRef)(i),b=n.useRef(null),C=(0,o.useComposedRefs)(t,e=>d(e)),j=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(l){let e=function(e){if(j.paused||!u)return;let t=e.target;u.contains(t)?b.current=t:w(b.current,{select:!0})},t=function(e){if(j.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||w(b.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&w(u)});return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[l,u,j.paused]),n.useEffect(()=>{if(u){S.add(j);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(m,k);u.addEventListener(m,p),u.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(w(n,{select:t}),document.activeElement!==r)return}(v(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&w(u))}return()=>{u.removeEventListener(m,p),setTimeout(()=>{let t=new CustomEvent(x,k);u.addEventListener(x,h),u.dispatchEvent(t),t.defaultPrevented||w(e??document.body,{select:!0}),u.removeEventListener(x,h),S.remove(j)},0)}}},[u,p,h,j]);let R=n.useCallback(e=>{if(!s&&!l||j.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){var n;let t,l=e.currentTarget,[a,i]=[y(t=v(n=l),n),y(t.reverse(),n)];a&&i?e.shiftKey||r!==i?e.shiftKey&&r===a&&(e.preventDefault(),s&&w(i,{select:!0})):(e.preventDefault(),s&&w(a,{select:!0})):r===l&&e.preventDefault()}},[s,l,j.paused]);return(0,r.jsx)(f.Primitive.div,{tabIndex:-1,...c,ref:C,onKeyDown:R})});function v(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function y(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function w(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}b.displayName="FocusScope";var S=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=C(t,e)).unshift(e)},remove(e){t=C(t,e),t[0]?.resume()}});function C(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var j=e.i(244107),R=e.i(509377),T=e.i(153840),N=e.i(545136),E=e.i(802313),L=e.i(225088),$=e.i(962687),P=e.i(73772),A=e.i(891246),I=[" ","Enter","ArrowUp","ArrowDown"],z=[" ","Enter"],M="Select",[H,_,D]=(0,i.createCollection)(M),[q,B]=(0,c.createContextScope)(M,[D,R.createPopperScope]),V=(0,R.createPopperScope)(),[O,F]=q(M),[U,Z]=q(M),W=e=>{let{__scopeSelect:t,children:s,open:l,defaultOpen:a,onOpenChange:i,value:o,defaultValue:c,onValueChange:d,dir:p,name:h,autoComplete:f,disabled:g,required:m,form:x}=e,k=V(t),[b,v]=n.useState(null),[y,w]=n.useState(null),[S,C]=n.useState(!1),T=(0,u.useDirection)(p),[N,L]=(0,E.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:M}),[$,P]=(0,E.useControllableState)({prop:o,defaultProp:c,onChange:d,caller:M}),A=n.useRef(null),I=!b||x||!!b.closest("form"),[z,_]=n.useState(new Set),D=Array.from(z).map(e=>e.props.value).join(";");return(0,r.jsx)(R.Root,{...k,children:(0,r.jsxs)(O,{required:m,scope:t,trigger:b,onTriggerChange:v,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:(0,j.useId)(),value:$,onValueChange:P,open:N,onOpenChange:L,dir:T,triggerPointerDownPosRef:A,disabled:g,children:[(0,r.jsx)(H.Provider,{scope:t,children:(0,r.jsx)(U,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{_(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{_(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:s})}),I?(0,r.jsxs)(eP,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:f,value:$,onChange:e=>P(e.target.value),disabled:g,form:x,children:[void 0===$?(0,r.jsx)("option",{value:""}):null,Array.from(z)]},D):null]})})};W.displayName=M;var K="SelectTrigger",Q=n.forwardRef((e,t)=>{let{__scopeSelect:s,disabled:l=!1,...i}=e,c=V(s),u=F(K,s),d=u.disabled||l,p=(0,o.useComposedRefs)(t,u.onTriggerChange),h=_(s),g=n.useRef("touch"),[m,x,k]=eI(e=>{let t=h().filter(e=>!e.disabled),r=t.find(e=>e.value===u.value),n=ez(t,e,r);void 0!==n&&u.onValueChange(n.value)}),b=e=>{d||(u.onOpenChange(!0),k()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,r.jsx)(R.Anchor,{asChild:!0,...c,children:(0,r.jsx)(f.Primitive.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eA(u.value)?"":void 0,...i,ref:p,onClick:(0,a.composeEventHandlers)(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==g.current&&b(e)}),onPointerDown:(0,a.composeEventHandlers)(i.onPointerDown,e=>{g.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:(0,a.composeEventHandlers)(i.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&I.includes(e.key)&&(b(),e.preventDefault())})})})});Q.displayName=K;var G="SelectValue",X=n.forwardRef((e,t)=>{let{__scopeSelect:n,className:s,style:l,children:a,placeholder:i="",...c}=e,u=F(G,n),{onValueNodeHasChildrenChange:d}=u,p=void 0!==a,h=(0,o.useComposedRefs)(t,u.onValueNodeChange);return(0,L.useLayoutEffect)(()=>{d(p)},[d,p]),(0,r.jsx)(f.Primitive.span,{...c,ref:h,style:{pointerEvents:"none"},children:eA(u.value)?(0,r.jsx)(r.Fragment,{children:i}):a})});X.displayName=G;var Y=n.forwardRef((e,t)=>{let{__scopeSelect:n,children:s,...l}=e;return(0,r.jsx)(f.Primitive.span,{"aria-hidden":!0,...l,ref:t,children:s||"▼"})});Y.displayName="SelectIcon";var J=e=>(0,r.jsx)(T.Portal,{asChild:!0,...e});J.displayName="SelectPortal";var ee="SelectContent",et=n.forwardRef((e,t)=>{let l=F(ee,e.__scopeSelect),[a,i]=n.useState();return((0,L.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,r.jsx)(el,{...e,ref:t}):a?s.createPortal((0,r.jsx)(er,{scope:e.__scopeSelect,children:(0,r.jsx)(H.Slot,{scope:e.__scopeSelect,children:(0,r.jsx)("div",{children:e.children})})}),a):null});et.displayName=ee;var[er,en]=q(ee),es=(0,N.createSlot)("SelectContent.RemoveScroll"),el=n.forwardRef((e,t)=>{let{__scopeSelect:s,position:l="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:u,side:f,sideOffset:g,align:m,alignOffset:x,arrowPadding:k,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:C,...j}=e,R=F(ee,s),[T,N]=n.useState(null),[E,L]=n.useState(null),$=(0,o.useComposedRefs)(t,e=>N(e)),[I,z]=n.useState(null),[M,H]=n.useState(null),D=_(s),[q,B]=n.useState(!1),V=n.useRef(!1);n.useEffect(()=>{if(T)return(0,P.hideOthers)(T)},[T]),n.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??h()),document.body.insertAdjacentElement("beforeend",e[1]??h()),p++,()=>{1===p&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),p--}},[]);let O=n.useCallback(e=>{let[t,...r]=D().map(e=>e.ref.current),[n]=r.slice(-1),s=document.activeElement;for(let r of e)if(r===s||(r?.scrollIntoView({block:"nearest"}),r===t&&E&&(E.scrollTop=0),r===n&&E&&(E.scrollTop=E.scrollHeight),r?.focus(),document.activeElement!==s))return},[D,E]),U=n.useCallback(()=>O([I,T]),[O,I,T]);n.useEffect(()=>{q&&U()},[q,U]);let{onOpenChange:Z,triggerPointerDownPosRef:W}=R;n.useEffect(()=>{if(T){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():T.contains(r.target)||Z(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[T,Z,W]),n.useEffect(()=>{let e=()=>Z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[Z]);let[K,Q]=eI(e=>{let t=D().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=ez(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),G=n.useCallback((e,t,r)=>{let n=!V.current&&!r;(void 0!==R.value&&R.value===t||n)&&(z(e),n&&(V.current=!0))},[R.value]),X=n.useCallback(()=>T?.focus(),[T]),Y=n.useCallback((e,t,r)=>{let n=!V.current&&!r;(void 0!==R.value&&R.value===t||n)&&H(e)},[R.value]),J="popper"===l?ei:ea,et=J===ei?{side:f,sideOffset:g,align:m,alignOffset:x,arrowPadding:k,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:C}:{};return(0,r.jsx)(er,{scope:s,content:T,viewport:E,onViewportChange:L,itemRefCallback:G,selectedItem:I,onItemLeave:X,itemTextRefCallback:Y,focusSelectedItem:U,selectedItemText:M,position:l,isPositioned:q,searchRef:K,children:(0,r.jsx)(A.RemoveScroll,{as:es,allowPinchZoom:!0,children:(0,r.jsx)(b,{asChild:!0,trapped:R.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.composeEventHandlers)(i,e=>{R.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,r.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:(0,r.jsx)(J,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:e=>e.preventDefault(),...j,...et,onPlaced:()=>B(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:(0,a.composeEventHandlers)(j.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});el.displayName="SelectContentImpl";var ea=n.forwardRef((e,t)=>{let{__scopeSelect:s,onPlaced:a,...i}=e,c=F(ee,s),u=en(ee,s),[d,p]=n.useState(null),[h,g]=n.useState(null),m=(0,o.useComposedRefs)(t,e=>g(e)),x=_(s),k=n.useRef(!1),b=n.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:w,focusSelectedItem:S}=u,C=n.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&h&&v&&y&&w){let e=c.trigger.getBoundingClientRect(),t=h.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=w.getBoundingClientRect();if("rtl"!==c.dir){let s=n.left-t.left,a=r.left-s,i=e.left-a,o=e.width+i,c=Math.max(o,t.width),u=l(a,[10,Math.max(10,window.innerWidth-10-c)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let s=t.right-n.right,a=window.innerWidth-r.right-s,i=window.innerWidth-e.right-a,o=e.width+i,c=Math.max(o,t.width),u=l(a,[10,Math.max(10,window.innerWidth-10-c)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let s=x(),i=window.innerHeight-20,o=v.scrollHeight,u=window.getComputedStyle(h),p=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),m=p+f+o+parseInt(u.paddingBottom,10)+g,b=Math.min(5*y.offsetHeight,m),S=window.getComputedStyle(v),C=parseInt(S.paddingTop,10),j=parseInt(S.paddingBottom,10),R=e.top+e.height/2-10,T=y.offsetHeight/2,N=p+f+(y.offsetTop+T);if(N<=R){let e=s.length>0&&y===s[s.length-1].ref.current;d.style.bottom="0px";let t=Math.max(i-R,T+(e?j:0)+(h.clientHeight-v.offsetTop-v.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=s.length>0&&y===s[0].ref.current;d.style.top="0px";let t=Math.max(R,p+v.offsetTop+(e?C:0)+T);d.style.height=t+(m-N)+"px",v.scrollTop=N-R+v.offsetTop}d.style.margin="10px 0",d.style.minHeight=b+"px",d.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>k.current=!0)}},[x,c.trigger,c.valueNode,d,h,v,y,w,c.dir,a]);(0,L.useLayoutEffect)(()=>C(),[C]);let[j,R]=n.useState();(0,L.useLayoutEffect)(()=>{h&&R(window.getComputedStyle(h).zIndex)},[h]);let T=n.useCallback(e=>{e&&!0===b.current&&(C(),S?.(),b.current=!1)},[C,S]);return(0,r.jsx)(eo,{scope:s,contentWrapper:d,shouldExpandOnScrollRef:k,onScrollButtonChange:T,children:(0,r.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,r.jsx)(f.Primitive.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});ea.displayName="SelectItemAlignedPosition";var ei=n.forwardRef((e,t)=>{let{__scopeSelect:n,align:s="start",collisionPadding:l=10,...a}=e,i=V(n);return(0,r.jsx)(R.Content,{...i,...a,ref:t,align:s,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ei.displayName="SelectPopperPosition";var[eo,ec]=q(ee,{}),eu="SelectViewport",ed=n.forwardRef((e,t)=>{let{__scopeSelect:s,nonce:l,...i}=e,c=en(eu,s),u=ec(eu,s),d=(0,o.useComposedRefs)(t,c.onViewportChange),p=n.useRef(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),(0,r.jsx)(H.Slot,{scope:s,children:(0,r.jsx)(f.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:(0,a.composeEventHandlers)(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=u;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,s=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(s<n){let l=s+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});ed.displayName=eu;var ep="SelectGroup",[eh,ef]=q(ep);n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=(0,j.useId)();return(0,r.jsx)(eh,{scope:n,id:l,children:(0,r.jsx)(f.Primitive.div,{role:"group","aria-labelledby":l,...s,ref:t})})}).displayName=ep;var eg="SelectLabel",em=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=ef(eg,n);return(0,r.jsx)(f.Primitive.div,{id:l.id,...s,ref:t})});em.displayName=eg;var ex="SelectItem",[ek,eb]=q(ex),ev=n.forwardRef((e,t)=>{let{__scopeSelect:s,value:l,disabled:i=!1,textValue:c,...u}=e,d=F(ex,s),p=en(ex,s),h=d.value===l,[g,m]=n.useState(c??""),[x,k]=n.useState(!1),b=(0,o.useComposedRefs)(t,e=>p.itemRefCallback?.(e,l,i)),v=(0,j.useId)(),y=n.useRef("touch"),w=()=>{i||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,r.jsx)(ek,{scope:s,value:l,disabled:i,textId:v,isSelected:h,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,r.jsx)(H.ItemSlot,{scope:s,value:l,disabled:i,textValue:g,children:(0,r.jsx)(f.Primitive.div,{role:"option","aria-labelledby":v,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:b,onFocus:(0,a.composeEventHandlers)(u.onFocus,()=>k(!0)),onBlur:(0,a.composeEventHandlers)(u.onBlur,()=>k(!1)),onClick:(0,a.composeEventHandlers)(u.onClick,()=>{"mouse"!==y.current&&w()}),onPointerUp:(0,a.composeEventHandlers)(u.onPointerUp,()=>{"mouse"===y.current&&w()}),onPointerDown:(0,a.composeEventHandlers)(u.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:(0,a.composeEventHandlers)(u.onPointerMove,e=>{y.current=e.pointerType,i?p.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.composeEventHandlers)(u.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,a.composeEventHandlers)(u.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(z.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});ev.displayName=ex;var ey="SelectItemText",ew=n.forwardRef((e,t)=>{let{__scopeSelect:l,className:a,style:i,...c}=e,u=F(ey,l),d=en(ey,l),p=eb(ey,l),h=Z(ey,l),[g,m]=n.useState(null),x=(0,o.useComposedRefs)(t,e=>m(e),p.onItemTextChange,e=>d.itemTextRefCallback?.(e,p.value,p.disabled)),k=g?.textContent,b=n.useMemo(()=>(0,r.jsx)("option",{value:p.value,disabled:p.disabled,children:k},p.value),[p.disabled,p.value,k]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=h;return(0,L.useLayoutEffect)(()=>(v(b),()=>y(b)),[v,y,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.Primitive.span,{id:p.textId,...c,ref:x}),p.isSelected&&u.valueNode&&!u.valueNodeHasChildren?s.createPortal(c.children,u.valueNode):null]})});ew.displayName=ey;var eS="SelectItemIndicator",eC=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e;return eb(eS,n).isSelected?(0,r.jsx)(f.Primitive.span,{"aria-hidden":!0,...s,ref:t}):null});eC.displayName=eS;var ej="SelectScrollUpButton",eR=n.forwardRef((e,t)=>{let s=en(ej,e.__scopeSelect),l=ec(ej,e.__scopeSelect),[a,i]=n.useState(!1),c=(0,o.useComposedRefs)(t,l.onScrollButtonChange);return(0,L.useLayoutEffect)(()=>{if(s.viewport&&s.isPositioned){let e=function(){i(t.scrollTop>0)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),a?(0,r.jsx)(eE,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eR.displayName=ej;var eT="SelectScrollDownButton",eN=n.forwardRef((e,t)=>{let s=en(eT,e.__scopeSelect),l=ec(eT,e.__scopeSelect),[a,i]=n.useState(!1),c=(0,o.useComposedRefs)(t,l.onScrollButtonChange);return(0,L.useLayoutEffect)(()=>{if(s.viewport&&s.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),a?(0,r.jsx)(eE,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eN.displayName=eT;var eE=n.forwardRef((e,t)=>{let{__scopeSelect:s,onAutoScroll:l,...i}=e,o=en("SelectScrollButton",s),c=n.useRef(null),u=_(s),d=n.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return n.useEffect(()=>()=>d(),[d]),(0,L.useLayoutEffect)(()=>{let e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,r.jsx)(f.Primitive.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,a.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(l,50))}),onPointerMove:(0,a.composeEventHandlers)(i.onPointerMove,()=>{o.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(l,50))}),onPointerLeave:(0,a.composeEventHandlers)(i.onPointerLeave,()=>{d()})})}),eL=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e;return(0,r.jsx)(f.Primitive.div,{"aria-hidden":!0,...s,ref:t})});eL.displayName="SelectSeparator";var e$="SelectArrow";n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=V(n),a=F(e$,n),i=en(e$,n);return a.open&&"popper"===i.position?(0,r.jsx)(R.Arrow,{...l,...s,ref:t}):null}).displayName=e$;var eP=n.forwardRef(({__scopeSelect:e,value:t,...s},l)=>{let a,i=n.useRef(null),c=(0,o.useComposedRefs)(l,i),u=(a=n.useRef({value:t,previous:t}),n.useMemo(()=>(a.current.value!==t&&(a.current.previous=a.current.value,a.current.value=t),a.current.previous),[t]));return n.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[u,t]),(0,r.jsx)(f.Primitive.select,{...s,style:{...$.VISUALLY_HIDDEN_STYLES,...s.style},ref:c,defaultValue:t})});function eA(e){return""===e||void 0===e}function eI(e){let t=(0,g.useCallbackRef)(e),r=n.useRef(""),s=n.useRef(0),l=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(s.current),""!==t&&(s.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,l,a]}function ez(e,t,r){var n,s;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,s=Math.max(a,0),n.map((e,t)=>n[(s+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let o=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return o!==r?o:void 0}eP.displayName="SelectBubbleInput";var eM=e.i(613671),eH=e.i(886288);let e_=(0,eH.default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),eD=(0,eH.default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var eq=e.i(949245);let eB=n.forwardRef(({className:e,children:t,...n},s)=>(0,r.jsxs)(Q,{ref:s,className:(0,eq.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,(0,r.jsx)(Y,{asChild:!0,children:(0,r.jsx)(e_,{className:"h-4 w-4 opacity-50"})})]}));eB.displayName=Q.displayName;let eV=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eR,{ref:n,className:(0,eq.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(eD,{className:"h-4 w-4"})}));eV.displayName=eR.displayName;let eO=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eN,{ref:n,className:(0,eq.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(e_,{className:"h-4 w-4"})}));eO.displayName=eN.displayName;let eF=n.forwardRef(({className:e,children:t,position:n="popper",...s},l)=>(0,r.jsx)(J,{children:(0,r.jsxs)(et,{ref:l,className:(0,eq.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[(0,r.jsx)(eV,{}),(0,r.jsx)(ed,{className:(0,eq.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,r.jsx)(eO,{})]})}));eF.displayName=et.displayName,n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(em,{ref:n,className:(0,eq.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=em.displayName;let eU=n.forwardRef(({className:e,children:t,...n},s)=>(0,r.jsxs)(ev,{ref:s,className:(0,eq.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(eC,{children:(0,r.jsx)(eM.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(ew,{children:t})]}));eU.displayName=ev.displayName,n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eL,{ref:n,className:(0,eq.cn)("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=eL.displayName,e.s(["Select",()=>W,"SelectContent",()=>eF,"SelectItem",()=>eU,"SelectTrigger",()=>eB,"SelectValue",()=>X],346131)},693144,e=>{"use strict";var t=e.i(349011),r=e.i(610062);function n(){(0,t.c)("[nuqs] Aborting queues"),r.t.abortAll(),r.n.abort().forEach(e=>r.t.queuedQuerySync.emit(e))}var s=e.i(686107),l=e.i(868924);let a=0;function i(){a=0,n()}function o(){--a<=0&&(a=0,queueMicrotask(n))}function c(){return(0,s.useEffect)(()=>(!function(){var e;if(e="next/app","undefined"==typeof history||(history.nuqs?.version&&"2.8.3"!==history.nuqs.version?(console.error((0,t.s)(409),history.nuqs.version,"2.8.3",e),!0):!!history.nuqs?.adapters?.includes(e)))return;let r=history.replaceState,n=history.pushState;history.replaceState=function(e,t,n){return o(),r.call(history,e,t,n)},history.pushState=function(e,t,r){return o(),n.call(history,e,t,r)},history.nuqs=history.nuqs??{version:"2.8.3",adapters:[]},history.nuqs.adapters.push("next/app")}(),window.addEventListener("popstate",i),()=>window.removeEventListener("popstate",i)),[]),null}let u=(0,t.n)(function(){let e=(0,l.useRouter)(),[r,n]=(0,s.useOptimistic)((0,l.useSearchParams)());return{searchParams:r,updateUrl:(0,s.useCallback)((r,l)=>{(0,s.startTransition)(()=>{l.shallow||n(r);let s=function(e){let{origin:r,pathname:n,hash:s}=location;return r+n+(0,t.o)(e)+s}(r);(0,t.c)("[nuqs next/app] Updating url: %s",s);let i="push"===l.history?history.pushState:history.replaceState;a=3,i.call(history,null,"",s),l.scroll&&window.scrollTo(0,0),l.shallow||e.replace(s,{scroll:!1})})},[]),rateLimitFactor:3,autoResetQueueOnUpdate:!1}});function d({children:e,...t}){return(0,s.createElement)(u,{...t,children:[(0,s.createElement)(s.Suspense,{key:"nuqs-adapter-suspense-navspy",children:(0,s.createElement)(c)}),e]})}e.s(["NuqsAdapter",()=>d],693144)},608576,e=>{"use strict";var t=e.i(666426),r=e.i(912738),n=e.i(414576),s=e.i(868924),l=e.i(686107),a=(e,t,r,n,s,l,a,i)=>{let o=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&l?s.map(e=>l[e]||e):s;r?(o.classList.remove(...n),o.classList.add(l&&l[t]?l[t]:t)):o.setAttribute(e,t)}),r=t,i&&c.includes(r)&&(o.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},i=["light","dark"],o="(prefers-color-scheme: dark)",c="undefined"==typeof window,u=l.createContext(void 0),d={setTheme:e=>{},themes:[]},p=()=>{var e;return null!=(e=l.useContext(u))?e:d},h=e=>l.useContext(u)?l.createElement(l.Fragment,null,e.children):l.createElement(g,{...e}),f=["light","dark"],g=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:s="theme",themes:a=f,defaultTheme:c=r?"system":"light",attribute:d="data-theme",value:p,children:h,nonce:g,scriptProps:v})=>{let[y,w]=l.useState(()=>x(s,c)),[S,C]=l.useState(()=>"system"===y?b():y),j=p?Object.values(p):a,R=l.useCallback(e=>{let s=e;if(!s)return;"system"===e&&r&&(s=b());let l=p?p[s]:s,a=t?k(g):null,o=document.documentElement,u=e=>{"class"===e?(o.classList.remove(...j),l&&o.classList.add(l)):e.startsWith("data-")&&(l?o.setAttribute(e,l):o.removeAttribute(e))};if(Array.isArray(d)?d.forEach(u):u(d),n){let e=i.includes(c)?c:null,t=i.includes(s)?s:e;o.style.colorScheme=t}null==a||a()},[g]),T=l.useCallback(e=>{let t="function"==typeof e?e(y):e;w(t);try{localStorage.setItem(s,t)}catch(e){}},[y]),N=l.useCallback(t=>{C(b(t)),"system"===y&&r&&!e&&R("system")},[y,e]);l.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(N),N(e),()=>e.removeListener(N)},[N]),l.useEffect(()=>{let e=e=>{e.key===s&&(e.newValue?w(e.newValue):T(c))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),l.useEffect(()=>{R(null!=e?e:y)},[e,y]);let E=l.useMemo(()=>({theme:y,setTheme:T,forcedTheme:e,resolvedTheme:"system"===y?S:y,themes:r?[...a,"system"]:a,systemTheme:r?S:void 0}),[y,T,e,S,r,a]);return l.createElement(u.Provider,{value:E},l.createElement(m,{forcedTheme:e,storageKey:s,attribute:d,enableSystem:r,enableColorScheme:n,defaultTheme:c,value:p,themes:a,nonce:g,scriptProps:v}),h)},m=l.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,themes:c,nonce:u,scriptProps:d})=>{let p=JSON.stringify([r,t,i,e,c,o,n,s]).slice(1,-1);return l.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${p})`}})}),x=(e,t)=>{let r;if(!c){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},k=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},b=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light"),v=e.i(886288);let y=(0,v.default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var w=e.i(638322);function S({config:e}){let{provider:r,parts:n}=((e,t)=>{if("vercel"===e){let e=[];return t.env&&e.push(`env: ${t.env}`),t.project&&e.push(`project: ${t.project}`),t.team&&e.push(`team: ${t.team}`),{provider:"Vercel",parts:e}}if("local"===e){let e=[];return t.dataDir&&e.push(`dir: ${t.dataDir}`),t.port&&e.push(`port: ${t.port}`),{provider:"Local",parts:e}}return{provider:t.backend||"unknown",parts:[]}})(e.backend||"local",e);return(0,t.jsxs)("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium",children:["Connected to: ",r]}),(0,t.jsxs)(w.Tooltip,{children:[(0,t.jsx)(w.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(y,{className:"w-4 h-4"})}),(0,t.jsx)(w.TooltipContent,{children:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:n.map(e=>(0,t.jsx)("span",{children:e},e))})})]})]})}let C=(0,v.default)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),j=(0,v.default)("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),R=(0,v.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),T=(0,v.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),N=(0,v.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var E=e.i(260218),L=e.i(917955),$=e.i(949245);function P({value:e,onValueChange:r,options:n,className:s}){return(0,t.jsx)("div",{className:(0,$.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),children:n.map(n=>(0,t.jsxs)("button",{type:"button",onClick:()=>r(n.value),className:(0,$.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e===n.value?"bg-background text-foreground shadow":"hover:bg-background/50"),children:[n.icon,n.label&&(0,t.jsx)("span",{className:"ml-2",children:n.label})]},n.value))})}var A=e.i(687602);let I=(0,v.default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var z=e.i(259280),M=e.i(456944);let H=l.forwardRef(({className:e,type:r,...n},s)=>(0,t.jsx)("input",{type:r,className:(0,$.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...n}));H.displayName="Input";var _=e.i(692792),D=l.forwardRef((e,r)=>(0,t.jsx)(_.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));D.displayName="Label";let q=(0,e.i(294237).cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=l.forwardRef(({className:e,...r},n)=>(0,t.jsx)(D,{ref:n,className:(0,$.cn)(q(),e),...r}));B.displayName=D.displayName;var V=e.i(346131),O=e.i(620486),F=e.i(202311),U=(0,F.createServerReference)("409e7ad3a3c07b1bd1bc09f388f97890d41297a27d",F.callServer,void 0,F.findSourceMapURL,"validateWorldConfig"),Z=e.i(335468),W=(0,F.createServerReference)("003b18c12c9119cf8e85bd7eeba89fd28e923e9c9f",F.callServer,void 0,F.findSourceMapURL,"checkWorldsAvailability");function K({open:e,onOpenChange:r}={}){let n,s=(0,O.useQueryParamConfig)(),a=(0,O.useUpdateConfigQueryParams)(),[i,o]=(0,l.useState)(!1),c=r||o,[u,d]=(0,l.useState)(s),[p,h]=(0,l.useState)([]),[f,g]=(0,l.useState)(!1),{data:m=[],isLoading:x}=(0,Z.default)("worlds-availability",W,{revalidateOnFocus:!1}),k=u.backend||"local",b="local"===k,v="postgres"===k;(0,l.useEffect)(()=>{d(s)},[s]);let y=async()=>{g(!0);try{let e=await U(u);h(e),0===e.length&&(a(u),c(!1))}catch(e){console.error("Validation error:",e),h([{field:"general",message:e instanceof Error?e.message:"Unknown error"}])}finally{g(!1)}},w=(e,t)=>{d(r=>({...r,[e]:t})),h(t=>t.filter(t=>t.field!==e))},S=e=>p.find(t=>t.field===e)?.message,C=JSON.stringify(u)!==JSON.stringify(s)||p.length>0;return(0,t.jsxs)(t.Fragment,{children:[void 0===e&&(0,t.jsx)("button",{type:"button",onClick:()=>c(!0),className:"p-2 rounded-full hover:bg-accent transition-colors",title:"Configuration",children:(0,t.jsx)(T,{className:"h-6 w-6"})}),(void 0!==e?e:i)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"fixed inset-0 bg-black/50 z-40 cursor-default",onClick:()=>c(!1),"aria-label":"Close configuration panel"}),(0,t.jsx)("div",{className:"fixed top-0 right-0 h-full w-96 bg-background border-l shadow-lg z-50 overflow-y-auto",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Configuration"}),(0,t.jsx)(E.Button,{type:"button",onClick:()=>c(!1),variant:"outline",size:"icon",children:(0,t.jsx)(z.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"backend",children:"Backend"}),(0,t.jsxs)(V.Select,{value:u.backend||"local",onValueChange:e=>w("backend",e),children:[(0,t.jsx)(V.SelectTrigger,{id:"backend",children:(0,t.jsx)(V.SelectValue,{placeholder:"Select backend"})}),(0,t.jsx)(V.SelectContent,{children:x?(0,t.jsx)(V.SelectItem,{value:"loading",disabled:!0,children:"Loading worlds..."}):m.length>0?m.map(e=>(0,t.jsx)(V.SelectItem,{value:e.id,children:e.displayName},e.id)):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(V.SelectItem,{value:"local",children:"Local"}),(0,t.jsx)(V.SelectItem,{value:"vercel",children:"Vercel"}),(0,t.jsx)(V.SelectItem,{value:"postgres",children:"PostgreSQL"})]})})]}),(n=m.find(e=>e.id===k))&&!n.isInstalled?(0,t.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-600 dark:text-amber-400",children:[(0,t.jsx)(I,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("p",{className:"font-medium",children:"Package not installed"}),(0,t.jsxs)("p",{className:"mt-1 text-muted-foreground",children:["Run:"," ",(0,t.jsx)("code",{className:"bg-muted px-1 py-0.5 rounded",children:n.installCommand})]})]})]}):null]}),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"port",children:"Port"}),(0,t.jsx)(H,{id:"port",value:u.port||"",onChange:e=>w("port",e.target.value),placeholder:"3001",className:S("port")?"border-destructive":""}),S("port")&&(0,t.jsx)("p",{className:"text-sm text-destructive break-words",children:S("port")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"dataDir",children:"Data Directory"}),(0,t.jsx)(H,{id:"dataDir",value:u.dataDir||"",onChange:e=>w("dataDir",e.target.value),placeholder:".workflow-data or .next/workflow-data",className:S("dataDir")?"border-destructive":""}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Path to the workflow data directory. Can be relative or absolute."})]})]}),v&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"postgresUrl",children:"Connection URL"}),(0,t.jsx)(H,{id:"postgresUrl",value:u.postgresUrl||"",onChange:e=>w("postgresUrl",e.target.value),placeholder:"postgres://user:pass@host:5432/db",className:S("postgresUrl")?"border-destructive":""}),S("postgresUrl")&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:S("postgresUrl")})]})}),!b&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"env",children:"Environment"}),(0,t.jsx)(H,{id:"env",value:u.env||"production",onChange:e=>w("env",e.target.value),placeholder:"production or preview"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"authToken",children:"Auth Token"}),(0,t.jsx)(H,{id:"authToken",type:"password",value:u.authToken||"",onChange:e=>w("authToken",e.target.value),placeholder:"Vercel auth token"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"project",children:"Project ID"}),(0,t.jsx)(H,{id:"project",value:u.project||"",onChange:e=>w("project",e.target.value),placeholder:"prj_..."})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"team",children:"Team ID"}),(0,t.jsx)(H,{id:"team",value:u.team||"",onChange:e=>w("team",e.target.value),placeholder:"team_..."})]})]}),p.length>0&&(0,t.jsxs)(M.Alert,{variant:"destructive",className:"!bg-destructive/10 !border-destructive",children:[(0,t.jsx)(A.AlertCircle,{className:"h-4 w-4"}),(0,t.jsx)(M.AlertTitle,{children:"Configuration Error"}),(0,t.jsx)(M.AlertDescription,{children:(0,t.jsx)("ul",{className:"list-disc list-inside space-y-1",children:p.map((e,r)=>(0,t.jsxs)("li",{className:"break-words",children:["general"!==e.field&&(0,t.jsxs)("strong",{children:[e.field,":"]})," ",e.message]},`error-${r}`))})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 pt-4",children:[(0,t.jsx)(E.Button,{onClick:y,disabled:f||!C||m.some(e=>e.id===k&&!e.isInstalled),className:"w-full",children:f?"Validating...":"Apply Configuration"}),(0,t.jsx)(E.Button,{variant:"outline",onClick:()=>{d(s),h([]),c(!1)},className:"w-full",children:"Cancel"})]})]})]})})]})]})}function Q({open:e,onOpenChange:r}){return(0,t.jsx)(K,{open:e,onOpenChange:r})}function G(){let[e,r]=(0,l.useState)(!1),{theme:n,setTheme:s}=p();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L.DropdownMenu,{children:[(0,t.jsx)(L.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(E.Button,{variant:"outline",size:"icon",children:[(0,t.jsx)(T,{className:"h-[1.2rem] w-[1.2rem]"}),(0,t.jsx)("span",{className:"sr-only",children:"Settings"})]})}),(0,t.jsxs)(L.DropdownMenuContent,{align:"end",className:"w-56",children:[(0,t.jsxs)("div",{className:"px-2 py-1.5 flex items-center gap-3",children:[(0,t.jsx)(L.DropdownMenuLabel,{className:"px-0 mb-0",children:"Theme"}),(0,t.jsx)(P,{value:n||"system",onValueChange:s,options:[{value:"system",icon:(0,t.jsx)(j,{className:"h-4 w-4"})},{value:"light",icon:(0,t.jsx)(N,{className:"h-4 w-4"})},{value:"dark",icon:(0,t.jsx)(R,{className:"h-4 w-4"})}]})]}),(0,t.jsx)(L.DropdownMenuSeparator,{}),(0,t.jsxs)(L.DropdownMenuItem,{onSelect:()=>r(!0),children:[(0,t.jsx)("span",{children:"Configuration"}),(0,t.jsx)(T,{className:"ml-auto h-4 w-4"})]}),(0,t.jsx)(L.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:"https://useworkflow.dev/docs/getting-started",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("span",{children:"Docs"}),(0,t.jsx)(C,{className:"ml-auto h-4 w-4"})]})})]})]}),(0,t.jsx)(Q,{open:e,onOpenChange:r})]})}var X=e.i(806746);let Y=({...e})=>{let{theme:r="system"}=p();return(0,t.jsx)(X.Toaster,{theme:r,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",error:"group-[.toaster]:bg-destructive group-[.toaster]:text-destructive-foreground group-[.toaster]:border-destructive",success:"group-[.toaster]:bg-green-600 group-[.toaster]:text-white group-[.toaster]:border-green-600"}},...e})};function J({className:e}={}){return(0,t.jsxs)("svg",{viewBox:"0 0 1792 240",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e||"h-6 w-auto",role:"img","aria-label":"Workflow Logo",children:[(0,t.jsx)("title",{children:"Workflow Logo"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M753.933 55.627C806.249 55.627 840.685 91.718 840.685 147.345C840.685 202.971 806.249 239.062 753.933 239.062C701.286 239.062 666.851 202.971 666.851 147.345C666.851 91.7181 701.286 55.6271 753.933 55.627ZM753.933 90.0625C726.451 90.0626 710.889 111.254 710.889 147.345C710.889 183.436 726.451 204.627 753.933 204.627C781.084 204.627 796.978 183.436 796.978 147.345C796.978 111.254 781.084 90.0625 753.933 90.0625Z",className:"fill-foreground"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1445.65 55.627C1497.96 55.627 1532.4 91.718 1532.4 147.345C1532.4 202.971 1497.96 239.062 1445.65 239.062C1393 239.062 1358.56 202.971 1358.56 147.345C1358.56 91.718 1393 55.627 1445.65 55.627ZM1445.65 90.0625C1418.16 90.0625 1402.6 111.254 1402.6 147.345C1402.6 183.436 1418.16 204.627 1445.65 204.627C1472.8 204.627 1488.69 183.436 1488.69 147.345C1488.69 111.254 1472.8 90.0626 1445.65 90.0625Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M902.473 94.0361C909.095 70.8584 922.34 59.5997 944.855 59.5996H961.079V92.3799H944.524C916.38 92.38 904.128 106.949 904.128 135.094V235.089H861.746V59.5996H901.48L902.473 94.0361Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1019.25 138.735L1091.11 59.5996H1143.09L1074.55 132.113L1146.4 235.089H1098.72L1046.74 157.609L1019.25 187.078V235.089H976.872V0H1019.25V138.735Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1263.63 32.7803H1235.82C1224.89 32.7803 1217.28 41.3893 1217.28 54.9648V59.5996H1260.98V92.3799H1217.28V235.089H1174.56V92.3799H1149.4V59.5996H1174.56V54.9648C1174.56 19.5359 1191.78 0 1230.85 0H1263.63V32.7803Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1322.58 189.396C1322.58 197.673 1327.22 202.309 1335.5 202.31H1348.74V235.089H1324.57C1298.08 235.089 1280.2 218.534 1280.2 191.052V0H1322.58V189.396Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1604.59 186.416L1641.02 59.5996H1677.77L1713.86 186.416L1749.95 59.5996H1791.34L1737.7 235.089H1694.32L1659.56 116.883L1624.79 235.089H1581.42L1527.77 59.5996H1568.83L1604.59 186.416Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M472.173 174.847L514.895 0.671875H554.66L598.038 174.847L640.432 0.671875H685.454L623.015 234H575.692L534.942 77.5713L493.863 234H446.869L384.1 0.671875H429.122L472.173 174.847Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M125.776 0C120.929 1.64945e-05 117 3.9291 117 8.77539V61.4248C117 66.2711 120.929 70.2002 125.776 70.2002H160.875L161.253 70.2051C169.032 70.4023 175.301 76.6734 175.495 84.4531L175.5 84.8252V143.325C175.5 148.171 179.429 152.101 184.276 152.101H219.375L219.753 152.105C227.53 152.303 233.798 158.571 233.995 166.348L234 166.726V225.225C234 230.071 237.929 234 242.776 234H295.425C300.271 234 304.2 230.071 304.2 225.225V172.575C304.2 167.729 300.271 163.8 295.425 163.8H260.25C252.334 163.76 245.905 157.43 245.705 149.553L245.7 149.176V90.6758C245.7 85.8295 241.771 81.9004 236.925 81.9004H201.825C193.874 81.9004 187.405 75.5551 187.205 67.6523L187.2 67.2754V8.77539C187.2 3.9291 183.271 1.64951e-05 178.425 0H125.776Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M67.2755 81.9004C62.4293 81.9004 58.5002 85.8295 58.5002 90.6758V143.325C58.5004 148.171 62.4294 152.101 67.2755 152.101H102.375L102.753 152.105C110.53 152.303 116.798 158.571 116.995 166.348L117 166.726V225.225C117 230.071 120.929 234 125.776 234H178.425C183.271 234 187.2 230.071 187.2 225.225V172.575C187.2 167.729 183.271 163.8 178.425 163.8H143.25C135.334 163.76 128.905 157.43 128.705 149.553L128.7 149.176V90.6758C128.7 85.8295 124.771 81.9004 119.925 81.9004H67.2755Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M8.77454 163.8C3.92844 163.8 0.00012207 167.729 0.00012207 172.575V225.225C0.00012207 230.071 3.92844 234 8.77454 234H61.4249C66.2712 234 70.2003 230.071 70.2003 225.225V172.575C70.2003 167.729 66.2712 163.8 61.4249 163.8H8.77454Z",className:"fill-foreground"})]})}function ee({children:e}){let a=(0,s.useRouter)(),i=(0,s.usePathname)(),o=(0,s.useSearchParams)(),c=(0,O.useQueryParamConfig)(),{setTheme:u}=p(),d=o.get("id"),h=o.get("runId"),f=o.get("stepId"),g=o.get("hookId"),m=o.get("resource"),x=o.get("theme"),k=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{x&&("light"===x||"dark"===x||"system"===x)&&u(x)},[x,u]),(0,l.useEffect)(()=>{let e;if("/"===i||!k.current){if(i.startsWith("/run/")){k.current=!0;return}if(!m){if(h){let e;e=f?(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"step",stepId:f}):g?(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"hook",hookId:g}):(0,O.buildUrlWithConfig)(`/run/${h}`,c),k.current=!0,a.push(e)}return}if(d){if("run"===m)e=(0,O.buildUrlWithConfig)(`/run/${d}`,c);else if("step"===m&&h)e=(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"step",stepId:d});else if("stream"===m&&h)e=(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"stream",streamId:d});else if("event"===m&&h)e=(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"event",eventId:d});else if("hook"===m&&h)e=(0,O.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"hook",hookId:d});else{if("hook"!==m||h)return void console.warn(`Can't deep-link to ${m} ${d}.`);e=(0,O.buildUrlWithConfig)("/",c,{sidebar:"hook",hookId:d})}k.current=!0,a.push(e)}}},[m,d,h,f,g,a,c,i]),(0,t.jsxs)("div",{className:"min-h-screen flex flex-col",children:[(0,t.jsxs)(r.TooltipProvider,{delayDuration:0,children:[(0,t.jsx)("div",{className:"sticky top-0 z-50 bg-background border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)(n.default,{href:(0,O.buildUrlWithConfig)("/",c),children:(0,t.jsx)("h1",{className:"flex items-center gap-2",title:"Workflow Observability",children:(0,t.jsx)(J,{})})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(S,{config:c}),(0,t.jsx)(G,{})]})]})}),(0,t.jsx)("div",{className:"flex-1 px-6 pt-6",children:e})]}),(0,t.jsx)(Y,{})]})}function et({children:e}){return(0,t.jsx)(h,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"workflow-theme",children:(0,t.jsx)(ee,{children:e})})}e.s(["LayoutClient",()=>et],608576)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,495566,e=>{"use strict";let t=(0,e.i(886288).default)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",()=>t],495566)},846220,811735,e=>{"use strict";var t=e.i(886288);let n=(0,t.default)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",()=>n],846220);let r=(0,t.default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>r],811735)},241245,835253,719402,e=>{"use strict";var t,n=e.i(666426),r=e.i(613671);let a=(0,e.i(886288).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>a],835253);var i=e.i(686107),o=e.i(638322),s=e.i(949245);function u({text:e,children:t,className:u,overlay:l}){let[c,d]=(0,i.useState)(!1),h=async t=>{t.stopPropagation();try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch(e){console.error("Failed to copy text:",e)}};return l?(0,n.jsxs)("span",{className:(0,s.cn)("relative group/copy inline-block",u),children:[t,(0,n.jsxs)(o.Tooltip,{children:[(0,n.jsx)(o.TooltipTrigger,{asChild:!0,children:(0,n.jsx)("button",{type:"button",onClick:h,className:"absolute right-0 top-1/2 -translate-y-1/2 opacity-0 group-hover/copy:opacity-100 transition-opacity bg-background/80 backdrop-blur-sm p-1 rounded","aria-label":"Copy to clipboard",children:c?(0,n.jsx)(r.Check,{className:"h-3 w-3 text-muted-foreground"}):(0,n.jsx)(a,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})}),(0,n.jsx)(o.TooltipContent,{children:(0,n.jsx)("p",{children:c?"Copied!":"Copy to clipboard"})})]})]}):(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center gap-2 group",u),children:[t,(0,n.jsxs)(o.Tooltip,{children:[(0,n.jsx)(o.TooltipTrigger,{asChild:!0,children:(0,n.jsx)("button",{type:"button",onClick:h,className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":"Copy to clipboard",children:c?(0,n.jsx)(r.Check,{className:"h-3 w-3 text-green-600"}):(0,n.jsx)(a,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})}),(0,n.jsx)(o.TooltipContent,{children:(0,n.jsx)("p",{children:c?"Copied!":"Copy to clipboard"})})]})]})}e.s(["CopyableText",()=>u],241245);let l=Symbol.for("constructDateFrom");function c(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&l in e?e[l](t):e instanceof Date?new e.constructor(t):new Date(t)}let d={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function h(e){return (t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}let m={date:h({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:h({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:h({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},f={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function g(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{let t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function p(e){return(t,n={})=>{let r,a=n.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;let s=o[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(u)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(u,e=>e.test(s)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(u,e=>e.test(s));return r=e.valueCallback?e.valueCallback(l):l,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(s.length)}}}let w={code:"en-US",formatDistance:(e,t,n)=>{let r,a=d[e];if(r="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix)if(n.comparison&&n.comparison>0)return"in "+r;else return r+" ago";return r},formatLong:m,formatRelative:(e,t,n,r)=>f[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:g({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:g({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:g({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:g({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:g({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(t={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,n={})=>{let r=e.match(t.matchPattern);if(!r)return null;let a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(a.length)}}),era:p({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:p({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:p({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:p({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},b={};function x(e,t){return c(t||e,e)}function y(e){let t=x(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-n}function v(e,...t){let n=c.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function j(e,t){let n=x(e,t?.in);return n.setHours(0,0,0,0),n}function k(e,t,n){let[r,a]=v(n?.in,e,t),i=j(r),o=j(a);return Math.round((i-y(i)-(o-y(o)))/864e5)}function C(e,t){let n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??b.weekStartsOn??b.locale?.options?.weekStartsOn??0,r=x(e,t?.in),a=r.getDay();return r.setDate(r.getDate()-(7*(a<n)+a-n)),r.setHours(0,0,0,0),r}function T(e,t){return C(e,{...t,weekStartsOn:1})}function M(e,t){let n=x(e,t?.in),r=n.getFullYear(),a=c(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=T(a),o=c(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=T(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function S(e,t){let n=x(e,t?.in),r=n.getFullYear(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??b.firstWeekContainsDate??b.locale?.options?.firstWeekContainsDate??1,i=c(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);let o=C(i,t),s=c(t?.in||e,0);s.setFullYear(r,0,a),s.setHours(0,0,0,0);let u=C(s,t);return+n>=+o?r+1:+n>=+u?r:r-1}function D(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let N={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return D("yy"===t?r%100:r,t.length)},M(e,t){let n=e.getMonth();return"M"===t?String(n+1):D(n+1,2)},d:(e,t)=>D(e.getDate(),t.length),a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>D(e.getHours()%12||12,t.length),H:(e,t)=>D(e.getHours(),t.length),m:(e,t)=>D(e.getMinutes(),t.length),s:(e,t)=>D(e.getSeconds(),t.length),S(e,t){let n=t.length;return D(Math.trunc(e.getMilliseconds()*Math.pow(10,n-3)),t.length)}},P={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){let t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return N.y(e,t)},Y:function(e,t,n,r){let a=S(e,r),i=a>0?a:1-a;return"YY"===t?D(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):D(i,t.length)},R:function(e,t){return D(M(e),t.length)},u:function(e,t){return D(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return D(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return D(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return N.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return D(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let a,i,o,s,u=Math.round((C(a=x(e,r?.in),r)-(i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??b.firstWeekContainsDate??b.locale?.options?.firstWeekContainsDate??1,o=S(a,r),(s=c(r?.in||a,0)).setFullYear(o,0,i),s.setHours(0,0,0,0),C(s,r)))/6048e5)+1;return"wo"===t?n.ordinalNumber(u,{unit:"week"}):D(u,t.length)},I:function(e,t,n){let r,a,i,o=Math.round((T(r=x(e,void 0))-(a=M(r,void 0),(i=c(r,0)).setFullYear(a,0,4),i.setHours(0,0,0,0),T(i)))/6048e5)+1;return"Io"===t?n.ordinalNumber(o,{unit:"week"}):D(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):N.d(e,t)},D:function(e,t,n){let r,a,i=k(r=x(e,void 0),((a=x(r,void 0)).setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a))+1;return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):D(i,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return D(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return D(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return D(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r,a=e.getHours();switch(r=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r,a=e.getHours();switch(r=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return N.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):N.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},k:function(e,t,n){let r=e.getHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):N.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):N.s(e,t)},S:function(e,t){return N.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return W(r);case"XXXX":case"XX":return E(r);default:return E(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return W(r);case"xxxx":case"xx":return E(r);default:return E(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+R(r,":");default:return"GMT"+E(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+R(r,":");default:return"GMT"+E(r,":")}},t:function(e,t,n){return D(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return D(+e,t.length)}};function R(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return 0===i?n+String(a):n+String(a)+t+D(i,2)}function W(e,t){return e%60==0?(e>0?"-":"+")+D(Math.abs(e)/60,2):E(e,t)}function E(e,t=""){let n=Math.abs(e);return(e>0?"-":"+")+D(Math.trunc(n/60),2)+t+D(n%60,2)}let F=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},I=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},q={p:I,P:(e,t)=>{let n,r=e.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return F(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",F(a,t)).replace("{{time}}",I(i,t))}},A=/^D+$/,H=/^Y+$/,O=["D","DD","YY","YYYY"],Y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L=/^'([^]*?)'?$/,B=/''/g,Q=/[a-zA-Z]/;function G({date:e,className:t="",type:r="relative"}){var a,s;let[,u]=(0,i.useState)(Date.now());"string"==typeof e&&(e=new Date(e));let l="relative"===r?function(e,t,n){let r,[a,i]=v(void 0,e,t),o=(void 0)??b.locale??w,s=(void 0)??void 0??b.weekStartsOn??b.locale?.options?.weekStartsOn??0,u=k(a,i);if(isNaN(u))throw RangeError("Invalid time value");r=u<-6?"other":u<-1?"lastWeek":u<0?"yesterday":u<1?"today":u<2?"tomorrow":u<7?"nextWeek":"other";let l=o.formatRelative(r,a,i,{locale:o,weekStartsOn:s});return function(e,t,n){let r=n?.locale??b.locale??w,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??b.firstWeekContainsDate??b.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??b.weekStartsOn??b.locale?.options?.weekStartsOn??0,o=x(e,n?.in);if(!(o instanceof Date||"object"==typeof o&&"[object Date]"===Object.prototype.toString.call(o))&&"number"!=typeof o||isNaN(+x(o)))throw RangeError("Invalid time value");let s=t.match(z).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,q[t])(e,r.formatLong):e}).join("").match(Y).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var n;let t;return{isToken:!1,value:(t=(n=e).match(L))?t[1].replace(B,"'"):n}}if(P[t])return{isToken:!0,value:e};if(t.match(Q))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(s=r.localize.preprocessor(o,s));let u={firstWeekContainsDate:a,weekStartsOn:i,locale:r};return s.map(a=>{if(!a.isToken)return a.value;let i=a.value;return(!n?.useAdditionalWeekYearTokens&&H.test(i)||!n?.useAdditionalDayOfYearTokens&&A.test(i))&&function(e,t,n){var r,a,i;let o,s=(r=e,a=t,i=n,o="Y"===r[0]?"years":"days of the month",`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${a}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),O.includes(e))throw RangeError(s)}(i,t,String(e)),(0,P[i[0]])(o,i,r.localize,u)}).join("")}(a,l,{locale:o,weekStartsOn:s})}(new Date(e),new Date):(a=new Date(e),s={addSuffix:!0},function(e,t,n){var r;let a,i,o=n?.locale??b.locale??w,s=(i=x(e)-x(t))<0?-1:i>0?1:i;if(isNaN(s))throw RangeError("Invalid time value");let u=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[l,c]=v(n?.in,...s>0?[t,e]:[e,t]),d=(r=n?.roundingMethod??"round",e=>{let t=(r?Math[r]:Math.trunc)(e);return 0===t?0:t}),h=c.getTime()-l.getTime(),m=h/6e4,f=(h-(y(c)-y(l)))/6e4,g=n?.unit;if("second"===(a=g||(m<1?"second":m<60?"minute":m<1440?"hour":f<43200?"day":f<525600?"month":"year"))){let e=d(h/1e3);return o.formatDistance("xSeconds",e,u)}if("minute"===a){let e=d(m);return o.formatDistance("xMinutes",e,u)}if("hour"===a){let e=d(m/60);return o.formatDistance("xHours",e,u)}if("day"===a){let e=d(f/1440);return o.formatDistance("xDays",e,u)}if("month"===a){let e=d(f/43200);return 12===e&&"month"!==g?o.formatDistance("xYears",1,u):o.formatDistance("xMonths",e,u)}else{let e=d(f/525600);return o.formatDistance("xYears",e,u)}}(a,c(a,Date.now()),s)),d=new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(0,i.useEffect)(()=>{let e=setInterval(()=>{u(Date.now())},1e3);return()=>clearInterval(e)},[]),(0,n.jsxs)(o.Tooltip,{children:[(0,n.jsx)(o.TooltipTrigger,{asChild:!0,children:(0,n.jsx)("span",{className:`${t} cursor-help border-b border-dotted`,children:l})}),(0,n.jsx)(o.TooltipContent,{children:(0,n.jsx)("p",{children:d})})]})}e.s(["RelativeTime",()=>G],719402)},613087,e=>{"use strict";var t=e.i(666426),n=e.i(949245);function r({className:e,...r}){return(0,t.jsx)("div",{className:(0,n.cn)("animate-pulse rounded-md bg-muted",e),...r})}e.s(["Skeleton",()=>r])},451675,e=>{"use strict";var t=e.i(666426),n=e.i(613671),r=e.i(835253),a=e.i(686107),i=e.i(260218),o=e.i(638322),s=e.i(949245),u=e.i(356089);function l({status:e,context:n,className:r,durationMs:a}){let i=(0,t.jsxs)("span",{className:(0,s.cn)("flex flex-row gap-2",r),children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:(0,s.cn)("size-2 rounded-full shrink-0",(()=>{switch(e){case"running":return"bg-blue-500";case"completed":return"bg-emerald-500";case"failed":return"bg-red-500";case"cancelled":return"bg-yellow-500";case"pending":default:return"bg-gray-400";case"paused":return"bg-orange-500"}})())}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium capitalize",children:e})]}),void 0!==a&&(0,t.jsxs)("span",{className:"text-muted-foreground/70 text-xs",children:["(",(0,u.formatDuration)(a),")"]})]});return"failed"===e&&n?.error?(0,t.jsx)(c,{content:i,error:n.error}):i}function c({content:e,error:s}){let[u,l]=(0,a.useState)(!1),c="string"==typeof s?s:s instanceof Error?s.message:JSON.stringify(s),d=async e=>{e.stopPropagation(),await navigator.clipboard.writeText(c),l(!0),setTimeout(()=>l(!1),2e3)};return(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"cursor-help",children:e})}),(0,t.jsxs)(o.TooltipContent,{className:"max-w-md p-0",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2 p-1 border-b",children:[(0,t.jsx)("span",{className:"text-xs font-medium pl-1 pt-1",children:"Error Details"}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:d,children:u?(0,t.jsx)(n.Check,{className:"h-2.5 w-2.5 text-muted-foreground"}):(0,t.jsx)(r.Copy,{className:"h-2.5 w-2.5 text-muted-foreground"})})]}),(0,t.jsx)("div",{className:"max-h-48 overflow-auto p-2",children:(0,t.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words font-mono",children:c})})]})]})}e.s(["StatusBadge",()=>l])},857812,e=>{"use strict";let t=(0,e.i(886288).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],857812)},708341,e=>{"use strict";var t=e.i(666426);e.i(169764);var n=e.i(257151),r=e.i(531875),a=e.i(857812),i=e.i(846220),o=e.i(811735),s=e.i(545739),u=e.i(686107),l=e.i(806746),c=e.i(917955),d=e.i(638322),h=e.i(260218);function m({env:e,runId:t,runStatus:a,events:i,callbacks:o}){let[s,c]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[g,p]=(0,u.useState)(!1),w=(0,u.useMemo)(()=>(0,n.analyzeEvents)(i),[i]).hasPendingSleeps,b=(0,u.useMemo)(()=>(0,n.shouldShowReenqueueButton)(i,a),[i,a]),x=(0,u.useCallback)(async()=>{if(s)return null;try{c(!0);let n=await (0,r.recreateRun)(e,t);return l.toast.success("New run started",{description:`Run ID: ${n}`}),o?.onSuccess?.(),o?.onNavigateToRun?.(n),n}catch(e){return l.toast.error("Failed to re-run",{description:e instanceof Error?e.message:"Unknown error"}),null}finally{c(!1)}},[e,t,s,o]),y=(0,u.useCallback)(async()=>{if(!d)try{h(!0),await (0,r.reenqueueRun)(e,t),l.toast.success("Run re-enqueued",{description:"The workflow orchestration layer has been re-enqueued."}),o?.onSuccess?.()}catch(e){l.toast.error("Failed to re-enqueue",{description:e instanceof Error?e.message:"Unknown error"})}finally{h(!1)}},[e,t,d,o]),v=(0,u.useCallback)(async()=>{if(!m)try{f(!0);let n=await (0,r.wakeUpRun)(e,t);n.stoppedCount>0?l.toast.success("Run woken up",{description:`Interrupted ${n.stoppedCount} pending sleep${n.stoppedCount>1?"s":""} and woke up the run.`}):l.toast.info("No pending sleeps",{description:"There were no pending sleep calls to interrupt."}),o?.onSuccess?.()}catch(e){l.toast.error("Failed to wake up",{description:e instanceof Error?e.message:"Unknown error"})}finally{f(!1)}},[e,t,m,o]),j=(0,u.useCallback)(async()=>{if(!g){if("pending"!==a&&"running"!==a)return void l.toast.error("Cannot cancel",{description:"Only active runs can be cancelled"});try{p(!0),await (0,r.cancelRun)(e,t),l.toast.success("Run cancelled"),o?.onSuccess?.()}catch(e){l.toast.error("Failed to cancel",{description:e instanceof Error?e.message:"Unknown error"})}finally{p(!1)}}},[e,t,a,g,o]);return{rerunning:s,reenqueuing:d,wakingUp:m,cancelling:g,hasPendingSleeps:w,showReenqueueForStuckWorkflow:b,handleReplay:x,handleReenqueue:y,handleWakeUp:v,handleCancel:j}}function f(){return(0,t.jsxs)(t.Fragment,{children:["Interrupt any current calls to ",(0,t.jsx)("code",{children:"sleep"})," and wake up the run."]})}function g({isStuck:e}){return e?(0,t.jsx)(t.Fragment,{children:"This workflow has no active steps or sleep calls, it maybe be stuck. Re-enqueue the workflow orchestration layer to resume execution."}):(0,t.jsx)(t.Fragment,{children:"Re-enqueue the workflow orchestration layer. This is a no-op, unless the workflow got stuck due to an implementation issue in the World. This is useful for debugging custom Worlds."})}function p({env:e,runId:n,runStatus:r,events:u,eventsLoading:l,callbacks:h,stopPropagation:p=!1,showDebugActions:w=!1}){let{rerunning:b,reenqueuing:x,wakingUp:y,cancelling:v,hasPendingSleeps:j,showReenqueueForStuckWorkflow:k,handleReplay:C,handleReenqueue:T,handleWakeUp:M,handleCancel:S}=m({env:e,runId:n,runStatus:r,events:u,callbacks:h}),D="pending"===r||"running"===r,N=!l&&(w||k);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.DropdownMenuItem,{onClick:e=>{p&&e.stopPropagation(),C()},disabled:b,children:[(0,t.jsx)(i.RotateCw,{className:"h-4 w-4 mr-2"}),b?"Replaying...":"Replay Run"]}),l?(0,t.jsxs)(c.DropdownMenuItem,{disabled:!0,children:[(0,t.jsx)(a.Loader2,{className:"h-4 w-4 mr-2 animate-spin"}),"Wake up"]}):N?(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(c.DropdownMenuItem,{onClick:e=>{p&&e.stopPropagation(),T()},disabled:x,children:[(0,t.jsx)(s.Zap,{className:"h-4 w-4 mr-2"}),x?"Re-enqueuing...":"Re-enqueue"]})}),(0,t.jsx)(d.TooltipContent,{side:"left",className:"max-w-xs",children:(0,t.jsx)(g,{isStuck:k&&!w})})]}):(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(c.DropdownMenuItem,{onClick:e=>{p&&e.stopPropagation(),M()},disabled:!j||y,children:[(0,t.jsx)(s.Zap,{className:"h-4 w-4 mr-2"}),y?"Waking up...":"Wake up"]})}),(0,t.jsx)(d.TooltipContent,{side:"left",className:"max-w-xs",children:j?(0,t.jsx)(f,{}):(0,t.jsx)(t.Fragment,{children:"No pending sleep calls to interrupt."})})]}),(0,t.jsxs)(c.DropdownMenuItem,{onClick:e=>{p&&e.stopPropagation(),S()},disabled:!D||v,children:[(0,t.jsx)(o.XCircle,{className:"h-4 w-4 mr-2"}),v?"Cancelling...":"Cancel"]})]})}function w({env:e,runId:n,runStatus:r,events:u,eventsLoading:l,loading:c,callbacks:p,onCancelClick:w,onRerunClick:b,showDebugActions:x=!1}){let{reenqueuing:y,wakingUp:v,hasPendingSleeps:j,showReenqueueForStuckWorkflow:k,handleReenqueue:C,handleWakeUp:T}=m({env:e,runId:n,runStatus:r,events:u,callbacks:p}),M="pending"===r||"running"===r,S=c?"Loading run data...":M?"Cannot re-run while workflow is still running":"",D=!c&&!y,N=y?"Re-enqueuing workflow...":c?"Loading run data...":"",P=!c&&!v&&j,R=v?"Waking up workflow...":c?"Loading run data...":j?"":"No pending sleep calls to interrupt",W="completed"===r?"Run has already completed":"failed"===r?"Run has already failed":"cancelled"===r?"Run has already been cancelled":"",E=!l&&(x||k);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:b,disabled:!(!c&&!M),children:[(0,t.jsx)(i.RotateCw,{className:"h-4 w-4"}),"Replay"]})})}),(0,t.jsx)(d.TooltipContent,{children:S?(0,t.jsx)("p",{children:S}):(0,t.jsx)("p",{children:"This will start a new copy of the current run using the same deployment, environment, and inputs. It will not affect the current run."})})]}),l?(0,t.jsxs)(h.Button,{variant:"outline",size:"sm",disabled:!0,children:[(0,t.jsx)(a.Loader2,{className:"h-4 w-4 animate-spin"}),"Wake up"]}):E?(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:C,disabled:!D||y,children:[(0,t.jsx)(s.Zap,{className:"h-4 w-4"}),y?"Re-enqueuing...":"Re-enqueue"]})})}),(0,t.jsx)(d.TooltipContent,{className:"max-w-xs",children:N?(0,t.jsx)("p",{children:N}):(0,t.jsx)("p",{children:(0,t.jsx)(g,{isStuck:k&&!x})})})]}):(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:T,disabled:!P||v,children:[(0,t.jsx)(s.Zap,{className:"h-4 w-4"}),v?"Waking up...":"Wake up"]})})}),(0,t.jsx)(d.TooltipContent,{className:"max-w-xs",children:R?(0,t.jsx)("p",{children:R}):(0,t.jsx)("p",{children:(0,t.jsx)(f,{})})})]}),(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:w,disabled:!M,children:[(0,t.jsx)(o.XCircle,{className:"h-4 w-4"}),"Cancel"]})})}),(0,t.jsx)(d.TooltipContent,{children:W?(0,t.jsx)("p",{children:W}):(0,t.jsx)("p",{children:"Cancel the workflow run"})})]})]})}e.s(["RunActionsButtons",()=>w,"RunActionsDropdownItems",()=>p])},889840,e=>{"use strict";var t=e.i(666426),n=e.i(686107),r=e.i(291967),a=e.i(810096),i=e.i(177779),o=e.i(221588),s=e.i(244107),u=e.i(692792),l=e.i(852947),c=e.i(802313),d=e.i(92581),h="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},f="RovingFocusGroup",[g,p,w]=(0,i.createCollection)(f),[b,x]=(0,a.createContextScope)(f,[w]),[y,v]=b(f),j=n.forwardRef((e,n)=>(0,t.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(k,{...e,ref:n})})}));j.displayName=f;var k=n.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:i,orientation:s,loop:g=!1,dir:w,currentTabStopId:b,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:v,onEntryFocus:j,preventScrollOnEntryFocus:k=!1,...C}=e,T=n.useRef(null),M=(0,o.useComposedRefs)(a,T),D=(0,d.useDirection)(w),[N,P]=(0,c.useControllableState)({prop:b,defaultProp:x??null,onChange:v,caller:f}),[R,W]=n.useState(!1),E=(0,l.useCallbackRef)(j),F=p(i),I=n.useRef(!1),[q,A]=n.useState(0);return n.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(h,E),()=>e.removeEventListener(h,E)},[E]),(0,t.jsx)(y,{scope:i,orientation:s,dir:D,loop:g,currentTabStopId:N,onItemFocus:n.useCallback(e=>P(e),[P]),onItemShiftTab:n.useCallback(()=>W(!0),[]),onFocusableItemAdd:n.useCallback(()=>A(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>A(e=>e-1),[]),children:(0,t.jsx)(u.Primitive.div,{tabIndex:R||0===q?-1:0,"data-orientation":s,...C,ref:M,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!I.current;if(e.target===e.currentTarget&&t&&!R){let t=new CustomEvent(h,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=F().filter(e=>e.focusable);S([e.find(e=>e.active),e.find(e=>e.id===N),...e].filter(Boolean).map(e=>e.ref.current),k)}}I.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>W(!1))})})}),C="RovingFocusGroupItem",T=n.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...h}=e,m=(0,s.useId)(),f=c||m,w=v(C,i),b=w.currentTabStopId===f,x=p(i),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:k}=w;return n.useEffect(()=>{if(o)return y(),()=>j()},[o,y,j]),(0,t.jsx)(g.ItemSlot,{scope:i,id:f,focusable:o,active:l,children:(0,t.jsx)(u.Primitive.span,{tabIndex:b?0:-1,"data-orientation":w.orientation,...h,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?w.onItemFocus(f):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>w.onItemFocus(f)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void w.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let a=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return M[a]}(e,w.orientation,w.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=w.loop?(n=a,r=i+1,n.map((e,t)=>n[(r+t)%n.length])):a.slice(i+1)}setTimeout(()=>S(a))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=k}):d})})});T.displayName=C;var M={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var D=e.i(110515),N="Tabs",[P,R]=(0,a.createContextScope)(N,[x]),W=x(),[E,F]=P(N),I=n.forwardRef((e,n)=>{let{__scopeTabs:r,value:a,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:h,activationMode:m="automatic",...f}=e,g=(0,d.useDirection)(h),[p,w]=(0,c.useControllableState)({prop:a,onChange:i,defaultProp:o??"",caller:N});return(0,t.jsx)(E,{scope:r,baseId:(0,s.useId)(),value:p,onValueChange:w,orientation:l,dir:g,activationMode:m,children:(0,t.jsx)(u.Primitive.div,{dir:g,"data-orientation":l,...f,ref:n})})});I.displayName=N;var q="TabsList",A=n.forwardRef((e,n)=>{let{__scopeTabs:r,loop:a=!0,...i}=e,o=F(q,r),s=W(r);return(0,t.jsx)(j,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(u.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:n})})});A.displayName=q;var H="TabsTrigger",O=n.forwardRef((e,n)=>{let{__scopeTabs:a,value:i,disabled:o=!1,...s}=e,l=F(H,a),c=W(a),d=L(l.baseId,i),h=B(l.baseId,i),m=i===l.value;return(0,t.jsx)(T,{asChild:!0,...c,focusable:!o,active:m,children:(0,t.jsx)(u.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...s,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(i)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(i)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==l.activationMode;m||o||!e||l.onValueChange(i)})})})});O.displayName=H;var Y="TabsContent",z=n.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,forceMount:o,children:s,...l}=e,c=F(Y,a),d=L(c.baseId,i),h=B(c.baseId,i),m=i===c.value,f=n.useRef(m);return n.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(D.Presence,{present:o||m,children:({present:n})=>(0,t.jsx)(u.Primitive.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:h,tabIndex:0,...l,ref:r,style:{...e.style,animationDuration:f.current?"0s":void 0},children:n&&s})})});function L(e,t){return`${e}-trigger-${t}`}function B(e,t){return`${e}-content-${t}`}z.displayName=Y;var Q=e.i(949245);function G({className:e,...n}){return(0,t.jsx)(I,{"data-slot":"tabs",className:(0,Q.cn)("flex flex-col gap-2",e),...n})}function X({className:e,...n}){return(0,t.jsx)(A,{"data-slot":"tabs-list",className:(0,Q.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg border border-input p-[3px]",e),...n})}function $({className:e,...n}){return(0,t.jsx)(O,{"data-slot":"tabs-trigger",className:(0,Q.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...n})}function K({className:e,...n}){return(0,t.jsx)(z,{"data-slot":"tabs-content",className:(0,Q.cn)("flex-1 outline-none",e),...n})}e.s(["Tabs",()=>G,"TabsContent",()=>K,"TabsList",()=>X,"TabsTrigger",()=>$],889840)},480462,e=>{"use strict";var t=e.i(655907);function n(){return(0,t.useQueryState)("sidebar",t.parseAsString)}function r(){return(0,t.useQueryState)("tab",t.parseAsString.withDefault("runs"))}function a(){return(0,t.useQueryState)("hookId",t.parseAsString)}function i(){return(0,t.useQueryState)("stepId",t.parseAsString)}function o(){return(0,t.useQueryState)("eventId",t.parseAsString)}e.s(["useEventIdState",()=>o,"useHookIdState",()=>a,"useSidebarState",()=>n,"useStepIdState",()=>i,"useTabState",()=>r])}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,424885,t=>{"use strict";let i=Math.abs,e=Math.atan2,n=Math.cos,s=Math.max,h=Math.min,_=Math.sin,o=Math.sqrt,a=Math.PI,r=a/2;function l(t){return t>1?0:t<-1?a:Math.acos(t)}function c(t){return t>=1?r:t<=-1?-r:Math.asin(t)}t.s(["abs",0,i,"acos",()=>l,"asin",()=>c,"atan2",0,e,"cos",0,n,"epsilon",0,1e-12,"halfPi",0,r,"max",0,s,"min",0,h,"pi",0,a,"sin",0,_,"sqrt",0,o,"tau",0,2*a])},557553,(t,i,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},181713,(t,i,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var n=t.r(557553);function s(t){try{return decodeURIComponent(t)}catch(i){return t}}e.sanitizeUrl=function(t){if(!t)return n.BLANK_URL;var i,e=s(t.trim());do i=(e=s(e=e.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,function(t,i){return String.fromCharCode(i)}).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||e.match(n.htmlEntitiesRegex)||e.match(n.htmlCtrlEntityRegex)||e.match(n.whitespaceEscapeCharsRegex);while(i&&i.length>0)var h=e;if(!h)return n.BLANK_URL;if(n.relativeFirstCharacters.indexOf(h[0])>-1)return h;var _=h.trimStart(),o=_.match(n.urlSchemeRegex);if(!o)return h;var a=o[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(a))return n.BLANK_URL;var r=_.replace(/\\/g,"/");if("mailto:"===a||a.includes("://"))return r;if("http:"===a||"https:"===a){if(!URL.canParse(r))return n.BLANK_URL;var l=new URL(r);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return r}},612938,352195,219412,334236,488446,187580,566635,460605,114605,211986,12669,373593,814826,472737,631982,t=>{"use strict";var i,e=t.i(697619),n=t.i(625393),s=t.i(181713);function h(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function _(t){this._context=t}function o(t){return new _(t)}function a(){}function r(t){this._context=t}function l(t){this._context=t}t.i(991577),_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:h(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:h(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},t.s(["curveBasis",0,o],352195),r.prototype={areaStart:a,areaEnd:a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:h(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:h(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};class c{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}}function u(t){return new c(t,!0)}function x(t){return new c(t,!1)}function f(t,i){this._basis=new _(t),this._beta=i}t.s(["curveBumpX",()=>u],219412),t.s(["curveBumpY",()=>x],334236),f.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n,s=t[0],h=i[0],_=t[e]-s,o=i[e]-h,a=-1;++a<=e;)n=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(s+n*_),this._beta*i[a]+(1-this._beta)*(h+n*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};let p=function t(i){function e(t){return 1===i?new _(t):new f(t,i)}return e.beta=function(i){return t(+i)},e}(.85);function y(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function d(t,i){this._context=t,this._k=(1-i)/6}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:y(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:y(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let v=function t(i){function e(t){return new d(t,i)}return e.tension=function(i){return t(+i)},e}(0);function g(t,i){this._context=t,this._k=(1-i)/6}g.prototype={areaStart:a,areaEnd:a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:y(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let m=function t(i){function e(t){return new g(t,i)}return e.tension=function(i){return t(+i)},e}(0);function b(t,i){this._context=t,this._k=(1-i)/6}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:y(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let w=function t(i){function e(t){return new b(t,i)}return e.tension=function(i){return t(+i)},e}(0);t.s(["curveCardinal",0,v],488446);var T=t.i(424885);function S(t,i,e){var n=t._x1,s=t._y1,h=t._x2,_=t._y2;if(t._l01_a>T.epsilon){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,s=(s*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>T.epsilon){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,_=(_*r+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(n,s,h,_,t._x2,t._y2)}function N(t,i){this._context=t,this._alpha=i}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t*=1,i*=1,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:S(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let E=function t(i){function e(t){return i?new N(t,i):new d(t,0)}return e.alpha=function(i){return t(+i)},e}(.5);function M(t,i){this._context=t,this._alpha=i}M.prototype={areaStart:a,areaEnd:a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t*=1,i*=1,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:S(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let C=function t(i){function e(t){return i?new M(t,i):new g(t,0)}return e.alpha=function(i){return t(+i)},e}(.5);function k(t,i){this._context=t,this._alpha=i}k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t*=1,i*=1,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:S(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};let R=function t(i){function e(t){return i?new k(t,i):new b(t,0)}return e.alpha=function(i){return t(+i)},e}(.5);function P(t){this._context=t}function $(t){return new P(t)}function B(t){this._context=t}t.s(["curveCatmullRom",0,E],187580),P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},t.s(["default",0,$],566635),t.s(["curveLinear",0,$],460605),B.prototype={areaStart:a,areaEnd:a,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t*=1,i*=1,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function A(t,i,e){var n=t._x1-t._x0,s=i-t._x1,h=(t._y1-t._y0)/(n||s<0&&-0),_=(e-t._y1)/(s||n<0&&-0);return((h<0?-1:1)+(_<0?-1:1))*Math.min(Math.abs(h),Math.abs(_),.5*Math.abs((h*s+_*n)/(n+s)))||0}function L(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function z(t,i,e){var n=t._x0,s=t._y0,h=t._x1,_=t._y1,o=(h-n)/3;t._context.bezierCurveTo(n+o,s+o*i,h-o,_-o*e,h,_)}function F(t){this._context=t}function O(t){this._context=new I(t)}function I(t){this._context=t}function U(t){return new F(t)}function W(t){return new O(t)}function j(t){this._context=t}function D(t){var i,e,n=t.length-1,s=Array(n),h=Array(n),_=Array(n);for(s[0]=0,h[0]=2,_[0]=t[0]+2*t[1],i=1;i<n-1;++i)s[i]=1,h[i]=4,_[i]=4*t[i]+2*t[i+1];for(s[n-1]=2,h[n-1]=7,_[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)e=s[i]/h[i-1],h[i]-=e,_[i]-=e*_[i-1];for(s[n-1]=_[n-1]/h[n-1],i=n-2;i>=0;--i)s[i]=(_[i]-s[i+1])/h[i];for(i=0,h[n-1]=(t[n]+s[n-1])/2;i<n-1;++i)h[i]=2*t[i+1]-s[i+1];return[s,h]}function H(t){return new j(t)}function K(t,i){this._context=t,this._t=i}function q(t){return new K(t,.5)}function X(t){return new K(t,0)}function Y(t){return new K(t,1)}F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:z(this,this._t0,L(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(i*=1,(t*=1)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,z(this,L(this,e=A(this,t,i)),e);break;default:z(this,this._t0,e=A(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}},(O.prototype=Object.create(F.prototype)).point=function(t,i){F.prototype.point.call(this,i,t)},I.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,h){this._context.bezierCurveTo(i,t,n,e,h,s)}},t.s(["curveMonotoneX",()=>U],114605),t.s(["curveMonotoneY",()=>W],211986),j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===e)this._context.lineTo(t[1],i[1]);else for(var n=D(t),s=D(i),h=0,_=1;_<e;++h,++_)this._context.bezierCurveTo(n[0][h],s[0][h],n[1][h],s[1][h],t[_],i[_]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},t.s(["curveNatural",0,H],12669),K.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t*=1,i*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}}this._x=t,this._y=i}},t.s(["curveStep",0,q],373593),t.s(["curveStepAfter",()=>Y],814826),t.s(["curveStepBefore",()=>X],472737);var J=t.i(692423),G=t.i(976179),Z=t.i(793290),Q=t.i(846801),V=t.i(664139);let tt=function(t,i,e){(void 0===e||(0,V.default)(t[i],e))&&(void 0!==e||i in t)||(0,Q.default)(t,i,e)};var ti=t.i(496515),te=t.i(161176),tn=t.i(848348),ts=t.i(395508),th=t.i(988128),t_=t.i(22422),to=t.i(284612),ta=t.i(411021),tr=t.i(169310),tl=t.i(892251),tc=t.i(418890),tu=t.i(104979),tx=t.i(603280),tf=t.i(161184),tp=Object.prototype,ty=Function.prototype.toString,td=tp.hasOwnProperty,tv=ty.call(Object);let tg=function(t){if(!(0,tf.default)(t)||"[object Object]"!=(0,tu.default)(t))return!1;var i=(0,tx.default)(t);if(null===i)return!0;var e=td.call(i,"constructor")&&i.constructor;return"function"==typeof e&&e instanceof e&&ty.call(e)==tv};var tm=t.i(79213);let tb=function(t,i){if(("constructor"!==i||"function"!=typeof t[i])&&"__proto__"!=i)return t[i]};var tw=t.i(53286),tT=t.i(420474);let tS=function(t,i,e,n,s,h,_){var o=tb(t,e),a=tb(i,e),r=_.get(a);if(r)return void tt(t,e,r);var l=h?h(o,a,e+"",t,i,_):void 0,c=void 0===l;if(c){var u=(0,to.default)(a),x=!u&&(0,tr.default)(a),f=!u&&!x&&(0,tm.default)(a);(l=a,u||x||f)?(0,to.default)(o)?l=o:(0,ta.default)(o)?l=(0,ts.default)(o):x?(c=!1,l=(0,te.default)(a,!0)):f?(c=!1,l=(0,tn.default)(a,!0)):l=[]:tg(a)||(0,t_.default)(a)?(l=o,(0,t_.default)(o))?l=(0,tw.default)(o,(0,tT.default)(o)):(!(0,tc.default)(o)||(0,tl.default)(o))&&(l=(0,th.default)(a)):c=!1}c&&(_.set(a,l),s(l,a,n,h,_),_.delete(a)),tt(t,e,l)},tN=function t(i,e,n,s,h){i!==e&&(0,ti.default)(e,function(_,o){if(h||(h=new Z.default),(0,tc.default)(_))tS(i,e,o,n,t,s,h);else{var a=s?s(tb(i,o),_,o+"",i,e,h):void 0;void 0===a&&(a=_),tt(i,o,a)}},tT.default)};var tE=(0,t.i(273990).default)(function(t,i,e){tN(t,i,e)});t.s(["default",0,tE],631982);var tM={curveBasis:o,curveBasisClosed:function(t){return new r(t)},curveBasisOpen:function(t){return new l(t)},curveBumpX:u,curveBumpY:x,curveBundle:p,curveCardinalClosed:m,curveCardinalOpen:w,curveCardinal:v,curveCatmullRomClosed:C,curveCatmullRomOpen:R,curveCatmullRom:E,curveLinear:$,curveLinearClosed:function(t){return new B(t)},curveMonotoneX:U,curveMonotoneY:W,curveNatural:H,curveStep:q,curveStepAfter:Y,curveStepBefore:X},tC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tk=(0,n.__name)(function(t,i){let n=tR(t,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(n)){let t=n.map(t=>t.args);(0,e.sanitizeDirective)(t),s=(0,e.assignWithDepth_default)(s,[...t])}else s=n.args;if(!s)return;let h=(0,e.detectType)(t,i),_="config";return void 0!==s[_]&&("flowchart-v2"===h&&(h="flowchart"),s[h]=s[_],delete s[_]),s},"detectInit"),tR=(0,n.__name)(function(t,i=null){try{let s,h=RegExp(`[%]{2}(?![{]${tC.source})(?=[}][%]{2}).*
|
|
2
|
-
`,"ig");t=t.trim().replace(h,"").replace(/'/gm,'"'),n.log.debug(`Detecting diagram directive${null!==i?" type:"+i:""} based on the text:${t}`);let _=[];for(;null!==(s=e.directiveRegex.exec(t));)if(s.index===e.directiveRegex.lastIndex&&e.directiveRegex.lastIndex++,s&&!i||i&&s[1]?.match(i)||i&&s[2]?.match(i)){let t=s[1]?s[1]:s[2],i=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;_.push({type:t,args:i})}if(0===_.length)return{type:t,args:null};return 1===_.length?_[0]:_}catch(e){return n.log.error(`ERROR: ${e.message} - Unable to parse directive type: '${i}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),tP=(0,n.__name)(function(t){return t.replace(e.directiveRegex,"")},"removeDirectives"),t$=(0,n.__name)(function(t,i){for(let[e,n]of i.entries())if(n.match(t))return e;return -1},"isSubstringInArray");function tB(t,i){return t?tM[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??i:i}function tA(t,i){let e=t.trim();if(e)return"loose"!==i.securityLevel?(0,s.sanitizeUrl)(e):e}(0,n.__name)(tB,"interpolateToCurve"),(0,n.__name)(tA,"formatUrl");var tL=(0,n.__name)((t,...i)=>{let e=t.split("."),s=e.length-1,h=e[s],_=window;for(let i=0;i<s;i++)if(!(_=_[e[i]]))return void n.log.error(`Function name: ${t} not found in window`);_[h](...i)},"runFunc");function tz(t,i){return t&&i?Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)):0}function tF(t){let i,e=0;return t.forEach(t=>{e+=tz(t,i),i=t}),tU(t,e/2)}function tO(t){return 1===t.length?t[0]:tF(t)}(0,n.__name)(tz,"distance"),(0,n.__name)(tF,"traverseEdge"),(0,n.__name)(tO,"calcLabelPosition");var tI=(0,n.__name)((t,i=2)=>{let e=Math.pow(10,i);return Math.round(t*e)/e},"roundNumber"),tU=(0,n.__name)((t,i)=>{let e,n=i;for(let i of t){if(e){let t=tz(i,e);if(0===t)return e;if(t<n)n-=t;else{let s=n/t;if(s<=0)return e;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:tI((1-s)*e.x+s*i.x,5),y:tI((1-s)*e.y+s*i.y,5)}}}e=i}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),tW=(0,n.__name)((t,i,e)=>{n.log.info(`our points ${JSON.stringify(i)}`),i[0]!==e&&(i=i.reverse());let s=tU(i,25),h=t?10:5,_=Math.atan2(i[0].y-s.y,i[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(_)*h+(i[0].x+s.x)/2,o.y=-Math.cos(_)*h+(i[0].y+s.y)/2,o},"calcCardinalityPosition");function tj(t,i,e){let s=structuredClone(e);n.log.info("our points",s),"start_left"!==i&&"start_right"!==i&&s.reverse();let h=tU(s,25+t),_=10+.5*t,o=Math.atan2(s[0].y-h.y,s[0].x-h.x),a={x:0,y:0};return"start_left"===i?(a.x=Math.sin(o+Math.PI)*_+(s[0].x+h.x)/2,a.y=-Math.cos(o+Math.PI)*_+(s[0].y+h.y)/2):"end_right"===i?(a.x=Math.sin(o-Math.PI)*_+(s[0].x+h.x)/2-5,a.y=-Math.cos(o-Math.PI)*_+(s[0].y+h.y)/2-5):"end_left"===i?(a.x=Math.sin(o)*_+(s[0].x+h.x)/2-5,a.y=-Math.cos(o)*_+(s[0].y+h.y)/2-5):(a.x=Math.sin(o)*_+(s[0].x+h.x)/2,a.y=-Math.cos(o)*_+(s[0].y+h.y)/2),a}function tD(t){let i="",e="";for(let n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?e=e+n+";":i=i+n+";");return{style:i,labelStyle:e}}(0,n.__name)(tj,"calcTerminalLabelPosition"),(0,n.__name)(tD,"getStylesFromArray");var tH=0,tK=(0,n.__name)(()=>(tH++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tH),"generateId");function tq(t){let i="",e="0123456789abcdef",n=e.length;for(let s=0;s<t;s++)i+=e.charAt(Math.floor(Math.random()*n));return i}(0,n.__name)(tq,"makeRandomHex");var tX=(0,n.__name)(t=>tq(t.length),"random"),tY=(0,n.__name)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),tJ=(0,n.__name)(function(t,i){let n=i.text.replace(e.common_default.lineBreakRegex," "),[,s]=t5(i.fontSize),h=t.append("text");h.attr("x",i.x),h.attr("y",i.y),h.style("text-anchor",i.anchor),h.style("font-family",i.fontFamily),h.style("font-size",s),h.style("font-weight",i.fontWeight),h.attr("fill",i.fill),void 0!==i.class&&h.attr("class",i.class);let _=h.append("tspan");return _.attr("x",i.x+2*i.textMargin),_.attr("fill",i.fill),_.text(n),h},"drawSimpleText"),tG=(0,G.default)((t,i,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),e.common_default.lineBreakRegex.test(t)))return t;let s=t.split(" ").filter(Boolean),h=[],_="";return s.forEach((t,e)=>{let o=tV(`${t} `,n),a=tV(_,n);if(o>i){let{hyphenatedStrings:e,remainingWord:s}=tZ(t,i,"-",n);h.push(_,...e),_=s}else a+o>=i?(h.push(_),_=t):_=[_,t].filter(Boolean).join(" ");e+1===s.length&&h.push(_)}),h.filter(t=>""!==t).join(n.joinWith)},(t,i,e)=>`${t}${i}${e.fontSize}${e.fontWeight}${e.fontFamily}${e.joinWith}`),tZ=(0,G.default)((t,i,e="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let s=[...t],h=[],_="";return s.forEach((t,o)=>{let a=`${_}${t}`;if(tV(a,n)>=i){let t=s.length===o+1,i=`${a}${e}`;h.push(t?a:i),_=""}else _=a}),{hyphenatedStrings:h,remainingWord:_}},(t,i,e="-",n)=>`${t}${i}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function tQ(t,i){return t0(t,i).height}function tV(t,i){return t0(t,i).width}(0,n.__name)(tQ,"calculateTextHeight"),(0,n.__name)(tV,"calculateTextWidth");var t0=(0,G.default)((t,i)=>{let{fontSize:n=12,fontFamily:s="Arial",fontWeight:h=400}=i;if(!t)return{width:0,height:0};let[,_]=t5(n),o=t.split(e.common_default.lineBreakRegex),a=[],r=(0,J.select)("body");if(!r.remove)return{width:0,height:0,lineHeight:0};let l=r.append("svg");for(let t of["sans-serif",s]){let i=0,e={width:0,height:0,lineHeight:0};for(let n of o){let s=tY();s.text=n||"";let o=tJ(l,s).style("font-size",_).style("font-weight",h).style("font-family",t),a=(o._groups||o)[0][0].getBBox();if(0===a.width&&0===a.height)throw Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,a.width)),i=Math.round(a.height),e.height+=i,e.lineHeight=Math.round(Math.max(e.lineHeight,i))}a.push(e)}l.remove();let c=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[c]},(t,i)=>`${t}${i.fontSize}${i.fontWeight}${i.fontFamily}`),t1=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.__name)(this,"InitIDGenerator")}},t2=(0,n.__name)(function(t){return i=i||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),i.innerHTML=t,unescape(i.textContent)},"entityDecode");function t3(t){return"str"in t}(0,n.__name)(t3,"isDetailedError");var t4=(0,n.__name)((t,i,e,n)=>{if(!n)return;let s=t.node()?.getBBox();s&&t.append("text").text(n).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-e).attr("class",i)},"insertTitle"),t5=(0,n.__name)(t=>{if("number"==typeof t)return[t,t+"px"];let i=parseInt(t??"",10);return Number.isNaN(i)?[void 0,void 0]:t===String(i)?[i,t+"px"]:[i,t]},"parseFontSize");function t6(t,i){return tE({},t,i)}(0,n.__name)(t6,"cleanAndMerge");var t8={assignWithDepth:e.assignWithDepth_default,wrapLabel:tG,calculateTextHeight:tQ,calculateTextWidth:tV,calculateTextDimensions:t0,cleanAndMerge:t6,detectInit:tk,detectDirective:tR,isSubstringInArray:t$,interpolateToCurve:tB,calcLabelPosition:tO,calcCardinalityPosition:tW,calcTerminalLabelPosition:tj,formatUrl:tA,getStylesFromArray:tD,generateId:tK,random:tX,runFunc:tL,entityDecode:t2,insertTitle:t4,isLabelCoordinateInPath:ie,parseFontSize:t5,InitIDGenerator:t1},t9=(0,n.__name)(function(t){let i=t;return(i=(i=i.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){let i=t.substring(1,t.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"})},"encodeEntities"),t7=(0,n.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),it=(0,n.__name)((t,i,{counter:e=0,prefix:n,suffix:s},h)=>h||`${n?`${n}_`:""}${t}_${i}_${e}${s?`_${s}`:""}`,"getEdgeId");function ii(t){return t??null}function ie(t,i){let e=Math.round(t.x),n=Math.round(t.y),s=i.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return s.includes(e.toString())||s.includes(n.toString())}(0,n.__name)(ii,"handleUndefinedAttr"),(0,n.__name)(ie,"isLabelCoordinateInPath"),t.s(["ZERO_WIDTH_SPACE",()=>"","calculateTextHeight",()=>tQ,"calculateTextWidth",()=>tV,"cleanAndMerge",()=>t6,"decodeEntities",()=>t7,"encodeEntities",()=>t9,"generateId",()=>tK,"getEdgeId",()=>it,"getStylesFromArray",()=>tD,"handleUndefinedAttr",()=>ii,"interpolateToCurve",()=>tB,"isDetailedError",()=>t3,"parseFontSize",()=>t5,"random",()=>tX,"removeDirectives",()=>tP,"utils_default",()=>t8,"wrapLabel",()=>tG],612938)}]);
|
|
File without changes
|
|
File without changes
|
/package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_clientMiddlewareManifest.json
RENAMED
|
File without changes
|
|
File without changes
|