text: (this["webpackJsonpwave-ui"]=this["webpackJsonpwave-ui"]||[]).push([[0],{432:function(e,t,a){e.exports=a(594)},592:function(e,t,a){},594:function(e,t,a){"use strict";a.r(t);var n,r=a(12),i=a(665),o=a(0),l=a.n(o),c=a(96),s=a.n(c),u=a(685),d=a(13),m=a(20),f=a(7),v=a(27),p=a(8),g=a(684),h=a(668);!function(e){e[e.None=0]="None",e[e.Pick=1]="Pick",e[e.Add=2]="Add",e[e.Edit=3]="Edit",e[e.Delete=4]="Delete"}(n||(n={}));var b={t:n.None},y={t:n.Pick},x=Object(p.box)(b),E=[{name:"Sidebar on Left",layout:{name:"hsbf",breakpoint:"xs",min_height:"512px",zones:[{name:"Header"},{name:"Main",direction:"row",zones:[{name:"Sidebar",size:"256px"},{name:"Body"}]},{name:"Footer"}]}},{name:"Sidebar on Right",layout:{name:"hbsf",breakpoint:"xs",min_height:"512px",zones:[{name:"Header"},{name:"Main",direction:"row",zones:[{name:"Body"},{name:"Sidebar",size:"256px"}]},{name:"Footer"}]}},{name:"No Sidebar",layout:{name:"hbf",breakpoint:"xs",min_height:"512px",zones:[{name:"Header"},{name:"Body"},{name:"Footer"}]}},{name:"Body Only",layout:{name:"b",breakpoint:"xs",zones:[{name:"Body"}]}}],w=E[0],k=a(5),_=a(10),O=a(11),j=a(79),N=a(14),C=a(15);function S(e){return function(t){Object(N.a)(n,t);var a=Object(C.a)(n);function n(t){var r;Object(_.a)(this,n),(r=a.call(this,t)).model=void 0,r.arrows=void 0;var i=Object(j.a)(r),o=e(t),l=[];return Object.keys(o).forEach((function(e){if("render"!==e&&"dispose"!==e&&"init"!==e&&"update"!==e){var t=o[e];Object(p.boxed)(t)&&l.push(Object(p.on)(t,(function(e){return i.setState({})})))}})),r.model=o,r.arrows=l,r.state={},r}return Object(O.a)(n,[{key:"componentDidMount",value:function(){this.model.init&&this.model.init()}},{key:"componentDidUpdate",value:function(){this.model.update&&this.model.update()}},{key:"componentWillUnmount",value:function(){this.model.dispose&&this.model.dispose();var e,t=Object(k.a)(this.arrows);try{for(t.s();!(e=t.n()).done;){e.value.dispose()}}catch(a){t.e(a)}finally{t.f()}}},{key:"render",value:function(){return this.model.render()}}]),n}(o.Component)}var z=null,D={},L=Object(p.box)(null),B=Object(p.box)({}),T=Object(p.box)(!1),R={username:"",editable:!1},P=function(e,t){t.startsWith("#")?window.location.hash=t.substr(1):(e?A.args[e]=t:A.args[t]=!0,A.push())},$=function(e,t){var a=null;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];a&&window.clearTimeout(a),a=window.setTimeout((function(){t.apply(void 0,r),a=null}),e)}},A={args:D,debounce:$,throttle:function(e,t){var a=!1;return function(){a||(t.apply(void 0,arguments),a=!0,window.setTimeout((function(){a=!1}),e))}},push:function(e){if(z){if(e)return z.push(e),void T(!0);var t=Object(v.a)({},D);!function(e){for(var t in e)delete e[t]}(D),z.push(t),T(!0),B(t)}},fork:function(){if(!z)throw new Error("not initialized");return z.fork()},emit:function(e,t,a){var n,r={},i={};r[t]=a,i[e]=r,null===(n=z)||void 0===n||n.push({"":i})}};window.wave=A;var I=Object(d.a)({menu:{position:"absolute",top:0,right:0,$nest:{">div:first-child":{width:32,height:32,padding:8}}},icon:{userSelect:"none"},target:{boxSizing:"border-box",cursor:"pointer",opacity:.5,$nest:{"&:hover":{opacity:1}}}}),W=function e(t){return{key:t.name,text:t.label||t.name||"Untitled",iconProps:t.icon?{iconName:t.icon}:void 0,title:t.caption||void 0,subMenuProps:t.items?{items:t.items.map(e)}:void 0,onClick:function(){var e,a,r;"__edit__"!==t.name?"__delete__"!==t.name?t.name.startsWith("#")?window.location.hash=t.name.substr(1):(A.args[t.name]=null===(e=null!==(a=t.value)&&void 0!==a?a:t.data)||void 0===e||e,A.push()):t.value&&function(e){x({t:n.Delete,name:e})}(t.value):t.value&&(r=t.value,x({t:n.Edit,name:r}))}}},F=S((function(e){var t=e.commands,a=e.name,n=e.changedB,r=e.canEdit,i=o.createRef(),l=Object(p.box)(!0),c=function(){return l(!1)},s=function(){return l(!0)};return{render:function(){var e=null!==t&&void 0!==t?t:[];r&&e.push({name:"__edit__",label:"Edit this card",icon:"Edit",value:a},{name:"__delete__",label:"Delete this card",icon:"Delete",value:a});var n=l(),u=e.map(W);return u.length?o.createElement("div",{className:I.menu,"data-test":a},o.createElement("div",{className:I.target,ref:i,onClick:c},o.createElement(g.a,{className:I.icon,iconName:"MoreVertical"})),o.createElement(h.a,{target:i,items:u,hidden:n,onItemClick:s,onDismiss:s})):o.createElement(o.Fragment,null)},changedB:n,hiddenB:l}})),M=a(156),H=a.n(M),U=a(52),q=a(671),G=Object(U.c)(),V=Object(q.a)({locale:navigator.language,messages:{},onError:function(){}},G),J=function(e){return/^\w+$/.test(e)};H.a.registerHelper("intl",(function(e,t){var a=t.hash,n=(a=function(e){var t,a={};for(var n in e){var r=e[n];a[(t=n,t.replace(/(_\w)/g,(function(e){return e[1].toUpperCase()})))]="true"===r||"false"!==r&&(/^\d+$/.test(r)?parseInt(r,10):r)}return a}(a)).type;return"date"===n?V.formatDate(e,a):"time"===n?V.formatTime(e,a):"number"===n||"number"===typeof e?V.formatNumber(e,a):e}));var K,X=function(e){return"string"===typeof e&&e.length>1&&"="===e.charAt(0)&&"="!==e.charAt(1)},Q=function(e){if(!X(e))return null;if(e=e.substr(1),J(e))return[e,void 0];var t=e.match(/\{\{\s*(\w+)\s+(\S+)/);if(t)return[t[2],Y(e)];var a=e.match(/\{\{\s*(\S+)/);return a?[a[1],void 0]:null},Y=function(e){return H.a.compile(e)},Z=function(e,t){J(e)&&(e="{{"+e+"}}");var a=Y(e);return a?a(t):e},ee=function(e){return"".concat(e,"px")},te=function(e){return"".concat(e,"%")},ae=function(e){return"".concat(e,"rem")},ne=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.join(" ")},re=function(e,t){return"".concat(e,"px solid ").concat(t)},ie=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.map(ee).join(" ")},oe=ie,le=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e?{}:{display:"none"}},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$gray";return e.startsWith("$")?"var(--".concat(e.substr(1),", var(--gray))"):e},se=function(e){return e.startsWith("$")?(e=e.substring(1),getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)).trim()):e},ue={amber:"#ffc107",azure:"#03a9f4",black:"#000",blue:"#2196f3",brown:"#795548",cyan:"#00bcd4",gray:"#9e9e9e",green:"#8bc34a",indigo:"#3f51b5",lime:"#cddc39",mint:"#4caf50",orange:"#ff9800",pink:"#e91e63",purple:"#9c27b0",red:"#f44336",tangerine:"#ff5722",teal:"#009688",violet:"#673ab7",white:"#fff",yellow:"#ffeb3b"},de={default:{palette:{text:"#323130",card:"#ffffff",page:"#f5f5f5"},fluentPalette:{themePrimary:"#000000",themeLighterAlt:"#898989",themeLighter:"#737373",themeLight:"#595959",themeTertiary:"#373737",themeSecondary:"#2f2f2f",themeDarkAlt:"#252525",themeDark:"#151515",themeDarker:"#0b0b0b",neutralLighterAlt:"#faf9f8",neutralLighter:"#f3f2f1",neutralLight:"#edebe9",neutralQuaternaryAlt:"#e1dfdd",neutralQuaternary:"#d0d0d0",neutralTertiaryAlt:"#c8c6c4",neutralTertiary:"#a19f9d",neutralSecondary:"#605e5c",neutralPrimaryAlt:"#3b3a39",neutralPrimary:"#323130",neutralDark:"#201f1e",black:"#000000",white:"#ffffff"}},dark:{palette:{text:"#ffffff",card:"#21252b",page:"#282c34"},fluentPalette:{}},neon:{palette:{text:"#ffffff",card:"#0d0e0f",page:"#1b1d1f"},fluentPalette:{themePrimary:"#cddc39",themeLighterAlt:"#080902",themeLighter:"#202309",themeLight:"#3d4211",themeTertiary:"#7a8422",themeSecondary:"#b3c132",themeDarkAlt:"#d0df4a",themeDark:"#d7e464",themeDarker:"#e1eb8a",neutralLighterAlt:"#1a1c1e",neutralLighter:"#191b1d",neutralLight:"#181a1c",neutralQuaternaryAlt:"#17181a",neutralQuaternary:"#161719",neutralTertiaryAlt:"#151618",neutralTertiary:"#c8c8c8",neutralSecondary:"#d0d0d0",neutralPrimaryAlt:"#dadada",neutralPrimary:"#ffffff",neutralDark:"#f4f4f4",black:"#f8f8f8",white:"#1b1d1f"}}},me=Object(p.box)("default"),fe=de.default;Object(p.on)(me,(function(e){var t,a=null!==(t=de[e])&&void 0!==t?t:de.default,n=a.palette,i=a.fluentPalette;if(Object.keys(n).forEach((function(e){return document.body.style.setProperty("--".concat(e),n[e])})),Object.keys(i).forEach((function(e){return document.body.style.setProperty("--".concat(e),i[e])})),n.text)for(var o=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]}(n.text),l=Object(m.a)(o,3),c=l[0],s=l[1],u=l[2],d=.05,f=0;f<10;f++)document.body.style.setProperty("--text".concat(f),"rgba(".concat(c,",").concat(s,",").concat(u,",").concat(d,")")),d+=0===f?.05:.1;r.E({palette:i})})),function(e){e[e.Transparent=0]="Transparent",e[e.Normal=1]="Normal",e[e.Raised=2]="Raised",e[e.Flat=3]="Flat"}(K||(K={}));var ve={effect:K.Normal},pe=function(){var e={};return{register:function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve;return e[t]={ctor:a,style:n}},lookup:function(t){return e[t]||e[""]}}}(),ge=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return void 0!==e&&null!==e?X(e)?Z(e.substr(1),t):e:void 0!==a&&null!==a?a:null},he=function(e){var t=e.data,a=e.defaultValue,n=e.format,r=e.className,i=ge(n,t,a);return null==i?null:r?l.a.createElement("div",{className:r},i):l.a.createElement(l.a.Fragment,null,i)},be=function(e){var t=e.card,a=pe.lookup(t.state.view).ctor;return l.a.createElement(a,t)},ye=function(e){var t=e.view,a=e.props,n=e.data,r=Object(p.unpack)(n).map((function(e,n){var r={name:Object(p.xid)(),state:Object(v.a)(Object(v.a)({},Object(p.unpack)(a)),{},{view:t,data:e}),changed:Object(p.box)()};return l.a.createElement(be,{key:n,card:r})}));return l.a.createElement(l.a.Fragment,null,r)},xe={left:0,top:0,width:0,height:0},Ee=function(e,t,a,n,r){var i=1,o=e*a+r*(a+1),l=t*n+r*(n+1);return{width:o,height:l,innerWidth:o-2*r,innerHeight:l-2*r,unitWidth:e,unitHeight:t,unitInnerWidth:e-2*r,unitInnerHeight:t-2*r,gap:r,place:function(a){if(!a)return xe;var n=function(e){var t=e.trim().split(/\s+/g);switch(t.length){case 1:return["1","1",e,e];case 2:return["1","1"].concat(Object(f.a)(t));case 3:return[].concat(Object(f.a)(t),[t[2]]);case 4:return t;default:return t.slice(0,4)}}(a).map(p.parseI),i=Object(m.a)(n,4),o=i[0],l=i[1],c=i[2],s=i[3];return isNaN(o)||isNaN(l)||isNaN(c)||isNaN(s)?xe:function(a,n,i,o){var l={left:a*(e+r),top:n*(t+r)};return i>0?l.width=i*e+(i-1)*r:l.right=-(i+1)*(e+r),o>0?l.height=o*t+(o-1)*r:l.bottom=-(o+1)*(t+r),l}(o-1,l-1,c,s)},scale:i,rescale:function(){var e=[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight],t=Object(m.a)(e,2),a=t[0],n=t[1];return i=Math.min(a/o,n/l)},inset:{position:"absolute",left:r,top:r,right:r,bottom:r,overflow:"auto"}}}(134,76,12,10,15),we=Object(d.a)({grid:{position:"relative",boxSizing:"border-box",width:Ee.innerWidth,margin:oe(Ee.gap)},slot:{boxSizing:"border-box",transition:"box-shadow 0.3s cubic-bezier(.25,.8,.25,1)",overflow:"auto",display:"flex",flexDirection:"column",$nest:{">*:first-child":{boxSizing:"border-box",flexGrow:1}}},normal:{backgroundColor:ce("$card"),boxShadow:"0px 3px 5px ".concat(ce("$text0")),$nest:{"&:hover":{boxShadow:"0px 12px 20px ".concat(ce("$text2"))}}},raised:{color:ce("$card"),backgroundColor:ce("$themePrimary"),boxShadow:"0px 3px 7px ".concat(ce("$text3"))},flat:{backgroundColor:ce("$card"),boxShadow:"0px 3px 5px ".concat(ce("$text0"))}}),ke=function(e){var t=_e(e).effect;return ne(we.slot,t===K.Normal?we.normal:t===K.Raised?we.raised:t==K.Flat?we.flat:"")},_e=function(e){return pe.lookup(e.state.view).style},Oe=function(e){var t=e.name,a=e.cards,n=!!a.find((function(e){return"editor"===e.state.view})),r=a.map((function(e){var t=Ee.place(e.state.box),a=t.left,r=t.top,i=t.right,o=t.bottom,c=t.width,s=t.height,u=t===xe?"editor"===e.state.view?void 0:"none":void 0,d="__unhandled_error__"===e.name?1:"initial";return l.a.createElement("div",{key:e.id,className:ke(e),style:{display:u,position:"absolute",left:a,top:r,right:i,bottom:o,width:c,height:s,zIndex:d}},l.a.createElement(be,{card:e}),l.a.createElement(F,{name:e.name,commands:e.state.commands,changedB:e.changed,canEdit:n}))}));return l.a.createElement("div",{"data-test":t,className:we.grid},r)},je=Object(d.a)({card:{display:"flex",flexDirection:"column",justifyContent:"center"}}),Ne=S((function(e){var t=e.name,a=e.state,n=e.changed,r=a.items.map((function(e){var t=e.name,a=e.label;return{key:t,text:a,onClick:function(){t.startsWith("#")?window.location.hash=t.substr(1):(A.args[t]=!0,A.push())}}}));return{render:function(){return l.a.createElement("div",{"data-test":t,className:je.card},l.a.createElement(u.a,{items:r,styles:{root:{margin:0}}}))},changed:n}}));pe.register("breadcrumbs",Ne,{effect:K.Transparent});var Ce=a(676),Se=function e(t,a){Object(_.a)(this,e),this.x=t,this.y=a};function ze(e,t){var a=e.x-t.x,n=e.y-t.y;return a*a+n*n}function De(e,t,a){var n=t.x,r=t.y,i=a.x-n,o=a.y-r;if(0!==i||0!==o){var l=((e.x-n)*i+(e.y-r)*o)/(i*i+o*o);l>1?(n=a.x,r=a.y):l>0&&(n+=i*l,r+=o*l)}return(i=e.x-n)*i+(o=e.y-r)*o}var Le={x:0,y:0};function Be(e,t){var a=e.length-1,n=[e[0]];return function e(t,a,n,r,i){for(var o=r,l=0,c=a+1;c<n;c++){var s=De(t[c],t[a],t[n]);s>o&&(l=c,o=s)}o>r&&(l-a>1&&e(t,a,l,r,i),i.push(t[l]),n-l>1&&e(t,l,n,r,i))}(e,0,a,t,n),n.push(e[a]),n}function Te(e,t,a){if(e.length<=2)return e;var n=void 0!==t?t*t:1;return e=Be(e=a?e:function(e,t){for(var a=e[0],n=Le,r=[a],i=1,o=e.length;i<o;i++)ze(n=e[i],a)>t&&(r.push(n),a=n);return a!==n&&r.push(n),r}(e,n),n)}var Re,Pe=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap,overflow:"auto"},layers:{position:"relative"}});!function(e){e[e.None=0]="None",e[e.Curve=1]="Curve",e[e.Line=2]="Line",e[e.Rect=3]="Rect",e[e.SolidRect=4]="SolidRect"}(Re||(Re={}));var $e=function(e){var t,a=new Array(2*e.length),n=0,r=Object(k.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;a[n++]=i.x,a[n++]=i.y}}catch(o){r.e(o)}finally{r.f()}return a},Ae=function(e){for(var t=new Array(e.length/2),a=0,n=0,r=t.length;n<r;n++)t[n]=new Se(e[a++],e[a++]);return t},Ie=function(e,t,a){var n=document.createElement("canvas"),r=n.getContext("2d",{alpha:!0});if(!r)throw new Error("failed obtaining canvas context");var i=window.devicePixelRatio||1,o=r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,l=i/o;return n.style.outline="1px solid #ccc",n.style.position="absolute",i!==o?(n.width=e*l,n.height=t*l,r.scale(l,l),n.style.width=ee(e),n.style.height=ee(t)):(n.width=e,n.height=t),{el:n,g:r,w:e,h:t,r:l}},We=function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t},Fe=function(){for(var e=new Map,t=0;t<256;t++)e.set(t,We(t));return e}(),Me=function(){var e,t=[];for(var a in ue)t.push({name:(e=a,e.charAt(0).toUpperCase()+e.slice(1)),color:ue[a]});return t}(),He=S((function(e){var t=e.name,a=e.state,n=e.changed,r=Object(p.box)([]),i=Object(p.box)([]),o=Object(p.box)(Re.Curve),c=Object(p.box)("black"),s=Object(p.box)(3),u=Object(p.box)(),d=l.a.createRef(),f=function(e){e.lineJoin="round",e.lineCap="round"},v=function(e,t){var a=s(),n=Math.floor(a/2);e.fillRect(t.x-n,t.y-n,a,a)},g=function(e,t,a){!function(e,t){return e===t||e.x===t.x&&e.y===t.y}(t,a)?(e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(a.x,a.y),e.stroke()):v(e,t)},h=function(e,t,a){e.strokeRect(t.x,t.y,a.x-t.x,a.y-t.y)},b=function(e,t,a){e.fillRect(t.x,t.y,a.x-t.x,a.y-t.y)},y=function(e,t){switch(t.length){case 1:return void v(e,t[0]);case 2:return void g(e,t[0],t[1]);default:e.beginPath();var a=t[0];e.moveTo(a.x,a.y);for(var n=1,r=t.length;n<r;n++)a=t[n],e.lineTo(a.x,a.y);e.stroke()}},x=[{key:"tool",iconProps:{iconName:"Edit"},subMenuProps:{items:[{key:"pen",text:"Pen",iconProps:{iconName:"Edit"},onClick:function(){o(Re.Curve)}},{key:"line",text:"Line",iconProps:{iconName:"Line"},onClick:function(){o(Re.Line)}},{key:"rect",text:"Rectangle",iconProps:{iconName:"RectangleShape"},onClick:function(){o(Re.Rect)}},{key:"solid_rect",text:"Solid Rectangle",iconProps:{iconName:"RectangleShapeSolid"},onClick:function(){o(Re.SolidRect)}}]}},{key:"color",iconProps:{iconName:"Color"},subMenuProps:{items:Me.map((function(e){var t=e.name,a=e.color;return{key:a,text:t,iconProps:{iconName:"CircleFill",style:{color:a}},onClick:function(){c(a)}}}))}},{key:"lineWidth",iconProps:{iconName:"LineThickness"},subMenuProps:{items:[["Fine",3],["Medium",5],["Bold",7]].map((function(e){var t=Object(m.a)(e,2),a=t[0],n=t[1];return{key:a,text:a,iconProps:{iconName:"Edit"},onClick:function(){s(n)}}}))}},{key:"erase",iconProps:{iconName:"EraseTool"},onClick:function(){o(Re.None)}},{key:"clear",iconProps:{iconName:"Clear"},onClick:function(){u(!0)}}];return{init:function e(){var n=d.current;if(n){var l=a.width,v=a.height,x=Ie(l,v),E=Ie(l,v),w=Ie(l,v),_=x.el,O=x.g,j=E.g,N=w.g;_.style.cursor="crosshair",n.appendChild(E.el),n.appendChild(_),f(O),f(j);var C=[],S=function(e,t,a){var n=e,r=new Map;return{put:function(e){var t=n++;n>=16581375&&(n=0),r.set(t,e);var a=t>>16&255,i=t>>8&255,o=255&t;return"#".concat(Fe.get(a)).concat(Fe.get(i)).concat(Fe.get(o))},test:function(e,n){var i=t.getImageData(e*a,n*a,1,1).data;if(255===i[3])return r.get((i[0]<<16)+(i[1]<<8)+i[2])},clear:function(){r.clear(),n=e}}}(0,N,w.r),z=function(e){return e.clearRect(0,0,l,v)},D=function(e,a,n){e.set("".concat(t," data ").concat(a),n)},L=function(e,t){var a=A.fork();D(a,e,t),a.push()},B=function(e){C.length>1?C[1]=e:C.push(e)},T=function(){if(C.length){var e=function(e,t,a){switch(e){case Re.Curve:return{t:Re.Curve,p:$e(Te(C,2,!0)),c:t,l:a};case Re.Line:return 2===C.length?{t:Re.Line,p:$e(C),c:t,l:a}:void 0;case Re.Rect:return 2===C.length?{t:Re.Rect,p:$e(C),c:t,l:a}:void 0;case Re.SolidRect:return 2===C.length?{t:Re.SolidRect,p:$e(C),c:t}:void 0}}(o(),c(),s());e&&(R(e,0),L((new Date).toISOString(),JSON.stringify(e))),C=[],z(O)}},R=function(e,t){switch(e.t){case Re.Curve:case Re.Line:var a=Ae(e.p);j.strokeStyle=e.c,j.lineWidth=e.l,y(j,a),N.strokeStyle=S.put(t),N.lineWidth=e.l,y(N,a);break;case Re.Rect:var n=Ae(e.p),r=Object(m.a)(n,2),i=r[0],o=r[1];j.strokeStyle=e.c,j.lineWidth=e.l,h(j,i,o),N.strokeStyle=S.put(t),N.lineWidth=e.l,h(N,i,o);break;case Re.SolidRect:var l=Ae(e.p),c=Object(m.a)(l,2),s=c[0],u=c[1];j.fillStyle=e.c,b(j,s,u),N.fillStyle=S.put(t),b(N,s,u)}},P=function(e){var t=_.getBoundingClientRect();!function(e,t){var a=new Se(e,t);switch(o()){case Re.Curve:C.push(a);var n=C.length,i=C[n-1];g(O,i,1===C.length?i:C[n-2]);break;case Re.Line:if(B(a),C.length<2)return;z(O),g(O,C[0],C[1]);break;case Re.Rect:if(B(a),C.length<2)return;z(O),h(O,C[0],C[1]);break;case Re.SolidRect:if(B(a),C.length<2)return;z(O),b(O,C[0],C[1]);break;default:var l=S.test(e,t);if(void 0!==l){var c=r();L(c[l],null)}}}(e.clientX-t.left,e.clientY-t.top)},$=function e(){_.removeEventListener("mousemove",P),_.removeEventListener("mouseup",e),_.removeEventListener("mouseout",e),T()};_.addEventListener("mousedown",(function(e){P(e),_.addEventListener("mousemove",P),_.addEventListener("mouseup",$),_.addEventListener("mouseout",$)})),Object(p.to)(i,(function(e){z(j),z(N),e.forEach(R)})),Object(p.to)(c,(function(e){O.strokeStyle=e,O.fillStyle=e})),Object(p.to)(s,(function(e){O.lineWidth=e})),Object(p.on)(u,(function(){return function(e){var t,a=A.fork(),n=Object(k.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;D(a,r,null)}}catch(i){n.e(i)}finally{n.f()}a.push()}(r())}))}else window.setTimeout(e,500)},render:function(){var e=function(e){if(!e)return{};var t={};for(var a in e)t[a]=JSON.parse(e[a]);return t}(a.data),n=Object.keys(e).sort();return r(n),i(n.map((function(t){return e[t]}))),l.a.createElement("div",{"data-test":t,className:Pe.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title),l.a.createElement("div",null,l.a.createElement(Ce.a,{items:x,ariaLabel:"Use left and right arrow keys to navigate between commands"})),l.a.createElement("div",{ref:d,className:Pe.layers}))},changed:n}}));pe.register("canvas",He);var Ue=a(375),qe=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap,overflow:"auto"},history:{flexGrow:1,overflow:"auto"},message:{padding:ie(6,0)},header:{marginBottom:2},user:{marginRight:5},date:{color:ce("$text7")},body:{paddingLeft:10,borderLeft:re(1,ce("$text3"))}}),Ge=function(e){var t=e.inputB,a=l.a.useState(""),n=Object(m.a)(a,2),r=n[0],i=n[1],o=l.a.useCallback((function(e,t){i(t||"")}),[]);return l.a.createElement(Ue.a,{label:"Send a message",multiline:!0,autoAdjustHeight:!0,onKeyUp:function(e,a){var n=e.key,r=e.target;if("Enter"==n){var o=null!==a&&void 0!==a?a:r.value;if(!o)return;o=o.trim(),i(""),o.length&&t(o)}},onChange:o,value:r})},Ve=S((function(e){var t=e.name,a=e.state,n=e.changed,r=[],i=l.a.createRef(),o=Object(p.box)("",(function(){return!1})),c=function(){var e=i.current;e&&(e.scrollTop=e.scrollHeight)};return Object(p.on)(o,(function(e){var n,i,o=A.fork(),l=null!==(n=a.capacity)&&void 0!==n?n:50,c=r.length;if(c>=l)for(var s=0;s<c-l+1;s++)o.set("".concat(t," data ").concat(r[s]),null);var u={u:null!==(i=R.username)&&void 0!==i?i:"?",m:e};o.set("".concat(t," data ").concat((new Date).toISOString()),JSON.stringify(u)),o.push()})),{render:function(){var e=function(e){if(!e)return{};var t={};for(var a in e)t[a]=JSON.parse(e[a]);return t}(a.data),n=Object.keys(e).sort(),c=n.map((function(t){var a=e[t],n=a.u,r=a.m;return l.a.createElement("div",{key:"".concat(n,"|").concat(t,"|").concat(r),className:qe.message},l.a.createElement("div",{className:ne("wave-s12",qe.header)},l.a.createElement("span",{className:ne("wave-w6",qe.user)},n),l.a.createElement("span",{className:ne("wave-s10",qe.date)},new Date(t).toLocaleString())),l.a.createElement("div",{className:qe.body},r))}));return r=n,l.a.createElement("div",{"data-test":t,className:qe.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title),l.a.createElement("div",{ref:i,className:qe.history},c),l.a.createElement("div",null,l.a.createElement(Ge,{inputB:o})))},init:c,update:c,changed:n}}));pe.register("chat",Ve);var Je=a(695),Ke=a(700),Xe=a(689),Qe=a(640),Ye=a(378),Ze=a(682),et=a(693),tt=a(673),at=a(377),nt=a(132),rt=a(348),it=[{view:"canvas",icon:"EditCreate",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Canvas"},{name:"width",optional:!1,t:"spinbox",value:400,min:400,max:2048,step:50},{name:"height",optional:!1,t:"spinbox",value:300,min:300,max:1536,step:50},{name:"data",optional:!1,t:"record",value:{}}]},{view:"chat",icon:"OfficeChat",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Chat"},{name:"data",optional:!1,t:"record",value:{}},{name:"capacity",optional:!0,t:"spinbox",value:50,min:10,max:1e4,step:10}]},{view:"footer",icon:"Footer",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"caption",optional:!1,t:"textbox",value:"(c) Your Company, Inc."}]},{view:"frame",icon:"PageAdd",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Frame"},{name:"path",optional:!0,t:"textbox",value:""},{name:"content",optional:!0,t:"textarea",value:""}]},{view:"header",icon:"Header",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Page"},{name:"subtitle",optional:!1,t:"textbox",value:"Powered by H2O Wave."},{name:"icon",optional:!0,t:"textbox",value:"AppIconDefault"},{name:"icon_color",optional:!0,t:"textbox",value:"yellow"}]},{view:"markdown",icon:"InsertTextBox",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Content"},{name:"content",optional:!1,t:"textarea",value:"Hello, World!"}]},{view:"markup",icon:"FileHTML",attrs:[{name:"box",optional:!1,t:"box",value:'{"zone":"Body"}'},{name:"title",optional:!1,t:"textbox",value:"Untitled Content"},{name:"content",optional:!1,t:"textarea",value:"<div/>"}]}],ot=a(696),lt=a(28),ct=a(686),st=a(707),ut=a(675),dt=a(286),mt=a.n(dt),ft=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},body:{flexGrow:1},markdown:{$nest:{a:{color:ce("$themePrimary"),$nest:{"&:hover":{textDecoration:"none"}}},table:{width:te(100),borderCollapse:"collapse"},tr:{borderBottom:re(1,ce("$text5"))},th:{padding:ie(11,6),textAlign:"left"},td:{padding:ie(11,6)},img:{maxWidth:"100%",maxHeight:"100%"}}}}),vt=mt()({html:!0,linkify:!0,typographer:!0}),pt=(mt()({typographer:!0,linkify:!0}),function(e){var t=e.source;return l.a.createElement("div",{className:ft.markdown,dangerouslySetInnerHTML:{__html:vt.render(t)}})}),gt=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data),n=ge(a.title,e);return l.a.createElement("div",{"data-test":t,className:ft.card},n&&l.a.createElement("div",{className:"wave-s12 wave-w6"},n),l.a.createElement("div",{className:ft.body},l.a.createElement(pt,{source:ge(a.content,e)})))},changed:e.changed}}));pe.register("markdown",gt);var ht,bt,yt=Object(d.a)({container:{display:"flex",alignItems:"flex-start",alignContent:"flex-start"},element:{flexGrow:1},icon:{color:"#323130",fontWeight:400,fontSize:"14px",userSelect:"none",textAlign:"left",marginLeft:"0.5em",cursor:"pointer"}}),xt=function(e){var t=e.children,a=e.content,n=e.showIcon,r=e.expand;if(!a)return l.a.createElement(l.a.Fragment,null,t);var i={onRenderContent:function(){return l.a.createElement("div",null,l.a.createElement(pt,{source:a}))}};return l.a.createElement("div",{className:yt.container,"data-test":"tooltip"},void 0===n||n?l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:void 0===r||r?yt.element:""},t),l.a.createElement(ut.a,{tooltipProps:i},l.a.createElement(rt.a,{className:yt.icon,iconName:"Info"}))):l.a.createElement(ut.a,{tooltipProps:i},t))},Et=Object(d.a)({buttons:{boxSizing:"border-box"}}),wt={start:"start",end:"end",center:"center",between:"space-between",around:"space-around"},kt=S((function(e){var t=e.model;A.args[t.name]=!1;var a=function(){t.name.startsWith("#")?window.location.hash=t.name.substr(1):(A.args[t.name]=void 0===t.value||t.value,A.push())};return{render:function(){var e;if(t.link)return l.a.createElement(ct.a,{"data-test":t.name,disabled:t.disabled,onClick:a},t.label);var n={text:t.label,disabled:t.disabled,onClick:a,iconProps:{iconName:t.icon}};return(null===(e=t.caption)||void 0===e?void 0:e.length)?t.primary?l.a.createElement(st.a,Object.assign({},n,{"data-test":t.name,primary:!0,secondaryText:t.caption})):l.a.createElement(st.a,Object.assign({},n,{"data-test":t.name,secondaryText:t.caption})):t.primary?l.a.createElement(Qe.a,Object.assign({},n,{"data-test":t.name})):l.a.createElement(Ye.a,Object.assign({},n,{"data-test":t.name}))}}})),_t=function(e){var t=e.model,a=t.items.map((function(e){return e.button})).filter(Boolean).map((function(e){return l.a.createElement(xt,{key:e.name,content:e.tooltip,showIcon:!1,expand:!1},l.a.createElement(kt,{model:e},e.label))}));return l.a.createElement("div",{"data-test":t.name,className:Et.buttons,style:le(t.visible)},l.a.createElement(Xe.a,{horizontal:!0,horizontalAlign:wt[t.justify||""],tokens:{childrenGap:10}},a))},Ot=function(e){var t=e.model;return l.a.createElement("div",{className:Et.buttons,style:le(t.visible)},l.a.createElement(kt,{key:t.name,model:t},t.label))},jt=a(690),Nt=S((function(e){var t=e.model;A.args[t.name]=!!t.value;var a=function(e,a){A.args[t.name]=null===a?null:!!a,t.trigger&&A.push()};return{render:function(){return l.a.createElement(jt.a,{"data-test":t.name,style:le(t.visible),inputProps:{"data-test":t.name},label:t.label,defaultIndeterminate:t.indeterminate,defaultChecked:t.value,onChange:a,disabled:t.disabled})}}})),Ct=a(688),St=a(691),zt=Object(d.a)({toolbar:{margin:oe(5,0)},items:{$nest:{"> *":{margin:"10px 0"}}}}),Dt=S((function(e){var t=e.name,a=e.label,n=e.disabled,r=e.selectedB,i=function(e,t){return r(!!t)};return{render:function(){return l.a.createElement(jt.a,{"data-test":t,label:a,checked:r(),onChange:i,disabled:n,styles:{root:{marginBottom:4}}})},selectedB:r}})),Lt=S((function(e){var t=e.model;A.args[t.name]=t.values||[];var a=!1,n=new Set(t.values),r=(t.choices||[]).map((function(e){return{choice:e,selectedB:Object(p.box)(n.has(e.name))}})),i=function(){if(!a){var e,n=[],i=Object(k.a)(r);try{for(i.s();!(e=i.n()).done;){var o=e.value;o.selectedB()&&n.push(o.choice.name)}}catch(l){i.e(l)}finally{i.f()}A.args[t.name]=n,t.trigger&&A.push()}},o=function(e){a=!0;var t,n=Object(k.a)(r);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.choice.disabled||o.selectedB(e)}}catch(l){n.e(l)}finally{n.f()}a=!1,i()},c=function(){return o(!0)},s=function(){return o(!1)};return r.forEach((function(e){return Object(p.on)(e.selectedB,i)})),{render:function(){var e=r.map((function(e,t){var a=e.choice,n=e.selectedB;return l.a.createElement(Dt,{name:"checkbox-".concat(t+1),key:t,label:a.label||a.name,disabled:!!a.disabled,selectedB:n})}));return l.a.createElement("div",{"data-test":t.name,style:le(t.visible)},l.a.createElement(Ct.a,null,t.label),l.a.createElement("div",{className:zt.toolbar},l.a.createElement(St.a,{variant:"small"},l.a.createElement(ct.a,{onClick:c},"Select All")," | ",l.a.createElement(ct.a,{onClick:s},"Deselect All"))),l.a.createElement("div",{className:zt.items},e))}}})),Bt=a(679),Tt=S((function(e){var t=e.model;A.args[t.name]=t.value||null;var a=(t.choices||[]).map((function(e){var t=e.name;return{key:t,text:e.label||t,disabled:e.disabled}})),n=function(e,a){a&&(A.args[t.name]=a.key),t.trigger&&A.push()};return{render:function(){return l.a.createElement(Bt.a,{"data-test":t.name,style:le(t.visible),label:t.label,required:t.required,defaultSelectedKey:t.value,options:a,onChange:n})}}})),Rt=a(674),Pt=a(669),$t=S((function(e){var t=e.model,a=t.value||null;A.args[t.name]=a;var n=function(e,n){A.args[t.name]=n||a,t.trigger&&A.push()},r=function(e,n){A.args[t.name]=(null===n||void 0===n?void 0:n.str)||a,t.trigger&&A.push()};return{render:function(){var e,i;return l.a.createElement("div",{"data-test":t.name,style:le(t.visible)},l.a.createElement(Ct.a,null,t.label),(null===(e=t.choices)||void 0===e?void 0:e.length)?l.a.createElement(Rt.a,{columnCount:10,selectedId:a||t.choices[0],colorCells:(i=t.choices,i.map((function(e){return{id:e,label:e,color:e}}))),onColorChanged:n}):l.a.createElement(Pt.a,{color:a||"#000",onChange:r}))}}})),At=a(692),It=S((function(e){var t=e.model;A.args[t.name]=t.value||null;var a=Object(p.box)(t.value),n=(t.choices||[]).map((function(e,t){return{key:"".concat(t),text:e}})),r=function(e,n,r,i){var o=(null===n||void 0===n?void 0:n.text)||i||"";A.args[t.name]=o,a(o)};return{render:function(){return l.a.createElement(At.a,{"data-test":t.name,style:le(t.visible),label:t.label,placeholder:t.placeholder,options:n,disabled:t.disabled,autoComplete:"on",allowFreeform:!0,errorMessage:t.error,text:a(),onChange:r})},textB:a}})),Wt=a(672),Ft=function(e){var t="".concat(e);return 1===t.length?"0".concat(t):t},Mt=function(e){if(e&&e.length){var t=e.split("-");if(3!==t.length)return;var a=t.map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));if(3!==a.length)return;return new Date(a[0],a[1]-1,a[2])}},Ht=S((function(e){var t=e.model,a=t.value||null;A.args[t.name]=a;var n=function(e){A.args[t.name]=null===e||void 0===e?a:function(e){return"".concat(e.getFullYear(),"-").concat(Ft(e.getMonth()+1),"-").concat(Ft(e.getDate()))}(e),t.trigger&&A.push()};return{render:function(){return l.a.createElement(Wt.a,{"data-test":t.name,style:le(t.visible),label:t.label,value:Mt(a),placeholder:t.placeholder,disabled:t.disabled,onSelectDate:n})}}})),Ut=S((function(e){var t=e.model,a=!!t.values;A.args[t.name]=a?t.values||[]:t.value||null;var n=a?new Set(t.values):null,r=Object(p.box)(Array.from(n||[])),i=(t.choices||[]).map((function(e){var t=e.name;return{key:t,text:e.label||t,disabled:e.disabled}})),o=function(e,i){if(i){var o=i.key;if(a&&null!==n){i.selected?n.add(o):n.delete(o);var l=Array.from(n);A.args[t.name]=l,r(l)}else A.args[t.name]=o}t.trigger&&A.push()},c=function(){if(n){n.clear(),i.forEach((function(e){e.disabled||n.add(e.key)}));var e=Array.from(n);r(e),A.args[t.name]=e,o()}},s=function(){n&&(n.clear(),r([]),A.args[t.name]=[],o())};return{render:function(){return l.a.createElement("div",{style:le(t.visible)},l.a.createElement(Ze.a,{"data-test":t.name,label:t.label,placeholder:t.placeholder,options:i,required:t.required,disabled:t.disabled,multiSelect:a||void 0,defaultSelectedKey:a?void 0:t.value,selectedKeys:a?r():void 0,onChange:o}),a&&l.a.createElement("div",null,l.a.createElement(St.a,{variant:"small"},l.a.createElement(ct.a,{onClick:c},"Select All")," | ",l.a.createElement(ct.a,{onClick:s},"Deselect All"))))},selectedOptionsB:r}})),qt=a(355),Gt=Object(d.a)({card:{display:"flex",flexDirection:"column"},expanderOpen:{$nest:{">div:last-child":{display:"block"}}},expanderClosed:{$nest:{">div:last-child":{display:"none"}}}}),Vt=S((function(e){var t=e.model,a=Object(p.box)(!!A.args[t.name]),n=function(){A.args[t.name]=t.expanded=!t.expanded,a(t.expanded)};return{isOpenB:a,render:function(){var e=a(),r=e?"Shrink":"Expand",i={iconName:e?"ChevronDownMed":"ChevronRightMed"},o=a()?Gt.expanderOpen:Gt.expanderClosed;return l.a.createElement("div",{"data-test":t.name,className:o,style:le(t.visible)},l.a.createElement(Je.a,{alignContent:"start",styles:{content:{paddingLeft:0}}},l.a.createElement(qt.a,{title:r,iconProps:i,onClick:n,styles:{root:{paddingLeft:0},icon:{marginLeft:0}}},t.label)),l.a.createElement(mr,{items:t.items||[]}))}}})),Jt=a(19),Kt=a.n(Jt),Xt=a(38),Qt=a(697),Yt=a(295),Zt=Object(d.a)({uploadInput:{opacity:0},upload:Object(v.a)(Object(v.a)({},{display:"flex",alignItems:"center",justifyContent:"center"}),{},{flexDirection:"column",boxSizing:"border-box"}),uploadDragging:{border:(ht=2,bt="var(--text)","".concat(ht,"px dashed ").concat(bt))},uploadLabel:Object(v.a)(Object(v.a)({},{display:"flex",alignItems:"center",justifyContent:"center"}),{},{padding:ie(7,10),fontSize:14,fontWeight:600,borderRadius:2,background:"var(--text)",color:"var(--page)",minWidth:80,$nest:{"&:hover":{cursor:"pointer"}}}),uploadMessageBar:{margin:"20px 0"},uploadRemove:{fontSize:20,position:"absolute",top:-15,right:0,cursor:"pointer"}}),ea=function(e){return 1024*e*1024},ta=S((function(e){var t=e.model,a=Object(p.box)(!1),n=Object(p.box)([]),r=Object(p.box)(0),i=Object(p.box)(""),o=Object(p.box)(""),c=t.max_file_size?ea(t.max_file_size):0,s=t.max_size?ea(t.max_size):0,u=t.file_extensions?t.file_extensions.map((function(e){return e.startsWith(".")?e:".".concat(e)})):null,d=function(){var e=Object(Xt.a)(Kt.a.mark((function e(){var a,l,c,s,u,d,m;return Kt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new FormData,n().forEach((function(e){return a.append("files",e)})),e.prev=2,l=new Promise((function(e,t){var n=new XMLHttpRequest;n.open("POST","/_f"),n.upload.onprogress=function(e){return r(e.loaded/e.total)},n.send(a),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?e(n):t(n))}})),e.next=6,l;case 6:c=e.sent,s=c.responseText,u=JSON.parse(s),d=u.files,A.args[t.name]=d,A.push(),o("Successfully uploaded files: ".concat(n().map((function(e){return e.name})).join(","),".")),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),m=e.t0.responseText,i(m||"There was an error when uploading file.");case 18:return e.prev=18,n([]),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[2,14,18,21]])})));return function(){return e.apply(this,arguments)}}(),m=function(e){if(!t.multiple&&e.length>1)return"Cannot upload multiple files. Input is not set to multiple mode.";var a=e.filter((function(e){return!function(e){if(!u)return!0;var t,a=Object(k.a)(u);try{for(a.s();!(t=a.n()).done;){var n=t.value;if(e.toLowerCase().endsWith(n.toLowerCase()))return!0}}catch(r){a.e(r)}finally{a.f()}return!1}(e.name)}));if(a.length)return"Not allowed extension for files: ".concat(a.map((function(e){return e.name})).join(", "),".\n          Allowed file extensions: ").concat(null===u||void 0===u?void 0:u.join(", "),".");if(c){var n=e.filter((function(e){return e.size>c}));if(n.length)return"Max file size exceeded for files: ".concat(n.map((function(e){return e.name})).join(", "),".\n            Allowed size per file: ").concat(t.max_file_size,"Mb.")}if(s&&e.reduce((function(e,t){return e+t.size}),0)>s)return"Total max file size exceeded. Allowed size: ".concat(t.max_size,"Mb.")},v=function(e){var t=e.target.files;if(null===t||void 0===t?void 0:t.length){var a=Array.from(t),r=m(a);r?i(r):n(a)}},h=function(e){e.preventDefault(),e.stopPropagation(),a(!0)},b=function(e){e.preventDefault(),e.stopPropagation(),a(!1)},y=function(e){b(e);var t=e.dataTransfer.files;if(t.length&&!i()&&!o()){var a=Array.from(t),r=m(a);r?i(r):n(a)}},x=function(e){e.preventDefault(),e.stopPropagation()},E=function(){return i("")},w=function(){o(""),r(0)};return{render:function(){var e=!a()||i()||o()?Zt.upload:ne(Zt.upload,Zt.uploadDragging);return l.a.createElement("div",{style:le(t.visible)},l.a.createElement("form",{className:e,style:{height:t.height||300},onDragStart:h,onDragEnter:h,onDragEnd:b,onDragLeave:b,onDrop:y,onDragOver:x},i()?l.a.createElement(l.a.Fragment,null,l.a.createElement(St.a,{variant:"xLarge"},"An error occured"),l.a.createElement(ot.a,{className:Zt.uploadMessageBar,messageBarType:lt.a.error,isMultiline:!0,onDismiss:E},i())):o()?l.a.createElement(l.a.Fragment,null,l.a.createElement(St.a,{variant:"xLarge"},"Upload successful"),l.a.createElement(ot.a,{className:Zt.uploadMessageBar,messageBarType:lt.a.success,isMultiline:!0,onDismiss:w},o())):a()?l.a.createElement(St.a,{styles:{root:{pointerEvents:"none"}}},"Drop files anywhere within the box."):r()?l.a.createElement(Qt.a,{styles:{root:{width:"80%"}},"data-test":"progress",description:"Uploading: ".concat((100*r()).toFixed(2),"%"),percentComplete:r()}):n().length?l.a.createElement(l.a.Fragment,null,l.a.createElement(St.a,{variant:"xLarge"},t.multiple?"Chosen Files":"Chosen File"),l.a.createElement(Xe.a,{horizontal:!0,verticalAlign:"center",styles:{root:{maxWidth:"100%",overflowX:"auto",padding:"30px 0"}},tokens:{childrenGap:15}},n().map((function(e,t){var a,r=e.name;return l.a.createElement(Yt.a,{key:Object(p.xid)(),styles:{root:{textAlign:"center",position:"relative"}}},l.a.createElement(g.a,{className:Zt.uploadRemove,iconName:"RemoveFilter",onClick:(a=t,function(){n().splice(a,1),n(Object(f.a)(n()))})}),l.a.createElement(g.a,{iconName:"OpenFile",styles:{root:{fontSize:35}}}),l.a.createElement("br",null),l.a.createElement(St.a,{nowrap:!0,styles:{root:{display:"block",margin:"15px 0"}}},r))})))):l.a.createElement(l.a.Fragment,null,l.a.createElement(g.a,{iconName:"CloudUpload",styles:{root:{fontSize:50}}}),l.a.createElement("input",{id:"file","data-test":t.name,className:Zt.uploadInput,onChange:v,type:"file",accept:(null===u||void 0===u?void 0:u.join(","))||void 0,multiple:t.multiple}),l.a.createElement("label",{htmlFor:"file",className:Zt.uploadLabel},"Browse..."),l.a.createElement(St.a,{styles:{root:{marginTop:15}}},"Or drag and drop ",t.multiple?"files":"a file"," here."))),l.a.createElement(Qe.a,{disabled:!!r()||!n().length,text:t.label||"Upload",onClick:d}))},percentCompleteB:r,isDraggingB:a,filesB:n,errorB:i,successMsgB:o}})),aa=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},body:{flexGrow:1,position:"relative",$nest:{iframe:{position:"absolute",top:0,left:0,right:0,bottom:0}}}}),na=function(e){return e.replace(/(\s+src\s*=\s*["'])\//g,"$1".concat(window.location.protocol,"//").concat(window.location.host,"/"))},ra=function(e){return URL.createObjectURL(new Blob([na(e)],{type:"text/html"}))},ia=function(e){var t=e.path,a=e.content;return l.a.createElement("iframe",{title:Object(p.xid)(),src:t||ra(a||"Nothing to render."),frameBorder:"0",width:"100%",height:"100%"})},oa=function(e){var t=e.model,a=t.name,n=t.path,r=t.content,i=t.width,o=void 0===i?"100%":i,c=t.height,s=void 0===c?"150px":c,u=t.visible;return l.a.createElement("div",{"data-test":a,style:Object(v.a)({width:o,height:s},le(u))},l.a.createElement(ia,{path:n,content:r}))},la=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t,className:aa.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title),l.a.createElement("div",{className:aa.body},l.a.createElement(ia,{path:a.path,content:a.content})))},changed:e.changed}}));pe.register("frame",la);var ca=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},img:{flexGrow:1,objectFit:"contain",maxHeight:"calc(100% - 20px)"}}),sa=function(e){var t=e.model,a=t.title,n=t.type,r=t.image,i=t.path,o=i||(r&&n?"data:image/".concat(n,";base64,").concat(r):"");return l.a.createElement("img",{className:ca.img,alt:a,src:o})},ua=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.title,n=a.type,r=a.image,i=a.data,o=a.path;return l.a.createElement("div",{"data-test":t,className:ca.card},l.a.createElement(he,{data:i,format:e,className:"wave-s12 wave-w6"}),l.a.createElement(sa,{model:{title:e,type:n,image:r,path:o}}))},changed:e.changed}}));pe.register("image",ua);var da=function(e){var t=e.model,a=t.label,n=t.required,r=void 0!==n&&n,i=t.disabled,o=void 0!==i&&i,c=t.visible,s=t.name;return l.a.createElement(Ct.a,{"data-test":s,style:le(c),required:r,disabled:o},a)},ma=S((function(e){var t=e.model,a=t.label||t.path,n=""===t.target?"_blank":t.target,r=function(){return n?window.open(t.path,n):window.open(t.path)};return{render:function(){return l.a.createElement("div",{style:le(t.visible)},t.button?l.a.createElement(Ye.a,{"data-test":t.name,text:a,disabled:t.disabled,onClick:r}):l.a.createElement(ct.a,{"data-test":t.name,href:t.path,download:t.download,disabled:t.disabled,target:n},a))}}})),fa=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},body:{flexGrow:1}}),va=function(e){var t=e.model,a=t.content,n=t.visible,r=t.name;return l.a.createElement("div",{"data-test":r,dangerouslySetInnerHTML:{__html:a},style:le(n)})},pa=function(e){var t=e.name,a=e.title,n=e.content;return l.a.createElement("div",{"data-test":t,className:fa.card},a&&l.a.createElement("div",{className:"wave-s12 wave-w6"},a),l.a.createElement("div",{className:fa.body},l.a.createElement(va,{model:{content:n}})))},ga=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement(pa,{name:t,title:a.title,content:a.content})},changed:e.changed}}));pe.register("markup",ga);var ha,ba=function(e){switch(e){case"error":return lt.a.error;case"warning":return lt.a.warning;case"success":return lt.a.success;case"danger":return lt.a.severeWarning;case"blocked":return lt.a.blocked;default:return lt.a.info}},ya=function(e){var t,a=e.model;return(null===(t=a.text)||void 0===t?void 0:t.length)?l.a.createElement(ot.a,{"data-test":a.name,style:le(a.visible),messageBarType:ba(a.type)},a.text):l.a.createElement("div",null)},xa=a(667),Ea={suggestionsHeaderText:"Suggestions",noResultsFoundText:"No results found"},wa=S((function(e){var t=e.model,a=t.choices.map((function(e){var t=e.name;return{key:t,name:e.label||t}})),n=Object(p.box)(a.filter((function(e){var a,n=e.key;return null===(a=t.values)||void 0===a?void 0:a.includes(n)}))),r=function(e,t){if(!e)return[];return a.filter((function(a){return a.name.toLowerCase().includes(e.toLowerCase())&&!function(e){return t&&t.includes(e)}(a)}))},i=function(e){n(e||[]),A.args[t.name]=e?e.map((function(e){return e.key})):null,t.trigger&&A.push()},o=function(){return a};return{init:function(){return A.args[t.name]=t.values||null},render:function(){return l.a.createElement("div",{style:le(t.visible)},t.label&&l.a.createElement(St.a,null,t.label),l.a.createElement(xa.a,{inputProps:{"data-test":t.name},removeButtonAriaLabel:"Remove",onResolveSuggestions:r,onChange:i,pickerSuggestionsProps:Ea,itemLimit:t.max_choices,selectedItems:n(),disabled:t.disabled,onEmptyResolveSuggestions:o}))},selectedTagsB:n}})),ka=a(294),_a=["$gray","$blue","$green","$amber","$tangerine","$purple","$cyan","$mint","$pink","$brown"];!function(e){e[e.CC=0]="CC",e[e.DD=1]="DD",e[e.TT=2]="TT",e[e.CD=3]="CD",e[e.DC=4]="DC",e[e.TC=5]="TC",e[e.CT=6]="CT",e[e.TD=7]="TD",e[e.DT=8]="DT"}(ha||(ha={})),Object(ka.b)("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var Oa=function(e){return"number"===typeof e},ja=function(e){return"string"===typeof e},Na=function(e){return e.trim().split(/\s+/g)},Ca=function(e){return Na(e).map((function(e){return parseInt(e,10)}))},Sa=function(e,t){var a,n=Object(k.a)(e);try{for(n.s();!(a=n.n()).done;){var r=a.value;if(r){var i=r[t];i&&ja(i)&&(r[t]=new Date(i))}}}catch(o){n.e(o)}finally{n.f()}},za=function(e,t,a,n){var r,i=Object(k.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;o&&(o[n]=[o[t],o[a]])}}catch(l){i.e(l)}finally{i.f()}},Da=" 0 1 2".split(" "),La=Na("min max nice scale title"),Ba=function(e){return Da.map((function(t){return e+t}))},Ta=function(e){return La.map((function(t){return"".concat(e,"_").concat(t)}))},Ra=function(e){return e.map((function(e){return[e,e+"_field",e+"_format"]}))},Pa=Ra(Ba("x")),$a=Ra(Ba("y")),Aa=Ta("x"),Ia=Ta("y"),Wa=Ra(Na("color shape size dodge label")),Fa=[].concat(Object(f.a)(Pa),Object(f.a)($a),Object(f.a)(Wa)),Ma=function(e,t,a){var n,r=a+"_field",i=a+"_scale",o=Object(k.a)(t);try{for(o.s();!(n=o.n()).done;){var l=n.value,c=l[r];if("time"===l[i])return"t";if(ja(c)){var s,u=Object(k.a)(e);try{for(u.s();!(s=u.n()).done;){var d=s.value[c];if(Oa(d))return"c";if(ja(d))return"d"}}catch(m){u.e(m)}finally{u.f()}}}}catch(m){o.e(m)}finally{o.f()}return"c"},Ha={cc:ha.CC,dd:ha.DD,tt:ha.TT,dc:ha.DC,cd:ha.CD,tc:ha.TC,ct:ha.CT,td:ha.TD,dt:ha.DT},Ua={},qa=function(e,t){return function(a,n){var r=a?a[e]:n;return null!=r?(Ua[e]=r,t(Ua)):""}},Ga=function(e){for(var t=e,a=0;a<Pa.length;a++)for(var n=Pa[a],r=$a[a],i=0;i<n.length;i++){var o=t[n[i]];t[n[i]]=t[r[i]],t[r[i]]=o}for(var l=0;l<Aa.length;l++){var c=Aa[l],s=Ia[l],u=t[c];t[c]=t[s],t[s]=u}},Va=function(e){var t,a=e,n=Object(k.a)(Fa);try{for(n.s();!(t=n.n()).done;){var r=Object(m.a)(t.value,3),i=r[0],o=r[1],l=r[2],c=a[i];if(ja(c)){var s=Q(c);if(s){var u=Object(m.a)(s,2),d=u[0],f=u[1];a[i]=void 0,a[o]=d,f&&(a[l]=qa(d,f))}}}}catch(v){n.e(v)}finally{n.f()}return e},Ja=function(e,t){var a,n=Object(k.a)(t);try{for(n.s();!(a=n.n()).done;){var r=a.value;if("time"===r.x_scale){var i,o=Object(k.a)(t);try{for(o.s();!(i=o.n()).done;){var l=i.value,c=l.x_field,s=l.x0_field;ja(c)&&Sa(e,c),ja(s)&&Sa(e,s)}}catch(H){o.e(H)}finally{o.f()}ja(r.x)&&(r.x=new Date(r.x)),ja(r.x0)&&(r.x0=new Date(r.x0));break}}}catch(H){n.e(H)}finally{n.f()}var u,d=Object(k.a)(t);try{for(d.s();!(u=d.n()).done;){var m=u.value;if("time"===m.y_scale){var f,v=Object(k.a)(t);try{for(v.s();!(f=v.n()).done;){var p=f.value,g=p.y_field,h=p.y0_field;ja(g)&&Sa(e,g),ja(h)&&Sa(e,h)}}catch(H){v.e(H)}finally{v.f()}ja(m.y)&&(m.y=new Date(m.y)),ja(m.y0)&&(m.y0=new Date(m.y0));break}}}catch(H){d.e(H)}finally{d.f()}var b,y=Object(k.a)(t);try{for(y.s();!(b=y.n()).done;){var x=b.value,E=x.x_field,w=x.x0_field;ja(E)&&ja(w)&&za(e,w,E,E)}}catch(H){y.e(H)}finally{y.f()}var _,O=Object(k.a)(t);try{for(O.s();!(_=O.n()).done;){var j=_.value,N=j.y_field,C=j.y0_field;ja(N)&&ja(C)&&za(e,C,N,N)}}catch(H){O.e(H)}finally{O.f()}var S,z=Object(k.a)(t);try{for(z.s();!(S=z.n()).done;){var D=S.value,L=D.type,B=D.x1_field,T=D.x2_field,R=D.y_field;"interval"===L&&ja(B)&&ja(T)&&ja(R)&&(D.x_field=B+" - "+T,za(e,B,T,D.x_field))}}catch(H){z.e(H)}finally{z.f()}var P,$=Object(k.a)(t);try{for($.s();!(P=$.n()).done;){var A=P.value,I=A.type,W=A.y1_field,F=A.y2_field,M=A.x_field;"interval"===I&&ja(W)&&ja(F)&&ja(M)&&(A.y_field=W+" - "+F,za(e,W,F,A.y_field))}}catch(H){$.e(H)}finally{$.f()}return e},Ka=function(e){var t=e.x,a=e.x0,n=e.y,r=e.y0,i=e.label,o=e.fill_color,l=e.fill_opacity,c=e.stroke_color,s=e.stroke_opacity,u=e.stroke_size,d=e.stroke_dash,m=e.ref_stroke_color,f=e.ref_stroke_opacity,v=e.ref_stroke_dash,p=e.ref_stroke_size,g=e.label_fill_color,h=e.label_fill_opacity,b=e.label_stroke_color,y=e.label_stroke_opacity,x=e.label_stroke_size,E=e.label_font_size,w=e.label_font_weight,k=e.label_line_height,_=e.label_align,O=Ya(g,h,b,y,x,E,w,k,_),j=Qa(o,l,c,s,u,d),N=Qa(void 0,void 0,m,f,p,v);return null!=t&&null!=n?null!=a&&null!=r?[{type:"region",start:[a,r],end:[t,n],text:ja(i)?{content:i,style:O}:void 0,style:j}]:[{type:"dataMarker",position:[t,n],text:ja(i)?{content:i,style:O}:null,point:{style:j},line:{style:N}}]:null!=t?null!=a?[{type:"region",start:[a,"min"],end:[t,"max"],text:ja(i)?{content:i,style:O}:null,style:j}]:[{type:"line",start:[t,"min"],end:[t,"max"],text:ja(i)?{content:i,style:O,position:"start"}:void 0,style:N}]:null!=r?[{type:"region",start:["min",r],end:["max",n],text:ja(i)?{content:i,style:O}:null,style:j}]:[{type:"line",start:["min",n],end:["max",n],text:ja(i)?{content:i,style:O,position:"start"}:void 0,style:N}]},Xa=function(e){var t=e.type,a=e.x_field,n=e.y_field,r=e.color_field,i=e.color_range,o=e.color_domain,l=e.color,c=e.shape_field,s=e.shape_range,u=e.shape,d=e.size_field,m=e.size_range,f=e.size,v=e.stack,g=e.dodge,h=e.dodge_field,b=e.curve,y=e.fill_color,x=e.fill_opacity,E=e.stroke_color,w=e.stroke_opacity,k=e.stroke_dash,_=e.stroke_size,O=e.label_field,j=e.label_format,N=e.label_offset,C=e.label_offset_x,S=e.label_offset_y,z=e.label_rotation,D=e.label_position,L=e.label_overlap,B=e.label_fill_color,T=e.label_fill_opacity,R=e.label_stroke_color,P=e.label_stroke_opacity,$=e.label_stroke_size,A=e.label_font_size,I=e.label_font_weight,W=e.label_line_height,F=e.label_align,M={};ja(t)&&(M.type=t);var H=[];if(ja(h)?H.push({type:"dodge",marginRatio:0,dodgeBy:h}):"auto"===g&&H.push({type:"dodge",marginRatio:0}),"auto"===v&&H.push({type:"stack"}),H.length&&(M.adjust=H),ja(a)&&ja(n)&&(M.position={fields:[a,n]}),ja(r)){var U=ja(i)?Na(i).map(se):_a;if(M.color={fields:[r],values:U},o&&o.length==U.length){var q=o.reduce((function(e,t,a){return e[t]=U[a],e}),{});M.color.callback=function(e){return q[e]}}}else M.color=ja(l)?se(l):getComputedStyle(document.documentElement).getPropertyValue("--gray").trim();if(ja(c)?ja(s)?M.shape={fields:[c],values:Na(s)}:M.shape={fields:[c]}:ja(u)&&(M.shape=u),ja(d)?ja(m)?M.size={fields:[d],values:Ca(m)}:M.size={fields:[d]}:Oa(f)&&(M.size=f),ja(O)){var G=Ya(B,T,R,P,$,A,I,W,F),V={};switch(G&&(V.style=G),L){case"hide":V.layout={type:"overlap"};break;case"overlap":V.layout={type:"fixedOverlap"};break;case"constrain":V.layout={type:"limitInShape"}}if(Oa(N)&&(V.offset=N),Oa(C)&&(V.offsetX=C),Oa(S)&&(V.offsetY=S),ja(z)){var J=Object(p.parseI)(z);isNaN(J)?V.autoRotate="none"!==z:V.rotate=J*Math.PI/180}switch(D){case"top":case"bottom":case"middle":case"left":case"right":V.position=D}M.label=j?{fields:[O],callback:function(e){return{content:j(null,e)}}}:{fields:[O]},Object.keys(V).length&&(M.label.cfg=V)}if(ja(b))switch(b){case"smooth":M.shape="smooth";break;case"step-before":M.shape="vh";break;case"step":M.shape="hvh";break;case"step-after":M.shape="hv"}var K=Qa(y,x,E,w,_,k);return K&&(M.style=K),M},Qa=function(e,t,a,n,r,i){var o={};return ja(e)&&(o.fill=se(e)),Oa(t)&&(o.fillOpacity=t),ja(a)&&(o.stroke=se(a)),Oa(n)&&(o.strokeOpacity=n),Oa(r)&&(o.lineWidth=r),ja(i)&&(o.lineDash=Ca(i)),Object.keys(o).length?o:void 0},Ya=function(e,t,a,n,r,i,o,l,c){var s={};if(ja(e)&&(s.fill=se(e)),Oa(t)&&(s.fillOpacity=t),ja(a)&&(s.stroke=se(a)),Oa(n)&&(s.strokeOpacity=n),Oa(r)&&(s.lineWidth=r),Oa(i)&&(s.fontSize=i),ja(o)){var u=Object(p.parseU)(o);s.fontWeight=isNaN(u)?o:u}return Oa(l)&&(s.lineHeight=l),ja(c)&&(s.textAlign=c),Object.keys(s).length?s:void 0},Za=function(e,t,a,n,r,i){var o={},l={label:{autoHide:!1}};return ja(e)&&(o.type=function(e){switch(e){case"time-category":return"timeCat";case"power":return"pow"}return e}(e)),t&&(o.formatter=function(e){return t(void 0,e)}),ja(a)&&(o.alias=a,l.title={}),Oa(n)&&(o.min=n),Oa(r)&&(o.max=r),o.nice="boolean"!==typeof i||i,[o,l]},en=function(e,t){var a=function(e){var t,a=Object(k.a)(e);try{for(a.s();!(t=a.n()).done;){var n=t.value.coord;if(ja(n))return n}}catch(r){a.e(r)}finally{a.f()}}(t),n=e===ha.CD,r=n?[["transpose"]]:void 0;if(n){var i,o=Object(k.a)(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;Ga(l)}}catch(c){o.e(c)}finally{o.f()}}return a?r?{type:a,actions:r}:{type:a}:r?{actions:r}:void 0},tn=function(e,t,a){var n=en(t,a),r=function(e){var t,a={},n={},r=Object(k.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.x_field){var o=Za(i.x_scale,i.x_format,i.x_title,i.x_min,i.x_max,i.x_nice),l=Object(m.a)(o,2),c=l[0],s=l[1];a[i.x_field]=c,s&&(n[i.x_field]=s);break}}}catch(b){r.e(b)}finally{r.f()}var u,d=Object(k.a)(e);try{for(d.s();!(u=d.n()).done;){var f=u.value;if(f.y_field){var v=Za(f.y_scale,f.y_format,f.y_title,f.y_min,f.y_max,f.y_nice),p=Object(m.a)(v,2),g=p[0],h=p[1];a[f.y_field]=g,h&&(n[f.y_field]=h);break}}}catch(b){d.e(b)}finally{d.f()}return[a,n]}(a),i=Object(m.a)(r,2),o=i[0],l=i[1],c=function(e){var t,a=[],n=[],r=Object(k.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.x,l=i.y;null!=o||null!=l?n.push.apply(n,Object(f.a)(Ka(i))):a.push(Xa(i))}}catch(c){r.e(c)}finally{r.f()}return[a,n]}(a),s=Object(m.a)(c,2);return{container:e,autoFit:!0,options:{animate:!1,coordinate:n,scales:o,axes:l,geometries:s[0],annotations:s[1],interactions:[{type:"drag-move"}],tooltip:{showCrosshairs:!0,crosshairs:{type:"xy"}}}}},an=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},body:{flexGrow:1,display:"flex"},plot:{$nest:{canvas:{position:"absolute",top:0,left:0,right:0,bottom:0}}}}),nn=S((function(e){var t=e.model,a=null,n=null,r=l.a.createRef(),i=function(e,t){var n,i=r.current;i&&(i.clientHeight===t&&i.clientWidth===e||(null===(n=a)||void 0===n||n.destroy(),o()))},o=function(){_a=_a.map(se);var e=r.current;if(e){e.clientHeight<30&&(e.style.height="300px");var o=Object(p.unpack)(t.data),l=Object(p.unpack)(t.plot).marks.map(Va),c={marks:l},s=function(e,t){return Ha[Ma(e,t,"x")+Ma(e,t,"y")]}(o,l),u=Ja(o,c.marks),d=c.marks?new ka.a(tn(e,s,c.marks)):null;if(n=c,d){if(a=d,d.data(u),t.events){var m,f=Object(k.a)(t.events);try{var v=function(){var e=m.value;switch(e){case"select_marks":d.interaction("element-single-selected"),d.on("element:statechange",(function(a){var n,r=a.gEvent.originalEvent;r.stateStatus&&"selected"===r.state&&(t.name&&A.emit(t.name,e,[null===(n=r.element)||void 0===n?void 0:n.data]))}))}};for(f.s();!(m=f.n()).done;)v()}catch(g){f.e(g)}finally{f.f()}}d.render(),setTimeout((function(){return i(e.clientWidth,e.clientHeight)}),300)}}};return{init:o,update:function(){if(r.current&&a&&n){var e=Object(p.unpack)(t.data),i=Ja(e,n.marks);a.changeData(i)}},render:function(){var e=t.width,a=void 0===e?"auto":e,n=t.height,i=void 0===n?"auto":n,o=t.visible,c=t.name,s="auto"===a&&"auto"===i?{flexGrow:1}:{width:a,height:i};return l.a.createElement("div",{"data-test":c,style:Object(v.a)(Object(v.a)({},s),le(o)),className:an.plot,ref:r})}}})),rn=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.title,n=void 0===e?"Untitled":e,r=a.plot,i=a.data,o=a.events;return l.a.createElement("div",{className:an.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},n),l.a.createElement("div",{className:an.body},l.a.createElement(nn,{model:{name:t,plot:r,data:i,events:o}})))},changed:e.changed}}));pe.register("plot",rn);var on=function(e){var t=e.model,a=t.label,n=t.caption,r=void 0===n?"Please wait...":n,i=t.value,o=t.visible,c=t.name;return l.a.createElement("div",{"data-test":c,style:le(o)},l.a.createElement(Qt.a,{label:a,description:r,percentComplete:i}))},ln=a(363),cn=a.n(ln),sn=(a(560),Object(d.a)({container:{padding:ie(0,8),$nest:{".input-range":{marginTop:15,marginBottom:35,$nest:{"&__slider":{borderWidth:2,borderRadius:10,borderColor:"var(--neutralPrimary)",background:"var(--white)",width:16,height:16,boxSizing:"border-box",cursor:"initial",$nest:{"&:active":{transform:"none"}}},"&__label":{fontFamily:"inherit",fontSize:14,fontWeight:600},"&__label-container":{color:"var(--neutralPrimary)"},"&__track":{height:4,borderRadius:4,background:"var(--neutralTertiaryAlt)",cursor:"initial",$nest:{"&--active":{background:"var(--neutralSecondary)"}}}}},"&:active .input-range":{$nest:{"&__slider":{borderColor:"var(--themeDark)"},"&__track":{background:"var(--themeLighter)"},"&__track--active":{background:"var(--themeDark)"}}},"&:hover .input-range":{$nest:{"&__slider":{borderColor:"var(--themePrimary)"},"&__track":{background:"var(--themeLighter)"},"&__track--active":{background:"var(--themePrimary)"}}}}},disabled:{opacity:.5}})),un=S((function(e){var t=e.model,a=t.min,n=void 0===a?0:a,r=t.max,i=void 0===r?100:r,o=t.step,c=void 0===o?1:o,s={min:t.min_value&&t.min_value>n&&t.min_value<=i?t.min_value:n,max:t.max_value&&t.max_value>n&&t.max_value<=i?t.max_value:i};A.args[t.name]=Object.values(s);var u=Object(p.box)(s),d=function(e){u(e),A.args[t.name]=Object.values(e),t.trigger&&A.push()};return{render:function(){return l.a.createElement("div",{"data-test":t.name,style:le(t.visible)},t.label&&l.a.createElement(Ct.a,{disabled:t.disabled},t.label),l.a.createElement("div",{className:"".concat(sn.container," ").concat(t.disabled?sn.disabled:"")},l.a.createElement(cn.a,{maxValue:i,minValue:n,step:c,disabled:t.disabled,allowSameValues:!0,value:u(),onChange:d})))},valueB:u}})),dn=Object(d.a)({separator:{boxSizing:"border-box"}}),mn=function(e){var t=e.model;return l.a.createElement("div",{"data-test":t.name,className:dn.separator,style:le(t.visible)},l.a.createElement(Je.a,null,t.label))},fn=a(699),vn=S((function(e){var t=e.model,a=t.min,n=void 0===a?0:a,r=t.max,i=void 0===r?100:r,o=t.step,c=void 0===o?1:o,s=t.value,u=void 0===s?0:s,d=u<n?n:u>i?i:u;A.args[t.name]=d;var m=function(e){return A.args[t.name]=e},f=function(e,a){t.trigger&&A.push()};return{render:function(){return l.a.createElement(fn.a,{"data-test":t.name,styles:{root:le(t.visible)},buttonProps:{"data-test":t.name},label:t.label,min:n,max:i,step:c,defaultValue:d,showValue:!0,originFromZero:n<0&&i>=0,onChange:m,onChanged:f,disabled:t.disabled})}}})),pn=S((function(e){var t=e.model,a=t.min,n=void 0===a?0:a,r=t.max,i=void 0===r?100:r,o=t.step,c=void 0===o?1:o,s=t.value,u=void 0===s?0:s,d=u<n?n:u>i?i:u;A.args[t.name]=d;var m=function(e){var t=parseFloat(e);return!isNaN(t)&&isFinite(t)?t:u},f=function(e){A.args[t.name]=m(e.target.value)},v=function(e){var a=m(e),n=a+c>i?i:a+c;return A.args[t.name]=n,String(n)},p=function(e){var a=m(e),r=a-c<n?n:a-c;return A.args[t.name]=r,String(r)};return{render:function(){return l.a.createElement(Ke.a,{styles:{root:le(t.visible)},inputProps:{"data-test":t.name},label:t.label,min:n,max:i,step:c,defaultValue:"".concat(u),onBlur:f,onIncrement:v,onDecrement:p,disabled:t.disabled})}}})),gn=Object(d.a)({stats:{display:"flex",alignItems:"flex-start"},inset:{background:ce("$page"),padding:ie(10,15)},stat:{display:"flex",alignItems:"center"},lhs:{width:45,marginRight:"0.5em"},icon:{fontSize:45},statCaption:{color:ce("$text5")}}),hn={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"},bn=function(e){var t,a=e.model,n=a.justify?"start"===a.justify?{marginRight:"2em"}:"end"===a.justify?{marginLeft:"2em"}:{}:{marginRight:"2em"},r=hn[null!==(t=a.justify)&&void 0!==t?t:""],i=a.items.map((function(e,t){var a=e.label,r=e.value,i=e.caption,o=e.icon,c=e.icon_color;return l.a.createElement("div",{key:"".concat(t,":").concat(a),className:gn.stat,style:n},o&&l.a.createElement("div",{className:gn.lhs,style:c?{color:ce(c)}:void 0},l.a.createElement(rt.a,{className:gn.icon,iconName:o})),l.a.createElement("div",null,l.a.createElement("div",{className:"wave-s12 wave-w5"},a),r&&l.a.createElement("div",{className:"wave-s24 wave-w3"},r),i&&l.a.createElement("div",{className:ne(gn.statCaption,"wave-s13")},i)))}));return l.a.createElement("div",{className:ne(gn.stats,a.inset?gn.inset:""),style:{justifyContent:r}},i)},yn=Object(d.a)({stepNumber:{background:"var(--text)",color:"var(--card)",alignItems:"center",borderRadius:"50%",display:"inline-flex",justifyContent:"center",fontSize:ae(.8),height:24,minWidth:24,width:24},disabled:{opacity:.5}}),xn={root:{fontSize:24}},En=S((function(e){var t=e.model,a=t.items,n=function(e,t){return l.a.createElement(l.a.Fragment,{key:t},l.a.createElement(Xe.a,{horizontal:!0,horizontalAlign:"space-between",verticalAlign:"center",grow:1},l.a.createElement(Xe.a,{className:e.done?"":(n=t,n>0&&!a[n-1].done?yn.disabled:""),horizontalAlign:"center",styles:{root:{paddingRight:10,paddingLeft:10}}},e.done?l.a.createElement(g.a,{styles:xn,iconName:"CompletedSolid"}):e.icon?l.a.createElement(g.a,{styles:xn,iconName:e.icon}):l.a.createElement("span",{className:yn.stepNumber},t+1),l.a.createElement(St.a,{block:!0,nowrap:!0,styles:{root:{padding:10}}},e.label))),a.length-1!==t&&l.a.createElement(Je.a,{styles:{root:{width:"100%"}}}));var n};return{render:function(){return l.a.createElement(Xe.a,{style:le(t.visible),"data-test":t.name,horizontal:!0,horizontalAlign:"space-between",verticalAlign:"center"},a.map(n))}}})),wn=a(34),kn=a(29),_n=a(662),On=a(163),jn=a(374),Nn=a(376),Cn=a(645),Sn=a(666),zn=a(46),Dn=a(701),Ln=a(225),Bn=a(683),Tn=function(e){var t=e.model,a=e.icon;return l.a.createElement(g.a,{"data-test":t.name,iconName:a,styles:{root:{fontSize:"1.2rem",color:t.color||"inherit"}}})},Rn=a(24),Pn=Object(d.a)({container:{position:"absolute",top:0,left:0,right:0,bottom:0}}),$n=function(e){var t=e.thickness,a=e.color,n=e.value,r=l.a.useRef(null),i=l.a.useState(null),o=Object(m.a)(i,2),c=o[0],s=o[1],u=function e(){if(r.current){var i=r.current.getBoundingClientRect(),o=i.width,c=i.height;if(c){var u=Math.min(o,c),d=u/2,m=u/2-t,f=Rn.a()({outerRadius:d,innerRadius:m,startAngle:0,endAngle:2*Math.PI}),v=Rn.a()({outerRadius:d,innerRadius:m,startAngle:0,endAngle:2*Math.PI*n});s(l.a.createElement("svg",{viewBox:"0 0 ".concat(o," ").concat(c),style:{position:"absolute",top:0,left:0,right:0,bottom:0}},l.a.createElement("g",{transform:u===c?"translate(".concat((o-2*d)/2,", 0)"):"translate(0, ".concat((c-2*d)/2,")")},l.a.createElement("path",{d:f,fill:a,fillOpacity:.15,transform:"translate(".concat(d,",").concat(d,")")}),l.a.createElement("path",{d:v,fill:a,transform:"translate(".concat(d,",").concat(d,")")}))))}else setTimeout(e,300)}},d=$(1e3,u);return l.a.useEffect((function(){return window.addEventListener("resize",d),function(){return window.removeEventListener("resize",d)}}),[]),l.a.useLayoutEffect(u,[t,a,n]),l.a.createElement("div",{ref:r,className:Pn.container},c)},An=Object(d.a)({container:{position:"relative",width:50,height:50},percentContainer:{position:"absolute",top:0,left:0,bottom:0,right:0},percent:{opacity:.5}}),In=function(e){var t=e.model,a=e.progress;return l.a.createElement("div",{"data-test":t.name,className:An.container},l.a.createElement($n,{thickness:2,color:ce(t.color||"$red"),value:a}),l.a.createElement(Xe.a,{horizontalAlign:"center",verticalAlign:"center",className:ne(An.percentContainer,"wave-s12")},l.a.createElement("div",{className:An.percent},"".concat(Math.round(100*a),"%"))))},Wn=Object(d.a)({sortableHeader:{$nest:{".ms-DetailsHeader-cellName":{position:"relative",paddingRight:15}}},sortingIcon:{marginLeft:10,fontSize:ae(1.1),position:"absolute",top:-2,right:-5},hideCellGroupCollapse:{$nest:{'div[class*="cellIsGroupExpander"]':{display:"none"}}}}),Fn={always:wn.a.always,"on-hover":wn.a.onHover,hidden:wn.a.hidden},Mn=function(e,t){return function(a,n){var r=a[e.key],i=n[e.key];switch(e.dataType){case"number":return r=+r,i=+i,t?r-i:i-r;case"time":r=Date.parse(r),i=Date.parse(i);break;default:r=r.toLowerCase(),i=i.toLowerCase()}return t?i>r?-1:1:i>r?1:-1}},Hn=function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},Un=S((function(e){var t,a,n=e.model;A.args[n.name]=[];var r=n.rows.map((function(e){for(var t={key:e.name},a=0,r=e.cells.length;a<r;a++){t[n.columns[a].name]=e.cells[a]}return t})),i=(null===(t=n.values)||void 0===t?void 0:t.length)||n.multiple,o=Object(p.box)(r),c=n.columns.filter((function(e){return e.searchable})).map((function(e){return e.name})),s=Object(p.box)(""),u=Object(p.box)(null),d=Object(p.box)(null),m=Object(p.box)(void 0),g=Object(p.box)("*"),b=n.groupable?[{key:"*",text:"(No Grouping)"}].concat(Object(f.a)(n.columns.map((function(e){return{key:e.name,text:e.label}})))):[],y=function(e,t){if(s(t||""),!t&&!u())return o(r),void(m()&&N());E(),x(),m()&&N()},x=function(){var e=s().toLowerCase();e&&c.length&&o(o().filter((function(t){return c.some((function(a){return t[a].toLowerCase().includes(e)}))})))},E=function(){var e=u(),t=e?r.filter((function(t){return Object.keys(e).every((function(a){return!e[a].length||e[a].some((function(e){return t[a]===e}))}))})):r;o(t)},w=function(){u(null),s(""),m(void 0),g("*"),E(),x()},k=function(){var e=function(e){return e.map((function(e){var t=JSON.stringify(e);return t.substr(1,t.length-2)})).join("\n")}([n.columns.map((function(e){var t=e.label,a=e.name;return t||a}))].concat(Object(f.a)(n.rows.map((function(e){return e.cells}))))),t=document.createElement("a"),a=new Blob([e],{type:"octet/stream"}),r=window.URL.createObjectURL(a);t.href=r,t.download="exported_data.csv",t.click(),window.URL.revokeObjectURL(r)},_=function(e){return e?l.a.createElement("div",{style:{padding:10}},l.a.createElement(St.a,{variant:"mediumPlus",styles:{root:{paddingTop:10,paddingBottom:10,fontWeight:"bold"}},block:!0},"Show only"),e.items.map((function(e){var t,a,n=e.key,r=e.name,i=e.data,o=u(),c=!!r&&!!o&&o[i]&&o[i].includes(r);return l.a.createElement(jt.a,{key:n,label:r,defaultChecked:c,onChange:(t=i||"",a=r||"",function(e,n){var r=u()||{};n?r[t]?r[t].push(a):r[t]=[a]:r[t]=r[t].filter((function(e){return e!==a})),u(Object.values(r).every((function(e){return!e.length}))?null:Object(v.a)({},r)),E(),x(),m()&&N()}),styles:{root:{marginBottom:5}}})}))):null},O=function(){return d(null)},j=function(e,t){d({items:Array.from(new Set(r.map((function(t){return t[e.fieldName||e.key]})))).map((function(t){return{key:t,name:t,data:e.fieldName||e.key}})),target:t.target,directionalHint:kn.a.bottomLeftEdge,gapSpace:10,isBeakVisible:!0,onRenderMenuList:_,onDismiss:O})},N=function(){var e=function(){var e,t,a=0,n=(e=o(),t=g(),e.reduce((function(e,a){return(e[a[t]]=e[a[t]]||[]).push(a),e}),{})),r=Object.keys(n),i=r.map((function(e,t){if(0!==t){var i=r[t-1];a+=n[i].length}return{key:e,name:e,startIndex:a,count:n[e].length,isCollapsed:!0}}));return{groupedBy:n,groups:i}}(),t=e.groupedBy,a=e.groups;o(Object.values(t).flatMap((function(e){return e}))),m(a)},C=function(e,t){t&&("*"!==t.key?(w(),g(t.key),N()):w())},S=function(e){return e?l.a.createElement(_n.a,{stickyPosition:On.a.Header,isScrollSynced:!0},l.a.createElement(jn.a,Object.assign({},e,{onColumnContextMenu:j,className:m()?Wn.hideCellGroupCollapse:""}))):l.a.createElement("span",null)},z=function(e){var t=c.length||n.columns.some((function(e){return e.filterable}));if(!e||!n.downloadable&&!n.resettable&&!t)return null;var a=[],i={root:{background:ce("$card")}};return n.downloadable&&a.push({key:"download",text:"Download data",iconProps:{iconName:"Download"},onClick:k,buttonStyles:i}),n.resettable&&a.push({key:"reset",text:"Reset table",iconProps:{iconName:"Refresh"},onClick:w,buttonStyles:i}),l.a.createElement(_n.a,{stickyPosition:On.a.Footer,isScrollSynced:!0},l.a.createElement(Xe.a,{horizontal:!0,horizontalAlign:t?"space-between":"end",verticalAlign:"center"},t&&l.a.createElement(St.a,{variant:"smallPlus",block:!0,styles:{root:{whiteSpace:"nowrap"}}},"Rows:",l.a.createElement("b",{style:{paddingLeft:5}},Hn(o().length)," of ",Hn(r.length))),l.a.createElement("div",{style:{width:"80%"}},l.a.createElement(Ce.a,{items:a,styles:{root:{background:ce("$card")},primarySet:{justifyContent:"flex-end"}}}))))},D=function(e){return e?l.a.createElement(Nn.a,Object.assign({},e,{styles:{cell:{alignSelf:"center"},checkCell:{display:"flex",alignItems:"center"},root:{width:"100%"}}})):null},L=function(e,t){"ChevronDown"===e.target.getAttribute("data-icon-name")?j(t,e):t.isSortable&&function(e){var t,a="SortDown"===e.iconName;(e.iconName=a?"SortUp":"SortDown",m())?o((null===(t=m())||void 0===t?void 0:t.reduce((function(t,n){return[].concat(Object(f.a)(t),Object(f.a)(o().slice(n.startIndex,t.length+n.count).sort(Mn(e,a))))}),[]))||[]):o(Object(f.a)(o()).sort(Mn(e,a)));B(B().map((function(t){return e.key===t.key?e:t})))}(t)},B=Object(p.box)(n.columns.map((function(e){var t=e.min_width?e.min_width.endsWith("px")?+e.min_width.substring(0,e.min_width.length-2):+e.min_width:150,a=e.max_width?e.max_width.endsWith("px")?+e.max_width.substring(0,e.max_width.length-2):+e.max_width:void 0;return{key:e.name,name:e.label,fieldName:e.name,minWidth:t,maxWidth:a,headerClassName:e.sortable?Wn.sortableHeader:void 0,iconClassName:e.sortable?Wn.sortingIcon:void 0,iconName:e.sortable?"SortDown":void 0,onColumnClick:L,columnActionsMode:e.filterable?wn.b.hasDropdown:wn.b.clickable,cellType:e.cell_type,dataType:e.data_type,isSortable:e.sortable,isResizable:!0}}))),T=(null===(a=n.columns.find((function(e){return e.link})))||void 0===a?void 0:a.name)||(!1===n.columns[0].link?void 0:n.columns[0].name),R=new Cn.a({onSelectionChanged:function(){A.args[n.name]=R.getSelection().map((function(e){return e.key}))}}),P=function(e){A.args[n.name]=[e.key],A.push()},$=function(e,t,a){var r,o;if(!e||!a)return l.a.createElement("span",null);var c=e[a.fieldName];if(a.key===T&&!i){return l.a.createElement(ct.a,{onClick:function(){A.args[n.name]=[e.key],A.push()}},c)}return(null===(r=a.cellType)||void 0===r?void 0:r.progress)?l.a.createElement(In,{model:a.cellType.progress,progress:e[a.key]}):(null===(o=a.cellType)||void 0===o?void 0:o.icon)?l.a.createElement(Tn,{model:a.cellType.icon,icon:e[a.key]}):"time"===a.dataType?l.a.createElement("span",null,new Date(c).toLocaleString()):l.a.createElement("span",null,c)},I=function(){if(n.height)return n.height;if(r.length>10)return 500;var e=c.length||n.groupable?60:0,t=n.columns.some((function(e){return e.cell_type}))?n.columns.some((function(e){var t;return null===(t=e.cell_type)||void 0===t?void 0:t.progress}))?68:50:43,a=n.downloadable||n.resettable||c.length?44:0;return e+60+r.length*t+a},W=function(){return l.a.createElement(l.a.Fragment,null,l.a.createElement(Sn.a,{items:o(),columns:B(),constrainMode:wn.d.unconstrained,layoutMode:wn.e.fixedColumns,groups:m(),selection:R,selectionMode:i?zn.b.multiple:zn.b.none,selectionPreservedOnEmptyClick:!0,onItemInvoked:i?void 0:P,onRenderRow:D,onRenderItemColumn:$,onRenderDetailsHeader:S,onRenderDetailsFooter:z,checkboxVisibility:Fn[n.checkbox_visibility||"on-hover"]}),d()&&l.a.createElement(h.a,d()))};return{init:function(){i&&n.values&&(n.values.forEach((function(e){return R.setKeySelected(e,!0,!1)})),A.args[n.name]=n.values)},render:function(){return l.a.createElement("div",{"data-test":n.name,style:Object(v.a)({position:"relative",height:I()},le(n.visible))},l.a.createElement(Xe.a,{horizontal:!0,horizontalAlign:"space-between"},n.groupable&&l.a.createElement(Ze.a,{"data-test":"groupby",label:"Group by",selectedKey:g(),onChange:C,options:b,styles:{root:{width:300}}}),!!c.length&&l.a.createElement(Ue.a,{"data-test":"search",label:"Search",onChange:y,value:s(),styles:{root:{width:"50%"}}})),l.a.createElement(Dn.a,{scrollbarVisibility:Ln.b.auto,styles:{root:{top:n.groupable||c.length?80:0}}},i?l.a.createElement(Bn.a,{selection:R},l.a.createElement(W,null)):l.a.createElement(W,null)))},columnsB:B,filteredItemsB:o,selectedFiltersB:u,searchStrB:s,colContextMenuListB:d,groupsB:m,groupByKeyB:g}})),qn=a(366),Gn=a(702),Vn=a(228),Jn=Object(d.a)({pivot:{minHeight:46}}),Kn=S((function(e){var t=e.model,a=function(e){var a=null===e||void 0===e?void 0:e.props.itemKey;a&&(a.startsWith("#")?window.location.hash=a.substr(1):t.name?a!==A.args[t.name]&&(A.args[t.name]=a,A.push()):(A.args[a]=!0,A.push()))};return{render:function(){var e,n,r=null===(e=t.items)||void 0===e?void 0:e.map((function(e){return l.a.createElement(qn.a,{key:e.name,itemIcon:e.icon,itemKey:e.name,headerText:e.label})}));return l.a.createElement("div",{className:Jn.pivot},l.a.createElement(Gn.a,{"data-test":t.name,style:le(t.visible),selectedKey:null!==(n=t.value)&&void 0!==n?n:null,linkFormat:t.link?Vn.a.links:Vn.a.tabs,onLinkClick:a},r))}}})),Xn=S((function(e){var t=e.model,a=H.a.compile(t.content||"");return{render:function(){var e=Object(p.unpack)(t.data);return l.a.createElement("div",{"data-test":t.name},l.a.createElement(va,{model:{content:a(e||{}),visible:t.visible}}))}}})),Qn=S((function(e){var t=e.name,a=e.state,n=e.changed,r=H.a.compile(a.content||"");return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement(pa,{name:t,title:ge(a.title,e),content:r(e||{})})},changed:n}}));pe.register("template",Qn);var Yn=Object(d.a)({text:{position:"relative",$nest:{p:{margin:oe(0,0,10,0)}}}}),Zn={xl:"xLarge",l:"large",m:"medium",s:"small",xs:"xSmall"},er=function(e){var t,a=e.content,n=e.name,r=e.size,i=e.commands,o=e.visibility,c=void 0===o||o,s=n?"".concat(n,"-menu"):n;return l.a.createElement("div",{className:Yn.text,style:le(c)},l.a.createElement(St.a,{"data-test":n,variant:(t=r||"m",Zn[t]||"mediumPlus"),block:!0},l.a.createElement(pt,{source:a})),!!(null===i||void 0===i?void 0:i.length)&&l.a.createElement(F,{name:s,commands:i}))},tr=a(710),ar=S((function(e){var t=e.model;A.args[t.name]=t.value||"";var a=function(e,a){var n,r=e.target;a=a||r.value,A.args[t.name]=null!==(n=a)&&void 0!==n?n:t.value||"",t.trigger&&A.push()};return{render:function(){return t.mask?l.a.createElement(tr.a,{"data-test":t.name,style:le(t.visible),label:t.label,defaultValue:t.value,mask:t.mask,errorMessage:t.error,required:t.required,disabled:t.disabled,readOnly:t.readonly,onChange:t.trigger?$(500,a):a}):l.a.createElement(Ue.a,{"data-test":t.name,style:le(t.visible),styles:t.multiline&&t.height?{fieldGroup:{height:t.height}}:void 0,label:t.label,placeholder:t.placeholder,iconProps:{iconName:t.icon},prefix:t.prefix,suffix:t.suffix,defaultValue:t.value,errorMessage:t.error,required:t.required,disabled:t.disabled,readOnly:t.readonly,multiline:t.multiline,type:t.password?"password":void 0,onChange:t.trigger?$(500,a):a})}}})),nr=a(703),rr=S((function(e){var t=e.model;A.args[t.name]=!!t.value;var a=function(e,a){A.args[t.name]=!!a,t.trigger&&A.push()};return{render:function(){return l.a.createElement(nr.a,{"data-test":t.name,style:le(t.visible),label:t.label,defaultChecked:t.value,onChange:a,disabled:t.disabled,onText:"On",offText:"Off",inlineLabel:!0})}}})),ir=a(372),or=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},body:{flexGrow:1,display:"flex"},plot:{$nest:{canvas:{position:"absolute",top:0,left:0,right:0,bottom:0}}}}),lr=S((function(e){var t=e.model,a=l.a.createRef(),n=function(){var e=a.current;if(e){var n=JSON.parse(t.specification);isNaN(n.height)?e.clientHeight<30&&(e.style.height="300px"):e.style.height="".concat(n.height+10,"px");var r=Object(p.unpack)(t.data),i=e.clientWidth-10,o=e.clientHeight-10;r&&(n.data={values:r}),Object(ir.a)(e,n,{mode:"vega-lite",defaultStyle:!1,renderer:"canvas",actions:!1,config:{autosize:{type:"fit",resize:!0},view:{discreteWidth:i,discreteHeight:o,continuousWidth:i,continuousHeight:o}}}).catch(console.error)}},r=$(1e3,n);return window.addEventListener("resize",r),{init:n,render:function(){var e=t.name,n=t.width,r=void 0===n?"auto":n,i=t.height,o=void 0===i?"auto":i,c=t.visible,s="auto"===r&&"auto"===o?{flexGrow:1}:{width:r,height:o};return l.a.createElement("div",{"data-test":e,className:or.plot,style:Object(v.a)(Object(v.a)({},s),{},{position:"relative"},le(c)),ref:a})},dispose:function(){return window.removeEventListener("resize",r)}}})),cr=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.specification,n=a.data,r=a.title;return l.a.createElement("div",{"data-test":t,className:or.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},r),l.a.createElement("div",{className:or.body},l.a.createElement(lr,{key:Object(p.xid)(),model:{specification:e,data:n}})))},changed:e.changed}}));pe.register("vega",cr);var sr,ur={items:[]},dr=Object(d.a)({card:{padding:15},vertical:{display:"flex",flexDirection:"column",flexGrow:1,$nest:{">*:not(:first-child)":{marginTop:10}}},horizontal:{display:"flex",alignItems:"center"},inset:{background:ce("$page"),padding:ie(10,15)},horizontalLeft:{$nest:{"> *":{margin:oe(0,25,0,0)}}},horizontalRight:{justifyContent:"flex-end",$nest:{"> *":{margin:oe(0,0,0,25)}}}});!function(e){e[e.Top=0]="Top",e[e.Left=1]="Left",e[e.Right=2]="Right"}(sr||(sr={}));var mr=function(e){var t=e.items,a=e.alignment,n=e.inset,r=t.map((function(e){return l.a.createElement(vr,{key:Object(p.xid)(),model:e})})),i=a===sr.Left?ne(dr.horizontal,dr.horizontalLeft,n?dr.inset:""):a===sr.Right?ne(dr.horizontal,dr.horizontalRight,n?dr.inset:""):dr.vertical;return l.a.createElement("div",{className:i},r)},fr=function(e){var t=e.model;return l.a.createElement(mr,{items:t.items,alignment:"end"===t.justify?sr.Right:sr.Left,inset:t.inset})},vr=function(e){var t=e.model;return t.text?l.a.createElement(xt,{content:t.text.tooltip,expand:!1},l.a.createElement(er,{name:t.text.name,content:t.text.content,size:t.text.size,visibility:t.text.visible})):t.text_xl?l.a.createElement(xt,{content:t.text_xl.tooltip,expand:!1},l.a.createElement(er,{name:t.text_xl.name,content:t.text_xl.content,size:"xl",commands:t.text_xl.commands,visibility:t.text_xl.visible})):t.text_l?l.a.createElement(xt,{content:t.text_l.tooltip,expand:!1},l.a.createElement(er,{name:t.text_l.name,content:t.text_l.content,size:"l",commands:t.text_l.commands,visibility:t.text_l.visible})):t.text_m?l.a.createElement(xt,{content:t.text_m.tooltip,expand:!1},l.a.createElement(er,{name:t.text_m.name,content:t.text_m.content,visibility:t.text_m.visible})):t.text_s?l.a.createElement(xt,{content:t.text_s.tooltip,expand:!1},l.a.createElement(er,{name:t.text_s.name,content:t.text_s.content,size:"s",visibility:t.text_s.visible})):t.text_xs?l.a.createElement(xt,{content:t.text_xs.tooltip,expand:!1},l.a.createElement(er,{name:t.text_xs.name,content:t.text_xs.content,size:"xs",visibility:t.text_xs.visible})):t.label?l.a.createElement(xt,{content:t.label.tooltip,expand:!1},l.a.createElement(da,{model:t.label})):t.link?l.a.createElement(xt,{content:t.link.tooltip,expand:!1},l.a.createElement(ma,{model:t.link})):t.separator?l.a.createElement(mn,{model:t.separator}):t.progress?l.a.createElement(xt,{content:t.progress.tooltip},l.a.createElement(on,{model:t.progress})):t.message_bar?l.a.createElement(ya,{model:t.message_bar}):t.textbox?l.a.createElement(xt,{content:t.textbox.tooltip},l.a.createElement(ar,{model:t.textbox})):t.checkbox?l.a.createElement(xt,{content:t.checkbox.tooltip,expand:!1},l.a.createElement(Nt,{model:t.checkbox})):t.toggle?l.a.createElement(xt,{content:t.toggle.tooltip,expand:!1},l.a.createElement(rr,{model:t.toggle})):t.choice_group?l.a.createElement(xt,{content:t.choice_group.tooltip},l.a.createElement(Tt,{model:t.choice_group})):t.dropdown?l.a.createElement(xt,{content:t.dropdown.tooltip},l.a.createElement(Ut,{model:t.dropdown})):t.checklist?l.a.createElement(xt,{content:t.checklist.tooltip},l.a.createElement(Lt,{model:t.checklist})):t.combobox?l.a.createElement(xt,{content:t.combobox.tooltip},l.a.createElement(It,{model:t.combobox})):t.slider?l.a.createElement(xt,{content:t.slider.tooltip},l.a.createElement(vn,{model:t.slider})):t.spinbox?l.a.createElement(xt,{content:t.spinbox.tooltip,expand:!1},l.a.createElement(pn,{model:t.spinbox})):t.date_picker?l.a.createElement(xt,{content:t.date_picker.tooltip},l.a.createElement(Ht,{model:t.date_picker})):t.color_picker?l.a.createElement(xt,{content:t.color_picker.tooltip},l.a.createElement($t,{model:t.color_picker})):t.file_upload?l.a.createElement(xt,{content:t.file_upload.tooltip},l.a.createElement(ta,{model:t.file_upload})):t.table?l.a.createElement(xt,{content:t.table.tooltip},l.a.createElement(Un,{model:t.table})):t.buttons?l.a.createElement(_t,{model:t.buttons}):t.tabs?l.a.createElement(Kn,{model:t.tabs}):t.button?l.a.createElement(xt,{content:t.button.tooltip,showIcon:!1,expand:!1},l.a.createElement(Ot,{model:t.button})):t.expander?l.a.createElement(Vt,{model:t.expander}):t.frame?l.a.createElement(oa,{model:t.frame}):t.markup?l.a.createElement(va,{model:t.markup}):t.template?l.a.createElement(Xn,{model:t.template}):t.picker?l.a.createElement(xt,{content:t.picker.tooltip},l.a.createElement(wa,{model:t.picker})):t.range_slider?l.a.createElement(xt,{content:t.range_slider.tooltip},l.a.createElement(un,{model:t.range_slider})):t.stepper?l.a.createElement(xt,{content:t.stepper.tooltip},l.a.createElement(En,{model:t.stepper})):t.visualization?l.a.createElement(nn,{model:t.visualization}):t.vega_visualization?l.a.createElement(lr,{model:t.vega_visualization}):t.stats?l.a.createElement(bn,{model:t.stats}):t.inline?l.a.createElement(fr,{model:t.inline}):t.image?l.a.createElement(sa,{model:t.image}):l.a.createElement(ot.a,{messageBarType:lt.a.severeWarning},"This component could not be rendered.")},pr=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(v.a)(Object(v.a)({},ur),a),n=e.title,r=Object(p.unpack)(e.items);return l.a.createElement("div",{"data-test":t,className:dr.card},n&&l.a.createElement("div",{className:"wave-s12 wave-w6"},n),l.a.createElement(mr,{items:r}))},changed:e.changed}}));pe.register("form",pr);var gr=Object(p.box)(null),hr=S((function(){var e=function(){var e=gr()||{},t=e.closable,a=e.name,n=e.events;t&&a&&(null===n||void 0===n||n.forEach((function(e){"dismissed"===e&&A.emit(a,e,!0)}))),gr(null)};return{render:function(){var t=gr()||{},a=t.title,n=t.width,r=void 0===n?"600px":n,i=t.items,o=void 0===i?[]:i,c=t.closable,s=t.primary,u=t.blocking,d={title:a,onDismiss:e,type:c?nt.a.close:s?nt.a.largeHeader:nt.a.normal};return l.a.createElement(tt.a,{hidden:!gr(),dialogContentProps:d,modalProps:{isBlocking:u},minWidth:r,maxWidth:r},l.a.createElement(mr,{items:o}))},dialogB:gr}})),br=function(){var e=Object(Xt.a)(Kt.a.mark((function e(t){return Kt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Notification"in window){e.next=4;break}return e.abrupt("return");case 4:if("granted"!==Notification.permission){e.next=8;break}new Notification(t),e.next=14;break;case 8:if("denied"===Notification.permission){e.next=14;break}return e.next=11,Notification.requestPermission();case 11:if(e.t0=e.sent,"granted"!==e.t0){e.next=14;break}new Notification(t);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),yr=null,xr={},Er=function(e){yr&&yr.remove();var t=yr=document.createElement("script");t.type="text/javascript",t.appendChild(document.createTextNode(e)),document.body.appendChild(t)},wr=function(e){return!e.some((function(e){return!function(e){var t,a=window,n=Object(k.a)(e.split("."));try{for(n.s();!(t=n.n()).done;){if(!(a=a[t.value]))return!1}}catch(r){n.e(r)}finally{n.f()}return!0}(e)}))},kr=function(e){var t=e.content,a=e.requires,n=e.targets,r=function(){return!(a&&a.length&&!wr(a))&&!(n&&n.length&&n.some((function(e){return!document.getElementById(e)})))};if(r())Er(t);else var i=0,o=setInterval((function(){r()?(clearInterval(o),Er(t)):++i>100&&(clearInterval(o),console.error("Failed to execute inline script: one or more of the requirements were not found."))}),10)},_r=null;Object(p.on)(B,(function(e){return window.setTimeout((function(){return function(e){if(_r)switch(_r.type){case"ga":case"gtag":var t=window;t.gtag&&t.gtag("event","sync",function(e){var t={};for(var a in e){var n=e[a];n&&(t[a]="#"!==a||n)}return t}(e))}}(e)}),0)}));var Or=Object(p.box)(""),jr=Object(p.box)("");Object(p.on)(Or,(function(e){return window.document.title=e})),Object(p.on)(jr,(function(e){var t=document.querySelector("link[rel*='icon']"),a=document.querySelector("link[rel*='apple-touch-icon']");t&&(t.href=e),a&&(a.href=e)}));var Nr=Object(p.box)([]),Cr=function(e){var t=e.state,a=t.title,n=t.icon,r=t.refresh,i=t.notification,o=t.redirect,l=t.layouts,c=t.dialog,s=t.theme,u=t.tracker,d=t.scripts,m=t.script;if(o)try{o===new URL(o).hash?window.location.hash=o:window.location.replace(o)}catch(f){console.error("Could not redirect: ".concat(o," is an invalid URL"))}gr(c?Object(v.a)({},c):null),a&&Or(a),n&&jr(n),"number"===typeof r&&0===r&&Object(p.disconnect)(),s&&me(s),i&&br(i),u&&function(e){if(!_r)switch(e.type){case"ga":case"gtag":var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id=".concat(e.id),document.body.appendChild(t),t.addEventListener("load",(function(){var t=window;t.dataLayer=t.dataLayer||[],t.gtag=function(){t.dataLayer.push(arguments)},t.gtag("js",new Date),t.gtag("config",e.id)})),_r=e}}(u),l&&Nr(l),d&&function(e){e.forEach((function(e){var t=e.path,a=e.asynchronous,n=e.cross_origin,r=e.referrer_policy,i=e.integrity;if(!xr[t]){var o=document.createElement("script");o.type="text/javascript",o.src=t,a&&(o.async=!0),n&&(o.crossOrigin=n),r&&(o.referrerPolicy=r),i&&(o.integrity=i),document.body.appendChild(o),o.addEventListener("load",(function(){xr[t]=!0}))}}))}(d),m&&(delete t.script,kr(m))},Sr=S((function(){return{render:function(){return l.a.createElement(l.a.Fragment,null)}}}));pe.register("meta",Sr);var zr=Object(d.a)({fab:{position:"fixed",right:20,bottom:20,width:56,height:56,color:ce("$card"),background:ce("$text"),borderRadius:"50%",fontSize:20,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0px 3px 5px ".concat(ce("$text0")),$nest:{"&:hover":{boxShadow:"0px 12px 20px ".concat(ce("$text2"))}}},panelActions:{marginTop:10},cards:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start"},card:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",margin:3,padding:3,border:re(1,ce("$text3")),$nest:{"&:hover":{backgroundColor:ce("$text0")}}},cardIcon:{width:50,height:50,fontSize:22,display:"flex",justifyContent:"center",alignItems:"center",color:ce("$text7")},cardCaption:{marginTop:5,fontSize:11,width:82,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center"}}),Dr=function(e){return e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join(" ")},Lr=function(e,t){var a,n={},r=Object(k.a)(e);try{for(r.s();!(a=r.n()).done;){var i=a.value;n[t(i)]=i}}catch(o){r.e(o)}finally{r.f()}return n}(it,(function(e){return e.view})),Br=function(e){return Object(p.parseU)(e.replace(/px$/,""))},Tr=function(){var e=Nr();return e&&e.length?e[0]:w.layout},Rr=function(e){var t;return null!==(t=E.find((function(t){return t.layout.name===e.name})))&&void 0!==t?t:w},Pr={root:{marginTop:15}},$r=function(e){var t=e.children;return l.a.createElement(Je.a,{styles:Pr},t)},Ar={root:{marginTop:5,marginBottom:5},labelWrapper:{width:90}},Ir=S((function(e){var t=e.label,a=e.defaultValue,n=e.min,r=e.max,i=e.step,o=e.onChange,c=function(e){var t=Object(p.parseU)(e);return isNaN(t)?0:t},s=function(e){o(c(e.target.value))},u=function(e){var t=Math.min(r,c(e)+i);return o(t),String(t)},d=function(e){var t=Math.max(n,c(e)-i);return o(t),String(t)};return{render:function(){return l.a.createElement(Ke.a,{label:t,min:n,max:r,step:i,defaultValue:""+a,onBlur:s,onIncrement:u,onDecrement:d,styles:Ar})}}})),Wr=S((function(e){var t=e.view,a=e.card,n=Lr[t].attrs,r=!a,i={},o={},c=[],s=Tr();!function e(t,a){var n,r=Object(k.a)(a);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.zones?e(t,i.zones):t.push(i.name)}}catch(o){r.e(o)}finally{r.f()}}(c,s.zones);var u,d=Object(k.a)(n);try{for(d.s();!(u=d.n()).done;){var m=u.value,f=m.name,g=m.value;i[f]=o[f]=g}}catch(z){d.e(z)}finally{d.f()}if(a){var h=a.state;for(var E in h)i[E]=o[E]=h[E]}var w=a?a.name:"".concat(t).concat((new Date).toISOString()),_=function(){x(b)},O=function(){var e=A.fork();if(r){var a=Object(v.a)(Object(v.a)(Object(v.a)({},{view:t}),i),o);e.put(w,a)}else for(var n in o){var l=o[n];l!==i[n]&&e.set("".concat(w," ").concat(n),l)}e.push(),x(b)},j=function(){x(y)},N=function(){x(b)},C=function(e,t){var a=e.target;w=t||a.value},S=function(){return l.a.createElement(Xe.a,{horizontal:!0,tokens:{childrenGap:10}},l.a.createElement(Qe.a,{onClick:O},r?"Add card":"Save changes"),l.a.createElement(Ye.a,{onClick:r?j:N},"Back"))};return{render:function(){var e=n.map((function(e){var t=e.name;switch(e.t){case"textbox":return l.a.createElement(Ue.a,{key:t,label:Dr(t),defaultValue:o[t],onChange:function(e,a){var n=e.target;o[t]=a||n.value}});case"textarea":return l.a.createElement(Ue.a,{key:t,label:Dr(t),defaultValue:o[t],multiline:!0,onChange:function(e,a){var n=e.target;o[t]=a||n.value},styles:{field:{minHeight:300}}});case"spinbox":var a=e.min,n=e.max,r=e.step,i=e.value,s=i<a?a:i>n?n:i;return o[t]=s,l.a.createElement(Ir,{key:t,label:Dr(t)+":",min:a,max:n,step:r,defaultValue:o[t],onChange:function(e){o[t]=e}});case"record":return l.a.createElement("div",{key:t});case"box":var u=c.map((function(e){return{key:e,text:e}})),d=function(e){var a=JSON.parse(o[t]);e(a),o[t]=JSON.stringify(a)},m=function(e,t){return d((function(a){return a[e]=t}))},f=function(e){return d((function(t){delete t[e]}))},v=JSON.parse(o[t]),g=v.zone,h=v.order,b=v.size,y=v.width,x=v.height;return l.a.createElement("div",{key:t},l.a.createElement($r,null,"Box"),l.a.createElement(Ze.a,{label:"Zone",options:u,defaultSelectedKey:g,onChange:function(e,t){t&&m("zone",t.key)}}),l.a.createElement(Ir,{defaultValue:null!==h&&void 0!==h?h:0,label:"Order:",min:0,max:25,step:1,onChange:function(e){e?m("order",e):f("order")}}),l.a.createElement(Ir,{defaultValue:b?Object(p.parseU)(b):0,label:"Size:",min:0,max:25,step:1,onChange:function(e){e?m("size","".concat(e)):f("size")}}),l.a.createElement(Ir,{defaultValue:y?Br(y):0,label:"Width (px):",min:0,max:1e4,step:10,onChange:function(e){e?m("width","".concat(e,"px")):f("width")}}),l.a.createElement(Ir,{defaultValue:x?Br(x):0,label:"Height (px):",min:0,max:1e4,step:10,onChange:function(e){e?m("height","".concat(e,"px")):f("height")}}),l.a.createElement($r,null,"Properties"))}}));return l.a.createElement(et.a,{headerText:r?"Add card":"Edit card",isOpen:!0,isLightDismiss:!0,onDismiss:_,onRenderFooterContent:S,isFooterAtBottom:!0},l.a.createElement($r,null,Dr(t)," Card"),r?l.a.createElement(Ue.a,{label:"Card Name",defaultValue:w,onChange:C}):null,l.a.createElement("div",null,e))}}})),Fr=S((function(e){var t=e.title,a=e.text,n=e.acceptCaption,r=e.cancelCaption,i=e.onAccept,o=Object(p.box)(!1),c=function(){o(!0)},s=function(){i(),o(!0)};return{render:function(){return l.a.createElement(tt.a,{hidden:o(),onDismiss:c,dialogContentProps:{type:nt.a.normal,title:t,subText:a},modalProps:{styles:{main:{maxWidth:450}}}},l.a.createElement(at.a,null,l.a.createElement(Ye.a,{onClick:c,text:r}),l.a.createElement(Qe.a,{onClick:s,text:n})))},hiddenB:o}})),Mr=S((function(e){var t=e.pageSetupB,a=t(),n=E.map((function(e){var t=e.name;return{key:t,text:t}})),r=function(e,n){if(n){var r=E.find((function(e){return e.name===n.key}));r&&(a.layoutDef=r,t(Object(v.a)({},a)))}},i=function(e){a.width=e,t(Object(v.a)({},a))};return{render:function(){return l.a.createElement(l.a.Fragment,null,l.a.createElement(Ze.a,{label:"Page Layout",options:n,defaultSelectedKey:a.layoutDef.name,onChange:r}),l.a.createElement(Ir,{defaultValue:a.width,label:"Page Width:",min:0,max:4e3,step:50,onChange:i}))}}})),Hr=S((function(e){var t=e.visibleB,a=Object(p.box)({layoutDef:w,width:0}),n=function(){var e=a(),t=e.layoutDef,n=e.width,r=Object(v.a)({},t.layout),i=A.fork();n&&(r.width="".concat(n,"px")),i.put("__editor__",{view:"editor",box:"",mode:"public"}),i.put("__meta__",{view:"meta",box:"",layouts:[r]}),i.push()},r=function(){t(!1)};return{render:function(){return l.a.createElement(tt.a,{hidden:!t(),onDismiss:r,dialogContentProps:{type:nt.a.largeHeader,title:"Edit this page?",subText:"Don't worry, you can always change these settings later."},modalProps:{isBlocking:!1,styles:{main:{maxWidth:450}}}},l.a.createElement(Mr,{pageSetupB:a}),l.a.createElement(at.a,null,l.a.createElement(Ye.a,{onClick:r,text:"Back to safety"}),l.a.createElement(Qe.a,{onClick:n,text:"Start Editing"})))},visibleB:t}})),Ur=S((function(e){var t=e.name,a=e.changed,r=function(){x(y)},i=function(){x(b)};return{render:function(){var e=null,a=x();switch(a.t){case n.Add:e=l.a.createElement(Wr,{view:a.view});break;case n.Edit:var o=function(){var e=L();return e&&e.t===p.WaveEventType.Page?e.page:null}();if(o){var c=a.name,s=o.get(c);s&&(e=l.a.createElement(Wr,{view:s.state.view,card:s}))}break;case n.Delete:var u=a.name;e=l.a.createElement(Fr,{key:Object(p.xid)(),title:"Delete Card?",text:"This card will be permanently deleted.",acceptCaption:"Delete Card",cancelCaption:"Don't delete",onAccept:function(){var e=A.fork();e.del(u),e.push()}});break;case n.Pick:var d=Tr(),m=Object(p.box)({layoutDef:Rr(d),width:d.width?Br(d.width):0}),f=it.map((function(e){var t=e.view,a=e.icon;return l.a.createElement("div",{key:t,className:zr.card,onClick:function(){x({t:n.Add,view:t})}},l.a.createElement("div",{className:zr.cardIcon},l.a.createElement(rt.a,{iconName:a})),l.a.createElement("div",{className:zr.cardCaption},Dr(t)))})),g=function(){var e=A.fork(),t=m(),a=t.layoutDef,n=t.width,r=Object(v.a)({},a.layout);n&&(r.width="".concat(n,"px")),e.set("__meta__ layouts",[r]),e.push()};e=l.a.createElement(et.a,{headerText:"Edit this page",isLightDismiss:!0,onDismiss:i,isOpen:!0,onRenderFooterContent:function(){return l.a.createElement(Xe.a,{horizontal:!0,tokens:{childrenGap:10}},l.a.createElement(Qe.a,{onClick:g},"Apply changes"))},isFooterAtBottom:!0},l.a.createElement($r,null,"Add Content"),l.a.createElement("div",{className:zr.cards},f),l.a.createElement($r,null,"Page Setup"),l.a.createElement(Mr,{key:Object(p.xid)(),pageSetupB:m}))}return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{"data-test":t,className:zr.fab,onClick:r},l.a.createElement(rt.a,{iconName:"WindowEdit"})),e)},changed:a,editorActionB:x}}));pe.register("editor",Ur);var qr={horizontal:"row",vertical:"column"},Gr={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"},Vr={start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"},Jr={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",stretch:"stretch"},Kr=function(e){var t={display:"flex"},a=qr[e.direction||""],n=Gr[e.justify||""],r=Vr[e.align||""],i=Jr[e.wrap||""];return a&&(t.flexDirection=a),n&&(t.justifyContent=n),r&&(t.alignItems=r),i&&(t.flexWrap="wrap",t.alignContent=i),t},Xr=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t,style:Kr(a)},l.a.createElement(ye,{view:a.item_view,props:a.item_props,data:a.data}))},changed:e.changed}}));pe.register("flex",Xr);var Qr=Object(d.a)({card:{display:"flex",alignItems:"center"}}),Yr=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.caption;return l.a.createElement("div",{"data-test":t,className:Qr.card},l.a.createElement("div",{className:"wave-s13"},l.a.createElement(pt,{source:e})))},changed:e.changed}}));pe.register("footer",Yr,{effect:K.Transparent});var Zr=function(e,t){var a,n=[],r=Object(k.a)(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;n.push(e[i])}}catch(c){r.e(c)}finally{r.f()}var o,l=Object(k.a)(t);try{for(l.s();!(o=l.n()).done;){delete e[o.value]}}catch(c){l.e(c)}finally{l.f()}return n},ei=function(e){return e.split(/\s/g).map((function(e){return+e}))},ti=function(e,t,a){for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=a(e[i],t[i]);return r},ai=function(e,t,a,n){for(var r=e.length,i=new Array(r),o=0;o<r;o++)i[o]=n(e[o],t[o],a[o]);return i},ni={basis:Rn.c,"basis-closed":Rn.d,"basis-open":Rn.e,cardinal:Rn.f,"cardinal-closed":Rn.g,"cardinal-open":Rn.h,smooth:Rn.i,"smooth-closed":Rn.j,"smooth-open":Rn.k,linear:Rn.l,"linear-closed":Rn.m,"monotone-x":Rn.n,"monotone-y":Rn.o,natural:Rn.p,step:Rn.q,"step-after":Rn.r,"step-before":Rn.s},ri=function(){return 0},ii=function(e){return e[0]},oi=function(e){return e[1]},li=function(e){return e[2]},ci=Object(d.a)({card:{position:"absolute",left:Ee.gap,top:Ee.gap,right:Ee.gap,bottom:Ee.gap}}),si=S((function(e){var t=e.name,a=e.state,n=e.changed,r=function(e,t){var a=function(e){var t=e._t||"u",a={};for(var n in delete e._t,e)a[n.replace(/_./g,(function(e){return e.substr(1).toUpperCase()}))]=e[n];return[t,a]}(e),n=Object(m.a)(a,2),r=n[0],i=n[1];switch(r){case"a":var o=Zr(i,["r1","r2","a1","a2"]),c=Object(m.a)(o,4),s=c[0],u=c[1],d=c[2],f=c[3],v=Rn.a()({innerRadius:s,outerRadius:u,startAngle:d*Math.PI/180,endAngle:f*Math.PI/180});return l.a.createElement("path",Object.assign({key:t},i,{d:v}));case"c":return l.a.createElement("circle",Object.assign({key:t},i));case"e":return l.a.createElement("ellipse",Object.assign({key:t},i));case"i":return l.a.createElement("image",Object.assign({key:t},i));case"l":return l.a.createElement("line",Object.assign({key:t},i));case"p":return l.a.createElement("path",Object.assign({key:t},i));case"pg":return l.a.createElement("polygon",Object.assign({key:t},i));case"pl":return l.a.createElement("polyline",Object.assign({key:t},i));case"r":return l.a.createElement("rect",Object.assign({key:t},i));case"s":var p=Zr(i,["x","y","x0","y0","curve","radial"]),g=Object(m.a)(p,6),h=g[0],b=g[1],y=g[2],x=g[3],E=g[4],w=g[5],k=ni[E]||Rn.l,_=w?""===x?Rn.v().angle(ii).outerRadius(oi).innerRadius(ri).curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]}))):x?Rn.v().angle(ii).outerRadius(li).innerRadius(oi).curve(k)(ai(ei(h),ei(x),ei(b),(function(e,t,a){return[e,t,a]}))):""===y?Rn.v().endAngle(ii).startAngle(ri).radius(oi).curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]}))):y?Rn.v().endAngle(oi).startAngle(ii).radius(li).curve(k)(ai(ei(y),ei(h),ei(b),(function(e,t,a){return[e,t,a]}))):Rn.w().curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]}))):""===x?Rn.b().x(ii).y1(oi).y0(ri).curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]}))):x?Rn.b().x(ii).y1(li).y0(oi).curve(k)(ai(ei(h),ei(x),ei(b),(function(e,t,a){return[e,t,a]}))):""===y?Rn.b().x1(ii).x0(ri).y(oi).curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]}))):y?Rn.b().x1(oi).x0(ii).y(li).curve(k)(ai(ei(y),ei(h),ei(b),(function(e,t,a){return[e,t,a]}))):Rn.u().curve(k)(ti(ei(h),ei(b),(function(e,t){return[e,t]})));return l.a.createElement("path",Object.assign({key:t},i,{d:_}));case"t":var O=Zr(i,["text"]),j=Object(m.a)(O,1)[0];return l.a.createElement("text",Object.assign({key:t},i),j);default:return l.a.createElement("use",Object.assign({key:t},i))}};return{render:function(){var e=a.view_box,n=a.width,i=a.height,o=a.stage,c=a.scene,s=o?Object(p.unpack)(o).map(r):[],u=c?Object(p.unpack)(c).map((function(e,t){var a=e.d,n=e.o;return r(Object(v.a)(Object(v.a)({},a?JSON.parse(a):{}),n?JSON.parse(n):{}),t)})):[];return l.a.createElement("div",{"data-test":t,className:ci.card},l.a.createElement("svg",{viewBox:e,width:n,height:i},l.a.createElement("g",null,s),l.a.createElement("g",null,u)))},changed:n}}));pe.register("graphics",si);var ui=Object(d.a)({card:{display:"flex",flexDirection:"column"},body:{flexGrow:1,overflow:"auto",$nest:{">*":{borderBottom:"1px solid var(--text1)",padding:"5px 0"}}},table:{width:"100%"}}),di=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.cells);Array.isArray(e)||(e=[{title:"Data"}]);var n=e.map((function(e,t){return l.a.createElement("th",{key:t},e.title)})),r=e.map((function(e){var t=e.view,a=e.props,n=e.value;return{view:t,props:Object(p.unpack)(a),value:n}})),i=Object(p.unpack)(a.data).map((function(e,t){var a=r.map((function(t,a){var n=t.view,r=t.props,i=t.value;if(null!=i)return l.a.createElement("td",null,l.a.createElement(he,{data:e,format:i}));var o={name:Object(p.xid)(),state:Object(v.a)(Object(v.a)({},r),{},{view:n,data:e}),changed:Object(p.box)()};return l.a.createElement("td",null,l.a.createElement(be,{key:a,card:o}))}));return l.a.createElement("tr",{key:t},a)}));return l.a.createElement("div",{"data-test":t,className:ui.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title||"Untitled"),l.a.createElement("div",{className:ui.body},l.a.createElement("table",{className:ui.table},l.a.createElement("thead",null,l.a.createElement("tr",null,n)),l.a.createElement("tbody",null,i))))},changed:e.changed}}));pe.register("grid",di);var mi=a(55),fi=a(704),vi=function(e){var t=e.items,a=e.value,n=t.map((function(e){return{name:e.label,collapseByDefault:e.collapsed,links:e.items.map((function(e){var t=e.name,a=e.label,n=e.icon,r=e.disabled;return{key:t,name:a,icon:n,disabled:r,url:"",onClick:function(){t.startsWith("#")?window.location.hash=t.substr(1):(A.args[t]=!0,A.push())}}}))}}));return l.a.createElement(fi.a,{groups:n,selectedKey:a})},pi=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t},l.a.createElement(vi,a))},changed:e.changed}}));pe.register("nav",pi,{effect:K.Flat});var gi=Object(d.a)({card:{display:"flex",alignItems:"center",padding:ie(8,15)},lhs:{width:39,height:39,display:"flex",alignItems:"center",cursor:"default"},burger:{$nest:{"&:hover":{color:ce("page"),cursor:"pointer"}}},icon:{fontSize:24,height:24,width:24},rhs:{flexGrow:1},subtitle:{position:"relative",top:-5}}),hi=S((function(e){var t=e.items,a=e.isOpenB,n=function(){return a(!1)};return{render:function(){return l.a.createElement(et.a,{isLightDismiss:!0,type:mi.a.smallFixedNear,isOpen:a(),onDismiss:n,hasCloseButton:!1},l.a.createElement(vi,{items:t}))},isOpenB:a}})),bi=S((function(e){var t=e.name,a=e.state,n=e.changed,r=Object(p.box)(!1),i=function(){return r(!0)};return{render:function(){var e=a.title,n=a.subtitle,o=a.icon,c=a.icon_color,s=a.nav,u=s?l.a.createElement("div",{className:ne(gi.lhs,gi.burger),onClick:i},l.a.createElement(rt.a,{className:gi.icon,iconName:"GlobalNavButton"})):l.a.createElement("div",{className:gi.lhs},l.a.createElement(rt.a,{className:gi.icon,iconName:null!==o&&void 0!==o?o:"WebComponents",style:{color:ce(c)}}));return l.a.createElement("div",{"data-test":t,className:gi.card},u,l.a.createElement("div",{className:gi.rhs},l.a.createElement("div",{className:"wave-s24 wave-w3"},e),l.a.createElement("div",{className:ne(gi.subtitle,"wave-s12")},n)),s&&l.a.createElement(hi,{items:s,isOpenB:r}))},changed:n}}));pe.register("header",bi,{effect:K.Raised});var yi=Object(d.a)({body:{position:"relative"},rail:{position:"absolute",width:"100%",opacity:.15},bar:{position:"absolute"}}),xi=function(e){var t=e.thickness,a=e.color,n=e.value;return l.a.createElement("div",{className:yi.body,style:{height:t}},l.a.createElement("div",{className:yi.rail,style:{height:t,backgroundColor:a}}),l.a.createElement("div",{className:yi.bar,style:{width:"".concat(Math.round(100*n),"%"),height:t,backgroundColor:a}}))},Ei=Object(d.a)({card:{display:"flex",flexDirection:"column",justifyContent:"space-between",padding:Ee.gap},values:{display:"flex",justifyContent:"space-between"},aux_value:{color:"var(--text7)"},caption:{color:"var(--text5)"},captions:{display:"flex",justifyContent:"space-between",color:"var(--text7)"}}),wi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement("div",{"data-test":t,className:Ei.card},l.a.createElement(he,{data:e,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement(he,{data:e,format:a.caption,className:ne(Ei.caption,"wave-s13")}),l.a.createElement("div",null,l.a.createElement("div",{className:ne(Ei.values,"wave-s18 wave-w3")},l.a.createElement("div",null,l.a.createElement(he,{data:e,format:a.value})),l.a.createElement(he,{data:e,format:a.aux_value,className:Ei.aux_value})),l.a.createElement(xi,{thickness:2,color:ce(a.plot_color),value:a.progress}),l.a.createElement("div",{className:ne(Ei.captions,"wave-s12")},l.a.createElement("div",null,l.a.createElement(he,{data:e,format:a.value_caption})),l.a.createElement("div",null,l.a.createElement(he,{data:e,format:a.aux_value_caption})))))},changed:e.changed}}));pe.register("large_bar_stat",wi);var ki=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:15},values:{display:"flex",alignItems:"baseline"},aux_value:{marginLeft:5,color:"var(--text6)"},caption:{color:"var(--text5)"}}),_i=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t,className:ki.card},l.a.createElement(he,{data:a.data,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement("div",{className:ki.values},l.a.createElement(he,{data:a.data,defaultValue:a.value,format:a.value,className:"wave-s40 wave-w2"}),l.a.createElement(he,{data:a.data,format:a.aux_value,className:ki.aux_value})),l.a.createElement(he,{data:a.data,format:a.caption,className:ne(ki.caption,"wave-s13")}))},changed:e.changed}}));pe.register("large_stat",_i);var Oi=Object(d.a)({card:{display:"flex",flexDirection:"column"},body:{flexGrow:1,overflow:"auto",$nest:{">*":{borderBottom:"1px solid var(--text1)",padding:"5px 0"}}}}),ji=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t,className:Oi.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title),l.a.createElement("div",{className:Oi.body},l.a.createElement(ye,{view:a.item_view,props:a.item_props,data:a.data})))},changed:e.changed}}));pe.register("list",ji);var Ni=Object(d.a)({item:{display:"flex",justifyContent:"space-between"},left:{flexDirection:"column"},right:{flexDirection:"column"},caption:{color:ce("text5")},aux_value:{color:ce("text5")}}),Ci={title:"Untitled"},Si=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(v.a)(Object(v.a)({},Ci),a),n=Object(p.unpack)(e.data);return l.a.createElement("div",{"data-test":t,className:Ni.item},l.a.createElement("div",{className:Ni.left},l.a.createElement(he,{data:n,format:e.title,className:"wave-s12 wave-w6"}),l.a.createElement(he,{data:n,format:e.caption,className:ne(Ni.caption,"wave-s13")})),l.a.createElement("div",{className:Ni.right},l.a.createElement(he,{data:n,format:e.value,className:"wave-s12"}),l.a.createElement(he,{data:n,format:e.aux_value,className:ne(Ni.aux_value,"wave-s13")})))},changed:e.changed}}));pe.register("list_item1",Si);var zi=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t},l.a.createElement("pre",null,JSON.stringify(a,null,2)))},changed:e.changed}}));pe.register("",zi);var Di="#ffffff #bfbfbf #808080 #404040 #000000 #6699ff #3366cc #003399 #99cc33 #00cc00 #669900 #ffcc00 #ff9900 #ff6600 #cc0000".split(/\s+/g),Li=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},canvas:{display:"flex",flexWrap:"wrap",width:320,height:320},swatches:{paddingTop:10,marginTop:15,borderTop:"1px solid #ccc"},pixel:{display:"inline-block",width:20,height:20}}),Bi=S((function(e){var t=e.name,a=e.state,n=e.changed,r="#000";return{render:function(){var e=Object(p.unpack)(a.data),n=Di.map((function(e,t){return l.a.createElement("div",{key:t,className:Li.pixel,style:{backgroundColor:e},onClick:function(){return r=e}})})),i=e.map((function(e,a){var n=e?e.color:function(e){var t=e%16%2===1;return Math.floor(e/16)%2===0?t?"#fff":"#ddd":t?"#ddd":"#fff"}(a);return l.a.createElement("div",{key:a,className:Li.pixel,style:{backgroundColor:n},onClick:function(){return function(e){var a=A.fork();a.set("".concat(t," data ").concat(e),"none"===r?null:[r]),a.push()}(a)}})}));return l.a.createElement("div",{"data-test":t,className:Li.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},a.title),l.a.createElement("div",{className:Li.canvas},i),l.a.createElement("div",{className:Li.swatches},l.a.createElement("div",{className:Li.pixel},l.a.createElement("svg",{onClick:function(){return r="none"},viewBox:"0 0 433.25 433.25",width:20,height:20},l.a.createElement("path",{d:"M418.4,192.331c19.8-19.8,19.8-51.9,0-71.7l-0.1-0.1l-78.6-78.3c-19.8-19.8-51.9-19.7-71.8,0l-169.5,169.6l-54.2,54.1 c-19.8,19.7-19.8,51.8-0.1,71.6l48.3,48.3H10c-5.5,0-10,4.5-10,10s4.5,10,10,10h297.4c5.5,0,10-4.5,10-10s-4.5-10-10-10H225 l23.9-23.7L418.4,192.331z M196.7,385.831h-76.1l-62.3-62.4c-12-12-11.9-31.4,0-43.4l47.1-47l122.2,122L196.7,385.831z M119.6,218.931l162.5-162.5c12-12,31.5-12,43.5,0l78.6,78.4c12,12,12,31.4,0,43.5l-162.4,162.8L119.6,218.931z"}))),n))},changed:n}}));pe.register("pixel_art",Bi);var Ti=S((function(e){var t=e.name,a=e.state;return{render:function(){return l.a.createElement("div",{"data-test":t},l.a.createElement(ye,{view:a.item_view,props:a.item_props,data:a.data}))},changed:e.changed}}));pe.register("repeat",Ti);var Ri=Object(d.a)({card:{display:"flex",paddingTop:5},lhs:{flexGrow:1},subtitle:{$nest:{">div>p":{margin:0}}}}),Pi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.title,n=a.subtitle,r=a.items,i=Object(p.unpack)(r),o=r&&l.a.createElement("div",null,l.a.createElement(mr,{items:i,alignment:sr.Right}));return l.a.createElement("div",{"data-test":t,className:Ri.card},l.a.createElement("div",{className:Ri.lhs},l.a.createElement("div",{className:"wave-s14 wave-w6"},e),l.a.createElement("div",{className:ne(Ri.subtitle,"wave-s12")},l.a.createElement(pt,{source:n}))),o)},changed:e.changed}}));pe.register("section",Pi,{effect:K.Transparent});var $i={linear:Rn.l,smooth:Rn.i,step:Rn.q,"step-after":Rn.r,"step-before":Rn.s},Ai=Object(d.a)({container:{width:"100%",height:"100%",position:"relative",flexGrow:1,minHeight:32}}),Ii=function(e){var t=e.value,a=e.color,n=e.data,r=e.zeroValue,i=e.curve,o=l.a.useRef(null),c=l.a.useMemo((function(){var e=Rn.t(n,(function(e){return e[t]})),a=Object(m.a)(e,2),i=a[0],o=a[1];return null!=r&&(i=Math.min(r,i),o=Math.max(r,o)),[i,o]}),[n,r]),s=Object(m.a)(c,2),u=s[0],d=s[1],f=l.a.useState(null),v=Object(m.a)(f,2),p=v[0],g=v[1],h=function e(){if(o.current){var c=o.current.getBoundingClientRect(),s=c.width,m=c.height;if(m){var f=Rn.y().domain([0,n.length-1]).range([0,s]),v=Rn.y().domain([u,d]).range([m,2]),p=$i[i]||Rn.l,h=Rn.u().defined((function(e){return e&&null!=e[t]})).x((function(e,t){return f(t)})).y((function(e){return v(e[t])})).curve(p),b=Rn.b().defined((function(e){return e&&null!=e[t]})).x((function(e,t){return f(t)})).y0((function(e){return v(null==r?u:r)})).y1((function(e){return v(e[t])})).curve(p);g(l.a.createElement("svg",{viewBox:"0 0 ".concat(s," ").concat(m),style:{position:"absolute",top:0,left:0,right:0,bottom:0}},l.a.createElement("path",{d:b(n),fill:a,fillOpacity:"0.1",strokeLinejoin:"round",strokeLinecap:"round"}),l.a.createElement("path",{d:h(n),fill:"none",stroke:a,strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"})))}else setTimeout(e,300)}},b=$(1e3,h);return l.a.useEffect((function(){return window.addEventListener("resize",b),function(){return window.removeEventListener("resize",b)}}),[]),l.a.useLayoutEffect(h,[t,a,n,r,i]),l.a.createElement("div",{ref:o,className:Ai.container},p)},Wi=Object(d.a)({container:{width:"100%",height:"100%",position:"relative",flexGrow:1,minHeight:32}}),Fi=function(e){var t=e.value,a=e.category,n=void 0===a?"x":a,r=e.color,i=e.data,o=e.zeroValue,c=l.a.useRef(null),s=l.a.useState(null),u=Object(m.a)(s,2),d=u[0],f=u[1],v=l.a.useMemo((function(){var e=Rn.t(i,(function(e){return e[t]})),a=Object(m.a)(e,2),n=a[0],r=a[1];return null!=o&&(n=Math.min(o,n),r=Math.max(o,r)),[n,r]}),[i,o]),p=Object(m.a)(v,2),g=p[0],h=p[1],b=function e(){if(c.current){var a=c.current.getBoundingClientRect(),o=a.width,s=a.height;if(s){var u=Rn.x().domain(i.map((function(e){return e[n]}))).range([0,o]).paddingInner(.1),d=Rn.y().domain([g,h]).range([s,0]),m=i.map((function(e,a){var i=u(e[n]),o=d(e[t]);return l.a.createElement("rect",{key:a,fill:r,x:i,y:o,width:2,height:s-o})}));f(l.a.createElement("svg",{viewBox:"0 0 ".concat(o," ").concat(s),style:{position:"absolute",top:0,left:0,right:0,bottom:0}},m))}else setTimeout(e,300)}},y=$(1e3,b);return l.a.useEffect((function(){return window.addEventListener("resize",y),function(){return window.removeEventListener("resize",y)}}),[]),l.a.useLayoutEffect(b,[t,n,r,i,o]),l.a.createElement("div",{ref:c,className:Wi.container},d)},Mi=Object(d.a)({card:{display:"flex",flexDirection:"column"},text:{display:"flex",justifyContent:"space-between",padding:ie(8,Ee.gap)}}),Hi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data),n="interval"===a.plot_type?l.a.createElement(Fi,{data:Object(p.unpack)(a.plot_data),category:a.plot_category,value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value}):l.a.createElement(Ii,{data:Object(p.unpack)(a.plot_data),value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value,curve:a.plot_curve||"linear"});return l.a.createElement("div",{"data-test":t,className:Mi.card},l.a.createElement("div",{className:Mi.text},l.a.createElement(he,{data:e,format:a.title||"Untitled",className:"wave-s12 wave-w6"}),l.a.createElement(he,{data:e,format:a.value,className:"wave-s12"})),n)},changed:e.changed}}));pe.register("small_series_stat",Hi);var Ui=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap},value:{lineHeight:"28px"}}),qi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement("div",{"data-test":t,className:Ui.card},l.a.createElement(he,{data:e,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement(he,{data:e,format:a.value,className:ne(Ui.value,"wave-s24 wave-w3")}))},changed:e.changed}}));pe.register("small_stat",qi);var Gi=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:15},items:{overflow:"auto",flexGrow:1,marginTop:"1em"},item:{display:"flex",justifyContent:"space-between",borderBottom:"1px solid #ddd",padding:"0.5em 0",$nest:{"&:last-child":{borderBottom:"none"}}},icon:{padding:"0.2em 0.5em 0em 0.1em"},lhs:{flexGrow:1},rhs:{textAlign:"right"},caption:{opacity:.7},auxValue:{opacity:.7},clickable:{cursor:"pointer",$nest:{"&:hover":{backgroundColor:"#fafafa"}}}}),Vi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.name,n=a.title,r=a.subtitle,i=a.items.map((function(t,a){var n=t.name,r=t.label,i=t.caption,o=t.value,c=t.value_color,s=t.aux_value,u=t.icon,d=t.icon_color,m=n?function(){return P(e,n)}:void 0;return l.a.createElement("div",{key:null!==n&&void 0!==n?n:"".concat(a,":").concat(r),className:m?ne(Gi.item,Gi.clickable):Gi.item,onClick:m},u&&l.a.createElement("div",{className:Gi.icon,style:d?{color:ce(d)}:void 0},l.a.createElement(rt.a,{iconName:u})),l.a.createElement("div",{className:Gi.lhs},l.a.createElement("div",{className:"wave-s12 wave-w6"},r),i&&l.a.createElement("div",{className:ne(Gi.caption,"wave-s12")},i)),l.a.createElement("div",{className:Gi.rhs},o&&l.a.createElement("div",{className:"wave-s13 wave-w6",style:c?{color:ce(c)}:void 0},o),s&&l.a.createElement("div",{className:ne(Gi.auxValue,"wave-s12")},s)))}));return l.a.createElement("div",{"data-test":t,className:Gi.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},n),r&&l.a.createElement("div",{className:"wave-s12"},r),l.a.createElement("div",{className:Gi.items},i))},changed:e.changed}}));pe.register("stat_list",Vi);var Ji=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:15,overflow:"auto"},items:{flexGrow:1,overflow:"auto",marginTop:"1em"},table:{borderSpacing:0,width:"100%",$nest:{tbody:{$nest:{th:{borderTop:"1px solid #ddd",textAlign:"left",padding:"0.5em 1em 0.5em 0"},td:{borderTop:"1px solid #ddd",padding:"0.5em 0 0.5em 1em"}}},td:{textAlign:"right",verticalAlign:"top"}}},thead:{opacity:.4,$nest:{th:{textAlign:"right",width:"1%",whiteSpace:"nowrap",padding:"0.5em 0 0.5em 1em"},"th:first-child":{textAlign:"left",width:"100%",padding:"0.5em 1em 0.5em 0"}}},header:{display:"flex"},caption:{opacity:.7},icon:{padding:"0.2em 0.5em 0em 0.1em"},clickable:{cursor:"pointer",$nest:{"&:hover":{backgroundColor:"#fafafa"}}}}),Ki=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.name,n=a.title,r=a.columns,i=a.subtitle,o=a.items,c=r.map((function(e,t){return l.a.createElement("th",{key:"".concat(t,":").concat(e)},e)})),s=o.map((function(t,a){var n=t.name,r=t.label,i=t.values,o=t.caption,c=t.icon,s=t.icon_color,u=n?function(){return P(e,n)}:void 0,d=i.map((function(e,t){return l.a.createElement("td",{key:"".concat(t,":").concat(e)},e)}));return l.a.createElement("tr",{key:null!==n&&void 0!==n?n:"".concat(a,":").concat(r),className:u?Ji.clickable:void 0,onClick:u},l.a.createElement("th",{key:"label"},l.a.createElement("div",{className:Ji.header},c&&l.a.createElement("div",{className:Ji.icon,style:s?{color:ce(s)}:void 0},l.a.createElement(rt.a,{iconName:c})),l.a.createElement("div",null,l.a.createElement("div",{className:"wave-w6"},r),o&&l.a.createElement("div",{className:ne(Ji.caption,"wave-s12 wave-w4")},o)))),d)}));return l.a.createElement("div",{"data-test":t,className:Ji.card},l.a.createElement("div",{className:"wave-s12 wave-w6"},n),i&&l.a.createElement("div",{className:"wave-s12"},i),l.a.createElement("div",{className:Ji.items},l.a.createElement("table",{className:ne(Ji.table,"wave-s13")},l.a.createElement("thead",{className:ne(Ji.thead,"wave-w6")},l.a.createElement("tr",null,c)),l.a.createElement("tbody",null,s))))},changed:e.changed}}));pe.register("stat_table",Ki);var Xi=Object(d.a)({card:{display:"flex",flexDirection:"column",justifyContent:"center"}}),Qi=S((function(e){var t=e.name,a=e.state,n=e.changed,r=function(e){var t=null===e||void 0===e?void 0:e.props.itemKey;t&&(t.startsWith("#")?window.location.hash=t.substr(1):(a.name?A.args[a.name]=t:A.args[t]=!0,A.push()))};return{render:function(){var e=a.link?Vn.a.links:Vn.a.tabs,n=a.items.map((function(e){var t=e.name,a=e.label,n=e.icon;return l.a.createElement(qn.a,{key:t,itemKey:t,headerText:a,itemIcon:n})}));return l.a.createElement("div",{"data-test":t,className:Xi.card},l.a.createElement(Gn.a,{linkFormat:e,onLinkClick:r,defaultSelectedKey:a.value},n))},changed:n}}));pe.register("tab",Qi,{effect:K.Transparent});var Yi=Object(d.a)({card:{display:"flex",flexDirection:"column",padding:Ee.gap,position:"relative"},body:{position:"relative",display:"flex",flexGrow:1},value_overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},aux_value:{color:"var(--text7)"}}),Zi=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement("div",{"data-test":t,className:Yi.card},l.a.createElement(he,{data:e,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement("div",{className:Yi.body},l.a.createElement($n,{thickness:2,color:ce(a.plot_color),value:a.progress}),l.a.createElement("div",{className:Yi.value_overlay},l.a.createElement(he,{data:e,format:a.value,className:"wave-s24 wave-w3"}),l.a.createElement(he,{data:e,format:a.aux_value,className:ne(Yi.aux_value,"wave-s12")}))))},changed:e.changed}}));pe.register("tall_gauge_stat",Zi);var eo=Object(d.a)({card:{display:"flex",flexDirection:"column"},text:{padding:Ee.gap},aux_value:{color:"var(--text7)"}}),to=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data),n="interval"===a.plot_type?l.a.createElement(Fi,{data:Object(p.unpack)(a.plot_data),category:a.plot_category,value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value}):l.a.createElement(Ii,{data:Object(p.unpack)(a.plot_data),value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value,curve:a.plot_curve||"linear"});return l.a.createElement("div",{"data-test":t,className:eo.card},l.a.createElement("div",{className:eo.text},l.a.createElement(he,{data:e,format:a.title||"Untitled",className:"wave-s12 wave-w6"}),l.a.createElement(he,{data:e,format:a.value,className:"wave-s24 wave-w3"}),l.a.createElement(he,{data:e,format:a.aux_value,className:ne(eo.aux_value,"wave-s12")})),n)},changed:e.changed}}));pe.register("tall_series_stat",to);var ao={ariaLabel:"More"},no=function(e){return e.map(ro)},ro=function(e){var t=e.name,a=e.label,n=e.caption,r=e.icon,i=e.items,o=e.value;A.args[t]=!1;return{key:t,text:a,ariaLabel:n||a,title:n,iconOnly:!a,iconProps:r?{iconName:r}:void 0,subMenuProps:i?{items:no(i)}:void 0,onClick:function(){"#"!==t[0]?(A.args[t]=void 0===o||o,A.push()):window.location.hash=t.substr(1)}}},io=Object(d.a)({card:{display:"flex",flexDirection:"column",justifyContent:"center"}}),oo=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=a.items,n=a.overflow_items,r=a.secondary_items,i=no(e),o=n?no(n):void 0,c=r?no(r):void 0;return l.a.createElement("div",{className:io.card},l.a.createElement(Ce.a,{"data-test":t,items:i,overflowItems:o,overflowButtonProps:ao,farItems:c,ariaLabel:"Use left and right arrow keys to navigate between commands."}))},changed:e.changed}}));pe.register("toolbar",oo,{effect:K.Transparent});var lo=Object(d.a)({card:{padding:Ee.gap,display:"flex",flexDirection:"column"},content:{flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-end"},values:{display:"flex",alignItems:"baseline"},aux_value:{marginLeft:5,color:ce("$text7")}}),co=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement("div",{"data-test":t,className:lo.card},l.a.createElement(he,{data:e,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement("div",{className:lo.content},l.a.createElement("div",{className:lo.values},l.a.createElement(he,{data:e,format:a.value,className:"wave-s18 wave-w3"}),l.a.createElement(he,{data:e,format:a.aux_value,className:ne(lo.aux_value,"wave-s13")})),l.a.createElement(xi,{thickness:2,color:ce(a.plot_color),value:a.progress})))},changed:e.changed}}));pe.register("wide_bar_stat",co);var so=Object(d.a)({card:{display:"flex",padding:ie(8,Ee.gap)},lhs:{position:"relative",width:te(50)},rhs:{width:te(50),marginLeft:Ee.gap},values:{display:"flex",alignItems:"baseline"},percentContainer:Object(v.a)({position:"absolute",top:0,right:0,bottom:0,left:0},{display:"flex",alignItems:"center",justifyContent:"center"}),percent:{opacity:.5},title:{overflow:"visible"},value:{lineHeight:28},aux_value:{color:ce("$text7"),marginLeft:5}}),uo=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data);return l.a.createElement("div",{"data-test":t,className:so.card},l.a.createElement("div",{className:so.lhs},l.a.createElement($n,{thickness:2,color:ce(a.plot_color),value:a.progress}),l.a.createElement("div",{className:so.percentContainer},l.a.createElement("div",{className:so.percent},"".concat(Math.round(100*a.progress),"%")))),l.a.createElement("div",{className:so.rhs},l.a.createElement(he,{data:e,format:a.title,className:ne(so.title,"wave-s12 wave-w6")}),l.a.createElement("div",{className:so.values},l.a.createElement(he,{data:e,format:a.value,className:"wave-s24 wave-w3"}),l.a.createElement(he,{data:e,format:a.aux_value,className:ne(so.aux_value,"wave-s13")}))))},changed:e.changed}}));pe.register("wide_gauge_stat",uo);var mo={root:{fontSize:80}},fo=Object(d.a)({card:{display:"flex",padding:Ee.gap},lhs:{paddingRight:20,textAlign:"center",display:"flex"},imgSpecified:{$nest:{"& > div":{width:te(50)}}},clickable:{cursor:"pointer"},title:{paddingBottom:17},img:{flexGrow:1,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}}),vo=S((function(e){var t=e.name,a=e.state,n=e.changed,r=a.title,i=a.caption,o=a.icon,c=a.image,s=a.category,u=a.name,d=a.color,m=function(){u&&(u.startsWith("#")?window.location.hash=u.substr(1):(A.args[u]=u,A.push()))};return{render:function(){return l.a.createElement("div",{"data-test":t,onClick:m,style:{background:d?ce(d):"inherit"},className:ne(fo.card,u?fo.clickable:"",!o&&c?fo.imgSpecified:"")},l.a.createElement("div",{className:fo.lhs},o?l.a.createElement(g.a,{iconName:o,styles:mo}):c?l.a.createElement("div",{className:fo.img,style:{backgroundImage:"url('".concat(c,"')")}}):l.a.createElement(g.a,{iconName:"MiniExpand",styles:mo})),l.a.createElement("div",null,s&&l.a.createElement("div",{className:"wave-s12 wave-w5 wave-t5"},s),l.a.createElement("div",{className:ne("wave-s20 wave-w5 wave-t9",fo.title)},r),i&&l.a.createElement("div",{className:"wave-s14 wave-w4 wave-t8"},i)))},changed:n}}));pe.register("wide_info",vo);var po=Object(d.a)({card:{display:"flex",padding:Ee.gap},plot:{display:"flex",width:te(50)},text:{width:te(50),paddingLeft:Ee.gap},values:{display:"flex",alignItems:"baseline"},value:{lineHeight:"28px"},aux_value:{color:ce("$text7"),marginLeft:5}}),go=S((function(e){var t=e.name,a=e.state;return{render:function(){var e=Object(p.unpack)(a.data),n="interval"===a.plot_type?l.a.createElement(Fi,{data:Object(p.unpack)(a.plot_data),category:a.plot_category,value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value}):l.a.createElement(Ii,{data:Object(p.unpack)(a.plot_data),value:a.plot_value,color:ce(a.plot_color),zeroValue:a.plot_zero_value,curve:a.plot_curve||"linear"});return l.a.createElement("div",{"data-test":t,className:po.card},l.a.createElement("div",{className:po.plot},n),l.a.createElement("div",{className:po.text},l.a.createElement(he,{data:e,format:a.title,className:"wave-s12 wave-w6"}),l.a.createElement("div",{className:po.values},l.a.createElement(he,{data:e,format:a.value,className:ne(po.value,"wave-s24 wave-w3")}),l.a.createElement(he,{data:e,format:a.aux_value,className:ne(po.aux_value,"wave-s13")}))))},changed:e.changed}}));pe.register("wide_series_stat",go);a(592);var ho=a(371),bo=a(47),yo=a(698),xo=a(102),Eo=a(678),wo=Object(d.a)({live:{backgroundColor:"#ff2938",color:"#fff",fontSize:11,fontWeight:700,letterSpacing:4,textAlign:"center",margin:oe(5,0,10),padding:ie(2,0),borderRadius:2}}),ko=function(){return l.a.createElement("div",null,l.a.createElement("svg",{width:"35.964439mm",height:"9.0737419mm",viewBox:"0 0 35.964439 9.0737419"},l.a.createElement("g",{transform:"matrix(0.54446153,0,0,0.54446153,-16.152559,-20.599374)"},l.a.createElement("path",{d:"m 44.823532,48.430372 q 0,0.633406 -0.452432,1.085839 -0.429811,0.429811 -1.063217,0.429811 h -5.564924 l -5.632788,4.230247 q -0.384568,0.294081 -0.837,0.316703 -0.452433,0.04524 -0.859623,-0.203595 -0.339324,-0.203595 -0.542919,-0.54292 -0.203595,-0.339324 -0.203595,-0.769135 v -9.093899 q 0,-0.633406 0.429811,-1.063217 0.452433,-0.452433 1.085839,-0.452433 0.633406,0 1.063217,0.452433 0.452433,0.429811 0.452433,1.063217 v 6.062599 l 3.642084,-2.737218 q 0.407189,-0.294082 0.904865,-0.294082 h 4.54695 v -3.031299 q 0,-0.633406 0.429811,-1.063217 0.452433,-0.452433 1.085839,-0.452433 0.633406,0 1.063217,0.452433 0.452432,0.429811 0.452432,1.063217 z"}),l.a.createElement("path",{d:"m 61.789719,48.430372 q 0,0.633406 -0.452433,1.085839 -0.429811,0.429811 -1.063217,0.429811 -0.633406,0 -1.085839,-0.429811 -0.429811,-0.452433 -0.429811,-1.085839 v -6.062599 l -9.704683,7.261546 q -0.520298,0.384568 -1.153704,0.316703 -0.633405,-0.09049 -1.017973,-0.633406 -0.384568,-0.520298 -0.27146,-1.10846 0.09049,-0.610784 0.588163,-0.995352 l 12.14782,-9.071278 q 0.361946,-0.271459 0.791757,-0.294081 0.429811,-0.04524 0.791758,0.13573 0.384568,0.158351 0.610784,0.520298 0.248838,0.361946 0.248838,0.837 z"}),l.a.createElement("path",{d:"m 78.507067,43.001179 q 0.384568,0.520297 0.27146,1.131082 -0.09049,0.588162 -0.588162,0.97273 l -12.147821,9.071278 q -0.384568,0.271459 -0.814379,0.294081 -0.407189,0.04524 -0.791757,-0.13573 -0.361946,-0.158351 -0.610784,-0.520298 -0.226217,-0.361946 -0.226217,-0.837 v -9.093899 q 0,-0.633406 0.429811,-1.063217 0.452433,-0.452433 1.085839,-0.452433 0.633406,0 1.063217,0.452433 0.452433,0.429811 0.452433,1.063217 v 6.062599 l 9.704683,-7.261546 q 0.520298,-0.384568 1.153704,-0.294081 0.633406,0.06786 1.017973,0.610784 z"}),l.a.createElement("path",{d:"m 95.722092,52.977322 q 0,0.633406 -0.452433,1.063217 -0.429811,0.452433 -1.063217,0.452433 h -6.062599 q -0.633406,0 -1.085839,-0.452433 -0.429811,-0.429811 -0.429811,-1.063217 v -3.0313 h -4.546949 q -0.633406,0 -1.085839,-0.429811 -0.429811,-0.452433 -0.429811,-1.085839 v -4.546949 q 0,-0.633406 0.429811,-1.063217 0.452433,-0.452433 1.085839,-0.452433 h 12.125198 q 0.633406,0 1.063217,0.452433 0.452433,0.429811 0.452433,1.063217 0,0.633406 -0.452433,1.085838 -0.429811,0.429812 -1.063217,0.429812 H 83.596893 v 1.515649 h 4.54695 q 0.633406,0 1.063217,0.452433 0.452433,0.429811 0.452433,1.063217 v 3.0313 h 4.546949 q 0.633406,0 1.063217,0.429811 0.452433,0.452433 0.452433,1.085839 z"}))),l.a.createElement("div",{className:ne("wave-pulse",wo.live)},"LIVE"))},_o={xs:"0px",s:"576px",m:"768px",l:"992px",xl:"1200px"},Oo=Object(p.box)([]),jo=Object(p.box)(null),No=Object(p.box)(),Co=function(e){var t;return parseInt(null!==(t=_o[e])&&void 0!==t?t:e,10)},So={order:0},zo=function(e,t){try{if("["===t[0]){var a=JSON.parse(t);if((t=a[e])||(t=a[0]),!t)return So}return"{"===t[0]?function(e){var t=e.zone,a=e.order,n=e.size,r=e.width,i=e.height;return{zone:t,order:a||0,grow:n?Object(p.parseU)(n):NaN,width:r,height:i}}(JSON.parse(t)):{zone:t,order:0}}catch(n){return So}};Object(p.on)(Nr,(function(e){var t,a=e.map((function(t,a){var n=e[a+1],r=Co(t.breakpoint),i=n?Co(n.breakpoint)-1:0,o=window.matchMedia(i?"(min-width:".concat(r,"px) and (max-width:").concat(i,".98px)"):"(min-width:".concat(r,"px)")),l=function(e){e.matches&&(jo({layout:t,index:a}),No({}))},c={layout:t,min:r,max:i,mq:o,listener:l};return o.addListener(l),o.matches&&jo({layout:t,index:a}),c})),n=Object(k.a)(Oo());try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.mq,o=r.listener;i.removeListener(o)}}catch(l){n.e(l)}finally{n.f()}Oo(a)}));var Do=Object(d.a)({flex:{position:"relative",display:"flex"},slot:{boxSizing:"border-box",transition:"box-shadow 0.3s cubic-bezier(.25,.8,.25,1)",display:"flex",flexDirection:"column",margin:oe(7),overflow:"auto",$nest:{">*":{boxSizing:"border-box",flexGrow:1}}},normal:{backgroundColor:ce("$card"),boxShadow:"0px 3px 5px ".concat(ce("$text0")),$nest:{"&:hover":{boxShadow:"0px 12px 20px ".concat(ce("$text2"))}}},raised:{color:ce("$card"),backgroundColor:ce("$themePrimary"),boxShadow:"0px 3px 7px ".concat(ce("$text3")),margin:0},flat:{backgroundColor:ce("$card"),boxShadow:"0px 3px 5px ".concat(ce("$text0"))}}),Lo=function(e){var t=_e(e).effect;return ne(Do.slot,t===K.Normal?Do.normal:t===K.Raised?Do.raised:t==K.Flat?Do.flat:"")},Bo={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"},To={start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"},Ro={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",stretch:"stretch"},Po=function(e,t){var a,n,r,i={flexDirection:"row"===e.direction?"row":"column",justifyContent:Bo[null!==(a=e.justify)&&void 0!==a?a:""],alignItems:To[null!==(n=e.align)&&void 0!==n?n:""],alignContent:Ro[null!==(r=e.wrap)&&void 0!==r?r:""],flexWrap:e.wrap?"wrap":void 0};if(e.size){var o=Object(p.parseU)(e.size);isNaN(o)?"row"===t?i.width=e.size:(i.height=e.size,i.minHeight=e.size):o>0&&(i.flexGrow=o)}else"row"===t&&(i.flexGrow=1);return i},$o=function(e){var t=e.card,a=e.slot,n=a.width,r=a.height,i=a.grow,o={position:"relative",zIndex:"__unhandled_error__"===t.name?1:void 0};return i||0===i||n||r?(i&&(o.flexGrow=i),n&&(o.width=n),r&&(o.height=r)):o.flexGrow=1,o},Ao=function e(t,a){var n=t.zone,r=t.sections;if(n.name===a)return t;if(r){var i,o=Object(k.a)(r);try{for(o.s();!(i=o.n()).done;){var l=e(i.value,a);if(l)return l}}catch(c){o.e(c)}finally{o.f()}}return null},Io=function e(t){var a=t.section,n=t.hasEditor,r=t.direction,i=a.zone,o=a.cardslots,c=a.sections,s=c?c.map((function(t){return l.a.createElement(e,{key:t.zone.name,section:t,hasEditor:n,direction:i.direction})})):o.length?o.map((function(e){var t=e.card;return l.a.createElement("div",{key:t.id,className:Lo(t),style:$o(e)},l.a.createElement(be,{card:t}),l.a.createElement(F,{name:t.name,commands:t.state.commands,changedB:t.changed,canEdit:n}))})):null;return l.a.createElement("div",{"data-test":i.name,className:Do.flex,style:Po(i,r)},s)},Wo=function(e){var t=e.name,a=e.cards,n=jo();if(!n)return l.a.createElement(l.a.Fragment,null);var r,i=n.layout,o=n.index,c=function e(t){var a;return{zone:t,sections:null===(a=t.zones)||void 0===a?void 0:a.map(e),cardslots:[]}}({name:"__main__",zones:i.zones}),s=i.width,u=i.min_width,d=i.max_width,m=i.height,f=i.min_height,v=i.max_height,p=a.find((function(e){return"editor"===e.state.view})),g=Object(k.a)(a);try{for(g.s();!(r=g.n()).done;){var h,b=r.value,y=zo(o,b.state.box),x=Ao(c,null!==(h=y.zone)&&void 0!==h?h:"");null===x||void 0===x||x.cardslots.push({card:b,slot:y})}}catch(w){g.e(w)}finally{g.f()}!function e(t){var a=t.sections;if(a){var n,r=Object(k.a)(a);try{for(r.s();!(n=r.n()).done;){e(n.value)}}catch(w){r.e(w)}finally{r.f()}}t.cardslots.sort((function(e,t){return e.slot.order-t.slot.order}))}(c);var E={width:null!==s&&void 0!==s?s:"100%",minWidth:u,maxWidth:d,height:m,minHeight:f,maxHeight:v};return"100%"===m&&(E.display="flex",E.flexDirection="column"),l.a.createElement("div",{"data-test":t,style:E},l.a.createElement(Io,{section:c,hasEditor:!!p}),p&&l.a.createElement(be,{card:p}))},Fo=S((function(e){var t=e.page,a=null,n=null;return{render:function(){var e,r=function(e,t){var a,n=[],r=[],i=Object(k.a)(e);try{for(i.s();!(a=i.n()).done;){var o=a.value;(t(o)?n:r).push(o)}}catch(l){i.e(l)}finally{i.f()}return[n,r]}(t.items(),(function(e){return"meta"===e.state.view})),i=Object(m.a)(r,2),o=i[0],c=i[1];o.length&&(null===(e=n)||void 0===e||e.dispose(),a=o[0],Cr(a),n=Object(p.on)(a.changed,(function(){return Cr(a)})));return Nr().length?l.a.createElement(Wo,{name:t.key,cards:c}):l.a.createElement(Oe,{name:t.key,cards:c})},changed:t.changed,resizedB:No}})),Mo=Object(d.a)({app:{position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:ce("$page"),color:ce("$text"),display:"flex",justifyContent:"center",overflow:"auto"},centerFullHeight:{height:te(100),display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:ce("$page"),color:ce("$text")},freeOverlay:{display:"none",position:"fixed",left:0,top:0,right:0,bottom:0},busyOverlay:{display:"block"},notFoundOverlay:{display:"flex",flexDirection:"column",alignItems:"center"}}),Ho=S((function(){var e=0,t=Object(p.box)(!1);return Object(p.on)(T,(function(a){window.clearTimeout(e),a?e=window.setTimeout((function(){return t(!0)}),500):t(!1)})),{render:function(){return l.a.createElement("div",{className:T()?ne(Mo.freeOverlay,Mo.busyOverlay):Mo.freeOverlay},l.a.createElement(yo.a,{className:Mo.centerFullHeight,style:{opacity:t()?.8:0},label:"Loading...",size:xo.a.large}))},busyB:T,spinB:t}})),Uo=S((function(){var e=Object(p.box)(!1),t=function(){e(!0)};return{render:function(){return l.a.createElement("div",{className:Mo.notFoundOverlay},l.a.createElement(ko,null),R.editable&&l.a.createElement(l.a.Fragment,null,l.a.createElement(Ye.a,{onClick:t},"Edit this page..."),l.a.createElement(Hr,{visibleB:e})))}}})),qo=S((function(){var e=function(){var e=window.location.hash;(null===e||void 0===e?void 0:e.length)>1&&(A.args["#"]=e.substr(1)),A.push()};return{init:function(){z=Object(p.connect)((function(e){switch(e.t){case p.WaveEventType.Page:case p.WaveEventType.Error:case p.WaveEventType.Exception:case p.WaveEventType.Disconnect:L(e);break;case p.WaveEventType.Reset:window.location.reload();break;case p.WaveEventType.Config:R.username=e.username,R.editable=e.editable;break;case p.WaveEventType.Data:T(!1)}})),window.addEventListener("hashchange",e)},render:function(){var e=L();if(e)switch(e.t){case p.WaveEventType.Page:var t=e.page;return l.a.createElement(Eo.a,{applyTheme:!0},l.a.createElement("div",{className:Mo.app},l.a.createElement(Fo,{key:t.key,page:t}),l.a.createElement(Ho,null),l.a.createElement(hr,null)));case p.WaveEventType.Error:var a=e.code===p.WaveErrorCode.PageNotFound?l.a.createElement(Uo,null):"Unknown Remote Error";return l.a.createElement("div",{className:ne(Mo.centerFullHeight,Mo.app)},a);case p.WaveEventType.Exception:var n="Unhandled exception: ".concat(e.error);return l.a.createElement("div",{className:ne(Mo.centerFullHeight,Mo.app)},n);case p.WaveEventType.Disconnect:var r="Disconnected. Reconnecting in ".concat(e.retry,"s");return l.a.createElement("div",{className:ne(Mo.centerFullHeight,Mo.app)},r)}return l.a.createElement(yo.a,{className:Mo.centerFullHeight,size:xo.a.large,label:"Loading ..."})},dispose:function(){window.removeEventListener("hashchange",e)},contentB:L,themeB:me}})),Go=Object(d.a)({login:{width:"100%",minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}}),Vo=function(){var e=window.location.search,t="/_auth/init".concat(e);return l.a.createElement("div",{className:Go.login},l.a.createElement("form",{action:t,method:"POST"},l.a.createElement(st.a,{type:"default",secondaryText:"using OpenID Connect."},"Log In")))},Jo=function(){var e=[{path:"/_auth/login",exact:!0,render:function(){return l.a.createElement(Vo,null)}},{path:"/",exact:!1,render:function(){return l.a.createElement(qo,null)}}];return l.a.createElement(ho.a,null,l.a.createElement(bo.c,null,e.map((function(e,t){return l.a.createElement(bo.a,{key:t,path:e.path,exact:e.exact,render:e.render})}))))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));Object(r.E)({defaultFontStyle:{fontFamily:"Inter"},palette:fe.fluentPalette}),Object(i.a)(),s.a.render(l.a.createElement(Jo,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[432,1,2]]]);
  //# sourceMappingURL=main.c7347f93.chunk.js.map