@boltic/swirl 1.0.2-uat.83 → 1.0.2-uat.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/swirl.es.js +4 -0
- package/dist/swirl.umd.js +1 -1
- package/package.json +1 -1
package/dist/swirl.es.js
CHANGED
|
@@ -19023,6 +19023,9 @@ const Vhe = ({
|
|
|
19023
19023
|
Pi,
|
|
19024
19024
|
{
|
|
19025
19025
|
fullWidth: !0,
|
|
19026
|
+
multiline: !0,
|
|
19027
|
+
minRows: 1,
|
|
19028
|
+
maxRows: 3,
|
|
19026
19029
|
id: o,
|
|
19027
19030
|
name: s,
|
|
19028
19031
|
inputRef: a,
|
|
@@ -19094,6 +19097,7 @@ const Vhe = ({
|
|
|
19094
19097
|
"& .MuiOutlinedInput-root": {
|
|
19095
19098
|
backgroundColor: e.palette.common.white,
|
|
19096
19099
|
borderRadius: "6px",
|
|
19100
|
+
paddingLeft: 0,
|
|
19097
19101
|
paddingRight: "8px",
|
|
19098
19102
|
minHeight: 46,
|
|
19099
19103
|
"& fieldset": {
|
package/dist/swirl.umd.js
CHANGED
|
@@ -138,7 +138,7 @@ vertical-align: top;
|
|
|
138
138
|
`,Que=[{value:"URL",label:"URL"},{value:"Python",label:"Python"},{value:"cURL",label:"cURL"},{value:"JavaScript",label:"JavaScript"}],zue={URL:"https://cdn.pixelbin.io/v2/fyndcloud/original/url.svg",Python:"https://cdn.pixelbin.io/v2/fyndcloud/fyndst/original/images/svgs/python.svg",cURL:"https://cdn.pixelbin.io/v2/fyndcloud/fyndst/original/images/svgs/curl.svg",JavaScript:"https://cdn.pixelbin.io/v2/fyndcloud/fyndst/original/images/svgs/javascript.svg"},e1={body_type:"text",block_type:"message",bot_name:"",bot_icon:"",channel_id:"",thread_ts:"",send_with_thread:!1,send_as_bot:!0,add_workflow_link:!0,body:"",attachments:[],pause_workflow:!1},F4={body_type:"text",block_type:"message",bot_name:"",bot_icon:"",user_id:null,thread_ts:"",send_with_thread:!1,send_as_bot:!0,add_workflow_link:!0,body:"",pause_workflow:!1},t1={channel_name:""},B4={channel_id:"",topic:""},j4={channel_id:"",user_id:null},$4={emails:[""]},U4={method:"get",endpoint:"",headers:null,query_params:null,state_params:null,body_type:"none",body:""},Xue=["send_public_channel_message","send_private_channel_message","set_channel_topic","invite_users"],Yue=["send_public_channel_message","send_private_channel_message","send_user_message"],que=["create_public_channel","create_private_channel"],Kue=["send_user_message","invite_users"],Cf={id:"id",name:"name"},H4={...Cf,real_name:"profile.real_name",email:"profile.email"},Zue={send_private_channel_message:e1,send_public_channel_message:e1,create_public_channel:t1,create_private_channel:t1,send_user_message:F4,invite_users:j4,set_channel_topic:B4,find_by_email:$4,custom:U4},Jue=[{title:"Message",value:"message"},{title:"Attachment (Legacy)",value:"attachment"}],Od={maximum_timeout:6e4,retry_config:{maximum_attempts:1,backoff_coefficient:2,initial_interval:1e3,maximum_interval:1e5}},Ko={...Od,continue_on_failure:!1},C0=(e,t,n,r)=>({http:{type:t,name:"HTTP",properties:{auth_type:"none",secret:"",methods:["GET"],endpoint:"",query_params:{},state_params:{},headers:{},test_payload:{}}},webhook:{type:t,name:"Webhook",properties:{auth_type:"none",test_payload:{}}},CopilotWebhook:{type:t,name:"Copilot Webhook",properties:{auth_type:"none",test_payload:{}}},calendly:{type:t,name:"Calendly",properties:{calendly_auth_id:"",scope:"",events:[]}},gmail_trigger:{type:t,name:"Gmail",properties:{secret:"",operation:"",label_id:"",label_name:"",filter_by:"",filter_value:""}},boltic_storage:{type:t,name:"Boltic Storage",properties:{events:[]}},boltic_table:{type:t,name:"Boltic Tables",properties:{events:[],table:[],field:[]}},monitor:{type:t,name:"Monitor",properties:{events:[],monitors:[]}},fp_webhook:{type:t,name:"Fynd Platform Webhook",properties:{fp_auth_id:"",event_id:[],events:[],version:"",event_details:{},application_id:[],auth_meta:{},custom_headers:{},domain:""}},schedule:{type:t,name:"Schedule Workflow",properties:{spec:{intervals:[{every:6e5}],calendars:[],cron_expressions:[],start_at:"",end_at:""},test_payload:{}}},slack_trigger:{type:t,name:"Slack Trigger",properties:{slack_auth_id:"",event:"",channel:"",listen_for_bot_message:!1,word:"",username:"",listen_workspace:!1}},apiActivity:{type:t,name:e,properties:{method:"get",endpoint:"",query_params:null,state_params:null,headers:null,body:null,body_type:"none",api_timeout:3e4,branches:[{ref:"success"},{ref:"failure"}],...Od,continue_on_failure:!0}},graphql:{type:t,name:e,properties:{endpoint:"",query:"",variables:{},operation_name:"",headers:{},api_timeout:3e4,branches:[{ref:"success"},{ref:"failure"}],...Od,continue_on_failure:!0}},template:{type:t,name:e,properties:{template:"",...Ko}},functionActivity:{type:t,name:e,properties:{language:"javascript",input_data:{},func:Gue,...Ko}},converterActivity:{type:t,name:e,properties:{from_type:"",to_type:"",query:"",query_options:"",data:"",...Ko}},parallel:{type:t,name:e,properties:{no_of_parallel_threads:1,isolate_flows:!1,...Od}},mapper:{type:t,name:e,properties:{json:{},...Ko}},ifActivity:{type:t,name:e,properties:{branches:[{conditions:[{fact:"",operator:"",data:""}],operators:[],operator_visible:[],ref:"if"},{ref:"else"}],...Od}},switchActivity:{type:t,name:e,properties:{next_counter:1,condition:"",cases:[{caseKey:"case1Handle",caseValue:"",caseType:"string"}],...Od}},loop:{type:t,name:e,properties:{execution_mode:"parallel",loop_input:"",delay:"",batch_size:1,activity:{name:"",type:"",data:{}},...Ko}},sleep:{type:t,name:e,properties:{timeout:3e3}},slackActivity:{type:t,name:e,properties:{slack_auth_id:"",event:"",send_user_message:F4,set_channel_topic:B4,attachment:"",create_private_channel:t1,create_public_channel:t1,invite_users:j4,send_private_channel_message:e1,send_public_channel_message:e1,find_by_email:$4,...Ko}},emailActivity:{type:t,name:e,properties:{email_auth_id:"",subject:"",email_template:k4,attachments:[],to:[],from:"",cc:[],bcc:[],...Ko}},serverless:{type:t,name:e,activity_id:r,properties:n},gpt:{type:t,name:e,properties:{openai_config_id:"",model:"",prompt:"",temperature:1,max_tokens:512,top_p:1,frequency_penalty:0,presence_penalty:0,...Ko}},googleSheetsReadActivity:{type:t,name:e,properties:{credential_id:"",document_id:{},operation:"read_sheet",lookup_column:"",lookup_value:"",sheet_name:{},options:{range:""},custom:{method:"GET",endpoint:"",headers:{},query_params:{},state_params:{},body:""},...Ko}},googleSheetsWriteActivity:{type:t,name:e,properties:{credential_id:"",mode:"",document_id:{},sheet_name:{},row_number:"",operation:"",spreadsheet:{title:"Untitled Spreadsheet",sheets:[{name:"Sheet1"}]},matching_column:"",values_to_append:{},values_to_update:{},column_mapping_mode:"manual",custom:{method:"GET",endpoint:"",headers:{},query_params:{},state_params:{},body:""},...Ko}},googleCalendarActivity:{type:t,name:e,properties:{credential_id:"",return_all:!0,timezone:"Asia/Kolkata",min_date_time:new Date(Date.now()-1296e6).toISOString(),max_date_time:new Date(Date.now()+3888e6).toISOString(),limit:"",attendees:[],event_id:"",show_deleted:!1,operation:"",summary_search_text:"",start_date_time:new Date().toISOString(),end_date_time:new Date(new Date().getTime()+18e5).toISOString(),event_attachments:[],deletion_updates:"",custom:{method:"GET",endpoint:"",headers:{},query_params:{},state_params:{},body:""},...Ko}},googleMeet:{type:t,name:e,properties:{credential_id:"",summary:"",timezone:"",start_date_time:new Date().toISOString(),end_date_time:new Date(new Date().getTime()+18e5).toISOString(),attendees:[],event_description:"",operation:"",custom:{method:"GET",endpoint:"",headers:{},query_params:{},state_params:{},body:""},...Ko}},gmailActivity:{type:t,name:e,properties:{gmail_config_id:"",subject:"",operation:"",email_template:k4,attachments:[],to:[],cc:[],bcc:[],custom:{method:"GET",endpoint:"",headers:{},query_params:{},state_params:{},body:""},...Ko}},browserbase:{type:t,name:e,properties:{secret:"",operation:"",project_id:"",url:"",status:"",...Ko}},logConsole:{type:t,name:e,properties:{console:[""],...Ko}},executeChildWorkflow:{type:t,name:e,properties:{child_workflow_id:"",child_workflow_name:"",version:"",payload:"{}",...Od}},bolticStorageActivity:{type:t,name:e,properties:{...Ko}},bolticTableActivity:{type:t,name:e,properties:{connector:"",database:"",payload:{},filters:[],tabIndex:0,...Ko}},response:{type:t,name:e,properties:{status_code:200,response_headers:{},response_type:"json",response_body:{},...Od}},mcp:{type:t,name:"MCP",properties:{auth_type:"none",test_payload:{}}},askAgent:{type:t,name:e,properties:{createNewThread:!0,createAnonymousUser:!0,createNewUser:!0,...Ko}}})[t];var Wb,V4;function Qb(){if(V4)return Wb;V4=1;var e="\0",t="\0",n="";class r{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(c){c&&(this._isDirected=Object.hasOwn(c,"directed")?c.directed:!0,this._isMultigraph=Object.hasOwn(c,"multigraph")?c.multigraph:!1,this._isCompound=Object.hasOwn(c,"compound")?c.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(c){return this._label=c,this}graph(){return this._label}setDefaultNodeLabel(c){return this._defaultNodeLabelFn=c,typeof c!="function"&&(this._defaultNodeLabelFn=()=>c),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var c=this;return this.nodes().filter(f=>Object.keys(c._in[f]).length===0)}sinks(){var c=this;return this.nodes().filter(f=>Object.keys(c._out[f]).length===0)}setNodes(c,f){var p=arguments,h=this;return c.forEach(function(A){p.length>1?h.setNode(A,f):h.setNode(A)}),this}setNode(c,f){return Object.hasOwn(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=f),this):(this._nodes[c]=arguments.length>1?f:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=t,this._children[c]={},this._children[t][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)}node(c){return this._nodes[c]}hasNode(c){return Object.hasOwn(this._nodes,c)}removeNode(c){var f=this;if(Object.hasOwn(this._nodes,c)){var p=h=>f.removeEdge(f._edgeObjs[h]);delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],this.children(c).forEach(function(h){f.setParent(h)}),delete this._children[c]),Object.keys(this._in[c]).forEach(p),delete this._in[c],delete this._preds[c],Object.keys(this._out[c]).forEach(p),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this}setParent(c,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(f===void 0)f=t;else{f+="";for(var p=f;p!==void 0;p=this.parent(p))if(p===c)throw new Error("Setting "+f+" as parent of "+c+" would create a cycle");this.setNode(f)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=f,this._children[f][c]=!0,this}_removeFromParentsChildList(c){delete this._children[this._parent[c]][c]}parent(c){if(this._isCompound){var f=this._parent[c];if(f!==t)return f}}children(c=t){if(this._isCompound){var f=this._children[c];if(f)return Object.keys(f)}else{if(c===t)return this.nodes();if(this.hasNode(c))return[]}}predecessors(c){var f=this._preds[c];if(f)return Object.keys(f)}successors(c){var f=this._sucs[c];if(f)return Object.keys(f)}neighbors(c){var f=this.predecessors(c);if(f){const h=new Set(f);for(var p of this.successors(c))h.add(p);return Array.from(h.values())}}isLeaf(c){var f;return this.isDirected()?f=this.successors(c):f=this.neighbors(c),f.length===0}filterNodes(c){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var p=this;Object.entries(this._nodes).forEach(function([g,m]){c(g)&&f.setNode(g,m)}),Object.values(this._edgeObjs).forEach(function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,p.edge(g))});var h={};function A(g){var m=p.parent(g);return m===void 0||f.hasNode(m)?(h[g]=m,m):m in h?h[m]:A(m)}return this._isCompound&&f.nodes().forEach(g=>f.setParent(g,A(g))),f}setDefaultEdgeLabel(c){return this._defaultEdgeLabelFn=c,typeof c!="function"&&(this._defaultEdgeLabelFn=()=>c),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(c,f){var p=this,h=arguments;return c.reduce(function(A,g){return h.length>1?p.setEdge(A,g,f):p.setEdge(A,g),g}),this}setEdge(){var c,f,p,h,A=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(c=g.v,f=g.w,p=g.name,arguments.length===2&&(h=arguments[1],A=!0)):(c=g,f=arguments[1],p=arguments[3],arguments.length>2&&(h=arguments[2],A=!0)),c=""+c,f=""+f,p!==void 0&&(p=""+p);var m=s(this._isDirected,c,f,p);if(Object.hasOwn(this._edgeLabels,m))return A&&(this._edgeLabels[m]=h),this;if(p!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(f),this._edgeLabels[m]=A?h:this._defaultEdgeLabelFn(c,f,p);var O=a(this._isDirected,c,f,p);return c=O.v,f=O.w,Object.freeze(O),this._edgeObjs[m]=O,i(this._preds[f],c),i(this._sucs[c],f),this._in[f][m]=O,this._out[c][m]=O,this._edgeCount++,this}edge(c,f,p){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,p);return this._edgeLabels[h]}edgeAsObj(){const c=this.edge(...arguments);return typeof c!="object"?{label:c}:c}hasEdge(c,f,p){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,p);return Object.hasOwn(this._edgeLabels,h)}removeEdge(c,f,p){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,p),A=this._edgeObjs[h];return A&&(c=A.v,f=A.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[f],c),o(this._sucs[c],f),delete this._in[f][h],delete this._out[c][h],this._edgeCount--),this}inEdges(c,f){var p=this._in[c];if(p){var h=Object.values(p);return f?h.filter(A=>A.v===f):h}}outEdges(c,f){var p=this._out[c];if(p){var h=Object.values(p);return f?h.filter(A=>A.w===f):h}}nodeEdges(c,f){var p=this.inEdges(c,f);if(p)return p.concat(this.outEdges(c,f))}}function i(u,c){u[c]?u[c]++:u[c]=1}function o(u,c){--u[c]||delete u[c]}function s(u,c,f,p){var h=""+c,A=""+f;if(!u&&h>A){var g=h;h=A,A=g}return h+n+A+n+(p===void 0?e:p)}function a(u,c,f,p){var h=""+c,A=""+f;if(!u&&h>A){var g=h;h=A,A=g}var m={v:h,w:A};return p&&(m.name=p),m}function l(u,c){return s(u,c.v,c.w,c.name)}return Wb=r,Wb}var zb,G4;function ece(){return G4||(G4=1,zb="2.2.4"),zb}var Xb,W4;function tce(){return W4||(W4=1,Xb={Graph:Qb(),version:ece()}),Xb}var Yb,Q4;function nce(){if(Q4)return Yb;Q4=1;var e=Qb();Yb={write:t,read:i};function t(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:n(o),edges:r(o)};return o.graph()!==void 0&&(s.value=structuredClone(o.graph())),s}function n(o){return o.nodes().map(function(s){var a=o.node(s),l=o.parent(s),u={v:s};return a!==void 0&&(u.value=a),l!==void 0&&(u.parent=l),u})}function r(o){return o.edges().map(function(s){var a=o.edge(s),l={v:s.v,w:s.w};return s.name!==void 0&&(l.name=s.name),a!==void 0&&(l.value=a),l})}function i(o){var s=new e(o.options).setGraph(o.value);return o.nodes.forEach(function(a){s.setNode(a.v,a.value),a.parent&&s.setParent(a.v,a.parent)}),o.edges.forEach(function(a){s.setEdge({v:a.v,w:a.w,name:a.name},a.value)}),s}return Yb}var qb,z4;function rce(){if(z4)return qb;z4=1,qb=e;function e(t){var n={},r=[],i;function o(s){Object.hasOwn(n,s)||(n[s]=!0,i.push(s),t.successors(s).forEach(o),t.predecessors(s).forEach(o))}return t.nodes().forEach(function(s){i=[],o(s),i.length&&r.push(i)}),r}return qb}var Kb,X4;function Y4(){if(X4)return Kb;X4=1;class e{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var i=this._keyIndices;if(n=String(n),!Object.hasOwn(i,n)){var o=this._arr,s=o.length;return i[n]=s,o.push({key:n,priority:r}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)}_heapify(n){var r=this._arr,i=2*n,o=i+1,s=n;i<r.length&&(s=r[i].priority<r[s].priority?i:s,o<r.length&&(s=r[o].priority<r[s].priority?o:s),s!==n&&(this._swap(n,s),this._heapify(s)))}_decrease(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o}_swap(n,r){var i=this._arr,o=this._keyIndices,s=i[n],a=i[r];i[n]=a,i[r]=s,o[a.key]=n,o[s.key]=r}}return Kb=e,Kb}var Zb,q4;function K4(){if(q4)return Zb;q4=1;var e=Y4();Zb=n;var t=()=>1;function n(i,o,s,a){return r(i,String(o),s||t,a||function(l){return i.outEdges(l)})}function r(i,o,s,a){var l={},u=new e,c,f,p=function(h){var A=h.v!==c?h.v:h.w,g=l[A],m=s(h),O=f.distance+m;if(m<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+h+" Weight: "+m);O<g.distance&&(g.distance=O,g.predecessor=c,u.decrease(A,O))};for(i.nodes().forEach(function(h){var A=h===o?0:Number.POSITIVE_INFINITY;l[h]={distance:A},u.add(h,A)});u.size()>0&&(c=u.removeMin(),f=l[c],f.distance!==Number.POSITIVE_INFINITY);)a(c).forEach(p);return l}return Zb}var Jb,Z4;function ice(){if(Z4)return Jb;Z4=1;var e=K4();Jb=t;function t(n,r,i){return n.nodes().reduce(function(o,s){return o[s]=e(n,s,r,i),o},{})}return Jb}var eC,J4;function ek(){if(J4)return eC;J4=1,eC=e;function e(t){var n=0,r=[],i={},o=[];function s(a){var l=i[a]={onStack:!0,lowlink:n,index:n++};if(r.push(a),t.successors(a).forEach(function(f){Object.hasOwn(i,f)?i[f].onStack&&(l.lowlink=Math.min(l.lowlink,i[f].index)):(s(f),l.lowlink=Math.min(l.lowlink,i[f].lowlink))}),l.lowlink===l.index){var u=[],c;do c=r.pop(),i[c].onStack=!1,u.push(c);while(a!==c);o.push(u)}}return t.nodes().forEach(function(a){Object.hasOwn(i,a)||s(a)}),o}return eC}var tC,tk;function oce(){if(tk)return tC;tk=1;var e=ek();tC=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return tC}var nC,nk;function sce(){if(nk)return nC;nk=1,nC=t;var e=()=>1;function t(r,i,o){return n(r,i||e,o||function(s){return r.outEdges(s)})}function n(r,i,o){var s={},a=r.nodes();return a.forEach(function(l){s[l]={},s[l][l]={distance:0},a.forEach(function(u){l!==u&&(s[l][u]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(u){var c=u.v===l?u.w:u.v,f=i(u);s[l][c]={distance:f,predecessor:l}})}),a.forEach(function(l){var u=s[l];a.forEach(function(c){var f=s[c];a.forEach(function(p){var h=f[l],A=u[p],g=f[p],m=h.distance+A.distance;m<g.distance&&(g.distance=m,g.predecessor=A.predecessor)})})}),s}return nC}var rC,rk;function ik(){if(rk)return rC;rk=1;function e(n){var r={},i={},o=[];function s(a){if(Object.hasOwn(i,a))throw new t;Object.hasOwn(r,a)||(i[a]=!0,r[a]=!0,n.predecessors(a).forEach(s),delete i[a],o.push(a))}if(n.sinks().forEach(s),Object.keys(r).length!==n.nodeCount())throw new t;return o}class t extends Error{constructor(){super(...arguments)}}return rC=e,e.CycleException=t,rC}var iC,ok;function ace(){if(ok)return iC;ok=1;var e=ik();iC=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return iC}var oC,sk;function ak(){if(sk)return oC;sk=1,oC=e;function e(i,o,s){Array.isArray(o)||(o=[o]);var a=i.isDirected()?f=>i.successors(f):f=>i.neighbors(f),l=s==="post"?t:n,u=[],c={};return o.forEach(f=>{if(!i.hasNode(f))throw new Error("Graph does not have node: "+f);l(f,a,c,u)}),u}function t(i,o,s,a){for(var l=[[i,!1]];l.length>0;){var u=l.pop();u[1]?a.push(u[0]):Object.hasOwn(s,u[0])||(s[u[0]]=!0,l.push([u[0],!0]),r(o(u[0]),c=>l.push([c,!1])))}}function n(i,o,s,a){for(var l=[i];l.length>0;){var u=l.pop();Object.hasOwn(s,u)||(s[u]=!0,a.push(u),r(o(u),c=>l.push(c)))}}function r(i,o){for(var s=i.length;s--;)o(i[s],s,i);return i}return oC}var sC,lk;function lce(){if(lk)return sC;lk=1;var e=ak();sC=t;function t(n,r){return e(n,r,"post")}return sC}var aC,uk;function uce(){if(uk)return aC;uk=1;var e=ak();aC=t;function t(n,r){return e(n,r,"pre")}return aC}var lC,ck;function cce(){if(ck)return lC;ck=1;var e=Qb(),t=Y4();lC=n;function n(r,i){var o=new e,s={},a=new t,l;function u(f){var p=f.v===l?f.w:f.v,h=a.priority(p);if(h!==void 0){var A=i(f);A<h&&(s[p]=l,a.decrease(p,A))}}if(r.nodeCount()===0)return o;r.nodes().forEach(function(f){a.add(f,Number.POSITIVE_INFINITY),o.setNode(f)}),a.decrease(r.nodes()[0],0);for(var c=!1;a.size()>0;){if(l=a.removeMin(),Object.hasOwn(s,l))o.setEdge(l,s[l]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(l).forEach(u)}return o}return lC}var uC,dk;function dce(){return dk||(dk=1,uC={components:rce(),dijkstra:K4(),dijkstraAll:ice(),findCycles:oce(),floydWarshall:sce(),isAcyclic:ace(),postorder:lce(),preorder:uce(),prim:cce(),tarjan:ek(),topsort:ik()}),uC}var cC,fk;function Ll(){if(fk)return cC;fk=1;var e=tce();return cC={Graph:e.Graph,json:nce(),alg:dce(),version:e.version},cC}var dC,pk;function fce(){if(pk)return dC;pk=1;class e{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,o=i._prev;if(o!==i)return t(o),o}enqueue(i){let o=this._sentinel;i._prev&&i._next&&t(i),i._next=o._next,o._next._prev=i,o._next=i,i._prev=o}toString(){let i=[],o=this._sentinel,s=o._prev;for(;s!==o;)i.push(JSON.stringify(s,n)),s=s._prev;return"["+i.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return dC=e,dC}var fC,hk;function pce(){if(hk)return fC;hk=1;let e=Ll().Graph,t=fce();fC=r;let n=()=>1;function r(u,c){if(u.nodeCount()<=1)return[];let f=s(u,c||n);return i(f.graph,f.buckets,f.zeroIdx).flatMap(h=>u.outEdges(h.v,h.w))}function i(u,c,f){let p=[],h=c[c.length-1],A=c[0],g;for(;u.nodeCount();){for(;g=A.dequeue();)o(u,c,f,g);for(;g=h.dequeue();)o(u,c,f,g);if(u.nodeCount()){for(let m=c.length-2;m>0;--m)if(g=c[m].dequeue(),g){p=p.concat(o(u,c,f,g,!0));break}}}return p}function o(u,c,f,p,h){let A=h?[]:void 0;return u.inEdges(p.v).forEach(g=>{let m=u.edge(g),O=u.node(g.v);h&&A.push({v:g.v,w:g.w}),O.out-=m,a(c,f,O)}),u.outEdges(p.v).forEach(g=>{let m=u.edge(g),O=g.w,y=u.node(O);y.in-=m,a(c,f,y)}),u.removeNode(p.v),A}function s(u,c){let f=new e,p=0,h=0;u.nodes().forEach(m=>{f.setNode(m,{v:m,in:0,out:0})}),u.edges().forEach(m=>{let O=f.edge(m.v,m.w)||0,y=c(m),v=O+y;f.setEdge(m.v,m.w,v),h=Math.max(h,f.node(m.v).out+=y),p=Math.max(p,f.node(m.w).in+=y)});let A=l(h+p+3).map(()=>new t),g=p+1;return f.nodes().forEach(m=>{a(A,g,f.node(m))}),{graph:f,buckets:A,zeroIdx:g}}function a(u,c,f){f.out?f.in?u[f.out-f.in+c].enqueue(f):u[u.length-1].enqueue(f):u[0].enqueue(f)}function l(u){const c=[];for(let f=0;f<u;f++)c.push(f);return c}return fC}var pC,Ak;function To(){if(Ak)return pC;Ak=1;let e=Ll().Graph;pC={addBorderNode:c,addDummyNode:t,applyWithChunking:h,asNonCompoundGraph:r,buildLayerMatrix:a,intersectRect:s,mapValues:x,maxRank:A,normalizeRanks:l,notime:O,partition:g,pick:_,predecessorWeights:o,range:T,removeEmptyRanks:u,simplify:n,successorWeights:i,time:m,uniqueId:v,zipObject:b};function t(w,D,I,P){for(var k=P;w.hasNode(k);)k=v(P);return I.dummy=D,w.setNode(k,I),k}function n(w){let D=new e().setGraph(w.graph());return w.nodes().forEach(I=>D.setNode(I,w.node(I))),w.edges().forEach(I=>{let P=D.edge(I.v,I.w)||{weight:0,minlen:1},k=w.edge(I);D.setEdge(I.v,I.w,{weight:P.weight+k.weight,minlen:Math.max(P.minlen,k.minlen)})}),D}function r(w){let D=new e({multigraph:w.isMultigraph()}).setGraph(w.graph());return w.nodes().forEach(I=>{w.children(I).length||D.setNode(I,w.node(I))}),w.edges().forEach(I=>{D.setEdge(I,w.edge(I))}),D}function i(w){let D=w.nodes().map(I=>{let P={};return w.outEdges(I).forEach(k=>{P[k.w]=(P[k.w]||0)+w.edge(k).weight}),P});return b(w.nodes(),D)}function o(w){let D=w.nodes().map(I=>{let P={};return w.inEdges(I).forEach(k=>{P[k.v]=(P[k.v]||0)+w.edge(k).weight}),P});return b(w.nodes(),D)}function s(w,D){let I=w.x,P=w.y,k=D.x-I,N=D.y-P,L=w.width/2,M=w.height/2;if(!k&&!N)throw new Error("Not possible to find intersection inside of the rectangle");let B,Q;return Math.abs(N)*L>Math.abs(k)*M?(N<0&&(M=-M),B=M*k/N,Q=M):(k<0&&(L=-L),B=L,Q=L*N/k),{x:I+B,y:P+Q}}function a(w){let D=T(A(w)+1).map(()=>[]);return w.nodes().forEach(I=>{let P=w.node(I),k=P.rank;k!==void 0&&(D[k][P.order]=I)}),D}function l(w){let D=w.nodes().map(P=>{let k=w.node(P).rank;return k===void 0?Number.MAX_VALUE:k}),I=h(Math.min,D);w.nodes().forEach(P=>{let k=w.node(P);Object.hasOwn(k,"rank")&&(k.rank-=I)})}function u(w){let D=w.nodes().map(L=>w.node(L).rank),I=h(Math.min,D),P=[];w.nodes().forEach(L=>{let M=w.node(L).rank-I;P[M]||(P[M]=[]),P[M].push(L)});let k=0,N=w.graph().nodeRankFactor;Array.from(P).forEach((L,M)=>{L===void 0&&M%N!==0?--k:L!==void 0&&k&&L.forEach(B=>w.node(B).rank+=k)})}function c(w,D,I,P){let k={width:0,height:0};return arguments.length>=4&&(k.rank=I,k.order=P),t(w,"border",k,D)}function f(w,D=p){const I=[];for(let P=0;P<w.length;P+=D){const k=w.slice(P,P+D);I.push(k)}return I}const p=65535;function h(w,D){if(D.length>p){const I=f(D);return w.apply(null,I.map(P=>w.apply(null,P)))}else return w.apply(null,D)}function A(w){const I=w.nodes().map(P=>{let k=w.node(P).rank;return k===void 0?Number.MIN_VALUE:k});return h(Math.max,I)}function g(w,D){let I={lhs:[],rhs:[]};return w.forEach(P=>{D(P)?I.lhs.push(P):I.rhs.push(P)}),I}function m(w,D){let I=Date.now();return D()}function O(w,D){return D()}let y=0;function v(w){var D=++y;return w+(""+D)}function T(w,D,I=1){D==null&&(D=w,w=0);let P=N=>N<D;I<0&&(P=N=>D<N);const k=[];for(let N=w;P(N);N+=I)k.push(N);return k}function _(w,D){const I={};for(const P of D)w[P]!==void 0&&(I[P]=w[P]);return I}function x(w,D){let I=D;return typeof D=="string"&&(I=P=>P[D]),Object.entries(w).reduce((P,[k,N])=>(P[k]=I(N,k),P),{})}function b(w,D){return w.reduce((I,P,k)=>(I[P]=D[k],I),{})}return pC}var hC,mk;function hce(){if(mk)return hC;mk=1;let e=pce(),t=To().uniqueId;hC={run:n,undo:i};function n(o){(o.graph().acyclicer==="greedy"?e(o,a(o)):r(o)).forEach(l=>{let u=o.edge(l);o.removeEdge(l),u.forwardName=l.name,u.reversed=!0,o.setEdge(l.w,l.v,u,t("rev"))});function a(l){return u=>l.edge(u).weight}}function r(o){let s=[],a={},l={};function u(c){Object.hasOwn(l,c)||(l[c]=!0,a[c]=!0,o.outEdges(c).forEach(f=>{Object.hasOwn(a,f.w)?s.push(f):u(f.w)}),delete a[c])}return o.nodes().forEach(u),s}function i(o){o.edges().forEach(s=>{let a=o.edge(s);if(a.reversed){o.removeEdge(s);let l=a.forwardName;delete a.reversed,delete a.forwardName,o.setEdge(s.w,s.v,a,l)}})}return hC}var AC,gk;function Ace(){if(gk)return AC;gk=1;let e=To();AC={run:t,undo:r};function t(i){i.graph().dummyChains=[],i.edges().forEach(o=>n(i,o))}function n(i,o){let s=o.v,a=i.node(s).rank,l=o.w,u=i.node(l).rank,c=o.name,f=i.edge(o),p=f.labelRank;if(u===a+1)return;i.removeEdge(o);let h,A,g;for(g=0,++a;a<u;++g,++a)f.points=[],A={width:0,height:0,edgeLabel:f,edgeObj:o,rank:a},h=e.addDummyNode(i,"edge",A,"_d"),a===p&&(A.width=f.width,A.height=f.height,A.dummy="edge-label",A.labelpos=f.labelpos),i.setEdge(s,h,{weight:f.weight},c),g===0&&i.graph().dummyChains.push(h),s=h;i.setEdge(s,l,{weight:f.weight},c)}function r(i){i.graph().dummyChains.forEach(o=>{let s=i.node(o),a=s.edgeLabel,l;for(i.setEdge(s.edgeObj,a);s.dummy;)l=i.successors(o)[0],i.removeNode(o),a.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(a.x=s.x,a.y=s.y,a.width=s.width,a.height=s.height),o=l,s=i.node(o)})}return AC}var mC,Ek;function n1(){if(Ek)return mC;Ek=1;const{applyWithChunking:e}=To();mC={longestPath:t,slack:n};function t(r){var i={};function o(s){var a=r.node(s);if(Object.hasOwn(i,s))return a.rank;i[s]=!0;let l=r.outEdges(s).map(c=>c==null?Number.POSITIVE_INFINITY:o(c.w)-r.edge(c).minlen);var u=e(Math.min,l);return u===Number.POSITIVE_INFINITY&&(u=0),a.rank=u}r.sources().forEach(o)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return mC}var gC,Ok;function yk(){if(Ok)return gC;Ok=1;var e=Ll().Graph,t=n1().slack;gC=n;function n(s){var a=new e({directed:!1}),l=s.nodes()[0],u=s.nodeCount();a.setNode(l,{});for(var c,f;r(a,s)<u;)c=i(a,s),f=a.hasNode(c.v)?t(s,c):-t(s,c),o(a,s,f);return a}function r(s,a){function l(u){a.nodeEdges(u).forEach(c=>{var f=c.v,p=u===f?c.w:f;!s.hasNode(p)&&!t(a,c)&&(s.setNode(p,{}),s.setEdge(u,p,{}),l(p))})}return s.nodes().forEach(l),s.nodeCount()}function i(s,a){return a.edges().reduce((u,c)=>{let f=Number.POSITIVE_INFINITY;return s.hasNode(c.v)!==s.hasNode(c.w)&&(f=t(a,c)),f<u[0]?[f,c]:u},[Number.POSITIVE_INFINITY,null])[1]}function o(s,a,l){s.nodes().forEach(u=>a.node(u).rank+=l)}return gC}var EC,vk;function mce(){if(vk)return EC;vk=1;var e=yk(),t=n1().slack,n=n1().longestPath,r=Ll().alg.preorder,i=Ll().alg.postorder,o=To().simplify;EC=s,s.initLowLimValues=c,s.initCutValues=a,s.calcCutValue=u,s.leaveEdge=p,s.enterEdge=h,s.exchangeEdges=A;function s(y){y=o(y),n(y);var v=e(y);c(v),a(v,y);for(var T,_;T=p(v);)_=h(v,y,T),A(v,y,T,_)}function a(y,v){var T=i(y,y.nodes());T=T.slice(0,T.length-1),T.forEach(_=>l(y,v,_))}function l(y,v,T){var _=y.node(T),x=_.parent;y.edge(T,x).cutvalue=u(y,v,T)}function u(y,v,T){var _=y.node(T),x=_.parent,b=!0,w=v.edge(T,x),D=0;return w||(b=!1,w=v.edge(x,T)),D=w.weight,v.nodeEdges(T).forEach(I=>{var P=I.v===T,k=P?I.w:I.v;if(k!==x){var N=P===b,L=v.edge(I).weight;if(D+=N?L:-L,m(y,T,k)){var M=y.edge(T,k).cutvalue;D+=N?-M:M}}}),D}function c(y,v){arguments.length<2&&(v=y.nodes()[0]),f(y,{},1,v)}function f(y,v,T,_,x){var b=T,w=y.node(_);return v[_]=!0,y.neighbors(_).forEach(D=>{Object.hasOwn(v,D)||(T=f(y,v,T,D,_))}),w.low=b,w.lim=T++,x?w.parent=x:delete w.parent,T}function p(y){return y.edges().find(v=>y.edge(v).cutvalue<0)}function h(y,v,T){var _=T.v,x=T.w;v.hasEdge(_,x)||(_=T.w,x=T.v);var b=y.node(_),w=y.node(x),D=b,I=!1;b.lim>w.lim&&(D=w,I=!0);var P=v.edges().filter(k=>I===O(y,y.node(k.v),D)&&I!==O(y,y.node(k.w),D));return P.reduce((k,N)=>t(v,N)<t(v,k)?N:k)}function A(y,v,T,_){var x=T.v,b=T.w;y.removeEdge(x,b),y.setEdge(_.v,_.w,{}),c(y),a(y,v),g(y,v)}function g(y,v){var T=y.nodes().find(x=>!v.node(x).parent),_=r(y,T);_=_.slice(1),_.forEach(x=>{var b=y.node(x).parent,w=v.edge(x,b),D=!1;w||(w=v.edge(b,x),D=!0),v.node(x).rank=v.node(b).rank+(D?w.minlen:-w.minlen)})}function m(y,v,T){return y.hasEdge(v,T)}function O(y,v,T){return T.low<=v.lim&&v.lim<=T.lim}return EC}var OC,Tk;function gce(){if(Tk)return OC;Tk=1;var e=n1(),t=e.longestPath,n=yk(),r=mce();OC=i;function i(l){var u=l.graph().ranker;if(u instanceof Function)return u(l);switch(l.graph().ranker){case"network-simplex":a(l);break;case"tight-tree":s(l);break;case"longest-path":o(l);break;case"none":break;default:a(l)}}var o=t;function s(l){t(l),n(l)}function a(l){r(l)}return OC}var yC,Sk;function Ece(){if(Sk)return yC;Sk=1,yC=e;function e(r){let i=n(r);r.graph().dummyChains.forEach(o=>{let s=r.node(o),a=s.edgeObj,l=t(r,i,a.v,a.w),u=l.path,c=l.lca,f=0,p=u[f],h=!0;for(;o!==a.w;){if(s=r.node(o),h){for(;(p=u[f])!==c&&r.node(p).maxRank<s.rank;)f++;p===c&&(h=!1)}if(!h){for(;f<u.length-1&&r.node(p=u[f+1]).minRank<=s.rank;)f++;p=u[f]}r.setParent(o,p),o=r.successors(o)[0]}})}function t(r,i,o,s){let a=[],l=[],u=Math.min(i[o].low,i[s].low),c=Math.max(i[o].lim,i[s].lim),f,p;f=o;do f=r.parent(f),a.push(f);while(f&&(i[f].low>u||c>i[f].lim));for(p=f,f=s;(f=r.parent(f))!==p;)l.push(f);return{path:a.concat(l.reverse()),lca:p}}function n(r){let i={},o=0;function s(a){let l=o;r.children(a).forEach(s),i[a]={low:l,lim:o++}}return r.children().forEach(s),i}return yC}var vC,xk;function Oce(){if(xk)return vC;xk=1;let e=To();vC={run:t,cleanup:o};function t(s){let a=e.addDummyNode(s,"root",{},"_root"),l=r(s),u=Object.values(l),c=e.applyWithChunking(Math.max,u)-1,f=2*c+1;s.graph().nestingRoot=a,s.edges().forEach(h=>s.edge(h).minlen*=f);let p=i(s)+1;s.children().forEach(h=>n(s,a,f,p,c,l,h)),s.graph().nodeRankFactor=f}function n(s,a,l,u,c,f,p){let h=s.children(p);if(!h.length){p!==a&&s.setEdge(a,p,{weight:0,minlen:l});return}let A=e.addBorderNode(s,"_bt"),g=e.addBorderNode(s,"_bb"),m=s.node(p);s.setParent(A,p),m.borderTop=A,s.setParent(g,p),m.borderBottom=g,h.forEach(O=>{n(s,a,l,u,c,f,O);let y=s.node(O),v=y.borderTop?y.borderTop:O,T=y.borderBottom?y.borderBottom:O,_=y.borderTop?u:2*u,x=v!==T?1:c-f[p]+1;s.setEdge(A,v,{weight:_,minlen:x,nestingEdge:!0}),s.setEdge(T,g,{weight:_,minlen:x,nestingEdge:!0})}),s.parent(p)||s.setEdge(a,A,{weight:0,minlen:c+f[p]})}function r(s){var a={};function l(u,c){var f=s.children(u);f&&f.length&&f.forEach(p=>l(p,c+1)),a[u]=c}return s.children().forEach(u=>l(u,1)),a}function i(s){return s.edges().reduce((a,l)=>a+s.edge(l).weight,0)}function o(s){var a=s.graph();s.removeNode(a.nestingRoot),delete a.nestingRoot,s.edges().forEach(l=>{var u=s.edge(l);u.nestingEdge&&s.removeEdge(l)})}return vC}var TC,bk;function yce(){if(bk)return TC;bk=1;let e=To();TC=t;function t(r){function i(o){let s=r.children(o),a=r.node(o);if(s.length&&s.forEach(i),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let l=a.minRank,u=a.maxRank+1;l<u;++l)n(r,"borderLeft","_bl",o,a,l),n(r,"borderRight","_br",o,a,l)}}r.children().forEach(i)}function n(r,i,o,s,a,l){let u={width:0,height:0,rank:l,borderType:i},c=a[i][l-1],f=e.addDummyNode(r,"border",u,o);a[i][l]=f,r.setParent(f,s),c&&r.setEdge(c,f,{weight:1})}return TC}var SC,Ck;function vce(){if(Ck)return SC;Ck=1,SC={adjust:e,undo:t};function e(l){let u=l.graph().rankdir.toLowerCase();(u==="lr"||u==="rl")&&n(l)}function t(l){let u=l.graph().rankdir.toLowerCase();(u==="bt"||u==="rl")&&i(l),(u==="lr"||u==="rl")&&(s(l),n(l))}function n(l){l.nodes().forEach(u=>r(l.node(u))),l.edges().forEach(u=>r(l.edge(u)))}function r(l){let u=l.width;l.width=l.height,l.height=u}function i(l){l.nodes().forEach(u=>o(l.node(u))),l.edges().forEach(u=>{let c=l.edge(u);c.points.forEach(o),Object.hasOwn(c,"y")&&o(c)})}function o(l){l.y=-l.y}function s(l){l.nodes().forEach(u=>a(l.node(u))),l.edges().forEach(u=>{let c=l.edge(u);c.points.forEach(a),Object.hasOwn(c,"x")&&a(c)})}function a(l){let u=l.x;l.x=l.y,l.y=u}return SC}var xC,_k;function Tce(){if(_k)return xC;_k=1;let e=To();xC=t;function t(n){let r={},i=n.nodes().filter(c=>!n.children(c).length),o=i.map(c=>n.node(c).rank),s=e.applyWithChunking(Math.max,o),a=e.range(s+1).map(()=>[]);function l(c){if(r[c])return;r[c]=!0;let f=n.node(c);a[f.rank].push(c),n.successors(c).forEach(l)}return i.sort((c,f)=>n.node(c).rank-n.node(f).rank).forEach(l),a}return xC}var bC,wk;function Sce(){if(wk)return bC;wk=1;let e=To().zipObject;bC=t;function t(r,i){let o=0;for(let s=1;s<i.length;++s)o+=n(r,i[s-1],i[s]);return o}function n(r,i,o){let s=e(o,o.map((p,h)=>h)),a=i.flatMap(p=>r.outEdges(p).map(h=>({pos:s[h.w],weight:r.edge(h).weight})).sort((h,A)=>h.pos-A.pos)),l=1;for(;l<o.length;)l<<=1;let u=2*l-1;l-=1;let c=new Array(u).fill(0),f=0;return a.forEach(p=>{let h=p.pos+l;c[h]+=p.weight;let A=0;for(;h>0;)h%2&&(A+=c[h+1]),h=h-1>>1,c[h]+=p.weight;f+=p.weight*A}),f}return bC}var CC,Ik;function xce(){if(Ik)return CC;Ik=1,CC=e;function e(t,n=[]){return n.map(r=>{let i=t.inEdges(r);if(i.length){let o=i.reduce((s,a)=>{let l=t.edge(a),u=t.node(a.v);return{sum:s.sum+l.weight*u.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:r}})}return CC}var _C,Dk;function bce(){if(Dk)return _C;Dk=1;let e=To();_C=t;function t(i,o){let s={};i.forEach((l,u)=>{let c=s[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:u};l.barycenter!==void 0&&(c.barycenter=l.barycenter,c.weight=l.weight)}),o.edges().forEach(l=>{let u=s[l.v],c=s[l.w];u!==void 0&&c!==void 0&&(c.indegree++,u.out.push(s[l.w]))});let a=Object.values(s).filter(l=>!l.indegree);return n(a)}function n(i){let o=[];function s(l){return u=>{u.merged||(u.barycenter===void 0||l.barycenter===void 0||u.barycenter>=l.barycenter)&&r(l,u)}}function a(l){return u=>{u.in.push(l),--u.indegree===0&&i.push(u)}}for(;i.length;){let l=i.pop();o.push(l),l.in.reverse().forEach(s(l)),l.out.forEach(a(l))}return o.filter(l=>!l.merged).map(l=>e.pick(l,["vs","i","barycenter","weight"]))}function r(i,o){let s=0,a=0;i.weight&&(s+=i.barycenter*i.weight,a+=i.weight),o.weight&&(s+=o.barycenter*o.weight,a+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=s/a,i.weight=a,i.i=Math.min(o.i,i.i),o.merged=!0}return _C}var wC,Rk;function Cce(){if(Rk)return wC;Rk=1;let e=To();wC=t;function t(i,o){let s=e.partition(i,A=>Object.hasOwn(A,"barycenter")),a=s.lhs,l=s.rhs.sort((A,g)=>g.i-A.i),u=[],c=0,f=0,p=0;a.sort(r(!!o)),p=n(u,l,p),a.forEach(A=>{p+=A.vs.length,u.push(A.vs),c+=A.barycenter*A.weight,f+=A.weight,p=n(u,l,p)});let h={vs:u.flat(!0)};return f&&(h.barycenter=c/f,h.weight=f),h}function n(i,o,s){let a;for(;o.length&&(a=o[o.length-1]).i<=s;)o.pop(),i.push(a.vs),s++;return s}function r(i){return(o,s)=>o.barycenter<s.barycenter?-1:o.barycenter>s.barycenter?1:i?s.i-o.i:o.i-s.i}return wC}var IC,Pk;function _ce(){if(Pk)return IC;Pk=1;let e=xce(),t=bce(),n=Cce();IC=r;function r(s,a,l,u){let c=s.children(a),f=s.node(a),p=f?f.borderLeft:void 0,h=f?f.borderRight:void 0,A={};p&&(c=c.filter(y=>y!==p&&y!==h));let g=e(s,c);g.forEach(y=>{if(s.children(y.v).length){let v=r(s,y.v,l,u);A[y.v]=v,Object.hasOwn(v,"barycenter")&&o(y,v)}});let m=t(g,l);i(m,A);let O=n(m,u);if(p&&(O.vs=[p,O.vs,h].flat(!0),s.predecessors(p).length)){let y=s.node(s.predecessors(p)[0]),v=s.node(s.predecessors(h)[0]);Object.hasOwn(O,"barycenter")||(O.barycenter=0,O.weight=0),O.barycenter=(O.barycenter*O.weight+y.order+v.order)/(O.weight+2),O.weight+=2}return O}function i(s,a){s.forEach(l=>{l.vs=l.vs.flatMap(u=>a[u]?a[u].vs:u)})}function o(s,a){s.barycenter!==void 0?(s.barycenter=(s.barycenter*s.weight+a.barycenter*a.weight)/(s.weight+a.weight),s.weight+=a.weight):(s.barycenter=a.barycenter,s.weight=a.weight)}return IC}var DC,Nk;function wce(){if(Nk)return DC;Nk=1;let e=Ll().Graph,t=To();DC=n;function n(i,o,s,a){a||(a=i.nodes());let l=r(i),u=new e({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(c=>i.node(c));return a.forEach(c=>{let f=i.node(c),p=i.parent(c);(f.rank===o||f.minRank<=o&&o<=f.maxRank)&&(u.setNode(c),u.setParent(c,p||l),i[s](c).forEach(h=>{let A=h.v===c?h.w:h.v,g=u.edge(A,c),m=g!==void 0?g.weight:0;u.setEdge(A,c,{weight:i.edge(h).weight+m})}),Object.hasOwn(f,"minRank")&&u.setNode(c,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),u}function r(i){for(var o;i.hasNode(o=t.uniqueId("_root")););return o}return DC}var RC,Lk;function Ice(){if(Lk)return RC;Lk=1,RC=e;function e(t,n,r){let i={},o;r.forEach(s=>{let a=t.parent(s),l,u;for(;a;){if(l=t.parent(a),l?(u=i[l],i[l]=a):(u=o,o=a),u&&u!==a){n.setEdge(u,a);return}a=l}})}return RC}var PC,kk;function Dce(){if(kk)return PC;kk=1;let e=Tce(),t=Sce(),n=_ce(),r=wce(),i=Ice(),o=Ll().Graph,s=To();PC=a;function a(f,p){if(p&&typeof p.customOrder=="function"){p.customOrder(f,a);return}let h=s.maxRank(f),A=l(f,s.range(1,h+1),"inEdges"),g=l(f,s.range(h-1,-1,-1),"outEdges"),m=e(f);if(c(f,m),p&&p.disableOptimalOrderHeuristic)return;let O=Number.POSITIVE_INFINITY,y;for(let v=0,T=0;T<4;++v,++T){u(v%2?A:g,v%4>=2),m=s.buildLayerMatrix(f);let _=t(f,m);_<O&&(T=0,y=Object.assign({},m),O=_)}c(f,y)}function l(f,p,h){const A=new Map,g=(m,O)=>{A.has(m)||A.set(m,[]),A.get(m).push(O)};for(const m of f.nodes()){const O=f.node(m);if(typeof O.rank=="number"&&g(O.rank,m),typeof O.minRank=="number"&&typeof O.maxRank=="number")for(let y=O.minRank;y<=O.maxRank;y++)y!==O.rank&&g(y,m)}return p.map(function(m){return r(f,m,h,A.get(m)||[])})}function u(f,p){let h=new o;f.forEach(function(A){let g=A.graph().root,m=n(A,g,h,p);m.vs.forEach((O,y)=>A.node(O).order=y),i(A,h,m.vs)})}function c(f,p){Object.values(p).forEach(h=>h.forEach((A,g)=>f.node(A).order=g))}return PC}var NC,Mk;function Rce(){if(Mk)return NC;Mk=1;let e=Ll().Graph,t=To();NC={positionX:h,findType1Conflicts:n,findType2Conflicts:r,addConflict:o,hasConflict:s,verticalAlignment:a,horizontalCompaction:l,alignCoordinates:f,findSmallestWidthAlignment:c,balance:p};function n(m,O){let y={};function v(T,_){let x=0,b=0,w=T.length,D=_[_.length-1];return _.forEach((I,P)=>{let k=i(m,I),N=k?m.node(k).order:w;(k||I===D)&&(_.slice(b,P+1).forEach(L=>{m.predecessors(L).forEach(M=>{let B=m.node(M),Q=B.order;(Q<x||N<Q)&&!(B.dummy&&m.node(L).dummy)&&o(y,M,L)})}),b=P+1,x=N)}),_}return O.length&&O.reduce(v),y}function r(m,O){let y={};function v(_,x,b,w,D){let I;t.range(x,b).forEach(P=>{I=_[P],m.node(I).dummy&&m.predecessors(I).forEach(k=>{let N=m.node(k);N.dummy&&(N.order<w||N.order>D)&&o(y,k,I)})})}function T(_,x){let b=-1,w,D=0;return x.forEach((I,P)=>{if(m.node(I).dummy==="border"){let k=m.predecessors(I);k.length&&(w=m.node(k[0]).order,v(x,D,P,b,w),D=P,b=w)}v(x,D,x.length,w,_.length)}),x}return O.length&&O.reduce(T),y}function i(m,O){if(m.node(O).dummy)return m.predecessors(O).find(y=>m.node(y).dummy)}function o(m,O,y){if(O>y){let T=O;O=y,y=T}let v=m[O];v||(m[O]=v={}),v[y]=!0}function s(m,O,y){if(O>y){let v=O;O=y,y=v}return!!m[O]&&Object.hasOwn(m[O],y)}function a(m,O,y,v){let T={},_={},x={};return O.forEach(b=>{b.forEach((w,D)=>{T[w]=w,_[w]=w,x[w]=D})}),O.forEach(b=>{let w=-1;b.forEach(D=>{let I=v(D);if(I.length){I=I.sort((k,N)=>x[k]-x[N]);let P=(I.length-1)/2;for(let k=Math.floor(P),N=Math.ceil(P);k<=N;++k){let L=I[k];_[D]===D&&w<x[L]&&!s(y,D,L)&&(_[L]=D,_[D]=T[D]=T[L],w=x[L])}}})}),{root:T,align:_}}function l(m,O,y,v,T){let _={},x=u(m,O,y,T),b=T?"borderLeft":"borderRight";function w(P,k){let N=x.nodes(),L=N.pop(),M={};for(;L;)M[L]?P(L):(M[L]=!0,N.push(L),N=N.concat(k(L))),L=N.pop()}function D(P){_[P]=x.inEdges(P).reduce((k,N)=>Math.max(k,_[N.v]+x.edge(N)),0)}function I(P){let k=x.outEdges(P).reduce((L,M)=>Math.min(L,_[M.w]-x.edge(M)),Number.POSITIVE_INFINITY),N=m.node(P);k!==Number.POSITIVE_INFINITY&&N.borderType!==b&&(_[P]=Math.max(_[P],k))}return w(D,x.predecessors.bind(x)),w(I,x.successors.bind(x)),Object.keys(v).forEach(P=>_[P]=_[y[P]]),_}function u(m,O,y,v){let T=new e,_=m.graph(),x=A(_.nodesep,_.edgesep,v);return O.forEach(b=>{let w;b.forEach(D=>{let I=y[D];if(T.setNode(I),w){var P=y[w],k=T.edge(P,I);T.setEdge(P,I,Math.max(x(m,D,w),k||0))}w=D})}),T}function c(m,O){return Object.values(O).reduce((y,v)=>{let T=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;Object.entries(v).forEach(([b,w])=>{let D=g(m,b)/2;T=Math.max(w+D,T),_=Math.min(w-D,_)});const x=T-_;return x<y[0]&&(y=[x,v]),y},[Number.POSITIVE_INFINITY,null])[1]}function f(m,O){let y=Object.values(O),v=t.applyWithChunking(Math.min,y),T=t.applyWithChunking(Math.max,y);["u","d"].forEach(_=>{["l","r"].forEach(x=>{let b=_+x,w=m[b];if(w===O)return;let D=Object.values(w),I=v-t.applyWithChunking(Math.min,D);x!=="l"&&(I=T-t.applyWithChunking(Math.max,D)),I&&(m[b]=t.mapValues(w,P=>P+I))})})}function p(m,O){return t.mapValues(m.ul,(y,v)=>{if(O)return m[O.toLowerCase()][v];{let T=Object.values(m).map(_=>_[v]).sort((_,x)=>_-x);return(T[1]+T[2])/2}})}function h(m){let O=t.buildLayerMatrix(m),y=Object.assign(n(m,O),r(m,O)),v={},T;["u","d"].forEach(x=>{T=x==="u"?O:Object.values(O).reverse(),["l","r"].forEach(b=>{b==="r"&&(T=T.map(P=>Object.values(P).reverse()));let w=(x==="u"?m.predecessors:m.successors).bind(m),D=a(m,T,y,w),I=l(m,T,D.root,D.align,b==="r");b==="r"&&(I=t.mapValues(I,P=>-P)),v[x+b]=I})});let _=c(m,v);return f(v,_),p(v,m.graph().align)}function A(m,O,y){return(v,T,_)=>{let x=v.node(T),b=v.node(_),w=0,D;if(w+=x.width/2,Object.hasOwn(x,"labelpos"))switch(x.labelpos.toLowerCase()){case"l":D=-x.width/2;break;case"r":D=x.width/2;break}if(D&&(w+=y?D:-D),D=0,w+=(x.dummy?O:m)/2,w+=(b.dummy?O:m)/2,w+=b.width/2,Object.hasOwn(b,"labelpos"))switch(b.labelpos.toLowerCase()){case"l":D=b.width/2;break;case"r":D=-b.width/2;break}return D&&(w+=y?D:-D),D=0,w}}function g(m,O){return m.node(O).width}return NC}var LC,Fk;function Pce(){if(Fk)return LC;Fk=1;let e=To(),t=Rce().positionX;LC=n;function n(i){i=e.asNonCompoundGraph(i),r(i),Object.entries(t(i)).forEach(([o,s])=>i.node(o).x=s)}function r(i){let o=e.buildLayerMatrix(i),s=i.graph().ranksep,a=0;o.forEach(l=>{const u=l.reduce((c,f)=>{const p=i.node(f).height;return c>p?c:p},0);l.forEach(c=>i.node(c).y=a+u/2),a+=u+s})}return LC}var kC,Bk;function Nce(){if(Bk)return kC;Bk=1;let e=hce(),t=Ace(),n=gce(),r=To().normalizeRanks,i=Ece(),o=To().removeEmptyRanks,s=Oce(),a=yce(),l=vce(),u=Dce(),c=Pce(),f=To(),p=Ll().Graph;kC=h;function h(R,j){let $=j&&j.debugTiming?f.time:f.notime;$("layout",()=>{let Y=$(" buildLayoutGraph",()=>w(R));$(" runLayout",()=>A(Y,$,j)),$(" updateInputGraph",()=>g(R,Y))})}function A(R,j,$){j(" makeSpaceForEdgeLabels",()=>D(R)),j(" removeSelfEdges",()=>U(R)),j(" acyclic",()=>e.run(R)),j(" nestingGraph.run",()=>s.run(R)),j(" rank",()=>n(f.asNonCompoundGraph(R))),j(" injectEdgeLabelProxies",()=>I(R)),j(" removeEmptyRanks",()=>o(R)),j(" nestingGraph.cleanup",()=>s.cleanup(R)),j(" normalizeRanks",()=>r(R)),j(" assignRankMinMax",()=>P(R)),j(" removeEdgeLabelProxies",()=>k(R)),j(" normalize.run",()=>t.run(R)),j(" parentDummyChains",()=>i(R)),j(" addBorderSegments",()=>a(R)),j(" order",()=>u(R,$)),j(" insertSelfEdges",()=>q(R)),j(" adjustCoordinateSystem",()=>l.adjust(R)),j(" position",()=>c(R)),j(" positionSelfEdges",()=>F(R)),j(" removeBorderNodes",()=>Q(R)),j(" normalize.undo",()=>t.undo(R)),j(" fixupEdgeLabelCoords",()=>M(R)),j(" undoCoordinateSystem",()=>l.undo(R)),j(" translateGraph",()=>N(R)),j(" assignNodeIntersects",()=>L(R)),j(" reversePoints",()=>B(R)),j(" acyclic.undo",()=>e.undo(R))}function g(R,j){R.nodes().forEach($=>{let Y=R.node($),z=j.node($);Y&&(Y.x=z.x,Y.y=z.y,Y.rank=z.rank,j.children($).length&&(Y.width=z.width,Y.height=z.height))}),R.edges().forEach($=>{let Y=R.edge($),z=j.edge($);Y.points=z.points,Object.hasOwn(z,"x")&&(Y.x=z.x,Y.y=z.y)}),R.graph().width=j.graph().width,R.graph().height=j.graph().height}let m=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],v=["width","height","rank"],T={width:0,height:0},_=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},b=["labelpos"];function w(R){let j=new p({multigraph:!0,compound:!0}),$=G(R.graph());return j.setGraph(Object.assign({},O,W($,m),f.pick($,y))),R.nodes().forEach(Y=>{let z=G(R.node(Y));const H=W(z,v);Object.keys(T).forEach(V=>{H[V]===void 0&&(H[V]=T[V])}),j.setNode(Y,H),j.setParent(Y,R.parent(Y))}),R.edges().forEach(Y=>{let z=G(R.edge(Y));j.setEdge(Y,Object.assign({},x,W(z,_),f.pick(z,b)))}),j}function D(R){let j=R.graph();j.ranksep/=2,R.edges().forEach($=>{let Y=R.edge($);Y.minlen*=2,Y.labelpos.toLowerCase()!=="c"&&(j.rankdir==="TB"||j.rankdir==="BT"?Y.width+=Y.labeloffset:Y.height+=Y.labeloffset)})}function I(R){R.edges().forEach(j=>{let $=R.edge(j);if($.width&&$.height){let Y=R.node(j.v),H={rank:(R.node(j.w).rank-Y.rank)/2+Y.rank,e:j};f.addDummyNode(R,"edge-proxy",H,"_ep")}})}function P(R){let j=0;R.nodes().forEach($=>{let Y=R.node($);Y.borderTop&&(Y.minRank=R.node(Y.borderTop).rank,Y.maxRank=R.node(Y.borderBottom).rank,j=Math.max(j,Y.maxRank))}),R.graph().maxRank=j}function k(R){R.nodes().forEach(j=>{let $=R.node(j);$.dummy==="edge-proxy"&&(R.edge($.e).labelRank=$.rank,R.removeNode(j))})}function N(R){let j=Number.POSITIVE_INFINITY,$=0,Y=Number.POSITIVE_INFINITY,z=0,H=R.graph(),V=H.marginx||0,X=H.marginy||0;function J(ee){let le=ee.x,re=ee.y,ue=ee.width,Oe=ee.height;j=Math.min(j,le-ue/2),$=Math.max($,le+ue/2),Y=Math.min(Y,re-Oe/2),z=Math.max(z,re+Oe/2)}R.nodes().forEach(ee=>J(R.node(ee))),R.edges().forEach(ee=>{let le=R.edge(ee);Object.hasOwn(le,"x")&&J(le)}),j-=V,Y-=X,R.nodes().forEach(ee=>{let le=R.node(ee);le.x-=j,le.y-=Y}),R.edges().forEach(ee=>{let le=R.edge(ee);le.points.forEach(re=>{re.x-=j,re.y-=Y}),Object.hasOwn(le,"x")&&(le.x-=j),Object.hasOwn(le,"y")&&(le.y-=Y)}),H.width=$-j+V,H.height=z-Y+X}function L(R){R.edges().forEach(j=>{let $=R.edge(j),Y=R.node(j.v),z=R.node(j.w),H,V;$.points?(H=$.points[0],V=$.points[$.points.length-1]):($.points=[],H=z,V=Y),$.points.unshift(f.intersectRect(Y,H)),$.points.push(f.intersectRect(z,V))})}function M(R){R.edges().forEach(j=>{let $=R.edge(j);if(Object.hasOwn($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function B(R){R.edges().forEach(j=>{let $=R.edge(j);$.reversed&&$.points.reverse()})}function Q(R){R.nodes().forEach(j=>{if(R.children(j).length){let $=R.node(j),Y=R.node($.borderTop),z=R.node($.borderBottom),H=R.node($.borderLeft[$.borderLeft.length-1]),V=R.node($.borderRight[$.borderRight.length-1]);$.width=Math.abs(V.x-H.x),$.height=Math.abs(z.y-Y.y),$.x=H.x+$.width/2,$.y=Y.y+$.height/2}}),R.nodes().forEach(j=>{R.node(j).dummy==="border"&&R.removeNode(j)})}function U(R){R.edges().forEach(j=>{if(j.v===j.w){var $=R.node(j.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:j,label:R.edge(j)}),R.removeEdge(j)}})}function q(R){var j=f.buildLayerMatrix(R);j.forEach($=>{var Y=0;$.forEach((z,H)=>{var V=R.node(z);V.order=H+Y,(V.selfEdges||[]).forEach(X=>{f.addDummyNode(R,"selfedge",{width:X.label.width,height:X.label.height,rank:V.rank,order:H+ ++Y,e:X.e,label:X.label},"_se")}),delete V.selfEdges})})}function F(R){R.nodes().forEach(j=>{var $=R.node(j);if($.dummy==="selfedge"){var Y=R.node($.e.v),z=Y.x+Y.width/2,H=Y.y,V=$.x-z,X=Y.height/2;R.setEdge($.e,$.label),R.removeNode(j),$.label.points=[{x:z+2*V/3,y:H-X},{x:z+5*V/6,y:H-X},{x:z+V,y:H},{x:z+5*V/6,y:H+X},{x:z+2*V/3,y:H+X}],$.label.x=$.x,$.label.y=$.y}})}function W(R,j){return f.mapValues(f.pick(R,j),Number)}function G(R){var j={};return R&&Object.entries(R).forEach(([$,Y])=>{typeof $=="string"&&($=$.toLowerCase()),j[$]=Y}),j}return kC}var MC,jk;function Lce(){if(jk)return MC;jk=1;let e=To(),t=Ll().Graph;MC={debugOrdering:n};function n(r){let i=e.buildLayerMatrix(r),o=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(s=>{o.setNode(s,{label:s}),o.setParent(s,"layer"+r.node(s).rank)}),r.edges().forEach(s=>o.setEdge(s.v,s.w,{},s.name)),i.forEach((s,a)=>{let l="layer"+a;o.setNode(l,{rank:"same"}),s.reduce((u,c)=>(o.setEdge(u,c,{style:"invis"}),c))}),o}return MC}var FC,$k;function kce(){return $k||($k=1,FC="1.1.8"),FC}var BC,Uk;function Mce(){return Uk||(Uk=1,BC={graphlib:Ll(),layout:Nce(),debug:Lce(),util:{time:To().time,notime:To().notime},version:kce()}),BC}var Fce=Mce();const Hk=Gr(Fce),Bce=(e,t)=>{let n=e?.measured?.width??e?.width??260,r=e?.measured?.height??e?.height??84;if(e.data?.type===Je.SWITCH){const i=(e.data?.properties?.cases?.length||0)+1;t==="LR"?(r=Math.max(i*16,84),n=260):(r=84,n=i>4?260+32*(i-4):260)}else if(e.data?.type===Je.IF){const i=e.data?.properties?.branches?.length||2;t==="LR"?(r=Math.max(i*16,84),n=260):(r=84,n=i>4?260+32*(i-4):260)}else if(e.data?.type===Je.API||e.data?.type===Je.GRAPHQL)t==="LR"?(r=Math.max(32,84),n=260):(r=84,n=260);else if(e.data?.type===Je.PARALLEL){const i=e.data?.properties?.no_of_parallel_threads||1;t==="LR"?(r=Math.max((i+1)*16,84),n=260):(r=84,n=i>4?260+32*(i-4):260)}else r=84,n=260;return{width:n,height:r}},r1=(e,t)=>{if(!t||!e)return 5e6;const n=e?.data?.type;if(n===Je.SWITCH){const r=e?.data?.properties?.cases||[],i=r.findIndex(o=>String(o.caseKey)===String(t));if(i!==-1)return i;if(t==="defaultHandle")return r.length}else if(n===Je.IF){if(t==="if")return 0;if(String(t||"").startsWith("branch_")){const r=parseInt(String(t).replace("branch_",""),10);return Number.isFinite(r)?1+r:1e6}if(t==="else")return 9e6}else if(n===Je.API){if(t==="success")return 0;if(t==="failure")return 1}else if(n===Je.GRAPHQL){if(t==="success")return 0;if(t==="failure")return 1}else if(n===Je.PARALLEL&&String(t||"").startsWith("parallel_")){const r=parseInt(String(t).replace("parallel_",""),10);return Number.isFinite(r)?r:1e6}return 5e6},jce=(e,t,n)=>{const r=new Set;e.forEach(u=>{u?.type===Ct.PLACEHOLDER&&u?.data?.isTriggerPlaceholder&&r.add(u.id)});const i=new Map;e.forEach(u=>{i.set(u.id,Bce(u,n))});const o=new Map(e.map(u=>[u.id,u])),s={};t.forEach(u=>{r.has(u.source)||r.has(u.target)||(s[u.source]||(s[u.source]=[]),s[u.source].push(u))});const a={};t.forEach(u=>{r.has(u.target)||(a[u.target]=(a[u.target]||0)+1)});const l={};return t.forEach(u=>{r.has(u.source)||r.has(u.target)||(l[u.source]||(l[u.source]=[]),l[u.source].push(u.target))}),{nodes:e,edges:t,nodeById:o,nodeDimensions:i,placeholderIds:r,edgesByParent:s,childToIndegree:a,childrenByParent:l}},Vk=(e,t,n,r,i)=>{const o=r.get(e),s={};return(n[e]||[]).forEach(a=>{a.target&&(s[a.target]=a.sourceHandle)}),t.filter(a=>(i[a]||0)<=1).sort((a,l)=>{const u=r1(o,s[a]),c=r1(o,s[l]);return u!==c?u-c:0})},$ce=(e,t)=>{const{direction:n}=t,{nodeById:r,nodeDimensions:i,childrenByParent:o,childToIndegree:s,edgesByParent:a,edges:l}=e,u=n==="LR",c=m=>(o[m]||[]).filter(O=>(s[O]||0)<=1),f=(m,O)=>{if(O.has(m))return;O.add(m),c(m).forEach(v=>f(v,O))},p=(m,O)=>{if(!Number.isFinite(O)||O===0)return;const y=new Set;f(m,y),y.forEach(v=>{const T=r.get(v);T&&(T.position={x:Math.round((T.position?.x||0)+O),y:T.position.y})})},h=(m,O)=>{if(!Number.isFinite(O)||O===0)return;const y=new Set;f(m,y),y.forEach(v=>{const T=r.get(v);T&&(T.position={x:T.position.x,y:Math.round((T.position?.y||0)+O)})})},A=m=>{const O=i.get(m)||{width:260,height:84},y=c(m);if(!y.length)return u?O.height:O.width;const v=y.map(b=>A(b)),T=Math.max(...v,u?O.height:O.width),_=u?t.lrSubtreeGap:t.tbSubtreeGap,x=_?Math.max(_.min,Math.min(_.max,T+20)):u?Math.max(120,Math.min(160,T+20)):Math.max(180,Math.min(220,T+20));return v.reduce((b,w)=>b+w,0)+x*Math.max(0,y.length-1)};Object.entries(o).forEach(([m,O])=>{const y=r.get(m),v=i.get(m)||{width:260,height:84};if(!y)return;const T=Vk(m,O,a,r,s);if(T.length===1){const Y=T[0],z=r.get(Y);if(!z)return;const H=i.get(Y)||{width:260,height:84};if(u){const V=(y.position?.x||0)+v.width,X=t.lrParentChildGap,J=H.width||260,ee=X?Math.max(X.min,Math.min(X.max,J+20)):Math.max(70,Math.min(100,J+20)),le=Math.round(V+ee+H.width/2),re=(z.position?.x||0)+H.width/2,ue=le-re,ve=(y.position?.y||0)+v.height/2,oe=(z.position?.y||0)+H.height/2,ae=Math.round(ve-oe),te=Math.max(10,H.width*.1),Z=Math.max(5,H.height*.1);(s[Y]||0)>1?(Math.abs(ue)>te&&(z.position.x=Math.round((z.position?.x||0)+ue)),Math.abs(ae)>Z&&(z.position.y=Math.round((z.position?.y||0)+ae))):(Math.abs(ue)>te&&p(Y,ue),Math.abs(ae)>Z&&h(Y,ae))}else{const V=(y.position?.y||0)+v.height,X=t.tbParentChildGap,J=H.height||84,ee=X?Math.max(X.min,Math.min(X.max,J+20)):Math.max(80,Math.min(120,J+20)),le=Math.round(V+ee+H.height/2),re=(z.position?.y||0)+H.height/2,ue=le-re,ve=(y.position?.x||0)+v.width/2,oe=(z.position?.x||0)+H.width/2,ae=Math.round(ve-oe),te=Math.max(10,H.width*.1),Z=Math.max(5,H.height*.1);(s[Y]||0)>1?(Math.abs(ae)>te&&(z.position.x=Math.round((z.position?.x||0)+ae)),Math.abs(ue)>Z&&(z.position.y=Math.round((z.position?.y||0)+ue))):(Math.abs(ae)>te&&p(Y,ae),Math.abs(ue)>Z&&h(Y,ue))}return}const _=T.map(Y=>i.get(Y)||{width:260,height:84}),x=T.map(Y=>A(Y)),b=u?v.height:v.width,w=Math.max(b*1.5,u?240:280);let D=x.map(Y=>Math.min(Y,w));const I=D.map((Y,z)=>{const H=T[z],X=c(H).length>0?u?30:20:u?8:6,J=u?1.05:1.03;return Math.round(Math.min(w*1.1,Y*J+X))}),P=Math.max(..._.map(Y=>u?Y.height:Y.width),u?84:260),k=u?t.lrSiblingGap:t.tbSiblingGap,N=k?Math.min(k.max,Math.max(k.min,P+20)):u?Math.min(120,Math.max(70,P+20)):Math.min(100,Math.max(60,P+10)),L=T.length,M=u?v.height:v.width,B=u?80:70,Q=M*L+B*L+N*(L-1),U=I.reduce((Y,z)=>Y+z,0);if(U>Q){const Y=Q/U;D=I.map((z,H)=>{const V=u?_[H].height:_[H].width;return Math.max(V,Math.round(z*Y))})}else D=I;const q=[];for(let Y=0;Y<D.length-1;Y++){const z=u?5:6,H=Math.max(N,Math.round((D[Y]+D[Y+1])/z));q.push(H)}const F=D.reduce((Y,z)=>Y+z,0)+q.reduce((Y,z)=>Y+z,0),W=u?(y.position?.y||0)+v.height/2:(y.position?.x||0)+v.width/2;let G=Math.round(W-F/2);const R=u?Math.max(..._.map(Y=>Y.width||260),260):Math.max(..._.map(Y=>Y.height||84),84),j=u?t.lrParentChildGap:t.tbParentChildGap,$=j?Math.max(j.min,Math.min(j.max,R+20)):u?Math.max(70,Math.min(100,R+20)):Math.max(80,Math.min(120,R+20));T.forEach((Y,z)=>{const H=r.get(Y),V=_[z],X=D[z];if(!H)return;if(u){const ee=(y.position?.x||0)+v.width,le=Math.round(ee+$+V.width/2),re=(H.position?.x||0)+V.width/2,ue=le-re,Oe=Math.max(10,V.width*.1);Math.abs(ue)>Oe&&((s[Y]||0)>1?H.position.x=Math.round((H.position?.x||0)+ue):p(Y,ue));const ve=Math.round(G+X/2),oe=(H.position?.y||0)+V.height/2,ae=Math.round(ve-oe),te=Math.max(5,V.height*.1);Math.abs(ae)>te&&((s[Y]||0)>1?H.position.y=Math.round((H.position?.y||0)+ae):h(Y,ae))}else{const le=(y.position?.y||0)+v.height+$,re=Math.round(le+V.height/2),ue=(H.position?.y||0)+V.height/2,Oe=Math.round(re-ue);Math.abs(Oe)>1&&((s[Y]||0)>1?H.position.y=Math.round((H.position?.y||0)+Oe):h(Y,Oe));const ve=Math.round(G+X/2),oe=(H.position?.x||0)+V.width/2,ae=ve-oe,te=Math.max(8,V.width*.1);Math.abs(ae)>te&&((s[Y]||0)>1?H.position.x=Math.round((H.position?.x||0)+ae):p(Y,ae))}const J=q[z]||0;G+=X+J})});const g={};l.forEach(m=>{g[m.target]=(g[m.target]||0)+1}),Object.keys(g).filter(m=>g[m]>1).forEach(m=>{const O=r.get(m);if(!O)return;const y=i.get(m)||{width:260,height:84},v=l.filter(T=>T.target===m).map(T=>r.get(T.source)).filter(Boolean);if(v.length)if(u){const T=v.map(w=>(w.position?.y||0)+(i.get(w.id)?.height||84)/2);T.sort((w,D)=>w-D);const _=T[Math.floor(T.length/2)],x=(O.position?.y||0)+y.height/2,b=Math.round(_-x);b!==0&&(O.position.y=Math.round((O.position?.y||0)+b))}else{const T=v.map(w=>(w.position?.x||0)+(i.get(w.id)?.width||260)/2);T.sort((w,D)=>w-D);const _=T[Math.floor(T.length/2)],x=(O.position?.x||0)+y.width/2,b=Math.round(_-x);b!==0&&(O.position.x=Math.round((O.position?.x||0)+b))}})},Uce=(e,t)=>{const{nodes:n,edges:r,nodeById:i,nodeDimensions:o,placeholderIds:s,childrenByParent:a,childToIndegree:l,edgesByParent:u}=e,{direction:c,minGap:f,exactDuplicateGap:p,maxNodePasses:h,maxSiblingPasses:A,maxRootPasses:g}=t,m=c==="LR",O=N=>(a[N]||[]).filter(L=>(l[L]||0)<=1),y=(N,L)=>{if(L.has(N))return;L.add(N),O(N).forEach(B=>y(B,L))},v=(N,L,M)=>{if(!Number.isFinite(L)||L===0)return;const B=new Set;y(N,B),B.forEach(Q=>{const U=i.get(Q);U&&(M==="x"?U.position={x:Math.round((U.position?.x||0)+L),y:U.position.y}:U.position={x:U.position.x,y:Math.round((U.position?.y||0)+L)})})},T=N=>{const L=new Set;y(N,L);let M=1/0,B=-1/0,Q=1/0,U=-1/0;return L.forEach(q=>{const F=i.get(q);if(!F)return;const W=o.get(q)||{width:260,height:84},G=F.position?.x||0,R=F.position?.y||0;M=Math.min(M,R),B=Math.max(B,R+W.height),Q=Math.min(Q,G),U=Math.max(U,G+W.width)}),{minY:M===1/0?0:M,maxY:B===-1/0?0:B,minX:Q===1/0?0:Q,maxX:U===-1/0?0:U}},_=()=>{const N=new Set;return n.forEach(L=>{if(s.has(L.id))return;(!r.some(B=>B.target===L.id)||(l[L.id]||0)>1)&&N.add(L.id)}),Array.from(N)},x=n.filter(N=>!s.has(N.id));let b=!0,w=0;for(;b&&w<h;){b=!1,w++,x.sort((N,L)=>{if(m){const M=N.position?.x||0,B=L.position?.x||0;if(Math.abs(M-B)>10)return M-B;const Q=N.position?.y||0,U=L.position?.y||0;return Q-U}else{const M=N.position?.y||0,B=L.position?.y||0;if(Math.abs(M-B)>10)return M-B;const Q=N.position?.x||0,U=L.position?.x||0;return Q-U}});for(let N=0;N<x.length;N++){const L=x[N];if(!L)continue;const M=L.position?.x||0,B=L.position?.y||0,Q=o.get(L.id)||{width:260,height:84},U=M+Q.width,q=B+Q.height;for(let F=N+1;F<x.length;F++){const W=x[F];if(!W)continue;const G=W.position?.x||0,R=W.position?.y||0,j=o.get(W.id)||{width:260,height:84},$=G+j.width,Y=R+j.height;let z,H;if(m?(z=!(U+f<=G||$+f<=M),H=!(q+f<=R||Y+f<=B)):(z=!(U+f<=G||$+f<=M),H=!(q<=R||Y<=B)),z&&H){b=!0;const V=Math.abs(M-G)<5,X=Math.abs(B-R)<5;let J;if(V&&X)J=p+(m?Q.height:Q.width);else if(m){const ee=q+f;J=Math.round(ee-R)}else{const ee=U+f;J=Math.round(ee-G)}if(J>0){v(W.id,J,m?"y":"x");break}}}if(b)break}}let D=!0,I=0;for(;D&&I<A;)D=!1,I++,Object.entries(a).forEach(([N,L])=>{const B=Vk(N,L,u,i,l).filter(Q=>(l[Q]||0)<=1);if(!(B.length<2))for(let Q=0;Q<B.length;Q++){const U=B[Q],q=T(U);for(let F=Q+1;F<B.length;F++){const W=B[F],G=T(W);let R;if(m)R=!(q.maxY+f<=G.minY||G.maxY+f<=q.minY);else{const $=f+20;R=!(q.maxX+$<=G.minX||G.maxX+$<=q.minX)}if(R){D=!0;let j,$;if(m?(j=q.maxY+f,$=Math.round(j-G.minY)):(j=q.maxX+f+20,$=Math.round(j-G.minX)),$>0){v(W,$,m?"y":"x");return}}}if(D)return}});let P=!0,k=0;for(;P&&k<g;){P=!1,k++;const N=_();N.sort((L,M)=>{const B=i.get(L),Q=i.get(M);if(m){const U=B?.position?.x||0,q=Q?.position?.x||0;if(Math.abs(U-q)>50)return U-q;const F=B?.position?.y||0,W=Q?.position?.y||0;return F-W}else{const U=B?.position?.y||0,q=Q?.position?.y||0;if(Math.abs(U-q)>50)return U-q;const F=B?.position?.x||0,W=Q?.position?.x||0;return F-W}});for(let L=0;L<N.length;L++){const M=N[L],B=T(M);for(let Q=L+1;Q<N.length;Q++){const U=N[Q],q=T(U);let F;if(m)F=!(B.maxY+f<=q.minY||q.maxY+f<=B.minY);else{const G=f+20;F=!(B.maxX+G<=q.minX||q.maxX+G<=B.minX)}if(F){P=!0;let W,G;if(m?(W=B.maxY+f,G=Math.round(W-q.minY)):(W=B.maxX+f+20,G=Math.round(W-q.minX)),G>0){v(U,G,m?"y":"x");break}}}}}},th=new Hk.graphlib.Graph;th.setDefaultEdgeLabel(()=>({}));const jC=async(e,t,n,r="TB")=>{const i=jce(e,t,r),{nodeById:o,nodeDimensions:s,placeholderIds:a,edgesByParent:l}=i,u=[];Object.entries(l).forEach(([A,g])=>{const m=o.get(A);g.sort((O,y)=>{const v=r1(m,O.sourceHandle),T=r1(m,y.sourceHandle);return v!==T?v-T:String(O.target).localeCompare(String(y.target))}),g.forEach(O=>u.push(O))}),t.forEach(A=>{a.has(A.source)||a.has(A.target)||l[A.source]||u.push(A)});const c={};t.forEach(A=>{a.has(A.source)||a.has(A.target)||(c[A.source]=(c[A.source]||0)+1)});const f={},p={};th.setGraph({rankdir:r,nodesep:r==="LR"?60:50,ranksep:r==="LR"?120:100,marginx:24,marginy:24,align:"UL",ranker:"tight-tree"}),e.forEach(A=>{if(a.has(A.id))return;const g=s.get(A.id)||{width:260,height:84};th.setNode(A.id,{width:g.width,height:g.height})}),u.forEach(A=>{if(a.has(A.source)||a.has(A.target))return;const m=(c[A.source]||0)===1&&r==="LR",O=A.id||`${A.source}-${A.target}`,y=String(A.sourceHandle||"out"),v=String(A.targetHandle||"in"),T=`${A.source}:${y}->${A.target}:${v}`;f[O]=m,p[T]=m,th.setEdge(A.source,A.target)}),Hk.layout(th);const h={};return e.forEach(A=>{if(a.has(A.id))return;const g=th.node(A.id),m=s.get(A.id)||{width:260,height:84};g&&(h[A.id]={x:Math.round(g.x-m.width/2),y:Math.round(g.y-m.height/2)})}),e.forEach(A=>{if(a.has(A.id)){A.position=A.position||{x:0,y:0};return}const g=h[A.id];g?A.position={x:g.x,y:g.y}:A.position=A.position||{x:0,y:0}}),i.edgeMetas=f,i.edgeMetasByPath=p,$ce(i,{direction:r}),Uce(i,{direction:r,minGap:r==="TB"?32:24,exactDuplicateGap:100,maxNodePasses:20,maxSiblingPasses:r==="TB"?25:20,maxRootPasses:15}),e.forEach(A=>{A?.id&&n(A.id)}),r==="LR"&&requestAnimationFrame(()=>{e.forEach(A=>{A?.id&&n(A.id)})}),t.forEach(A=>{if(A.type===Un.PLACEHOLDER||a.has(A.source)||a.has(A.target)){A.data={...A.data||{},isStraight:!1};return}const g=A.id||`${A.source}-${A.target}`,m=String(A.sourceHandle||"out"),O=String(A.targetHandle||"in"),y=`${A.source}:${m}->${A.target}:${O}`,v=g&&f[g]===!0,T=p[y]===!0,_=v||T;A.data={...A.data||{},isStraight:_}}),Promise.resolve({nodes:e,edges:t})},$C=async(e,t,n,r)=>{const i=(Array.isArray(t)?t:[]).filter(l=>typeof l=="string"&&l.trim().length>0);if(!i.length)return;const o=Yt(n,`/v1.0/${r}/workflows/${e}/integration-executions`),s=new URLSearchParams;return i.forEach(l=>{s.append("id",l)}),await Xt.delete(`${o}?${s.toString()}`)},pc=e=>!Array.isArray(e)||e.length===0?{}:e.reduce((n,r)=>{if(r&&r.key&&r.key.trim()!==""){const i=r.value??"",o=typeof i=="string"?i.trim():i;n[r.key.trim()]=o}return n},{}),hc=e=>!e||typeof e!="object"?[]:Object.entries(e).map(([t,n])=>({key:t,value:n})),Gk=e=>{if(e.custom){const t=r=>typeof r=="string"?r.trim():r;return{...e.custom,headers:pc(e.custom.headers||[]),query_params:pc(e.custom.query_params||[]),state_params:pc(e.custom.state_params||[]),body:t(e.custom.body),method:t(e.custom.method),endpoint:t(e.custom.endpoint),body_type:t(e.custom.body_type)}}return e},Wk=e=>{const t=["event","retry_config","slack_auth_id","maximum_timeout","integration_slug","continue_on_failure"],n=Object.keys(e).reduce((r,i)=>(t.includes(i)&&(r[i]=e[i]),r),{});return e.event&&e[e.event]&&(n[e.event]=e[e.event]),e.custom&&(n.custom=Gk(e)),n},Qk=e=>{const t={...e};return e.custom&&(t.custom=Gk(e)),t},Ac=e=>{if(!e||typeof e!="object"||Array.isArray(e))return e;const{__ai_generated_fields:t,...n}=e;if([Je.API,Je.GMAIL_ACTIVITY].includes(n.type))return n;const i={};return Object.keys(n).forEach(o=>{const s=n[o];typeof s=="object"&&!Array.isArray(s)&&s!==null?i[o]=Ac(s):typeof s=="string"&&s===""||(i[o]=typeof s=="string"?s.trim():s)}),i},i1=(e,t,n,r,i,o,s,a=[],l=null)=>{const u=Pb(t.name,i,t.type);let c=C0(u,t.type,t.properties,t.id)||{type:t.type,name:u,properties:{integration_slug:t.slug||t.properties?.integration_slug,activity_name:t.name,retry_config:{maximum_attempts:1,backoff_coefficient:2,initial_interval:1e3,maximum_interval:1e5}}};if(t.type===Je.WEBHOOK&&(c.properties||(c.properties={}),c.properties.auth_type||(c.properties.auth_type="none"),c.properties.test_payload||(c.properties.test_payload={})),c={...c,properties:{...c.properties,integration_slug:t.slug||c.properties?.integration_slug},blt_node_states:{node:"not-configured-yet",setup_and_configure:"default",test:""}},!vt(t?.properties)){const p=Object.keys(t.properties).reduce((h,A)=>(t.properties[A]!==void 0&&t.properties[A]!==null&&(h[A]=t.properties[A]),h),{});c.properties={...c.properties,...p}}if((t.type===Je.HTTP||c.type===Je.HTTP)&&(c.properties||(c.properties={}),c.properties.headers||(c.properties.headers={}),c.properties.query_params||(c.properties.query_params={}),c.properties.state_params||(c.properties.state_params={}),(!c.properties.methods||!Array.isArray(c.properties.methods)||c.properties.methods.length===0)&&(c.properties.methods=["GET"])),c.type===Je.HTTP&&(c.properties={...c.properties,endpoint:Yt(s,o)}),!c)return;const f={id:r,position:l||n.screenToFlowPosition({x:e.clientX-120,y:e.clientY-30}),type:pd(c),data:c,measured:{width:260,height:84},activity_data:{id:t.id,properties:t.properties||{},status:t.status},incomingPorts:a,outgoingPorts:[]};return f.data=JSON.parse(JSON.stringify(f.data)),c?.properties?.activity?.data?.name&&(f.data.properties.activity.data.name=Ra(c.properties.activity.data.name,i)),(t.type===Je.IF||t.type===Je.SWITCH)&&(f.options={conditions:[]}),f},nh=(e,t)=>{const n=["png","jpeg","jpg","webp","tiff","avif","bmp","heic","heif"],r=e.split("."),i=r[r.length-1].toLowerCase();return i==="svg"?e:n.includes(i)?e.replace("original",t):e},Hce=e=>{if(!e)return[];const t=[Je.LOOP,Je.PARALLEL,Je.IF,Je.SWITCH,Je.MAPPER,Je.SLEEP,Je.FUNCTION,Je.EXECUTE_CHILD_WORKFLOW];return e.filter(n=>!t.includes(n.type)&&n.active!==!1)||[]},Vce=e=>{switch(e){case Je.SLACK_ACTIVITY:return"Eg. https://slack.com/api/chat.postMessage";case Je.GMAIL_ACTIVITY:return"Eg. https://gmail.googleapis.com/gmail/v1/users/me/messages";case Je.GOOGLE_CALENDAR:case"googleMeet":return"Eg. https://www.googleapis.com/calendar/v3/calendars/primary/events";case Je.GOOGLE_SHEETS_READ:case Je.GOOGLE_SHEETS_WRITE:return"Eg. https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}";default:return"Enter URL"}},UC=(e,t,n,r,i,o,s,a,l,u,c,f,p,h,A,g,m,O,y)=>{const v=t.id;if(e({type:ss,payload:{type:"",active:!1,nodeId:null}}),e({type:bi.SET_ACTIVITY_NAMES,payload:[...s,t.data.name]}),!!l){if(m&&m.edgeId&&m.sourceNodeId&&m.targetNodeId){const T=u.find(b=>b.id===m.sourceNodeId),_=u.find(b=>b.id===m.targetNodeId),x=c.find(b=>b.id===m.edgeId)||null;if(T&&_&&a){const b=(m.sourceHandle??x?.sourceHandle)||void 0,w={id:t.id,name:t.data?.name};b&&b!=="outHandle"&&(b==="failureHandle"?w.ref="failure":w.ref=b);const D=b==="failureHandle"?"failure":b&&b!=="outHandle"?b:void 0,I=(T.outgoingPorts||[]).filter(j=>{if(j.id!==_.id)return!0;const $=j.ref;return D!==void 0?$!==D:$!==void 0}),P={...T,outgoingPorts:[...I,w]},k={..._,incomingPorts:[...(_.incomingPorts||[]).filter(j=>j!==T.id),t.id]};let N="outHandle",L=!0;const M={id:m.targetNodeId,name:_.data?.name};if(t.data?.type===Je.API||t.data?.type===Je.GRAPHQL)N="success",M.ref="success";else if(t.data?.properties?.continue_on_failure===!0)N="outHandle";else if(t.data?.type===Je.SWITCH){const j=t.data?.properties?.cases||[];j.length>0?(N=j[0].caseKey,M.ref=j[0].caseKey):(N="defaultHandle",M.ref="defaultHandle")}else if(t.data?.type===Je.IF){const j=t.data?.properties?.branches||[];j.length>0?(N=j[0].ref,M.ref=j[0].ref):(N="true",M.ref="true")}else t.data?.type===Je.PARALLEL&&((t.data?.properties?.no_of_parallel_threads||0)>0?(N="parallel_0",M.ref="parallel_0"):L=!1);const B={...t,incomingPorts:[m.sourceNodeId],outgoingPorts:L?[M]:[]},Q={id:`${m.sourceNodeId}-${t.id}`,source:m.sourceNodeId,sourceHandle:b,target:t.id,targetHandle:"targetHandle",type:Un.SMOOTH,markerEnd:{type:Rt.MarkerType.ArrowClosed}},U=L?{id:`${t.id}-${m.targetNodeId}`,source:t.id,sourceHandle:N,target:m.targetNodeId,targetHandle:(m.targetHandle??x?.targetHandle)||void 0,type:Un.SMOOTH,markerEnd:{type:Rt.MarkerType.ArrowClosed}}:null,q=U?k:{..._,incomingPorts:_.incomingPorts||[]},W=[...u.filter(j=>j.id!==T.id&&j.id!==_.id),P,q,B],G=c.filter(j=>j.id!==m.edgeId);l(W);let R=G;R=Rt.addEdge(Q,R),U&&(R=Rt.addEdge(U,R)),a(R),O&&y&&setTimeout(async()=>{try{const{nodes:j,edges:$}=await jC(W,R,y,O);l(j),a($)}catch{}},50)}e({type:du,payload:{id:v}}),f?.(p.WORKFLOW.ACTIVITY_ADD,{"console.product_account_id":h,message:"Activity added to workflow (inserted between nodes)",name:t.data.name,integration_slug:t?.data?.properties?.integration_slug});return}if(n&&i){if(A&&g&&i.type===Ct.TRIGGER)try{$C(A,[i?.data?.properties?.integration_slug&&i?.id?`${i?.data?.properties?.integration_slug}_${i.id}`:i?.id],g,h)}catch{}let T=t.data;if(i.type===Ct.TRIGGER){const M=C0(t.data.name,t.data.type,void 0,t.activity_data?.id);M&&(T={...M,properties:{...M.properties,integration_slug:t?.data?.properties?.integration_slug??i?.data?.properties?.integration_slug},blt_node_states:{node:"default",setup_and_configure:"default",test:"default"}})}const _=i.id,x=t.id,b=u.filter(M=>M.type!==Ct.TRIGGER&&!(M.type===Ct.PLACEHOLDER&&M?.data?.isTriggerPlaceholder)).map(M=>Array.isArray(M.incomingPorts)&&M.incomingPorts.includes(_)?{...M,incomingPorts:M.incomingPorts.map(B=>B===_?x:B)}:M),{dragHandle:w,draggable:D,selectable:I,connectable:P,...k}=i||{},N={...k,id:x,type:t.type,activity_data:t.activity_data,data:T},L=w4(b,N);l(L),a&&a(c.map(M=>{if(!(M.source===o&&M.type===Un.PLACEHOLDER))return M;const B=u.find(U=>U.id===M.target);return B?.type===Ct.PLACEHOLDER&&B?.data?.isActivityPlaceholder?M:{...M,type:Un.SMOOTH,markerEnd:{...M.markerEnd&&typeof M.markerEnd=="object"?M.markerEnd:{},type:Rt.MarkerType.ArrowClosed}}}).map(M=>({...M,source:M.source===_?x:M.source,target:M.target===_?x:M.target,markerEnd:{...M.markerEnd&&typeof M.markerEnd=="object"?M.markerEnd:{},type:Rt.MarkerType.ArrowClosed}}))),e({type:dd,payload:null})}else{const T=r&&o?{...t,incomingPorts:Array.from(new Set([...Array.isArray(t.incomingPorts)?t.incomingPorts:[],r]))}:t,_=w4(u,T);if(r&&o){const x=_.find(b=>b.id===r);if(!x)l(_.filter(b=>!(b.type===Ct.PLACEHOLDER&&b.id===o)));else{const b=Array.isArray(x.outgoingPorts)?x.outgoingPorts:[],w=c.find(M=>M.source===r&&M.target===o),D=w?.sourceHandle,I=b.findIndex(M=>M.id===o);let P;const k=M=>{if(!(!M||M==="outHandle"))return M==="failureHandle"?"failure":M};I!==-1?P=b.map(M=>M.id===o?{...M,id:T.id,name:T.data?.name,ref:M.ref||k(D)}:M):!!w?P=[...b,{id:T.id,name:T.data?.name,ref:k(D)}]:P=b;const N={...x,outgoingPorts:P},L=_.filter(M=>!(M.type===Ct.PLACEHOLDER&&M.id===o||M.id===r));l([...L,N])}}else l(_.filter(x=>!(x.type===Ct.PLACEHOLDER&&x.id===o||x.id===r)));if(a&&r&&o){const x=c.map(b=>b.target===o?{...b,target:T.id,type:Un.SMOOTH,markerEnd:{...b.markerEnd&&typeof b.markerEnd=="object"?b.markerEnd:{},type:Rt.MarkerType.ArrowClosed}}:{...b,markerEnd:{...b.markerEnd&&typeof b.markerEnd=="object"?b.markerEnd:{},type:Rt.MarkerType.ArrowClosed}});a(x)}}e({type:du,payload:{id:v}}),f?.(p.WORKFLOW.ACTIVITY_ADD,{"console.product_account_id":h,message:"Activity added to workflow",name:t.data.name,integration_slug:t?.data?.properties?.integration_slug})}},o1=(e,t=[])=>{if(e==null)return"BOLTIC_AI";if(typeof e!="object")return e;if(Array.isArray(e)&&typeof e.map=="function")try{return e.map(r=>r==null||r===""?"BOLTIC_AI":o1(r,t))}catch{return e}const n={};for(const[r,i]of Object.entries(e)){if(t.includes(r)){n[r]=i;continue}if(i==="BOLTIC_AI"||i==="BOLTIC_AI_IGNORE"){n[r]=i;continue}if(i==null||i==="")n[r]="BOLTIC_AI";else if(Array.isArray(i)&&typeof i.map=="function"){if(i.length>0)try{n[r]=i.map(o=>o==null||o===""?"BOLTIC_AI":o1(o,t))}catch{n[r]=i}}else typeof i=="object"&&Object.keys(i).length===0?n[r]="BOLTIC_AI":typeof i=="object"&&i!==null?n[r]=o1(i,t):n[r]=i}return n},_0=e=>e==="BOLTIC_AI"||e==="BOLTIC_AI_IGNORE"?!0:Array.isArray(e)?e.length===0||e.every(t=>t==="BOLTIC_AI"||t==="BOLTIC_AI_IGNORE"):!1,mi=(e,t,n,r="icon")=>{const i=[...e,...t],o=new Map(i.map(p=>[p.type,p])),s=new Map(i.map(p=>[p.slug,p])),a=new Map(i.map(p=>[p.id,p])),{activity_id:l,integration_slug:u}=n?.properties||{};let c=u&&s.get(u)||null;c||n?.type===Je.SERVERLESS&&n?.activity_id&&(c=a.get(n.activity_id)||null),c||l&&(c=a.get(l)||null),c||(c=o.get(n?.type)||null);const f=c?.[r];return r==="icon"&&f?nh(f,"t.resize(h:20,w:20)"):f||""},Gce=({undo:e,redo:t,canRedo:n,canUndo:r,onLayout:i,onAutoLayout:o,bottomOffsetPx:s=0})=>{const a=E.useTheme(),l=mt.useDispatch(),u=Rt.useReactFlow(),{setNodes:c,getNodes:f,zoomIn:p,zoomOut:h,fitView:A}=u,{setViewport:g,getViewport:m,zoomTo:O}=u,[y,v]=C.useState(!1),[T,_]=C.useState(!1),x=f(),{activities:b,triggers:w}=mt.useSelector($=>$.activities),{canvasWorkflow:D,autoSaving:I,viewOnly:P}=mt.useSelector($=>$.canvas),[k,N]=C.useState(!1),L=!!(b?.data?.data&&w?.data?.data&&(b.data.data.length>0||w.data.data.length>0));C.useEffect(()=>{N(!!I)},[I]);const M=C.useCallback($=>{try{if(!$||!$.data)return a.palette.neutral.main;const Y=b?.data?.data||[],z=w?.data?.data||[];let H="";return(Y.length>0||z.length>0)&&(H=mi(Y,z,$?.data,"slug")||""),Nue($?.group||$?.type,$?.data?.type,H)}catch{return a.palette.neutral.main}},[b,w,a.palette.neutral.main]),B=D?.meta?.isHorizontal??!0,Q=vo(),U=Rt.useStore($=>Array.isArray($?.transform)&&typeof $.transform[2]=="number"?$.transform[2]:typeof $?.viewport?.zoom=="number"?$.viewport.zoom:1)||1,q=Math.round(U*100),F={backgroundColor:a.palette.common.white,borderRadius:"6px",padding:"4px",...Ai,border:`1px solid ${a.palette.neutral.outlined.border}`,position:"relative",boxShadow:a.shadows[48]},W={backgroundColor:a.palette.common.white,borderRadius:"6px",padding:"4px",...Ai,position:"relative",boxShadow:a.shadows[48]},G=typeof navigator<"u"&&/(Mac|iPhone|iPad|iPod)/i.test(navigator.userAgent||""),R=($,Y)=>{const z=(H,V)=>{const X=H.toLowerCase();let J=null;return H==="⌘"||X==="cmd"||X==="command"||X==="meta"?J=G?"ic_command":null:H==="⇧"||X==="shift"?J="ic_shift":X==="ctrl"||X==="control"?J="ic_ctrl":H==="-"||X==="minus"?J="ic_shortcut_minus":H==="+"||X==="plus"||H==="="?J="ic_shortcut_plus":X==="0"?J="ic_0":X==="z"?J="ic_z":X==="c"&&(J="ic_c"),J?d.jsx(Ue,{src:J,width:16,height:16},`${H}-${V}`):d.jsx(E.Box,{component:"span",sx:{px:.75,py:.25,lineHeight:1,borderRadius:"4px",fontSize:11,color:a.palette.text.secondary,backgroundColor:a.palette.grey[100],border:`1px solid ${a.palette.grey[300]}`},children:H},`${H}-${V}`)};return d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,children:[d.jsx(E.Box,{component:"span",children:$}),Y&&Y.length>0&&d.jsx(E.Stack,{direction:"row",gap:.5,children:Y.map((H,V)=>z(H,V))})]})},j=C.useCallback(()=>{const $=f(),Y=$.some(H=>!vt(H.data?.activity_comment?.body)),z=$.map(H=>({...H,data:{...H.data,activity_comment:{...H.data?.activity_comment,visible:vt(H.data?.activity_comment?.body)?!1:!H.data?.activity_comment?.visible}}}));Y||l({type:Yn,payload:{open:!0,title:"No comments found",type:"info"}}),c(z)},[l,f,c]);return C.useEffect(()=>{const $=z=>{if(!(z instanceof HTMLElement))return!1;const H=z.tagName.toLowerCase();return z.isContentEditable?!0:H==="input"||H==="textarea"||H==="select"||z.getAttribute("role")==="textbox"},Y=z=>{if($(z.target))return;const H=G?z.metaKey:z.ctrlKey;if(!H&&z.shiftKey&&!z.altKey&&(z.key==="c"||z.key==="C")){z.preventDefault(),j();return}if(!(!H||z.altKey))switch(z.key){case"z":case"Z":{z.preventDefault(),z.shiftKey?t():e();return}case"y":case"Y":{G||(z.preventDefault(),t());return}case"0":{if(z.preventDefault(),A){A({duration:300,maxZoom:1,padding:.1});return}if(typeof g=="function"){const V=typeof m=="function"?m():void 0;g({x:V?.x??0,y:V?.y??0,zoom:1},{duration:400});return}if(typeof O=="function"){O(1,{duration:400});return}return}case"+":case"=":{z.preventDefault(),p({duration:400});return}case"-":{z.preventDefault(),h({duration:400});return}default:return}};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[A,f,G,t,j,e,p,h]),C.useEffect(()=>{I||_(!1)},[I]),d.jsxs(E.Box,{sx:{"& .MuiButtonBase-root.MuiIconButton-root":{p:.75}},children:[d.jsxs(Rt.Panel,{position:"bottom-center",style:{...F,position:"absolute",bottom:s,left:"48%",transform:"translateX(-100%)"},children:[d.jsx(E.Tooltip,{arrow:!0,title:R("Graph View"),children:d.jsx(E.Box,{children:d.jsx(E.IconButton,{onClick:()=>{Q===Br.DRAFT&&_(!0),l({type:g0,payload:!0}),i("LR"),P||N(!0)},sx:{backgroundColor:B?a.palette.primary[5]:"inherit","&.Mui-disabled":{backgroundColor:B?a.palette.primary[5]:"inherit",opacity:1}},disabled:T||k||B,"data-testid":"button-graph-view",children:d.jsx(Ue,{src:"ic_graph",width:20,height:20,sx:{path:{fill:B?a.palette.primary.main:"currentColor"}}})})})}),d.jsx(E.Tooltip,{arrow:!0,title:R("Tree View"),children:d.jsx(E.Box,{children:d.jsx(E.IconButton,{onClick:()=>{Q===Br.DRAFT&&_(!0),l({type:g0,payload:!1}),P||N(!0),i("TB")},sx:{backgroundColor:B?"inherit":a.palette.primary[5],"&.Mui-disabled":{backgroundColor:B?"inherit":a.palette.primary[5],opacity:1}},disabled:T||k||!B,"data-testid":"button-tree-view",children:d.jsx(Ue,{src:"ic_tree",width:20,height:20,sx:{path:{fill:B?"currentColor":a.palette.primary.main}}})})})}),d.jsx(E.Tooltip,{arrow:!0,title:R("Auto Layout"),children:d.jsx(E.Box,{children:d.jsx(E.IconButton,{onClick:()=>{o&&o()},disabled:k,"data-testid":"button-auto-layout",children:d.jsx(Ue,{src:"ic_auto_layout",width:22,height:22})})})})]}),d.jsxs(Rt.Panel,{position:"bottom-center",style:{...F,position:"absolute",bottom:s,left:"48%",transform:"translateX(6%)"},children:[d.jsx(E.Tooltip,{arrow:!0,title:R("Zoom out",[G?"⌘":"Ctrl","-"]),children:d.jsx(E.IconButton,{onClick:()=>h({duration:400}),"data-testid":"button-zoom-out","aria-keyshortcuts":`${G?"Meta":"Control"}+-`,sx:{color:a.palette.neutral.solid.bg},children:d.jsx(Ue,{src:"ic_minus",width:20,height:20})})}),d.jsxs(E.Typography,{variant:"body2",sx:{minWidth:48,width:48,textAlign:"center",color:a.palette.neutral.solid.bg,fontWeight:600,fontSize:14,letterSpacing:.2},children:[q,"%"]}),d.jsx(E.Tooltip,{arrow:!0,title:R("Zoom in",[G?"⌘":"Ctrl","+"]),children:d.jsx(E.IconButton,{onClick:()=>p({duration:400}),"data-testid":"button-zoom-in","aria-keyshortcuts":`${G?"Meta":"Control"}+=`,sx:{color:a.palette.neutral.solid.bg},children:d.jsx(Ue,{src:"ic_plus",width:20,height:20,sx:{path:{fill:a.palette.neutral.solid.bg}}})})}),d.jsx(E.Tooltip,{arrow:!0,title:R("Fit view",[G?"⌘":"Ctrl","0"]),children:d.jsx(E.IconButton,{onClick:()=>{if(A)A({duration:400,maxZoom:1,padding:.1});else if(typeof g=="function"){const $=typeof m=="function"?m():void 0;g({x:$?.x??0,y:$?.y??0,zoom:1},{duration:400})}else typeof O=="function"&&O(1,{duration:400})},"data-testid":"button-fit-view","aria-keyshortcuts":`${G?"Meta":"Control"}+0`,sx:{color:a.palette.neutral.solid.bg},children:d.jsx(Ue,{src:"ic_maximize",width:20,height:20})})})]}),d.jsxs(Rt.Panel,{position:"bottom-right",style:{right:0,bottom:s,height:"172px",flexDirection:"column",...Ai},children:[d.jsx(E.Stack,{sx:F,children:d.jsx(E.Tooltip,{arrow:!0,title:R("Toggle comments",["⇧","C"]),placement:"left-start",children:d.jsx("span",{children:d.jsx(E.IconButton,{onClick:j,"aria-keyshortcuts":"Shift+C","data-testid":"button-comments-toggle",children:d.jsx(Ue,{src:"ic_comment",width:20,height:20})})})})}),d.jsxs(E.Stack,{sx:F,children:[d.jsx(E.Tooltip,{arrow:!0,title:"Mini Map",placement:"left-start",children:d.jsx("span",{children:d.jsx(E.IconButton,{onClick:()=>v(!y),sx:{backgroundColor:y?a.palette.primary[5]:"inherit"},"data-testid":"button-minimap-toggle",children:d.jsx(Ue,{src:"ic_minimap",width:20,height:20,sx:{path:{fill:y&&a.palette.primary.main}}})})})}),y&&x.filter(Y=>Y&&Y.id&&Y.data&&Y.position&&typeof Y.position.x=="number"&&typeof Y.position.y=="number"&&Number.isFinite(Y.position.x)&&Number.isFinite(Y.position.y)).length>0&&d.jsx(Rt.MiniMap,{zoomable:!0,pannable:!0,nodeBorderRadius:6,style:{width:180,height:180,outline:`5px solid ${a.palette.common.white}`,borderRadius:"4px",boxShadow:a.shadows[4],right:44,margin:8,marginBottom:0},nodeColor:M},`minimap-${L?"loaded":"loading"}-${x.length}`)]}),d.jsxs(E.Stack,{sx:{...W,height:"76px",flexDirection:"column",border:`1px solid ${a.palette.neutral.outlined.border}`},children:[d.jsx(E.Tooltip,{arrow:!0,title:R("Undo",[G?"⌘":"Ctrl","Z"]),placement:"left-start",children:d.jsx("span",{style:{cursor:r?"not-allowed":"pointer",pointerEvents:"auto"},children:d.jsx(E.IconButton,{onClick:e,disabled:r,"aria-keyshortcuts":`${G?"Meta":"Control"}+Z`,"data-testid":"canvas-button-undo",children:d.jsx(Ue,{src:"ic_undo",width:20,height:20,sx:{"& path":{fill:r?a.palette.grey[500]:a.palette.neutral.solid.bg}}})})})}),d.jsx(E.Tooltip,{arrow:!0,title:R("Redo",[G?"⌘":"Ctrl","⇧","Z"]),placement:"left-start",children:d.jsx("span",{style:{cursor:n?"not-allowed":"pointer",pointerEvents:"auto"},children:d.jsx(E.IconButton,{onClick:t,disabled:n,"aria-keyshortcuts":`${G?"Meta":"Control"}+Shift+Z`,"data-testid":"canvas-button-redo",children:d.jsx(Ue,{src:"ic_redo",width:20,height:20,sx:{"& path":{fill:n?a.palette.grey[500]:a.palette.neutral.solid.bg}}})})})})]})]})]})},HC=e=>{const t=mt.useDispatch(),{type:n,TESSERACT_MAIN_URL:r,openIntegrationDrawer:i,FRONTEND_URL:o,ENTITY_ID:s,buttonText:a,onClick:l,setMenuOpen:u}=e,c=()=>{const h={current_page:1,page_size:1,entity:n},A=Yt(r,"/v1/catalog");Xt.get(A,{params:h}).then(g=>{if(i){i(g.data.data[0],"create");return}const m=`${o}/accounts/${s}/integrations/destination/new-destination/${g.data.data[0]._id}/create`;window.open(m)}).catch(g=>{dn(g,t)}).finally(()=>{u(!1)})},f=h=>{h?.preventDefault?.(),h?.stopPropagation?.()},p=h=>{if(f(h),l){try{l()}finally{u(!1)}return}c()};return d.jsx(E.Stack,{direction:"row",sx:{width:"100%",justifyContent:"flex-end"},children:d.jsx(E.Button,{size:"medium",variant:"outlined",color:"primary",startIcon:d.jsx(Ue,{src:"ic_add",width:20,height:20}),onClick:p,onMouseDown:f,"data-testid":"add-new-cred-button",children:a||"Add new credentials"})})},Wce=({theme:e,auth:t,renderSteps:n,authSelectOpen:r,setAuthSelectOpen:i,authSearchValue:o,setAuthSearchValue:s,filteredAuthOptions:a})=>d.jsxs(d.Fragment,{children:[n,d.jsx(E.Divider,{sx:{mx:2}}),d.jsxs(E.Stack,{px:2,py:1.5,gap:1.25,children:[d.jsx(E.Typography,{variant:"smMedium",sx:{color:e.palette.text.primary},children:t.label}),d.jsxs(E.TextField,{select:!0,className:"nodrag",size:"small",fullWidth:!0,value:t.selected??"",onChange:l=>t.onSelect(String(l.target.value)),placeholder:"Select",onMouseDown:l=>l.stopPropagation(),onClick:l=>l.stopPropagation(),disabled:!!t.loading,SelectProps:{displayEmpty:!0,open:r,onOpen:()=>{i(!0)},onClose:()=>{i(!1),s("")},renderValue:l=>{const u=String(l??"");if(!u)return d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.tertiary},children:"Select"});const c=t.options?.find(f=>f.value===u)?.title??u;return d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})},MenuProps:{sx:{zIndex:l=>l.zIndex.modal+6},PaperProps:{sx:{mt:.75,borderRadius:"8px",border:`1px solid ${e.palette.grey.outlined.border}`,boxShadow:e.shadows[8],maxHeight:320}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px",height:40,"& .MuiSelect-select":{display:"flex",alignItems:"center",height:40,py:0,pr:4},"& .MuiSelect-icon":{right:10},"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey.outlined.border},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${E.alpha(e.palette.primary.main,.12)}`}}},children:[(!t.loading||a.length>0)&&d.jsx(E.ListSubheader,{sx:{position:"sticky",top:0,zIndex:10,bgcolor:"white","& .MuiInputBase-root":{width:"100%"},padding:0,marginBottom:1},children:d.jsx(E.OutlinedInput,{onChange:l=>s(String(l.target.value)),value:o,placeholder:"Search accounts",startAdornment:d.jsx(Ue,{src:"ic_search",width:24,height:24}),onKeyDown:l=>{l.stopPropagation(),l.key==="Escape"&&(i(!1),s(""))},onMouseDown:l=>{l.stopPropagation()},onClick:l=>{l.stopPropagation()},inputRef:l=>{l&&r&&setTimeout(()=>l.focus(),0)},sx:{width:"100%"}})},"auth-search-input"),a.map((l,u)=>d.jsx(E.MenuItem,{value:l.value,sx:{display:"flex",justifyContent:"flex-start",mx:1,height:"auto",p:"8px !important",minHeight:"fit-content !important","&.Mui-selected":{backgroundColor:E.alpha(e.palette.primary.main,.08),"& .MuiTypography-root":{color:e.palette.primary.main}}},children:d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary},children:l.title})},`${l.value}-${u}`)),!t.loading&&a.length===0?d.jsx(E.MenuItem,{disabled:!0,sx:{justifyContent:"center",p:"6px 12px"},children:d.jsx(E.Typography,{variant:"smNormal",children:o?"No matching accounts":"No accounts found"})}):null,t.addNewAccount?d.jsx(E.MenuItem,{selected:!1,sx:{position:"sticky",bottom:0,p:2,zIndex:1e3,height:"auto",":hover":{backgroundColor:`${e.palette.common.white} !important`},backgroundColor:`${e.palette.common.white} !important`,borderRadius:0,cursor:"auto",borderTop:`1px solid ${e.palette.neutral.outlined.border}`},disableRipple:!0,onMouseDown:l=>{l.stopPropagation(),l.preventDefault()},onClick:l=>{l.stopPropagation(),l.preventDefault()},children:d.jsx(HC,{type:t.addNewAccount.type,TESSERACT_MAIN_URL:t.addNewAccount.TESSERACT_MAIN_URL,FRONTEND_URL:t.addNewAccount.FRONTEND_URL,ENTITY_ID:t.addNewAccount.ENTITY_ID,openIntegrationDrawer:t.addNewAccount.openIntegrationDrawer,buttonText:"Add new account",onClick:t.addNewAccount.onClick,setMenuOpen:i})},"ai-auth-add-new-account"):null]}),t.errorText&&d.jsx(E.Typography,{variant:"xsNormal",sx:{color:e.palette.error.main},children:t.errorText}),d.jsx(E.Stack,{direction:"row",justifyContent:"flex-start",children:d.jsx(E.Button,{variant:"contained",disabled:t.continueDisabled,onClick:t.onContinue,startIcon:d.jsx(Ue,{src:"ic_spark",width:16,height:16}),sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2},children:"Continue Generating"})})]})]});function zk(e){const t=String(e??"").trim();let r=t.split(`
|
|
139
139
|
`).map(o=>o.trim()).filter(Boolean)[0]??t;const i=r.match(/\(([^)]+)\)\s*$/);if(i?.[1]){const o=i[1].trim();(/^blt-int\.[a-z0-9._-]+$/i.test(o)||/^[a-z0-9._-]+\.[a-z0-9._-]+$/i.test(o))&&(r=r.slice(0,r.lastIndexOf("(")).trim())}return r=r.replace(/\s*(?:-|\||:|—)\s*(?:blt-int\.[a-z0-9._-]+|[a-z0-9._-]+\.[a-z0-9._-]+)\s*$/i,""),r.trim()}const Qce=({theme:e,choice:t,renderSteps:n})=>d.jsxs(d.Fragment,{children:[n,d.jsx(E.Divider,{sx:{mx:2}}),d.jsxs(E.Stack,{px:2,py:1.5,gap:1.25,children:[d.jsx(E.Typography,{variant:"smMedium",sx:{color:e.palette.text.primary},children:t.label}),t.multiSelect?d.jsx(E.TextField,{select:!0,size:"small",fullWidth:!0,className:"nodrag",value:t.selectedMultiple??[],onMouseDown:r=>r.stopPropagation(),onClick:r=>r.stopPropagation(),onChange:r=>t.onSelectMultiple?.(r.target.value),SelectProps:{multiple:!0,displayEmpty:!0,renderValue:r=>{const i=r;return i.length?d.jsx(E.Stack,{direction:"row",gap:.5,flexWrap:"wrap",alignItems:"center",children:i.map(o=>{const s=t.options.find(a=>a.value===o);return d.jsx(E.Chip,{label:s?.title??zk(o),size:"small",sx:{height:20,fontSize:11,fontWeight:600,bgcolor:E.alpha(e.palette.primary.main,.1),color:e.palette.primary.main,"& .MuiChip-label":{px:1}}},o)})}):d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.tertiary},children:"Select events"})},MenuProps:{sx:{zIndex:r=>r.zIndex.modal+6},PaperProps:{sx:{mt:.75,borderRadius:"8px",border:`1px solid ${e.palette.grey.outlined.border}`,boxShadow:e.shadows[8],maxHeight:320,py:.5}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px",minHeight:40,"& .MuiSelect-select":{py:.75,pr:7.5,display:"flex",alignItems:"center",flexWrap:"wrap"},"& .MuiSelect-icon":{right:10},"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey.outlined.border},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${E.alpha(e.palette.primary.main,.12)}`}}},children:t.options.map(r=>d.jsxs(E.MenuItem,{value:r.value,sx:{mx:.5,my:.25,borderRadius:"6px",minHeight:40,px:1,py:.5,gap:.5,"&.Mui-selected":{bgcolor:"transparent"},"&.Mui-selected:hover":{bgcolor:E.alpha(e.palette.primary.main,.06)}},children:[d.jsx(E.Checkbox,{size:"small",checked:(t.selectedMultiple??[]).includes(r.value),sx:{p:.5,color:e.palette.grey[400],"&.Mui-checked":{color:e.palette.primary.main}}}),d.jsx(E.ListItemText,{primary:r.title,primaryTypographyProps:{variant:"smNormal",color:e.palette.text.primary}})]},r.value))}):d.jsx(E.TextField,{select:!0,size:"small",fullWidth:!0,className:"nodrag",value:t.selected??"",onMouseDown:r=>r.stopPropagation(),onClick:r=>r.stopPropagation(),onChange:r=>t.onSelect(String(r.target.value)),placeholder:"Select an option",SelectProps:{displayEmpty:!0,renderValue:r=>{const i=String(r??"");if(!i)return d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.tertiary},children:"Select an option"});const o=t.options.find(u=>u.value===i)||null,s=o?.title?String(o.title):zk(i),a=o?.icon?String(o.icon):"",l=t.options?.find(u=>u.value===i)?.recommended===!0;return d.jsxs(E.Stack,{direction:"row",alignItems:"center",sx:{width:"100%"},children:[d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:.75,sx:{overflow:"hidden",flex:1,minWidth:0},children:[a?d.jsx(E.Box,{component:"img",src:a,alt:"",sx:{width:20,height:20,borderRadius:"4px"}}):null,d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s})]}),l&&d.jsx(E.Chip,{label:"Recommended",size:"small",sx:{height:20,ml:1,bgcolor:e.palette.common.white,border:`1px solid ${E.alpha(e.palette.primary.main,.5)}`,color:e.palette.primary.main,fontWeight:600,"& .MuiChip-label":{px:1}}})]})},MenuProps:{sx:{zIndex:r=>r.zIndex.modal+6},PaperProps:{sx:{mt:.75,borderRadius:"8px",border:`1px solid ${e.palette.grey.outlined.border}`,boxShadow:e.shadows[8],maxHeight:320,py:.5}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px",height:40,"& .MuiSelect-select":{display:"flex",alignItems:"center",height:40,py:0,pr:7.5},"& .MuiSelect-icon":{right:10},"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey.outlined.border},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${E.alpha(e.palette.primary.main,.12)}`}}},children:t.options.map((r,i)=>d.jsxs(E.MenuItem,{value:r.value,sx:{mx:.5,my:.25,borderRadius:"6px",minHeight:40,px:1.25,py:.75,display:"flex",alignItems:"center",gap:1,"&.Mui-selected":{bgcolor:E.alpha(e.palette.primary.main,.08)},"&.Mui-selected:hover":{bgcolor:E.alpha(e.palette.primary.main,.12)}},children:[r.icon?d.jsx(E.Box,{component:"img",src:String(r.icon),alt:"",sx:{width:20,height:20,borderRadius:"4px",flexShrink:0}}):null,d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:r.title}),r.recommended&&d.jsx(E.Chip,{label:"Recommended",size:"small",sx:{height:20,bgcolor:e.palette.common.white,border:`1px solid ${E.alpha(e.palette.primary.main,.5)}`,color:e.palette.primary.main,fontWeight:600,"& .MuiChip-label":{px:1}}})]},`${r.value}-${i}`))}),d.jsx(E.Stack,{direction:"row",justifyContent:"flex-start",children:d.jsx(E.Button,{variant:"contained",disabled:t.continueDisabled,onClick:t.onContinue,startIcon:d.jsx(Ue,{src:"ic_spark",width:16,height:16}),sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2},children:"Continue Generating"})})]})]}),s1=e=>e.stopPropagation(),zce=(e,t)=>e.replace(/\{([^}]+)\}/g,(n,r)=>String(t[r]??"")),Xce=(e,t)=>t.labelTemplate?zce(t.labelTemplate,e):String(e[t.labelKey]??""),Xk=(e,t)=>{if(e)return t.split(".").reduce((n,r)=>n?.[r],e)},Yce=(e,t)=>{if(t){const n=Xk(e,t);return Array.isArray(n)?n:[]}return Array.isArray(e)?e:Array.isArray(e?.data)?e.data:Array.isArray(e?.data?.data)?e.data.data:Array.isArray(e?.items)?e.items:Array.isArray(e?.data?.items)?e.data.items:[]},qce=(e,t,n)=>e?.baseUrlKey?String(n?.[e.baseUrlKey]??""):t||"",Kce=(e,t,n,r)=>e.replace(/\{([^}]+)\}/g,(i,o)=>{if(o==="entity_id")return String(r??"");const s=t?.[o]??n?.[o];return s==null?i:String(s)}),Zce=(e,t,n)=>{if(!n)return e&&t.length>0&&t.find(i=>i.value===e)||null;const r=Array.isArray(e)?e:e?[e]:[];return t.filter(i=>r.some(o=>i.value===o))},Jce=({field:e,value:t,theme:n,onChange:r,resolvedAuth:i,vortexMainUrl:o,workflowUrls:s,entityId:a,formValues:l={}})=>{const[u,c]=C.useState([]),[f,p]=C.useState(!1),[h,A]=C.useState(""),g=e.meta?.config,m=g?.multiple===!0,O=g?.dependsOn,y=O?i?.[O]??l?.[O]:null;C.useEffect(()=>{if(!g||O&&!y){c([]);return}const b=setTimeout(async()=>{p(!0);try{const w=g.method?.toLowerCase()||"get",D=qce(g,o,s),I=Kce(String(g.url??""),l,i,a);let P;I.startsWith("http")?P=I:a&&g.includeEntityId!==!1?P=`${D}/v1.0/${a}${I}`:P=`${D}${I}`;let k;if(w==="post"){const M={...g.params};if(Object.keys(M).forEach(U=>{if(typeof M[U]=="string"&&M[U].startsWith("{")&&M[U].endsWith("}")){const q=M[U].slice(1,-1);M[U]=l?.[q]??M[U]}}),M.fields_to_fill&&typeof M.fields_to_fill=="object"){const U=M.fields_to_fill,q={};Object.values(U).forEach(F=>{q[F]=F}),M.fields_to_fill=q}const B={secret:y,...M},Q=await Xt.post(P,{data:B,headers:{"Content-Type":"application/json"}});k=Q?.data||Q||[]}else{const B={[g.searchParamName||"search_term"]:h,page:"1",limit:"100"};g.params?Object.entries(g.params).forEach(([U,q])=>{if(typeof q=="string"&&q.startsWith("{")&&q.endsWith("}")){const F=q.slice(1,-1);let W=l?.[F];W===void 0&&F===O&&(W=y),B[U]=String(W??"")}else B[U]=String(q)}):O&&y&&(B[O]=String(y));const Q=await Xt.get(P,{params:B});k=Q?.data||Q||[]}const L=Yce(k,g.responseDataPath).map(M=>({label:g.labelKey?Xce(M,g):M.label,value:g.valueKey?M[g.valueKey]:M.value,raw:M}));c(L)}catch{c([])}finally{p(!1)}},300);return()=>clearTimeout(b)},[g?.url,g?.method,g?.params?JSON.stringify(g.params):void 0,O,y,h,a,o,s]);const _={...{"& .MuiOutlinedInput-root":{backgroundColor:n.palette.common.white,borderRadius:"6px",alignItems:m?"flex-start":"center",minHeight:m?40:void 0,py:m?.5:void 0,pr:m?"64px !important":void 0,"& .MuiOutlinedInput-notchedOutline":{borderColor:n.palette.grey.outlined?.border??n.palette.grey[300]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:n.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:n.palette.primary.main,boxShadow:`0 0 0 3px ${E.alpha(n.palette.primary.main,.12)}`}}},...m?{"& .MuiAutocomplete-inputRoot":{flexWrap:"wrap",gap:.5,maxHeight:104,overflowY:"auto",overflowX:"hidden"},"& .MuiAutocomplete-tag":{maxWidth:"calc(100% - 8px)",height:24,my:.25,"& .MuiChip-label":{maxWidth:220,overflow:"hidden",textOverflow:"ellipsis"}},"& .MuiAutocomplete-endAdornment":{top:8},"& .MuiAutocomplete-input":{minWidth:"80px !important"}}:{}};return d.jsx(E.Autocomplete,{className:"nodrag",size:"small",fullWidth:!0,multiple:m,options:u,loading:f,value:Zce(t,u,m),onChange:(x,b)=>{if(m){r(e.name,b.map(I=>I.value));return}const w=b;r(e.name,w?.value??null);const D=g?.relatedFields;D&&Object.entries(D).forEach(([I,P])=>{r(I,Xk(w?.raw,P)??null)})},onInputChange:(x,b)=>{A(b)},onMouseDown:s1,onClick:s1,onKeyDown:s1,onKeyUp:s1,getOptionLabel:x=>x.label,noOptionsText:f?"Loading...":"No options available",renderInput:x=>d.jsx(E.TextField,{...x,placeholder:e.meta?.placeholder??`Enter ${e.label??e.name}`,sx:_,InputProps:{...x.InputProps,endAdornment:d.jsxs(d.Fragment,{children:[f?d.jsx(E.CircularProgress,{color:"inherit",size:20}):null,x.InputProps.endAdornment]})}}),ListboxProps:{style:{maxHeight:240}},slotProps:{paper:{sx:{mt:.75,borderRadius:"8px",border:`1px solid ${n.palette.grey.outlined?.border??n.palette.grey[300]}`,boxShadow:n.shadows[8]}}}})};function VC(e){return String(e.meta?.displayName??e.label??e.name)}function _f(e){return String(e.meta?.placeholder??`Enter ${VC(e)}`)}function ede(e){return e==null||String(e).trim()===""}const yd=e=>({"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px","& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey.outlined?.border??e.palette.grey[300]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${E.alpha(e.palette.primary.main,.12)}`}}}),xr=e=>e.stopPropagation(),tde=e=>String(e.label??e.title??e.value??""),a1=e=>e.value;function nde(e){return e==null?"":typeof e=="string"?e:typeof e=="object"?JSON.stringify(e,null,2):String(e)}function rde({field:e,value:t,theme:n,onChange:r}){const i=e.meta?.options??[];return d.jsx(E.TextField,{select:!0,className:"nodrag",size:"small",fullWidth:!0,label:VC(e),value:String(t??""),onChange:o=>r(e.name,o.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,SelectProps:{displayEmpty:!0,MenuProps:{sx:{zIndex:o=>o.zIndex.modal+10},PaperProps:{sx:{mt:1,borderRadius:"8px",border:`1px solid ${n.palette.grey.outlined?.border??n.palette.grey[300]}`,boxShadow:n.shadows[8],maxHeight:280}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},renderValue:o=>{const s=String(o??"");if(!s)return d.jsx(E.Typography,{variant:"smNormal",sx:{color:n.palette.text.tertiary},children:_f(e)});const a=i.find(l=>String(l.value)===s);return d.jsx(E.Typography,{variant:"smNormal",sx:{color:n.palette.text.primary},children:String(a?.label??s)})}},sx:yd(n),children:i.length>0?i.map((o,s)=>d.jsx(E.MenuItem,{value:String(o.value),sx:{mx:1,p:"8px !important",minHeight:"fit-content !important","&.Mui-selected":{backgroundColor:E.alpha(n.palette.primary.main,.08)}},children:d.jsx(E.Typography,{variant:"smNormal",children:String(o.label??o.value)})},`${String(o.value)}-${s}`)):d.jsx(E.MenuItem,{disabled:!0,sx:{justifyContent:"center"},children:d.jsx(E.Typography,{variant:"smNormal",children:"No options available"})})})}function Yk({field:e,value:t,theme:n,onChange:r}){const i=e.meta?.options??[],o=String(e.meta?.displayType??"").toLowerCase()==="multiselect",s=o?i.filter(a=>(Array.isArray(t)?t:[]).some(l=>String(l)===String(a1(a)))):i.find(a=>String(a1(a))===String(t??""))??null;return d.jsx(E.Autocomplete,{className:"nodrag",size:"small",fullWidth:!0,multiple:o,options:i,value:s,onChange:(a,l)=>{if(o){r(e.name,l.map(a1));return}r(e.name,l?a1(l):"")},onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,getOptionLabel:tde,renderInput:a=>d.jsx(E.TextField,{...a,placeholder:_f(e),sx:yd(n)})})}function qk({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,multiline:!0,minRows:3,maxRows:6,value:String(t??""),placeholder:_f(e),onChange:i=>r(e.name,i.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr},sx:yd(n)})}function ide({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,multiline:!0,minRows:5,maxRows:10,value:nde(t),placeholder:_f(e),onChange:i=>r(e.name,i.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr,style:{fontFamily:"monospace"}},sx:yd(n)})}function ode({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,type:"number",value:t??"",placeholder:_f(e),onChange:i=>r(e.name,i.target.value===""?"":Number(i.target.value)),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr},sx:yd(n)})}function sde({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,type:"datetime-local",value:String(t??""),placeholder:_f(e),onChange:i=>r(e.name,i.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr},sx:yd(n)})}function ade({field:e,value:t,theme:n,onChange:r}){const i=Array.isArray(t)?t.join(`
|
|
140
140
|
`):String(t??"");return d.jsx(qk,{field:e,value:i,theme:n,onChange:(o,s)=>{r(o,String(s).split(`
|
|
141
|
-
`).map(a=>a.trim()).filter(Boolean))}})}function Kk({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,value:String(t??""),placeholder:_f(e),onChange:i=>r(e.name,i.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr},sx:{...yd(n),"& .MuiOutlinedInput-root":{...yd(n)["& .MuiOutlinedInput-root"],height:40}}})}function lde({field:e,value:t,theme:n,onChange:r}){const i=t===!0||t==="true";return d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,children:[d.jsx(E.Switch,{className:"nodrag",size:"small",checked:i,onChange:o=>r(e.name,o.target.checked),onMouseDown:xr,onClick:xr,sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:n.palette.primary.main},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:n.palette.primary.main}}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:n.palette.text.secondary},children:i?"Yes":"No"})]})}function ude(e,t,n,r,i,o,s,a,l){const u=String(e.meta?.displayType??e.type??"text").toLowerCase(),c=Array.isArray(e.meta?.options)&&(e.meta?.options?.length??0)>0,f=e.meta?.config?.urlType==="choices";return u==="toggle"?d.jsx(lde,{field:e,value:t,theme:n,onChange:r}):u==="autocomplete"&&f?d.jsx(Jce,{field:e,value:t,theme:n,onChange:r,resolvedAuth:i||{},vortexMainUrl:o,workflowUrls:s,entityId:a,formValues:l}):u==="autocomplete"&&c?d.jsx(Yk,{field:e,value:t,theme:n,onChange:r}):u==="select"||u==="multiselect"?u==="multiselect"&&c?d.jsx(Yk,{field:e,value:t,theme:n,onChange:r}):c?d.jsx(rde,{field:e,value:t,theme:n,onChange:r}):d.jsx(Kk,{field:e,value:t,theme:n,onChange:r}):u==="textarea"?d.jsx(qk,{field:e,value:t,theme:n,onChange:r}):u==="code"?d.jsx(ide,{field:e,value:t,theme:n,onChange:r}):u==="number"?d.jsx(ode,{field:e,value:t,theme:n,onChange:r}):u==="datetime"?d.jsx(sde,{field:e,value:t,theme:n,onChange:r}):u==="multitext"?d.jsx(ade,{field:e,value:t,theme:n,onChange:r}):d.jsx(Kk,{field:e,value:t,theme:n,onChange:r})}const cde=({theme:e,parameters:t,renderSteps:n,onValuesChange:r,resolvedAuth:i={},vortexMainUrl:o,workflowUrls:s,entityId:a})=>{const[l,u]=C.useState(t.values??{}),[c,f]=C.useState(0),p=C.useRef(t.values??{}),h=t.fields.map(w=>w.name).join(","),A=JSON.stringify(t.values??{});C.useEffect(()=>{u(t.values??{}),p.current=t.values??{},f(0)},[h]),C.useEffect(()=>{p.current=t.values??{}},[A]);const g=t.fields[c],m=c===t.fields.length-1,O=l[g?.name??""],v=ede(O),T=(w,D)=>{u(I=>({...I,[w]:D}))},_=()=>{const w=g?.name??"";l[w]!==p.current[w]&&r(l),m?t.onContinue(l):f(I=>I+1)},x=()=>{c>0&&f(w=>w-1)};if(!g)return null;const b=String(g.meta?.description??"");return d.jsxs(d.Fragment,{children:[n,d.jsx(E.Divider,{sx:{mx:2}}),d.jsxs(E.Stack,{px:2,py:1.5,gap:1.5,sx:{overflowY:"auto",flex:1},children:[d.jsxs(E.Typography,{variant:"smMedium",sx:{color:e.palette.text.primary},children:["Configure ",t.integrationName]}),d.jsxs(E.Typography,{variant:"xsNormal",sx:{color:e.palette.text.tertiary},children:["Step ",c+1," of ",t.fields.length]}),d.jsxs(E.Stack,{gap:1,children:[d.jsxs(E.Typography,{variant:"xsMedium",sx:{color:e.palette.text.secondary},children:[VC(g),(g.required??g.meta?.validation?.required)&&d.jsx(E.Typography,{component:"span",variant:"xsMedium",sx:{color:e.palette.error.main,ml:.25},children:"*"})]}),ude(g,O,e,T,i,o,s,a,l),b?d.jsx(E.Typography,{variant:"xsNormal",sx:{color:e.palette.text.tertiary},children:b}):null]}),d.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",pt:.5,pb:.5,gap:1,children:[d.jsx(E.Button,{variant:"outlined",disabled:c===0,onClick:x,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2,color:e.palette.text.secondary,borderColor:e.palette.grey[300]},children:"Back"}),d.jsx(E.Button,{variant:"contained",disabled:v,onClick:_,startIcon:d.jsx(Ue,{src:"ic_spark",width:16,height:16}),sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2},children:m?"Done":"Next"})]})]})]})},Zk=["Send email via Gmail","Post to Slack channel","Make API call"],Jk={trigger:{title:"Tell Boltic AI what starts this workflow",inputPlaceholder:"e.g., When a new email is received in Gmail"},activity:{title:"Tell Boltic AI the next step",inputPlaceholder:"e.g., Send an email to the customer, Add Slack etc"}},eM=280,tM=4,rh=220,dde=({theme:e,isInline:t,draggable:n,dragging:r,promptCopy:i,promptInputId:o,promptInputName:s,promptInputRef:a,promptInputUnlocked:l,setPromptInputUnlocked:u,prompt:c,setPrompt:f,trimmedPrompt:p,canSubmitPrompt:h,chips:A,onSubmit:g,onAddManually:m,onDragPointerDown:O,onDragPointerMove:y,onDragPointerUp:v})=>d.jsxs(E.Stack,{px:2,py:2,gap:2,children:[d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,className:t?"boltic-ai-rf-drag":void 0,sx:{cursor:t||n?r?"grabbing":"grab":"default",touchAction:t||n?"none":"auto"},...n&&!t?{onPointerDown:O,onPointerMove:y,onPointerUp:v,onPointerCancel:v}:{},children:[d.jsx(Ue,{src:"ic_AI",width:24,height:24,sx:{"& path":{fill:e.palette.primary.main}}}),d.jsx(E.Typography,{variant:"lgMedium",sx:{color:e.palette.text.primary},children:i.title})]}),d.jsx(E.TextField,{fullWidth:!0,id:o,name:s,inputRef:a,autoFocus:!0,value:c,onFocus:()=>u(!0),onChange:T=>{T.stopPropagation(),f(T.target.value)},onMouseDown:T=>T.stopPropagation(),onClick:T=>{T.stopPropagation(),u(!0)},placeholder:i.inputPlaceholder,size:"small",autoComplete:"new-password",inputProps:{autoComplete:"new-password",readOnly:!l,autoCorrect:"off",autoCapitalize:"off",spellCheck:"false","aria-autocomplete":"none","data-form-type":"other","data-lpignore":"true"},onKeyDown:T=>{T.stopPropagation(),!T.nativeEvent.isComposing&&T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),g&&h&&g(p))},onKeyUp:T=>T.stopPropagation(),InputProps:{endAdornment:d.jsx(E.InputAdornment,{position:"end",children:d.jsx(E.IconButton,{"aria-label":"Submit prompt",onClick:()=>{h&&g?.(p)},disabled:!h,sx:{width:24,height:24,borderRadius:"6px",bgcolor:e.palette.primary.main,"&:hover":{bgcolor:e.palette.primary[60]??e.palette.primary.main},"&.Mui-disabled":{bgcolor:e.palette.primary.disabled}},children:d.jsx(Ue,{src:"ic_arrow_right",width:16,height:16,sx:{"& path":{fill:e.palette.common.white}}})})})},sx:{"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px",paddingRight:"8px",minHeight:46,"& fieldset":{borderColor:e.palette.golden.main},"&:hover fieldset":{borderColor:e.palette.golden?.hover??e.palette.primary[30]},"&.Mui-focused fieldset":{borderColor:e.palette.golden.main}},"& .MuiOutlinedInput-input":{paddingTop:14,paddingBottom:14,lineHeight:"20px"},"& input::placeholder":{opacity:.64}}}),d.jsx(E.Stack,{direction:"row",gap:1,flexWrap:"wrap",children:A.map(T=>d.jsx(E.Chip,{label:T,variant:"outlined",onClick:()=>{f(T)},sx:{height:26,borderRadius:"6px",bgcolor:e.palette.grey[50],borderColor:e.palette.grey.outlined.border,"& .MuiChip-label":{px:1,fontSize:12,fontWeight:600,color:e.palette.text.secondary},"&:hover":{bgcolor:e.palette.primary[5],borderColor:e.palette.primary[30]}}},T))}),d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1.5,children:[d.jsx(E.Divider,{sx:{flex:1}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary},children:"Or"}),d.jsx(E.Divider,{sx:{flex:1}})]}),d.jsx(E.Button,{fullWidth:!0,variant:"outlined",onClick:m,sx:{width:"100%",height:32,borderRadius:"6px",borderColor:e.palette.grey.outlined.border,color:e.palette.text.secondary,fontWeight:600,textTransform:"none",justifyContent:"center","&:hover":{borderColor:e.palette.primary.main,bgcolor:e.palette.common.white}},children:"Add Manually"})]}),GC=".boltic-ai-rf-drag",fde=({open:e,mode:t="prompt",suggestions:n,onClose:r,onSubmit:i,onRetry:o,onAddManually:s,steps:a=[],choice:l,auth:u,parameters:c,errorText:f,anchor:p,draggable:h=!1,variant:A="popup",promptKind:g="activity",promptValue:m,onPromptChange:O,vortexMainUrl:y,workflowUrls:v})=>{const T=E.useTheme(),[_,x]=C.useState(m??""),b=C.useCallback(ne=>{x(ne),O?.(ne)},[O]);C.useEffect(()=>{m!==void 0&&x(m)},[m]);const w=C.useRef(null),D=C.useRef(null),[I,P]=C.useState(null),k=C.useRef(null),[N,L]=C.useState(!1),M=A==="inline",B=t==="stream"||t==="needs_user_choice"||t==="needs_auth"||t==="needs_parameters",Q=Jk[g]??Jk.activity,U=C.useRef(0),q=C.useRef(null),F=C.useRef(null),[W,G]=C.useState([]),[R,j]=C.useState(!1),[$,Y]=C.useState(""),[z,H]=C.useState(!1),V=C.useMemo(()=>`boltic-ai-prompt-input-${Math.random().toString(36).slice(2,10)}`,[]),X=C.useMemo(()=>`boltic-ai-prompt-${Math.random().toString(36).slice(2,10)}`,[]),J=C.useMemo(()=>{const ne=u?.options||[],se=String($||"").trim().toLowerCase();return se?ne.filter(pe=>String(pe?.title||"").toLowerCase().includes(se)):ne},[u?.options,$]),ee=C.useMemo(()=>{const ne=(n??Zk).filter(Boolean);return ne.length?ne:Zk},[n]),le=_.trim(),re=le.length>3,ue=(ne,se)=>{const pe=D.current,he=pe?.offsetParent??null;if(!pe||!he)return{left:ne,top:se};const de=pe.getBoundingClientRect(),xe=de.width||550,me=de.height||(B?eM:280),Ee=xe/2,ke=me/2,Ge=Math.min(Math.max(ne,Ee),Math.max(Ee,he.clientWidth-Ee)),$e=Math.min(Math.max(se,ke),Math.max(ke,he.clientHeight-ke));return{left:Ge,top:$e}};C.useEffect(()=>{if(!e){k.current=null,L(!1),U.current=0,G([]),b(""),H(!1);return}M||I||!D.current||requestAnimationFrame(()=>{const ne=D.current,se=ne?.offsetParent??null;if(!(!ne||!se))if(p&&typeof p.x=="number"&&typeof p.y=="number"){const pe=se.getBoundingClientRect(),he=p.x-pe.left,de=p.y-pe.top;P(ue(he,de))}else P({left:Math.max(0,se.clientWidth/2),top:Math.max(0,se.clientHeight/2)})})},[p,M,e,I]);const Oe=ne=>{if(!h||!D.current)return;const se=D.current.offsetParent??null;if(!se)return;const pe=ne.pointerId;ne.currentTarget.setPointerCapture(pe);const he=I?.left??se.clientWidth/2,de=I?.top??se.clientHeight/2;k.current={pointerId:pe,startClientX:ne.clientX,startClientY:ne.clientY,startLeft:he,startTop:de},L(!0)},ve=ne=>{if(!h)return;const se=k.current;if(!se||se.pointerId!==ne.pointerId)return;const pe=ne.clientX-se.startClientX,he=ne.clientY-se.startClientY,de=ue(se.startLeft+pe,se.startTop+he);P(de)},oe=ne=>{if(!h)return;const se=k.current;!se||se.pointerId!==ne.pointerId||(k.current=null,L(!1))};if(C.useEffect(()=>{(!e||!B)&&(U.current=0,G([]))},[B,e]),C.useEffect(()=>{if(!e||t!=="prompt")return;const ne=window.setTimeout(()=>{w.current?.focus()},0);return()=>{window.clearTimeout(ne)}},[e,t]),C.useEffect(()=>{if(!e||!B)return;if(q.current&&(cancelAnimationFrame(q.current),q.current=null),F.current&&(window.clearTimeout(F.current),F.current=null),!a||a.length===0){U.current=0,G([]);return}const ne=U.current,se=a.length,pe=new Map(a.map(de=>[de.id,de]));if(se<ne){U.current=se;const de=a.slice(-tM).map(xe=>({...xe,anim:"enter"}));G(de),q.current=requestAnimationFrame(()=>{G(xe=>xe.map(me=>me.anim==="enter"?{...me,anim:"steady"}:me)),q.current=null});return}U.current=se;const he=a.slice(ne);G(de=>{let xe=de.map(ke=>({...ke,...pe.get(ke.id)??{},anim:ke.anim}));for(const ke of he)xe.push({...ke,anim:"enter"});const Ee=xe.filter(ke=>ke.anim!=="exit").length-tM;if(Ee>0){let ke=Ee;xe=xe.map(Ge=>ke<=0||Ge.anim==="exit"?Ge:(ke-=1,{...Ge,anim:"exit"}))}return xe}),q.current=requestAnimationFrame(()=>{G(de=>de.map(xe=>xe.anim==="enter"?{...xe,anim:"steady"}:xe)),q.current=null}),F.current=window.setTimeout(()=>{G(de=>de.filter(xe=>xe.anim!=="exit")),F.current=null},rh)},[B,e,a]),!e)return null;const ae=d.jsx(E.IconButton,{"aria-label":"Close",onClick:r,sx:{position:"absolute",top:8,right:8,zIndex:2,width:32,height:32,borderRadius:"6px",color:T.palette.neutral?.solid?.bg??T.palette.grey[700],"&:hover":{bgcolor:E.alpha(T.palette.grey[300],.6)}},children:d.jsx(Ue,{src:"ic_close",width:20,height:20})}),te=B&&(h||M)?d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,className:M?"boltic-ai-rf-drag":void 0,sx:{px:2,pt:1.5,pb:1,pr:7,cursor:N?"grabbing":"grab",touchAction:"none"},...h&&!M?{onPointerDown:Oe,onPointerMove:ve,onPointerUp:oe,onPointerCancel:oe}:{},children:[d.jsx(Ue,{src:"ic_spark",width:18,height:18,sx:{"& path":{fill:T.palette.primary.main}}}),d.jsx(E.Typography,{variant:"smMedium",sx:{color:T.palette.text.primary},children:"Generating"})]}):null,Z=d.jsx(E.Box,{sx:{flex:1,px:2,py:2,overflow:"hidden"},children:d.jsx(E.Box,{sx:{display:"flex",flexDirection:"column"},children:W.length===0?d.jsxs(E.Stack,{alignItems:"center",justifyContent:"center",py:2,gap:1,children:[d.jsx(E.CircularProgress,{size:16,sx:{color:T.palette.primary.main}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary},children:"Preparing steps..."})]}):W.map((ne,se)=>{const pe=se===W.length-1,he=ne.status==="done",de=ne.anim,xe=de==="exit"?{opacity:0,transform:"translateY(-16px) scale(0.985)",filter:"blur(1px)",maxHeight:0,marginBottom:0}:de==="enter"?{opacity:0,transform:"translateY(12px) scale(0.995)",filter:"blur(0.5px)",maxHeight:0,marginBottom:0}:{opacity:1,transform:"translateY(0px)",filter:"blur(0px)",maxHeight:80,marginBottom:pe?0:1.25};return d.jsx(E.Box,{sx:{overflow:"hidden",willChange:"transform, opacity, max-height, margin-bottom, filter",transition:`opacity ${rh}ms cubic-bezier(0.2, 0.7, 0.2, 1), transform ${rh}ms cubic-bezier(0.2, 0.7, 0.2, 1), max-height ${rh}ms ease, margin-bottom ${rh}ms ease, filter ${rh}ms ease`,...xe},children:d.jsxs(E.Stack,{direction:"row",gap:1.25,alignItems:"flex-start",children:[d.jsxs(E.Stack,{alignItems:"center",sx:{width:18},children:[he?d.jsx(Ue,{src:"ic_checked",width:16,height:16,sx:{color:T.palette.success.main}}):d.jsx(E.CircularProgress,{size:16,sx:{color:T.palette.primary.main}}),!pe&&d.jsx(E.Box,{sx:{width:2,flex:1,minHeight:18,bgcolor:E.alpha(T.palette.primary.main,.25),borderRadius:2}})]}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary,mt:"1px"},children:ne.label})]})},ne.id)})})});return d.jsxs(E.Box,{ref:D,role:"dialog","aria-modal":"false",onMouseDown:M?void 0:ne=>ne.stopPropagation(),onPointerDown:M?void 0:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onDoubleClick:ne=>ne.stopPropagation(),sx:{position:M?"relative":"absolute",top:M?"auto":I?`${I.top}px`:"50%",left:M?"auto":I?`${I.left}px`:"50%",transform:M?"none":"translate(-50%, -50%)",zIndex:M?0:ne=>ne.zIndex.modal+1,pointerEvents:"auto",userSelect:N?"none":"auto",width:550,maxWidth:"calc(100vw - 64px)",height:t==="needs_parameters"?"auto":B?eM:"auto",maxHeight:t==="needs_parameters"?520:void 0,borderRadius:"12px",border:`1px solid ${T.palette.primary[10]}`,boxShadow:T.shadows[48],backgroundImage:"linear-gradient(-11.6913deg, rgba(255,255,255,0.10) 50.775%, rgba(255,203,102,0.10) 75.467%, rgba(255,107,56,0.10) 89.624%, rgba(255,89,47,0.10) 103.12%, rgba(99,41,10,0.10) 113%), linear-gradient(90deg, #ffffff 0%, #ffffff 100%)",display:"flex",flexDirection:"column"},children:[ae,te,M&&t==="loading"?d.jsx(E.Box,{className:"boltic-ai-rf-drag","aria-hidden":!0,sx:{cursor:"grab",touchAction:"none",minHeight:36,flexShrink:0}}):null,t==="loading"?d.jsx(E.Stack,{alignItems:"center",justifyContent:"center",px:2,py:5,gap:1.5,minHeight:270,children:d.jsxs(E.Box,{sx:{position:"relative",width:100,height:105},children:[d.jsx(E.Box,{sx:{position:"absolute",top:0,left:4.5,width:91,height:91,bgcolor:E.alpha(T.palette.common.white,.2),borderRadius:"10px"}}),d.jsx(E.Box,{sx:{position:"absolute",top:13,left:22},children:d.jsx(Ue,{src:"ic_spark",width:56,height:56,sx:{"& path":{fill:T.palette.primary.main}}})}),d.jsx(E.Typography,{variant:"mdNormal",sx:{position:"absolute",top:92,left:"50%",transform:"translateX(-50%)",color:T.palette.text.tertiary,whiteSpace:"nowrap"},children:"Generating config.."})]})}):t==="stream"?d.jsx(d.Fragment,{children:Z}):t==="needs_user_choice"&&l?d.jsx(Qce,{theme:T,choice:l,renderSteps:Z}):t==="needs_auth"&&u?d.jsx(Wce,{theme:T,auth:u,renderSteps:Z,authSelectOpen:R,setAuthSelectOpen:j,authSearchValue:$,setAuthSearchValue:Y,filteredAuthOptions:J}):t==="needs_parameters"&&c?d.jsx(cde,{theme:T,parameters:c,renderSteps:Z,onValuesChange:c.onValuesChange,resolvedAuth:c.resolvedAuth,vortexMainUrl:y,workflowUrls:v,entityId:c.entityId}):t==="error"?d.jsxs(E.Stack,{px:2,py:2,gap:1.5,children:[d.jsx(E.Typography,{variant:"mdSemiBold",sx:{color:T.palette.text.primary},children:"Something went wrong"}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary},children:f||"Please try again."}),Array.isArray(n)&&n.length>0&&d.jsxs(E.Stack,{gap:1,children:[d.jsx(E.Typography,{variant:"xsNormal",sx:{color:T.palette.text.tertiary},children:"Try one of these prompts:"}),d.jsx(E.Stack,{direction:"row",gap:1,flexWrap:"wrap",children:n.slice(0,5).map(ne=>d.jsx(E.Chip,{label:ne,variant:"outlined",onClick:()=>i?.(String(ne).trim()),sx:{height:26,borderRadius:"6px",bgcolor:T.palette.grey[50],borderColor:T.palette.grey.outlined.border,"& .MuiChip-label":{px:1,fontSize:12,fontWeight:600,color:T.palette.text.secondary},"&:hover":{bgcolor:T.palette.primary[5],borderColor:T.palette.primary[30]}}},ne))})]}),d.jsxs(E.Stack,{direction:"row",justifyContent:"flex-start",gap:1,children:[d.jsx(E.Button,{variant:"contained",onClick:o,disabled:!o,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600},children:"Retry"}),d.jsx(E.Button,{variant:"outlined",onClick:r,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600},children:"Close"})]})]}):d.jsx(dde,{theme:T,isInline:M,draggable:h,dragging:N,promptCopy:Q,promptInputId:V,promptInputName:X,promptInputRef:w,promptInputUnlocked:z,setPromptInputUnlocked:H,prompt:_,setPrompt:b,trimmedPrompt:le,canSubmitPrompt:re,chips:ee,onSubmit:i,onAddManually:s,onDragPointerDown:Oe,onDragPointerMove:ve,onDragPointerUp:oe})]})},pde=C.memo(fde),So=e=>{const{open:t,handleClose:n,title:r,content:i,showDivider:o=!1,subtitle:s,variant:a,label:l,icon:u,footer:c,sx:f={},customMethods:p={},disableBackdropClick:h=!1}=e,A=E.useTheme(),g=()=>{switch(a){case"small":return"50%";case"medium":return A.drawer.popup;case"large":return"600px";case"xlarge":return"850px";case"full":return"100%";default:return"80%"}};return d.jsxs(E.Dialog,{open:t,onClose:(m,O)=>{O==="backdropClick"&&h||n()},TransitionComponent:E.Fade,TransitionProps:{timeout:200,onExited:()=>{const m=document.querySelector('[data-testid$="-full-mode"]')?.closest(".MuiDialog-paper"),O=m?.closest(".MuiDialog-container");m&&O&&(m.style.width="",m.style.maxWidth="",O.style.justifyContent="")}},sx:{"& .MuiPaper-root":{width:g(),borderRadius:2,maxWidth:"1200px"},"&.MuiModal-root.MuiDialog-root .MuiDialogTitle-root+.MuiDialogContent-root":{px:2,pb:1.5,pt:0,display:"flex",alignItems:"center"},...f},...p,children:[r&&d.jsxs(E.DialogTitle,{sx:{p:2,pb:2,borderBottom:o?`1px solid ${A.palette.grey.light}`:"none",overflow:"hidden"},children:[d.jsxs(E.Stack,{sx:{...Ai,width:"100%"},flexDirection:"row",children:[d.jsxs(E.Stack,{sx:{...p0,gap:1.5,p:0,minWidth:0,flex:1},children:[u,d.jsx(E.Typography,{variant:"mdSemiBold",sx:{fontStyle:"normal",lineHeight:"24px",...cu,flex:1,minWidth:0},children:r})]}),d.jsxs(E.Stack,{sx:{...p0,gap:1.5,flexShrink:0},children:[l&&d.jsx(E.Chip,{sx:{backgroundColor:m=>b0(m.palette.error.main,80),color:m=>m.palette.error.main,borderRadius:"1.5rem",padding:"0.0625rem 0.375rem",height:"fit-content",fontSize:"12px",fontWeight:"500"},label:l}),d.jsx(E.IconButton,{onClick:n,sx:{p:0,...Di(A)},"data-testid":"button-close-dialog",children:d.jsx(Ue,{sx:{"& svg":{width:A.icons.xxl,height:A.icons.xxl}},src:"ic_close"})})]})]}),d.jsx(E.Typography,{variant:"smNormal",sx:{fontStyle:"normal",lineHeight:"24px",...cu},children:s})]}),i&&d.jsx(E.DialogContent,{sx:{width:"100%"},dividers:o,children:i}),c&&d.jsx(E.DialogActions,{sx:{p:2},children:c})]})},hde=({title:e,description:t,open:n,onDelete:r,onClose:i})=>{const o=()=>Array.isArray(t)?d.jsx(E.List,{sx:{"&.MuiList-root":{pt:0,pb:0},maxHeight:164,overflow:"auto",width:"100%",listStyleType:"none",px:2},children:t.map((s,a)=>d.jsxs(E.ListItem,{sx:{"&.MuiListItem-root":{px:0,py:.75}},children:[d.jsx(E.ListItemAvatar,{sx:{minWidth:0},children:d.jsx(E.Avatar,{variant:"rounded",src:nh(s.icon,"t.resize(h:15,w:15)"),alt:e,sx:{width:24,height:24,display:"flex"},children:e.slice(0,2).toUpperCase()})}),d.jsx(E.ListItemText,{sx:{pl:1,"& .MuiListItemText-primary":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1,minWidth:0}},primary:s.name,secondary:null})]},`delete-item-${s.name}-${a}`))}):t;return d.jsx(So,{variant:"medium",open:n,handleClose:i,title:e,content:o(),footer:d.jsx(E.Stack,{flexDirection:"row",width:"100%",justifyContent:"flex-end",alignItems:"center",children:d.jsxs(E.Box,{children:[d.jsx(E.Button,{onClick:i,variant:"outlined",color:"neutral","data-testid":"button-cancel-delete",children:"Cancel"}),d.jsx(E.Button,{color:"error",sx:{ml:1},onClick:r,variant:"contained","data-testid":"button-confirm-delete",children:"Delete"})]})})})};var l1={exports:{}},Ade=l1.exports,nM;function mde(){return nM||(nM=1,(function(e,t){(function(n,r){e.exports=r()})(Ade,(function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,s){var a,l=function(p,h,A){A===void 0&&(A={});var g=new Date(p),m=(function(O,y){y===void 0&&(y={});var v=y.timeZoneName||"short",T=O+"|"+v,_=r[T];return _||(_=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:O,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:v}),r[T]=_),_})(h,A);return m.formatToParts(g)},u=function(p,h){for(var A=l(p,h),g=[],m=0;m<A.length;m+=1){var O=A[m],y=O.type,v=O.value,T=n[y];T>=0&&(g[T]=parseInt(v,10))}var _=g[3],x=_===24?0:_,b=g[0]+"-"+g[1]+"-"+g[2]+" "+x+":"+g[4]+":"+g[5]+":000",w=+p;return(s.utc(b).valueOf()-(w-=w%1e3))/6e4},c=o.prototype;c.tz=function(p,h){p===void 0&&(p=a);var A,g=this.utcOffset(),m=this.toDate(),O=m.toLocaleString("en-US",{timeZone:p}),y=Math.round((m-new Date(O))/1e3/60),v=15*-Math.round(m.getTimezoneOffset()/15)-y;if(!Number(v))A=this.utcOffset(0,h);else if(A=s(O,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(v,!0),h){var T=A.utcOffset();A=A.add(g-T,"minute")}return A.$x.$timezone=p,A},c.offsetName=function(p){var h=this.$x.$timezone||s.tz.guess(),A=l(this.valueOf(),h,{timeZoneName:p}).find((function(g){return g.type.toLowerCase()==="timezonename"}));return A&&A.value};var f=c.startOf;c.startOf=function(p,h){if(!this.$x||!this.$x.$timezone)return f.call(this,p,h);var A=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(A,p,h).tz(this.$x.$timezone,!0)},s.tz=function(p,h,A){var g=A&&h,m=A||h||a,O=u(+s(),m);if(typeof p!="string")return s(p).tz(m);var y=(function(x,b,w){var D=x-60*b*1e3,I=u(D,w);if(b===I)return[D,b];var P=u(D-=60*(I-b)*1e3,w);return I===P?[D,I]:[x-60*Math.min(I,P)*1e3,Math.max(I,P)]})(s.utc(p,g).valueOf(),O,m),v=y[0],T=y[1],_=s(v).utcOffset(T);return _.$x.$timezone=m,_},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(p){a=p}}}))})(l1)),l1.exports}var gde=mde();const Ede=Gr(gde);var u1={exports:{}},Ode=u1.exports,rM;function yde(){return rM||(rM=1,(function(e,t){(function(n,r){e.exports=r()})(Ode,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var l=s.prototype;a.utc=function(g){var m={date:g,utc:!0,args:arguments};return new s(m)},l.utc=function(g){var m=a(this.toDate(),{locale:this.$L,utc:!0});return g?m.add(this.utcOffset(),n):m},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var c=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else c.call(this)};var f=l.utcOffset;l.utcOffset=function(g,m){var O=this.$utils().u;if(O(g))return this.$u?0:O(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=(function(_){_===void 0&&(_="");var x=_.match(r);if(!x)return null;var b=(""+x[0]).match(i)||["-",0,0],w=b[0],D=60*+b[1]+ +b[2];return D===0?0:w==="+"?D:-D})(g),g===null))return this;var y=Math.abs(g)<=16?60*g:g;if(y===0)return this.utc(m);var v=this.clone();if(m)return v.$offset=y,v.$u=!1,v;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(v=this.local().add(y+T,n)).$offset=y,v.$x.$localOffset=T,v};var p=l.format;l.format=function(g){var m=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,m)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var A=l.diff;l.diff=function(g,m,O){if(g&&this.$u===g.$u)return A.call(this,g,m,O);var y=this.local(),v=a(g).local();return A.call(y,v,m,O)}}}))})(u1)),u1.exports}var vde=yde();const Tde=Gr(vde),Sde=({nextTimeStamps:e})=>{const t=E.useTheme();Sn.extend(Tde),Sn.extend(Ede);const[n,r]=C.useState(Sn.tz.guess());return e&&e.length>0&&d.jsx(E.Card,{sx:{position:"absolute",margin:"0.5rem",gap:"0.5rem",right:"0.5rem",borderRadius:"0.5rem",border:`1px solid ${t.palette.primary.main}`,zIndex:6},children:d.jsxs(E.Accordion,{sx:{width:250},children:[d.jsxs(E.AccordionSummary,{sx:{px:1,"& .MuiAccordionSummary-content":{"&, &.Mui-expanded":{my:1}}},expandIcon:d.jsx(Ue,{src:"ic_arrow_down"}),"aria-controls":"panel1-content",id:"panel1-header",children:[d.jsx(Ue,{src:"ic_access_alarm",width:20,height:20}),d.jsx(E.Typography,{variant:"smMedium",sx:{ml:1},children:"Upcoming Runs"})]}),d.jsx(E.Divider,{}),d.jsxs(E.AccordionDetails,{sx:{pb:.5},children:[d.jsx(E.FormControlLabel,{label:d.jsxs(E.Stack,{direction:"column",lineHeight:"16px",children:[d.jsxs(E.Typography,{variant:"xsBold",children:["Timezone (",n==="Etc/GMT"?"UTC":n,")"]}),d.jsxs(E.Typography,{variant:"xxsNormal",children:["Click the toggle for ",n!=="Etc/GMT"?"UTC":Sn.tz.guess()," ","timezone."]})]}),labelPlacement:"start",control:d.jsx(E.Switch,{checked:n==="Etc/GMT",onChange:()=>{r(n==="Etc/GMT"?Sn.tz.guess():"Etc/GMT")}}),sx:{"&.MuiFormControlLabel-root":{...Ai,gap:1.5},"& .MuiButtonBase-root.MuiCheckbox-root":{p:0},px:1,py:1,lineHeight:1},componentsProps:{typography:{variant:"smNormal"}}}),d.jsx(E.Divider,{}),e.map(i=>d.jsx(E.Grid,{sx:{py:.2,px:1.5},display:"flex",alignItems:"center",children:d.jsx(E.Typography,{variant:"xsNormal",style:{lineHeight:1.8},children:Sn(i).tz(n).format("MMMM DD, YYYY [at] h:mm:ss A")})},i))]})]})})};function wft(){}function Ift(){}function xde(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bde=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cde=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_de={};function iM(e,t){return(_de.jsx?Cde:bde).test(e)}const wde=/[ \t\n\f\r]/g;function Ide(e){return typeof e=="object"?e.type==="text"?oM(e.value):!1:oM(e)}function oM(e){return e.replace(wde,"")===""}let w0=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};w0.prototype.normal={},w0.prototype.property={},w0.prototype.space=void 0;function sM(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new w0(n,r,t)}function WC(e){return e.toLowerCase()}class ea{constructor(t,n){this.attribute=n,this.property=t}}ea.prototype.attribute="",ea.prototype.booleanish=!1,ea.prototype.boolean=!1,ea.prototype.commaOrSpaceSeparated=!1,ea.prototype.commaSeparated=!1,ea.prototype.defined=!1,ea.prototype.mustUseProperty=!1,ea.prototype.number=!1,ea.prototype.overloadedBoolean=!1,ea.prototype.property="",ea.prototype.spaceSeparated=!1,ea.prototype.space=void 0;let Dde=0;const yr=wf(),xo=wf(),QC=wf(),rn=wf(),Ri=wf(),ih=wf(),Na=wf();function wf(){return 2**++Dde}const zC=Object.freeze(Object.defineProperty({__proto__:null,boolean:yr,booleanish:xo,commaOrSpaceSeparated:Na,commaSeparated:ih,number:rn,overloadedBoolean:QC,spaceSeparated:Ri},Symbol.toStringTag,{value:"Module"})),XC=Object.keys(zC);class YC extends ea{constructor(t,n,r,i){let o=-1;if(super(t,n),aM(this,"space",i),typeof r=="number")for(;++o<XC.length;){const s=XC[o];aM(this,XC[o],(r&zC[s])===zC[s])}}}YC.prototype.defined=!0;function aM(e,t,n){n&&(e[t]=n)}function oh(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new YC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[WC(r)]=r,n[WC(o.attribute)]=r}return new w0(t,n,e.space)}const lM=oh({properties:{ariaActiveDescendant:null,ariaAtomic:xo,ariaAutoComplete:null,ariaBusy:xo,ariaChecked:xo,ariaColCount:rn,ariaColIndex:rn,ariaColSpan:rn,ariaControls:Ri,ariaCurrent:null,ariaDescribedBy:Ri,ariaDetails:null,ariaDisabled:xo,ariaDropEffect:Ri,ariaErrorMessage:null,ariaExpanded:xo,ariaFlowTo:Ri,ariaGrabbed:xo,ariaHasPopup:null,ariaHidden:xo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ri,ariaLevel:rn,ariaLive:null,ariaModal:xo,ariaMultiLine:xo,ariaMultiSelectable:xo,ariaOrientation:null,ariaOwns:Ri,ariaPlaceholder:null,ariaPosInSet:rn,ariaPressed:xo,ariaReadOnly:xo,ariaRelevant:null,ariaRequired:xo,ariaRoleDescription:Ri,ariaRowCount:rn,ariaRowIndex:rn,ariaRowSpan:rn,ariaSelected:xo,ariaSetSize:rn,ariaSort:null,ariaValueMax:rn,ariaValueMin:rn,ariaValueNow:rn,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uM(e,t){return t in e?e[t]:t}function cM(e,t){return uM(e,t.toLowerCase())}const Rde=oh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ih,acceptCharset:Ri,accessKey:Ri,action:null,allow:null,allowFullScreen:yr,allowPaymentRequest:yr,allowUserMedia:yr,alt:null,as:null,async:yr,autoCapitalize:null,autoComplete:Ri,autoFocus:yr,autoPlay:yr,blocking:Ri,capture:null,charSet:null,checked:yr,cite:null,className:Ri,cols:rn,colSpan:null,content:null,contentEditable:xo,controls:yr,controlsList:Ri,coords:rn|ih,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yr,defer:yr,dir:null,dirName:null,disabled:yr,download:QC,draggable:xo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yr,formTarget:null,headers:Ri,height:rn,hidden:QC,high:rn,href:null,hrefLang:null,htmlFor:Ri,httpEquiv:Ri,id:null,imageSizes:null,imageSrcSet:null,inert:yr,inputMode:null,integrity:null,is:null,isMap:yr,itemId:null,itemProp:Ri,itemRef:Ri,itemScope:yr,itemType:Ri,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yr,low:rn,manifest:null,max:null,maxLength:rn,media:null,method:null,min:null,minLength:rn,multiple:yr,muted:yr,name:null,nonce:null,noModule:yr,noValidate:yr,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:yr,optimum:rn,pattern:null,ping:Ri,placeholder:null,playsInline:yr,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:yr,referrerPolicy:null,rel:Ri,required:yr,reversed:yr,rows:rn,rowSpan:rn,sandbox:Ri,scope:null,scoped:yr,seamless:yr,selected:yr,shadowRootClonable:yr,shadowRootDelegatesFocus:yr,shadowRootMode:null,shape:null,size:rn,sizes:null,slot:null,span:rn,spellCheck:xo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:rn,step:null,style:null,tabIndex:rn,target:null,title:null,translate:null,type:null,typeMustMatch:yr,useMap:null,value:xo,width:rn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ri,axis:null,background:null,bgColor:null,border:rn,borderColor:null,bottomMargin:rn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yr,declare:yr,event:null,face:null,frame:null,frameBorder:null,hSpace:rn,leftMargin:rn,link:null,longDesc:null,lowSrc:null,marginHeight:rn,marginWidth:rn,noResize:yr,noHref:yr,noShade:yr,noWrap:yr,object:null,profile:null,prompt:null,rev:null,rightMargin:rn,rules:null,scheme:null,scrolling:xo,standby:null,summary:null,text:null,topMargin:rn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:rn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yr,disableRemotePlayback:yr,prefix:null,property:null,results:rn,security:null,unselectable:null},space:"html",transform:cM}),Pde=oh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Na,accentHeight:rn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:rn,amplitude:rn,arabicForm:null,ascent:rn,attributeName:null,attributeType:null,azimuth:rn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:rn,by:null,calcMode:null,capHeight:rn,className:Ri,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:rn,diffuseConstant:rn,direction:null,display:null,dur:null,divisor:rn,dominantBaseline:null,download:yr,dx:null,dy:null,edgeMode:null,editable:null,elevation:rn,enableBackground:null,end:null,event:null,exponent:rn,externalResourcesRequired:null,fill:null,fillOpacity:rn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ih,g2:ih,glyphName:ih,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:rn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:rn,horizOriginX:rn,horizOriginY:rn,id:null,ideographic:rn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:rn,k:rn,k1:rn,k2:rn,k3:rn,k4:rn,kernelMatrix:Na,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:rn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:rn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:rn,overlineThickness:rn,paintOrder:null,panose1:null,path:null,pathLength:rn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ri,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:rn,pointsAtY:rn,pointsAtZ:rn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Na,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Na,rev:Na,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Na,requiredFeatures:Na,requiredFonts:Na,requiredFormats:Na,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:rn,specularExponent:rn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:rn,strikethroughThickness:rn,string:null,stroke:null,strokeDashArray:Na,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:rn,strokeOpacity:rn,strokeWidth:null,style:null,surfaceScale:rn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Na,tabIndex:rn,tableValues:null,target:null,targetX:rn,targetY:rn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Na,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:rn,underlineThickness:rn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:rn,values:null,vAlphabetic:rn,vMathematical:rn,vectorEffect:null,vHanging:rn,vIdeographic:rn,version:null,vertAdvY:rn,vertOriginX:rn,vertOriginY:rn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:rn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uM}),dM=oh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fM=oh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cM}),pM=oh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Nde={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Lde=/[A-Z]/g,hM=/-[a-z]/g,kde=/^data[-\w.:]+$/i;function Mde(e,t){const n=WC(t);let r=t,i=ea;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kde.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(hM,Bde);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!hM.test(o)){let s=o.replace(Lde,Fde);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=YC}return new i(r,t)}function Fde(e){return"-"+e.toLowerCase()}function Bde(e){return e.charAt(1).toUpperCase()}const jde=sM([lM,Rde,dM,fM,pM],"html"),qC=sM([lM,Pde,dM,fM,pM],"svg");function $de(e){return e.join(" ").trim()}var sh={},KC,AM;function Ude(){if(AM)return KC;AM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
|
|
141
|
+
`).map(a=>a.trim()).filter(Boolean))}})}function Kk({field:e,value:t,theme:n,onChange:r}){return d.jsx(E.TextField,{className:"nodrag",size:"small",fullWidth:!0,value:String(t??""),placeholder:_f(e),onChange:i=>r(e.name,i.target.value),onMouseDown:xr,onClick:xr,onKeyDown:xr,onKeyUp:xr,inputProps:{onKeyDown:xr,onKeyUp:xr},sx:{...yd(n),"& .MuiOutlinedInput-root":{...yd(n)["& .MuiOutlinedInput-root"],height:40}}})}function lde({field:e,value:t,theme:n,onChange:r}){const i=t===!0||t==="true";return d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,children:[d.jsx(E.Switch,{className:"nodrag",size:"small",checked:i,onChange:o=>r(e.name,o.target.checked),onMouseDown:xr,onClick:xr,sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:n.palette.primary.main},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:n.palette.primary.main}}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:n.palette.text.secondary},children:i?"Yes":"No"})]})}function ude(e,t,n,r,i,o,s,a,l){const u=String(e.meta?.displayType??e.type??"text").toLowerCase(),c=Array.isArray(e.meta?.options)&&(e.meta?.options?.length??0)>0,f=e.meta?.config?.urlType==="choices";return u==="toggle"?d.jsx(lde,{field:e,value:t,theme:n,onChange:r}):u==="autocomplete"&&f?d.jsx(Jce,{field:e,value:t,theme:n,onChange:r,resolvedAuth:i||{},vortexMainUrl:o,workflowUrls:s,entityId:a,formValues:l}):u==="autocomplete"&&c?d.jsx(Yk,{field:e,value:t,theme:n,onChange:r}):u==="select"||u==="multiselect"?u==="multiselect"&&c?d.jsx(Yk,{field:e,value:t,theme:n,onChange:r}):c?d.jsx(rde,{field:e,value:t,theme:n,onChange:r}):d.jsx(Kk,{field:e,value:t,theme:n,onChange:r}):u==="textarea"?d.jsx(qk,{field:e,value:t,theme:n,onChange:r}):u==="code"?d.jsx(ide,{field:e,value:t,theme:n,onChange:r}):u==="number"?d.jsx(ode,{field:e,value:t,theme:n,onChange:r}):u==="datetime"?d.jsx(sde,{field:e,value:t,theme:n,onChange:r}):u==="multitext"?d.jsx(ade,{field:e,value:t,theme:n,onChange:r}):d.jsx(Kk,{field:e,value:t,theme:n,onChange:r})}const cde=({theme:e,parameters:t,renderSteps:n,onValuesChange:r,resolvedAuth:i={},vortexMainUrl:o,workflowUrls:s,entityId:a})=>{const[l,u]=C.useState(t.values??{}),[c,f]=C.useState(0),p=C.useRef(t.values??{}),h=t.fields.map(w=>w.name).join(","),A=JSON.stringify(t.values??{});C.useEffect(()=>{u(t.values??{}),p.current=t.values??{},f(0)},[h]),C.useEffect(()=>{p.current=t.values??{}},[A]);const g=t.fields[c],m=c===t.fields.length-1,O=l[g?.name??""],v=ede(O),T=(w,D)=>{u(I=>({...I,[w]:D}))},_=()=>{const w=g?.name??"";l[w]!==p.current[w]&&r(l),m?t.onContinue(l):f(I=>I+1)},x=()=>{c>0&&f(w=>w-1)};if(!g)return null;const b=String(g.meta?.description??"");return d.jsxs(d.Fragment,{children:[n,d.jsx(E.Divider,{sx:{mx:2}}),d.jsxs(E.Stack,{px:2,py:1.5,gap:1.5,sx:{overflowY:"auto",flex:1},children:[d.jsxs(E.Typography,{variant:"smMedium",sx:{color:e.palette.text.primary},children:["Configure ",t.integrationName]}),d.jsxs(E.Typography,{variant:"xsNormal",sx:{color:e.palette.text.tertiary},children:["Step ",c+1," of ",t.fields.length]}),d.jsxs(E.Stack,{gap:1,children:[d.jsxs(E.Typography,{variant:"xsMedium",sx:{color:e.palette.text.secondary},children:[VC(g),(g.required??g.meta?.validation?.required)&&d.jsx(E.Typography,{component:"span",variant:"xsMedium",sx:{color:e.palette.error.main,ml:.25},children:"*"})]}),ude(g,O,e,T,i,o,s,a,l),b?d.jsx(E.Typography,{variant:"xsNormal",sx:{color:e.palette.text.tertiary},children:b}):null]}),d.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",pt:.5,pb:.5,gap:1,children:[d.jsx(E.Button,{variant:"outlined",disabled:c===0,onClick:x,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2,color:e.palette.text.secondary,borderColor:e.palette.grey[300]},children:"Back"}),d.jsx(E.Button,{variant:"contained",disabled:v,onClick:_,startIcon:d.jsx(Ue,{src:"ic_spark",width:16,height:16}),sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600,px:2},children:m?"Done":"Next"})]})]})]})},Zk=["Send email via Gmail","Post to Slack channel","Make API call"],Jk={trigger:{title:"Tell Boltic AI what starts this workflow",inputPlaceholder:"e.g., When a new email is received in Gmail"},activity:{title:"Tell Boltic AI the next step",inputPlaceholder:"e.g., Send an email to the customer, Add Slack etc"}},eM=280,tM=4,rh=220,dde=({theme:e,isInline:t,draggable:n,dragging:r,promptCopy:i,promptInputId:o,promptInputName:s,promptInputRef:a,promptInputUnlocked:l,setPromptInputUnlocked:u,prompt:c,setPrompt:f,trimmedPrompt:p,canSubmitPrompt:h,chips:A,onSubmit:g,onAddManually:m,onDragPointerDown:O,onDragPointerMove:y,onDragPointerUp:v})=>d.jsxs(E.Stack,{px:2,py:2,gap:2,children:[d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,className:t?"boltic-ai-rf-drag":void 0,sx:{cursor:t||n?r?"grabbing":"grab":"default",touchAction:t||n?"none":"auto"},...n&&!t?{onPointerDown:O,onPointerMove:y,onPointerUp:v,onPointerCancel:v}:{},children:[d.jsx(Ue,{src:"ic_AI",width:24,height:24,sx:{"& path":{fill:e.palette.primary.main}}}),d.jsx(E.Typography,{variant:"lgMedium",sx:{color:e.palette.text.primary},children:i.title})]}),d.jsx(E.TextField,{fullWidth:!0,multiline:!0,minRows:1,maxRows:3,id:o,name:s,inputRef:a,autoFocus:!0,value:c,onFocus:()=>u(!0),onChange:T=>{T.stopPropagation(),f(T.target.value)},onMouseDown:T=>T.stopPropagation(),onClick:T=>{T.stopPropagation(),u(!0)},placeholder:i.inputPlaceholder,size:"small",autoComplete:"new-password",inputProps:{autoComplete:"new-password",readOnly:!l,autoCorrect:"off",autoCapitalize:"off",spellCheck:"false","aria-autocomplete":"none","data-form-type":"other","data-lpignore":"true"},onKeyDown:T=>{T.stopPropagation(),!T.nativeEvent.isComposing&&T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),g&&h&&g(p))},onKeyUp:T=>T.stopPropagation(),InputProps:{endAdornment:d.jsx(E.InputAdornment,{position:"end",children:d.jsx(E.IconButton,{"aria-label":"Submit prompt",onClick:()=>{h&&g?.(p)},disabled:!h,sx:{width:24,height:24,borderRadius:"6px",bgcolor:e.palette.primary.main,"&:hover":{bgcolor:e.palette.primary[60]??e.palette.primary.main},"&.Mui-disabled":{bgcolor:e.palette.primary.disabled}},children:d.jsx(Ue,{src:"ic_arrow_right",width:16,height:16,sx:{"& path":{fill:e.palette.common.white}}})})})},sx:{"& .MuiOutlinedInput-root":{backgroundColor:e.palette.common.white,borderRadius:"6px",paddingLeft:0,paddingRight:"8px",minHeight:46,"& fieldset":{borderColor:e.palette.golden.main},"&:hover fieldset":{borderColor:e.palette.golden?.hover??e.palette.primary[30]},"&.Mui-focused fieldset":{borderColor:e.palette.golden.main}},"& .MuiOutlinedInput-input":{paddingTop:14,paddingBottom:14,lineHeight:"20px"},"& input::placeholder":{opacity:.64}}}),d.jsx(E.Stack,{direction:"row",gap:1,flexWrap:"wrap",children:A.map(T=>d.jsx(E.Chip,{label:T,variant:"outlined",onClick:()=>{f(T)},sx:{height:26,borderRadius:"6px",bgcolor:e.palette.grey[50],borderColor:e.palette.grey.outlined.border,"& .MuiChip-label":{px:1,fontSize:12,fontWeight:600,color:e.palette.text.secondary},"&:hover":{bgcolor:e.palette.primary[5],borderColor:e.palette.primary[30]}}},T))}),d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1.5,children:[d.jsx(E.Divider,{sx:{flex:1}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:e.palette.text.primary},children:"Or"}),d.jsx(E.Divider,{sx:{flex:1}})]}),d.jsx(E.Button,{fullWidth:!0,variant:"outlined",onClick:m,sx:{width:"100%",height:32,borderRadius:"6px",borderColor:e.palette.grey.outlined.border,color:e.palette.text.secondary,fontWeight:600,textTransform:"none",justifyContent:"center","&:hover":{borderColor:e.palette.primary.main,bgcolor:e.palette.common.white}},children:"Add Manually"})]}),GC=".boltic-ai-rf-drag",fde=({open:e,mode:t="prompt",suggestions:n,onClose:r,onSubmit:i,onRetry:o,onAddManually:s,steps:a=[],choice:l,auth:u,parameters:c,errorText:f,anchor:p,draggable:h=!1,variant:A="popup",promptKind:g="activity",promptValue:m,onPromptChange:O,vortexMainUrl:y,workflowUrls:v})=>{const T=E.useTheme(),[_,x]=C.useState(m??""),b=C.useCallback(ne=>{x(ne),O?.(ne)},[O]);C.useEffect(()=>{m!==void 0&&x(m)},[m]);const w=C.useRef(null),D=C.useRef(null),[I,P]=C.useState(null),k=C.useRef(null),[N,L]=C.useState(!1),M=A==="inline",B=t==="stream"||t==="needs_user_choice"||t==="needs_auth"||t==="needs_parameters",Q=Jk[g]??Jk.activity,U=C.useRef(0),q=C.useRef(null),F=C.useRef(null),[W,G]=C.useState([]),[R,j]=C.useState(!1),[$,Y]=C.useState(""),[z,H]=C.useState(!1),V=C.useMemo(()=>`boltic-ai-prompt-input-${Math.random().toString(36).slice(2,10)}`,[]),X=C.useMemo(()=>`boltic-ai-prompt-${Math.random().toString(36).slice(2,10)}`,[]),J=C.useMemo(()=>{const ne=u?.options||[],se=String($||"").trim().toLowerCase();return se?ne.filter(pe=>String(pe?.title||"").toLowerCase().includes(se)):ne},[u?.options,$]),ee=C.useMemo(()=>{const ne=(n??Zk).filter(Boolean);return ne.length?ne:Zk},[n]),le=_.trim(),re=le.length>3,ue=(ne,se)=>{const pe=D.current,he=pe?.offsetParent??null;if(!pe||!he)return{left:ne,top:se};const de=pe.getBoundingClientRect(),xe=de.width||550,me=de.height||(B?eM:280),Ee=xe/2,ke=me/2,Ge=Math.min(Math.max(ne,Ee),Math.max(Ee,he.clientWidth-Ee)),$e=Math.min(Math.max(se,ke),Math.max(ke,he.clientHeight-ke));return{left:Ge,top:$e}};C.useEffect(()=>{if(!e){k.current=null,L(!1),U.current=0,G([]),b(""),H(!1);return}M||I||!D.current||requestAnimationFrame(()=>{const ne=D.current,se=ne?.offsetParent??null;if(!(!ne||!se))if(p&&typeof p.x=="number"&&typeof p.y=="number"){const pe=se.getBoundingClientRect(),he=p.x-pe.left,de=p.y-pe.top;P(ue(he,de))}else P({left:Math.max(0,se.clientWidth/2),top:Math.max(0,se.clientHeight/2)})})},[p,M,e,I]);const Oe=ne=>{if(!h||!D.current)return;const se=D.current.offsetParent??null;if(!se)return;const pe=ne.pointerId;ne.currentTarget.setPointerCapture(pe);const he=I?.left??se.clientWidth/2,de=I?.top??se.clientHeight/2;k.current={pointerId:pe,startClientX:ne.clientX,startClientY:ne.clientY,startLeft:he,startTop:de},L(!0)},ve=ne=>{if(!h)return;const se=k.current;if(!se||se.pointerId!==ne.pointerId)return;const pe=ne.clientX-se.startClientX,he=ne.clientY-se.startClientY,de=ue(se.startLeft+pe,se.startTop+he);P(de)},oe=ne=>{if(!h)return;const se=k.current;!se||se.pointerId!==ne.pointerId||(k.current=null,L(!1))};if(C.useEffect(()=>{(!e||!B)&&(U.current=0,G([]))},[B,e]),C.useEffect(()=>{if(!e||t!=="prompt")return;const ne=window.setTimeout(()=>{w.current?.focus()},0);return()=>{window.clearTimeout(ne)}},[e,t]),C.useEffect(()=>{if(!e||!B)return;if(q.current&&(cancelAnimationFrame(q.current),q.current=null),F.current&&(window.clearTimeout(F.current),F.current=null),!a||a.length===0){U.current=0,G([]);return}const ne=U.current,se=a.length,pe=new Map(a.map(de=>[de.id,de]));if(se<ne){U.current=se;const de=a.slice(-tM).map(xe=>({...xe,anim:"enter"}));G(de),q.current=requestAnimationFrame(()=>{G(xe=>xe.map(me=>me.anim==="enter"?{...me,anim:"steady"}:me)),q.current=null});return}U.current=se;const he=a.slice(ne);G(de=>{let xe=de.map(ke=>({...ke,...pe.get(ke.id)??{},anim:ke.anim}));for(const ke of he)xe.push({...ke,anim:"enter"});const Ee=xe.filter(ke=>ke.anim!=="exit").length-tM;if(Ee>0){let ke=Ee;xe=xe.map(Ge=>ke<=0||Ge.anim==="exit"?Ge:(ke-=1,{...Ge,anim:"exit"}))}return xe}),q.current=requestAnimationFrame(()=>{G(de=>de.map(xe=>xe.anim==="enter"?{...xe,anim:"steady"}:xe)),q.current=null}),F.current=window.setTimeout(()=>{G(de=>de.filter(xe=>xe.anim!=="exit")),F.current=null},rh)},[B,e,a]),!e)return null;const ae=d.jsx(E.IconButton,{"aria-label":"Close",onClick:r,sx:{position:"absolute",top:8,right:8,zIndex:2,width:32,height:32,borderRadius:"6px",color:T.palette.neutral?.solid?.bg??T.palette.grey[700],"&:hover":{bgcolor:E.alpha(T.palette.grey[300],.6)}},children:d.jsx(Ue,{src:"ic_close",width:20,height:20})}),te=B&&(h||M)?d.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:1,className:M?"boltic-ai-rf-drag":void 0,sx:{px:2,pt:1.5,pb:1,pr:7,cursor:N?"grabbing":"grab",touchAction:"none"},...h&&!M?{onPointerDown:Oe,onPointerMove:ve,onPointerUp:oe,onPointerCancel:oe}:{},children:[d.jsx(Ue,{src:"ic_spark",width:18,height:18,sx:{"& path":{fill:T.palette.primary.main}}}),d.jsx(E.Typography,{variant:"smMedium",sx:{color:T.palette.text.primary},children:"Generating"})]}):null,Z=d.jsx(E.Box,{sx:{flex:1,px:2,py:2,overflow:"hidden"},children:d.jsx(E.Box,{sx:{display:"flex",flexDirection:"column"},children:W.length===0?d.jsxs(E.Stack,{alignItems:"center",justifyContent:"center",py:2,gap:1,children:[d.jsx(E.CircularProgress,{size:16,sx:{color:T.palette.primary.main}}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary},children:"Preparing steps..."})]}):W.map((ne,se)=>{const pe=se===W.length-1,he=ne.status==="done",de=ne.anim,xe=de==="exit"?{opacity:0,transform:"translateY(-16px) scale(0.985)",filter:"blur(1px)",maxHeight:0,marginBottom:0}:de==="enter"?{opacity:0,transform:"translateY(12px) scale(0.995)",filter:"blur(0.5px)",maxHeight:0,marginBottom:0}:{opacity:1,transform:"translateY(0px)",filter:"blur(0px)",maxHeight:80,marginBottom:pe?0:1.25};return d.jsx(E.Box,{sx:{overflow:"hidden",willChange:"transform, opacity, max-height, margin-bottom, filter",transition:`opacity ${rh}ms cubic-bezier(0.2, 0.7, 0.2, 1), transform ${rh}ms cubic-bezier(0.2, 0.7, 0.2, 1), max-height ${rh}ms ease, margin-bottom ${rh}ms ease, filter ${rh}ms ease`,...xe},children:d.jsxs(E.Stack,{direction:"row",gap:1.25,alignItems:"flex-start",children:[d.jsxs(E.Stack,{alignItems:"center",sx:{width:18},children:[he?d.jsx(Ue,{src:"ic_checked",width:16,height:16,sx:{color:T.palette.success.main}}):d.jsx(E.CircularProgress,{size:16,sx:{color:T.palette.primary.main}}),!pe&&d.jsx(E.Box,{sx:{width:2,flex:1,minHeight:18,bgcolor:E.alpha(T.palette.primary.main,.25),borderRadius:2}})]}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary,mt:"1px"},children:ne.label})]})},ne.id)})})});return d.jsxs(E.Box,{ref:D,role:"dialog","aria-modal":"false",onMouseDown:M?void 0:ne=>ne.stopPropagation(),onPointerDown:M?void 0:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onDoubleClick:ne=>ne.stopPropagation(),sx:{position:M?"relative":"absolute",top:M?"auto":I?`${I.top}px`:"50%",left:M?"auto":I?`${I.left}px`:"50%",transform:M?"none":"translate(-50%, -50%)",zIndex:M?0:ne=>ne.zIndex.modal+1,pointerEvents:"auto",userSelect:N?"none":"auto",width:550,maxWidth:"calc(100vw - 64px)",height:t==="needs_parameters"?"auto":B?eM:"auto",maxHeight:t==="needs_parameters"?520:void 0,borderRadius:"12px",border:`1px solid ${T.palette.primary[10]}`,boxShadow:T.shadows[48],backgroundImage:"linear-gradient(-11.6913deg, rgba(255,255,255,0.10) 50.775%, rgba(255,203,102,0.10) 75.467%, rgba(255,107,56,0.10) 89.624%, rgba(255,89,47,0.10) 103.12%, rgba(99,41,10,0.10) 113%), linear-gradient(90deg, #ffffff 0%, #ffffff 100%)",display:"flex",flexDirection:"column"},children:[ae,te,M&&t==="loading"?d.jsx(E.Box,{className:"boltic-ai-rf-drag","aria-hidden":!0,sx:{cursor:"grab",touchAction:"none",minHeight:36,flexShrink:0}}):null,t==="loading"?d.jsx(E.Stack,{alignItems:"center",justifyContent:"center",px:2,py:5,gap:1.5,minHeight:270,children:d.jsxs(E.Box,{sx:{position:"relative",width:100,height:105},children:[d.jsx(E.Box,{sx:{position:"absolute",top:0,left:4.5,width:91,height:91,bgcolor:E.alpha(T.palette.common.white,.2),borderRadius:"10px"}}),d.jsx(E.Box,{sx:{position:"absolute",top:13,left:22},children:d.jsx(Ue,{src:"ic_spark",width:56,height:56,sx:{"& path":{fill:T.palette.primary.main}}})}),d.jsx(E.Typography,{variant:"mdNormal",sx:{position:"absolute",top:92,left:"50%",transform:"translateX(-50%)",color:T.palette.text.tertiary,whiteSpace:"nowrap"},children:"Generating config.."})]})}):t==="stream"?d.jsx(d.Fragment,{children:Z}):t==="needs_user_choice"&&l?d.jsx(Qce,{theme:T,choice:l,renderSteps:Z}):t==="needs_auth"&&u?d.jsx(Wce,{theme:T,auth:u,renderSteps:Z,authSelectOpen:R,setAuthSelectOpen:j,authSearchValue:$,setAuthSearchValue:Y,filteredAuthOptions:J}):t==="needs_parameters"&&c?d.jsx(cde,{theme:T,parameters:c,renderSteps:Z,onValuesChange:c.onValuesChange,resolvedAuth:c.resolvedAuth,vortexMainUrl:y,workflowUrls:v,entityId:c.entityId}):t==="error"?d.jsxs(E.Stack,{px:2,py:2,gap:1.5,children:[d.jsx(E.Typography,{variant:"mdSemiBold",sx:{color:T.palette.text.primary},children:"Something went wrong"}),d.jsx(E.Typography,{variant:"smNormal",sx:{color:T.palette.text.secondary},children:f||"Please try again."}),Array.isArray(n)&&n.length>0&&d.jsxs(E.Stack,{gap:1,children:[d.jsx(E.Typography,{variant:"xsNormal",sx:{color:T.palette.text.tertiary},children:"Try one of these prompts:"}),d.jsx(E.Stack,{direction:"row",gap:1,flexWrap:"wrap",children:n.slice(0,5).map(ne=>d.jsx(E.Chip,{label:ne,variant:"outlined",onClick:()=>i?.(String(ne).trim()),sx:{height:26,borderRadius:"6px",bgcolor:T.palette.grey[50],borderColor:T.palette.grey.outlined.border,"& .MuiChip-label":{px:1,fontSize:12,fontWeight:600,color:T.palette.text.secondary},"&:hover":{bgcolor:T.palette.primary[5],borderColor:T.palette.primary[30]}}},ne))})]}),d.jsxs(E.Stack,{direction:"row",justifyContent:"flex-start",gap:1,children:[d.jsx(E.Button,{variant:"contained",onClick:o,disabled:!o,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600},children:"Retry"}),d.jsx(E.Button,{variant:"outlined",onClick:r,sx:{height:32,borderRadius:"6px",textTransform:"none",fontWeight:600},children:"Close"})]})]}):d.jsx(dde,{theme:T,isInline:M,draggable:h,dragging:N,promptCopy:Q,promptInputId:V,promptInputName:X,promptInputRef:w,promptInputUnlocked:z,setPromptInputUnlocked:H,prompt:_,setPrompt:b,trimmedPrompt:le,canSubmitPrompt:re,chips:ee,onSubmit:i,onAddManually:s,onDragPointerDown:Oe,onDragPointerMove:ve,onDragPointerUp:oe})]})},pde=C.memo(fde),So=e=>{const{open:t,handleClose:n,title:r,content:i,showDivider:o=!1,subtitle:s,variant:a,label:l,icon:u,footer:c,sx:f={},customMethods:p={},disableBackdropClick:h=!1}=e,A=E.useTheme(),g=()=>{switch(a){case"small":return"50%";case"medium":return A.drawer.popup;case"large":return"600px";case"xlarge":return"850px";case"full":return"100%";default:return"80%"}};return d.jsxs(E.Dialog,{open:t,onClose:(m,O)=>{O==="backdropClick"&&h||n()},TransitionComponent:E.Fade,TransitionProps:{timeout:200,onExited:()=>{const m=document.querySelector('[data-testid$="-full-mode"]')?.closest(".MuiDialog-paper"),O=m?.closest(".MuiDialog-container");m&&O&&(m.style.width="",m.style.maxWidth="",O.style.justifyContent="")}},sx:{"& .MuiPaper-root":{width:g(),borderRadius:2,maxWidth:"1200px"},"&.MuiModal-root.MuiDialog-root .MuiDialogTitle-root+.MuiDialogContent-root":{px:2,pb:1.5,pt:0,display:"flex",alignItems:"center"},...f},...p,children:[r&&d.jsxs(E.DialogTitle,{sx:{p:2,pb:2,borderBottom:o?`1px solid ${A.palette.grey.light}`:"none",overflow:"hidden"},children:[d.jsxs(E.Stack,{sx:{...Ai,width:"100%"},flexDirection:"row",children:[d.jsxs(E.Stack,{sx:{...p0,gap:1.5,p:0,minWidth:0,flex:1},children:[u,d.jsx(E.Typography,{variant:"mdSemiBold",sx:{fontStyle:"normal",lineHeight:"24px",...cu,flex:1,minWidth:0},children:r})]}),d.jsxs(E.Stack,{sx:{...p0,gap:1.5,flexShrink:0},children:[l&&d.jsx(E.Chip,{sx:{backgroundColor:m=>b0(m.palette.error.main,80),color:m=>m.palette.error.main,borderRadius:"1.5rem",padding:"0.0625rem 0.375rem",height:"fit-content",fontSize:"12px",fontWeight:"500"},label:l}),d.jsx(E.IconButton,{onClick:n,sx:{p:0,...Di(A)},"data-testid":"button-close-dialog",children:d.jsx(Ue,{sx:{"& svg":{width:A.icons.xxl,height:A.icons.xxl}},src:"ic_close"})})]})]}),d.jsx(E.Typography,{variant:"smNormal",sx:{fontStyle:"normal",lineHeight:"24px",...cu},children:s})]}),i&&d.jsx(E.DialogContent,{sx:{width:"100%"},dividers:o,children:i}),c&&d.jsx(E.DialogActions,{sx:{p:2},children:c})]})},hde=({title:e,description:t,open:n,onDelete:r,onClose:i})=>{const o=()=>Array.isArray(t)?d.jsx(E.List,{sx:{"&.MuiList-root":{pt:0,pb:0},maxHeight:164,overflow:"auto",width:"100%",listStyleType:"none",px:2},children:t.map((s,a)=>d.jsxs(E.ListItem,{sx:{"&.MuiListItem-root":{px:0,py:.75}},children:[d.jsx(E.ListItemAvatar,{sx:{minWidth:0},children:d.jsx(E.Avatar,{variant:"rounded",src:nh(s.icon,"t.resize(h:15,w:15)"),alt:e,sx:{width:24,height:24,display:"flex"},children:e.slice(0,2).toUpperCase()})}),d.jsx(E.ListItemText,{sx:{pl:1,"& .MuiListItemText-primary":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1,minWidth:0}},primary:s.name,secondary:null})]},`delete-item-${s.name}-${a}`))}):t;return d.jsx(So,{variant:"medium",open:n,handleClose:i,title:e,content:o(),footer:d.jsx(E.Stack,{flexDirection:"row",width:"100%",justifyContent:"flex-end",alignItems:"center",children:d.jsxs(E.Box,{children:[d.jsx(E.Button,{onClick:i,variant:"outlined",color:"neutral","data-testid":"button-cancel-delete",children:"Cancel"}),d.jsx(E.Button,{color:"error",sx:{ml:1},onClick:r,variant:"contained","data-testid":"button-confirm-delete",children:"Delete"})]})})})};var l1={exports:{}},Ade=l1.exports,nM;function mde(){return nM||(nM=1,(function(e,t){(function(n,r){e.exports=r()})(Ade,(function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,s){var a,l=function(p,h,A){A===void 0&&(A={});var g=new Date(p),m=(function(O,y){y===void 0&&(y={});var v=y.timeZoneName||"short",T=O+"|"+v,_=r[T];return _||(_=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:O,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:v}),r[T]=_),_})(h,A);return m.formatToParts(g)},u=function(p,h){for(var A=l(p,h),g=[],m=0;m<A.length;m+=1){var O=A[m],y=O.type,v=O.value,T=n[y];T>=0&&(g[T]=parseInt(v,10))}var _=g[3],x=_===24?0:_,b=g[0]+"-"+g[1]+"-"+g[2]+" "+x+":"+g[4]+":"+g[5]+":000",w=+p;return(s.utc(b).valueOf()-(w-=w%1e3))/6e4},c=o.prototype;c.tz=function(p,h){p===void 0&&(p=a);var A,g=this.utcOffset(),m=this.toDate(),O=m.toLocaleString("en-US",{timeZone:p}),y=Math.round((m-new Date(O))/1e3/60),v=15*-Math.round(m.getTimezoneOffset()/15)-y;if(!Number(v))A=this.utcOffset(0,h);else if(A=s(O,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(v,!0),h){var T=A.utcOffset();A=A.add(g-T,"minute")}return A.$x.$timezone=p,A},c.offsetName=function(p){var h=this.$x.$timezone||s.tz.guess(),A=l(this.valueOf(),h,{timeZoneName:p}).find((function(g){return g.type.toLowerCase()==="timezonename"}));return A&&A.value};var f=c.startOf;c.startOf=function(p,h){if(!this.$x||!this.$x.$timezone)return f.call(this,p,h);var A=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(A,p,h).tz(this.$x.$timezone,!0)},s.tz=function(p,h,A){var g=A&&h,m=A||h||a,O=u(+s(),m);if(typeof p!="string")return s(p).tz(m);var y=(function(x,b,w){var D=x-60*b*1e3,I=u(D,w);if(b===I)return[D,b];var P=u(D-=60*(I-b)*1e3,w);return I===P?[D,I]:[x-60*Math.min(I,P)*1e3,Math.max(I,P)]})(s.utc(p,g).valueOf(),O,m),v=y[0],T=y[1],_=s(v).utcOffset(T);return _.$x.$timezone=m,_},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(p){a=p}}}))})(l1)),l1.exports}var gde=mde();const Ede=Gr(gde);var u1={exports:{}},Ode=u1.exports,rM;function yde(){return rM||(rM=1,(function(e,t){(function(n,r){e.exports=r()})(Ode,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var l=s.prototype;a.utc=function(g){var m={date:g,utc:!0,args:arguments};return new s(m)},l.utc=function(g){var m=a(this.toDate(),{locale:this.$L,utc:!0});return g?m.add(this.utcOffset(),n):m},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var c=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else c.call(this)};var f=l.utcOffset;l.utcOffset=function(g,m){var O=this.$utils().u;if(O(g))return this.$u?0:O(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=(function(_){_===void 0&&(_="");var x=_.match(r);if(!x)return null;var b=(""+x[0]).match(i)||["-",0,0],w=b[0],D=60*+b[1]+ +b[2];return D===0?0:w==="+"?D:-D})(g),g===null))return this;var y=Math.abs(g)<=16?60*g:g;if(y===0)return this.utc(m);var v=this.clone();if(m)return v.$offset=y,v.$u=!1,v;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(v=this.local().add(y+T,n)).$offset=y,v.$x.$localOffset=T,v};var p=l.format;l.format=function(g){var m=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,m)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var A=l.diff;l.diff=function(g,m,O){if(g&&this.$u===g.$u)return A.call(this,g,m,O);var y=this.local(),v=a(g).local();return A.call(y,v,m,O)}}}))})(u1)),u1.exports}var vde=yde();const Tde=Gr(vde),Sde=({nextTimeStamps:e})=>{const t=E.useTheme();Sn.extend(Tde),Sn.extend(Ede);const[n,r]=C.useState(Sn.tz.guess());return e&&e.length>0&&d.jsx(E.Card,{sx:{position:"absolute",margin:"0.5rem",gap:"0.5rem",right:"0.5rem",borderRadius:"0.5rem",border:`1px solid ${t.palette.primary.main}`,zIndex:6},children:d.jsxs(E.Accordion,{sx:{width:250},children:[d.jsxs(E.AccordionSummary,{sx:{px:1,"& .MuiAccordionSummary-content":{"&, &.Mui-expanded":{my:1}}},expandIcon:d.jsx(Ue,{src:"ic_arrow_down"}),"aria-controls":"panel1-content",id:"panel1-header",children:[d.jsx(Ue,{src:"ic_access_alarm",width:20,height:20}),d.jsx(E.Typography,{variant:"smMedium",sx:{ml:1},children:"Upcoming Runs"})]}),d.jsx(E.Divider,{}),d.jsxs(E.AccordionDetails,{sx:{pb:.5},children:[d.jsx(E.FormControlLabel,{label:d.jsxs(E.Stack,{direction:"column",lineHeight:"16px",children:[d.jsxs(E.Typography,{variant:"xsBold",children:["Timezone (",n==="Etc/GMT"?"UTC":n,")"]}),d.jsxs(E.Typography,{variant:"xxsNormal",children:["Click the toggle for ",n!=="Etc/GMT"?"UTC":Sn.tz.guess()," ","timezone."]})]}),labelPlacement:"start",control:d.jsx(E.Switch,{checked:n==="Etc/GMT",onChange:()=>{r(n==="Etc/GMT"?Sn.tz.guess():"Etc/GMT")}}),sx:{"&.MuiFormControlLabel-root":{...Ai,gap:1.5},"& .MuiButtonBase-root.MuiCheckbox-root":{p:0},px:1,py:1,lineHeight:1},componentsProps:{typography:{variant:"smNormal"}}}),d.jsx(E.Divider,{}),e.map(i=>d.jsx(E.Grid,{sx:{py:.2,px:1.5},display:"flex",alignItems:"center",children:d.jsx(E.Typography,{variant:"xsNormal",style:{lineHeight:1.8},children:Sn(i).tz(n).format("MMMM DD, YYYY [at] h:mm:ss A")})},i))]})]})})};function wft(){}function Ift(){}function xde(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bde=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cde=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_de={};function iM(e,t){return(_de.jsx?Cde:bde).test(e)}const wde=/[ \t\n\f\r]/g;function Ide(e){return typeof e=="object"?e.type==="text"?oM(e.value):!1:oM(e)}function oM(e){return e.replace(wde,"")===""}let w0=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};w0.prototype.normal={},w0.prototype.property={},w0.prototype.space=void 0;function sM(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new w0(n,r,t)}function WC(e){return e.toLowerCase()}class ea{constructor(t,n){this.attribute=n,this.property=t}}ea.prototype.attribute="",ea.prototype.booleanish=!1,ea.prototype.boolean=!1,ea.prototype.commaOrSpaceSeparated=!1,ea.prototype.commaSeparated=!1,ea.prototype.defined=!1,ea.prototype.mustUseProperty=!1,ea.prototype.number=!1,ea.prototype.overloadedBoolean=!1,ea.prototype.property="",ea.prototype.spaceSeparated=!1,ea.prototype.space=void 0;let Dde=0;const yr=wf(),xo=wf(),QC=wf(),rn=wf(),Ri=wf(),ih=wf(),Na=wf();function wf(){return 2**++Dde}const zC=Object.freeze(Object.defineProperty({__proto__:null,boolean:yr,booleanish:xo,commaOrSpaceSeparated:Na,commaSeparated:ih,number:rn,overloadedBoolean:QC,spaceSeparated:Ri},Symbol.toStringTag,{value:"Module"})),XC=Object.keys(zC);class YC extends ea{constructor(t,n,r,i){let o=-1;if(super(t,n),aM(this,"space",i),typeof r=="number")for(;++o<XC.length;){const s=XC[o];aM(this,XC[o],(r&zC[s])===zC[s])}}}YC.prototype.defined=!0;function aM(e,t,n){n&&(e[t]=n)}function oh(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new YC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[WC(r)]=r,n[WC(o.attribute)]=r}return new w0(t,n,e.space)}const lM=oh({properties:{ariaActiveDescendant:null,ariaAtomic:xo,ariaAutoComplete:null,ariaBusy:xo,ariaChecked:xo,ariaColCount:rn,ariaColIndex:rn,ariaColSpan:rn,ariaControls:Ri,ariaCurrent:null,ariaDescribedBy:Ri,ariaDetails:null,ariaDisabled:xo,ariaDropEffect:Ri,ariaErrorMessage:null,ariaExpanded:xo,ariaFlowTo:Ri,ariaGrabbed:xo,ariaHasPopup:null,ariaHidden:xo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ri,ariaLevel:rn,ariaLive:null,ariaModal:xo,ariaMultiLine:xo,ariaMultiSelectable:xo,ariaOrientation:null,ariaOwns:Ri,ariaPlaceholder:null,ariaPosInSet:rn,ariaPressed:xo,ariaReadOnly:xo,ariaRelevant:null,ariaRequired:xo,ariaRoleDescription:Ri,ariaRowCount:rn,ariaRowIndex:rn,ariaRowSpan:rn,ariaSelected:xo,ariaSetSize:rn,ariaSort:null,ariaValueMax:rn,ariaValueMin:rn,ariaValueNow:rn,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uM(e,t){return t in e?e[t]:t}function cM(e,t){return uM(e,t.toLowerCase())}const Rde=oh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ih,acceptCharset:Ri,accessKey:Ri,action:null,allow:null,allowFullScreen:yr,allowPaymentRequest:yr,allowUserMedia:yr,alt:null,as:null,async:yr,autoCapitalize:null,autoComplete:Ri,autoFocus:yr,autoPlay:yr,blocking:Ri,capture:null,charSet:null,checked:yr,cite:null,className:Ri,cols:rn,colSpan:null,content:null,contentEditable:xo,controls:yr,controlsList:Ri,coords:rn|ih,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yr,defer:yr,dir:null,dirName:null,disabled:yr,download:QC,draggable:xo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yr,formTarget:null,headers:Ri,height:rn,hidden:QC,high:rn,href:null,hrefLang:null,htmlFor:Ri,httpEquiv:Ri,id:null,imageSizes:null,imageSrcSet:null,inert:yr,inputMode:null,integrity:null,is:null,isMap:yr,itemId:null,itemProp:Ri,itemRef:Ri,itemScope:yr,itemType:Ri,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yr,low:rn,manifest:null,max:null,maxLength:rn,media:null,method:null,min:null,minLength:rn,multiple:yr,muted:yr,name:null,nonce:null,noModule:yr,noValidate:yr,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:yr,optimum:rn,pattern:null,ping:Ri,placeholder:null,playsInline:yr,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:yr,referrerPolicy:null,rel:Ri,required:yr,reversed:yr,rows:rn,rowSpan:rn,sandbox:Ri,scope:null,scoped:yr,seamless:yr,selected:yr,shadowRootClonable:yr,shadowRootDelegatesFocus:yr,shadowRootMode:null,shape:null,size:rn,sizes:null,slot:null,span:rn,spellCheck:xo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:rn,step:null,style:null,tabIndex:rn,target:null,title:null,translate:null,type:null,typeMustMatch:yr,useMap:null,value:xo,width:rn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ri,axis:null,background:null,bgColor:null,border:rn,borderColor:null,bottomMargin:rn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yr,declare:yr,event:null,face:null,frame:null,frameBorder:null,hSpace:rn,leftMargin:rn,link:null,longDesc:null,lowSrc:null,marginHeight:rn,marginWidth:rn,noResize:yr,noHref:yr,noShade:yr,noWrap:yr,object:null,profile:null,prompt:null,rev:null,rightMargin:rn,rules:null,scheme:null,scrolling:xo,standby:null,summary:null,text:null,topMargin:rn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:rn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yr,disableRemotePlayback:yr,prefix:null,property:null,results:rn,security:null,unselectable:null},space:"html",transform:cM}),Pde=oh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Na,accentHeight:rn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:rn,amplitude:rn,arabicForm:null,ascent:rn,attributeName:null,attributeType:null,azimuth:rn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:rn,by:null,calcMode:null,capHeight:rn,className:Ri,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:rn,diffuseConstant:rn,direction:null,display:null,dur:null,divisor:rn,dominantBaseline:null,download:yr,dx:null,dy:null,edgeMode:null,editable:null,elevation:rn,enableBackground:null,end:null,event:null,exponent:rn,externalResourcesRequired:null,fill:null,fillOpacity:rn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ih,g2:ih,glyphName:ih,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:rn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:rn,horizOriginX:rn,horizOriginY:rn,id:null,ideographic:rn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:rn,k:rn,k1:rn,k2:rn,k3:rn,k4:rn,kernelMatrix:Na,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:rn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:rn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:rn,overlineThickness:rn,paintOrder:null,panose1:null,path:null,pathLength:rn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ri,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:rn,pointsAtY:rn,pointsAtZ:rn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Na,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Na,rev:Na,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Na,requiredFeatures:Na,requiredFonts:Na,requiredFormats:Na,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:rn,specularExponent:rn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:rn,strikethroughThickness:rn,string:null,stroke:null,strokeDashArray:Na,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:rn,strokeOpacity:rn,strokeWidth:null,style:null,surfaceScale:rn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Na,tabIndex:rn,tableValues:null,target:null,targetX:rn,targetY:rn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Na,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:rn,underlineThickness:rn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:rn,values:null,vAlphabetic:rn,vMathematical:rn,vectorEffect:null,vHanging:rn,vIdeographic:rn,version:null,vertAdvY:rn,vertOriginX:rn,vertOriginY:rn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:rn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uM}),dM=oh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fM=oh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cM}),pM=oh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Nde={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Lde=/[A-Z]/g,hM=/-[a-z]/g,kde=/^data[-\w.:]+$/i;function Mde(e,t){const n=WC(t);let r=t,i=ea;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kde.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(hM,Bde);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!hM.test(o)){let s=o.replace(Lde,Fde);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=YC}return new i(r,t)}function Fde(e){return"-"+e.toLowerCase()}function Bde(e){return e.charAt(1).toUpperCase()}const jde=sM([lM,Rde,dM,fM,pM],"html"),qC=sM([lM,Pde,dM,fM,pM],"svg");function $de(e){return e.join(" ").trim()}var sh={},KC,AM;function Ude(){if(AM)return KC;AM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
|
|
142
142
|
`,u="/",c="*",f="",p="comment",h="declaration";function A(m,O){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];O=O||{};var y=1,v=1;function T(L){var M=L.match(t);M&&(y+=M.length);var B=L.lastIndexOf(l);v=~B?L.length-B:v+L.length}function _(){var L={line:y,column:v};return function(M){return M.position=new x(L),D(),M}}function x(L){this.start=L,this.end={line:y,column:v},this.source=O.source}x.prototype.content=m;function b(L){var M=new Error(O.source+":"+y+":"+v+": "+L);if(M.reason=L,M.filename=O.source,M.line=y,M.column=v,M.source=m,!O.silent)throw M}function w(L){var M=L.exec(m);if(M){var B=M[0];return T(B),m=m.slice(B.length),M}}function D(){w(n)}function I(L){var M;for(L=L||[];M=P();)M!==!1&&L.push(M);return L}function P(){var L=_();if(!(u!=m.charAt(0)||c!=m.charAt(1))){for(var M=2;f!=m.charAt(M)&&(c!=m.charAt(M)||u!=m.charAt(M+1));)++M;if(M+=2,f===m.charAt(M-1))return b("End of comment missing");var B=m.slice(2,M-2);return v+=2,T(B),m=m.slice(M),v+=2,L({type:p,comment:B})}}function k(){var L=_(),M=w(r);if(M){if(P(),!w(i))return b("property missing ':'");var B=w(o),Q=L({type:h,property:g(M[0].replace(e,f)),value:B?g(B[0].replace(e,f)):f});return w(s),Q}}function N(){var L=[];I(L);for(var M;M=k();)M!==!1&&(L.push(M),I(L));return L}return D(),N()}function g(m){return m?m.replace(a,f):f}return KC=A,KC}var mM;function Hde(){if(mM)return sh;mM=1;var e=sh&&sh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sh,"__esModule",{value:!0}),sh.default=n;const t=e(Ude());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:c}=l;a?i(u,c,l):c&&(o=o||{},o[u]=c)}),o}return sh}var I0={},gM;function Vde(){if(gM)return I0;gM=1,Object.defineProperty(I0,"__esModule",{value:!0}),I0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},s=function(u,c){return c.toUpperCase()},a=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),o(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,s))};return I0.camelCase=l,I0}var D0,EM;function Gde(){if(EM)return D0;EM=1;var e=D0&&D0.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Hde()),n=Vde();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,D0=r,D0}var Wde=Gde();const Qde=Gr(Wde),OM=yM("end"),ZC=yM("start");function yM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function zde(e){const t=ZC(e),n=OM(e);if(t&&n)return{start:t,end:n}}function R0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vM(e.position):"start"in e||"end"in e?vM(e):"line"in e||"column"in e?JC(e):""}function JC(e){return TM(e&&e.line)+":"+TM(e&&e.column)}function vM(e){return JC(e&&e.start)+"-"+JC(e&&e.end)}function TM(e){return e&&typeof e=="number"?e:1}class Os extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=R0(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Os.prototype.file="",Os.prototype.name="",Os.prototype.reason="",Os.prototype.message="",Os.prototype.stack="",Os.prototype.column=void 0,Os.prototype.line=void 0,Os.prototype.ancestors=void 0,Os.prototype.cause=void 0,Os.prototype.fatal=void 0,Os.prototype.place=void 0,Os.prototype.ruleId=void 0,Os.prototype.source=void 0;const e_={}.hasOwnProperty,Xde=new Map,Yde=/[A-Z]/g,qde=new Set(["table","tbody","thead","tfoot","tr"]),Kde=new Set(["td","th"]),SM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zde(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sfe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ofe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qC:jde,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=xM(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function xM(e,t,n){if(t.type==="element")return Jde(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return efe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nfe(e,t,n);if(t.type==="mdxjsEsm")return tfe(e,t);if(t.type==="root")return rfe(e,t,n);if(t.type==="text")return ife(e,t)}function Jde(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qC,e.schema=i),e.ancestors.push(t);const o=CM(e,t.tagName,!1),s=afe(e,t);let a=n_(e,t);return qde.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Ide(l):!0})),bM(e,s,o,t),t_(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function efe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}P0(e,t.position)}function tfe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);P0(e,t.position)}function nfe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qC,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:CM(e,t.name,!0),s=lfe(e,t),a=n_(e,t);return bM(e,s,o,t),t_(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function rfe(e,t,n){const r={};return t_(r,n_(e,t)),e.create(t,e.Fragment,r,n)}function ife(e,t){return t.value}function bM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function t_(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ofe(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function sfe(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=ZC(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function afe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&e_.call(t.properties,i)){const o=ufe(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Kde.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function lfe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else P0(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else P0(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function n_(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Xde;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const a=xM(e,o,s);a!==void 0&&n.push(a)}return n}function ufe(e,t,n){const r=Mde(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xde(n):$de(n)),r.property==="style"){let i=typeof n=="object"?n:cfe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=dfe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Nde[r.property]||r.property:r.attribute,n]}}function cfe(e,t){try{return Qde(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Os("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=SM+"#cannot-parse-style-attribute",i}}function CM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=iM(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=iM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return e_.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);P0(e)}function P0(e,t){const n=new Os("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=SM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dfe(e){const t={};let n;for(n in e)e_.call(e,n)&&(t[ffe(n)]=e[n]);return t}function ffe(e){let t=e.replace(Yde,pfe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pfe(e){return"-"+e.toLowerCase()}const r_={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},hfe={};function Afe(e,t){const n=hfe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _M(e,r,i)}function _M(e,t,n){if(mfe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wM(e.children,t,n)}return Array.isArray(e)?wM(e,t,n):""}function wM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_M(e[i],t,n);return r.join("")}function mfe(e){return!!(e&&typeof e=="object")}const IM=document.createElement("i");function i_(e){const t="&"+e+";";IM.innerHTML=t;const n=IM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function hu(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function sl(e,t){return e.length>0?(hu(e,e.length,0,t),e):t}const DM={}.hasOwnProperty;function gfe(e){const t={};let n=-1;for(;++n<e.length;)Efe(t,e[n]);return t}function Efe(e,t){let n;for(n in t){const i=(DM.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){DM.call(i,s)||(i[s]=[]);const a=o[s];Ofe(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Ofe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);hu(e,0,0,r)}function RM(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ah(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Au=vd(/[A-Za-z]/),La=vd(/[\dA-Za-z]/),yfe=vd(/[#-'*+\--9=?A-Z^-~]/);function o_(e){return e!==null&&(e<32||e===127)}const s_=vd(/\d/),vfe=vd(/[\dA-Fa-f]/),Tfe=vd(/[!-/:-@[-`{-~]/);function or(e){return e!==null&&e<-2}function ta(e){return e!==null&&(e<0||e===32)}function Jr(e){return e===-2||e===-1||e===32}const Sfe=vd(new RegExp("\\p{P}|\\p{S}","u")),xfe=vd(/\s/);function vd(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lh(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&La(e.charCodeAt(n+1))&&La(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Pi(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Jr(l)?(e.enter(n),a(l)):t(l)}function a(l){return Jr(l)&&o++<i?(e.consume(l),a):(e.exit(n),t(l))}}const bfe={tokenize:Cfe};function Cfe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Pi(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return or(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const _fe={tokenize:wfe},PM={tokenize:Ife};function wfe(e){const t=this,n=[];let r=0,i,o,s;return a;function a(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const T=t.events.length;let _=T,x;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){x=t.events[_][1].end;break}O(r);let b=T;for(;b<t.events.length;)t.events[b][1].end={...x},b++;return hu(t.events,_+1,0,t.events.slice(T)),t.events.length=b,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return A(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PM,c,f)(v)}function c(v){return i&&y(),O(r),p(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,A(v)}function p(v){return t.containerState={},e.attempt(PM,h,A)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function A(v){if(v===null){i&&y(),O(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(v)}function g(v){if(v===null){m(e.exit("chunkFlow"),!0),O(0),e.consume(v);return}return or(v)?(e.consume(v),m(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),g)}function m(v,T){const _=t.sliceStream(v);if(T&&_.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(_),t.parser.lazy[v.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<s&&(!i.events[x][1].end||i.events[x][1].end.offset>s))return;const b=t.events.length;let w=b,D,I;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){if(D){I=t.events[w][1].end;break}D=!0}for(O(r),x=b;x<t.events.length;)t.events[x][1].end={...I},x++;hu(t.events,w+1,0,t.events.slice(b)),t.events.length=x}}function O(v){let T=n.length;for(;T-- >v;){const _=n[T];t.containerState=_[1],_[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ife(e,t,n){return Pi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function NM(e){if(e===null||ta(e)||xfe(e))return 1;if(Sfe(e))return 2}function a_(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const l_={name:"attention",resolveAll:Dfe,tokenize:Rfe};function Dfe(e,t){let n=-1,r,i,o,s,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};LM(f,-l),LM(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=sl(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=sl(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=sl(u,a_(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=sl(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=sl(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,hu(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Rfe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=NM(r);let o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;const u=e.exit("attentionSequence"),c=NM(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!p)),u._close=!!(o===42?p:p&&(c||!f)),t(l)}}function LM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Pfe={name:"autolink",tokenize:Nfe};function Nfe(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Au(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||La(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||La(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||o_(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):yfe(h)?(e.consume(h),u):n(h)}function c(h){return La(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||La(h))&&r++<63){const A=h===45?p:f;return e.consume(h),A}return n(h)}}const c1={partial:!0,tokenize:Lfe};function Lfe(e,t,n){return r;function r(o){return Jr(o)?Pi(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||or(o)?t(o):n(o)}}const kM={continuation:{tokenize:Mfe},exit:Ffe,name:"blockQuote",tokenize:kfe};function kfe(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Jr(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Mfe(e,t,n){const r=this;return i;function i(s){return Jr(s)?Pi(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(kM,t,n)(s)}}function Ffe(e){e.exit("blockQuote")}const MM={name:"characterEscape",tokenize:Bfe};function Bfe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Tfe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const FM={name:"characterReference",tokenize:jfe};function jfe(e,t,n){const r=this;let i=0,o,s;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=La,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=vfe,c):(e.enter("characterReferenceValue"),o=7,s=s_,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===La&&!i_(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),c):n(f)}}const BM={partial:!0,tokenize:Ufe},jM={concrete:!0,name:"codeFenced",tokenize:$fe};function $fe(e,t,n){const r=this,i={partial:!0,tokenize:_};let o=0,s=0,a;return l;function l(x){return u(x)}function u(x){const b=r.events[r.events.length-1];return o=b&&b[1].type==="linePrefix"?b[2].sliceSerialize(b[1],!0).length:0,a=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(x)}function c(x){return x===a?(s++,e.consume(x),c):s<3?n(x):(e.exit("codeFencedFenceSequence"),Jr(x)?Pi(e,f,"whitespace")(x):f(x))}function f(x){return x===null||or(x)?(e.exit("codeFencedFence"),r.interrupt?t(x):e.check(BM,g,T)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||or(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(x)):Jr(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pi(e,h,"whitespace")(x)):x===96&&x===a?n(x):(e.consume(x),p)}function h(x){return x===null||or(x)?f(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),A(x))}function A(x){return x===null||or(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(x)):x===96&&x===a?n(x):(e.consume(x),A)}function g(x){return e.attempt(i,T,m)(x)}function m(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),O}function O(x){return o>0&&Jr(x)?Pi(e,y,"linePrefix",o+1)(x):y(x)}function y(x){return x===null||or(x)?e.check(BM,g,T)(x):(e.enter("codeFlowValue"),v(x))}function v(x){return x===null||or(x)?(e.exit("codeFlowValue"),y(x)):(e.consume(x),v)}function T(x){return e.exit("codeFenced"),t(x)}function _(x,b,w){let D=0;return I;function I(M){return x.enter("lineEnding"),x.consume(M),x.exit("lineEnding"),P}function P(M){return x.enter("codeFencedFence"),Jr(M)?Pi(x,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):k(M)}function k(M){return M===a?(x.enter("codeFencedFenceSequence"),N(M)):w(M)}function N(M){return M===a?(D++,x.consume(M),N):D>=s?(x.exit("codeFencedFenceSequence"),Jr(M)?Pi(x,L,"whitespace")(M):L(M)):w(M)}function L(M){return M===null||or(M)?(x.exit("codeFencedFence"),b(M)):w(M)}}}function Ufe(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const u_={name:"codeIndented",tokenize:Vfe},Hfe={partial:!0,tokenize:Gfe};function Vfe(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Pi(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):or(u)?e.attempt(Hfe,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||or(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function Gfe(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):or(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Pi(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):or(s)?i(s):n(s)}}const Wfe={name:"codeText",previous:zfe,resolve:Qfe,tokenize:Xfe};function Qfe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function zfe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Xfe(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):or(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||or(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class Yfe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&N0(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),N0(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),N0(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);N0(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);N0(this.left,n.reverse())}}}function N0(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $M(e){const t={};let n=-1,r,i,o,s,a,l,u;const c=new Yfe(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,qfe(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return hu(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function qfe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],u={};let c,f,p=-1,h=n,A=0,g=0;const m=[g];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(g=p+1,m.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):m.pop(),p=m.length;p--;){const O=a.slice(m[p],m[p+1]),y=o.pop();l.push([y,y+O.length-1]),e.splice(y,2,O)}for(l.reverse(),p=-1;++p<l.length;)u[A+l[p][0]]=A+l[p][1],A+=l[p][1]-l[p][0]-1;return u}const Kfe={resolve:Jfe,tokenize:epe},Zfe={partial:!0,tokenize:tpe};function Jfe(e){return $M(e),e}function epe(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):or(a)?e.check(Zfe,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function tpe(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Pi(e,o,"linePrefix")}function o(s){if(s===null||or(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function UM(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(O){return O===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(O),e.exit(o),p):O===null||O===32||O===41||o_(O)?n(O):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(O))}function p(O){return O===62?(e.enter(o),e.consume(O),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(O))}function h(O){return O===62?(e.exit("chunkString"),e.exit(a),p(O)):O===null||O===60||or(O)?n(O):(e.consume(O),O===92?A:h)}function A(O){return O===60||O===62||O===92?(e.consume(O),h):h(O)}function g(O){return!c&&(O===null||O===41||ta(O))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(O)):c<u&&O===40?(e.consume(O),c++,g):O===41?(e.consume(O),c--,g):O===null||O===32||O===40||o_(O)?n(O):(e.consume(O),O===92?m:g)}function m(O){return O===40||O===41||O===92?(e.consume(O),g):g(O)}}function HM(e,t,n,r,i,o){const s=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):or(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||or(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!Jr(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function VM(e,t,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),l(s)):p===null?n(p):or(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Pi(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||or(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(e.consume(p),c):c(p)}}function L0(e,t){let n;return r;function r(i){return or(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Jr(i)?Pi(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const npe={name:"definition",tokenize:ipe},rpe={partial:!0,tokenize:ope};function ipe(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return HM.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ah(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return ta(h)?L0(e,u)(h):u(h)}function u(h){return UM(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(rpe,f,f)(h)}function f(h){return Jr(h)?Pi(e,p,"whitespace")(h):p(h)}function p(h){return h===null||or(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function ope(e,t,n){return r;function r(a){return ta(a)?L0(e,i)(a):n(a)}function i(a){return VM(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Jr(a)?Pi(e,s,"whitespace")(a):s(a)}function s(a){return a===null||or(a)?t(a):n(a)}}const spe={name:"hardBreakEscape",tokenize:ape};function ape(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return or(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const lpe={name:"headingAtx",resolve:upe,tokenize:cpe};function upe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},hu(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function cpe(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ta(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||or(c)?(e.exit("atxHeading"),t(c)):Jr(c)?Pi(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||ta(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const dpe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],GM=["pre","script","style","textarea"],fpe={concrete:!0,name:"htmlFlow",resolveTo:Ape,tokenize:mpe},ppe={partial:!0,tokenize:Epe},hpe={partial:!0,tokenize:gpe};function Ape(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mpe(e,t,n){const r=this;let i,o,s,a,l;return u;function u(R){return c(R)}function c(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),o=!0,g):R===63?(e.consume(R),i=3,r.interrupt?t:F):Au(R)?(e.consume(R),s=String.fromCharCode(R),m):n(R)}function p(R){return R===45?(e.consume(R),i=2,h):R===91?(e.consume(R),i=5,a=0,A):Au(R)?(e.consume(R),i=4,r.interrupt?t:F):n(R)}function h(R){return R===45?(e.consume(R),r.interrupt?t:F):n(R)}function A(R){const j="CDATA[";return R===j.charCodeAt(a++)?(e.consume(R),a===j.length?r.interrupt?t:k:A):n(R)}function g(R){return Au(R)?(e.consume(R),s=String.fromCharCode(R),m):n(R)}function m(R){if(R===null||R===47||R===62||ta(R)){const j=R===47,$=s.toLowerCase();return!j&&!o&&GM.includes($)?(i=1,r.interrupt?t(R):k(R)):dpe.includes(s.toLowerCase())?(i=6,j?(e.consume(R),O):r.interrupt?t(R):k(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?y(R):v(R))}return R===45||La(R)?(e.consume(R),s+=String.fromCharCode(R),m):n(R)}function O(R){return R===62?(e.consume(R),r.interrupt?t:k):n(R)}function y(R){return Jr(R)?(e.consume(R),y):I(R)}function v(R){return R===47?(e.consume(R),I):R===58||R===95||Au(R)?(e.consume(R),T):Jr(R)?(e.consume(R),v):I(R)}function T(R){return R===45||R===46||R===58||R===95||La(R)?(e.consume(R),T):_(R)}function _(R){return R===61?(e.consume(R),x):Jr(R)?(e.consume(R),_):v(R)}function x(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),l=R,b):Jr(R)?(e.consume(R),x):w(R)}function b(R){return R===l?(e.consume(R),l=null,D):R===null||or(R)?n(R):(e.consume(R),b)}function w(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||ta(R)?_(R):(e.consume(R),w)}function D(R){return R===47||R===62||Jr(R)?v(R):n(R)}function I(R){return R===62?(e.consume(R),P):n(R)}function P(R){return R===null||or(R)?k(R):Jr(R)?(e.consume(R),P):n(R)}function k(R){return R===45&&i===2?(e.consume(R),B):R===60&&i===1?(e.consume(R),Q):R===62&&i===4?(e.consume(R),W):R===63&&i===3?(e.consume(R),F):R===93&&i===5?(e.consume(R),q):or(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ppe,G,N)(R)):R===null||or(R)?(e.exit("htmlFlowData"),N(R)):(e.consume(R),k)}function N(R){return e.check(hpe,L,G)(R)}function L(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),M}function M(R){return R===null||or(R)?N(R):(e.enter("htmlFlowData"),k(R))}function B(R){return R===45?(e.consume(R),F):k(R)}function Q(R){return R===47?(e.consume(R),s="",U):k(R)}function U(R){if(R===62){const j=s.toLowerCase();return GM.includes(j)?(e.consume(R),W):k(R)}return Au(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),U):k(R)}function q(R){return R===93?(e.consume(R),F):k(R)}function F(R){return R===62?(e.consume(R),W):R===45&&i===2?(e.consume(R),F):k(R)}function W(R){return R===null||or(R)?(e.exit("htmlFlowData"),G(R)):(e.consume(R),W)}function G(R){return e.exit("htmlFlow"),t(R)}}function gpe(e,t,n){const r=this;return i;function i(s){return or(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Epe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(c1,t,n)}}const Ope={name:"htmlText",tokenize:ype};function ype(e,t,n){const r=this;let i,o,s;return a;function a(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),l}function l(F){return F===33?(e.consume(F),u):F===47?(e.consume(F),_):F===63?(e.consume(F),v):Au(F)?(e.consume(F),w):n(F)}function u(F){return F===45?(e.consume(F),c):F===91?(e.consume(F),o=0,A):Au(F)?(e.consume(F),y):n(F)}function c(F){return F===45?(e.consume(F),h):n(F)}function f(F){return F===null?n(F):F===45?(e.consume(F),p):or(F)?(s=f,Q(F)):(e.consume(F),f)}function p(F){return F===45?(e.consume(F),h):f(F)}function h(F){return F===62?B(F):F===45?p(F):f(F)}function A(F){const W="CDATA[";return F===W.charCodeAt(o++)?(e.consume(F),o===W.length?g:A):n(F)}function g(F){return F===null?n(F):F===93?(e.consume(F),m):or(F)?(s=g,Q(F)):(e.consume(F),g)}function m(F){return F===93?(e.consume(F),O):g(F)}function O(F){return F===62?B(F):F===93?(e.consume(F),O):g(F)}function y(F){return F===null||F===62?B(F):or(F)?(s=y,Q(F)):(e.consume(F),y)}function v(F){return F===null?n(F):F===63?(e.consume(F),T):or(F)?(s=v,Q(F)):(e.consume(F),v)}function T(F){return F===62?B(F):v(F)}function _(F){return Au(F)?(e.consume(F),x):n(F)}function x(F){return F===45||La(F)?(e.consume(F),x):b(F)}function b(F){return or(F)?(s=b,Q(F)):Jr(F)?(e.consume(F),b):B(F)}function w(F){return F===45||La(F)?(e.consume(F),w):F===47||F===62||ta(F)?D(F):n(F)}function D(F){return F===47?(e.consume(F),B):F===58||F===95||Au(F)?(e.consume(F),I):or(F)?(s=D,Q(F)):Jr(F)?(e.consume(F),D):B(F)}function I(F){return F===45||F===46||F===58||F===95||La(F)?(e.consume(F),I):P(F)}function P(F){return F===61?(e.consume(F),k):or(F)?(s=P,Q(F)):Jr(F)?(e.consume(F),P):D(F)}function k(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(e.consume(F),i=F,N):or(F)?(s=k,Q(F)):Jr(F)?(e.consume(F),k):(e.consume(F),L)}function N(F){return F===i?(e.consume(F),i=void 0,M):F===null?n(F):or(F)?(s=N,Q(F)):(e.consume(F),N)}function L(F){return F===null||F===34||F===39||F===60||F===61||F===96?n(F):F===47||F===62||ta(F)?D(F):(e.consume(F),L)}function M(F){return F===47||F===62||ta(F)?D(F):n(F)}function B(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),t):n(F)}function Q(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),U}function U(F){return Jr(F)?Pi(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):q(F)}function q(F){return e.enter("htmlTextData"),s(F)}}const c_={name:"labelEnd",resolveAll:xpe,resolveTo:bpe,tokenize:Cpe},vpe={tokenize:_pe},Tpe={tokenize:wpe},Spe={tokenize:Ipe};function xpe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&hu(e,0,e.length,n),e}function bpe(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=sl(a,e.slice(o+1,o+r+3)),a=sl(a,[["enter",c,t]]),a=sl(a,a_(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=sl(a,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),a=sl(a,e.slice(s+1)),a=sl(a,[["exit",l,t]]),hu(e,o,e.length,a),e}function Cpe(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=r.parser.defined.includes(ah(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(vpe,c,s?c:f)(p):p===91?e.attempt(Tpe,c,s?u:f)(p):s?c(p):f(p)}function u(p){return e.attempt(Spe,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function _pe(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return ta(f)?L0(e,o)(f):o(f)}function o(f){return f===41?c(f):UM(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return ta(f)?L0(e,l)(f):c(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?VM(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return ta(f)?L0(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function wpe(e,t,n){const r=this;return i;function i(a){return HM.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ah(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function Ipe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Dpe={name:"labelStartImage",resolveAll:c_.resolveAll,tokenize:Rpe};function Rpe(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ppe={name:"labelStartLink",resolveAll:c_.resolveAll,tokenize:Npe};function Npe(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const d_={name:"lineEnding",tokenize:Lpe};function Lpe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Pi(e,t,"linePrefix")}}const d1={name:"thematicBreak",tokenize:kpe};function kpe(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||or(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Jr(u)?Pi(e,a,"whitespace")(u):a(u))}}const na={continuation:{tokenize:jpe},exit:Upe,name:"list",tokenize:Bpe},Mpe={partial:!0,tokenize:Hpe},Fpe={partial:!0,tokenize:$pe};function Bpe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){const A=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:s_(h)){if(r.containerState.type||(r.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(d1,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return s_(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(c1,r.interrupt?n:c,e.attempt(Mpe,p,f))}function c(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function f(h){return Jr(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function jpe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(c1,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pi(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Jr(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Fpe,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pi(e,e.attempt(na,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function $pe(e,t,n){const r=this;return Pi(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Upe(e){e.exit(this.containerState.type)}function Hpe(e,t,n){const r=this;return Pi(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Jr(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const WM={name:"setextUnderline",resolveTo:Vpe,tokenize:Gpe};function Vpe(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Gpe(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Jr(u)?Pi(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||or(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Wpe={tokenize:Qpe};function Qpe(e){const t=this,n=e.attempt(c1,r,e.attempt(this.parser.constructs.flowInitial,i,Pi(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Kfe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zpe={resolveAll:zM()},Xpe=QM("string"),Ype=QM("text");function QM(e){return{resolveAll:zM(e==="text"?qpe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function zM(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function qpe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)l=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Kpe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:npe},disable:{null:[]},document:{42:na,43:na,45:na,48:na,49:na,50:na,51:na,52:na,53:na,54:na,55:na,56:na,57:na,62:kM},flow:{35:lpe,42:d1,45:[WM,d1],60:fpe,61:WM,95:d1,96:jM,126:jM},flowInitial:{[-2]:u_,[-1]:u_,32:u_},insideSpan:{null:[l_,zpe]},string:{38:FM,92:MM},text:{[-5]:d_,[-4]:d_,[-3]:d_,33:Dpe,38:FM,42:l_,60:[Pfe,Ope],91:Ppe,92:[spe,MM],93:c_,95:l_,96:Wfe}},Symbol.toStringTag,{value:"Module"}));function Zpe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const l={attempt:b(_),check:b(x),consume:y,enter:v,exit:T,interrupt:b(x,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:A,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(P){return s=sl(s,P),m(),s[s.length-1]!==null?[]:(w(t,0),u.events=a_(o,u.events,u),u.events)}function p(P,k){return ehe(h(P),k)}function h(P){return Jpe(s,P)}function A(){const{_bufferIndex:P,_index:k,line:N,column:L,offset:M}=r;return{_bufferIndex:P,_index:k,line:N,column:L,offset:M}}function g(P){i[P.line]=P.column,I()}function m(){let P;for(;r._index<s.length;){const k=s[r._index];if(typeof k=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<k.length;)O(k.charCodeAt(r._bufferIndex));else O(k)}}function O(P){c=c(P)}function y(P){or(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,I()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function v(P,k){const N=k||{};return N.type=P,N.start=A(),u.events.push(["enter",N,u]),a.push(N),N}function T(P){const k=a.pop();return k.end=A(),u.events.push(["exit",k,u]),k}function _(P,k){w(P,k.from)}function x(P,k){k.restore()}function b(P,k){return N;function N(L,M,B){let Q,U,q,F;return Array.isArray(L)?G(L):"tokenize"in L?G([L]):W(L);function W(Y){return z;function z(H){const V=H!==null&&Y[H],X=H!==null&&Y.null,J=[...Array.isArray(V)?V:V?[V]:[],...Array.isArray(X)?X:X?[X]:[]];return G(J)(H)}}function G(Y){return Q=Y,U=0,Y.length===0?B:R(Y[U])}function R(Y){return z;function z(H){return F=D(),q=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?$():Y.tokenize.call(k?Object.assign(Object.create(u),k):u,l,j,$)(H)}}function j(Y){return P(q,F),M}function $(Y){return F.restore(),++U<Q.length?R(Q[U]):B}}}function w(P,k){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&hu(u.events,k,u.events.length-k,P.resolve(u.events.slice(k),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function D(){const P=A(),k=u.previous,N=u.currentConstruct,L=u.events.length,M=Array.from(a);return{from:L,restore:B};function B(){r=P,u.previous=k,u.currentConstruct=N,u.events.length=L,a=M,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Jpe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function ehe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
143
143
|
`;break}case-3:{s=`\r
|
|
144
144
|
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function the(e){const r={constructs:gfe([Kpe,...(e||{}).extensions||[]]),content:i(bfe),defined:[],document:i(_fe),flow:i(Wpe),lazy:{},string:i(Xpe),text:i(Ype)};return r;function i(o){return s;function s(a){return Zpe(r,o,a)}}}function nhe(e){for(;!$M(e););return e}const XM=/[\0\t\n\r]/g;function rhe(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const l=[];let u,c,f,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(XM.lastIndex=f,u=XM.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(f);break}if(h===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(o.slice(f,p)),e+=p-f),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ihe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ohe(e){return e.replace(ihe,she)}function she(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return RM(n.slice(o?2:1),o?16:10)}return i_(n)||e}const YM={}.hasOwnProperty;function ahe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lhe(n)(nhe(the(n).document().write(rhe()(e,t,!0))))}function lhe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ae),autolinkProtocol:D,autolinkEmail:D,atxHeading:o(ue),blockQuote:o(X),characterEscape:D,characterReference:D,codeFenced:o(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(J,s),codeText:o(ee,s),codeTextData:D,data:D,codeFlowValue:D,definition:o(le),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(re),hardBreakEscape:o(Oe),hardBreakTrailing:o(Oe),htmlFlow:o(ve,s),htmlFlowData:D,htmlText:o(ve,s),htmlTextData:D,image:o(oe),label:s,link:o(ae),listItem:o(Z),listItemValue:p,listOrdered:o(te,f),listUnordered:o(te),paragraph:o(ne),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ue),strong:o(se),thematicBreak:o(he)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:V,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:$,characterReferenceMarkerNumeric:$,characterReferenceValue:Y,characterReference:z,codeFenced:l(m),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:A,codeFlowValue:I,codeIndented:l(O),codeText:l(M),codeTextData:I,data:I,definition:l(),definitionDestinationString:T,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(N),htmlFlowData:I,htmlText:l(L),htmlTextData:I,image:l(Q),label:q,labelText:U,lineEnding:P,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:j,resourceDestinationString:F,resourceTitleString:W,resource:G,setextHeading:l(w),setextHeadingLineSequence:b,setextHeadingText:x,strong:l(),thematicBreak:l()}};qM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let xe={type:"root",children:[]};const me={stack:[xe],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:c,data:n},Ee=[];let ke=-1;for(;++ke<de.length;)if(de[ke][1].type==="listOrdered"||de[ke][1].type==="listUnordered")if(de[ke][0]==="enter")Ee.push(ke);else{const Ge=Ee.pop();ke=i(de,Ge,ke)}for(ke=-1;++ke<de.length;){const Ge=t[de[ke][0]];YM.call(Ge,de[ke][1].type)&&Ge[de[ke][1].type].call(Object.assign({sliceSerialize:de[ke][2].sliceSerialize},me),de[ke][1])}if(me.tokenStack.length>0){const Ge=me.tokenStack[me.tokenStack.length-1];(Ge[1]||KM).call(me,void 0,Ge[0])}for(xe.position={start:Td(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:Td(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<t.transforms.length;)xe=t.transforms[ke](xe)||xe;return xe}function i(de,xe,me){let Ee=xe-1,ke=-1,Ge=!1,$e,et,rt,it;for(;++Ee<=me;){const Re=de[Ee];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?ke++:ke--,it=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&($e&&!it&&!ke&&!rt&&(rt=Ee),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!ke&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||ke===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if($e){let Xe=Ee;for(et=void 0;Xe--;){const qe=de[Xe];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;et&&(de[et][1].type="lineEndingBlank",Ge=!0),qe[1].type="lineEnding",et=Xe}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}rt&&(!et||rt<et)&&($e._spread=!0),$e.end=Object.assign({},et?de[et][1].start:Re[1].end),de.splice(et||Ee,0,["exit",$e,Re[2]]),Ee++,me++}if(Re[1].type==="listItemPrefix"){const Xe={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};$e=Xe,de.splice(Ee,0,["enter",Xe,Re[2]]),Ee++,me++,rt=void 0,it=!0}}}return de[xe][1]._spread=Ge,me}function o(de,xe){return me;function me(Ee){a.call(this,de(Ee),Ee),xe&&xe.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(de,xe,me){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([xe,me||void 0]),de.position={start:Td(xe.start),end:void 0}}function l(de){return xe;function xe(me){de&&de.call(this,me),u.call(this,me)}}function u(de,xe){const me=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==de.type&&(xe?xe.call(this,de,Ee[0]):(Ee[1]||KM).call(this,de,Ee[0]));else throw new Error("Cannot close `"+de.type+"` ("+R0({start:de.start,end:de.end})+"): it’s not open");me.position.end=Td(de.end)}function c(){return Afe(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(de){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function h(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=de}function A(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=de}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/(\r?\n|\r)$/g,"")}function y(de){const xe=this.resume(),me=this.stack[this.stack.length-1];me.label=xe,me.identifier=ah(this.sliceSerialize(de)).toLowerCase()}function v(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function T(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function _(de){const xe=this.stack[this.stack.length-1];if(!xe.depth){const me=this.sliceSerialize(de).length;xe.depth=me}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function b(de){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function D(de){const me=this.stack[this.stack.length-1].children;let Ee=me[me.length-1];(!Ee||Ee.type!=="text")&&(Ee=pe(),Ee.position={start:Td(de.start),end:void 0},me.push(Ee)),this.stack.push(Ee)}function I(de){const xe=this.stack.pop();xe.value+=this.sliceSerialize(de),xe.position.end=Td(de.end)}function P(de){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=xe.children[xe.children.length-1];me.position.end=Td(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(D.call(this,de),I.call(this,de))}function k(){this.data.atHardBreak=!0}function N(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function L(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function M(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function B(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Q(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function U(de){const xe=this.sliceSerialize(de),me=this.stack[this.stack.length-2];me.label=ohe(xe),me.identifier=ah(xe).toLowerCase()}function q(){const de=this.stack[this.stack.length-1],xe=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const Ee=de.children;me.children=Ee}else me.alt=xe}function F(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function W(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function G(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function j(de){const xe=this.resume(),me=this.stack[this.stack.length-1];me.label=xe,me.identifier=ah(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function $(de){this.data.characterReferenceType=de.type}function Y(de){const xe=this.sliceSerialize(de),me=this.data.characterReferenceType;let Ee;me?(Ee=RM(xe,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=i_(xe);const ke=this.stack[this.stack.length-1];ke.value+=Ee}function z(de){const xe=this.stack.pop();xe.position.end=Td(de.end)}function H(de){I.call(this,de);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(de)}function V(de){I.call(this,de);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(de)}function X(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function ee(){return{type:"inlineCode",value:""}}function le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function re(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function ve(){return{type:"html",value:""}}function oe(){return{type:"image",title:null,url:"",alt:null}}function ae(){return{type:"link",title:null,url:"",children:[]}}function te(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function Z(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function ne(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function pe(){return{type:"text",value:""}}function he(){return{type:"thematicBreak"}}}function Td(e){return{line:e.line,column:e.column,offset:e.offset}}function qM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?qM(e,r):uhe(e,r)}}function uhe(e,t){let n;for(n in t)if(YM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function KM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+R0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+R0({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+R0({start:t.start,end:t.end})+") is still open")}function che(e){const t=this;t.parser=n;function n(r){return ahe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dhe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function fhe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
package/package.json
CHANGED