{"main":"apps/calendar/calendar.declare","kind":"run","props":{"render":"dom"},"programJson":{"classes":[{"name":"SimpleLayout","base":"Layout","body":{"tag":"SimpleLayout","decls":[{"name":"axis","type":"LayoutAxis","def":{"kind":"value","value":"y"}},{"name":"spacing","type":"number","def":{"kind":"value","value":0}},{"name":"align","type":"CrossAlign","def":{"kind":"value","value":"none"}}],"methods":[{"name":"place","body":"const axis=this.axis;const size=axis==\"x\"?\"width\":\"height\";const kids=this.laid();const weight=c=>{const f=c.flexes;return f===true?1:typeof f==\"number\"&&f>0?f:0};const shrinking=c=>weight(c)==0&&c.shrinks===true;const flexing=c=>weight(c)>0||shrinking(c);const minKey=axis==\"x\"?\"minWidth\":\"minHeight\";const maxKey=axis==\"x\"?\"maxWidth\":\"maxHeight\";const clamp=(c,v)=>{const hi=c[maxKey];const lo=c[minKey];const capped=hi>0?Math.min(v,hi):v;return Math.max(capped,lo)};const given=kids.map(c=>0);let flexN=0;let shrinkN=0;let visN=0;let fixed=0;kids.forEach((c,i)=>{if(!c.visible)return;visN=visN+1;if(weight(c)>0){flexN=flexN+1;given[i]=clamp(c,0)}else if(shrinking(c)){shrinkN=shrinkN+1;given[i]=clamp(c,c[axis==\"x\"?\"contentWidth\":\"contentHeight\"])}else fixed=fixed+c.footprint()[size]});let runLength=0;if(flexN+shrinkN>0){let at=0;kids.forEach((c,i)=>{if(!c.visible)return;const n=flexing(c)?given[i]:c.footprint()[size];runLength=Math.max(runLength,at+n);at=at+n+this.spacing})}if(flexN+shrinkN>0){fixed=fixed+this.spacing*Math.max(0,visN-1);const own=flexN>0?this.contentExtent(size):this.viewExtent(size);const room=flexN==0&&own<=0?Infinity:own;let used=fixed;kids.forEach((c,i)=>{used=used+given[i]});const held=kids.map(c=>false);if(used>room){let over=used-room;for(let round=0;round<=kids.length;round=round+1){let basis=0;kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])basis=basis+given[i]});if(basis<=0)break;let again=false;kids.forEach((c,i)=>{if(!c.visible||!shrinking(c)||held[i])return;const lo=c[minKey];if(given[i]-over*given[i]/basis<lo){over=over-(given[i]-lo);given[i]=lo;held[i]=true;again=true}});if(!again){kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])given[i]=given[i]-over*given[i]/basis});break}}}else if(flexN>0){let free=room-fixed;kids.forEach((c,i)=>{if(c.visible&&shrinking(c))free=free-given[i]});for(let round=0;round<=kids.length;round=round+1){let total=0;kids.forEach((c,i)=>{if(c.visible&&weight(c)>0&&!held[i])total=total+weight(c)});if(total<=0)break;const each=Math.max(0,free)/total;let off=0;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;const want=each*weight(c);given[i]=clamp(c,want);off=off+given[i]-want});if(Math.abs(off)<.001)break;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;const want=each*weight(c);if(off>0&&given[i]>want||off<0&&given[i]<want){held[i]=true;free=free-given[i]}})}}}const al=this.align;const cross=axis==\"x\"?\"y\":\"x\";const crossSize=axis==\"x\"?\"height\":\"width\";const centerShift=c=>c[axis==\"x\"?\"centerY\":\"centerX\"]-c[crossSize]/2;const crossOf=c=>{if(flexing(c))return{lead:0,extent:c[crossSize]};const fc=c.footprint();return{lead:axis==\"x\"?fc.y:fc.x,extent:fc[crossSize]}};let line=0;let lineBase=0;const natural=axis==\"x\"?\"contentHeight\":\"contentWidth\";const extentOf=c=>al==\"stretch\"&&this.sizedByContent(c,crossSize)?c[natural]:crossOf(c).extent;if(al!=\"none\"){if(al==\"baseline\"&&axis!=\"x\")this.refuseStackBaseline();const banded=al==\"stretch\"&&!this.sizedByChildren(crossSize);for(const c of kids){if(!c.visible)continue;if(!banded)line=Math.max(line,extentOf(c));const b=c.baseline;if(al==\"baseline\"&&typeof b==\"number\")lineBase=Math.max(lineBase,b)}if(al==\"center\"||al==\"end\")line=Math.max(line,this.viewExtent(crossSize));else if(al==\"stretch\"&&!this.sizedByChildren(crossSize))line=this.viewExtent(crossSize)}let pos=0;const boxes=kids.map((c,i)=>{const flex=c.visible&&flexing(c);const held=!c.visible&&flexing(c);const f=flex?null:c.footprint();const lead=f==null?0:axis==\"x\"?f.x:f.y;const box=axis==\"x\"?{x:pos-lead}:{y:pos-lead};if(flex)box[axis==\"x\"?\"w\":\"h\"]=given[i];else if(held)box[axis==\"x\"?\"w\":\"h\"]=axis==\"x\"?c.width:c.height;if(al!=\"none\"){const co=crossOf(c);const leadC=co.lead;let off=0;if(al==\"center\")off=(line-co.extent)/2-centerShift(c);else if(al==\"end\")off=line-co.extent;else if(al==\"baseline\"&&axis==\"x\"){const b=c.baseline;if(typeof b==\"number\")off=lineBase-b;else if(c.visible)this.refuseBaseline(c)}box[cross]=off-(al==\"baseline\"?0:leadC);if(al==\"stretch\")box.stretch=axis==\"x\"?{h:line}:{w:line}}if(c.visible)pos=pos+(flex?given[i]:f[size])+this.spacing;return box});if(flexN+shrinkN==0)return boxes;return axis==\"x\"?{boxes,contentWidth:runLength}:{boxes,contentHeight:runLength}"}]}},{"name":"Spacer","base":"View","body":{"tag":"Spacer","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"width","value":{"kind":"value","value":0}},{"name":"height","value":{"kind":"value","value":0}}],"decls":[{"name":"baseline","type":"number","def":{"kind":"value","value":0}}]}},{"name":"Control","base":"View","body":{"tag":"Control","attrs":[{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"},{"name":"focusable","value":{"kind":"code","src":" !this.disabled ","deps":["this.disabled"],"expr":"L0 n"}},{"name":"accessibilityRole","value":{"kind":"value","value":"button"}},{"name":"accessibilityExpanded","value":{"kind":"code","src":" this.menu != null ? this.menuOpen : null ","$nullsUndefined":true,"deps":["this.menu","this.menuOpen"],"expr":"L0 N ! L1 N ?"}},{"name":"keyBindings","value":{"kind":"code","src":" [\n        ({ key: \"Enter\", command: \"_keyPress\" }), ({ key: \"Space\", command: \"_keyPress\" }),\n        ({ key: \"ArrowDown\", command: \"_keyMenu\" }),\n        ({ key: \"ArrowRight\", command: \"_keyAdjust\", args: [1] }), ({ key: \"ArrowUp\", command: \"_keyAdjust\", args: [1] }),\n        ({ key: \"ArrowLeft\", command: \"_keyAdjust\", args: [-1] }), ({ key: \"ArrowDown\", command: \"_keyAdjust\", args: [-1] }) ] "}}],"decls":[{"name":"disabled","type":"boolean","def":{"kind":"code","src":" this.$provided(\"disabled\", false) ","deps":["this.$provided(\"disabled\")"]}},{"name":"focusVisible","type":"boolean","def":{"kind":"value","value":false}},{"name":"iconLeft","type":"string","def":{"kind":"value","value":""}},{"name":"iconRight","type":"string","def":{"kind":"value","value":""}},{"name":"menu","type":"View?","def":{"kind":"value","value":null}},{"name":"menuOpen","type":"boolean","def":{"kind":"code","src":" this.menu != null\n                       && (this.menu).shown === true\n                       && (this.menu).opener === this "}},{"name":"_rightIcon","type":"string","def":{"kind":"code","src":" this.iconRight != \"\" ? this.iconRight : this.menu != null ? \"ChevronIcon\" : \"\" ","deps":["this.iconRight","this.menu"]}},{"name":"command","type":"string","def":{"kind":"value","value":""}},{"name":"_commandChrome","type":"boolean","def":{"kind":"code","src":" this.command != \"\" ","deps":["this.command"]}},{"name":"flash","type":"boolean","def":{"kind":"value","value":false}},{"name":"flashMs","type":"number","def":{"kind":"value","value":220}}],"methods":[{"name":"openMenu","body":"if(this.menu==null||this.disabled)return;this.menu.showFor(this)"},{"name":"press","body":"if(this.menu!=null)this.openMenu();else if(this.command!=\"\")Commands.run(this.command)"},{"name":"focusShape","body":"return null"},{"name":"flashPress","body":"this.flash=true;this.afterDelay(this.flashMs,()=>{this.flash=false})"},{"name":"onFocus","body":"this.focusVisible=Focus.byKeyboard()"},{"name":"onBlur","body":"this.focusVisible=false"},{"name":"onPointerDown","params":[{"name":"e","type":"PointerEvent","nullable":true}],"body":"if(this.disabled)return;this.focusVisible=false;if(this.command==\"\")Focus.focus(this);if(this.menu!=null)this.openMenu()"},{"name":"_keyPress","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||e.repeat||!this.focused)return false;this.press();return!(e.key==\"Enter\"&&this.link!=\"\")"},{"name":"_keyMenu","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||e.repeat||!this.focused||this.menu==null)return false;this.openMenu();return true"},{"name":"_keyAdjust","params":[{"name":"d","type":"number"},{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||!this.focused)return false;if(this.accessibilityRole!=\"slider\"&&!(this.accessibilityRole==\"spinButton\"&&(e.key==\"ArrowUp\"||e.key==\"ArrowDown\")))return false;const step=this[d>0?\"accessibilityIncrement\":\"accessibilityDecrement\"];step.call(this);return true"},{"name":"onClick","params":[{"name":"e","type":"PointerEvent","nullable":true}],"body":"if(!this.disabled)this.press()"}]}},{"name":"IconHost","base":"View","body":{"tag":"IconHost","attrs":[{"name":"width","value":{"kind":"code","src":" classroot.kind == \"\" ? 0 : this.iconSize ","deps":["classroot.kind","this.iconSize"]}},{"name":"height","value":{"kind":"code","src":" this.iconSize ","deps":["this.iconSize"],"expr":"L0"}},{"name":"visible","value":{"kind":"code","src":" classroot.kind != \"\" ","deps":["classroot.kind"]}},{"name":"textColor","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"},"route":"provision"}],"decls":[{"name":"kind","type":"string","def":{"kind":"value","value":""}},{"name":"iconSize","type":"number","def":{"kind":"code","src":" this.$provided(\"iconSize\", 16) ","deps":["this.$provided(\"iconSize\")"]}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.$provided(\"theme\", SanFrancisco).text ","deps":["this.$provided(\"theme\")"]}}],"methods":[{"name":"onInit","body":"if(this.kind!=\"\")this.createView(this.kind,{})"}]}},{"name":"Icon","base":"View","body":{"tag":"Icon","attrs":[{"name":"width","value":{"kind":"code","src":" this.iconSize ","deps":["this.iconSize"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}}],"decls":[{"name":"_isIcon","type":"boolean","def":{"kind":"value","value":true}},{"name":"iconSize","type":"number","def":{"kind":"code","src":" this.$provided(\"iconSize\", 16) ","deps":["this.$provided(\"iconSize\")"]}},{"name":"textColor","type":"Color","def":{"kind":"code","src":" this.$provided(\"textColor\", 0x000000) ","deps":["this.$provided(\"textColor\")"]}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.textColor ","deps":["this.textColor"],"expr":"L0"}},{"name":"weight","type":"number","def":{"kind":"value","value":1.6}},{"name":"unit","type":"number","def":{"kind":"code","src":" this.width / 16 ","deps":["this.width"],"expr":"L0 K16 /"}}]}},{"name":"ChevronIcon","base":"Icon","body":{"tag":"ChevronIcon","decls":[{"name":"dir","type":"string","def":{"kind":"value","value":"down"}},{"name":"angle","type":"number","def":{"kind":"code","src":" ({ up: Math.PI, left: Math.PI / 2, right: -Math.PI / 2 })[classroot.dir] ?? 0 ","deps":["classroot.dir"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.save();d.translate(8,8);d.rotate(this.angle);d.beginPath();d.moveTo(-3.5,-1.75);d.lineTo(0,1.75);d.lineTo(3.5,-1.75);d.stroke();d.restore()"}]}},{"name":"ArrowIcon","base":"Icon","body":{"tag":"ArrowIcon","decls":[{"name":"dir","type":"string","def":{"kind":"value","value":"up"}},{"name":"angle","type":"number","def":{"kind":"code","src":" ({ down: Math.PI, left: -Math.PI / 2, right: Math.PI / 2 })[classroot.dir] ?? 0 ","deps":["classroot.dir"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.save();d.translate(8,8);d.rotate(this.angle);d.beginPath();d.moveTo(0,5.2);d.lineTo(0,-5.2);d.moveTo(-3.6,-1.6);d.lineTo(0,-5.2);d.lineTo(3.6,-1.6);d.stroke();d.restore()"}]}},{"name":"CheckIcon","base":"Icon","body":{"tag":"CheckIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.beginPath();d.moveTo(3,8.5);d.lineTo(6.5,12);d.lineTo(13,4.5);d.stroke()"}]}},{"name":"CloseIcon","base":"Icon","body":{"tag":"CloseIcon","attrs":[{"name":"accessibilityLabel","value":{"kind":"value","value":"Close"}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(4.5,4.5);d.lineTo(11.5,11.5);d.moveTo(11.5,4.5);d.lineTo(4.5,11.5);d.stroke()"}]}},{"name":"PlusIcon","base":"Icon","body":{"tag":"PlusIcon","attrs":[{"name":"accessibilityLabel","value":{"kind":"value","value":"Add"}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(8,3.5);d.lineTo(8,12.5);d.moveTo(3.5,8);d.lineTo(12.5,8);d.stroke()"}]}},{"name":"MinusIcon","base":"Icon","body":{"tag":"MinusIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(3.5,8);d.lineTo(12.5,8);d.stroke()"}]}},{"name":"LightbulbIcon","base":"Icon","body":{"tag":"LightbulbIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.fillStyle=this.ink;d.beginPath();d.moveTo(3.4,4.235);d.bezierCurveTo(3.4,6.876,4.982,7.529,5.422,12.115);d.bezierCurveTo(5.449,12.363,5.587,12.521,5.848,12.521);d.lineTo(10.152,12.521);d.bezierCurveTo(10.42,12.521,10.558,12.363,10.585,12.115);d.bezierCurveTo(11.025,7.529,12.6,6.876,12.6,4.235);d.bezierCurveTo(12.6,1.863,10.572,0,8,0);d.bezierCurveTo(5.428,0,3.4,1.863,3.4,4.235);d.closePath();d.moveTo(4.438,4.235);d.bezierCurveTo(4.438,2.379,6.068,1.038,8,1.038);d.bezierCurveTo(9.932,1.038,11.562,2.379,11.562,4.235);d.bezierCurveTo(11.562,6.209,10.255,6.676,9.636,11.483);d.lineTo(6.37,11.483);d.bezierCurveTo(5.745,6.676,4.438,6.209,4.438,4.235);d.closePath();d.moveTo(5.827,14.006);d.lineTo(10.18,14.006);d.bezierCurveTo(10.407,14.006,10.578,13.827,10.578,13.6);d.bezierCurveTo(10.578,13.38,10.407,13.202,10.18,13.202);d.lineTo(5.827,13.202);d.bezierCurveTo(5.6,13.202,5.422,13.38,5.422,13.6);d.bezierCurveTo(5.422,13.827,5.6,14.006,5.827,14.006);d.closePath();d.moveTo(8,16);d.bezierCurveTo(9.066,16,9.953,15.477,10.021,14.687);d.lineTo(5.985,14.687);d.bezierCurveTo(6.034,15.477,6.927,16,8,16);d.closePath();d.fill()"}]}},{"name":"ValueControl","base":"Control","body":{"tag":"ValueControl","attrs":[{"name":"accessibilityLabel","value":{"kind":"code","src":" this.$provided(\"fieldLabel\", \"\") ","deps":["this.$provided(\"fieldLabel\")"]}},{"name":"accessibilityError","value":{"kind":"code","src":" this.error ","deps":["this.error"],"expr":"L0"}},{"name":"accessibilityRequired","value":{"kind":"code","src":" this.required !== false && this.required !== \"\" ","deps":["this.required"]}}],"decls":[{"name":"name","type":"string","def":{"kind":"value","value":""}},{"name":"required","type":"boolean | string","def":{"kind":"value","value":false}},{"name":"judged","type":"boolean","def":{"kind":"value","value":false}},{"name":"fieldValue","type":"any","def":{"kind":"value","value":null}},{"name":"empty","type":"boolean","def":{"kind":"code","src":" this.blank(this.shown) ","deps":["this.shown","this.shown.length"]}},{"name":"refused","type":"string","def":{"kind":"value","value":""}},{"name":"_refusedValue","type":"any","def":{"kind":"value","value":null}},{"name":"commitOn","type":"\"each\" | \"end\"","def":{"kind":"value","value":"each"}},{"name":"editing","type":"boolean","def":{"kind":"value","value":false}},{"name":"_draft","type":"any","def":{"kind":"value","value":null}},{"name":"_spanning","type":"boolean","def":{"kind":"value","value":false}},{"name":"_answering","type":"boolean","def":{"kind":"value","value":false}},{"name":"shown","type":"any","def":{"kind":"code","src":" this.editing ? this._draft : this.fieldValue ","deps":["this.editing","this._draft","this.fieldValue"],"expr":"L0 L1 L2 ?"}},{"name":"_refusing","type":"boolean","def":{"kind":"code","src":" this.refused != \"\" && this.shown === this._refusedValue ","deps":["this.refused","this.shown","this._refusedValue"]}},{"name":"_missing","type":"boolean","def":{"kind":"code","src":" this.required !== false && this.required !== \"\" && this.empty ","deps":["this.required","this.empty"]}},{"name":"_requiredSays","type":"string","def":{"kind":"code","src":" typeof this.required == \"string\" ? this.required : \"Required\" ","deps":["this.required"]}},{"name":"problem","type":"string","def":{"kind":"code","src":" this._refusing ? this.refused : this._missing ? this._requiredSays : this.validate(this.shown) ","deps":["this._refusing","this.refused","this._missing","this._requiredSays","this.shown"]}},{"name":"valid","type":"boolean","def":{"kind":"code","src":" this.problem == \"\" ","deps":["this.problem"]}},{"name":"error","type":"string","def":{"kind":"code","src":" this.judged ? this.problem : \"\" ","deps":["this.judged","this.problem"]}},{"name":"form","type":"any","def":{"kind":"code","src":" this.$provided(\"_form\", null) ","deps":["this.$provided(\"_form\")"]}},{"name":"_form","type":"any","def":{"kind":"value","value":null}},{"name":"_field","type":"any","def":{"kind":"value","value":null}},{"name":"_inField","type":"any","def":{"kind":"code","src":" this.$provided(\"_field\", null) ","deps":["this.$provided(\"_field\")"]}}],"methods":[{"name":"blank","params":[{"name":"v","type":"any"}],"returns":"boolean","returnsNullable":false,"body":"if(v==null||v===\"\"||v===false)return true;return Array.isArray(v)&&v.length==0"},{"name":"validate","params":[{"name":"v","type":"any"}],"returns":"string","returnsNullable":false,"body":"return\"\""},{"name":"admit","params":[{"name":"v","type":"any"}],"returns":"any","returnsNullable":false,"body":"return v"},{"name":"commit","params":[{"name":"v","type":"any"}],"body":""},{"name":"edit","params":[{"name":"v","type":"any"}],"body":"const a=this.admit(v);if(a===null&&v!==null||a===this.shown&&v!==this.shown)return;this._take(a)"},{"name":"beginEdit","body":"if(this.editing)return;this._spanning=true;this._draft=this.fieldValue;this.editing=true"},{"name":"endEdit","body":"if(!this.editing)return;const d=this._draft;this._spanning=false;this.editing=false;if(this.commitOn==\"end\")this._commitNow(d)"},{"name":"cancelEdit","body":"this._spanning=false;this.editing=false"},{"name":"_take","params":[{"name":"v","type":"any"}],"body":"if(!this._spanning){this._commitNow(v);return}this._draft=v;if(this.commitOn!=\"end\")this._commitNow(v)"},{"name":"_commitNow","params":[{"name":"v","type":"any"}],"body":"const before=this.fieldValue;this._answering=true;this.commit(v);this.afterSettle(()=>{if(this.fieldValue===before)this._answering=false})"},{"name":"refuse","params":[{"name":"message","type":"string"}],"body":"this._refusedValue=this.shown;this.refused=message"},{"name":"judge","body":"this.judged=true"},{"name":"focusField","body":"Focus.focus(this)"},{"name":"onRetire","body":"this._member.retire()"}],"children":[{"tag":"Node","name":"_member","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"f"},{"kind":"string","value":"fld"},{"kind":"string","value":"here"},{"kind":"string","value":"v"}]},"route":"list"}],"decls":[{"name":"f","type":"any","def":{"kind":"code","src":" classroot.form ","deps":["classroot.form"],"expr":"L0"}},{"name":"fld","type":"any","def":{"kind":"code","src":" classroot._inField ","deps":["classroot._inField"],"expr":"L0"}},{"name":"here","type":"boolean","def":{"kind":"code","src":" classroot.focused ","deps":["classroot.focused"],"expr":"L0"}},{"name":"v","type":"any","def":{"kind":"code","src":" classroot.fieldValue ","deps":["classroot.fieldValue"],"expr":"L0"}},{"name":"_joined","type":"any","def":{"kind":"value","value":null}},{"name":"_held","type":"any","def":{"kind":"value","value":null}}],"methods":[{"name":"sync","body":"if(this._joined!==this.f){if(this._joined!=null)this._joined._leave(classroot);this._joined=this.f;if(this.f!=null)this.f._join(classroot)}if(this._held!==this.fld){if(this._held!=null)this._held._release(classroot);this._held=this.fld;if(this.fld!=null)this.fld._hold(classroot)}"},{"name":"onInit","body":"this.sync()"},{"name":"onChange","params":[{"name":"e","type":"ChangeEvent"}],"body":"this.sync();if(e.changed.some(c=>c.name==\"v\")){if(classroot._answering)classroot._answering=false;else if(classroot.editing)classroot.cancelEdit()}if(e.changed.some(c=>c.name==\"here\")&&!this.here&&classroot.accessibilityExpanded!==true){classroot.endEdit();classroot.judged=true}"},{"name":"retire","body":"classroot.endEdit();if(this._joined!=null)this._joined._leave(classroot);if(this._held!=null)this._held._release(classroot);this._joined=null;this._held=null"}]}]}},{"name":"TextInput","base":"ValueControl","body":{"tag":"TextInput","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"none"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.$provided(\"fieldLabel\", \"\") ","deps":["this.$provided(\"fieldLabel\")"]}},{"name":"fieldValue","value":{"kind":"code","src":" this.value ","deps":["this.value"],"expr":"L0"}},{"name":"empty","value":{"kind":"code","src":" (\"\" + (this.shown ?? \"\")).trim() == \"\" ","deps":["this.shown"]}},{"name":"keyBindings","value":{"kind":"code","src":" [ ({ key: \"Escape\", command: \"_keyEscape\" }),\n        ({ key: \"Space\", command: \"native\" }),\n        ({ key: \"Enter\", command: \"native\", when: \"_multi\" }),\n        ({ key: \"Enter\", command: \"_returnAnswered\" }), ({ key: \"Enter\", command: null }) ] "}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\")?.surface ?? 0xFFFFFF ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.error != \"\" ? (this.$provided(\"theme\")?.error ?? 0xC93429) : this.focused ? (this.$provided(\"theme\")?.accent ?? 0x2E6FE0) : (this.$provided(\"theme\")?.line ?? 0xDBE1E9)) ","deps":["this.error","this.$provided(\"theme\")","this.focused"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.$provided(\"theme\")?.fieldCornerRadius ?? this.$provided(\"theme\")?.controlCornerRadius ?? 7 ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}},{"name":"padding","value":{"kind":"code","src":" this.$root.touchFirst && !this.multiline ? [this._tall, this._pad, this._tall, this._pad] : this._pad ","deps":["this.$root.touchFirst","this.multiline","this._tall","this._pad"]}}],"decls":[{"name":"value","type":"string","def":{"kind":"value","value":""}},{"name":"text","type":"string","def":{"kind":"code","src":" \"\" + (this.shown ?? \"\") ","deps":["this.shown"]},"readOnly":true},{"name":"placeholder","type":"string","def":{"kind":"value","value":""}},{"name":"multiline","type":"boolean","def":{"kind":"value","value":false}},{"name":"enterSubmits","type":"boolean","def":{"kind":"value","value":false}},{"name":"spellcheck","type":"boolean","def":{"kind":"value","value":true}},{"name":"showsCaret","type":"boolean","def":{"kind":"value","value":true}},{"name":"purpose","type":"InputPurpose","def":{"kind":"value","value":"text"}},{"name":"concealed","type":"boolean","def":{"kind":"code","src":" this.purpose == \"password\" || this.purpose == \"newPassword\" ","deps":["this.purpose"]}},{"name":"wrap","type":"boolean","def":{"kind":"value","value":true}},{"name":"numeralWidth","type":"NumeralWidth","def":{"kind":"value","value":"normal"}},{"name":"textAlign","type":"TextAlign","def":{"kind":"value","value":"start"}},{"name":"italic","type":"boolean","def":{"kind":"value","value":false}},{"name":"selectionStart","type":"number","def":{"kind":"code","src":" this._native.selectionStart ","deps":["this._native.selectionStart"],"expr":"L0"}},{"name":"selectionEnd","type":"number","def":{"kind":"code","src":" this._native.selectionEnd ","deps":["this._native.selectionEnd"],"expr":"L0"}},{"name":"_returnGoesOnAt","type":"number","def":{"kind":"value","value":0}},{"name":"_pad","type":"number","def":{"kind":"code","src":" this.$provided(\"theme\")?.fieldPadding ?? 10 ","deps":["this.$provided(\"theme\")"]}},{"name":"baseline","type":"number","def":{"kind":"code","src":" this._lineTop + measureText(\"Hg\", this.providedTextStyle()).baseline "}},{"name":"_lineTop","type":"number","def":{"kind":"code","src":" this._lineTopOf(this.padding, this.height, this._native.textHeight, this.multiline) ","deps":["this.padding","this.height","this._native.textHeight","this.multiline","this.padding[0]","this.padding[2]"]}},{"name":"_tall","type":"number","def":{"kind":"code","src":" Math.max(this._pad, (44 - this._native.textHeight) / 2) ","deps":["this._pad","this._native.textHeight"],"expr":"L0 K44 L1 - K2 / M"}}],"methods":[{"name":"commit","params":[{"name":"t","type":"string"}],"body":"this.value=t"},{"name":"select","params":[{"name":"at","type":"any"},{"name":"end","type":"any","nullable":true}],"body":"this._native.select(at,end??void 0)"},{"name":"onEnter","body":"const f=this.form;if(f==null){this._returnGoesOnAt=Date.now();return}if(typeof f._enter==\"function\")f._enter(this);else f.submit()"},{"name":"_multi","returns":"boolean","returnsNullable":false,"body":"return this.multiline"},{"name":"_returnAnswered","returns":"boolean","returnsNullable":false,"body":"const on=Date.now()-this._returnGoesOnAt<250;this._returnGoesOnAt=0;return!on"},{"name":"_keyEscape","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(!this.editing||this.shown===this.fieldValue)return false;this.cancelEdit();return!Focus._inMember()"},{"name":"_typed","params":[{"name":"t","type":"string"}],"body":"if(!this.editing)this.beginEdit();this._take(t);if(!this.focused)this.endEdit()"},{"name":"_lineTopOf","params":[{"name":"pad","type":"any"},{"name":"h","type":"number"},{"name":"line","type":"number"},{"name":"many","type":"boolean"}],"returns":"number","returnsNullable":false,"body":"const top=typeof pad==\"number\"?pad:pad[0];const bottom=typeof pad==\"number\"?pad:pad[2];return many?top:top+(h-top-bottom-line)/2"}],"children":[{"tag":"NativeText","name":"_native","attrs":[{"name":"text","value":{"kind":"code","src":" classroot.text ","deps":["classroot.text"],"expr":"L0"}},{"name":"placeholder","value":{"kind":"code","src":" classroot.placeholder ","deps":["classroot.placeholder"],"expr":"L0"}},{"name":"multiline","value":{"kind":"code","src":" classroot.multiline ","deps":["classroot.multiline"],"expr":"L0"}},{"name":"enterSubmits","value":{"kind":"code","src":" classroot.enterSubmits ","deps":["classroot.enterSubmits"],"expr":"L0"}},{"name":"spellcheck","value":{"kind":"code","src":" classroot.spellcheck ","deps":["classroot.spellcheck"],"expr":"L0"}},{"name":"showsCaret","value":{"kind":"code","src":" classroot.showsCaret ","deps":["classroot.showsCaret"],"expr":"L0"}},{"name":"purpose","value":{"kind":"code","src":" classroot.purpose ","deps":["classroot.purpose"],"expr":"L0"}},{"name":"concealed","value":{"kind":"code","src":" classroot.concealed ","deps":["classroot.concealed"],"expr":"L0"}},{"name":"wrap","value":{"kind":"code","src":" classroot.wrap ","deps":["classroot.wrap"],"expr":"L0"}},{"name":"numeralWidth","value":{"kind":"code","src":" classroot.numeralWidth ","deps":["classroot.numeralWidth"],"expr":"L0"}},{"name":"textAlign","value":{"kind":"code","src":" classroot.textAlign ","deps":["classroot.textAlign"],"expr":"L0"}},{"name":"italic","value":{"kind":"code","src":" classroot.italic ","deps":["classroot.italic"],"expr":"L0"}}]}]}},{"name":"SunIcon","base":"Icon","body":{"tag":"SunIcon","decls":[{"name":"rays","type":"number","def":{"kind":"value","value":8}},{"name":"solid","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.fillStyle=this.ink;d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.arc(8,8,classroot.solid?3.5:3.15,0,Math.PI*2,false);if(classroot.solid)d.fill();else d.stroke();for(let i=0;i<classroot.rays;i++){const a=i/classroot.rays*Math.PI*2;const c=Math.cos(a),s=Math.sin(a);d.beginPath();d.moveTo(8+c*5.3,8+s*5.3);d.lineTo(8+c*6.9,8+s*6.9);d.stroke()}"}]}},{"name":"MoonIcon","base":"Icon","body":{"tag":"MoonIcon","decls":[{"name":"solid","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.beginPath();d.arc(8,8,5.5,.389,4.323,false);d.arc(11,5,5.5,3.531,1.181,true);d.closePath();if(classroot.solid){d.fillStyle=this.ink;d.fill()}else{d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineJoin=\"round\";d.stroke()}"}]}},{"name":"AutoIcon","base":"Icon","body":{"tag":"AutoIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.fillStyle=this.ink;d.lineWidth=this.weight/this.unit;d.beginPath();d.arc(8,8,5.4,Math.PI*.5,Math.PI*1.5,false);d.closePath();d.fill();d.beginPath();d.arc(8,8,5.4,0,Math.PI*2,false);d.stroke()"}]}},{"name":"AppearanceSwitch","base":"Control","body":{"tag":"AppearanceSwitch","attrs":[{"name":"width","value":{"kind":"code","src":" this.$provided(\"theme\").appearanceSwitchSize ","deps":["this.$provided(\"theme\")"]}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.min(this.$provided(\"theme\").controlCornerRadius, this.height / 2) ","deps":["this.$provided(\"theme\")","this.height"]}},{"name":"accessibilityRole","value":{"kind":"value","value":"switch"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"Dark appearance"}},{"name":"accessibilityChecked","value":{"kind":"code","src":" this.dark ","$nullsUndefined":true,"deps":["this.dark"],"expr":"L0"}},{"name":"tooltipLabel","value":{"kind":"code","src":" this.dark ? \"Switch to light\" : \"Switch to dark\" ","deps":["this.dark"]}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").controlPressed : this.hovered ? this.$provided(\"theme\").controlHovered : null ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"decls":[{"name":"dark","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.dark=v"},{"name":"press","body":"this.commit(!this.dark)"}],"children":[{"tag":"SunIcon","name":"_sun","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"visible","value":{"kind":"code","src":" !classroot.dark ","deps":["classroot.dark"],"expr":"L0 n"}},{"name":"ink","value":{"kind":"code","src":" classroot.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.hovered","this.$provided(\"theme\")"]}}]},{"tag":"MoonIcon","name":"_moon","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"visible","value":{"kind":"code","src":" classroot.dark ","deps":["classroot.dark"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.hovered","this.$provided(\"theme\")"]}}]}]}},{"name":"TextLabel","base":"Text","body":{"tag":"TextLabel","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"centerY","value":{"kind":"code","src":" this.baseline - this.capHeight / 2 ","deps":["this.baseline","this.capHeight"],"expr":"L0 L1 K2 / -"}}]}},{"name":"Button","base":"Control","body":{"tag":"Button","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"button"}},{"name":"height","value":{"kind":"code","src":" this.$root.touchFirst ? Math.max(44, this.$provided(\"theme\").buttonHeight) : this.$provided(\"theme\").buttonHeight ","deps":["this.$root.touchFirst","this.$provided(\"theme\")"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.$provided(\"theme\").buttonCornerRadius != null ? Math.min(this.$provided(\"theme\").buttonCornerRadius, this.height / 2) : this.$provided(\"theme\").controlCornerRadius ","deps":["this.$provided(\"theme\")","this.height"]}},{"name":"iconSize","value":{"kind":"value","value":18},"route":"provision"},{"name":"textColor","value":{"kind":"code","src":" this.ink ","deps":["this.ink"],"expr":"L0"},"route":"provision"},{"name":"width","value":{"kind":"code","src":" this._natural + this._sides ","deps":["this._natural","this._sides"],"expr":"L0 L1 +"}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}},{"name":"fill","value":{"kind":"code","src":" this.primary ? this._primaryFill : this.menuOpen ? this.$provided(\"theme\").controlSelected : this._plainFill ","deps":["this.primary","this._primaryFill","this.menuOpen","this.$provided(\"theme\")","this._plainFill"]}},{"name":"stroke","value":{"kind":"code","src":" !this.primary && this.$provided(\"theme\").buttonStrokeColor != null ? Stroke(1, this.$provided(\"theme\").buttonStrokeColor) : null ","deps":["this.primary","this.$provided(\"theme\")"]}}],"decls":[{"name":"baseline","type":"number","def":{"kind":"code","src":" this._run.y + this._run.cap.y + this._run.cap.baseline ","deps":["this._run.y","this._run.cap.y","this._run.cap.baseline"],"expr":"L0 L1 + L2 +"}},{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"primary","type":"boolean","def":{"kind":"value","value":false}},{"name":"gap","type":"number","def":{"kind":"value","value":8}},{"name":"padH","type":"number","def":{"kind":"value","value":16}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.primary ? this.$provided(\"theme\").accentTextColor : this.$provided(\"theme\").text ","deps":["this.primary","this.$provided(\"theme\")"]}},{"name":"_natural","type":"number","def":{"kind":"code","src":" this._run.contentWidth ","deps":["this._run.contentWidth"],"expr":"L0"}},{"name":"_sides","type":"number","def":{"kind":"code","src":" this.padH * 2 + (typeof this.padding == \"number\"\n        ? 2 * Math.max(0, this.padding)\n        : Math.max(0, this.padding[1]) + Math.max(0, this.padding[3])) ","deps":["this.padH","this.padding","this.padding[1]","this.padding[3]"]}},{"name":"_primaryFill","type":"Color","def":{"kind":"code","src":" this.pressed || this.menuOpen ? this.$provided(\"theme\").accentPressed : this.hovered ? this.$provided(\"theme\").accentHovered : this.$provided(\"theme\").accent ","deps":["this.pressed","this.menuOpen","this.$provided(\"theme\")","this.hovered"]}},{"name":"_plainFill","type":"Color","def":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").controlPressed : this.hovered ? this.$provided(\"theme\").controlHovered : this.$provided(\"theme\").control ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"methods":[{"name":"onClick","body":"if(this.command!=\"\")Commands.run(this.command)"},{"name":"press","body":"this.flashPress();if(this.menu!=null)this.openMenu();this.onClick()"}],"children":[{"tag":"View","name":"_run","attrs":[{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"width","value":{"kind":"code","src":" Math.min(classroot._natural, Math.max(0, classroot.width - classroot._sides)) ","deps":["classroot._natural","classroot.width","classroot._sides"],"expr":"L0 K0 L1 L2 - M m"}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"code","src":" classroot.gap ","deps":["classroot.gap"],"expr":"L0"}}],"classSlot":"Layout"},{"tag":"IconHost","name":"ico","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"kind","value":{"kind":"code","src":" classroot.iconLeft ","deps":["classroot.iconLeft"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}}]},{"tag":"TextLabel","name":"cap","attrs":[{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"shrinks","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" classroot.label != \"\" ","deps":["classroot.label"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]},{"tag":"IconHost","name":"trail","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"kind","value":{"kind":"code","src":" classroot._rightIcon ","deps":["classroot._rightIcon"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}}]}]}]}},{"name":"Segmented","base":"ValueControl","body":{"tag":"Segmented","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"radioGroup"}},{"name":"fieldValue","value":{"kind":"code","src":" this.value ","deps":["this.value"],"expr":"L0"}},{"name":"focusScope","value":{"kind":"value","value":"stop"}},{"name":"focusable","value":{"kind":"value","value":false}},{"name":"height","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedHeight ","deps":["this.$provided(\"theme\")"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this._rad ","deps":["this._rad"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").trackFill ?? this.$provided(\"theme\").control ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" Math.max(this._total, this.segmentMinWidth) + 4 ","deps":["this._total","this.segmentMinWidth"],"expr":"L0 L1 M K4 +"}},{"name":"datapath","value":{"kind":"code","src":" this._segmentRows.value ","$nullsUndefined":true,"deps":["this._segmentRows.value"],"expr":"L0"},"route":"cursor"}],"decls":[{"name":"_isSegmented","type":"boolean","def":{"kind":"value","value":true}},{"name":"items","type":"array","def":{"kind":"list","items":[]},"route":"list"},{"name":"value","type":"object","def":{"kind":"value","value":null}},{"name":"_rad","type":"number","def":{"kind":"code","src":" this.$provided(\"theme\").segmentedCornerRadius ","deps":["this.$provided(\"theme\")"]}},{"name":"segmentWidths","type":"\"equal\" | \"proportional\"","def":{"kind":"value","value":"equal"}},{"name":"segmentMinWidth","type":"number","def":{"kind":"value","value":44}},{"name":"_count","type":"number","def":{"kind":"code","src":" Math.max(1, ((this.items ?? [])).length) ","deps":["this.items"]}},{"name":"_inset","type":"number","def":{"kind":"code","src":" this.$provided(\"theme\").segmentedLabelInset ","deps":["this.$provided(\"theme\")"]}},{"name":"_needs","type":"array","def":{"kind":"code","src":"this.items??[]).map(r=>Math.max(this.segmentMinWidth,2*this._inset+Math.ceil(r.icon!=null?this.$provided(\"iconSize\",16):measureText(\"\"+(r.label??\"\"),this.providedTextStyle({fontSize:this.$provided(\"theme\").segmentedFontSize,fontWeight:\"medium\"})).width))"}},{"name":"_wants","type":"array","def":{"kind":"code","src":" this.segmentWidths == \"equal\" ? this._needs.map(() => Math.max(...this._needs)) : this._needs ","deps":["this.segmentWidths","this._needs"]}},{"name":"_total","type":"number","def":{"kind":"code","src":" this._wants.reduce((a, b) => a + b, 0) ","deps":["this._wants"]}},{"name":"_widths","type":"array","def":{"kind":"code","src":" this._wants.map((w) => w * (this.width - 4) / Math.max(1, this._total)) ","deps":["this.width","this._total","this._wants"]}},{"name":"_lefts","type":"array","def":{"kind":"code","src":" this._widths.reduce((a, w) => [...a, a[a.length - 1] + w], [2]) "}},{"name":"_idx","type":"number","def":{"kind":"code","src":"this.items??[]).findIndex(c=>c.id===this.value"}},{"name":"_lane","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"focusEntry","returns":"View","returnsNullable":true,"body":"const ss=this.segs();return ss[Math.max(0,this._idx)]??null"},{"name":"_at","params":[{"name":"a","type":"array"},{"name":"lane","type":"number"}],"returns":"number","returnsNullable":false,"body":"const i=Math.max(0,Math.min(a.length-1,Math.floor(lane)));return a[i]+((a[i+1]??a[i])-a[i])*(lane-i)"},{"name":"commit","params":[{"name":"v","type":"object"}],"body":"this.value=v"},{"name":"pick","params":[{"name":"v","type":"object"}],"body":"this.edit(v)"},{"name":"segs","returns":"array","returnsNullable":false,"body":"const out=[];for(const c of this.children){if(c._isSegment===true)out.push(c)}return out"}],"children":[{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"_lane"}},{"name":"to","value":{"kind":"code","src":" classroot._idx < 0 ? 0 : classroot._idx ","deps":["classroot._idx"],"expr":"L0 K0 < K0 L0 ?"}},{"name":"stiffness","value":{"kind":"value","value":260}},{"name":"damping","value":{"kind":"value","value":30}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"View","name":"_pill","attrs":[{"name":"y","value":{"kind":"value","value":2}},{"name":"height","value":{"kind":"code","src":" parent.height - 4 ","deps":["parent.height"],"expr":"L0 K4 -"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.max(0, (parent)._rad - 2) ","deps":["parent._rad"],"expr":"K0 L0 K2 - M"}},{"name":"x","value":{"kind":"code","src":" (parent)._at((parent)._lefts, (parent)._lane) "}},{"name":"width","value":{"kind":"code","src":" (parent)._at((parent)._widths, (parent)._lane) "}},{"name":"visible","value":{"kind":"code","src":" (parent)._idx >= 0 ","deps":["parent._idx"],"expr":"L0 K0 g"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedSelectedFill ?? this.$provided(\"theme\").surface ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.$provided(\"theme\").line) ","deps":["this.$provided(\"theme\")"]}}]},{"tag":"View","name":"_rules","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"visible","value":{"kind":"code","src":" this.$provided(\"theme\").segmentDividerColor != null ","deps":["this.$provided(\"theme\")"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"const s=parent;d.fillStyle=this.$provided(\"theme\").segmentDividerColor??this.$provided(\"theme\").line;for(let i=1;i<s._count;i++){const near=s._idx<0?1:Math.abs(s._lane+.5-i);const a=Math.max(0,Math.min(1,(near-.5)*2));if(a<=0)continue;d.globalAlpha=a;d.fillRect((s._lefts[i]??0)-.5,7,1,this.height-14)}"}]},{"tag":"Dataset","name":"_segmentRows","attrs":[{"name":"contents","value":{"kind":"code","src":" { rows: ((classroot.items ?? [])).map((c, i) => ({ ...c, i: i })) } ","deps":["classroot.items"]}}]},{"tag":"SegmentedItem","attrs":[{"name":"datapath","value":{"kind":"path","path":"rows","many":true},"route":"cursor"}]}]}},{"name":"SegmentedItem","base":"Control","body":{"tag":"SegmentedItem","attrs":[{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"width","value":{"kind":"code","src":" ((parent)._widths ?? [])[this.$data([\"i\"]) ?? 0] ?? 0 "}},{"name":"x","value":{"kind":"code","src":" ((parent)._lefts ?? [])[this.$data([\"i\"]) ?? 0] ?? 2 "}},{"name":"accessibilityRole","value":{"kind":"value","value":"radio"}},{"name":"accessibilityChecked","value":{"kind":"code","src":" this.on ","$nullsUndefined":true,"deps":["this.on"],"expr":"L0"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" \"\" + (this.$data([\"label\"]) ?? \"\") ","deps":[":label"]}},{"name":"disabled","value":{"kind":"code","src":" (parent).disabled "}},{"name":"link","value":{"kind":"code","src":" !this.disabled && classroot.location != \"\" ? \"#\" + classroot.location : \"\" ","deps":["this.disabled","classroot.location"]}},{"name":"replace","value":{"kind":"code","src":" (parent).replace ","deps":["parent.replace"],"expr":"L0"}}],"decls":[{"name":"_isSegment","type":"boolean","def":{"kind":"value","value":true}},{"name":"on","type":"boolean","def":{"kind":"code","src":" (parent).value === this.$data([\"id\"]) ","deps":["parent.value",":id"],"expr":"L0 L1 ="}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.on ? this.$provided(\"theme\").segmentedSelectedTextColor ?? this.$provided(\"theme\").text\n        : this.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["this.on","this.$provided(\"theme\")","this.hovered"]}},{"name":"location","type":"string","def":{"kind":"code","src":" \"\" + (this.$data([\"location\"]) ?? \"\") ","deps":[":location"]}}],"methods":[{"name":"press","body":"if(!this.disabled)this.parent.pick(this.$data([\"id\"]))"},{"name":"onClick","body":"this.press()"},{"name":"onKeyDown","params":[{"name":"e","type":"KeyEvent"}],"body":"if(e.key==\"Enter\"||e.key==\" \"){this.press();return}$base.onKeyDown(e)","usesSuper":true},{"name":"focusShape","body":"return{x:2,y:2,w:this.width-4,h:this.height-4,rad:Math.max(0,this.parent._rad-2)}"}],"children":[{"tag":"View","name":"_bg","attrs":[{"name":"x","value":{"kind":"value","value":2}},{"name":"y","value":{"kind":"value","value":2}},{"name":"width","value":{"kind":"code","src":" parent.width - 4 ","deps":["parent.width"],"expr":"L0 K4 -"}},{"name":"height","value":{"kind":"code","src":" parent.height - 4 ","deps":["parent.height"],"expr":"L0 K4 -"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.max(0, (parent.parent)._rad - 2) "}},{"name":"fill","value":{"kind":"code","src":" parent.on ? null : this.stateFill ","deps":["parent.on","this.stateFill"],"expr":"L0 N L1 ?"}}],"decls":[{"name":"stateFill","type":"Color?","def":{"kind":"code","src":" parent.pressed ? this.$provided(\"theme\").controlPressed : parent.hovered ? this.$provided(\"theme\").controlHovered : null ","$nullsUndefined":true,"deps":["parent.pressed","this.$provided(\"theme\")","parent.hovered"]}}]},{"tag":"TextLabel","name":"_t","attrs":[{"name":"wrap","value":{"kind":"value","value":false}},{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedFontSize ","deps":["this.$provided(\"theme\")"]}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"x","value":{"kind":"code","src":" (parent.parent)._inset ?? 0 "}},{"name":"width","value":{"kind":"code","src":" Math.max(0, parent.width - 2 * ((parent.parent)._inset ?? 0)) "}},{"name":"textAlign","value":{"kind":"value","value":"center"}},{"name":"visible","value":{"kind":"code","src":" this.$data([\"label\"]) != null && this.$data([\"icon\"]) == null ","deps":[":label",":icon"],"expr":"L0 N ! L1 N = L0 N ! ?"}},{"name":"textColor","value":{"kind":"code","src":" parent.ink ","deps":["parent.ink"],"expr":"L0"}},{"name":"text","value":{"kind":"code","src":" \"\" + (this.$data([\"label\"]) ?? \"\") ","deps":[":label"]}}]},{"tag":"IconHost","name":"_ico","attrs":[{"name":"kind","value":{"kind":"code","src":" \"\" + (this.$data([\"icon\"]) ?? \"\") ","deps":[":icon"]}},{"name":"ink","value":{"kind":"code","src":" parent.ink ","deps":["parent.ink"],"expr":"L0"}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}}]}]}},{"name":"FocusRing","base":"View","body":{"tag":"FocusRing","attrs":[{"name":"opacity","value":{"kind":"value","value":0}},{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.02 && (!this.overlayUp || this._focusInOverlay) ","deps":["this.opacity","this.overlayUp","this._focusInOverlay"],"expr":"L0 K0.02 > L1 n L1 n L2 ? L0 K0.02 > ?"}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"}],"decls":[{"name":"overlayUp","type":"boolean","def":{"kind":"value","value":false}},{"name":"_focusInOverlay","type":"boolean","def":{"kind":"value","value":false}},{"name":"_tx","type":"number","def":{"kind":"value","value":0}},{"name":"_ty","type":"number","def":{"kind":"value","value":0}},{"name":"_tw","type":"number","def":{"kind":"value","value":0}},{"name":"_th","type":"number","def":{"kind":"value","value":0}},{"name":"_trad","type":"number","def":{"kind":"value","value":8}},{"name":"_trot","type":"number","def":{"kind":"value","value":0}},{"name":"_rad","type":"number","def":{"kind":"value","value":8}},{"name":"shown","type":"boolean","def":{"kind":"value","value":false}},{"name":"placed","type":"boolean","def":{"kind":"value","value":false}},{"name":"_theme","type":"any","def":{"kind":"value","value":null}},{"name":"idle","type":"boolean","def":{"kind":"value","value":false}},{"name":"_gen","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"ringTheme","returns":"any","returnsNullable":false,"body":"return this._theme??this.$provided(\"theme\")"},{"name":"ringRole","body":"const r=this.$provided(\"theme\").focusRingStyle;return r==false?\"off\":r==true||r==null?\"both\":r"},{"name":"restRole","body":"const r=this.ringRole();return r==\"both\"||r==\"rest\""},{"name":"travelRole","body":"const r=this.ringRole();return r==\"both\"||r==\"travel\""},{"name":"snapTo","body":"this.x=this._tx;this.y=this._ty;this.width=this._tw;this.height=this._th;this._rad=this._trad;this.rotation=this._trot"},{"name":"_restack","params":[{"name":"v","type":"View"}],"body":"if(classroot.paintsIn!=null)return;let top=null;let pinned=false;for(let n=v;n!=null&&n!=this.$root;n=n.paintsIn!=null?n.paintsIn:n.parent){if(n.ignoreScroll)pinned=true;top=n}let chrome=null;if(!pinned&&!this.overlayUp&&top!=null){let after=false;for(const k of this.$root.childViews){if(k==top){after=true;continue}if(after&&k!=classroot&&k.ignoreScroll&&k.visible&&k.pointerEvents!=\"none\"&&k.height<this.$root.height/2){chrome=k;break}}}classroot.raise(chrome)"},{"name":"_noteOverlayFocus","body":"const c=Keyboard._claimant();const f=Focus.getFocus();let n=f;while(n!=null&&n!=c)n=n.parent;this._focusInOverlay=c!=null&&n==c&&f!=c"},{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"const Q=Math.PI/2;const dist=Math.abs(this.x-this._tx)+Math.abs(this.y-this._ty)+Math.abs(this.width-this._tw)+Math.abs(this.height-this._th);const lw=this.$provided(\"theme\").focusRingWidth;let L=0,T=0,R=this.width,B=this.height;if(Math.abs(this.rotation)<.01){const sc=classroot.paintsIn!=null?classroot.paintsIn:this.$root;const m=lw/2;L=Math.max(0,Math.min(sc.scrollX+m,this._tx)-this.x);T=Math.max(0,Math.min(sc.scrollY+m,this._ty)-this.y);R=Math.min(this.width,Math.max(sc.scrollX+sc.width-m,this._tx+this._tw)-this.x);B=Math.min(this.height,Math.max(sc.scrollY+sc.height-m,this._ty+this._th)-this.y);if(R-L<1||B-T<1)return}const w=R-L,h=B-T;const small=Math.min(w,h)<40;const cov=this.$provided(\"theme\").focusSights==true&&!small?Math.max(.22,1-dist/16):1;const iw=this.$provided(\"theme\").focusRingInnerWidth;const pass=(ins,lwp,color)=>{const r=Math.max(1,Math.min(this._rad-ins,Math.min(w,h)/2-ins));const ax=Math.max(0,((w-2*ins)/2-r)*cov);const ay=Math.max(0,((h-2*ins)/2-r)*cov);d.strokeStyle=color;d.lineWidth=lwp;d.beginPath();const x0=L+ins,y0=T+ins,x1=R-ins,y1=B-ins;d.moveTo(x0+r+ax,y0);d.lineTo(x0+r,y0);d.arc(x0+r,y0+r,r,-Q,Math.PI,true);d.lineTo(x0,y0+r+ay);d.moveTo(x1-r-ax,y0);d.lineTo(x1-r,y0);d.arc(x1-r,y0+r,r,-Q,0);d.lineTo(x1,y0+r+ay);d.moveTo(x1,y1-r-ay);d.lineTo(x1,y1-r);d.arc(x1-r,y1-r,r,0,Q);d.lineTo(x1-r-ax,y1);d.moveTo(x0+r+ax,y1);d.lineTo(x0+r,y1);d.arc(x0+r,y1-r,r,Q,Math.PI);d.lineTo(x0,y1-r-ay);d.stroke()};const t=this.ringTheme();pass(0,lw,t.focusRingColor??t.accent);if(iw>0)pass((lw+iw)/2,iw,t.focusRingInnerColor??t.surface)"}],"children":[{"tag":"KeyListener","name":"_claims","methods":[{"name":"onNavClaim","params":[{"name":"on","type":"boolean"}],"body":"classroot.overlayUp=on;classroot._noteOverlayFocus()"}]},{"tag":"Node","name":"_focus","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"g"}]},"route":"list"}],"decls":[{"name":"g","type":"object","def":{"kind":"code","src":" this.$root.focusGeometry ","deps":["this.$root.focusGeometry"],"expr":"L0"}}],"methods":[{"name":"onChange","body":"if(this.g==null)return;const g=this.g;if(g.root!=this.$root)return;const prev=this._lastTarget;const prevHome=this._lastHome;const hadHome=this._hasHome===true;const px=classroot.x;const py=classroot.y;classroot.paintsIn=g.scroller==this.$root?null:g.scroller;const homed=g.scroller!=this.$root;const gx=g.homeX;const gy=g.homeY;if(hadHome&&prevHome!=g.scroller){const toRoot=prevHome==null||prevHome==this.$root?{x:px,y:py}:(()=>{const o=prevHome.rootOrigin();return{x:o.x+px-prevHome.scrollX,y:o.y+py-prevHome.scrollY}})();const dst=!homed||g.scroller==this.$root?toRoot:(()=>{const o=g.scroller.rootOrigin();return{x:toRoot.x-o.x+g.scroller.scrollX,y:toRoot.y-o.y+g.scroller.scrollY}})();classroot.x=dst.x;classroot.y=dst.y}const gap=this.$provided(\"theme\").focusRingGap;const lw=this.$provided(\"theme\").focusRingWidth;const iw=this.$provided(\"theme\").focusRingInnerWidth;const outside=gap+iw+lw/2;const sc=homed&&g.scroller!=this.$root?g.scroller:null;const gw=g.homeW;const gh=g.homeH;const turned=g.homeRot!=0;const cutY=!turned&&sc!=null&&sc.scrolls!=\"y\"&&(gy-outside<0||gy+gh+outside>sc.height);const cutX=!turned&&sc!=null&&sc.scrolls!=\"x\"&&(gx-outside<0||gx+gw+outside>sc.width);const off=cutX||cutY?-(lw/2+1):outside;const ca=Math.cos(g.homeRot*Math.PI/180),sa=Math.sin(g.homeRot*Math.PI/180);const nx=gx-off*ca+off*sa,ny=gy-off*sa-off*ca;const moved=Math.abs(nx-classroot._tx)+Math.abs(ny-classroot._ty)+Math.abs(gw+2*off-classroot._tw)+Math.abs(gh+2*off-classroot._th)>.5;classroot._tx=nx;classroot._ty=ny;classroot._tw=gw+2*off;classroot._th=gh+2*off;classroot._trad=g.homeRad+off;classroot._trot=g.homeRot;classroot._theme=g.theme;this._lastTarget=g.view;this._lastHome=g.scroller;this._hasHome=true;if(classroot.shown)classroot._restack(g.view);if(prev==g.view&&moved)classroot.snapTo()"}]},{"tag":"Node","name":"_focusMove","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"at"},{"kind":"string","value":"byKeys"}]},"route":"list"}],"decls":[{"name":"at","type":"View?","def":{"kind":"code","src":" this.$root.focusedView ","$nullsUndefined":true,"deps":["this.$root.focusedView"],"expr":"L0"}},{"name":"byKeys","type":"boolean","def":{"kind":"code","src":" Focus.byKeyboard() "}}],"methods":[{"name":"onChange","body":"classroot._noteOverlayFocus();const v=this.at;if(v==null){classroot.shown=false;return}let n=v;for(;n!=null&&n.parent!=null;n=n.parent){}if(n!=this.$root){classroot.shown=false;return}if(v.focusable==\"quiet\"){classroot.shown=false;classroot.placed=false;return}if(!Focus.byKeyboard()){classroot.shown=false;classroot.snapTo();classroot.placed=true;return}if(classroot.ringRole()==\"off\"){classroot.shown=false;return}if(!classroot.placed||this.$provided(\"theme\").focusAnimate==false||!classroot.travelRole())classroot.snapTo();classroot.placed=true;classroot.shown=true;classroot._restack(v);if(classroot.restRole()){classroot.idle=false;return}classroot._gen=classroot._gen+1;const g2=classroot._gen;classroot.idle=false;this.afterDelay(1e3,()=>{if(classroot._gen==g2)classroot.idle=true})"}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" classroot._tx ","deps":["classroot._tx"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":16}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"y"}},{"name":"to","value":{"kind":"code","src":" classroot._ty ","deps":["classroot._ty"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":16}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"width"}},{"name":"to","value":{"kind":"code","src":" classroot._tw ","deps":["classroot._tw"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":18}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" classroot._th ","deps":["classroot._th"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":18}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"_rad"}},{"name":"to","value":{"kind":"code","src":" classroot._trad ","deps":["classroot._trad"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":20}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"rotation"}},{"name":"to","value":{"kind":"code","src":" classroot._trot ","deps":["classroot._trot"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":20}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" classroot.shown && !classroot.idle ? 0.9 : 0 ","deps":["classroot.shown","classroot.idle"],"expr":"L0 L1 n & K0.9 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":90}},{"name":"damping","value":{"kind":"value","value":20}}]}]}},{"name":"OverlayStrata","base":"View","body":{"tag":"OverlayStrata","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"ignoreScroll","value":{"kind":"value","value":true}},{"name":"width","value":{"kind":"code","src":" this.parent == this.$root && this.$root.hostWidth > 0 ? Math.min(this.$root.width, this.$root.hostWidth) : (this.parent).width ","deps":["this.parent","this.$root.hostWidth","this.$root.width","this.parent.width"],"expr":"L0 L%this.$root = L1 K0 > & L2 L1 m L3 ?"}},{"name":"height","value":{"kind":"code","src":" this.parent == this.$root && this.$root.hostHeight > 0 ? Math.min(this.$root.height, this.$root.hostHeight) : (this.parent).height ","deps":["this.parent","this.$root.hostHeight","this.$root.height","this.parent.height"],"expr":"L0 L%this.$root = L1 K0 > & L2 L1 m L3 ?"}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}],"decls":[{"name":"_isOverlayStrata","type":"boolean","def":{"kind":"value","value":true}},{"name":"stack","type":"array","def":{"kind":"list","items":[]},"route":"list"},{"name":"handled","type":"object","def":{"kind":"value","value":null}}],"methods":[{"name":"opened","params":[{"name":"v","type":"View"}],"body":"this.stack=this.stack.filter(s=>s!=v).concat([v])"},{"name":"closedIt","params":[{"name":"v","type":"View"}],"body":"this.stack=this.stack.filter(s=>s!=v)"},{"name":"top","returns":"View","returnsNullable":true,"body":"const c=Keyboard._claimant();return this.stack.indexOf(c)>=0?c:null"}],"children":[{"tag":"View","name":"overlays","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}]},{"tag":"View","name":"notice","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}]}]}},{"name":"Floating","base":"View","body":{"tag":"Floating","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"pointerEvents","value":{"kind":"code","src":" this.shown ? \"auto\" : \"none\" ","deps":["this.shown"]}},{"name":"visible","value":{"kind":"code","src":" this.present ","deps":["this.present"],"expr":"L0"}},{"name":"paintsIn","value":{"kind":"code","src":" this.host ","$nullsUndefined":true,"deps":["this.host"],"expr":"L0"},"route":"class"},{"name":"scale","value":{"kind":"code","src":" this._baseScale ","deps":["this._baseScale"],"expr":"L0"}},{"name":"rotation","value":{"kind":"code","src":" this._baseRotation ","deps":["this._baseRotation"],"expr":"L0"}},{"name":"outsidePress","value":{"kind":"code","src":" this.shown ? this.pressPolicy : \"none\" ","deps":["this.shown","this.pressPolicy"]}},{"name":"scrollBelow","value":{"kind":"code","src":" this.shown ? this.scrollPolicy : \"none\" ","deps":["this.shown","this.scrollPolicy"]}},{"name":"keyBindings","value":{"kind":"code","src":" [ ({ key: \"Escape\", command: \"_keyEscape\" }) ] "}}],"decls":[{"name":"_form","type":"any","def":{"kind":"value","value":null}},{"name":"_field","type":"any","def":{"kind":"value","value":null}},{"name":"_sendHold","type":"any","def":{"kind":"code","src":" this._sendHolder ","deps":["this._sendHolder"],"expr":"L0"}},{"name":"_notice","type":"boolean","def":{"kind":"value","value":false}},{"name":"shown","type":"boolean","def":{"kind":"value","value":false}},{"name":"present","type":"boolean","def":{"kind":"value","value":false}},{"name":"openT","type":"number","def":{"kind":"value","value":0}},{"name":"host","type":"View?","def":{"kind":"value","value":null}},{"name":"_hostW","type":"number","def":{"kind":"code","src":" this.host != null ? this.host.width : this.$root.hostWidth > 0 ? this.$root.hostWidth : this.$root.width "}},{"name":"_hostH","type":"number","def":{"kind":"code","src":" this.host != null ? this.host.height : this.$root.hostHeight > 0 ? this.$root.hostHeight : this.$root.height "}},{"name":"opener","type":"View?","def":{"kind":"value","value":null}},{"name":"pressPolicy","type":"\"dismiss\" | \"dismissAndDeliver\" | \"block\" | \"ignore\"","def":{"kind":"value","value":"dismiss"}},{"name":"scrollPolicy","type":"\"block\" | \"allow\" | \"dismiss\"","def":{"kind":"value","value":"block"}},{"name":"takesFocus","type":"boolean","def":{"kind":"value","value":false}},{"name":"_savedFocus","type":"View?","def":{"kind":"value","value":null}},{"name":"_savedParent","type":"View?","def":{"kind":"value","value":null}},{"name":"_savedAt","type":"number","def":{"kind":"value","value":-1}},{"name":"_savedRing","type":"boolean","def":{"kind":"value","value":false}},{"name":"_hostedLayer","type":"boolean","def":{"kind":"value","value":false}},{"name":"_sharesProgram","type":"boolean","def":{"kind":"value","value":true}},{"name":"_baseScale","type":"number","def":{"kind":"value","value":1}},{"name":"_baseRotation","type":"number","def":{"kind":"value","value":0}},{"name":"_live","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"_waitsOnSend","returns":"boolean","returnsNullable":false,"body":"return this._sendHolder.waits()"},{"name":"_strata","returns":"OverlayStrata","returnsNullable":false,"body":"let s=null;for(const c of this.$root.children){if(c._isOverlayStrata===true)s=c}if(s==null)return this.$root.createView(\"OverlayStrata\",{});s.raise();return s"},{"name":"_layerFor","params":[{"name":"s","type":"OverlayStrata"}],"returns":"View","returnsNullable":false,"body":"if(this._notice)return s.notice;const own=this.$provided(\"overlays\",null);this._hostedLayer=false;if(own!=null)return own;const hosts=this.$root.hostProvided(\"overlays\",null);if(hosts==null)return s.overlays;this._hostedLayer=true;return hosts"},{"name":"_takeProgramTransform","body":"if(!this._hostedLayer||!this._sharesProgram||this.host==null){this._baseScale=1;this._baseRotation=0;return}const t=this.$root.transformTo(this.host);this._baseScale=t.scale;this._baseRotation=t.rotation*180/Math.PI"},{"name":"commit","params":[{"name":"open","type":"boolean"}],"body":"this.shown=open"},{"name":"_sync","body":"if(this.shown&&!this._live){this._live=true;this._opening()}else if(!this.shown&&this._live){this._live=false;this._closing()}"},{"name":"show","body":"if(!this.shown)this.commit(true);this._sync()"},{"name":"_opening","body":"const s=this._strata();this.host=this._layerFor(s);this._takeProgramTransform();this.present=true;s.opened(this);if(this.pressPolicy!=\"ignore\")Keyboard.navClaim(this,true);if(this.takesFocus){this._savedFocus=Focus.getFocus();this._savedParent=this._savedFocus!=null?this._savedFocus.parent:null;this._savedAt=this._savedParent!=null?this._savedParent.childViews.indexOf(this._savedFocus):-1;this._savedRing=this._savedFocus!=null&&Focus.byKeyboard();this.afterSettle(()=>this.focusFirst())}"},{"name":"showFor","params":[{"name":"v","type":"View"}],"body":"this.opener=v;this.show()"},{"name":"focusFirst","body":"if(!Focus.focusIn(this))this._holdFocusItself()"},{"name":"_holdFocusItself","body":"this.focusable=true;Focus.focus(this)"},{"name":"close","body":"if(this.shown)this.commit(false);this._sync()"},{"name":"_closing","body":"this._strata().closedIt(this);Keyboard.navClaim(this,false);if(this._savedFocus!=null||this.restoresFocusTo!=null)this.afterDelay(0,()=>this.afterDelay(0,()=>{const f=Focus.getFocus();let inside=false;for(let p=f;p!=null;p=p.parent)if(p==this)inside=true;if(f==null||inside||Focus.holds(this))Focus._giveBack(this);else{this._savedFocus=null;this._savedParent=null}}));this.closed()"},{"name":"closed","body":""},{"name":"onRetire","body":"if(!this._live)return;this._live=false;for(const c of this.$root.children){if(c._isOverlayStrata===true)c.closedIt(this)}Keyboard.navClaim(this,false)"},{"name":"isTop","returns":"boolean","returnsNullable":false,"body":"return this._strata().top()==this"},{"name":"anchorBox","params":[{"name":"v","type":"View","nullable":true}],"returns":"object","returnsNullable":false,"body":"if(v==null)return{x:0,y:0,w:0,h:0};const o=this.toLayer(v,0,0);const k=this.host!=null?v.transformTo(this.host).scale:1;return{x:o.x,y:o.y,w:v.width*k,h:v.height*k}"},{"name":"toLayer","params":[{"name":"v","type":"View"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"return this._through(v.transformTo(this.host!=null?this.host:this._screen()),px,py)"},{"name":"_screen","returns":"View","returnsNullable":false,"body":"if(this.host==null)return this.$root;let n=this.host;while(n.parent!=null)n=n.parent;return n"},{"name":"_toScreen","params":[{"name":"v","type":"View"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"return this._through(v.transformTo(this._screen()),px,py)"},{"name":"_through","params":[{"name":"t","type":"object"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"const a=t.rotation;return{x:t.x+t.scale*(px*Math.cos(a)-py*Math.sin(a)),y:t.y+t.scale*(px*Math.sin(a)+py*Math.cos(a))}"},{"name":"keepOnApp","params":[{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"object","returnsNullable":false,"body":"const scr=this._screen();if(this.host==null)return{x:Math.max(4,Math.min(scr.width-w-4,x)),y:Math.max(4,Math.min(scr.height-h-4,y))};const out=this.host.transformTo(scr);const cs=[this._through(out,x,y),this._through(out,x+w,y),this._through(out,x,y+h),this._through(out,x+w,y+h)];const minX=Math.min(...cs.map(c=>c.x));const maxX=Math.max(...cs.map(c=>c.x));const minY=Math.min(...cs.map(c=>c.y));const maxY=Math.max(...cs.map(c=>c.y));const dx=maxX>scr.width-4?scr.width-4-maxX:0;const dy=maxY>scr.height-4?scr.height-4-maxY:0;const sx=minX+dx<4?4-minX:dx;const sy=minY+dy<4?4-minY:dy;if(sx==0&&sy==0)return{x,y};const back=scr.transformTo(this.host);const p0=this._through(back,cs[0].x,cs[0].y);const p1=this._through(back,cs[0].x+sx,cs[0].y+sy);return{x:x+p1.x-p0.x,y:y+p1.y-p0.y}"},{"name":"onOutsidePress","body":"if(!this._waitsOnSend())this.close()"},{"name":"escape","body":"this.close()"},{"name":"_keyEscape","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(!this.shown)return false;if(this._waitsOnSend())return true;this.escape();return true"}],"children":[{"tag":"SendHold","name":"_sendHolder","attrs":[{"name":"open","value":{"kind":"code","src":" classroot.shown ","deps":["classroot.shown"],"expr":"L0"}}]},{"tag":"Spring","name":"_motion","attrs":[{"name":"attribute","value":{"kind":"value","value":"openT"}},{"name":"to","value":{"kind":"code","src":" classroot.shown ? 1 : 0 ","deps":["classroot.shown"],"expr":"L0 K1 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":520}},{"name":"damping","value":{"kind":"value","value":40}},{"name":"epsilon","value":{"kind":"value","value":0.01}}],"methods":[{"name":"onStop","body":"if(!classroot.shown)classroot.present=false"}]},{"tag":"Node","name":"_watch","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"open"}]},"route":"list"}],"decls":[{"name":"open","type":"boolean","def":{"kind":"code","src":" classroot.shown ","deps":["classroot.shown"],"expr":"L0"}}],"methods":[{"name":"onInit","body":"if(this.open)this.afterSettle(()=>classroot._sync())"},{"name":"onChange","body":"classroot._sync()"}]}]}},{"name":"SendHold","base":"Node","body":{"tag":"SendHold","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"open"}]},"route":"list"}],"decls":[{"name":"open","type":"boolean","def":{"kind":"value","value":false}},{"name":"holds","type":"any[]","def":{"kind":"value","value":[]}},{"name":"held","type":"boolean","def":{"kind":"code","src":" this.holds.length > 0 ","deps":["this.holds.length"],"expr":"L0 K0 >"}},{"name":"_told","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"hold","params":[{"name":"by","type":"any"},{"name":"on","type":"boolean"}],"body":"const was=this.holds.includes(by);if(on&&!was)this.holds=[...this.holds,by];else if(!on&&was)this.holds=this.holds.filter(h=>h!==by);if(this.holds.length==0)this._told=false"},{"name":"waits","returns":"boolean","returnsNullable":false,"body":"if(!this.held)return false;if(!this._told){this._told=true;Accessibility.announce(\"Still sending\")}return true"},{"name":"onChange","params":[{"name":"e","type":"ChangeEvent"}],"body":"if(!this.open){this.holds=[];this._told=false}"}]}},{"name":"Tooltip","base":"Floating","body":{"tag":"Tooltip","attrs":[{"name":"pressPolicy","value":{"kind":"value","value":"ignore"}},{"name":"scrollPolicy","value":{"kind":"value","value":"dismiss"}},{"name":"visible","value":{"kind":"code","src":" this.shown && this.label != \"\" ","deps":["this.shown","this.label"]}},{"name":"width","value":{"kind":"code","src":" this._t.width + 16 ","deps":["this._t.width"],"expr":"L0 K16 +"}},{"name":"height","value":{"kind":"code","src":" this._t.height + 10 ","deps":["this._t.height"],"expr":"L0 K10 +"}},{"name":"x","value":{"kind":"code","src":" Math.max(4, Math.min(this.$root.width - this.width - 4,\n            this.placement == \"pointer\" ? this._px + 10 : this._ex + (this._ew - this.width) / 2)) ","deps":["this.$root.width","this.width","this.placement","this._px","this._ex","this._ew"]}},{"name":"y","value":{"kind":"code","src":" this.placement == \"pointer\" ? this._pointerY : this.placement == \"above\" ? this._aboveY : this._belowY ","deps":["this.placement","this._pointerY","this._aboveY","this._belowY"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipCornerRadius ","deps":["this.$provided(\"theme\")"]}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipFill ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipStrokeColor != null ? Stroke(1, this.$provided(\"theme\").tooltipStrokeColor) : null ","deps":["this.$provided(\"theme\")"]}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"}],"decls":[{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"_ex","type":"number","def":{"kind":"value","value":0}},{"name":"_ey","type":"number","def":{"kind":"value","value":0}},{"name":"_ew","type":"number","def":{"kind":"value","value":0}},{"name":"_eh","type":"number","def":{"kind":"value","value":0}},{"name":"_px","type":"number","def":{"kind":"value","value":0}},{"name":"_py","type":"number","def":{"kind":"value","value":0}},{"name":"placement","type":"string","def":{"kind":"code","src":" this.$provided(\"theme\").tooltipPlacement ","deps":["this.$provided(\"theme\")"]}},{"name":"_pointerY","type":"number","def":{"kind":"code","src":" this._py + 18 + this.height > this.$root.height ? this._py - this.height - 8 : this._py + 18 ","deps":["this._py","this.height","this.$root.height"],"expr":"L0 K18 + L1 + L2 > L0 L1 - K8 - L0 K18 + ?"}},{"name":"_aboveY","type":"number","def":{"kind":"code","src":" this._ey - this.height - 7 < 0 ? this._ey + this._eh + 7 : this._ey - this.height - 7 ","deps":["this._ey","this.height","this._eh"],"expr":"L0 L1 - K7 - K0 < L0 L2 + K7 + L0 L1 - K7 - ?"}},{"name":"_belowY","type":"number","def":{"kind":"code","src":" this._ey + this._eh + 7 + this.height > this.$root.height ? this._ey - this.height - 7 : this._ey + this._eh + 7 ","deps":["this._ey","this._eh","this.height","this.$root.height"],"expr":"L0 L1 + K7 + L2 + L3 > L0 L2 - K7 - L0 L1 + K7 + ?"}}],"children":[{"tag":"Node","name":"_tips","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"req"}]},"route":"list"}],"decls":[{"name":"req","type":"object","def":{"kind":"code","src":" this.$root.tooltipRequest ","deps":["this.$root.tooltipRequest"],"expr":"L0"}}],"methods":[{"name":"onChange","body":"const e=this.req;if(e==null||e.root!=this.$root){classroot.close();return}classroot._ex=e.x;classroot._ey=e.y;classroot._ew=e.w;classroot._eh=e.h;classroot._px=this.$root.pointerX;classroot._py=this.$root.pointerY;classroot.label=e.text;classroot.show()"}]},{"tag":"Text","name":"_t","attrs":[{"name":"x","value":{"kind":"value","value":8}},{"name":"y","value":{"kind":"value","value":5}},{"name":"fontSize","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipFontSize ","deps":["this.$provided(\"theme\")"]}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipTextColor ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]}]}},{"name":"Events","base":"DataSource","body":{"tag":"Events","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"events","array":true,"optional":false,"type":null,"ref":"Event"}]},"slotType":{"kind":"dataschema"}}],"methods":[{"name":"all","returns":"Event[]","returnsNullable":false,"body":"return this.read([\"events\"])??[]"},{"name":"byId","params":[{"name":"id","type":"number"}],"returns":"Event","returnsNullable":true,"body":"return this.all().find(e=>e.id==id)??null"},{"name":"on","params":[{"name":"y","type":"number"},{"name":"m","type":"number"},{"name":"d","type":"number"}],"returns":"Event[]","returnsNullable":false,"body":"return this.all().filter(e=>e.y==y&&e.m==m&&e.d==d).sort((a,b)=>a.start-b.start||a.id-b.id)"},{"name":"any","params":[{"name":"y","type":"number"},{"name":"m","type":"number"},{"name":"d","type":"number"}],"returns":"boolean","returnsNullable":false,"body":"return this.all().some(e=>e.y==y&&e.m==m&&e.d==d)"},{"name":"move","params":[{"name":"id","type":"number"},{"name":"y","type":"number"},{"name":"m","type":"number"},{"name":"d","type":"number"},{"name":"start","type":"number","nullable":true}],"body":"const i=this.all().findIndex(e2=>e2.id==id);if(i<0)return;const e=this.all()[i];this.set([\"events\",i,\"y\"],y);this.set([\"events\",i,\"m\"],m);this.set([\"events\",i,\"d\"],d);if(start==null)return;const len=e.end-e.start;const s=clamp(start,0,1440-len);this.set([\"events\",i,\"start\"],s);this.set([\"events\",i,\"end\"],s+len)"}]}},{"name":"Drag","base":"Node","body":{"tag":"Drag","decls":[{"name":"id","type":"number","def":{"kind":"value","value":-1}},{"name":"moving","type":"boolean","def":{"kind":"value","value":false}},{"name":"target","type":"string","def":{"kind":"value","value":""}},{"name":"grabX","type":"number","def":{"kind":"value","value":0}},{"name":"grabY","type":"number","def":{"kind":"value","value":0}},{"name":"chipW","type":"number","def":{"kind":"value","value":0}},{"name":"chipH","type":"number","def":{"kind":"value","value":0}},{"name":"dragging","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"start","params":[{"name":"id","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"},{"name":"gx","type":"number"},{"name":"gy","type":"number"}],"body":"this.id=id;this.chipW=w;this.chipH=h;this.grabX=gx;this.grabY=gy;this.moving=false;this.dragging=false;this.target=\"\""},{"name":"begin","body":"if(this.id<0)return;this.dragging=true;this.moving=true;this.target=this.$root.dayAt(this.$root.pointerX,this.$root.pointerY)?.key??\"\""},{"name":"follow","body":"if(this.id>=0&&this.dragging)this.target=this.$root.dayAt(this.$root.pointerX,this.$root.pointerY)?.key??\"\""},{"name":"release","body":"if(!this.dragging){this.id=-1;this.moving=false;this.target=\"\"}"},{"name":"lift","body":"if(this.id<0)return;this.moving=true;this.target=this.$root.dayAt(this.$root.pointerX,this.$root.pointerY)?.key??\"\""},{"name":"drop","params":[{"name":"px","type":"number"},{"name":"py","type":"number"},{"name":"canceled","type":"boolean"}],"body":"if(this.id<0)return;const day=this.$root.dayAt(px,py);if(this.moving&&!canceled&&day!=null)this.$root.events.move(this.id,day.y,day.m,day.d,this.$root.blockness>.5?this.$root.minuteAt(py-this.grabY):null);this.id=-1;this.moving=false;this.dragging=false;this.target=\"\""}]}},{"name":"Ev","base":"Control","body":{"tag":"Ev","attrs":[{"name":"clip","value":{"kind":"value","value":true}},{"name":"focusable","value":{"kind":"code","src":" this.inView && this.y + this.height <= parent.height ","deps":["this.inView","this.y","this.height","parent.height"],"expr":"L0 L1 L2 + L3 l L0 ?"}},{"name":"cornerRadius","value":{"kind":"code","src":" lerp(5, 1.5, this.$root.yearZoom) ","deps":["this.$root.yearZoom"]}},{"name":"fill","value":{"kind":"code","src":" Color.mix(this.$root.catFill(this.$data([\"category\"])), this.$provided(\"theme\").accent, this.$root.yearZoom) "}},{"name":"opacity","value":{"kind":"code","src":" this.$root.drag.id == this.$data([\"id\"]) && this.$root.drag.moving ? 0.2 : 1 ","deps":["this.$root.drag.id",":id","this.$root.drag.moving"],"expr":"L0 L1 = L2 & K0.2 K1 ?"}},{"name":"x","value":{"kind":"code","src":" lerp(4, (parent.width - 3) / 2, this.$root.yearZoom) ","deps":["parent.width","this.$root.yearZoom"]}},{"name":"width","value":{"kind":"code","src":" lerp(parent.width - 8, 3, this.$root.yearZoom) ","deps":["parent.width","this.$root.yearZoom"]}},{"name":"y","value":{"kind":"code","src":" lerp(lerp(26 + this.rowIndex * 20, this.$data([\"start\"]) / 1440 * parent.height, classroot.rowBlock),\n                    parent.height - 6, this.$root.yearZoom) ","deps":["this.rowIndex",":start","parent.height","classroot.rowBlock","this.$root.yearZoom"]}},{"name":"height","value":{"kind":"code","src":" lerp(lerp(17, Math.max(16, (this.$data([\"end\"]) - this.$data([\"start\"])) / 1440 * parent.height - 2), classroot.rowBlock),\n                    3, this.$root.yearZoom) ","deps":[":end",":start","parent.height","classroot.rowBlock","this.$root.yearZoom"]}}],"decls":[{"name":"rowBlock","type":"number","def":{"kind":"value","value":0}},{"name":"inView","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"onPointerDown","params":[{"name":"e","type":"PointerEvent"}],"body":"this.$root.drag.start(this.$data([\"id\"]),this.width,this.height,e.x,e.y)"},{"name":"onPointerUp","body":"this.$root.drag.release()"},{"name":"onDragStart","body":"this.$root.drag.begin()"},{"name":"onDrag","body":"this.$root.drag.follow()"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"this.$root.drag.drop(e.rootX,e.rootY,e.canceled)"},{"name":"onHold","body":"this.$root.drag.lift()"},{"name":"press","body":"this.$root.selectEvent(this.$data([\"id\"]),dayKey(this.$data([\"y\"]),this.$data([\"m\"]),this.$data([\"d\"])))"},{"name":"onKeyDown","params":[{"name":"e","type":"KeyEvent"}],"body":"if(e.repeat||e.key!=\"Enter\"&&e.key!=\" \"){$base.onKeyDown(e);return}this.$root.openedFrom=this;this.$root.selectEvent(this.$data([\"id\"]),dayKey(this.$data([\"y\"]),this.$data([\"m\"]),this.$data([\"d\"])));this.afterSettle(()=>Focus.focus(this.$root.panel.ev.title))","usesSuper":true}],"children":[{"tag":"View","name":"rail","attrs":[{"name":"width","value":{"kind":"value","value":3}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"fill","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"])) "}},{"name":"opacity","value":{"kind":"code","src":" classroot.rowBlock ","deps":["classroot.rowBlock"],"expr":"L0"}}]},{"tag":"View","name":"text","attrs":[{"name":"x","value":{"kind":"value","value":8}},{"name":"y","value":{"kind":"value","value":2}},{"name":"opacity","value":{"kind":"code","src":" 1 - this.$root.yearZoom ","deps":["this.$root.yearZoom"],"expr":"K1 L0 -"}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":6}}],"classSlot":"Layout"},{"tag":"Text","name":"tm","attrs":[{"name":"fontSize","value":{"kind":"value","value":10}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"])) "}},{"name":"text","value":{"kind":"code","src":" shortTime(this.$data([\"start\"])) ","deps":[":start"]}}]},{"tag":"Text","name":"ti","attrs":[{"name":"fontSize","value":{"kind":"value","value":10}},{"name":"fontWeight","value":{"kind":"value","value":"regular"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"])) "}},{"name":"text","value":{"kind":"code","src":" this.$data([\"title\"]) ","deps":[":title"],"expr":"L0"}}]}]}]}},{"name":"Cell","base":"View","body":{"tag":"Cell","attrs":[{"name":"clip","value":{"kind":"value","value":true}},{"name":"accessibilityRole","value":{"kind":"value","value":"group"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" dayLabel(this.$data([\"key\"])) + (this.$data([\"today\"]) ? \", today\" : \"\") ","deps":[":key",":today"]}},{"name":"opacity","value":{"kind":"code","src":" this.shown ","deps":["this.shown"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" lerp(this.$root.pad + this.$root.gutter + (this.$data([\"col\"]) - this.$root.c0) * this.$root.colW + this.$root.gap / 2, this.$root.slotX + 10 + this.$data([\"col\"]) * this.$root.miniCellW, this.$root.yearZoom) ","deps":["this.$root.pad","this.$root.gutter",":col","this.$root.c0","this.$root.colW","this.$root.gap","this.$root.slotX","this.$root.miniCellW","this.$root.yearZoom"]}},{"name":"y","value":{"kind":"code","src":" lerp(this.$root.headH + (this.$data([\"row\"]) - this.$root.r0) * this.$root.rowH + this.$root.gap / 2, this.$root.slotY + 34 + this.$data([\"row\"]) * this.$root.miniRowH, this.$root.yearZoom) ","deps":["this.$root.headH",":row","this.$root.r0","this.$root.rowH","this.$root.gap","this.$root.slotY","this.$root.miniRowH","this.$root.yearZoom"]}},{"name":"width","value":{"kind":"code","src":" lerp(this.$root.colW - this.$root.gap, this.$root.miniCellW, this.$root.yearZoom) ","deps":["this.$root.colW","this.$root.gap","this.$root.miniCellW","this.$root.yearZoom"]}},{"name":"height","value":{"kind":"code","src":" lerp(this.$root.rowH - this.$root.gap, this.$root.miniRowH, this.$root.yearZoom) ","deps":["this.$root.rowH","this.$root.gap","this.$root.miniRowH","this.$root.yearZoom"]}}],"decls":[{"name":"rowBlock","type":"number","def":{"kind":"code","src":" this.$data([\"row\"]) == this.$root.anchorRow ? this.$root.blockness : 0 ","deps":[":row","this.$root.anchorRow","this.$root.blockness"],"expr":"L0 L1 = L2 K0 ?"}},{"name":"shown","type":"number","def":{"kind":"code","src":" clamp(Math.min(this.$data([\"col\"]) + 1 - this.$root.c0, this.$root.c0 + this.$root.nc - this.$data([\"col\"])), 0, 1) ","deps":[":col","this.$root.c0","this.$root.nc"]}},{"name":"inRows","type":"boolean","def":{"kind":"code","src":" this.$data([\"row\"]) >= this.$root.r0To && this.$data([\"row\"]) < this.$root.r0To + this.$root.nrTo ","deps":[":row","this.$root.r0To","this.$root.nrTo"],"expr":"L0 L1 g L0 L1 L2 + < L0 L1 g ?"}},{"name":"inCols","type":"boolean","def":{"kind":"code","src":" this.$data([\"col\"]) >= this.$root.c0To && this.$data([\"col\"]) < this.$root.c0To + this.$root.ncTo ","deps":[":col","this.$root.c0To","this.$root.ncTo"],"expr":"L0 L1 g L0 L1 L2 + < L0 L1 g ?"}},{"name":"inView","type":"boolean","def":{"kind":"code","src":" this.$root.mode != \"year\" && this.inRows && this.inCols ","deps":["this.$root.mode","this.inRows","this.inCols"]}}],"methods":[{"name":"onClick","body":"this.$root.pickDay(this.$data([\"key\"]))"}],"children":[{"tag":"View","name":"bg","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"value","value":8}},{"name":"opacity","value":{"kind":"code","src":" 1 - (1 - this.$provided(\"theme\").columnOpacity) * classroot.rowBlock ","deps":["this.$provided(\"theme\")","classroot.rowBlock"]}},{"name":"fill","value":{"kind":"code","src":" Color.mix(\n              this.$data([\"key\"]) == this.$root.drag.target ? this.$provided(\"theme\").dropTargetBg\n            : this.$data([\"today\"])              ? Color.mix(this.$provided(\"theme\").todayBg, this.$provided(\"theme\").cellBg, classroot.rowBlock)\n            :                       this.dayBg,\n            this.$provided(\"theme\").miniCurrentBg, this.$root.yearZoom) ","deps":[":key","this.$root.drag.target","this.$provided(\"theme\")",":today","classroot.rowBlock","this.dayBg","this.$root.yearZoom"]}},{"name":"stroke","value":{"kind":"code","src":" this.$data([\"key\"]) == this.$root.drag.target ? Stroke(2, Color.mix(this.$provided(\"theme\").dropTargetRing, this.$provided(\"theme\").miniCurrentBg, this.$root.yearZoom)) : null ","deps":[":key","this.$root.drag.target","this.$provided(\"theme\")","this.$root.yearZoom"]}}],"decls":[{"name":"dayBg","type":"number","def":{"kind":"code","src":" !this.$data([\"inMonth\"]) ? this.$provided(\"theme\").outOfMonthBg\n                        : this.$data([\"weekend\"])  ? this.$provided(\"theme\").weekendBg\n                        :             this.$provided(\"theme\").cellBg ","deps":[":inMonth","this.$provided(\"theme\")",":weekend"]}}]},{"tag":"View","name":"mark","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":3}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}},{"name":"visible","value":{"kind":"code","src":" this.$data([\"current\"]) ","deps":[":current"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" classroot.rowBlock ","deps":["classroot.rowBlock"],"expr":"L0"}}]},{"tag":"Text","name":"num","attrs":[{"name":"x","value":{"kind":"code","src":" lerp(11, parent.width / 2 - 5, this.$root.yearZoom) ","deps":["parent.width","this.$root.yearZoom"]}},{"name":"y","value":{"kind":"code","src":" lerp(7, 2, this.$root.yearZoom) ","deps":["this.$root.yearZoom"]}},{"name":"fontSize","value":{"kind":"code","src":" lerp(13, 9, this.$root.yearZoom) ","deps":["this.$root.yearZoom"]}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"opacity","value":{"kind":"code","src":" this.$data([\"inMonth\"]) ? 1 : 1 - this.$root.yearZoom ","deps":[":inMonth","this.$root.yearZoom"],"expr":"L0 K1 K1 L1 - ?"}},{"name":"textColor","value":{"kind":"code","src":" this.$data([\"inMonth\"]) ? this.$provided(\"theme\").dayNumber : this.$provided(\"theme\").textMuted ","deps":[":inMonth","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" \"\" + this.$data([\"d\"]) ","deps":[":d"]}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" this.$data([\"today\"]) ","deps":[":today"],"expr":"L0"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").todayText ","deps":["this.$provided(\"theme\")"]},"route":"override"}]},{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" this.$data([\"current\"]) ","deps":[":current"],"expr":"L0"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").currentDayText ","deps":["this.$provided(\"theme\")"]},"route":"override"}]}]},{"tag":"Text","name":"dow","attrs":[{"name":"x","value":{"kind":"value","value":34}},{"name":"y","value":{"kind":"value","value":8}},{"name":"fontSize","value":{"kind":"value","value":11}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"opacity","value":{"kind":"code","src":" classroot.rowBlock ","deps":["classroot.rowBlock"],"expr":"L0"}},{"name":"textColor","value":{"kind":"code","src":" this.$data([\"current\"]) ? this.$provided(\"theme\").currentDayText : this.$provided(\"theme\").textMuted ","deps":[":current","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"dow\"]) ","deps":[":dow"],"expr":"L0"}}]},{"tag":"Ev","attrs":[{"name":"datapath","value":{"kind":"path","path":"events","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"id"},"slotType":{"kind":"string"}},{"name":"rowBlock","value":{"kind":"code","src":" classroot.rowBlock ","deps":["classroot.rowBlock"],"expr":"L0"}},{"name":"inView","value":{"kind":"code","src":" classroot.inView ","deps":["classroot.inView"],"expr":"L0"}}]}]}},{"name":"MiniDay","base":"View","body":{"tag":"MiniDay","attrs":[{"name":"width","value":{"kind":"code","src":" this.$root.miniCellW ","deps":["this.$root.miniCellW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.miniRowH ","deps":["this.$root.miniRowH"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" this.$data([\"col\"]) * this.$root.miniCellW ","deps":[":col","this.$root.miniCellW"],"expr":"L0 L1 *"}},{"name":"y","value":{"kind":"code","src":" this.$data([\"row\"]) * this.$root.miniRowH ","deps":[":row","this.$root.miniRowH"],"expr":"L0 L1 *"}}],"children":[{"tag":"Text","name":"n","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"textAlign","value":{"kind":"value","value":"center"}},{"name":"y","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"value","value":9}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$data([\"today\"]) ? this.$provided(\"theme\").accent : this.$data([\"inMonth\"]) ? this.$provided(\"theme\").miniDayText : this.$provided(\"theme\").miniDayFaint ","deps":[":today","this.$provided(\"theme\")",":inMonth"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"inMonth\"]) ? \"\" + this.$data([\"num\"]) : \"\" ","deps":[":inMonth",":num"]}}]},{"tag":"View","name":"dot","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"code","src":" parent.height - 4 ","deps":["parent.height"],"expr":"L0 K4 -"}},{"name":"width","value":{"kind":"value","value":3}},{"name":"height","value":{"kind":"value","value":3}},{"name":"cornerRadius","value":{"kind":"value","value":2}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}},{"name":"visible","value":{"kind":"code","src":" this.$data([\"has\"]) ","deps":[":has"],"expr":"L0"}}]}]}},{"name":"MiniMonth","base":"View","body":{"tag":"MiniMonth","attrs":[{"name":"cornerRadius","value":{"kind":"value","value":12}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").miniBg ","deps":["this.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" this.$root.miniW ","deps":["this.$root.miniW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.miniH ","deps":["this.$root.miniH"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" this.$root.pad + this.$data([\"mcol\"]) * (this.$root.miniW + this.$root.gap) ","deps":["this.$root.pad",":mcol","this.$root.miniW","this.$root.gap"],"expr":"L0 L1 L2 L3 + * +"}},{"name":"y","value":{"kind":"code","src":" this.$root.pad + this.$data([\"mrow\"]) * (this.$root.miniH + this.$root.gap) ","deps":["this.$root.pad",":mrow","this.$root.miniH","this.$root.gap"],"expr":"L0 L1 L2 L3 + * +"}},{"name":"visible","value":{"kind":"code","src":" this.$data([\"m\"]) != this.$root.month ","deps":[":m","this.$root.month"],"expr":"L0 L1 !"}}],"methods":[{"name":"onClick","body":"this.$root.pickMonth(this.$data([\"m\"]))"}],"children":[{"tag":"Text","name":"name","attrs":[{"name":"x","value":{"kind":"value","value":14}},{"name":"y","value":{"kind":"value","value":11}},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"textColor","value":{"kind":"code","src":" this.$data([\"m\"]) == this.$root.month ? this.$provided(\"theme\").todayText : this.$provided(\"theme\").dayNumber ","deps":[":m","this.$root.month","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"name\"]) ","deps":[":name"],"expr":"L0"}}]},{"tag":"View","name":"grid","attrs":[{"name":"x","value":{"kind":"value","value":10}},{"name":"y","value":{"kind":"value","value":34}},{"name":"width","value":{"kind":"code","src":" parent.width - 20 ","deps":["parent.width"],"expr":"L0 K20 -"}},{"name":"height","value":{"kind":"code","src":" parent.height - 44 ","deps":["parent.height"],"expr":"L0 K44 -"}}],"children":[{"tag":"MiniDay","attrs":[{"name":"datapath","value":{"kind":"path","path":"cells","many":true},"route":"cursor"}]}]}]}},{"name":"NavArrow","base":"Control","body":{"tag":"NavArrow","attrs":[{"name":"width","value":{"kind":"value","value":36}},{"name":"height","value":{"kind":"value","value":34}},{"name":"cornerRadius","value":{"kind":"value","value":10}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.dir < 0 ? \"Previous\" : \"Next\" ","deps":["this.dir"]}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").controlSelected : this.$provided(\"theme\").control ","deps":["this.pressed","this.$provided(\"theme\")"]}}],"decls":[{"name":"dir","type":"number","def":{"kind":"value","value":1}}],"methods":[{"name":"press","body":"this.$root.step(this.dir)"}],"children":[{"tag":"ChevronIcon","name":"g","attrs":[{"name":"iconSize","value":{"kind":"value","value":15}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"dir","value":{"kind":"code","src":" classroot.dir < 0 ? \"left\" : \"right\" ","deps":["classroot.dir"]}},{"name":"ink","value":{"kind":"code","src":" classroot.pressed || classroot.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.pressed","classroot.hovered","this.$provided(\"theme\")"]}}]}]}},{"name":"DetailSection","base":"View","body":{"tag":"DetailSection","attrs":[{"name":"clip","value":{"kind":"value","value":true}},{"name":"cornerRadius","value":{"kind":"value","value":10}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").sectionBg ","deps":["this.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":46}}],"decls":[{"name":"idx","type":"number","def":{"kind":"value","value":0}},{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"field","type":"string","def":{"kind":"value","value":""}},{"name":"isOpen","type":"boolean","def":{"kind":"code","src":" this.$root.openSection == this.idx ","deps":["this.$root.openSection","this.idx"],"expr":"L0 L1 ="}}],"methods":[{"name":"tabOrder","body":"return this.isOpen?this.tabDefault():[this.hdr]"}],"children":[{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" classroot.isOpen ? 156 : 46 ","deps":["classroot.isOpen"],"expr":"L0 K156 K46 ?"}},{"name":"stiffness","value":{"kind":"value","value":210}},{"name":"damping","value":{"kind":"value","value":24}}]},{"tag":"Control","name":"hdr","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":46}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":11},{"kind":"number","value":0},{"kind":"number","value":15}]},"route":"corners"},{"name":"accessibilityExpanded","value":{"kind":"code","src":" classroot.isOpen ","$nullsUndefined":true,"deps":["classroot.isOpen"],"expr":"L0"}}],"methods":[{"name":"press","body":"this.$root.openSection=classroot.idx"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}}],"classSlot":"Layout"},{"tag":"Text","name":"lbl","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"fontWeight","value":{"kind":"value","value":"bold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"letterSpacing","value":{"kind":"value","value":1}},{"name":"textColor","value":{"kind":"code","src":" classroot.isOpen ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.isOpen","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]},{"tag":"Spacer"},{"tag":"MinusIcon","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":15}},{"name":"visible","value":{"kind":"code","src":" classroot.isOpen ","deps":["classroot.isOpen"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]},{"tag":"PlusIcon","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":15}},{"name":"visible","value":{"kind":"code","src":" !classroot.isOpen ","deps":["classroot.isOpen"],"expr":"L0 n"}},{"name":"ink","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]}]},{"tag":"TextInput","name":"content","attrs":[{"name":"x","value":{"kind":"value","value":13}},{"name":"y","value":{"kind":"value","value":50}},{"name":"width","value":{"kind":"code","src":" parent.width - 26 ","deps":["parent.width"],"expr":"L0 K26 -"}},{"name":"height","value":{"kind":"code","src":" parent.height - 60 ","deps":["parent.height"],"expr":"L0 K60 -"}},{"name":"multiline","value":{"kind":"value","value":true}},{"name":"wrap","value":{"kind":"value","value":true}},{"name":"fontSize","value":{"kind":"value","value":16},"route":"provision"},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").bodyText ","deps":["this.$provided(\"theme\")"]},"route":"provision"},{"name":"placeholder","value":{"kind":"code","src":" \"Add \" + classroot.field ","deps":["classroot.field"]}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").fieldBg ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.focused ? this.$provided(\"theme\").accent : this.$provided(\"theme\").fieldEdge) ","deps":["this.focused","this.$provided(\"theme\")"]}},{"name":"value","value":{"kind":"code","src":" this.$data([classroot.field]) ","deps":["classroot.field",":"]},"shorthand":true,"place":"{ :@[(classroot.field)] }"}],"methods":[{"name":"commit","params":[{"name":"v","type":"any"}],"body":"this.$cell([classroot.field]).value=v"}]},{"tag":"State","name":"open","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.isOpen ","deps":["classroot.isOpen"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").sectionOpenBg ","deps":["this.$provided(\"theme\")"]},"route":"override"}]}]}}],"shapes":[{"name":"Event","fields":[{"name":"id","array":false,"optional":false,"type":"number"},{"name":"title","array":false,"optional":false,"type":"string"},{"name":"y","array":false,"optional":false,"type":"number"},{"name":"m","array":false,"optional":false,"type":"number"},{"name":"d","array":false,"optional":false,"type":"number"},{"name":"start","array":false,"optional":false,"type":"number"},{"name":"end","array":false,"optional":false,"type":"number"},{"name":"category","array":false,"optional":false,"type":"string"},{"name":"notes","array":false,"optional":true,"type":"string"},{"name":"location","array":false,"optional":true,"type":"string"},{"name":"attendees","array":false,"optional":true,"type":"string"},{"name":"comment","array":false,"optional":true,"type":"string"}]},{"name":"Day","fields":[{"name":"key","array":false,"optional":false,"type":"string"},{"name":"y","array":false,"optional":false,"type":"number"},{"name":"m","array":false,"optional":false,"type":"number"},{"name":"d","array":false,"optional":false,"type":"number"},{"name":"dow","array":false,"optional":false,"type":"string"},{"name":"col","array":false,"optional":false,"type":"number"},{"name":"row","array":false,"optional":false,"type":"number"},{"name":"inMonth","array":false,"optional":false,"type":"boolean"},{"name":"weekend","array":false,"optional":false,"type":"boolean"},{"name":"today","array":false,"optional":false,"type":"boolean"},{"name":"current","array":false,"optional":false,"type":"boolean"},{"name":"events","array":true,"optional":false,"type":null,"ref":"Event"}]},{"name":"MiniDayInfo","fields":[{"name":"num","array":false,"optional":false,"type":"number"},{"name":"col","array":false,"optional":false,"type":"number"},{"name":"row","array":false,"optional":false,"type":"number"},{"name":"inMonth","array":false,"optional":false,"type":"boolean"},{"name":"today","array":false,"optional":false,"type":"boolean"},{"name":"has","array":false,"optional":false,"type":"boolean"}]},{"name":"Month","fields":[{"name":"m","array":false,"optional":false,"type":"number"},{"name":"name","array":false,"optional":false,"type":"string"},{"name":"mcol","array":false,"optional":false,"type":"number"},{"name":"mrow","array":false,"optional":false,"type":"number"},{"name":"cells","array":true,"optional":false,"type":null,"ref":"MiniDayInfo"}]}],"themes":[{"name":"CalendarLight","body":{"tag":"CalendarLight","attrs":[{"name":"barBg","value":{"kind":"value","value":16777215}},{"name":"background","value":{"kind":"value","value":15133424}},{"name":"columnOpacity","value":{"kind":"value","value":0.6}},{"name":"cellBg","value":{"kind":"value","value":16777215}},{"name":"outOfMonthBg","value":{"kind":"value","value":15593717}},{"name":"weekendBg","value":{"kind":"value","value":15856888}},{"name":"todayBg","value":{"kind":"value","value":14477823}},{"name":"dropTargetBg","value":{"kind":"value","value":13098495}},{"name":"dropTargetRing","value":{"kind":"value","value":3043296}},{"name":"gridLine","value":{"kind":"value","value":12437201}},{"name":"dayNumber","value":{"kind":"value","value":2766146}},{"name":"bodyText","value":{"kind":"value","value":4082777}},{"name":"hourLabel","value":{"kind":"value","value":10069424}},{"name":"accentSecondary","value":{"kind":"value","value":1222036}},{"name":"currentDayText","value":{"kind":"value","value":3043296}},{"name":"todayText","value":{"kind":"value","value":3043296}},{"name":"fieldBg","value":{"kind":"value","value":16777215}},{"name":"fieldEdge","value":{"kind":"value","value":14410217}},{"name":"sectionBg","value":{"kind":"value","value":15857145}},{"name":"sectionOpenBg","value":{"kind":"value","value":15134456}},{"name":"miniBg","value":{"kind":"value","value":16777215}},{"name":"miniCurrentBg","value":{"kind":"value","value":15200511}},{"name":"miniDayText","value":{"kind":"value","value":4082777}},{"name":"miniDayFaint","value":{"kind":"value","value":12568786}},{"name":"holidayBg","value":{"kind":"value","value":14480356}},{"name":"holidayText","value":{"kind":"value","value":1997380}},{"name":"astroBg","value":{"kind":"value","value":15460091}},{"name":"astroText","value":{"kind":"value","value":5980088}},{"name":"milestoneBg","value":{"kind":"value","value":16510934}},{"name":"milestoneText","value":{"kind":"value","value":10119697}},{"name":"defaultBg","value":{"kind":"value","value":14477566}},{"name":"defaultText","value":{"kind":"value","value":2381488}}]}},{"name":"CalendarDark","body":{"tag":"CalendarDark","attrs":[{"name":"barBg","value":{"kind":"value","value":1450284}},{"name":"columnOpacity","value":{"kind":"value","value":0.65}},{"name":"background","value":{"kind":"value","value":857374}},{"name":"surface","value":{"kind":"value","value":1055268}},{"name":"cellBg","value":{"kind":"value","value":1582127}},{"name":"outOfMonthBg","value":{"kind":"value","value":1055010}},{"name":"weekendBg","value":{"kind":"value","value":1318698}},{"name":"todayBg","value":{"kind":"value","value":1323087}},{"name":"dropTargetBg","value":{"kind":"value","value":1981534}},{"name":"dropTargetRing","value":{"kind":"value","value":7054576}},{"name":"line","value":{"kind":"value","value":2241086}},{"name":"gridLine","value":{"kind":"value","value":3491931}},{"name":"textMuted","value":{"kind":"value","value":9083814}},{"name":"textFaint","value":{"kind":"value","value":5530222}},{"name":"dayNumber","value":{"kind":"value","value":13095900}},{"name":"bodyText","value":{"kind":"value","value":11846348}},{"name":"hourLabel","value":{"kind":"value","value":5464943}},{"name":"accentSecondary","value":{"kind":"value","value":3662024}},{"name":"currentDayText","value":{"kind":"value","value":10274047}},{"name":"todayText","value":{"kind":"value","value":8368383}},{"name":"control","value":{"kind":"value","value":2372420}},{"name":"controlHovered","value":{"kind":"value","value":2899022}},{"name":"controlPressed","value":{"kind":"value","value":3426138}},{"name":"controlSelected","value":{"kind":"value","value":2771562}},{"name":"trackFill","value":{"kind":"value","value":989218}},{"name":"fieldBg","value":{"kind":"value","value":989733}},{"name":"fieldEdge","value":{"kind":"value","value":2767689}},{"name":"sectionBg","value":{"kind":"value","value":1450542}},{"name":"sectionOpenBg","value":{"kind":"value","value":1780539}},{"name":"miniBg","value":{"kind":"value","value":1186854}},{"name":"miniCurrentBg","value":{"kind":"value","value":1321023}},{"name":"miniDayText","value":{"kind":"value","value":10465467}},{"name":"miniDayFaint","value":{"kind":"value","value":3359052}},{"name":"holidayBg","value":{"kind":"value","value":1323551}},{"name":"holidayText","value":{"kind":"value","value":7657627}},{"name":"astroBg","value":{"kind":"value","value":2367293}},{"name":"astroText","value":{"kind":"value","value":11970288}},{"name":"milestoneBg","value":{"kind":"value","value":3352591}},{"name":"milestoneText","value":{"kind":"value","value":15778667}},{"name":"defaultBg","value":{"kind":"value","value":1192016}},{"name":"defaultText","value":{"kind":"value","value":9418480}}]}}],"uses":["OverlayStrata"],"scripts":[{"src":" { const m = (globalThis.__declareScriptMap = globalThis.__declareScriptMap || {}); m[\"declare-scripts\"] = Object.assign(m[\"declare-scripts\"] || {}, { runs: [[0,\"the program's script\"]] }); } const MONTHS = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nconst DAYS = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\nfunction lerp(a, b, t) { return a + (b - a) * t; }\nfunction clamp(v, a, b) { return Math.max(a, Math.min(b, v)); }\nconst SHORT_MONTHS = [\"Jan.\", \"Feb.\", \"March\", \"April\", \"May\", \"June\", \"July\", \"Aug.\", \"Sept.\", \"Oct.\", \"Nov.\", \"Dec.\"];\nfunction monthName(m, short = false) { return (short ? SHORT_MONTHS : MONTHS)[m - 1]; }\nfunction dowName(i) { return DAYS[i].slice(0, 3); }\nfunction dayKey(y, m, d) { return y + \"-\" + m + \"-\" + d; }\nfunction keyOf(dt) { return dayKey(dt.getFullYear(), dt.getMonth() + 1, dt.getDate()); }\nfunction parseKey(k) { const p = k.split(\"-\").map(Number); return new Date(p[0], p[1] - 1, p[2]); }\nfunction shortTime(min) {\n    const h = Math.floor(min / 60), mm = min % 60, ap = h < 12 ? \"a\" : \"p\";\n    const hh = h % 12 == 0 ? 12 : h % 12;\n    return mm == 0 ? hh + ap : hh + \":\" + (mm < 10 ? \"0\" + mm : \"\" + mm) + ap;\n}\nfunction hourLabel(h) { return (h % 12 == 0 ? 12 : h % 12) + (h < 12 ? \" AM\" : \" PM\"); }\nfunction weekLabel(k, short = false) {\n    const d = parseKey(k);\n    const s = new Date(d.getFullYear(), d.getMonth(), d.getDate() - d.getDay());\n    const e = new Date(s.getFullYear(), s.getMonth(), s.getDate() + 6);\n    return monthName(s.getMonth() + 1, short) + \" \" + s.getDate() + \" – \"\n        + (s.getMonth() == e.getMonth() ? \"\" : monthName(e.getMonth() + 1, short) + \" \") + e.getDate();\n}\nfunction weekStartKey(k) { const d = parseKey(k); return keyOf(new Date(d.getFullYear(), d.getMonth(), d.getDate() - d.getDay())); }\nfunction dateLabel(k) { const d = parseKey(k); return monthName(d.getMonth() + 1, true) + \" \" + d.getDate(); }\nfunction dayLabel(k, short = false) {\n    const d = parseKey(k);\n    return (short ? DAYS[d.getDay()].slice(0, 3) + \".\" : DAYS[d.getDay()]) + \", \" + monthName(d.getMonth() + 1, short) + \" \" + d.getDate();\n} /*$b*/ return { MONTHS, DAYS, lerp, clamp, SHORT_MONTHS, monthName, dowName, dayKey, keyOf, parseKey, shortTime, hourLabel, weekLabel, weekStartKey, dateLabel, dayLabel }; \n\n\n\n\n\n\n\n\n","compiled":true}],"root":{"tag":"App","attrs":[{"name":"minWidth","value":{"kind":"value","value":360}},{"name":"minHeight","value":{"kind":"value","value":420}},{"name":"appName","value":{"kind":"value","value":"Declare Calendar"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").background ","deps":["this.$provided(\"theme\")"]}},{"name":"fontFamily","value":{"kind":"value","value":"system-ui, sans-serif"},"route":"provision"},{"name":"theme","value":{"kind":"code","src":" { ...(this.$root.isDark ? SanFranciscoDark : SanFrancisco), ...(this.$root.isDark ? CalendarDark : CalendarLight) } ","deps":["this.$root.isDark"]},"route":"provision"}],"decls":[{"name":"themeMode","type":"\"auto\" | \"light\" | \"dark\"","def":{"kind":"value","value":"auto"}},{"name":"isDark","type":"boolean","def":{"kind":"code","src":" this.$root.themeMode == \"auto\"\n        ? this.$root.hostProvided(\"dark\", this.$root.systemDark)\n        : this.$root.themeMode == \"dark\" ","deps":["this.$root.themeMode","this.$root.systemDark","this.$root.hostProvided(\"dark\")"]}},{"name":"barH","type":"number","def":{"kind":"value","value":60}},{"name":"pad","type":"number","def":{"kind":"value","value":20}},{"name":"gap","type":"number","def":{"kind":"value","value":8}},{"name":"showTheme","type":"boolean","def":{"kind":"code","src":" this.$root.width >= 1030 ","deps":["this.$root.width"],"expr":"L0 K1030 g"}},{"name":"tabsCompact","type":"boolean","def":{"kind":"code","src":" this.$root.width < 910 ","deps":["this.$root.width"],"expr":"L0 K910 <"}},{"name":"showBrand","type":"boolean","def":{"kind":"code","src":" this.$root.width >= 800 ","deps":["this.$root.width"],"expr":"L0 K800 g"}},{"name":"showToday","type":"boolean","def":{"kind":"code","src":" this.$root.width >= 480 ","deps":["this.$root.width"],"expr":"L0 K480 g"}},{"name":"tabW","type":"number","def":{"kind":"code","src":" this.$root.tabsCompact ? 44 : 74 ","deps":["this.$root.tabsCompact"],"expr":"L0 K44 K74 ?"}},{"name":"tabsW","type":"number","def":{"kind":"code","src":" (this.$root.narrow ? 3 : 4) * this.$root.tabW ","deps":["this.$root.narrow","this.$root.tabW"],"expr":"L0 K3 K4 ? L1 *"}},{"name":"titleFace","type":"object","def":{"kind":"code","src":" this.providedTextStyle(({ fontSize: 16, fontWeight: \"semibold\" })) ","deps":["this.$provided(\"textColor\")","this.$provided(\"fontSize\")","this.$provided(\"fontFamily\")","this.$provided(\"fontWeight\")","this.$provided(\"letterSpacing\")"]}},{"name":"dateW","type":"number","def":{"kind":"code","src":" Math.ceil(this.$root.widestOf(({\n        week:  [\"September 30 – October 31\"],           // the cross-month week, longest names\n        day:   [\"Wednesday, September 30\"],             // longest weekday + longest month\n        month: [\"September 2088\"],\n        year:  [\"2088\"],\n        })[this.$root.mode])) + 14 "}},{"name":"navW","type":"number","def":{"kind":"code","src":" 2 * 36 + 2 * 6 + this.$root.dateW ","deps":["this.$root.dateW"],"expr":"K2 K36 * K2 K6 * + L0 +"}},{"name":"panelOverlay","type":"boolean","def":{"kind":"code","src":" this.$root.width < 720 ","deps":["this.$root.width"],"expr":"L0 K720 <"}},{"name":"panelW","type":"number","def":{"kind":"code","src":" Math.min(340, this.$root.width - 32) ","deps":["this.$root.width"],"expr":"K340 L0 K32 - m"}},{"name":"narrow","type":"boolean","def":{"kind":"code","src":" this.$root.width < 600 ","deps":["this.$root.width"],"expr":"L0 K600 <"}},{"name":"chosen","type":"\"day\" | \"week\" | \"month\" | \"year\"","def":{"kind":"value","value":"week"}},{"name":"mode","type":"\"day\" | \"week\" | \"month\" | \"year\"","def":{"kind":"code","src":" this.$root.narrow && this.$root.chosen == \"week\" ? \"day\" : this.$root.chosen ","deps":["this.$root.narrow","this.$root.chosen"]}},{"name":"navYear","type":"number","def":{"kind":"value","value":0}},{"name":"navMonth","type":"number","def":{"kind":"value","value":0}},{"name":"navKey","type":"string","def":{"kind":"value","value":""}},{"name":"year","type":"number","def":{"kind":"code","src":" this.$root.navYear == 0 ? this.$root.clock.year : this.$root.navYear ","deps":["this.$root.navYear","this.$root.clock.year"],"expr":"L0 K0 = L1 L0 ?"}},{"name":"month","type":"number","def":{"kind":"code","src":" this.$root.navMonth == 0 ? this.$root.clock.month : this.$root.navMonth ","deps":["this.$root.navMonth","this.$root.clock.month"],"expr":"L0 K0 = L1 L0 ?"}},{"name":"todayKey","type":"string","def":{"kind":"code","src":" this.$root.clock.year + \"-\" + this.$root.clock.month + \"-\" + this.$root.clock.day ","deps":["this.$root.clock.year","this.$root.clock.month","this.$root.clock.day"]}},{"name":"anchorKey","type":"string","def":{"kind":"code","src":" this.$root.navKey == \"\" ? this.$root.todayKey : this.$root.navKey ","deps":["this.$root.navKey","this.$root.todayKey"]}},{"name":"monthRows","type":"number","def":{"kind":"code","src":" this.$root.computeMonthRows() ","deps":["this.$root.year","this.$root.month"]}},{"name":"yearSeen","type":"boolean","def":{"kind":"value","value":false}},{"name":"selectedId","type":"number","def":{"kind":"value","value":-1}},{"name":"openSection","type":"number","def":{"kind":"value","value":0}},{"name":"panelInset","type":"number","def":{"kind":"value","value":0}},{"name":"bodyW","type":"number","def":{"kind":"code","src":" this.$root.width - (this.$root.panelOverlay ? 0 : this.$root.panelInset) ","deps":["this.$root.width","this.$root.panelOverlay","this.$root.panelInset"],"expr":"L0 L1 K0 L2 ? -"}},{"name":"bodyH","type":"number","def":{"kind":"code","src":" this.$root.height - this.$root.barH ","deps":["this.$root.height","this.$root.barH"],"expr":"L0 L1 -"}},{"name":"headH","type":"number","def":{"kind":"value","value":30}},{"name":"miniW","type":"number","def":{"kind":"code","src":" (this.$root.bodyW - 2 * this.$root.pad - this.$root.gap * 3) / 4 ","deps":["this.$root.bodyW","this.$root.pad","this.$root.gap"],"expr":"L0 K2 L1 * - L2 K3 * - K4 /"}},{"name":"miniH","type":"number","def":{"kind":"code","src":" (this.$root.bodyH - 2 * this.$root.pad - this.$root.gap * 2) / 3 ","deps":["this.$root.bodyH","this.$root.pad","this.$root.gap"],"expr":"L0 K2 L1 * - L2 K2 * - K3 /"}},{"name":"miniCellW","type":"number","def":{"kind":"code","src":" (this.$root.miniW - 20) / 7 ","deps":["this.$root.miniW"],"expr":"L0 K20 - K7 /"}},{"name":"miniRowH","type":"number","def":{"kind":"code","src":" (this.$root.miniH - 44) / 6 ","deps":["this.$root.miniH"],"expr":"L0 K44 - K6 /"}},{"name":"anchorCol","type":"number","def":{"kind":"code","src":" this.$root.gridIndexOf(this.$root.anchorKey) % 7 ","deps":["this.$root.anchorKey","this.$root.year","this.$root.month"]}},{"name":"anchorRow","type":"number","def":{"kind":"code","src":" Math.floor(this.$root.gridIndexOf(this.$root.anchorKey) / 7) ","deps":["this.$root.anchorKey","this.$root.year","this.$root.month"]}},{"name":"c0To","type":"number","def":{"kind":"code","src":" this.$root.mode == \"day\" ? this.$root.anchorCol : 0 ","deps":["this.$root.mode","this.$root.anchorCol"]}},{"name":"r0To","type":"number","def":{"kind":"code","src":" this.$root.mode == \"week\" || this.$root.mode == \"day\" ? this.$root.anchorRow : 0 ","deps":["this.$root.mode","this.$root.anchorRow"]}},{"name":"ncTo","type":"number","def":{"kind":"code","src":" this.$root.mode == \"day\" ? 1 : 7 ","deps":["this.$root.mode"]}},{"name":"nrTo","type":"number","def":{"kind":"code","src":" this.$root.mode == \"week\" || this.$root.mode == \"day\" ? 1 : this.$root.monthRows ","deps":["this.$root.mode","this.$root.monthRows"]}},{"name":"c0","type":"number","def":{"kind":"value","value":0}},{"name":"r0","type":"number","def":{"kind":"value","value":0}},{"name":"nc","type":"number","def":{"kind":"value","value":7}},{"name":"nr","type":"number","def":{"kind":"value","value":6}},{"name":"edgeReach","type":"number","def":{"kind":"code","src":" (this.$root.pad - this.$root.gap / 2) * this.$root.blockness ","deps":["this.$root.pad","this.$root.gap","this.$root.blockness"],"expr":"L0 L1 K2 / - L2 *"}},{"name":"colW","type":"number","def":{"kind":"code","src":" (this.$root.bodyW - 2 * this.$root.pad - this.$root.gutter + this.$root.edgeReach) / this.$root.nc ","deps":["this.$root.bodyW","this.$root.pad","this.$root.gutter","this.$root.edgeReach","this.$root.nc"],"expr":"L0 K2 L1 * - L2 - L3 + L4 /"}},{"name":"rowH","type":"number","def":{"kind":"code","src":" (this.$root.bodyH - this.$root.headH) / this.$root.nr ","deps":["this.$root.bodyH","this.$root.headH","this.$root.nr"],"expr":"L0 L1 - L2 /"}},{"name":"blockness","type":"number","def":{"kind":"code","src":" clamp(2 - this.$root.nr, 0, 1) ","deps":["this.$root.nr"]}},{"name":"gutter","type":"number","def":{"kind":"code","src":" this.$root.blockness * 52 ","deps":["this.$root.blockness"],"expr":"L0 K52 *"}},{"name":"myCol","type":"number","def":{"kind":"code","src":" (this.$root.month - 1) % 4 ","deps":["this.$root.month"],"expr":"L0 K1 - K4 %"}},{"name":"myRow","type":"number","def":{"kind":"code","src":" Math.floor((this.$root.month - 1) / 4) ","deps":["this.$root.month"],"expr":"L0 K1 - K4 / f"}},{"name":"slotX","type":"number","def":{"kind":"code","src":" this.$root.pad + this.$root.myCol * (this.$root.miniW + this.$root.gap) ","deps":["this.$root.pad","this.$root.myCol","this.$root.miniW","this.$root.gap"],"expr":"L0 L1 L2 L3 + * +"}},{"name":"slotY","type":"number","def":{"kind":"code","src":" this.$root.pad + this.$root.myRow * (this.$root.miniH + this.$root.gap) ","deps":["this.$root.pad","this.$root.myRow","this.$root.miniH","this.$root.gap"],"expr":"L0 L1 L2 L3 + * +"}},{"name":"yearScale","type":"number","def":{"kind":"code","src":" lerp(this.$root.bodyW / this.$root.miniW, 1, this.$root.yearZoom) ","deps":["this.$root.bodyW","this.$root.miniW","this.$root.yearZoom"]}},{"name":"yearZoom","type":"number","def":{"kind":"value","value":0}},{"name":"openedFrom","type":"View?","def":{"kind":"value","value":null}}],"methods":[{"name":"widestOf","params":[{"name":"samples","type":"string[]"}],"returns":"number","returnsNullable":false,"body":"return Math.max(0,...samples.map(t=>measureText(t,this.$root.titleFace).width))"},{"name":"hourY","params":[{"name":"h","type":"number"}],"returns":"number","returnsNullable":false,"body":"return this.headH+h/24*(this.bodyH-this.headH)"},{"name":"periodLabels","returns":"string[]","returnsNullable":false,"body":"switch(this.mode){case\"year\":return[\"\"+this.year];case\"month\":return[monthName(this.month)+\" \"+this.year,monthName(this.month,true)+\" \"+this.year,monthName(this.month,true)];case\"week\":return[weekLabel(this.anchorKey),weekLabel(this.anchorKey,true),dateLabel(weekStartKey(this.anchorKey))];default:return[dayLabel(this.anchorKey),dayLabel(this.anchorKey,true),dateLabel(this.anchorKey)]}"},{"name":"fittingLabel","params":[{"name":"room","type":"number"}],"returns":"string","returnsNullable":false,"body":"const labels=this.$root.periodLabels();return labels.find(t=>measureText(t,this.$root.titleFace).width+14<=room)??labels[labels.length-1]"},{"name":"gridIndexOf","params":[{"name":"key","type":"string"}],"returns":"number","returnsNullable":false,"body":"const first=new Date(this.year,this.month-1,1);const start=new Date(this.year,this.month-1,1-first.getDay());const d=parseKey(key);return Math.round((Date.UTC(d.getFullYear(),d.getMonth(),d.getDate())-Date.UTC(start.getFullYear(),start.getMonth(),start.getDate()))/864e5)"},{"name":"catFill","params":[{"name":"c","type":"string"}],"returns":"Color","returnsNullable":false,"body":"const t=this.$provided(\"theme\");return c==\"holiday\"?t.holidayBg:c==\"astro\"?t.astroBg:c==\"milestone\"?t.milestoneBg:t.defaultBg"},{"name":"catText","params":[{"name":"c","type":"string"}],"returns":"Color","returnsNullable":false,"body":"const t=this.$provided(\"theme\");return c==\"holiday\"?t.holidayText:c==\"astro\"?t.astroText:c==\"milestone\"?t.milestoneText:t.defaultText"},{"name":"computeMonthRows","returns":"number","returnsNullable":false,"body":"const first=new Date(this.year,this.month-1,1);return Math.ceil((first.getDay()+new Date(this.year,this.month,0).getDate())/7)"},{"name":"buildModel","returns":"object","returnsNullable":false,"body":"const first=new Date(this.year,this.month-1,1);const start=new Date(this.year,this.month-1,1-first.getDay());const grid=[];for(let i=0;i<this.computeMonthRows()*7;i++){const dt=new Date(start.getFullYear(),start.getMonth(),start.getDate()+i);const y=dt.getFullYear(),m=dt.getMonth()+1,d=dt.getDate();grid.push({key:dayKey(y,m,d),y,m,d,dow:dowName(dt.getDay()),col:i%7,row:Math.floor(i/7),inMonth:m==this.month,weekend:dt.getDay()==0||dt.getDay()==6,today:dayKey(y,m,d)==this.todayKey,current:dayKey(y,m,d)==this.anchorKey,events:this.events.on(y,m,d)})}return{grid}"},{"name":"buildMonths","returns":"object","returnsNullable":false,"body":"const months=[];for(let m=1;m<=12;m++){const st=new Date(this.year,m-1,1-new Date(this.year,m-1,1).getDay());const cells=[];for(let i=0;i<42;i++){const dt=new Date(st.getFullYear(),st.getMonth(),st.getDate()+i);const inMonth=dt.getMonth()==m-1;cells.push({num:dt.getDate(),col:i%7,row:Math.floor(i/7),inMonth,today:keyOf(dt)==this.todayKey,has:inMonth&&this.events.any(dt.getFullYear(),m,dt.getDate())})}months.push({m,name:monthName(m),mcol:(m-1)%4,mrow:Math.floor((m-1)/4),cells})}return{months}"},{"name":"goMode","params":[{"name":"m","type":"\"day\" | \"week\" | \"month\" | \"year\""}],"body":"this.selectedId=-1;this.chosen=m;if(m==\"year\")this.yearSeen=true"},{"name":"pickDay","params":[{"name":"key","type":"string"}],"body":"const d=parseKey(key);this.navKey=key;this.navYear=d.getFullYear();this.navMonth=d.getMonth()+1;this.selectedId=-1;this.chosen=\"day\""},{"name":"pickMonth","params":[{"name":"m","type":"number"}],"body":"this.navMonth=m;this.selectedId=-1;this.chosen=\"month\""},{"name":"today","body":"this.navYear=0;this.navMonth=0;this.navKey=\"\""},{"name":"step","params":[{"name":"dir","type":"number"}],"body":"const a=parseKey(this.anchorKey);if(this.mode==\"year\"){const y=this.year+dir;this.navYear=y;this.navKey=dayKey(y,a.getMonth()+1,Math.min(a.getDate(),new Date(y,a.getMonth()+1,0).getDate()))}else if(this.mode==\"month\"){let m=this.month+dir,y=this.year;if(m<1){m=12;y--}else if(m>12){m=1;y++}this.navMonth=m;this.navYear=y;this.navKey=dayKey(y,m,Math.min(a.getDate(),new Date(y,m,0).getDate()))}else{const n=new Date(a.getFullYear(),a.getMonth(),a.getDate()+dir*(this.mode==\"week\"?7:1));this.navKey=keyOf(n);this.navYear=n.getFullYear();this.navMonth=n.getMonth()+1}"},{"name":"selectEvent","params":[{"name":"id","type":"number"},{"name":"key","type":"string","nullable":true}],"body":"this.selectedId=id;this.openSection=0;if(key!=null)this.navKey=key"},{"name":"tabOrder","body":"return[this.bar,...this.tabDefault().filter(v=>v!=this.bar)]"},{"name":"closeDetail","body":"const back=this.openedFrom;const inside=Focus.holds(this.panel);this.selectedId=-1;this.openedFrom=null;if(back!=null&&inside)this.afterSettle(()=>Focus.focus(back))"},{"name":"dayAt","params":[{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"Day","returnsNullable":true,"body":"const col=Math.floor((px-this.pad-this.gutter)/this.colW+this.c0);const row=Math.floor((py-this.barH-this.headH)/this.rowH+this.r0);return this.cal.value?.grid[clamp(row,0,this.monthRows-1)*7+clamp(col,0,6)]??null"},{"name":"minuteAt","params":[{"name":"py","type":"number"}],"returns":"number","returnsNullable":false,"body":"return Math.round((py-this.barH-this.headH)/this.rowH*1440/15)*15"}],"children":[{"tag":"Time","name":"clock","attrs":[{"name":"tick","value":{"kind":"value","value":"day"}}]},{"tag":"Events","name":"events","attrs":[{"name":"autoFetch","value":{"kind":"value","value":true}},{"name":"url","value":{"kind":"code","src":" this.$root.hostProvided(\"base\", \"\") + \"data/events.json\" ","deps":["this.$root.hostProvided(\"base\")"]}}]},{"tag":"Dataset","name":"cal","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"grid","array":true,"optional":false,"type":null,"ref":"Day"}]},"slotType":{"kind":"dataschema"}},{"name":"contents","value":{"kind":"code","src":" this.$root.buildModel() "}}]},{"tag":"Dataset","name":"yearCal","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"months","array":true,"optional":false,"type":null,"ref":"Month"}]},"slotType":{"kind":"dataschema"}},{"name":"contents","value":{"kind":"code","src":" this.$root.yearSeen ? this.$root.buildMonths() : { months: [] } "}}]},{"tag":"Dataset","name":"labels","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"cols","array":true,"optional":false,"type":null,"fields":[{"name":"name","array":false,"optional":false,"type":"string"},{"name":"col","array":false,"optional":false,"type":"number"}]},{"name":"hours","array":true,"optional":false,"type":null,"fields":[{"name":"h","array":false,"optional":false,"type":"number"},{"name":"label","array":false,"optional":false,"type":"string"}]}]},"slotType":{"kind":"dataschema"}},{"name":"contents","value":{"kind":"code","src":" { cols: [0, 1, 2, 3, 4, 5, 6].map((i) => ({ name: dowName(i), col: i })),\n                       hours: Array.from({ length: 24 }, (_, h) => ({ h: h, label: hourLabel(h) })) } "}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"panelInset"}},{"name":"to","value":{"kind":"code","src":" this.$root.selectedId >= 0 ? this.$root.panelW : 0 ","deps":["this.$root.selectedId","this.$root.panelW"],"expr":"L0 K0 g L1 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":240}},{"name":"damping","value":{"kind":"value","value":30}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"c0"}},{"name":"to","value":{"kind":"code","src":" this.$root.c0To ","deps":["this.$root.c0To"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":150}},{"name":"damping","value":{"kind":"value","value":24}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"r0"}},{"name":"to","value":{"kind":"code","src":" this.$root.r0To ","deps":["this.$root.r0To"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":150}},{"name":"damping","value":{"kind":"value","value":24}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"nc"}},{"name":"to","value":{"kind":"code","src":" this.$root.ncTo ","deps":["this.$root.ncTo"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":150}},{"name":"damping","value":{"kind":"value","value":24}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"nr"}},{"name":"to","value":{"kind":"code","src":" this.$root.nrTo ","deps":["this.$root.nrTo"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":150}},{"name":"damping","value":{"kind":"value","value":24}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"yearZoom"}},{"name":"to","value":{"kind":"code","src":" this.$root.mode == \"year\" ? 1 : 0 ","deps":["this.$root.mode"]}},{"name":"stiffness","value":{"kind":"value","value":150}},{"name":"damping","value":{"kind":"value","value":24}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"Drag","name":"drag"},{"tag":"KeyListener","name":"keys","methods":[{"name":"onKeyUp","params":[{"name":"e","type":"KeyEvent"}],"body":"if(e.key==\"Escape\")this.$root.closeDetail();else if(this.$root.selectedId<0&&!Focus.holds(this.$root.bar.tabs)&&e.key==\"ArrowLeft\")this.$root.step(-1);else if(this.$root.selectedId<0&&!Focus.holds(this.$root.bar.tabs)&&e.key==\"ArrowRight\")this.$root.step(1)"}]},{"tag":"View","name":"board","attrs":[{"name":"x","value":{"kind":"value","value":0}},{"name":"y","value":{"kind":"code","src":" this.$root.barH ","deps":["this.$root.barH"],"expr":"L0"}},{"name":"width","value":{"kind":"code","src":" this.$root.bodyW ","deps":["this.$root.bodyW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.bodyH ","deps":["this.$root.bodyH"],"expr":"L0"}},{"name":"clip","value":{"kind":"value","value":true}}],"children":[{"tag":"View","name":"monthBg","attrs":[{"name":"x","value":{"kind":"code","src":" this.$root.slotX ","deps":["this.$root.slotX"],"expr":"L0"}},{"name":"y","value":{"kind":"code","src":" this.$root.slotY ","deps":["this.$root.slotY"],"expr":"L0"}},{"name":"width","value":{"kind":"code","src":" this.$root.miniW ","deps":["this.$root.miniW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.miniH ","deps":["this.$root.miniH"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"value","value":12}},{"name":"fill","value":{"kind":"code","src":" Color.mix(this.$provided(\"theme\").background, this.$provided(\"theme\").miniCurrentBg, this.$root.yearZoom) ","deps":["this.$provided(\"theme\")","this.$root.yearZoom"]}},{"name":"scale","value":{"kind":"code","src":" this.$root.yearScale ","deps":["this.$root.yearScale"],"expr":"L0"}},{"name":"pivotX","value":{"kind":"code","src":" this.$root.miniW / 2 ","deps":["this.$root.miniW"],"expr":"L0 K2 /"}},{"name":"pivotY","value":{"kind":"code","src":" this.$root.miniH / 2 ","deps":["this.$root.miniH"],"expr":"L0 K2 /"}}]},{"tag":"View","name":"weekdays","attrs":[{"name":"opacity","value":{"kind":"code","src":"1-this.$root.blockness)*(1-this.$root.yearZoom","deps":["this.$root.blockness","this.$root.yearZoom"],"expr":"K1 L0 - K1 L1 - *"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.labels.value ","$nullsUndefined":true,"deps":["this.$root.labels.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"View","attrs":[{"name":"datapath","value":{"kind":"path","path":"cols","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"col"},"slotType":{"kind":"string"}},{"name":"x","value":{"kind":"code","src":" this.$root.pad + this.$root.gutter + (this.$data([\"col\"]) - this.$root.c0) * this.$root.colW + 11 ","deps":["this.$root.pad","this.$root.gutter",":col","this.$root.c0","this.$root.colW"],"expr":"L0 L1 + L2 L3 - L4 * + K11 +"}}],"children":[{"tag":"Text","name":"l","attrs":[{"name":"y","value":{"kind":"value","value":9}},{"name":"fontSize","value":{"kind":"value","value":11}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"name\"]) ","deps":[":name"],"expr":"L0"}}]}]}]},{"tag":"View","name":"hours","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"opacity","value":{"kind":"code","src":" this.$root.blockness ","deps":["this.$root.blockness"],"expr":"L0"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.labels.value ","$nullsUndefined":true,"deps":["this.$root.labels.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"View","attrs":[{"name":"datapath","value":{"kind":"path","path":"cols","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"col"},"slotType":{"kind":"string"}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"x","value":{"kind":"code","src":" this.$root.pad + this.$root.gutter + (this.$data([\"col\"]) - this.$root.c0) * this.$root.colW + this.$root.gap / 2 ","deps":["this.$root.pad","this.$root.gutter",":col","this.$root.c0","this.$root.colW","this.$root.gap"],"expr":"L0 L1 + L2 L3 - L4 * + L5 K2 / +"}},{"name":"width","value":{"kind":"code","src":" this.$root.colW - this.$root.gap ","deps":["this.$root.colW","this.$root.gap"],"expr":"L0 L1 -"}},{"name":"opacity","value":{"kind":"code","src":" clamp(Math.min(this.$data([\"col\"]) + 1 - this.$root.c0, this.$root.c0 + this.$root.nc - this.$data([\"col\"])), 0, 1) ","deps":[":col","this.$root.c0","this.$root.nc"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.fillStyle=this.$provided(\"theme\").gridLine;for(let h=1;h<24;h++)d.fillRect(0,Math.round(this.$root.hourY(h)),d.w,1)"}]}]},{"tag":"View","name":"grid","attrs":[{"name":"datapath","value":{"kind":"code","src":" this.$root.cal.value ","$nullsUndefined":true,"deps":["this.$root.cal.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"Cell","attrs":[{"name":"datapath","value":{"kind":"path","path":"grid","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"key"},"slotType":{"kind":"string"}}]}]},{"tag":"View","name":"times","attrs":[{"name":"width","value":{"kind":"code","src":" this.$root.gutter + this.$root.edgeReach ","deps":["this.$root.gutter","this.$root.edgeReach"],"expr":"L0 L1 +"}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").barBg ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" this.$root.blockness ","deps":["this.$root.blockness"],"expr":"L0"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.labels.value ","$nullsUndefined":true,"deps":["this.$root.labels.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"View","attrs":[{"name":"datapath","value":{"kind":"path","path":"hours","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"h"},"slotType":{"kind":"string"}},{"name":"y","value":{"kind":"code","src":" this.$root.hourY(this.$data([\"h\"])) ","deps":[":h","this.$root.headH","this.$root.bodyH"],"expr":"L1 L0 K24 / L2 L1 - * +"}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":1}},{"name":"fill","value":{"kind":"code","src":" Color.mix(this.$provided(\"theme\").gridLine, this.$provided(\"theme\").barBg, 0.4) ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"Text","name":"lbl","attrs":[{"name":"x","value":{"kind":"value","value":6}},{"name":"y","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"value","value":10}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").hourLabel ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"label\"]) ","deps":[":label"],"expr":"L0"}}]}]}]},{"tag":"Text","name":"yearName","attrs":[{"name":"x","value":{"kind":"code","src":" lerp(this.$root.pad + this.$root.gutter - this.$root.c0 * this.$root.colW + this.$root.gap / 2, this.$root.slotX + 10, this.$root.yearZoom) + 4 ","deps":["this.$root.pad","this.$root.gutter","this.$root.c0","this.$root.colW","this.$root.gap","this.$root.slotX","this.$root.yearZoom"]}},{"name":"y","value":{"kind":"code","src":" lerp(this.$root.headH - this.$root.r0 * this.$root.rowH + this.$root.gap / 2, this.$root.slotY + 34, this.$root.yearZoom) - 23 ","deps":["this.$root.headH","this.$root.r0","this.$root.rowH","this.$root.gap","this.$root.slotY","this.$root.yearZoom"]}},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").todayText ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" monthName(this.$root.month) ","deps":["this.$root.month"]}},{"name":"opacity","value":{"kind":"code","src":" clamp((this.$root.yearZoom - 0.5) / 0.5, 0, 1) ","deps":["this.$root.yearZoom"]}}]}]},{"tag":"View","name":"yearView","attrs":[{"name":"y","value":{"kind":"code","src":" this.$root.barH ","deps":["this.$root.barH"],"expr":"L0"}},{"name":"width","value":{"kind":"code","src":" this.$root.bodyW ","deps":["this.$root.bodyW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.bodyH ","deps":["this.$root.bodyH"],"expr":"L0"}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" this.$root.yearZoom > 0.02 ","deps":["this.$root.yearZoom"],"expr":"L0 K0.02 >"}},{"name":"opacity","value":{"kind":"code","src":" clamp((this.$root.yearZoom - 0.5) / 0.3, 0, 1) ","deps":["this.$root.yearZoom"]}},{"name":"scale","value":{"kind":"code","src":" this.$root.yearScale ","deps":["this.$root.yearScale"],"expr":"L0"}},{"name":"pivotX","value":{"kind":"code","src":" this.$root.slotX + this.$root.miniW / 2 ","deps":["this.$root.slotX","this.$root.miniW"],"expr":"L0 L1 K2 / +"}},{"name":"pivotY","value":{"kind":"code","src":" this.$root.slotY + this.$root.miniH / 2 ","deps":["this.$root.slotY","this.$root.miniH"],"expr":"L0 L1 K2 / +"}}],"children":[{"tag":"View","name":"grid","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"datapath","value":{"kind":"code","src":" this.$root.yearCal.value ","$nullsUndefined":true,"deps":["this.$root.yearCal.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"MiniMonth","attrs":[{"name":"datapath","value":{"kind":"path","path":"months","many":true},"route":"cursor"},{"name":"identityKey","value":{"kind":"path","path":"m"},"slotType":{"kind":"string"}}]}]}]},{"tag":"View","name":"panel","attrs":[{"name":"width","value":{"kind":"code","src":" this.$root.panelW ","deps":["this.$root.panelW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.bodyH ","deps":["this.$root.bodyH"],"expr":"L0"}},{"name":"y","value":{"kind":"code","src":" this.$root.barH ","deps":["this.$root.barH"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" this.$root.width - this.$root.panelInset ","deps":["this.$root.width","this.$root.panelInset"],"expr":"L0 L1 -"}},{"name":"visible","value":{"kind":"code","src":" this.$root.selectedId >= 0 || this.$root.panelInset > 0.5 ","deps":["this.$root.selectedId","this.$root.panelInset"],"expr":"L0 K0 g L0 K0 g L1 K0.5 > ?"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").surface ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" [null, null, null, Stroke(1, this.$provided(\"theme\").line)] ","deps":["this.$provided(\"theme\")"]}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":24},{"kind":"number","value":22},{"kind":"number","value":24},{"kind":"number","value":22}]},"route":"corners"},{"name":"datapath","value":{"kind":"code","src":" this.$root.events.byId(this.$root.selectedId) ","$nullsUndefined":true},"route":"cursor"}],"methods":[{"name":"tabOrder","body":"return this.$root.selectedId>=0?this.tabDefault():[]"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":8}}],"classSlot":"Layout"},{"tag":"View","name":"ev","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"value","value":10}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").sectionBg ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" [null, null, null, Stroke(4, this.$root.catText(this.$data([\"category\"])))] "}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":13},{"kind":"number","value":12},{"kind":"number","value":13}]},"route":"corners"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}}],"classSlot":"Layout"},{"tag":"View","name":"hdr","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":40}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}}],"classSlot":"Layout"},{"tag":"Text","name":"lbl","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"fontWeight","value":{"kind":"value","value":"bold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"letterSpacing","value":{"kind":"value","value":1}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"EVENT"}}]},{"tag":"Spacer"},{"tag":"Control","name":"close","attrs":[{"name":"width","value":{"kind":"value","value":15}},{"name":"height","value":{"kind":"value","value":15}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"cornerRadius","value":{"kind":"value","value":4}}],"methods":[{"name":"press","body":"this.$root.closeDetail()"}],"children":[{"tag":"CloseIcon","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":15}},{"name":"ink","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]}]}]},{"tag":"TextInput","name":"title","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":32}},{"name":"fontSize","value":{"kind":"value","value":16},"route":"provision"},{"name":"fontWeight","value":{"kind":"value","value":"bold"},"route":"provision"},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").text ","deps":["this.$provided(\"theme\")"]},"route":"provision"},{"name":"placeholder","value":{"kind":"value","value":"Untitled event"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").fieldBg ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.focused ? this.$provided(\"theme\").accent : this.$provided(\"theme\").fieldEdge) ","deps":["this.focused","this.$provided(\"theme\")"]}},{"name":"value","value":{"kind":"path","path":"title"},"shorthand":true,"place":":title","slotType":{"kind":"string"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"any"}],"body":"this.$cell([\"title\"]).value=v"}]},{"tag":"Text","name":"meta","attrs":[{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":12},{"kind":"number","value":0},{"kind":"number","value":0},{"kind":"number","value":0}]},"route":"corners"},{"name":"fontSize","value":{"kind":"value","value":12.5}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" dayLabel(dayKey(this.$data([\"y\"]), this.$data([\"m\"]), this.$data([\"d\"]))) + \"  ·  \" + shortTime(this.$data([\"start\"])) + \" – \" + shortTime(this.$data([\"end\"])) ","deps":[":y",":m",":d",":start",":end"]}}]}]},{"tag":"DetailSection","attrs":[{"name":"idx","value":{"kind":"value","value":0}},{"name":"label","value":{"kind":"value","value":"NOTES"}},{"name":"field","value":{"kind":"value","value":"notes"}}]},{"tag":"DetailSection","attrs":[{"name":"idx","value":{"kind":"value","value":1}},{"name":"label","value":{"kind":"value","value":"LOCATION"}},{"name":"field","value":{"kind":"value","value":"location"}}]},{"tag":"DetailSection","attrs":[{"name":"idx","value":{"kind":"value","value":2}},{"name":"label","value":{"kind":"value","value":"ATTENDEES"}},{"name":"field","value":{"kind":"value","value":"attendees"}}]}]},{"tag":"View","name":"ghost","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.drag.moving ","deps":["this.$root.drag.moving"],"expr":"L0"}},{"name":"opacity","value":{"kind":"value","value":0.9}},{"name":"x","value":{"kind":"code","src":" this.$root.pointerX - this.$root.drag.grabX ","deps":["this.$root.pointerX","this.$root.drag.grabX"],"expr":"L0 L1 -"}},{"name":"y","value":{"kind":"code","src":" this.$root.pointerY - this.$root.drag.grabY ","deps":["this.$root.pointerY","this.$root.drag.grabY"],"expr":"L0 L1 -"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.drag.moving ? this.$root.events.byId(this.$root.drag.id) : null ","$nullsUndefined":true},"route":"cursor"},{"name":"width","value":{"kind":"code","src":" this.$root.drag.chipW ","deps":["this.$root.drag.chipW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" Math.max(this.$root.drag.chipH, 34) ","deps":["this.$root.drag.chipH"],"expr":"L0 K34 M"}},{"name":"cornerRadius","value":{"kind":"value","value":6}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"fill","value":{"kind":"code","src":" this.$root.catFill(this.$data([\"category\"]) ?? \"\") "}},{"name":"shadow","value":{"kind":"value","value":{"fn":"shadow","dx":0,"dy":6,"blur":16,"color":4294967432}}}],"children":[{"tag":"View","name":"rail","attrs":[{"name":"width","value":{"kind":"value","value":3}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"fill","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"]) ?? \"\") "}}]},{"tag":"Text","name":"tm","attrs":[{"name":"x","value":{"kind":"value","value":11}},{"name":"y","value":{"kind":"value","value":4}},{"name":"fontSize","value":{"kind":"value","value":10}},{"name":"fontWeight","value":{"kind":"value","value":"bold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"]) ?? \"\") "}},{"name":"text","value":{"kind":"code","src":" shortTime(this.$data([\"start\"]) ?? 0) ","deps":[":start"]}}]},{"tag":"Text","name":"ti","attrs":[{"name":"x","value":{"kind":"value","value":11}},{"name":"y","value":{"kind":"value","value":17}},{"name":"fontSize","value":{"kind":"value","value":11}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$root.catText(this.$data([\"category\"]) ?? \"\") "}},{"name":"text","value":{"kind":"code","src":" this.$data([\"title\"]) ?? \"\" ","deps":[":title"]}}]}]},{"tag":"View","name":"bar","attrs":[{"name":"width","value":{"kind":"code","src":" this.$root.width ","deps":["this.$root.width"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.barH ","deps":["this.$root.barH"],"expr":"L0"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":20},{"kind":"number","value":0},{"kind":"number","value":20}]},"route":"corners"},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").barBg ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" [null, null, Stroke(1, this.$provided(\"theme\").line), null] ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":16}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"View","name":"brand","attrs":[{"name":"height","value":{"kind":"value","value":22}},{"name":"visible","value":{"kind":"code","src":" this.$root.showBrand ","deps":["this.$root.showBrand"],"expr":"L0"}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":5}}],"classSlot":"Layout"},{"tag":"Control","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"link"}}],"methods":[{"name":"press","body":"this.$root.openURL(\"apps/homepage/homepage.declare\")"}],"children":[{"tag":"Text","attrs":[{"name":"fontSize","value":{"kind":"value","value":18}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"letterSpacing","value":{"kind":"code","src":" -0.02 * this.fontSize ","deps":["this.fontSize"],"expr":"K-0.02 L0 *"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"Declare"}}]}]},{"tag":"Text","attrs":[{"name":"fontSize","value":{"kind":"value","value":18}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"letterSpacing","value":{"kind":"code","src":" -0.02 * this.fontSize ","deps":["this.fontSize"],"expr":"K-0.02 L0 *"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").text ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"Calendar"}}]}]},{"tag":"AppearanceSwitch","name":"themeSwitch","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.showTheme ","deps":["this.$root.showTheme"],"expr":"L0"}},{"name":"dark","value":{"kind":"code","src":" this.$root.isDark ","deps":["this.$root.isDark"],"expr":"L0"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.$root.themeMode=v?\"dark\":\"light\""}]},{"tag":"View","name":"middle","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"height","value":{"kind":"value","value":{"percent":100}}}],"children":[{"tag":"View","name":"nav","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"width","value":{"kind":"code","src":" Math.min(parent.width, this.$root.navW) ","deps":["parent.width","this.$root.navW"],"expr":"L0 L1 m"}},{"name":"x","value":{"kind":"code","src":" clamp(this.$root.width / 2 - parent.x - this.width / 2, 0, parent.width - this.width) ","deps":["this.$root.width","parent.x","this.width","parent.width"]}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":6}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"NavArrow","name":"prev","attrs":[{"name":"dir","value":{"kind":"value","value":-1}}]},{"tag":"Control","name":"title","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"height","value":{"kind":"value","value":34}},{"name":"cornerRadius","value":{"kind":"value","value":10}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").control : null ","deps":["this.pressed","this.$provided(\"theme\")"]}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.words.text + \", go to today\" ","deps":["this.words.text"]}}],"methods":[{"name":"press","body":"this.$root.today()"}],"children":[{"tag":"Text","name":"words","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"textAlign","value":{"kind":"value","value":"center"}},{"name":"fontSize","value":{"kind":"value","value":16}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").text ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.fittingLabel(this.width) "}}]}]},{"tag":"NavArrow","name":"next","attrs":[{"name":"dir","value":{"kind":"value","value":1}}]}]}]},{"tag":"Button","name":"today","attrs":[{"name":"height","value":{"kind":"value","value":34}},{"name":"fontSize","value":{"kind":"value","value":13},"route":"provision"},{"name":"label","value":{"kind":"value","value":"Today"}},{"name":"visible","value":{"kind":"code","src":" this.$root.showToday ","deps":["this.$root.showToday"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" this.hovered || this.pressed ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["this.hovered","this.pressed","this.$provided(\"theme\")"]}}],"methods":[{"name":"onClick","body":"this.$root.today()"}]},{"tag":"Segmented","name":"tabs","attrs":[{"name":"height","value":{"kind":"value","value":34}},{"name":"width","value":{"kind":"code","src":" this.$root.tabsW ","deps":["this.$root.tabsW"],"expr":"L0"}},{"name":"value","value":{"kind":"code","src":" this.$root.mode ","deps":["this.$root.mode"],"expr":"L0"}},{"name":"items","value":{"kind":"code","src":" [ ({ id: \"day\",   label: this.$root.tabsCompact ? \"D\" : \"Day\" }),\n                        ...(this.$root.narrow ? [] : [ ({ id: \"week\",  label: this.$root.tabsCompact ? \"W\" : \"Week\" }) ]),\n                        ({ id: \"month\", label: this.$root.tabsCompact ? \"M\" : \"Month\" }),\n                        ({ id: \"year\",  label: this.$root.tabsCompact ? \"Y\" : \"Year\" }) ] ","deps":["this.$root.tabsCompact","this.$root.narrow"]}}],"methods":[{"name":"commit","params":[{"name":"v","type":"object"}],"body":"this.$root.goMode(v)"}]}]},{"tag":"FocusRing"},{"tag":"Tooltip"}]},"permitted":["Time","Events","Dataset","Spring","Drag","KeyListener","View","Text","Cell","MiniMonth","SimpleLayout","Spacer","Control","CloseIcon","TextInput","DetailSection","AppearanceSwitch","NavArrow","Button","Segmented","FocusRing","Tooltip","Layout","Icon","Node","ValueControl","NativeText","SunIcon","MoonIcon","IconHost","TextLabel","SegmentedItem","SendHold","Floating","DataSource","State","Ev","MiniDay","ChevronIcon","MinusIcon","PlusIcon","App","OverlayStrata"],"permittedIslands":[],"routed":true,"trusted":true},"closure":{"entries":[{"id":"apps/calendar/calendar.declare","kind":"file","v":{"hash":"14749f636af821c0"}},{"id":"library/autoincludes.json","kind":"file","v":{"hash":"60fb94adfefe9dbc"}},{"id":"library/simplelayout.declare","kind":"file","v":{"hash":"29f3a343605dba4b"}},{"id":"library/spacer.declare","kind":"file","v":{"hash":"79e9d2cb7d1d4c0f"}},{"id":"library/control.declare","kind":"file","v":{"hash":"52d54b27b0daa659"}},{"id":"library/icons/core.declare","kind":"file","v":{"hash":"966f63ab6d6344f1"}},{"id":"library/icons/icon.declare","kind":"file","v":{"hash":"e1a53e07afc89bb5"}},{"id":"library/textinput.declare","kind":"file","v":{"hash":"373268fd66e8da57"}},{"id":"library/valuecontrol.declare","kind":"file","v":{"hash":"541b0dbd98527a7e"}},{"id":"library/appearanceswitch.declare","kind":"file","v":{"hash":"ca6fe5fac1e3a52a"}},{"id":"library/icons/appearance.declare","kind":"file","v":{"hash":"b71c48c351356057"}},{"id":"library/button.declare","kind":"file","v":{"hash":"3315f3f024cb32aa"}},{"id":"library/textlabel.declare","kind":"file","v":{"hash":"64c334940470cb5f"}},{"id":"library/segmented.declare","kind":"file","v":{"hash":"21648c49244ceddb"}},{"id":"library/focusring.declare","kind":"file","v":{"hash":"3e6b322e5189af9b"}},{"id":"library/tooltip.declare","kind":"file","v":{"hash":"6fc0a56d15e41075"}},{"id":"library/floating.declare","kind":"file","v":{"hash":"171733c1e563d77d"}},{"id":"library/overlaystrata.declare","kind":"file","v":{"hash":"a4e12304eab79c2f"}}],"props":{"render":"dom"}}}
