unleash-server 5.8.0 → 5.8.2
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/lib/features/scheduler/scheduler-service.d.ts.map +1 -1
- package/dist/lib/features/scheduler/scheduler-service.js +2 -2
- package/dist/lib/features/scheduler/scheduler-service.js.map +1 -1
- package/dist/lib/features/scheduler/scheduler-service.test.js +9 -24
- package/dist/lib/features/scheduler/scheduler-service.test.js.map +1 -1
- package/dist/lib/metrics.d.ts +2 -0
- package/dist/lib/metrics.d.ts.map +1 -1
- package/dist/lib/metrics.js +48 -18
- package/dist/lib/metrics.js.map +1 -1
- package/dist/lib/metrics.test.js +25 -1
- package/dist/lib/metrics.test.js.map +1 -1
- package/dist/lib/routes/admin-api/api-token.d.ts.map +1 -1
- package/dist/lib/routes/admin-api/api-token.js +1 -1
- package/dist/lib/routes/admin-api/api-token.js.map +1 -1
- package/dist/lib/routes/admin-api/project/api-token.d.ts.map +1 -1
- package/dist/lib/routes/admin-api/project/api-token.js +1 -1
- package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
- package/dist/lib/services/scheduler-service.test.js +6 -8
- package/dist/lib/services/scheduler-service.test.js.map +1 -1
- package/dist/lib/util/extract-user.d.ts +1 -0
- package/dist/lib/util/extract-user.d.ts.map +1 -1
- package/dist/lib/util/extract-user.js +6 -3
- package/dist/lib/util/extract-user.js.map +1 -1
- package/dist/lib/util/extract-user.test.js +7 -4
- package/dist/lib/util/extract-user.test.js.map +1 -1
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/{AdvancedPlayground-iXZHz_Rq.js → AdvancedPlayground-FxfPUa2V.js} +1 -1
- package/frontend/build/static/{CreateProject-BbtWHPl8.js → CreateProject-aN-UGdcb.js} +1 -1
- package/frontend/build/static/{FeatureArchiveDialog-D_tZ06Sa.js → FeatureArchiveDialog-eHyhx7Yo.js} +1 -1
- package/frontend/build/static/{FeatureMetricsChart-SiwdLhRh.js → FeatureMetricsChart-ExGq1eXl.js} +1 -1
- package/frontend/build/static/{FeatureViewLazyExport-baWLSkEu.js → FeatureViewLazyExport-S8mj8m0z.js} +2 -2
- package/frontend/build/static/{LazyAdminExport-ckQgco28.js → LazyAdminExport-fpVZFnP9.js} +2 -2
- package/frontend/build/static/{LazyProjectExport-R4jiFkLZ.js → LazyProjectExport-_QSE5C5m.js} +1 -1
- package/frontend/build/static/{NetworkOverview-StnrlVkY.js → NetworkOverview-ylTzmeDg.js} +2 -2
- package/frontend/build/static/{NetworkTraffic-V87e4GGP.js → NetworkTraffic-qj5h7JRk.js} +1 -1
- package/frontend/build/static/{ReactJSONEditor-Ybg5ijJk.js → ReactJSONEditor-E59dRBYR.js} +1 -1
- package/frontend/build/static/{RoleCell-3lnoYolp.js → RoleCell-TGTVkKHO.js} +1 -1
- package/frontend/build/static/{StrategyItemContainer-wRkYMo4g.js → StrategyItemContainer-JoMPKX3L.js} +1 -1
- package/frontend/build/static/{chartjs-adapter-date-fns.esm-kkU_hxq-.js → chartjs-adapter-date-fns.esm-JSlDxtwH.js} +1 -1
- package/frontend/build/static/{flowchart-elk-definition-170a3958-vkzW0gdf.js → flowchart-elk-definition-170a3958-NkZoK_zv.js} +1 -1
- package/frontend/build/static/{index-ORDXjnpF.js → index-JVRlSBvr.js} +64 -64
- package/frontend/build/static/{is_dark-zSU9-MOM.js → is_dark-gjUQW15t.js} +1 -1
- package/frontend/build/static/{mindmap-definition-44684416-2v9fPc7w.js → mindmap-definition-44684416-obuYUG0L.js} +1 -1
- package/frontend/build/static/{timeline-definition-8e5a9bc6-RDFfY8I3.js → timeline-definition-8e5a9bc6-33WsNwwr.js} +1 -1
- package/frontend/build/static/{unknownify-vwm75Pg9.js → unknownify-YD2Teyht.js} +1 -1
- package/frontend/build/static/{useApiTokens-T6gzMZPt.js → useApiTokens-XTOY616x.js} +1 -1
- package/frontend/build/static/{useProjectForm-o3r31UMh.js → useProjectForm--jxh4Dtm.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{gO as E4,gP as lc,gQ as cc,gR as C4,gS as S4,gT as A4,cC as i1,s as b2,r as Wh,j as Po,cf as L4,gU as B4,gV as D4,C as I4,J as M4,gW as N4,gX as R4}from"./index-
|
|
1
|
+
import{gO as E4,gP as lc,gQ as cc,gR as C4,gS as S4,gT as A4,cC as i1,s as b2,r as Wh,j as Po,cf as L4,gU as B4,gV as D4,C as I4,J as M4,gW as N4,gX as R4}from"./index-JVRlSBvr.js";import{u as O4,a as _2}from"./unknownify-YD2Teyht.js";const F4=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function P4(t){return typeof t=="string"&&F4.test(t)}function V4(t){if(!P4(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Y4(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const z4="6ba7b810-9dad-11d1-80b4-00c04fd430c8",U4="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function W4(t,e,r){function i(n,s,a,o){var l;if(typeof n=="string"&&(n=Y4(n)),typeof s=="string"&&(s=V4(s)),((l=s)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+n.length);if(h.set(s),h.set(n,s.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return E4(h)}try{i.name=t}catch{}return i.DNS=z4,i.URL=U4,i}function H4(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:return e^r^i;case 2:return e&r^e&i^r&i;case 3:return e^r^i}}function eh(t,e){return t<<e|t>>>32-e}function q4(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,n=Math.ceil(i/16),s=new Array(n);for(let a=0;a<n;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];s[a]=o}s[n-1][14]=(t.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<n;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=s[a][p];for(let p=16;p<80;++p)o[p]=eh(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=r[0],h=r[1],u=r[2],f=r[3],d=r[4];for(let p=0;p<80;++p){const m=Math.floor(p/20),b=eh(l,5)+H4(m,h,u,f)+d+e[m]+o[p]>>>0;d=f,f=u,u=eh(h,30)>>>0,h=l,l=b}r[0]=r[0]+l>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+u>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+d>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const G4=W4("v5",80,q4),$4=G4;function x2(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var f,d;return(d=(f=u.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var s=new RegExp(`
|
|
2
2
|
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(s,`
|
|
3
3
|
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(o,l){var h=a.match(/(?:^|\n)( *)$/),u=h?h[1]:"",f=o;typeof o=="string"&&o.includes(`
|
|
4
4
|
`)&&(f=String(o).split(`
|
|
@@ -1270,7 +1270,7 @@ Expecting `+Tt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":$="Parse error o
|
|
|
1270
1270
|
`+k+"^"},test_match:function(x,k){var v,B,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),B=x[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var P in R)this[P]=R[P];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,k,v,B;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),P=0;P<R.length;P++)if(v=this._input.match(this.rules[R[P]]),v&&(!k||v[0].length>k[0].length)){if(k=v,B=P,this.options.backtrack_lexer){if(x=this.test_match(v,R[P]),x!==!1)return x;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(x=this.test_match(k,R[B]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1271
1271
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(k,v,B,R){switch(B){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return b}();d.lexer=p;function m(){this.yy={}}return m.prototype=d,d.Parser=m,new m}();e1.parser=e1;const dY=e1,pY=t=>t.match(/^\s*journey/)!==null;let zs="";const E0=[],to=[],eo=[],gY=function(t,e,r){xe.parseDirective(this,t,e,r)},yY=function(){E0.length=0,to.length=0,zs="",eo.length=0,Lr()},mY=function(t){zs=t,E0.push(t)},bY=function(){return E0},_Y=function(){let t=c2();const e=100;let r=0;for(;!t&&r<e;)t=c2(),r++;return to.push(...eo),to},xY=function(){const t=[];return to.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},vY=function(t,e){const r=e.substr(1).split(":");let i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));const s=n.map(o=>o.trim()),a={section:zs,type:zs,people:s,task:t,score:i};eo.push(a)},kY=function(t){const e={section:zs,type:zs,description:t,task:t,classes:[]};to.push(e)},c2=function(){const t=function(r){return eo[r].processed};let e=!0;for(const[r,i]of eo.entries())t(r),e=e&&i.processed;return e},wY=function(){return xY()},h2={parseDirective:gY,getConfig:()=>G().journey,clear:yY,setDiagramTitle:si,getDiagramTitle:ai,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,addSection:mY,getSections:bY,getTasks:_Y,addTask:vY,addTaskOrg:kY,getActors:wY},Xc=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},TY=function(t,e){const i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const h=nu().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=nu().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(n):e.score<3?a(n):o(n),i},Z3=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},J3=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(r),i},EY=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,J3(t,e)},CY=function(t,e,r){const i=t.append("g"),n=C0();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Xc(i,n),t4(r)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let u2=-1;const SY=function(t,e,r){const i=e.x+r.width/2,n=t.append("g");u2++;const s=300+5*30;n.append("line").attr("id","task"+u2).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),TY(n,{cx:i,cy:300+(5-e.score)*30,score:e.score});const a=C0();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Xc(n,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Z3(n,u),o+=10}),t4(r)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},AY=function(t,e){Xc(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},LY=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},C0=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},t4=function(){function t(n,s,a,o,l,h,u,f){const d=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(d,u)}function e(n,s,a,o,l,h,u,f,d){const{taskFontSize:p,taskFontFamily:m}=f,b=n.split(/<br\s*\/?>/gi);for(let x=0;x<b.length;x++){const k=x*p-p*(b.length-1)/2,v=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",m);v.append("tspan").attr("x",a+l/2).attr("dy",k).text(b[x]),v.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)a in s&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),BY=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},ro={drawRect:Xc,drawCircle:Z3,drawSection:CY,drawText:J3,drawLabel:EY,drawTask:SY,drawBackgroundRect:AY,getTextObj:LY,getNoteRect:C0,initGraphics:BY},DY=function(t){Object.keys(t).forEach(function(r){Kc[r]=t[r]})},Ui={};function IY(t){const e=G().journey;let r=60;Object.keys(Ui).forEach(i=>{const n=Ui[i].color,s={cx:20,cy:r,r:7,fill:n,stroke:"#000",pos:Ui[i].position};ro.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:i,textMargin:e.boxTextMargin|5};ro.drawText(t,a),r+=20})}const Kc=G().journey,Sn=Kc.leftMargin,MY=function(t,e,r,i){const n=G().journey;i.db.clear(),i.parser.parse(t+`
|
|
1272
1272
|
`);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Pr.init();const l=o.select("#"+e);ro.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),f=i.db.getActors();for(const k in Ui)delete Ui[k];let d=0;f.forEach(k=>{Ui[k]={color:n.actorColours[d%n.actorColours.length],position:d},d++}),IY(l),Pr.insert(0,0,Sn,Object.keys(Ui).length*50),NY(l,h,0);const p=Pr.getBounds();u&&l.append("text").text(u).attr("x",Sn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*n.diagramMarginY,b=Sn+p.stopx+2*n.diagramMarginX;ni(l,m,b,n.useMaxWidth),l.append("line").attr("x1",Sn).attr("y1",n.height*4).attr("x2",b-Sn-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const x=u?70:0;l.attr("viewBox",`${p.startx} -25 ${b} ${m+x}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+x+25)},Pr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=G().journey,s=this;let a=0;function o(l){return function(u){a++;const f=s.sequenceItems.length-a+1;s.updateVal(u,"starty",e-f*n.boxMargin,Math.min),s.updateVal(u,"stopy",i+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"startx",t-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(u,"startx",t-f*n.boxMargin,Math.min),s.updateVal(u,"stopx",r+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"starty",e-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopy",i+f*n.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Pr.data,"startx",n,Math.min),this.updateVal(Pr.data,"starty",a,Math.min),this.updateVal(Pr.data,"stopx",s,Math.max),this.updateVal(Pr.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},zh=Kc.sectionFills,f2=Kc.sectionColours,NY=function(t,e,r){const i=G().journey;let n="";const s=i.height*2+i.diagramMarginY,a=r+s;let o=0,l="#CCC",h="black",u=0;for(const[f,d]of e.entries()){if(n!==d.section){l=zh[o%zh.length],u=o%zh.length,h=f2[o%f2.length];const m={x:f*i.taskMargin+f*i.width+Sn,y:50,text:d.section,fill:l,num:u,colour:h};ro.drawSection(t,m,i),n=d.section,o++}const p=d.people.reduce((m,b)=>(Ui[b]&&(m[b]=Ui[b]),m),{});d.x=f*i.taskMargin+f*i.width+Sn,d.y=a,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=h,d.fill=l,d.num=u,d.actors=p,ro.drawTask(t,d,i),Pr.insert(d.x,d.y,d.x+d.width+i.taskMargin,300+5*30)}},d2={setConf:DY,draw:MY};let p2={};const RY=function(t){p2={...p2,...t}},OY=(t,e,r)=>{try{I.debug(`Renering svg for syntax error
|
|
1273
|
-
`);const i=_t("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){I.error("Error while rendering info diagram"),I.error(VD(i))}},nc={setConf:RY,draw:OY},e4="flowchart-elk",FY=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},PY=async()=>{const{diagram:t}=await i1(()=>import("./flowchart-elk-definition-170a3958-
|
|
1273
|
+
`);const i=_t("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){I.error("Error while rendering info diagram"),I.error(VD(i))}},nc={setConf:RY,draw:OY},e4="flowchart-elk",FY=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},PY=async()=>{const{diagram:t}=await i1(()=>import("./flowchart-elk-definition-170a3958-NkZoK_zv.js"),__vite__mapDeps([]));return{id:e4,diagram:t}},VY={id:e4,detector:FY,loader:PY},YY=VY,r4="timeline",zY=t=>t.match(/^\s*timeline/)!==null,UY=async()=>{const{diagram:t}=await i1(()=>import("./timeline-definition-8e5a9bc6-33WsNwwr.js"),__vite__mapDeps([]));return{id:r4,diagram:t}},WY={id:r4,detector:zY,loader:UY},HY=WY,i4="mindmap",qY=t=>t.match(/^\s*mindmap/)!==null,GY=async()=>{const{diagram:t}=await i1(()=>import("./mindmap-definition-44684416-obuYUG0L.js"),__vite__mapDeps([]));return{id:i4,diagram:t}},$Y={id:i4,detector:qY,loader:GY},jY=$Y;let g2=!1;const _o=()=>{g2||(g2=!0,ly(YY,HY,jY),Ye("error",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Ye("---",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Ye("c4",{parser:$I,db:Py,renderer:Rd,styles:Sy,init:t=>{Rd.setConf(t.c4)}},jI),Ye("class",{parser:Od,db:fs,renderer:mN,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},YM),Ye("classDiagram",{parser:Od,db:fs,renderer:BR,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},zM),Ye("er",{parser:DR,db:zR,renderer:JR,styles:xy},IR),Ye("gantt",{parser:_O,db:y0,renderer:tF,styles:vy},xO),Ye("info",{parser:eF,db:aF,renderer:lF,styles:ky},cF),Ye("pie",{parser:hF,db:_F,renderer:vF,styles:wy},uF),Ye("requirement",{parser:kF,db:UF,renderer:QF,styles:Ty},wF),Ye("sequence",{parser:ZF,db:Jd,renderer:e2,styles:Ey,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");Jd.setWrap(t.wrap),e2.setConf(t.sequence)}},JF),Ye("state",{parser:r2,db:Ri,renderer:UV,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},JP),Ye("stateDiagram",{parser:r2,db:Ri,renderer:fY,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},tV),Ye("journey",{parser:dY,db:h2,renderer:d2,styles:Cy,init:t=>{d2.setConf(t.journey),h2.clear()}},pY),Ye("flowchart",{parser:Xd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gO.setConf(t.flowchart),hi.clear(),hi.setGen("gen-1")}},tO),Ye("flowchart-v2",{parser:Xd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yy({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Fh.setConf(t.flowchart),hi.clear(),hi.setGen("gen-2")}},eO),Ye("gitGraph",{parser:yI,db:OI,renderer:HI,styles:GI},mI))};class r1{constructor(e,r){var i,n;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const s=G();this.txt=e;try{this.type=H1(e,s)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const a=By(this.type);I.debug("Type "+this.type),this.db=a.db,(n=(i=this.db).clear)==null||n.call(i),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(_D(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),I.info("Initialized diagram "+this.type,s)),this.txt+=`
|
|
1274
1274
|
`,this.parse(this.txt,r)}parse(e,r){var i,n;if(this.detectTypeFailed)return!1;try{return e=e+`
|
|
1275
1275
|
`,(n=(i=this.db).clear)==null||n.call(i),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(G1(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const S0=(t,e)=>{const r=H1(t,G());try{By(r)}catch{const n=kD(r);if(!n)throw new Error(`Diagram ${r} not found.`);return n().then(({diagram:s})=>(Ye(r,s,void 0),new r1(t,e)))}return new r1(t,e)},A0=r1,XY="graphics-document document";function KY(t,e){t.attr("role",XY),bs(e)||t.attr("aria-roledescription",e)}function QY(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){const n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const L0=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],n4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",s4="sandbox",a4="loose",ZY="http://www.w3.org/2000/svg",o4="http://www.w3.org/1999/xlink",l4="http://www.w3.org/1999/xhtml",JY="100%",tz="100%",ez="border:0;margin:0;",rz="margin:0",iz="allow-top-navigation-by-user-activation allow-popups",nz='The "iframe" tag is not supported by your browser.',c4=["foreignobject"],h4=["dominant-baseline"];function sz(t,e){return _o(),new A0(t,e).parse(t,e)}async function az(t,e){return _o(),(await S0(t,e)).parse(t,e)}const u4=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},B0=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},y2=(t,e,r=[])=>`
|
|
1276
1276
|
.${t} ${e} { ${r.join(" !important; ")} !important; }`,oz=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var f=Object.defineProperty;var C=(t,e,a)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var s=(t,e,a)=>(C(t,typeof e!="symbol"?e+"":e,a),a);import{b_ as k,b as v,r as d,cf as w,j as o,C as P,J as S,cu as j,gN as u}from"./index-
|
|
1
|
+
var f=Object.defineProperty;var C=(t,e,a)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var s=(t,e,a)=>(C(t,typeof e!="symbol"?e+"":e,a),a);import{b_ as k,b as v,r as d,cf as w,j as o,C as P,J as S,cu as j,gN as u}from"./index-JVRlSBvr.js";import{u as T,a as g}from"./unknownify-YD2Teyht.js";import{L as I,C as M,a as N,b as R,P as A,c as L,T as _,p as q,e as E,f as D}from"./chartjs-adapter-date-fns.esm-JSlDxtwH.js";class H{constructor(e){s(this,"current",0);s(this,"all");this.all=e}next(){const e=this.all[this.current];return this.current=(this.current+1)%this.all.length,e}}const m=["circle","rect","rectRounded","rectRot","triangle"],W=(t,e)=>t.map(a=>({x:a[0],y:e(a[1])})),$=(t,e)=>({locale:e.locale,responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},color:t.palette.text.secondary,plugins:{tooltip:{backgroundColor:t.palette.background.paper,bodyColor:t.palette.text.primary,titleColor:t.palette.action.active,borderColor:t.palette.primary.main,borderWidth:1,padding:10,boxPadding:5,usePointStyle:!0,callbacks:{title:a=>u(1e3*a[0].parsed.x,e.locale)},itemSort:(a,i)=>i.parsed.y-a.parsed.y},legend:{position:"bottom",align:"start",labels:{boxWidth:10,boxHeight:10,usePointStyle:!0,padding:24}},title:{text:"Top 10 requests per second in the last 6 hours",position:"top",align:"start",display:!0,font:{size:16,weight:"400"},color:t.palette.text.primary,padding:{bottom:32}}},scales:{y:{type:"linear",title:{display:!0,text:"Requests per second",color:t.palette.text.secondary},suggestedMin:0,ticks:{precision:0,color:t.palette.text.secondary},grid:{color:t.palette.divider,borderColor:t.palette.divider}},x:{type:"time",time:{unit:"minute"},grid:{display:!0,color:t.palette.divider,borderColor:t.palette.divider},ticks:{callback:(a,i,r)=>u(r[i].value*1e3,e.locale)}}}});class z{constructor(e){s(this,"items");s(this,"picked",new Map);this.items=new H(e)}pick(e){return this.picked.has(e)||this.picked.set(e,this.items.next()),this.picked.get(e)}}const B=(t,e)=>{var a;if((a=e==null?void 0:e.data)!=null&&a.result){const i=new z([t.palette.success,t.palette.error,t.palette.primary,t.palette.warning]);return e.data.result.map((r,x)=>{var c,p;const n=g((c=r.metric)==null?void 0:c.endpoint),y=g((p=r.metric)==null?void 0:p.appName),l=i.pick(n),b=r.values||[];return{label:`${n}: ${y}`,borderColor:l.main,backgroundColor:l.main,data:W(b,h=>parseFloat(h)),elements:{point:{radius:4,pointStyle:m[x%m.length]},line:{borderDash:[8,4]}}}})}return[]},K=()=>{const{locationSettings:t}=k(),{metrics:e}=T(),a=v(),i=d.useMemo(()=>$(a,t),[a,t]);w("Network - Traffic");const r=d.useMemo(()=>({datasets:B(a,e)}),[a,e,t]);return o.jsx(P,{condition:r.datasets.length===0,show:o.jsx(S,{severity:"warning",children:"No data available."}),elseShow:o.jsx(j,{sx:{display:"grid",gap:4},children:o.jsx("div",{style:{height:400},children:o.jsx(I,{data:r,options:i,"aria-label":"An instance metrics line chart with two lines: requests per second for admin API and requests per second for client API"})})})})};M.register(N,R,A,L,_,q,E,D);export{K as NetworkTraffic,K as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as nN,r as ec,U as rN,j as pm}from"./index-
|
|
1
|
+
import{s as nN,r as ec,U as rN,j as pm}from"./index-JVRlSBvr.js";var Zw={},tk,ek,nk,rk,ik,ok,ak,sk,uk,lk,ck,fk,dk,hk,vk,pk,mk,gk,yk,bk,wk,kk,xk,jk,Sk,Ck,$k,_k,Ok,Mk,Ek,Ak,Pk,Tk,Rk,Nk,Ik,Dk,zk,Lk,Bk,qk,Fk,Vk,Hk,Wk,Uk,Jk,Kk,Gk,Qk,Yk,Xk,Zk,tx,ex,nx,rx,ix,ox,ax,sx,ux,lx,cx,fx,dx,hx,vx,px,mx,gx,yx,bx,wx,kx,xx,jx,Sx,Cx,$x,_x,Ox,Mx,Ex,Ax,Px,Tx,Rx,Nx,Ix,Dx,zx,Lx,Bx,qx,Fx,Vx,Hx,Wx,Ux,Jx,Kx,Gx,Qx,Yx,Xx,Zx,tj,ej,nj,rj,ij,oj,aj,sj,uj,lj,cj,fj,dj,hj,vj,pj,mj,gj,yj,bj,wj,kj,xj,jj,Sj,Cj,$j,_j,Oj,Mj,Ej,Aj,Pj,Tj,Rj,Nj,Ij,Dj,zj,Lj,Bj,qj,Fj,Vj,Hj,Wj,Uj,Jj,Kj,Gj,Qj,Yj,Xj,Zj,tS,eS,nS,rS,iS,oS,aS,sS,uS,lS,cS,fS,dS,hS,vS,pS,mS,gS,yS,bS,wS,kS,xS,jS,SS,CS,$S,_S,OS,MS,ES,AS,PS,TS,RS,NS,IS,DS,zS,LS,BS,qS,FS,VS,HS,WS,US,JS,KS,GS,QS,YS,XS,ZS,t4,e4,n4,r4,i4,o4,a4,s4,u4,l4,c4,f4,d4,h4,v4,p4,m4,g4,y4,b4,w4,k4,x4,j4,S4,C4,$4,_4,O4,M4,E4,A4,P4,T4,R4,N4,I4,D4,z4,L4,B4,q4,F4,V4,H4,W4,U4,J4,K4,G4,Q4,Y4,X4,Z4,t8,e8,n8,r8,i8,o8,a8,s8,u8,l8,c8,f8,iN=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],oN=["mainAxis","crossAxis","limiter"];function nt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mn(){return mn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(o,a){for(;!Object.prototype.hasOwnProperty.call(o,a)&&(o=an(o))!==null;);return o}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mn.apply(this,arguments)}function AM(e,t){if(e==null)return{};var n,r,i=function(a,s){if(a==null)return{};var u,l,c={},f=Object.keys(a);for(l=0;l<f.length;l++)u=f[l],s.indexOf(u)>=0||(c[u]=a[u]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function at(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ev(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){s=!0,o=u},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function zt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(W,_,O){W[_]=O.value},o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(W,_,O){return Object.defineProperty(W,_,{value:O,enumerable:!0,configurable:!0,writable:!0}),W[_]}try{l({},"")}catch{l=function(_,O,j){return _[O]=j}}function c(W,_,O,j){var $=_&&_.prototype instanceof g?_:g,M=Object.create($.prototype),P=new I(j||[]);return i(M,"_invoke",{value:E(W,O,P)}),M}function f(W,_,O){try{return{type:"normal",arg:W.call(_,O)}}catch(j){return{type:"throw",arg:j}}}t.wrap=c;var d="suspendedStart",h="suspendedYield",v="executing",p="completed",m={};function g(){}function y(){}function b(){}var w={};l(w,a,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(B([])));k&&k!==n&&r.call(k,a)&&(w=k);var C=b.prototype=g.prototype=Object.create(w);function R(W){["next","throw","return"].forEach(function(_){l(W,_,function(O){return this._invoke(_,O)})})}function z(W,_){function O($,M,P,A){var q=f(W[$],W,M);if(q.type!=="throw"){var N=q.arg,st=N.value;return st&&oe(st)=="object"&&r.call(st,"__await")?_.resolve(st.__await).then(function(ft){O("next",ft,P,A)},function(ft){O("throw",ft,P,A)}):_.resolve(st).then(function(ft){N.value=ft,P(N)},function(ft){return O("throw",ft,P,A)})}A(q.arg)}var j;i(this,"_invoke",{value:function($,M){function P(){return new _(function(A,q){O($,M,A,q)})}return j=j?j.then(P,P):P()}})}function E(W,_,O){var j=d;return function($,M){if(j===v)throw new Error("Generator is already running");if(j===p){if($==="throw")throw M;return{value:e,done:!0}}for(O.method=$,O.arg=M;;){var P=O.delegate;if(P){var A=D(P,O);if(A){if(A===m)continue;return A}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(j===d)throw j=p,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);j=v;var q=f(W,_,O);if(q.type==="normal"){if(j=O.done?p:h,q.arg===m)continue;return{value:q.arg,done:O.done}}q.type==="throw"&&(j=p,O.method="throw",O.arg=q.arg)}}}function D(W,_){var O=_.method,j=W.iterator[O];if(j===e)return _.delegate=null,O==="throw"&&W.iterator.return&&(_.method="return",_.arg=e,D(W,_),_.method==="throw")||O!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+O+"' method")),m;var $=f(j,W.iterator,_.arg);if($.type==="throw")return _.method="throw",_.arg=$.arg,_.delegate=null,m;var M=$.arg;return M?M.done?(_[W.resultName]=M.value,_.next=W.nextLoc,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,m):M:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,m)}function L(W){var _={tryLoc:W[0]};1 in W&&(_.catchLoc=W[1]),2 in W&&(_.finallyLoc=W[2],_.afterLoc=W[3]),this.tryEntries.push(_)}function K(W){var _=W.completion||{};_.type="normal",delete _.arg,W.completion=_}function I(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(L,this),this.reset(!0)}function B(W){if(W||W===""){var _=W[a];if(_)return _.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var O=-1,j=function $(){for(;++O<W.length;)if(r.call(W,O))return $.value=W[O],$.done=!1,$;return $.value=e,$.done=!0,$};return j.next=j}}throw new TypeError(oe(W)+" is not iterable")}return y.prototype=b,i(C,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(W){var _=typeof W=="function"&&W.constructor;return!!_&&(_===y||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,b):(W.__proto__=b,l(W,u,"GeneratorFunction")),W.prototype=Object.create(C),W},t.awrap=function(W){return{__await:W}},R(z.prototype),l(z.prototype,s,function(){return this}),t.AsyncIterator=z,t.async=function(W,_,O,j,$){$===void 0&&($=Promise);var M=new z(c(W,_,O,j),$);return t.isGeneratorFunction(_)?M:M.next().then(function(P){return P.done?P.value:M.next()})},R(C),l(C,u,"Generator"),l(C,a,function(){return this}),l(C,"toString",function(){return"[object Generator]"}),t.keys=function(W){var _=Object(W),O=[];for(var j in _)O.push(j);return O.reverse(),function $(){for(;O.length;){var M=O.pop();if(M in _)return $.value=M,$.done=!1,$}return $.done=!0,$}},t.values=B,I.prototype={constructor:I,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!W)for(var _ in this)_.charAt(0)==="t"&&r.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=e)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var _=this;function O(q,N){return M.type="throw",M.arg=W,_.next=q,N&&(_.method="next",_.arg=e),!!N}for(var j=this.tryEntries.length-1;j>=0;--j){var $=this.tryEntries[j],M=$.completion;if($.tryLoc==="root")return O("end");if($.tryLoc<=this.prev){var P=r.call($,"catchLoc"),A=r.call($,"finallyLoc");if(P&&A){if(this.prev<$.catchLoc)return O($.catchLoc,!0);if(this.prev<$.finallyLoc)return O($.finallyLoc)}else if(P){if(this.prev<$.catchLoc)return O($.catchLoc,!0)}else{if(!A)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return O($.finallyLoc)}}}},abrupt:function(W,_){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&r.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var $=j;break}}$&&(W==="break"||W==="continue")&&$.tryLoc<=_&&_<=$.finallyLoc&&($=null);var M=$?$.completion:{};return M.type=W,M.arg=_,$?(this.method="next",this.next=$.finallyLoc,m):this.complete(M)},complete:function(W,_){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&_&&(this.next=_),m},finish:function(W){for(var _=this.tryEntries.length-1;_>=0;--_){var O=this.tryEntries[_];if(O.finallyLoc===W)return this.complete(O.completion,O.afterLoc),K(O),m}},catch:function(W){for(var _=this.tryEntries.length-1;_>=0;--_){var O=this.tryEntries[_];if(O.tryLoc===W){var j=O.completion;if(j.type==="throw"){var $=j.arg;K(O)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(W,_,O){return this.delegate={iterator:B(W),resultName:_,nextLoc:O},this.method==="next"&&(this.arg=e),m}},t}function d8(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(l){return void n(l)}s.done?t(u):Promise.resolve(u).then(r,i)}function Me(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(u){d8(o,r,i,a,s,"next",u)}function s(u){d8(o,r,i,a,s,"throw",u)}a(void 0)})}}function be(e,t){return TM(e)||function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,u,l=[],c=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;c=!1}else for(;!(c=(o=s.call(i)).done)&&(l.push(o.value),l.length!==r);c=!0);}catch(d){f=!0,a=d}finally{try{if(!c&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(f)throw a}}return l}}(e,t)||ev(e,t)||PM()}function PM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TM(e){if(Array.isArray(e))return e}function il(e){var t=typeof Map=="function"?new Map:void 0;return il=function(n){if(n===null||!function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}}(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return mm(n,arguments,an(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$c(r,n)},il(e)}function mm(e,t,n){return mm=RM()?Reflect.construct.bind():function(r,i,o){var a=[null];a.push.apply(a,i);var s=new(Function.bind.apply(r,a));return o&&$c(s,o.prototype),s},mm.apply(null,arguments)}function _t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$c(e,t)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$c(e,t)}function Ot(e){var t=RM();return function(){var n,r=an(e);if(t){var i=an(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(oe(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ce(o)}(this,n)}}function ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},an(e)}function h8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h8(Object(n),!0).forEach(function(r){fi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NM(r.key),r)}}function tt(e,t,n){return t&&v8(e.prototype,t),n&&v8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fi(e,t,n){return(t=NM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NM(e){var t=function(n,r){if(oe(n)!=="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r||"default");if(oe(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return oe(t)==="symbol"?t:String(t)}function _e(e){return function(t){if(Array.isArray(t))return gm(t)}(e)||IM(e)||ev(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ev(e,t){if(e){if(typeof e=="string")return gm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gm(e,t):void 0}}function IM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oe(e){return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(e)}function Dt(){}var DM=function(e){return e};function wi(e,t){for(var n in t)e[n]=t[n];return e}function zM(e){return e()}function p8(){return Object.create(null)}function En(e){e.forEach(zM)}function Lr(e){return typeof e=="function"}function Rr(e,t){return e!=e?t==t:e!==t||e&&oe(e)==="object"||typeof e=="function"}function ze(e,t){return e!=e?t==t:e!==t}function hr(e,t,n,r){if(e){var i=LM(e,t,n,r);return e[0](i)}}function LM(e,t,n,r){return e[1]&&r?wi(n.ctx.slice(),e[1](r(t))):n.ctx}function vr(e,t,n,r){if(e[2]&&r){var i=e[2](r(n));if(t.dirty===void 0)return i;if(oe(i)==="object"){for(var o=[],a=Math.max(t.dirty.length,i.length),s=0;s<a;s+=1)o[s]=t.dirty[s]|i[s];return o}return t.dirty|i}return t.dirty}function pr(e,t,n,r,i,o){if(i){var a=LM(t,n,r,o);e.p(a,i)}}function mr(e){if(e.ctx.length>32){for(var t=[],n=e.ctx.length/32,r=0;r<n;r++)t[r]=-1;return t}return-1}function BM(e){var t={};for(var n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function ih(e,t){var n={};for(var r in t=new Set(t),e)t.has(r)||r[0]==="$"||(n[r]=e[r]);return n}function er(e){return e??""}function qr(e){return e&&Lr(e.destroy)?e.destroy:Dt}var qM=typeof window<"u",aN=qM?function(){return window.performance.now()}:function(){return Date.now()},dy=qM?function(e){return requestAnimationFrame(e)}:Dt,fc=new Set;function FM(e){fc.forEach(function(t){t.c(e)||(fc.delete(t),t.f())}),fc.size!==0&&dy(FM)}var hy=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function H(e,t){e.appendChild(t)}function Pe(e,t,n){var r=vy(e);if(!r.getElementById(t)){var i=Q("style");i.id=t,i.textContent=n,VM(r,i)}}function vy(e){if(!e)return document;var t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function sN(e){var t=Q("style");return t.textContent="/* empty */",VM(vy(e),t),t.sheet}function VM(e,t){return H(e.head||e,t),t.sheet}function ot(e,t,n){e.insertBefore(t,n||null)}function it(e){e.parentNode&&e.parentNode.removeChild(e)}function xr(e,t){for(var n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function Q(e){return document.createElement(e)}function ra(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Ut(e){return document.createTextNode(e)}function pt(){return Ut(" ")}function ln(){return Ut("")}function Tt(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function eu(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Ro(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function S(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}var uN=["width","height"];function m8(e,t){var n=Object.getOwnPropertyDescriptors(e.__proto__);for(var r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&uN.indexOf(r)===-1?e[r]=t[r]:S(e,r,t[r])}function ol(e,t){for(var n in t)S(e,n,t[n])}function ge(e,t){t=""+t,e.data!==t&&(e.data=t)}function ia(e,t){e.value=t??""}function Ya(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function g8(e,t,n){for(var r=0;r<e.options.length;r+=1){var i=e.options[r];if(i.__value===t)return void(i.selected=!0)}n&&t===void 0||(e.selectedIndex=-1)}function At(e,t,n){e.classList.toggle(t,!!n)}function HM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.bubbles,i=r!==void 0&&r,o=n.cancelable;return new CustomEvent(e,{detail:t,bubbles:i,cancelable:o!==void 0&&o})}function oa(e,t){return new e(t)}var _c,oh=new Map,ym=0;function y8(e,t,n,r,i,o,a){for(var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,u=16.666/r,l=`{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,j as e,ax as v,J as R,ac as Z,cA as ee,af as se,C as f,B as C,aq as te,dv as ne,a6 as oe,a7 as re,a8 as ae,a9 as ie,ap as M,c4 as G,ay as le,dG as ce,c9 as de,gL as ue,s as h,aK as W,dX as he,ab as k,dY as I,r as d,aa as pe,ae as N,dq as xe,dO as me,a3 as D,a4 as je,e as q,aI as z,cP as ye,cU as ge,bX as be,b7 as $,g as fe,v as Ce,bU as Te,h as Ae,ar as V,gM as b,d9 as ke,gf as H,d7 as ve,d8 as Ee,T as w,ei as Se,F as Ie,ek as Ne,dg as De,el as we,gb as Re,aN as Pe,aO as Be,aP as Fe,ba as Le,bb as _e,bq as Oe,dI as Ue}from"./index-ORDXjnpF.js";const Me=Y(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Key"),He=()=>{const{uiConfig:s}=v();return e.jsxs(R,{severity:"info",children:[e.jsxs("p",{children:["Read the"," ",e.jsx("a",{href:"https://docs.getunleash.io/reference/sdks",target:"_blank",rel:"noreferrer",children:"SDK overview"})," ","to connect Unleash to your application. Please note it can take up to ",e.jsx("strong",{children:"1 minute"})," before a new API key is activated."]}),e.jsx("br",{}),e.jsx("strong",{children:"API URL: "})," ",e.jsxs("pre",{style:{display:"inline"},children:[s.unleashUrl,"/api/"]})]})},Ke=["Icon","createdAt"],Ge=["Icon","project","seenAt"],ps=({compact:s=!1,setHiddenColumns:t,columns:o,loading:n,rows:r,getTableProps:a,getTableBodyProps:i,headerGroups:m,globalFilter:u,prepareRow:j})=>{const y=Z(ee.breakpoints.down("md"));return se([{condition:y,columns:Ke},{condition:s,columns:Ge}],t,o),e.jsxs(e.Fragment,{children:[e.jsx(f,{condition:r.length>0,show:e.jsx(C,{sx:{mb:4},children:e.jsx(He,{})})}),e.jsx(C,{sx:{overflowX:"auto"},children:e.jsx(te,{value:u,children:e.jsxs(ne,{...a(),children:[e.jsx(oe,{headerGroups:m}),e.jsx(re,{...i(),children:r.map(x=>(j(x),e.jsx(ae,{hover:!0,...x.getRowProps(),children:x.cells.map(p=>e.jsx(ie,{...p.getCellProps(),children:p.render("Cell")}))})))})]})})}),e.jsx(f,{condition:r.length===0&&!n,show:e.jsx(f,{condition:(u==null?void 0:u.length)>0,show:e.jsxs(M,{children:["No tokens found matching “",u,"”"]}),elseShow:e.jsx(M,{children:e.jsxs("span",{children:["No tokens available. Read ",e.jsx(G,{href:"https://docs.getunleash.io/how-to/api",target:"_blank",rel:"noreferrer",children:"API How-to guides"})," "," to learn more."]})})})})]})},xs=({path:s,permission:t,project:o})=>{const n=le();return e.jsx(ce,{Icon:de,onClick:()=>n(s),"data-testid":ue,permission:t,projectId:o,maxWidth:"700px",children:"New API token"})},We=h(W)(({theme:s})=>({textDecoration:"none",color:s.palette.links,"&:hover, &:focus":{textDecoration:"underline"}})),qe=({projects:s,project:t})=>{const{searchQuery:o}=he(),n=s&&Array.isArray(s)?s:t?[t]:[];return n.length===0?e.jsx(k,{children:e.jsx(I,{search:o,children:"*"})}):e.jsx(k,{children:n.map((r,a)=>e.jsxs(d.Fragment,{children:[a>0&&", ",!r||r==="*"?e.jsx(I,{search:o,children:"*"}):e.jsx(We,{to:`/projects/${r}`,children:e.jsx(I,{search:o,children:r})})]},r))})},ms=(s,t)=>{const o=d.useMemo(()=>({sortBy:[{id:"createdAt",desc:!0}]}),[]),n=d.useMemo(()=>[{id:"Icon",width:"1%",Cell:()=>e.jsx(pe,{icon:e.jsx(Me,{color:"disabled"})}),disableSortBy:!0,disableGlobalFilter:!0},{Header:"Username",accessor:"username",Cell:N},{Header:"Type",accessor:"type",Cell:({value:p})=>e.jsx(N,{value:K[p.toLowerCase()].label,subtitle:K[p.toLowerCase()].title}),minWidth:280},{Header:"Project",accessor:"project",Cell:p=>e.jsx(qe,{project:p.row.original.project,projects:p.row.original.projects}),minWidth:120},{Header:"Environment",accessor:"environment",Cell:N,minWidth:120},{Header:"Created",accessor:"createdAt",Cell:xe,minWidth:150,disableGlobalFilter:!0},{Header:"Last seen",accessor:"seenAt",Cell:me,minWidth:150,disableGlobalFilter:!0},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:t}],[]),{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:u,state:j,setGlobalFilter:y,setHiddenColumns:x}=D.useTable({columns:n,data:s,initialState:o,sortTypes:je,autoResetHiddenColumns:!1,disableSortRemove:!0},D.useGlobalFilter,D.useSortBy);return{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:u,state:j,setGlobalFilter:y,setHiddenColumns:x,columns:n}},K={client:{label:"CLIENT",title:"Connect server-side SDK or Unleash Proxy"},frontend:{label:"FRONTEND",title:"Connect web and mobile SDK"},admin:{label:"ADMIN",title:"Full access for managing Unleash"}},js=({token:s,project:t,permission:o,track:n})=>{const{setToastData:r}=q(),a=i=>{ge(i)&&(r({type:"success",title:"Token copied to clipboard"}),n&&typeof n=="function"&&n())};return e.jsx(z,{permission:o,projectId:t,tooltipProps:{title:"Copy token",arrow:!0},onClick:()=>a(s.secret),size:"large",children:e.jsx(ye,{})})},ze=h("ul")({marginBottom:0}),ys=({token:s,permission:t,onRemove:o,project:n})=>{const[r,a]=d.useState(!1),{setToastData:i,setToastApiError:m}=q(),u=async()=>{try{await o(),a(!1),i({type:"success",title:"API token removed"})}catch(j){m(fe(j))}};return e.jsxs(e.Fragment,{children:[e.jsx(z,{permission:t,projectId:n,tooltipProps:{title:"Delete token",arrow:!0},onClick:()=>a(!0),size:"large",children:e.jsx(be,{})}),e.jsx($,{open:r,onClick:u,onClose:()=>a(!1),title:"Confirm deletion",children:e.jsxs("div",{children:["Are you sure you want to delete the following API token?",e.jsx("br",{}),e.jsxs(ze,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"username"}),":"," ",e.jsx("code",{children:s.username})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"type"}),": ",e.jsx("code",{children:s.type})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"environment"}),":"," ",e.jsx("code",{children:s.environment})]})]})]})})]})},$e=h("div")(()=>({maxWidth:"400px"})),Ve=h("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),Xe=h(Ce)(({theme:s})=>({width:"100%",marginBottom:s.spacing(2)})),Je=h(Te)(({theme:s})=>({marginBottom:s.spacing(2),minWidth:"400px",[s.breakpoints.down("sm")]:{minWidth:"379px"}})),X=h("p")(({theme:s})=>({marginBottom:s.spacing(1)})),Qe=h("label")(({theme:s})=>({marginBottom:s.spacing(1)})),Ye=h(Ae)(({theme:s})=>({marginLeft:s.spacing(3)})),Ze=h(C)({marginTop:"auto",display:"flex",justifyContent:"flex-end"}),gs=({children:s,actions:t,handleSubmit:o,handleCancel:n})=>{var i;const{uiConfig:r}=v(),a=!!((i=r==null?void 0:r.flags)!=null&&i.UNLEASH_CLOUD);return e.jsxs(Ve,{onSubmit:o,children:[e.jsx(f,{condition:a,show:e.jsxs(R,{severity:"info",sx:{mb:4},children:["Please be aware of our"," ",e.jsx(G,{href:"https://www.getunleash.io/fair-use-policy",children:"fair use policy"}),"."]})}),s,e.jsxs(Ze,{children:[t,e.jsx(Ye,{onClick:n,children:"Cancel"})]})]})};var c=(s=>(s.ADMIN="ADMIN",s.CLIENT="CLIENT",s.FRONTEND="FRONTEND",s))(c||{});const bs=s=>{var _,O;const{environments:t}=V(),{uiConfig:o}=v(),n=(_=t==null?void 0:t.find(l=>l.enabled))==null?void 0:_.name,r=b(ke),a=b(H,s),i=[{key:c.CLIENT,label:`Server-side SDK (${c.CLIENT})`,title:"Connect server-side SDK or Unleash Proxy",enabled:r||a}],m=b(ve),u=b(Ee),j=b(H,s);s||i.push({key:c.ADMIN,label:c.ADMIN,title:"Full access for managing Unleash",enabled:m}),o.flags.embedProxyFrontend&&i.splice(1,0,{key:c.FRONTEND,label:`Client-side SDK (${c.FRONTEND})`,title:"Connect web and mobile SDK directly to Unleash",enabled:u||j});const y=(O=i.find(l=>l.enabled))==null?void 0:O.key,[x,p]=d.useState(""),[T,B]=d.useState(y||c.CLIENT),[g,E]=d.useState([s||"*"]),[J,Q]=d.useState(g),[F,A]=d.useState(),[L,S]=d.useState({});return d.useEffect(()=>{A(T==="ADMIN"?"*":n)},[T,n]),{username:x,type:T,apiTokenTypes:i,projects:g,environment:F,setUsername:p,setTokenType:l=>{l==="ADMIN"?(B(c.ADMIN),Q(g),E(["*"]),A("*")):(B(l),E(J),A(n))},setProjects:E,setEnvironment:A,getApiTokenPayload:()=>({username:x,type:T,environment:F,projects:g}),isValid:()=>{const l={};return x||(l.username="Username is required"),g.length===0&&(l.projects="At least one project is required"),S(l),Object.keys(l).length===0},clearErrors:l=>{if(l){const U={...L};delete U[l],S(U)}else S({})},errors:L}},fs=({open:s,setOpen:t,closeConfirm:o,token:n,type:r})=>e.jsxs($,{open:s,setOpen:t,onClick:o,primaryButtonText:"Close",title:"New token created",children:[e.jsx(w,{variant:"body1",children:"Your new token has been created successfully."}),e.jsx(Se,{token:n}),e.jsx(f,{condition:r===c.FRONTEND,show:e.jsxs(R,{sx:{mt:2},severity:"info",children:["By default, all ",c.FRONTEND," tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the"," ",e.jsx(W,{to:"/admin/cors",target:"_blank",rel:"noreferrer",children:"CORS origins configuration page"}),"."]})})]}),Cs=({username:s,setUsername:t,errors:o,clearErrors:n})=>e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"What would you like to call this token?"}),e.jsx(Xe,{value:s,name:"username",onChange:r=>t(r.target.value),label:"Token name",error:o.username!==void 0,errorText:o.username,onFocus:()=>n("username"),autoFocus:!0})]}),Ts=({type:s,setType:t,apiTokenTypes:o})=>e.jsx($e,{children:e.jsxs(Ie,{sx:{mb:2,width:"100%"},children:[e.jsx(Qe,{id:"token-type",children:"What do you want to connect?"}),e.jsx(Ne,{"aria-labelledby":"token-type",defaultValue:"CLIENT",name:"radio-buttons-group",value:s,onChange:(n,r)=>t(r),children:o.map(({key:n,label:r,title:a,enabled:i})=>e.jsx(De,{value:n,sx:{mb:1},disabled:!i,control:e.jsx(we,{sx:{ml:.75,alignSelf:"flex-start"}}),label:e.jsx(C,{children:e.jsxs(C,{children:[e.jsx(w,{children:r}),e.jsx(w,{variant:"body2",color:"text.secondary",children:a})]})})},n))})]})}),As=({type:s,environment:t,setEnvironment:o})=>{const{environments:n}=V(),r=s===c.ADMIN?[{key:"*",label:"ALL"}]:n.map(a=>({key:a.name,label:`${a.name.concat(a.enabled?"":" - deprecated")}`,title:a.name,disabled:!1}));return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"Which environment should the token have access to?"}),e.jsx(Je,{disabled:s===c.ADMIN,options:r,value:t,onChange:o,label:"Environment",id:"api_key_environment",name:"environment",IconComponent:Re,fullWidth:!0})]})},es=s=>s.map(t=>({...t.user,joinedAt:new Date(t.joinedAt),createdBy:t.createdBy})),ks=s=>{const{data:t,error:o,mutate:n}=Pe(Be(`api/admin/groups/${s}`),ss);return d.useMemo(()=>({group:t&&{...t,users:es((t==null?void 0:t.users)??[])},loading:!o&&!t,refetchGroup:()=>n(),error:o}),[t,o,n])},ss=s=>fetch(s).then(Fe("Group")).then(t=>t.json());var P={},ts=_e;Object.defineProperty(P,"__esModule",{value:!0});var ns=P.default=void 0,os=ts(Le()),rs=e,as=(0,os.default)((0,rs.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ns=P.default=as;const is=h("div")(({theme:s})=>({display:"flex",flexDirection:"column",gap:s.spacing(.5),"& > *:not(:last-child)":{borderBottom:`1px solid ${s.palette.divider}`,paddingBottom:s.spacing(1)}})),vs=({role:s,roles:t,value:o})=>{const{isEnterprise:n}=v();if(n()){const r=t||[s];return e.jsx(k,{children:e.jsx(Oe,{tooltip:e.jsx(is,{children:r.map(a=>e.jsx(Ue,{roleId:a,tooltip:!0},a))}),children:o})})}return e.jsx(k,{children:o})};export{ps as A,xs as C,As as E,ys as R,X as S,c as T,js as a,bs as b,gs as c,Cs as d,Ts as e,fs as f,ks as g,ns as h,vs as i,es as m,ms as u};
|
|
1
|
+
import{c as Y,j as e,ax as v,J as R,ac as Z,cA as ee,af as se,C as f,B as C,aq as te,dv as ne,a6 as oe,a7 as re,a8 as ae,a9 as ie,ap as M,c4 as G,ay as le,dG as ce,c9 as de,gL as ue,s as h,aK as W,dX as he,ab as k,dY as I,r as d,aa as pe,ae as N,dq as xe,dO as me,a3 as D,a4 as je,e as q,aI as z,cP as ye,cU as ge,bX as be,b7 as $,g as fe,v as Ce,bU as Te,h as Ae,ar as V,gM as b,d9 as ke,gf as H,d7 as ve,d8 as Ee,T as w,ei as Se,F as Ie,ek as Ne,dg as De,el as we,gb as Re,aN as Pe,aO as Be,aP as Fe,ba as Le,bb as _e,bq as Oe,dI as Ue}from"./index-JVRlSBvr.js";const Me=Y(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Key"),He=()=>{const{uiConfig:s}=v();return e.jsxs(R,{severity:"info",children:[e.jsxs("p",{children:["Read the"," ",e.jsx("a",{href:"https://docs.getunleash.io/reference/sdks",target:"_blank",rel:"noreferrer",children:"SDK overview"})," ","to connect Unleash to your application. Please note it can take up to ",e.jsx("strong",{children:"1 minute"})," before a new API key is activated."]}),e.jsx("br",{}),e.jsx("strong",{children:"API URL: "})," ",e.jsxs("pre",{style:{display:"inline"},children:[s.unleashUrl,"/api/"]})]})},Ke=["Icon","createdAt"],Ge=["Icon","project","seenAt"],ps=({compact:s=!1,setHiddenColumns:t,columns:o,loading:n,rows:r,getTableProps:a,getTableBodyProps:i,headerGroups:m,globalFilter:u,prepareRow:j})=>{const y=Z(ee.breakpoints.down("md"));return se([{condition:y,columns:Ke},{condition:s,columns:Ge}],t,o),e.jsxs(e.Fragment,{children:[e.jsx(f,{condition:r.length>0,show:e.jsx(C,{sx:{mb:4},children:e.jsx(He,{})})}),e.jsx(C,{sx:{overflowX:"auto"},children:e.jsx(te,{value:u,children:e.jsxs(ne,{...a(),children:[e.jsx(oe,{headerGroups:m}),e.jsx(re,{...i(),children:r.map(x=>(j(x),e.jsx(ae,{hover:!0,...x.getRowProps(),children:x.cells.map(p=>e.jsx(ie,{...p.getCellProps(),children:p.render("Cell")}))})))})]})})}),e.jsx(f,{condition:r.length===0&&!n,show:e.jsx(f,{condition:(u==null?void 0:u.length)>0,show:e.jsxs(M,{children:["No tokens found matching “",u,"”"]}),elseShow:e.jsx(M,{children:e.jsxs("span",{children:["No tokens available. Read ",e.jsx(G,{href:"https://docs.getunleash.io/how-to/api",target:"_blank",rel:"noreferrer",children:"API How-to guides"})," "," to learn more."]})})})})]})},xs=({path:s,permission:t,project:o})=>{const n=le();return e.jsx(ce,{Icon:de,onClick:()=>n(s),"data-testid":ue,permission:t,projectId:o,maxWidth:"700px",children:"New API token"})},We=h(W)(({theme:s})=>({textDecoration:"none",color:s.palette.links,"&:hover, &:focus":{textDecoration:"underline"}})),qe=({projects:s,project:t})=>{const{searchQuery:o}=he(),n=s&&Array.isArray(s)?s:t?[t]:[];return n.length===0?e.jsx(k,{children:e.jsx(I,{search:o,children:"*"})}):e.jsx(k,{children:n.map((r,a)=>e.jsxs(d.Fragment,{children:[a>0&&", ",!r||r==="*"?e.jsx(I,{search:o,children:"*"}):e.jsx(We,{to:`/projects/${r}`,children:e.jsx(I,{search:o,children:r})})]},r))})},ms=(s,t)=>{const o=d.useMemo(()=>({sortBy:[{id:"createdAt",desc:!0}]}),[]),n=d.useMemo(()=>[{id:"Icon",width:"1%",Cell:()=>e.jsx(pe,{icon:e.jsx(Me,{color:"disabled"})}),disableSortBy:!0,disableGlobalFilter:!0},{Header:"Username",accessor:"username",Cell:N},{Header:"Type",accessor:"type",Cell:({value:p})=>e.jsx(N,{value:K[p.toLowerCase()].label,subtitle:K[p.toLowerCase()].title}),minWidth:280},{Header:"Project",accessor:"project",Cell:p=>e.jsx(qe,{project:p.row.original.project,projects:p.row.original.projects}),minWidth:120},{Header:"Environment",accessor:"environment",Cell:N,minWidth:120},{Header:"Created",accessor:"createdAt",Cell:xe,minWidth:150,disableGlobalFilter:!0},{Header:"Last seen",accessor:"seenAt",Cell:me,minWidth:150,disableGlobalFilter:!0},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:t}],[]),{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:u,state:j,setGlobalFilter:y,setHiddenColumns:x}=D.useTable({columns:n,data:s,initialState:o,sortTypes:je,autoResetHiddenColumns:!1,disableSortRemove:!0},D.useGlobalFilter,D.useSortBy);return{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:u,state:j,setGlobalFilter:y,setHiddenColumns:x,columns:n}},K={client:{label:"CLIENT",title:"Connect server-side SDK or Unleash Proxy"},frontend:{label:"FRONTEND",title:"Connect web and mobile SDK"},admin:{label:"ADMIN",title:"Full access for managing Unleash"}},js=({token:s,project:t,permission:o,track:n})=>{const{setToastData:r}=q(),a=i=>{ge(i)&&(r({type:"success",title:"Token copied to clipboard"}),n&&typeof n=="function"&&n())};return e.jsx(z,{permission:o,projectId:t,tooltipProps:{title:"Copy token",arrow:!0},onClick:()=>a(s.secret),size:"large",children:e.jsx(ye,{})})},ze=h("ul")({marginBottom:0}),ys=({token:s,permission:t,onRemove:o,project:n})=>{const[r,a]=d.useState(!1),{setToastData:i,setToastApiError:m}=q(),u=async()=>{try{await o(),a(!1),i({type:"success",title:"API token removed"})}catch(j){m(fe(j))}};return e.jsxs(e.Fragment,{children:[e.jsx(z,{permission:t,projectId:n,tooltipProps:{title:"Delete token",arrow:!0},onClick:()=>a(!0),size:"large",children:e.jsx(be,{})}),e.jsx($,{open:r,onClick:u,onClose:()=>a(!1),title:"Confirm deletion",children:e.jsxs("div",{children:["Are you sure you want to delete the following API token?",e.jsx("br",{}),e.jsxs(ze,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"username"}),":"," ",e.jsx("code",{children:s.username})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"type"}),": ",e.jsx("code",{children:s.type})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"environment"}),":"," ",e.jsx("code",{children:s.environment})]})]})]})})]})},$e=h("div")(()=>({maxWidth:"400px"})),Ve=h("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),Xe=h(Ce)(({theme:s})=>({width:"100%",marginBottom:s.spacing(2)})),Je=h(Te)(({theme:s})=>({marginBottom:s.spacing(2),minWidth:"400px",[s.breakpoints.down("sm")]:{minWidth:"379px"}})),X=h("p")(({theme:s})=>({marginBottom:s.spacing(1)})),Qe=h("label")(({theme:s})=>({marginBottom:s.spacing(1)})),Ye=h(Ae)(({theme:s})=>({marginLeft:s.spacing(3)})),Ze=h(C)({marginTop:"auto",display:"flex",justifyContent:"flex-end"}),gs=({children:s,actions:t,handleSubmit:o,handleCancel:n})=>{var i;const{uiConfig:r}=v(),a=!!((i=r==null?void 0:r.flags)!=null&&i.UNLEASH_CLOUD);return e.jsxs(Ve,{onSubmit:o,children:[e.jsx(f,{condition:a,show:e.jsxs(R,{severity:"info",sx:{mb:4},children:["Please be aware of our"," ",e.jsx(G,{href:"https://www.getunleash.io/fair-use-policy",children:"fair use policy"}),"."]})}),s,e.jsxs(Ze,{children:[t,e.jsx(Ye,{onClick:n,children:"Cancel"})]})]})};var c=(s=>(s.ADMIN="ADMIN",s.CLIENT="CLIENT",s.FRONTEND="FRONTEND",s))(c||{});const bs=s=>{var _,O;const{environments:t}=V(),{uiConfig:o}=v(),n=(_=t==null?void 0:t.find(l=>l.enabled))==null?void 0:_.name,r=b(ke),a=b(H,s),i=[{key:c.CLIENT,label:`Server-side SDK (${c.CLIENT})`,title:"Connect server-side SDK or Unleash Proxy",enabled:r||a}],m=b(ve),u=b(Ee),j=b(H,s);s||i.push({key:c.ADMIN,label:c.ADMIN,title:"Full access for managing Unleash",enabled:m}),o.flags.embedProxyFrontend&&i.splice(1,0,{key:c.FRONTEND,label:`Client-side SDK (${c.FRONTEND})`,title:"Connect web and mobile SDK directly to Unleash",enabled:u||j});const y=(O=i.find(l=>l.enabled))==null?void 0:O.key,[x,p]=d.useState(""),[T,B]=d.useState(y||c.CLIENT),[g,E]=d.useState([s||"*"]),[J,Q]=d.useState(g),[F,A]=d.useState(),[L,S]=d.useState({});return d.useEffect(()=>{A(T==="ADMIN"?"*":n)},[T,n]),{username:x,type:T,apiTokenTypes:i,projects:g,environment:F,setUsername:p,setTokenType:l=>{l==="ADMIN"?(B(c.ADMIN),Q(g),E(["*"]),A("*")):(B(l),E(J),A(n))},setProjects:E,setEnvironment:A,getApiTokenPayload:()=>({username:x,type:T,environment:F,projects:g}),isValid:()=>{const l={};return x||(l.username="Username is required"),g.length===0&&(l.projects="At least one project is required"),S(l),Object.keys(l).length===0},clearErrors:l=>{if(l){const U={...L};delete U[l],S(U)}else S({})},errors:L}},fs=({open:s,setOpen:t,closeConfirm:o,token:n,type:r})=>e.jsxs($,{open:s,setOpen:t,onClick:o,primaryButtonText:"Close",title:"New token created",children:[e.jsx(w,{variant:"body1",children:"Your new token has been created successfully."}),e.jsx(Se,{token:n}),e.jsx(f,{condition:r===c.FRONTEND,show:e.jsxs(R,{sx:{mt:2},severity:"info",children:["By default, all ",c.FRONTEND," tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the"," ",e.jsx(W,{to:"/admin/cors",target:"_blank",rel:"noreferrer",children:"CORS origins configuration page"}),"."]})})]}),Cs=({username:s,setUsername:t,errors:o,clearErrors:n})=>e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"What would you like to call this token?"}),e.jsx(Xe,{value:s,name:"username",onChange:r=>t(r.target.value),label:"Token name",error:o.username!==void 0,errorText:o.username,onFocus:()=>n("username"),autoFocus:!0})]}),Ts=({type:s,setType:t,apiTokenTypes:o})=>e.jsx($e,{children:e.jsxs(Ie,{sx:{mb:2,width:"100%"},children:[e.jsx(Qe,{id:"token-type",children:"What do you want to connect?"}),e.jsx(Ne,{"aria-labelledby":"token-type",defaultValue:"CLIENT",name:"radio-buttons-group",value:s,onChange:(n,r)=>t(r),children:o.map(({key:n,label:r,title:a,enabled:i})=>e.jsx(De,{value:n,sx:{mb:1},disabled:!i,control:e.jsx(we,{sx:{ml:.75,alignSelf:"flex-start"}}),label:e.jsx(C,{children:e.jsxs(C,{children:[e.jsx(w,{children:r}),e.jsx(w,{variant:"body2",color:"text.secondary",children:a})]})})},n))})]})}),As=({type:s,environment:t,setEnvironment:o})=>{const{environments:n}=V(),r=s===c.ADMIN?[{key:"*",label:"ALL"}]:n.map(a=>({key:a.name,label:`${a.name.concat(a.enabled?"":" - deprecated")}`,title:a.name,disabled:!1}));return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"Which environment should the token have access to?"}),e.jsx(Je,{disabled:s===c.ADMIN,options:r,value:t,onChange:o,label:"Environment",id:"api_key_environment",name:"environment",IconComponent:Re,fullWidth:!0})]})},es=s=>s.map(t=>({...t.user,joinedAt:new Date(t.joinedAt),createdBy:t.createdBy})),ks=s=>{const{data:t,error:o,mutate:n}=Pe(Be(`api/admin/groups/${s}`),ss);return d.useMemo(()=>({group:t&&{...t,users:es((t==null?void 0:t.users)??[])},loading:!o&&!t,refetchGroup:()=>n(),error:o}),[t,o,n])},ss=s=>fetch(s).then(Fe("Group")).then(t=>t.json());var P={},ts=_e;Object.defineProperty(P,"__esModule",{value:!0});var ns=P.default=void 0,os=ts(Le()),rs=e,as=(0,os.default)((0,rs.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ns=P.default=as;const is=h("div")(({theme:s})=>({display:"flex",flexDirection:"column",gap:s.spacing(.5),"& > *:not(:last-child)":{borderBottom:`1px solid ${s.palette.divider}`,paddingBottom:s.spacing(1)}})),vs=({role:s,roles:t,value:o})=>{const{isEnterprise:n}=v();if(n()){const r=t||[s];return e.jsx(k,{children:e.jsx(Oe,{tooltip:e.jsx(is,{children:r.map(a=>e.jsx(Ue,{roleId:a,tooltip:!0},a))}),children:o})})}return e.jsx(k,{children:o})};export{ps as A,xs as C,As as E,ys as R,X as S,c as T,js as a,bs as b,gs as c,Cs as d,Ts as e,fs as f,ks as g,ns as h,vs as i,es as m,ms as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as d,x as u,B as a,bE as f,j as n,C as s,gK as h,R as S,aX as c,G as m,aK as v}from"./index-
|
|
1
|
+
import{s as d,x as u,B as a,bE as f,j as n,C as s,gK as h,R as S,aX as c,G as m,aK as v}from"./index-JVRlSBvr.js";const k=d(u)({padding:0,cursor:"inherit",transition:"color 0.2s ease-in-out"}),y=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,color:i.palette.text.secondary,position:"absolute",display:"none",right:"calc(100% + 6px)",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),B=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,fontWeight:"normal",color:i.palette.text.secondary,display:"none",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),I=d("div")(({theme:i})=>({fontWeight:"normal",display:"none",[i.breakpoints.up("md")]:{display:"block"}})),w=d("div")({flexDirection:"column",justifyContent:"center",verticalAlign:"middle"}),C=d(a,{shouldForwardProp:i=>i!=="disabled"})(({theme:i,disabled:o})=>({borderRadius:i.shape.borderRadiusMedium,border:`1px solid ${i.palette.divider}`,"& + &":{marginTop:i.spacing(2)},background:o?i.palette.envAccordion.disabled:i.palette.background.paper})),L=d("div",{shouldForwardProp:i=>i!=="draggable"&&i!=="disabled"})(({theme:i,draggable:o,disabled:l})=>({padding:i.spacing(.5,2),display:"flex",gap:i.spacing(1),alignItems:"center",borderBottom:`1px solid ${i.palette.divider}`,fontWeight:i.typography.fontWeightMedium,paddingLeft:o?i.spacing(1):i.spacing(2),color:l?i.palette.text.secondary:i.palette.text.primary})),z=({strategy:i,onDragStart:o,onDragEnd:l,actions:p,children:x,orderNumber:t,style:b={},description:r})=>{const g=f(i.name),j="links"in i?({children:e})=>n.jsx(v,{to:i.links.edit,children:e}):({children:e})=>n.jsxs(n.Fragment,{children:[" ",e," "]});return n.jsxs(a,{sx:{position:"relative"},children:[n.jsx(s,{condition:t!==void 0,show:n.jsx(y,{children:t})}),n.jsxs(C,{disabled:(i==null?void 0:i.disabled)||!1,style:b,children:[n.jsxs(L,{draggable:!!o,disabled:!!(i!=null&&i.disabled),children:[n.jsx(s,{condition:!!o,show:()=>n.jsx(k,{draggable:!0,disableRipple:!0,size:"small",onDragStart:o,onDragEnd:l,sx:{cursor:"move"},children:n.jsx(h,{titleAccess:"Drag to reorder",cursor:"grab",sx:{color:"action.active"}})})}),n.jsx(g,{sx:{fill:e=>e.palette.action.disabled}}),n.jsxs(w,{children:[n.jsxs(j,{children:[n.jsx(S,{maxWidth:"400",maxLength:15,text:c(String(i.name))}),n.jsx(s,{condition:!!i.title,show:n.jsx(I,{children:c(String(i.title))})})]}),n.jsx(s,{condition:!!r,show:n.jsx(B,{children:r})})]}),n.jsx(s,{condition:!!(i!=null&&i.disabled),show:()=>n.jsx(n.Fragment,{children:n.jsx(m,{color:"disabled",children:"Disabled"})})}),n.jsx(a,{sx:{marginLeft:"auto",display:"flex",minHeight:e=>e.spacing(6),alignItems:"center"},children:p})]}),n.jsx(a,{sx:{p:2,justifyItems:"center"},children:x})]})]})};export{z as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eL as yt,gY as Ks,eN as Qn,gZ as Mt,r as rt,cB as qs,g_ as Jn,c0 as to,g$ as eo,h0 as io,h1 as so,h2 as no,eM as oo,h3 as ro,h4 as ao,h5 as lo,h6 as co,h7 as ho,h8 as uo,h9 as fo,ha as go,fB as po,hb as mo,hc as bo,hd as _o,he as xo,hf as yo,hg as Mo,hh as Bi,hi as vo,hj as ko,hk as wo,hl as So,hm as Po,hn as Co}from"./index-
|
|
1
|
+
import{eL as yt,gY as Ks,eN as Qn,gZ as Mt,r as rt,cB as qs,g_ as Jn,c0 as to,g$ as eo,h0 as io,h1 as so,h2 as no,eM as oo,h3 as ro,h4 as ao,h5 as lo,h6 as co,h7 as ho,h8 as uo,h9 as fo,ha as go,fB as po,hb as mo,hc as bo,hd as _o,he as xo,hf as yo,hg as Mo,hh as Bi,hi as vo,hj as ko,hk as wo,hl as So,hm as Po,hn as Co}from"./index-JVRlSBvr.js";function Oo(i,t){yt(2,arguments);var e=Qn(t),s=e*3;return Ks(i,s)}function Do(i){yt(1,arguments);var t=Mt(i);return t.setSeconds(0,0),t}function Ao(i){yt(1,arguments);var t=Mt(i),e=t.getMonth(),s=e-e%3;return t.setMonth(s,1),t.setHours(0,0,0,0),t}function Lo(i){yt(1,arguments);var t=Mt(i);return t.setMinutes(59,59,999),t}function To(i){yt(1,arguments);var t=Mt(i);return t.setSeconds(59,999),t}function Ro(i){yt(1,arguments);var t=Mt(i),e=t.getMonth(),s=e-e%3+3;return t.setMonth(s,0),t.setHours(23,59,59,999),t}function Eo(i){yt(1,arguments);var t=Mt(i);return t.setMilliseconds(999),t}function Io(i){yt(1,arguments);var t=Mt(i);return t.setMilliseconds(0),t}/*!
|
|
2
2
|
* Chart.js v3.9.1
|
|
3
3
|
* https://www.chartjs.org
|
|
4
4
|
* (c) 2022 Chart.js Contributors
|