@holoviz/panel 1.9.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/panel.min.js CHANGED
@@ -43,12 +43,12 @@
43
43
  })
44
44
  ({
45
45
  "4e90918c0a": function _(e,s,t,b,o){b();const i=e("tslib").__importStar(e("2fe1822b2b"));t.Panel=i;(0,e("@bokehjs/base").register_models)(i)},
46
- "2fe1822b2b": function _(e,a,t,o,c){o(),t.VizzuChart=t.VideoStream=t.Video=t.VegaPlot=t.TrendIndicator=t.TooltipIcon=t.ToggleIcon=void 0;const d=e("tslib");c("AcePlot",e("5fa2fb81b3").AcePlot),c("AnyWidgetComponent",e("1f663ffe94").AnyWidgetComponent),c("Audio",e("fd59c985b3").Audio),c("BrowserInfo",e("5a16cc23e6").BrowserInfo),c("Button",e("1db93211cd").Button),c("ButtonIcon",e("1738ddeb3a").ButtonIcon),c("ClickableIcon",e("6c7fbea0ef").ClickableIcon),c("Card",e("31556103c8").Card),c("CheckboxButtonGroup",e("51fbe9e2d0").CheckboxButtonGroup),c("ChatAreaInput",e("27a077673d").ChatAreaInput),c("Column",e("b273e5b2fb").Column),c("CommManager",e("1bec1b1fcc").CommManager),c("CustomSelect",e("92bbd30bd1").CustomSelect),c("CustomMultiSelect",e("27b5580835").CustomMultiSelect),c("DataTabulator",e("b90fc40725").DataTabulator),c("DatetimePicker",e("100965d6f3").DatetimePicker),c("DatetimeSlider",e("c97cc0eade").DatetimeSlider),c("DeckGLPlot",e("d58ba73420").DeckGLPlot),c("DiscretePlayer",e("0dca2cd4f6").DiscretePlayer),c("ECharts",e("ec1ecef6a0").ECharts),c("Feed",e("f9c84aaf3d").Feed),c("FileDownload",e("84a13dddfb").FileDownload),c("FileDropper",e("8531319d94").FileDropper),c("HTML",e("4c04683fdc").HTML),c("IPyWidget",e("8a8089cbf3").IPyWidget),c("JSON",e("245cd3cfde").JSON),c("JSONEditor",e("33e664043e").JSONEditor),c("KaTeX",e("f672d71a9f").KaTeX),c("Location",e("9012b81346").Location),c("MathJax",e("d889a68424").MathJax),c("Modal",e("9a342a6757").Modal),c("PDF",e("f87ad1873c").PDF),c("Perspective",e("29a0b0da9a").Perspective),c("Player",e("96e805ccb5").Player),c("PlotlyPlot",e("59dbae0a77").PlotlyPlot),c("Progress",e("b1f4d68596").Progress),c("QuillInput",e("a8f2a01dfe").QuillInput),c("RadioButtonGroup",e("25e2d7c208").RadioButtonGroup),c("ReactComponent",e("529fb470ea").ReactComponent),c("ReactiveHTML",e("d5752cda5a").ReactiveHTML),c("ReactiveESM",e("a5f4225d5f").ReactiveESM),c("SingleSelect",e("4155401209").SingleSelect),c("SpeechToText",e("5ac2cab0ab").SpeechToText),c("State",e("92822cb73a").State),c("Tabs",e("fffb4344f7").Tabs),c("Terminal",e("a961b5ae5e").Terminal),c("TextAreaInput",e("b7d595d74a").TextAreaInput),c("TextInput",e("8be416b160").TextInput),c("TextToSpeech",e("a04eb51988").TextToSpeech),c("TimePicker",e("1afcab4e45").TimePicker),c("ToggleIcon",e("ad985f285e").ToggleIcon),c("TooltipIcon",e("ae3a172647").TooltipIcon),c("TrendIndicator",e("29d55a28a9").TrendIndicator),c("VegaPlot",e("22dbf7c070").VegaPlot),c("Video",e("79dc37b888").Video),c("VideoStream",e("f8afc4e661").VideoStream),c("VizzuChart",e("1f7bc1f95b").VizzuChart),d.__exportStar(e("c51f25e2a7"),t)},
46
+ "2fe1822b2b": function _(e,a,t,o,c){o(),t.VizzuChart=t.VideoStream=t.Video=t.VegaPlot=t.TrendIndicator=t.TooltipIcon=t.ToggleIcon=void 0;const d=e("tslib");c("AcePlot",e("5fa2fb81b3").AcePlot),c("AnyWidgetComponent",e("1f663ffe94").AnyWidgetComponent),c("Audio",e("fd59c985b3").Audio),c("BrowserInfo",e("5a16cc23e6").BrowserInfo),c("Button",e("1db93211cd").Button),c("ButtonIcon",e("1738ddeb3a").ButtonIcon),c("ClickableIcon",e("6c7fbea0ef").ClickableIcon),c("Card",e("31556103c8").Card),c("CheckboxButtonGroup",e("51fbe9e2d0").CheckboxButtonGroup),c("ChatAreaInput",e("27a077673d").ChatAreaInput),c("Column",e("b273e5b2fb").Column),c("CommManager",e("1bec1b1fcc").CommManager),c("CustomSelect",e("92bbd30bd1").CustomSelect),c("CustomMultiSelect",e("27b5580835").CustomMultiSelect),c("DataTabulator",e("b90fc40725").DataTabulator),c("DatetimePicker",e("100965d6f3").DatetimePicker),c("DatetimeSlider",e("c97cc0eade").DatetimeSlider),c("DeckGLPlot",e("d58ba73420").DeckGLPlot),c("DiscretePlayer",e("0dca2cd4f6").DiscretePlayer),c("ECharts",e("ec1ecef6a0").ECharts),c("Feed",e("f9c84aaf3d").Feed),c("FileDownload",e("84a13dddfb").FileDownload),c("FileDropper",e("8531319d94").FileDropper),c("HTML",e("4c04683fdc").HTML),c("IPyWidget",e("8a8089cbf3").IPyWidget),c("JSON",e("245cd3cfde").JSON),c("JSONEditor",e("33e664043e").JSONEditor),c("KaTeX",e("f672d71a9f").KaTeX),c("Location",e("9012b81346").Location),c("MathJax",e("d889a68424").MathJax),c("Modal",e("9a342a6757").Modal),c("PDF",e("f87ad1873c").PDF),c("Perspective",e("29a0b0da9a").Perspective),c("Player",e("96e805ccb5").Player),c("PlotlyPlot",e("59dbae0a77").PlotlyPlot),c("Progress",e("b1f4d68596").Progress),c("QuillInput",e("a8f2a01dfe").QuillInput),c("RadioButtonGroup",e("25e2d7c208").RadioButtonGroup),c("ReactComponent",e("d89e70455a").ReactComponent),c("ReactiveHTML",e("d5752cda5a").ReactiveHTML),c("ReactiveESM",e("5cb5357866").ReactiveESM),c("SingleSelect",e("4155401209").SingleSelect),c("SpeechToText",e("5ac2cab0ab").SpeechToText),c("State",e("92822cb73a").State),c("Tabs",e("fffb4344f7").Tabs),c("Terminal",e("a961b5ae5e").Terminal),c("TextAreaInput",e("b7d595d74a").TextAreaInput),c("TextInput",e("8be416b160").TextInput),c("TextToSpeech",e("a04eb51988").TextToSpeech),c("TimePicker",e("1afcab4e45").TimePicker),c("ToggleIcon",e("ad985f285e").ToggleIcon),c("TooltipIcon",e("ae3a172647").TooltipIcon),c("TrendIndicator",e("29d55a28a9").TrendIndicator),c("VegaPlot",e("22dbf7c070").VegaPlot),c("Video",e("79dc37b888").Video),c("VideoStream",e("f8afc4e661").VideoStream),c("VizzuChart",e("1f7bc1f95b").VizzuChart),d.__exportStar(e("c51f25e2a7"),t)},
47
47
  "5fa2fb81b3": function _(e,t,o,i,s){var n;i();const d=e("@bokehjs/core/dom"),a=e("dab42e6dad"),_=e("aa07eb54cc");class h extends a.HTMLBoxView{connect_signals(){super.connect_signals();const{code:e,theme:t,language:o,filename:i,print_margin:s,annotations:n,soft_tabs:d,indent:a,readonly:_}=this.model.properties;this.on_change(e,(()=>this._update_code_from_model())),this.on_change(t,(()=>this._update_theme())),this.on_change(o,(()=>this._update_language())),this.on_change(i,(()=>this._update_filename())),this.on_change(s,(()=>this._update_print_margin())),this.on_change(n,(()=>this._add_annotations())),this.on_change(a,(()=>this._editor.setOptions({tabSize:this.model.indent}))),this.on_change(d,(()=>this._editor.setOptions({useSoftTabs:this.model.soft_tabs}))),this.on_change(_,(()=>{this._editor.setReadOnly(this.model.readonly)}))}render(){super.render(),this._container=(0,d.div)({id:(0,_.ID)(),style:{width:"100%",height:"100%",zIndex:"0"}}),this.shadow_el.append(this._container),this._container.textContent=this.model.code,this._editor=ace.edit(this._container),this._editor.renderer.attachToShadowRoot(),this._langTools=ace.require("ace/ext/language_tools"),this._modelist=ace.require("ace/ext/modelist"),this._editor.setOptions({enableBasicAutocompletion:!0,tabSize:this.model.indent,useSoftTabs:this.model.soft_tabs,enableSnippets:!0,fontFamily:"monospace"}),this._update_theme(),this._update_filename(),this._update_language(),this._editor.setReadOnly(this.model.readonly),this._editor.setShowPrintMargin(this.model.print_margin),this.model.on_keyup?this._editor.on("change",(()=>this._update_code_from_editor())):(this._editor.on("blur",(()=>this._update_code_from_editor())),this._editor.commands.addCommand({name:"updateCodeFromEditor",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:()=>{this._update_code_from_editor()}})),this._editor.on("change",(()=>this._update_code_input_from_editor()))}_update_code_from_model(){if(this._editor&&this._editor.getValue()!=this.model.code){const e=this._editor.getCursorPosition(),t=this._editor.session.getScrollTop(),o=this._editor.session.getScrollLeft();this._editor.setValue(this.model.code,-1);const i=this._editor.session.getLength();if(e.row<i){const t=this._editor.session.getLine(e.row).length,o=Math.min(e.column,t);this._editor.moveCursorToPosition({row:e.row,column:o})}else this._editor.moveCursorToPosition({row:i-1,column:this._editor.session.getLine(i-1).length});this._editor.clearSelection(),this._editor.session.setScrollTop(t),this._editor.session.setScrollLeft(o)}}_update_print_margin(){this._editor.setShowPrintMargin(this.model.print_margin)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_code_input_from_editor(){this._editor.getValue()!=this.model.code_input&&(this.model.code_input=this._editor.getValue())}_update_theme(){this._editor&&this._editor.setTheme(`ace/theme/${this.model.theme}`)}_update_filename(){if(this.model.filename){const e=this._modelist.getModeForPath(this.model.filename).mode;this.model.language=e.slice(9)}}_update_language(){null!=this.model.language&&(this._editor.session.setMode(`ace/mode/${this.model.language}`),this._add_annotations())}_add_annotations(){this._editor.session.setUseWorker(0===this.model.annotations.length),this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),void 0!==this._editor&&this._editor.resize()}}o.AcePlotView=h,h.__name__="AcePlotView";class r extends a.HTMLBox{constructor(e){super(e)}}o.AcePlot=r,n=r,r.__name__="AcePlot",r.__module__="panel.models.ace",n.prototype.default_view=h,n.define((({Any:e,Bool:t,Int:o,List:i,Str:s,Nullable:n})=>({annotations:[i(e),[]],code:[s,""],code_input:[s,""],filename:[n(s),null],indent:[o,4],language:[s,""],on_keyup:[t,!0],print_margin:[t,!1],theme:[s,"github_light_default"],readonly:[t,!1],soft_tabs:[t,!1]}))),n.override({height:300,width:300})},
48
48
  "dab42e6dad": function _(e,t,i,s,h){s(),i.set_size=o;const n=e("@bokehjs/core/dom"),l=e("@bokehjs/core/util/types"),a=e("@bokehjs/core/util/assert"),r=e("@bokehjs/models/widgets/widget"),d=e("@bokehjs/models/layouts/layout_dom");class _ extends r.WidgetView{connect_signals(){super.connect_signals();const{width:e,height:t,min_height:i,max_height:s,margin:h,sizing_mode:n}=this.model.properties;this.on_change([e,t,i,s,h,n],(()=>{o(this.el,this.model),o(this.container,this.model,!1)}))}async lazy_initialize(){await super.lazy_initialize(),"not_started"!=this.provider.status&&"loading"!=this.provider.status||this.provider.ready.connect((()=>{this.contains_tex_string(this.model.text)&&this.render()}))}watch_stylesheets(){this._initialized_stylesheets=new Map;for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets.set(t.href,!1),t.addEventListener("load",(()=>{this._initialized_stylesheets.set(t.href,!0),[...this._initialized_stylesheets.values()].every((e=>e))&&requestAnimationFrame((()=>this.style_redraw()))})))}0==this._initialized_stylesheets.size&&this.style_redraw()}rerender_(e=null){(e=e??this).rerender?e.rerender():(e.render(),e.r_after_render())}style_redraw(){}has_math_disabled(){return this.model.disable_math||!this.contains_tex_string(this.model.text)}render(){super.render(),o(this.el,this.model),this.container=(0,n.div)(),o(this.container,this.model,!1),this.shadow_el.appendChild(this.container),"failed"!=this.provider.status&&"loaded"!=this.provider.status||(this._has_finished=!0)}}function o(e,t,i=!0){let s=null!=t.width?"fixed":"fit",h=null!=t.height?"fixed":"fit";const{sizing_mode:r,margin:d}=t;if(null!=r)if("fixed"==r)s=h="fixed";else if("stretch_both"==r)s=h="max";else if("stretch_width"==r)s="max";else if("stretch_height"==r)h="max";else switch(r){case"scale_width":s="max",h="min";break;case"scale_height":s="min",h="max";break;case"scale_both":s="max",h="max";break;case"inherit":break;default:(0,a.unreachable)()}let _,o;i?(0,l.isArray)(d)?4===d.length?(o=d[0]+d[2],_=d[1]+d[3]):(o=2*d[0],_=2*d[1]):null==d?o=_=0:_=o=2*d:o=_=0,"fixed"==s&&null!=t.width?e.style.width=(0,n.px)(t.width):"max"==s&&(e.style.width=0!=_?`calc(100% - ${(0,n.px)(_)})`:"100%"),null!=t.min_width&&(e.style.minWidth=(0,n.px)(t.min_width)),null!=t.max_width&&(e.style.maxWidth=(0,n.px)(t.max_width)),"fixed"==h&&null!=t.height?e.style.height=(0,n.px)(t.height):"max"==h&&(e.style.height=0!=o?`calc(100% - ${(0,n.px)(o)})`:"100%"),null!=t.min_height&&(e.style.minHeight=(0,n.px)(t.min_height)),null!=t.max_height&&(e.style.maxHeight=(0,n.px)(t.max_height))}i.PanelMarkupView=_,_.__name__="PanelMarkupView";class m extends d.LayoutDOMView{connect_signals(){super.connect_signals();const{width:e,height:t,min_height:i,max_height:s,margin:h,sizing_mode:n}=this.model.properties;this.on_change([e,t,i,s,h,n],(()=>{o(this.el,this.model)}))}render(){super.render(),o(this.el,this.model)}rerender_(e=null){(e=e??this).rerender?e.rerender():(e.render(),e.r_after_render())}watch_stylesheets(){this._initialized_stylesheets=new Map;for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets.set(t.href,!1),t.addEventListener("load",(()=>{this._initialized_stylesheets.set(t.href,!0),[...this._initialized_stylesheets.values()].every((e=>e))&&this.style_redraw()})))}0===Object.keys(this._initialized_stylesheets).length&&requestAnimationFrame((()=>this.style_redraw()))}style_redraw(){}get child_models(){return[]}}i.HTMLBoxView=m,m.__name__="HTMLBoxView";class c extends d.LayoutDOM{constructor(e){super(e)}}i.HTMLBox=c,c.__name__="HTMLBox"},
49
49
  "aa07eb54cc": function _(t,e,n,r,o){r(),n.throttle=function(t,e){let n=0,r=null;return function(...o){const c=this,s=Date.now();r&&clearTimeout(r),s-n>=e?(t.apply(c,o),n=Date.now()):r=setTimeout((function(){t.apply(c,o),n=Date.now(),r=null}),e-(s-n))}},n.deepCopy=function t(e){let n;if(null==e||"object"!=typeof e)return e;if(e instanceof Array){n=[];for(let r=0,o=e.length;r<o;r++)n[r]=t(e[r]);return n}if(e instanceof Object){const n={};for(const r in e){const o=r;e.hasOwnProperty(o)&&(n[o]=t(e[o]))}return n}throw new Error("Unable to copy obj! Its type isn't supported.")},n.reshape=function(t,e){let n=0;if(!e||!t)return[];return function r(o){let s=[];if(o===e.length-1)s=(0,c.concat)(t.slice(n,n+e[o])),n+=e[o];else for(let t=0;t<e[o];t++)s.push(r(o+1));return s}(0)},n.loadScript=async function(t,e){const n=document.createElement("script");return n.type=t,n.src=e,n.defer=!0,document.head.appendChild(n),new Promise(((t,e)=>{n.onload=()=>{t()},n.onerror=()=>{e()}}))},n.ID=function(){return`_${Math.random().toString(36).substring(2,11)}`},n.convertUndefined=function t(e){if((0,s.isArray)(e))return e.map(t);(0,s.isPlainObject)(e)&&Object.entries(e).forEach((([n,r])=>{(0,s.isPlainObject)(r)||(0,s.isArray)(r)?t(r):void 0===r&&(e[n]=null)}));return e},n.formatError=function(t,e){let n=`<span class="msg">${t}</span>`;const r=n.match(/\((\d+):(\d+)\)/);if(!r)return n;const o=parseInt(r[1]),c=parseInt(r[2]),s=Math.max(0,o-5),i=o-s,u=e.replace(/>/g,"&lt;").replace(/</g,"&gt;").split(/\r?\n/).slice(s,o+5);n+="<br><br>";for(let t=0;t<i;t++){n+=`<pre${t==i-1?' class="highlight"':""}>${u[t]}</pre>`}const l=" ".repeat(c-1);n+=`<pre class="highlight">${l}^</pre>`;for(let t=i;t<u.length;t++)n+=`<pre>${u[t]}</pre>`;return n},n.find_attributes=function(t,e,n){const r=RegExp(`\\b${e}\\.([a-zA-Z_][a-zA-Z0-9_]*)\\b`,"g"),o=[];let s,i;for(;null!==(s=r.exec(t))&&null!==(i=s[0].slice(e.length+1))&&!n.includes(i);)o.push(i);return(0,c.uniq)(o)},n.schedule_when=function(t,e,n=10){const r=()=>{e()?t():setTimeout(r,n)};r()},n.compileToFunction=l,n.transformJsPlaceholders=function(t,e){return function t(n){if("string"==typeof n){const t=n.match(i);return t?l(t[1],e):n}if(Array.isArray(n))return n.map(t);if(n&&"object"==typeof n&&Object.getPrototypeOf(n)===Object.prototype){const e={};for(const[r,o]of Object.entries(n))e[r]=t(o);return e}return n}(t)};const c=t("@bokehjs/core/util/array"),s=t("@bokehjs/core/util/types");n.get=(t,e,n=void 0)=>{const r=n=>String.prototype.split.call(e,n).filter(Boolean).reduce(((t,e)=>null!=t?t[e]:t),t),o=r(/[,[\]]+?/)||r(/[,[\].]+?/);return void 0===o||o===t?n:o},n.MARK="--x_x--0_0--";const i=new RegExp(`^${n.MARK}([\\s\\S]*?)${n.MARK}$`),u={mode:"expression",args:[]};function l(t,e=u){const{mode:n,args:r}={...u,...e};return new Function(...r,"expression"===n?`"use strict";\nreturn (${t});`:`"use strict";\n${t}`)()}},
50
- "1f663ffe94": function _(e,t,i,n,s){var r;n();const o=e("a5f4225d5f");class a{constructor(e){this.view=null,this.model=e,this.model_changes={},this.data_changes={}}get(e){let t;const i=e.split(".");let n=this.model.data;for(let e=0;e<i.length-1;e++){if(!(n&&n.attributes&&i[e]in n.attributes)){n=null;break}n=n.attributes[i[e]]}return t=n&&n.attributes&&i[i.length-1]in n.attributes?n.attributes[i[i.length-1]]:this.model.attributes[e],t instanceof ArrayBuffer&&(t=new DataView(t)),t}set(e,t){e.split(".")[0]in this.model.data.attributes?this.data_changes={...this.data_changes,[e]:t}:e in this.model.attributes&&(this.model_changes={...this.model_changes,[e]:t})}save_changes(){this.model.setv(this.model_changes),this.model_changes={};for(const e in this.data_changes){const t=e.split(".");let i=this.model.data;for(let n=0;n<t.length-1;n++){if(!(i&&i.attributes&&t[n]in i.attributes)){console.warn(`Skipping '${e}': '${t[n]}' does not exist.`),i=null;break}i=i.attributes[t[n]]}i&&i.attributes&&t[t.length-1]in i.attributes?i.setv({[t[t.length-1]]:this.data_changes[e]}):console.warn(`Skipping '${e}': Final property '${t[t.length-1]}' not found.`)}this.data_changes={}}on(e,t){e.startsWith("change:")?this.model.watch(this.view,e.slice(7),t):"msg:custom"===e&&this.view?this.view.on_event(t):console.error(`Event of type '${e}' not recognized.`)}off(e,t){e.startsWith("change:")?this.model.unwatch(this.view,e.slice(7),t):"msg:custom"===e&&this.view?this.view.remove_on_event(t):console.error(`Event of type '${e}' not recognized.`)}}a.__name__="AnyWidgetModelAdapter";class d extends a{constructor(e){super(e.model),this.view=e}get_child(e){const t=this.model.data[e];if(Array.isArray(t)){const e=[];for(const i of t){const t=this.view.get_child_view(i);t&&e.push(t.el)}return e}return this.view.get_child_view(t)?.el}}d.__name__="AnyWidgetAdapter";class h extends o.ReactiveESMView{initialize(){super.initialize(),this.adapter=new d(this)}remove(){super.remove(),this.destroyer&&this.destroyer.then((e=>e({model:this.adapter,el:this.container})))}after_rendered(){this.render_children(),this._rendered=!0}}i.AnyWidgetComponentView=h,h.__name__="AnyWidgetComponentView";class l extends o.ReactiveESM{constructor(e){super(e),this.sucrase_transforms=["typescript","jsx"]}_render_code(){return"\nfunction render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (!view) { return }\n\n const out = Promise.resolve(view.render_fn({\n view, model: view.adapter, data: view.model.data, el: view.container\n }) || null)\n view.destroyer = out\n out.then(() => view.after_rendered())\n}\n\nexport default {render}"}_run_initializer(e){e({model:new a(this)})}}i.AnyWidgetComponent=l,r=l,l.__name__="AnyWidgetComponent",l.__module__="panel.models.esm",r.prototype.default_view=h},
51
- "a5f4225d5f": function _(e,t,s,i,n){var r,l,o;i(),s.model_getter=M,s.model_setter=E;const a=e("tslib");var c,h=this&&this.__decorate||function(e,t,s,i){var n,r=arguments.length,l=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,s,l):n(t,s))||l);return r>3&&l&&Object.defineProperty(t,s,l),l};const d=e("48024289a4"),_=e("@bokehjs/core/bokeh_events"),u=e("@bokehjs/core/dom"),m=e("@bokehjs/core/dom"),p=e("@bokehjs/core/kinds"),f=e("@bokehjs/models/layouts/layout_dom"),y=e("@bokehjs/core/util/types"),v=e("a572dba9cd"),g=e("4c04683fdc"),w=e("dab42e6dad"),b=e("aa07eb54cc"),k=a.__importDefault(e("727a14f76b")),R=new Map;class z extends _.ModelEvent{constructor(e){super(),this.data=e}get event_values(){return{model:this.origin,data:this.data}}}s.DataEvent=z,r=z,z.__name__="DataEvent",r.prototype.event_name="data_event";let x=(l=class extends z{static from_values(e){const{model:t,data:s}=e,i=new c(s);return i.origin=t,i}},c=l,l.__name__="ESMEvent",l);function M(e,t){const s=e.model;return"get_child"===t?t=>{e.accessed_children.includes(t)||e.accessed_children.push(t);const i=s.data[t];if((0,y.isArray)(i)){const t=[];for(const s of i)t.push(e.get_child_view(s)?.el);return t}return null!=s?e.get_child_view(i)?.el:null}:"send_msg"===t?e=>{s.trigger_event(new z(e))}:"send_event"===t?(e,t)=>{const i=(0,b.convertUndefined)((0,v.serializeEvent)(t));s.trigger_event(new g.DOMEvent(e,i))}:"off"===t?(t,i)=>{const n=(0,y.isArray)(t)?t:[t];for(let t of n)if(t.startsWith("change:")&&(t=t.slice(7)),t in s.attributes||t.split(".")[0]in s.data.attributes)s.unwatch(e,t,i);else if("msg:custom"!==t)if(t.startsWith("lifecycle:")&&(t=t.slice(10)),e._lifecycle_handlers.has(t)){const s=e._lifecycle_handlers.get(t);s&&s.includes(i)&&e._lifecycle_handlers.set(t,s.filter((e=>e!==i)))}else console.warn(`Could not unregister callback for event type '${t}'`);else e.remove_on_event(i)}:"on"===t?(t,i,n=!1)=>{const r=(0,y.isArray)(t)?t:[t];for(let t of r)t.startsWith("change:")&&(t=t.slice(7)),t in s.attributes||t.split(".")[0]in s.data.attributes?s.watch(e,t,i,n):"msg:custom"!==t?(t.startsWith("lifecycle:")&&(t=t.slice(10)),e._lifecycle_handlers.has(t)?(e._lifecycle_handlers.get(t)||[]).push(i):console.warn(`Could not register callback for event type '${t}'`)):e.on_event(i)}:Reflect.has(s.data,t)?(t in s.data.attributes&&!e.accessed_properties.includes(t)&&e.accessed_properties.push(t),Reflect.get(s.data,t)):Reflect.has(s,t)?Reflect.get(s,t):void 0}function E(e,t,s){const i=e.model;return Reflect.has(i.data,t)?Reflect.set(i.data,t,s):!!Reflect.has(i,t)&&Reflect.set(i,t,s)}function S(e,t){return Reflect.has(e.data,t)?Reflect.get(e.data,t):Reflect.has(e,t)?Reflect.get(e,t):void 0}function P(e,t,s){return Reflect.has(e.data,t)?Reflect.set(e.data,t,s):!!Reflect.has(e,t)&&Reflect.set(e,t,s)}s.ESMEvent=x,s.ESMEvent=x=c=h([(0,_.server_event)("esm_event")],x);class j extends w.HTMLBoxView{constructor(){super(...arguments),this.accessed_properties=[],this.accessed_children=[],this.compiled_module=null,this._changing=!1,this._child_rendered=new Map,this._event_handlers=[],this._lifecycle_handlers=new Map([["update_layout",[]],["after_layout",[]],["after_render",[]],["resize",[]],["remove",[]],["mounted",[]]]),this._rendered=!1,this._stale_children=!1,this._mounted=new Map}initialize(){super.initialize(),this._module_cache=R,this._child_callbacks=new Map,this.model_proxy=new Proxy(this,{get:M,set:E})}async lazy_initialize(){await super.lazy_initialize(),this.compiled_module=await this.model.compiled_module}stylesheets(){const e=super.stylesheets();return e.push(k.default),this.model.css_bundle&&("url"===this.model.bundle?e.push(new m.ImportedStyleSheet(this.model.css_bundle)):e.push(this.model.css_bundle)),e}connect_signals(){super.connect_signals();const{esm:e,importmap:t,class_name:s}=this.model.properties;this.on_change([e,t],(async()=>{this.compiled_module=await this.model.compiled_module,this.invalidate_render()})),this.on_change(s,(()=>{this.container.className=this.model.class_name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}));const i=this.model.children.map((e=>this.model.data.properties[e]));for(const e of i)e.change.connect((()=>this.update_children()));this.on_change([],(()=>{"manual"!==this.model.render_policy&&this.render_esm()})),this.model.on_event(x,(e=>{for(const t of this._event_handlers)t(e.data)}))}disconnect_signals(){super.disconnect_signals(),this._child_callbacks=new Map,this.model.disconnect_watchers(this)}_on_mounted(){}notify_mount(e,t,s){this._mounted.has(e)||this._mounted.set(e,new Set),s?this._mounted.get(e)?.delete(t):this._mounted.get(e)?.add(t);let i=this.model.data[e];if((0,y.isArray)(i)||(i=[i]),i.every((t=>this._mounted.get(e)?.has(t.id)))){this._on_mounted();for(const t of this._lifecycle_handlers.get("mounted")||[])t(e)}}on_event(e){this._event_handlers.push(e)}remove_on_event(e){return!!this._event_handlers.includes(e)&&(this._event_handlers=this._event_handlers.filter((t=>t!==e)),!0)}get_child_view(e){return this._child_views.get(e)}get render_fn(){return null===this.compiled_module?null:this.compiled_module.default?this.compiled_module.default.render:this.compiled_module.render}get child_models(){const e=[];for(const t of this.model.children){const s=this.model.data[t];if((0,y.isArray)(s))for(const t of s)e.push(t);else null!=s&&e.push(s)}return e}render_error(e){const t=(0,u.div)({class:"error"});t.innerHTML=(0,b.formatError)(e,this.model.esm),this.container.appendChild(t)}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._update_css_variables(),this._apply_visible(),this._child_callbacks=new Map,this._child_rendered.clear(),this._rendered=!1,(0,w.set_size)(this.el,this.model),this.container=(0,u.div)(),this.container.className=this.model.class_name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),(0,w.set_size)(this.container,this.model,!1),this.shadow_el.append(this.container),this.model.compile_error?this.render_error(this.model.compile_error):this.render_esm();for(const e of this.element_views){const t=e.rendering_target()??this.self_target??this.shadow_el;e.render_to(t)}}get is_managed(){return this.parent instanceof f.LayoutDOMView&&!(this.parent instanceof j)}compute_layout(){this.is_managed?super.compute_layout():(this.measure_layout(),this.update_bbox(),this._compute_layout(),this.after_layout(),this._layout_computed=!0)}_update_bbox(){const e=(()=>{if(this.el.isConnected){if(null!=this.el.offsetParent)return!0;{const{position:e,display:t}=getComputedStyle(this.el);return"fixed"==e&&"none"!=t}}return!1})();return this._is_displayed=e,!0}after_rendered(){const e=this._lifecycle_handlers.get("after_render")||[];for(const t of e)t();if(this.render_children(),this.model_proxy.on(this.accessed_children,(()=>{this._stale_children=!0})),!this._rendered)for(const e of this._lifecycle_handlers.get("after_layout")||[])e();this._rendered=!0}render_esm(){if(null!==this.model.compiled&&null!==this.model.render_module){this.container.replaceChildren(),this.accessed_properties=[];for(const e of this._lifecycle_handlers.keys())(this._lifecycle_handlers.get(e)||[]).splice(0);this.model.disconnect_watchers(this),this.model.render_module.then((e=>e.default.render(this.model.id)))}}render_children(){for(const e of this.accessed_children){const t=this.model.data[e],s=(0,y.isArray)(t)?t:[t];for(const e of s){const t=this._child_views.get(e);if(!t)continue;t.el.parentNode&&!this._child_rendered.has(t)&&(this.rerender_(t),this._child_rendered.set(t,!0))}}this._stale_children=!1,this.after_render()}has_finished(){if(!super.has_finished())return!1;if(this.is_layout_root&&!this._layout_computed)return!1;for(const e of this.child_views)if(!e.has_finished()&&this._child_rendered.has(e))return!1;return!0}invalidate_layout(){this.is_managed?super.invalidate_layout():(this.update_layout(),this.compute_layout())}remove(){super.remove();for(const e of this._lifecycle_handlers.get("remove")||[])e();this._child_callbacks.clear(),this._child_rendered.clear(),this._mounted.clear()}after_resize(){if(this._rendered&&!this._changing){super.after_resize();for(const e of this._lifecycle_handlers.get("resize")||[])e()}}after_layout(){if(super.after_layout(),this._rendered&&!this._changing)for(const e of this._lifecycle_handlers.get("after_layout")||[])e()}_lookup_child(e){for(const t of this.model.children){let s=this.model.data[t];s=(0,y.isArray)(s)?s:[s];for(const i of s)if(i===e.model)return t}return null}async update_children(){const e=new Set(await this.build_child_views()),t=this.child_views;if("manual"!==this.model.render_policy)for(const e of t)e.el.remove();const s=new Map;for(const t of this.child_views){if(!e.has(t))continue;const i=this._lookup_child(t);i&&(s.has(i)?s.get(i).push(t):s.set(i,[t]))}for(const e of this._child_rendered.keys())t.includes(e)||this._child_rendered.delete(e);for(const e of this.model.children){const t=this._child_callbacks.get(e)||[],i=s.get(e)||[];for(const e of t)e(i)}this._stale_children&&"manual"!==this.model.render_policy&&(this.render_esm(),this._update_children(),this.invalidate_layout()),this._stale_children=!1}on_child_render(e,t){this._child_callbacks.has(e)||this._child_callbacks.set(e,[]);(this._child_callbacks.get(e)||[]).push(t)}remove_on_child_render(e,t){if(this._child_callbacks.has(e))if(void 0===t)this._child_callbacks.delete(e);else{let s=this._child_callbacks.get(e)||[];s=s.filter((e=>e!==t)),this._child_callbacks.set(e,s)}}}s.ReactiveESMView=j,j.__name__="ReactiveESMView",s.RenderPolicy=(0,p.Enum)("manual","children");class A extends w.HTMLBox{constructor(e){super(e),this.compiled=null,this.compiled_module=null,this.compile_error=null,this.render_module=null,this.sucrase_transforms=["typescript"],this._destroyer=null,this._esm_watchers={},this._event_callbacks=new Map}initialize(){super.initialize(),this.model_proxy=new Proxy(this,{get:S,set:P}),this.recompile()}connect_signals(){super.connect_signals(),this.connect(this.properties.esm.change,(()=>this.recompile())),this.connect(this.properties.importmap.change,(()=>this.recompile()))}watch(e,t,s,i=!1){const n=t.split(".");let r=this.data,l=null;for(let e=0;e<n.length-1;e++){if(!(r&&r.properties&&n[e]in r.properties)){r=null;break}r=r[n[e]]}if(r&&r.properties&&n[n.length-1]in r.properties&&(l=n[n.length-1]),!i&&r===this.data&&l&&this.events.includes(l)){const e=s;s=()=>{l&&this.data[l]&&(e(),this.data.setv({[l]:!1}))},this._event_callbacks.set(e,s)}if(l&&r){if(this.children.includes(l)){const t=s;s=async()=>{e&&(e._stale_children=!0),e&&e._stale_children&&await new Promise((t=>{const s=()=>{e._stale_children?setTimeout(s,10):t(void 0)};s()})),t(),e&&"manual"===this.render_policy&&(e.render_children(),e._update_children(),e.invalidate_layout())}}r.property(l).change.connect(s)}else t in this.properties&&this.property(t).change.connect(s);t in this._esm_watchers?this._esm_watchers[t].push([e,s]):this._esm_watchers[t]=[[e,s]]}unwatch(e,t,s){if(!(t in this._esm_watchers))return!1;const i=[];for(const[n,r]of this._esm_watchers[t])n===e&&r===s||i.push([n,r]);i.length>0?this._esm_watchers[t]=i:delete this._esm_watchers[t];const n=t.split(".");let r=this.data,l=null;for(let e=0;e<n.length-1;e++){if(!(r&&r.properties&&n[e]in r.properties)){r=null;break}r=r[n[e]]}return r&&r.properties&&n[n.length-1]in r.properties&&(l=n[n.length-1]),this._event_callbacks.has(s)&&(s=this._event_callbacks.get(s),this._event_callbacks.delete(s)),l&&r?r.property(l).change.disconnect(s):t in this.properties&&this.property(t).change.disconnect(s)}disconnect_watchers(e){for(const t in this._esm_watchers){const s=this.data.properties[t],i=[];for(const[n,r]of this._esm_watchers[t])n===e?s?.change.disconnect(r):i.push([n,r]);i.length>0?this._esm_watchers[t]=i:delete this._esm_watchers[t]}}_declare_importmap(){if(this.importmap){const e={...this.importmap};try{importShim.addImportMap(e)}catch(e){console.warn(`Failed to add import map: ${e}`)}}}_run_initializer(e){const t={model:this.model_proxy};this._destroyer=e(t)}destroy(){super.destroy(),this._destroyer&&this._destroyer(this.model_proxy)}init_module(){if(!this.compile_error)if(R.has(this._render_cache_key))this.render_module=R.get(this._render_cache_key);else{const e=this._render_code(),t=URL.createObjectURL(new Blob([e],{type:"text/javascript"}));this.render_module=importShim(t),R.set(this._render_cache_key,this.render_module)}}_render_code(){return"\nfunction render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (view == null) {\n return null\n }\n\n const output = view.render_fn({\n view: view, model: view.model_proxy, data: view.model.data, el: view.container\n })\n\n Promise.resolve(output).then((out) => {\n if (out instanceof Element) {\n view.container.replaceChildren(out)\n }\n view.after_rendered()\n })\n}\n\nexport default {render}"}get _render_cache_key(){return"reactive_esm"}compile(){if(null!=this.bundle)return this.esm;let e;try{e=(0,d.transform)(this.esm,{transforms:this.sucrase_transforms,filePath:"render.tsx"}).code}catch(e){if(e instanceof SyntaxError){if(this.dev)return this.compile_error=e,null;throw e.message=`${e.message}. See more information with '--dev' flag.`,e}throw e}return e}async recompile(){this.compile_error=null;const e=this.compile();if(null===e)return void(this.compiled_module=Promise.resolve(null));let t;this.compiled=e,this._declare_importmap();const s=!this.dev||this.bundle,i="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;let n;if(s&&R.has(i))t=Promise.resolve(R.get(i));else{let e;s&&R.set(i,new Promise((e=>{n=e}))),e="url"===this.bundle?this.esm:URL.createObjectURL(new Blob([this.compiled],{type:"text/javascript"})),t=window.importShim(e)}this.compiled_module=t.then((e=>{n&&n(e);try{let t;if(null!=this.bundle&&(e.default||{}).hasOwnProperty(this.class_name)&&(e=e.default[this.class_name]),e.initialize)t=e.initialize;else if(e.default&&e.default.initialize)t=e.default.initialize;else if("function"==typeof e.default){const s=e.default();e={default:s},t=s.initialize}return t&&this._run_initializer(t),this.init_module(),e}catch(e){return this.dev&&(this.compile_error=e),console.error(`Could not initialize module due to error: ${e}`),null}}))}}s.ReactiveESM=A,o=A,A.__name__="ReactiveESM",A.__module__="panel.models.esm",o.prototype.default_view=j,o.define((({Any:e,Array:t,Bool:i,Nullable:n,Str:r})=>({_defs:[t(e),[]],css_bundle:[n(r),null],bundle:[n(r),null],children:[t(r),[]],class_name:[r,""],data:[e],dev:[i,!1],esm:[r,""],events:[t(r),[]],importmap:[e,{}],render_policy:[s.RenderPolicy,"children"]})))},
50
+ "1f663ffe94": function _(e,t,i,n,s){var r;n();const o=e("5cb5357866");class a{constructor(e){this.view=null,this.model=e,this.model_changes={},this.data_changes={}}get(e){let t;const i=e.split(".");let n=this.model.data;for(let e=0;e<i.length-1;e++){if(!(n&&n.attributes&&i[e]in n.attributes)){n=null;break}n=n.attributes[i[e]]}return t=n&&n.attributes&&i[i.length-1]in n.attributes?n.attributes[i[i.length-1]]:this.model.attributes[e],t instanceof ArrayBuffer&&(t=new DataView(t)),t}set(e,t){e.split(".")[0]in this.model.data.attributes?this.data_changes={...this.data_changes,[e]:t}:e in this.model.attributes&&(this.model_changes={...this.model_changes,[e]:t})}save_changes(){this.model.setv(this.model_changes),this.model_changes={};for(const e in this.data_changes){const t=e.split(".");let i=this.model.data;for(let n=0;n<t.length-1;n++){if(!(i&&i.attributes&&t[n]in i.attributes)){console.warn(`Skipping '${e}': '${t[n]}' does not exist.`),i=null;break}i=i.attributes[t[n]]}i&&i.attributes&&t[t.length-1]in i.attributes?i.setv({[t[t.length-1]]:this.data_changes[e]}):console.warn(`Skipping '${e}': Final property '${t[t.length-1]}' not found.`)}this.data_changes={}}on(e,t){e.startsWith("change:")?this.model.watch(this.view,e.slice(7),t):"msg:custom"===e&&this.view?this.view.on_event(t):console.error(`Event of type '${e}' not recognized.`)}off(e,t){e.startsWith("change:")?this.model.unwatch(this.view,e.slice(7),t):"msg:custom"===e&&this.view?this.view.remove_on_event(t):console.error(`Event of type '${e}' not recognized.`)}}a.__name__="AnyWidgetModelAdapter";class d extends a{constructor(e){super(e.model),this.view=e}get_child(e){const t=this.model.data[e];if(Array.isArray(t)){const e=[];for(const i of t){const t=this.view.get_child_view(i);t&&e.push(t.el)}return e}return this.view.get_child_view(t)?.el}}d.__name__="AnyWidgetAdapter";class h extends o.ReactiveESMView{initialize(){super.initialize(),this.adapter=new d(this)}remove(){super.remove(),this.destroyer&&this.destroyer.then((e=>e({model:this.adapter,el:this.container})))}after_rendered(){this.render_children(),this._rendered=!0}}i.AnyWidgetComponentView=h,h.__name__="AnyWidgetComponentView";class l extends o.ReactiveESM{constructor(e){super(e),this.sucrase_transforms=["typescript","jsx"]}_render_code(){return"\nfunction render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (!view) { return }\n\n const out = Promise.resolve(view.render_fn({\n view, model: view.adapter, data: view.model.data, el: view.container\n }) || null)\n view.destroyer = out\n out.then(() => view.after_rendered())\n}\n\nexport default {render}"}_run_initializer(e){e({model:new a(this)})}}i.AnyWidgetComponent=l,r=l,l.__name__="AnyWidgetComponent",l.__module__="panel.models.esm",r.prototype.default_view=h},
51
+ "5cb5357866": function _(e,t,s,i,n){var r,l,o;i(),s.model_getter=M,s.model_setter=E;const a=e("tslib");var c,h=this&&this.__decorate||function(e,t,s,i){var n,r=arguments.length,l=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,s,l):n(t,s))||l);return r>3&&l&&Object.defineProperty(t,s,l),l};const d=e("48024289a4"),_=e("@bokehjs/core/bokeh_events"),u=e("@bokehjs/core/dom"),m=e("@bokehjs/core/dom"),p=e("@bokehjs/core/kinds"),f=e("@bokehjs/models/layouts/layout_dom"),y=e("@bokehjs/core/util/types"),v=e("a572dba9cd"),g=e("4c04683fdc"),w=e("dab42e6dad"),b=e("aa07eb54cc"),k=a.__importDefault(e("727a14f76b")),R=new Map;class z extends _.ModelEvent{constructor(e){super(),this.data=e}get event_values(){return{model:this.origin,data:this.data}}}s.DataEvent=z,r=z,z.__name__="DataEvent",r.prototype.event_name="data_event";let x=(l=class extends z{static from_values(e){const{model:t,data:s}=e,i=new c(s);return i.origin=t,i}},c=l,l.__name__="ESMEvent",l);function M(e,t){const s=e.model;return"get_child"===t?t=>{e.accessed_children.includes(t)||e.accessed_children.push(t);const i=s.data[t];if((0,y.isArray)(i)){const t=[];for(const s of i)t.push(e.get_child_view(s)?.el);return t}return null!=s?e.get_child_view(i)?.el:null}:"send_msg"===t?e=>{s.trigger_event(new z(e))}:"send_event"===t?(e,t)=>{const i=(0,b.convertUndefined)((0,v.serializeEvent)(t));s.trigger_event(new g.DOMEvent(e,i))}:"off"===t?(t,i)=>{const n=(0,y.isArray)(t)?t:[t];for(let t of n)if(t.startsWith("change:")&&(t=t.slice(7)),t in s.attributes||t.split(".")[0]in s.data.attributes)s.unwatch(e,t,i);else if("msg:custom"!==t)if(t.startsWith("lifecycle:")&&(t=t.slice(10)),e._lifecycle_handlers.has(t)){const s=e._lifecycle_handlers.get(t);s&&s.includes(i)&&e._lifecycle_handlers.set(t,s.filter((e=>e!==i)))}else console.warn(`Could not unregister callback for event type '${t}'`);else e.remove_on_event(i)}:"on"===t?(t,i,n=!1)=>{const r=(0,y.isArray)(t)?t:[t];for(let t of r)t.startsWith("change:")&&(t=t.slice(7)),t in s.attributes||t.split(".")[0]in s.data.attributes?s.watch(e,t,i,n):"msg:custom"!==t?(t.startsWith("lifecycle:")&&(t=t.slice(10)),e._lifecycle_handlers.has(t)?(e._lifecycle_handlers.get(t)||[]).push(i):console.warn(`Could not register callback for event type '${t}'`)):e.on_event(i)}:Reflect.has(s.data,t)?(t in s.data.attributes&&!e.accessed_properties.includes(t)&&e.accessed_properties.push(t),Reflect.get(s.data,t)):Reflect.has(s,t)?Reflect.get(s,t):void 0}function E(e,t,s){const i=e.model;return Reflect.has(i.data,t)?Reflect.set(i.data,t,s):!!Reflect.has(i,t)&&Reflect.set(i,t,s)}function S(e,t){return Reflect.has(e.data,t)?Reflect.get(e.data,t):Reflect.has(e,t)?Reflect.get(e,t):void 0}function P(e,t,s){return Reflect.has(e.data,t)?Reflect.set(e.data,t,s):!!Reflect.has(e,t)&&Reflect.set(e,t,s)}s.ESMEvent=x,s.ESMEvent=x=c=h([(0,_.server_event)("esm_event")],x);class j extends w.HTMLBoxView{constructor(){super(...arguments),this.accessed_properties=[],this.accessed_children=[],this.compiled_module=null,this._child_rendered=new Map,this._event_handlers=[],this._lifecycle_handlers=new Map([["update_layout",[]],["after_layout",[]],["after_render",[]],["resize",[]],["remove",[]],["mounted",[]]]),this._rendered=!1,this._stale_children=!1,this._mounted=new Map}initialize(){super.initialize(),this._module_cache=R,this._child_callbacks=new Map,this.model_proxy=new Proxy(this,{get:M,set:E})}async lazy_initialize(){await super.lazy_initialize(),this.compiled_module=await this.model.compiled_module}stylesheets(){const e=super.stylesheets();return e.push(k.default),this.model.css_bundle&&("url"===this.model.bundle?e.push(new m.ImportedStyleSheet(this.model.css_bundle)):e.push(this.model.css_bundle)),e}connect_signals(){super.connect_signals();const{esm:e,importmap:t,class_name:s}=this.model.properties;this.on_change([e,t],(async()=>{this.compiled_module=await this.model.compiled_module,this.invalidate_render()})),this.on_change(s,(()=>{this.container.className=this.model.class_name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}));const i=this.model.children.map((e=>this.model.data.properties[e]));for(const e of i)this.connect(e.change,(()=>this.update_children()));this.on_change([],(()=>{"manual"!==this.model.render_policy&&this.render_esm()})),this.model.on_event(x,(e=>{for(const t of this._event_handlers)t(e.data)}))}disconnect_signals(){super.disconnect_signals(),this._child_callbacks=new Map,this.model.disconnect_watchers(this)}_on_mounted(){}notify_mount(e,t,s){this._mounted.has(e)||this._mounted.set(e,new Set),s?this._mounted.get(e)?.delete(t):this._mounted.get(e)?.add(t);let i=this.model.data[e];if((0,y.isArray)(i)||(i=[i]),i.every((t=>this._mounted.get(e)?.has(t.id)))){this._on_mounted();for(const t of this._lifecycle_handlers.get("mounted")||[])t(e)}}on_event(e){this._event_handlers.push(e)}remove_on_event(e){return!!this._event_handlers.includes(e)&&(this._event_handlers=this._event_handlers.filter((t=>t!==e)),!0)}get_child_view(e){return this._child_views.get(e)}get render_fn(){return null===this.compiled_module?null:this.compiled_module.default?this.compiled_module.default.render:this.compiled_module.render}get child_models(){const e=[];for(const t of this.model.children){const s=this.model.data[t];if((0,y.isArray)(s))for(const t of s)e.push(t);else null!=s&&e.push(s)}return e}render_error(e){const t=(0,u.div)({class:"error"});t.innerHTML=(0,b.formatError)(e,this.model.esm),this.container.appendChild(t)}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._update_css_variables(),this._apply_visible(),this._child_callbacks=new Map,this._child_rendered.clear(),this._rendered=!1,(0,w.set_size)(this.el,this.model),this.container=(0,u.div)(),this.container.className=this.model.class_name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),(0,w.set_size)(this.container,this.model,!1),this.shadow_el.append(this.container),this.model.compile_error?this.render_error(this.model.compile_error):this.render_esm();for(const e of this.element_views){const t=e.rendering_target()??this.self_target??this.shadow_el;e.render_to(t)}}get is_managed(){return this.parent instanceof f.LayoutDOMView&&!(this.parent instanceof j)}compute_layout(){this.is_managed?super.compute_layout():(this.measure_layout(),this.update_bbox(),this._compute_layout(),this.after_layout(),this._layout_computed=!0)}_update_bbox(){const e=(()=>{if(this.el.isConnected){if(null!=this.el.offsetParent)return!0;{const{position:e,display:t}=getComputedStyle(this.el);return"fixed"==e&&"none"!=t}}return!1})();return this._is_displayed=e,!0}after_rendered(){const e=this._lifecycle_handlers.get("after_render")||[];for(const t of e)t();if(this.render_children(),this.model_proxy.on(this.accessed_children,(()=>{this._stale_children=!0})),!this._rendered)for(const e of this._lifecycle_handlers.get("after_layout")||[])e();this._rendered=!0}render_esm(){if(null===this.model.compiled||null===this.model.render_module)return;this.container.replaceChildren(),this.accessed_properties=[];for(const e of this._lifecycle_handlers.keys())(this._lifecycle_handlers.get(e)||[]).splice(0);this.model.disconnect_watchers(this);const e=this.model.render_module.then((e=>e.default.render(this.model.id)));this._await_ready(e)}render_children(){for(const e of this.accessed_children){const t=this.model.data[e],s=(0,y.isArray)(t)?t:[t];for(const e of s){const t=this._child_views.get(e);if(!t)continue;t.el.parentNode&&!this._child_rendered.has(t)&&(this.rerender_(t),this._child_rendered.set(t,!0))}}this._stale_children=!1,this.after_render()}has_finished(){if(!super.has_finished())return!1;if(this.is_layout_root&&!this._layout_computed)return!1;for(const e of this.child_views)if(!e.has_finished()&&this._child_rendered.has(e))return!1;return!0}invalidate_layout(){this.is_managed?super.invalidate_layout():(this.update_layout(),this.compute_layout())}remove(){super.remove();for(const e of this._lifecycle_handlers.get("remove")||[])e();this._child_callbacks.clear(),this._child_rendered.clear(),this._mounted.clear()}after_resize(){if(this._rendered){super.after_resize();for(const e of this._lifecycle_handlers.get("resize")||[])e()}}after_layout(){if(super.after_layout(),this._rendered)for(const e of this._lifecycle_handlers.get("after_layout")||[])e()}_lookup_child(e){for(const t of this.model.children){let s=this.model.data[t];s=(0,y.isArray)(s)?s:[s];for(const i of s)if(i===e.model)return t}return null}async update_children(){const e=new Set(await this.build_child_views()),t=this.child_views;if("manual"!==this.model.render_policy)for(const e of t)e.el.remove();const s=new Map;for(const t of this.child_views){if(!e.has(t))continue;const i=this._lookup_child(t);i&&(s.has(i)?s.get(i).push(t):s.set(i,[t]))}for(const e of this._child_rendered.keys())t.includes(e)||this._child_rendered.delete(e);for(const e of this.model.children){const t=this._child_callbacks.get(e)||[],i=s.get(e)||[];for(const e of t)e(i)}this._stale_children&&"manual"!==this.model.render_policy&&(this.render_esm(),this._update_children(),this.invalidate_layout()),this._stale_children=!1}on_child_render(e,t){this._child_callbacks.has(e)||this._child_callbacks.set(e,[]);(this._child_callbacks.get(e)||[]).push(t)}remove_on_child_render(e,t){if(this._child_callbacks.has(e))if(void 0===t)this._child_callbacks.delete(e);else{let s=this._child_callbacks.get(e)||[];s=s.filter((e=>e!==t)),this._child_callbacks.set(e,s)}}}s.ReactiveESMView=j,j.__name__="ReactiveESMView",s.RenderPolicy=(0,p.Enum)("manual","children");class A extends w.HTMLBox{constructor(e){super(e),this.compiled=null,this.compiled_module=null,this.compile_error=null,this.render_module=null,this.sucrase_transforms=["typescript"],this._destroyer=null,this._esm_watchers={},this._event_callbacks=new Map}initialize(){super.initialize(),this.model_proxy=new Proxy(this,{get:S,set:P}),this.recompile()}connect_signals(){super.connect_signals(),this.connect(this.properties.esm.change,(()=>this.recompile())),this.connect(this.properties.importmap.change,(()=>this.recompile()))}watch(e,t,s,i=!1){const n=t.split(".");let r=this.data,l=null;for(let e=0;e<n.length-1;e++){if(!(r&&r.properties&&n[e]in r.properties)){r=null;break}r=r[n[e]]}if(r&&r.properties&&n[n.length-1]in r.properties&&(l=n[n.length-1]),!i&&r===this.data&&l&&this.events.includes(l)){const e=s;s=()=>{l&&this.data[l]&&(e(),this.data.setv({[l]:!1}))},this._event_callbacks.set(e,s)}if(l&&r){if(this.children.includes(l)){const t=s;s=async()=>{if(e&&(e._stale_children=!0),e&&e._stale_children&&await new Promise((t=>{const s=()=>{e._stale_children?setTimeout(s,10):t(void 0)};s()})),e&&"manual"===this.render_policy){let s;e.root._await_ready(new Promise((e=>{s=e}))),t(),e.render_children(),e._update_children(),e.invalidate_layout();const i=e=>{const t=[e.ready];for(const s of e.child_views||[])t.push(...i(s));return t},n=[];for(const t of e.child_views)n.push(...i(t));n.length>0?Promise.all(n).then((()=>s())):s()}else t()}}r.property(l).change.connect(s)}else t in this.properties&&this.property(t).change.connect(s);t in this._esm_watchers?this._esm_watchers[t].push([e,s]):this._esm_watchers[t]=[[e,s]]}unwatch(e,t,s){if(!(t in this._esm_watchers))return!1;const i=[];for(const[n,r]of this._esm_watchers[t])n===e&&r===s||i.push([n,r]);i.length>0?this._esm_watchers[t]=i:delete this._esm_watchers[t];const n=t.split(".");let r=this.data,l=null;for(let e=0;e<n.length-1;e++){if(!(r&&r.properties&&n[e]in r.properties)){r=null;break}r=r[n[e]]}return r&&r.properties&&n[n.length-1]in r.properties&&(l=n[n.length-1]),this._event_callbacks.has(s)&&(s=this._event_callbacks.get(s),this._event_callbacks.delete(s)),l&&r?r.property(l).change.disconnect(s):t in this.properties&&this.property(t).change.disconnect(s)}disconnect_watchers(e){for(const t in this._esm_watchers){const s=this.data.properties[t],i=[];for(const[n,r]of this._esm_watchers[t])n===e?s?.change.disconnect(r):i.push([n,r]);i.length>0?this._esm_watchers[t]=i:delete this._esm_watchers[t]}}_declare_importmap(){if(this.importmap){const e={...this.importmap};try{importShim.addImportMap(e)}catch(e){console.warn(`Failed to add import map: ${e}`)}}}_run_initializer(e){const t={model:this.model_proxy};this._destroyer=e(t)}destroy(){super.destroy(),this._destroyer&&this._destroyer(this.model_proxy)}init_module(){if(!this.compile_error)if(R.has(this._render_cache_key))this.render_module=R.get(this._render_cache_key);else{const e=this._render_code(),t=URL.createObjectURL(new Blob([e],{type:"text/javascript"}));this.render_module=importShim(t),R.set(this._render_cache_key,this.render_module)}}_render_code(){return"\nfunction render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (view == null) {\n return null\n }\n\n const output = view.render_fn({\n view: view, model: view.model_proxy, data: view.model.data, el: view.container\n })\n\n Promise.resolve(output).then((out) => {\n if (out instanceof Element) {\n view.container.replaceChildren(out)\n }\n view.after_rendered()\n })\n}\n\nexport default {render}"}get _render_cache_key(){return"reactive_esm"}compile(){if(null!=this.bundle)return this.esm;let e;try{e=(0,d.transform)(this.esm,{transforms:this.sucrase_transforms,filePath:"render.tsx"}).code}catch(e){if(e instanceof SyntaxError){if(this.dev)return this.compile_error=e,null;throw e.message=`${e.message}. See more information with '--dev' flag.`,e}throw e}return e}async recompile(){this.compile_error=null;const e=this.compile();if(null===e)return void(this.compiled_module=Promise.resolve(null));let t;this.compiled=e,this._declare_importmap();const s=!this.dev||this.bundle,i="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;let n;if(s&&R.has(i))t=Promise.resolve(R.get(i));else{let e;s&&R.set(i,new Promise((e=>{n=e}))),e="url"===this.bundle?this.esm:URL.createObjectURL(new Blob([this.compiled],{type:"text/javascript"})),t=window.importShim(e)}this.compiled_module=t.then((e=>{n&&n(e);try{let t;if(null!=this.bundle&&(e.default||{}).hasOwnProperty(this.class_name)&&(e=e.default[this.class_name]),e.initialize)t=e.initialize;else if(e.default&&e.default.initialize)t=e.default.initialize;else if("function"==typeof e.default){const s=e.default();e={default:s},t=s.initialize}return t&&this._run_initializer(t),this.init_module(),e}catch(e){return this.dev&&(this.compile_error=e),console.error(`Could not initialize module due to error: ${e}`),null}}))}}s.ReactiveESM=A,o=A,A.__name__="ReactiveESM",A.__module__="panel.models.esm",o.prototype.default_view=j,o.define((({Any:e,Array:t,Bool:i,Nullable:n,Str:r})=>({_defs:[t(e),[]],css_bundle:[n(r),null],bundle:[n(r),null],children:[t(r),[]],class_name:[r,""],data:[e],dev:[i,!1],esm:[r,""],events:[t(r),[]],importmap:[e,{}],render_policy:[s.RenderPolicy,"children"]})))},
52
52
  "48024289a4": function _(e,t,r,s,o){s(),r.getVersion=function(){return"3.35.0"},r.transform=function(e,t){(0,i.validateOptions)(t);try{const r=b(e,t),s=new m.default(r,t.transforms,Boolean(t.enableLegacyBabel5ModuleInterop),t).transform();let o={code:s.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");o={...o,sourceMap:(0,f.default)(s,t.filePath,t.sourceMapOptions,e,r.tokenProcessor.tokens)}}return o}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}},r.getFormattedTokens=function(e,t){const r=b(e,t).tokenProcessor.tokens;return(0,_.default)(e,r)};const n=e("tslib"),a=n.__importDefault(e("add4298d4c")),f=n.__importDefault(e("03a5a23920")),l=e("40e1a4d3af"),c=n.__importDefault(e("5f4ada3fc1")),p=n.__importDefault(e("425f39b83e")),i=e("bb0c9c6022"),u=e("7a45c9fdec"),d=n.__importDefault(e("1c7cc5e988")),m=n.__importDefault(e("131f5202c7")),_=n.__importDefault(e("2e6a9a5b28")),g=n.__importDefault(e("4160f5108d"));function b(e,t){const r=t.transforms.includes("jsx"),s=t.transforms.includes("typescript"),o=t.transforms.includes("flow"),n=!0===t.disableESTransforms,f=(0,u.parse)(e,r,s,o),i=f.tokens,m=f.scopes,_=new p.default(e,i),b=new l.HelperManager(_),k=new d.default(e,i,o,n,b),h=Boolean(t.enableLegacyTypeScriptModuleInterop);let w=null;return t.transforms.includes("imports")?(w=new a.default(_,k,h,t,t.transforms.includes("typescript"),Boolean(t.keepUnusedImports),b),w.preprocessTokens(),(0,c.default)(k,m,w.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&w.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&(0,c.default)(k,m,(0,g.default)(k)),{tokenProcessor:k,scopes:m,nameManager:_,importProcessor:w,helperManager:b}}},
53
53
  "add4298d4c": function _(e,t,n,s,o){s();const r=e("tslib"),i=e("bfb18d0576"),a=e("99ff836c64"),p=e("f0c35cbd76"),h=r.__importDefault(e("14d4ae78a4")),m=e("1ff9c9004b");class d{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(e,t,n,s,o,r,i){this.nameManager=e,this.tokens=t,this.enableLegacyTypeScriptModuleInterop=n,this.options=s,this.isTypeScriptTransformEnabled=o,this.keepUnusedImports=r,this.helperManager=i,d.prototype.__init.call(this),d.prototype.__init2.call(this),d.prototype.__init3.call(this),d.prototype.__init4.call(this),d.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,p.TokenType._import)&&!this.tokens.matches3AtIndex(e,p.TokenType._import,p.TokenType.name,p.TokenType.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,p.TokenType._export)&&!this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=(0,m.getNonTypeIdentifiers)(this.tokens,this.options);for(const[e,t]of this.importInfoByPath.entries()){if(t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0)continue;[...t.defaultNames,...t.wildcardNames,...t.namedImports.map((({localName:e})=>e))].every((e=>this.shouldAutomaticallyElideImportedName(e)))&&this.importsToReplace.set(e,"")}}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,t]of this.importInfoByPath.entries()){const{defaultNames:n,wildcardNames:s,namedImports:o,namedExports:r,exportStarNames:i,hasStarExport:a}=t;if(0===n.length&&0===s.length&&0===o.length&&0===r.length&&0===i.length&&!a){this.importsToReplace.set(e,`require('${e}');`);continue}const p=this.getFreeIdentifierForPath(e);let h;h=this.enableLegacyTypeScriptModuleInterop?p:s.length>0?s[0]:this.getFreeIdentifierForPath(e);let m=`var ${p} = require('${e}');`;if(s.length>0)for(const e of s){m+=` var ${e} = ${this.enableLegacyTypeScriptModuleInterop?p:`${this.helperManager.getHelperName("interopRequireWildcard")}(${p})`};`}else i.length>0&&h!==p?m+=` var ${h} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${p});`:n.length>0&&h!==p&&(m+=` var ${h} = ${this.helperManager.getHelperName("interopRequireDefault")}(${p});`);for(const{importedName:e,localName:t}of r)m+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${p}, '${t}', '${e}');`;for(const e of i)m+=` exports.${e} = ${h};`;a&&(m+=` ${this.helperManager.getHelperName("createStarExport")}(${p});`),this.importsToReplace.set(e,m);for(const e of n)this.identifierReplacements.set(e,`${h}.default`);for(const{importedName:e,localName:t}of o)this.identifierReplacements.set(t,`${p}.${e}`)}}getFreeIdentifierForPath(e){const t=e.split("/"),n=t[t.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){const t=[],n=[],s=[];if(e++,(this.tokens.matchesContextualAtIndex(e,a.ContextualKeyword._type)||this.tokens.matches1AtIndex(e,p.TokenType._typeof))&&!this.tokens.matches1AtIndex(e+1,p.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(e+1,a.ContextualKeyword._from))return;if(this.tokens.matches1AtIndex(e,p.TokenType.parenL))return;if(this.tokens.matches1AtIndex(e,p.TokenType.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,p.TokenType.comma)&&e++),this.tokens.matches1AtIndex(e,p.TokenType.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,p.TokenType.braceL)){const n=this.getNamedImports(e+1);e=n.newIndex;for(const e of n.namedImports)"default"===e.importedName?t.push(e.localName):s.push(e)}if(this.tokens.matchesContextualAtIndex(e,a.ContextualKeyword._from)&&e++,!this.tokens.matches1AtIndex(e,p.TokenType.string))throw new Error("Expected string token at the end of import statement.");const o=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(o);r.defaultNames.push(...t),r.wildcardNames.push(...n),r.namedImports.push(...s),0===t.length&&0===n.length&&0===s.length&&(r.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._var)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._let)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._function)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._class)){const t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,p.TokenType._export,p.TokenType.name,p.TokenType._function)){const t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,p.TokenType.braceL)||this.tokens.matches1AtIndex(n,p.TokenType.dollarBraceL)||this.tokens.matches1AtIndex(n,p.TokenType.bracketL))t++;else if(this.tokens.matches1AtIndex(n,p.TokenType.braceR)||this.tokens.matches1AtIndex(n,p.TokenType.bracketR))t--;else{if(0===t&&!this.tokens.matches1AtIndex(n,p.TokenType.name))break;if(this.tokens.matches1AtIndex(1,p.TokenType.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");n=e-1}else{const e=this.tokens.tokens[n];if((0,i.isDeclaration)(e)){const e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,!this.tokens.matchesContextualAtIndex(e,a.ContextualKeyword._from)){for(const{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(e++,!this.tokens.matches1AtIndex(e,p.TokenType.string))throw new Error("Expected string token at the end of import statement.");const s=this.tokens.stringValueAtIndex(e);this.getImportInfo(s).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,p.TokenType._export,p.TokenType.star,p.TokenType._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,p.TokenType.string))throw new Error("Expected string token at the end of star export statement.");const n=this.tokens.stringValueAtIndex(e),s=this.getImportInfo(n);null!==t?s.exportStarNames.push(t):s.hasStarExport=!0}getNamedImports(e){const t=[];for(;;){if(this.tokens.matches1AtIndex(e,p.TokenType.braceR)){e++;break}const n=(0,h.default)(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,p.TokenType.comma,p.TokenType.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,p.TokenType.braceR)){e++;break}if(!this.tokens.matches1AtIndex(e,p.TokenType.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`);e++}return{newIndex:e,namedImports:t}}getImportInfo(e){const t=this.importInfoByPath.get(e);if(t)return t;const n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){const t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const t=this.exportBindingsByLocalName.get(e);return t&&0!==t.length?t.map((e=>`exports.${e}`)).join(" = "):null}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}n.default=d},
54
54
  "bfb18d0576": function _(e,t,o,a,s){a(),o.isDeclaration=function(e){const t=e.identifierRole;return t===o.IdentifierRole.TopLevelDeclaration||t===o.IdentifierRole.FunctionScopedDeclaration||t===o.IdentifierRole.BlockScopedDeclaration||t===o.IdentifierRole.ObjectShorthandTopLevelDeclaration||t===o.IdentifierRole.ObjectShorthandFunctionScopedDeclaration||t===o.IdentifierRole.ObjectShorthandBlockScopedDeclaration},o.isNonTopLevelDeclaration=function(e){const t=e.identifierRole;return t===o.IdentifierRole.FunctionScopedDeclaration||t===o.IdentifierRole.BlockScopedDeclaration||t===o.IdentifierRole.ObjectShorthandFunctionScopedDeclaration||t===o.IdentifierRole.ObjectShorthandBlockScopedDeclaration},o.isTopLevelDeclaration=function(e){const t=e.identifierRole;return t===o.IdentifierRole.TopLevelDeclaration||t===o.IdentifierRole.ObjectShorthandTopLevelDeclaration||t===o.IdentifierRole.ImportDeclaration},o.isBlockScopedDeclaration=function(e){const t=e.identifierRole;return t===o.IdentifierRole.TopLevelDeclaration||t===o.IdentifierRole.BlockScopedDeclaration||t===o.IdentifierRole.ObjectShorthandTopLevelDeclaration||t===o.IdentifierRole.ObjectShorthandBlockScopedDeclaration},o.isFunctionScopedDeclaration=function(e){const t=e.identifierRole;return t===o.IdentifierRole.FunctionScopedDeclaration||t===o.IdentifierRole.ObjectShorthandFunctionScopedDeclaration},o.isObjectShorthandDeclaration=function(e){return e.identifierRole===o.IdentifierRole.ObjectShorthandTopLevelDeclaration||e.identifierRole===o.IdentifierRole.ObjectShorthandBlockScopedDeclaration||e.identifierRole===o.IdentifierRole.ObjectShorthandFunctionScopedDeclaration},o.next=C,o.nextTemplateToken=function(){r.state.tokens.push(new T),r.state.start=r.state.pos,function(){for(;;){if(r.state.pos>=r.input.length)return void(0,c.unexpected)("Unterminated template");const e=r.input.charCodeAt(r.state.pos);if(e===i.charCodes.graveAccent||e===i.charCodes.dollarSign&&r.input.charCodeAt(r.state.pos+1)===i.charCodes.leftCurlyBrace)return r.state.pos===r.state.start&&k(u.TokenType.template)?e===i.charCodes.dollarSign?(r.state.pos+=2,void R(u.TokenType.dollarBraceL)):(++r.state.pos,void R(u.TokenType.backQuote)):void R(u.TokenType.template);e===i.charCodes.backslash&&r.state.pos++,r.state.pos++}}()},o.retokenizeSlashAsRegex=function(){r.state.type===u.TokenType.assign&&--r.state.pos;!function(){const e=r.state.pos;let t=!1,o=!1;for(;;){if(r.state.pos>=r.input.length)return void(0,c.unexpected)("Unterminated regular expression",e);const a=r.input.charCodeAt(r.state.pos);if(t)t=!1;else{if(a===i.charCodes.leftSquareBracket)o=!0;else if(a===i.charCodes.rightSquareBracket&&o)o=!1;else if(a===i.charCodes.slash&&!o)break;t=a===i.charCodes.backslash}++r.state.pos}++r.state.pos,w(),R(u.TokenType.regexp)}()},o.pushTypeContext=function(e){for(let t=r.state.tokens.length-e;t<r.state.tokens.length;t++)r.state.tokens[t].isType=!0;const t=r.state.isType;return r.state.isType=!0,t},o.popTypeContext=function(e){r.state.isType=e},o.eat=f,o.eatTypeToken=function(e){const t=r.state.isType;r.state.isType=!0,f(e),r.state.isType=t},o.match=k,o.lookaheadType=function(){const e=r.state.snapshot();C();const t=r.state.type;return r.state.restoreFromSnapshot(e),t},o.lookaheadTypeAndKeyword=function(){const e=r.state.snapshot();C();const t=r.state.type,o=r.state.contextualKeyword;return r.state.restoreFromSnapshot(e),new y(t,o)},o.nextTokenStart=g,o.nextTokenStartSince=S,o.lookaheadCharCode=function(){return r.input.charCodeAt(g())},o.nextToken=b,o.skipLineComment=v,o.skipSpace=D,o.finishToken=R,o.rescan_gt=function(){r.state.type===u.TokenType.greaterThan&&(r.state.pos-=1,I())},o.getTokenFromCode=m,o.skipWord=w;const n=e("tslib"),r=e("540718e523"),c=e("bc94bbadc1"),i=e("22746c8ce8"),d=e("364148c9f0"),p=e("2a3176644a"),h=e("99ff836c64"),l=n.__importDefault(e("e6eb78033b")),u=e("f0c35cbd76");!function(e){e[e.Access=0]="Access";e[e.ExportAccess=1]="ExportAccess";e[e.TopLevelDeclaration=2]="TopLevelDeclaration";e[e.FunctionScopedDeclaration=3]="FunctionScopedDeclaration";e[e.BlockScopedDeclaration=4]="BlockScopedDeclaration";e[e.ObjectShorthandTopLevelDeclaration=5]="ObjectShorthandTopLevelDeclaration";e[e.ObjectShorthandFunctionScopedDeclaration=6]="ObjectShorthandFunctionScopedDeclaration";e[e.ObjectShorthandBlockScopedDeclaration=7]="ObjectShorthandBlockScopedDeclaration";e[e.ObjectShorthand=8]="ObjectShorthand";e[e.ImportDeclaration=9]="ImportDeclaration";e[e.ObjectKey=10]="ObjectKey";e[e.ImportAccess=11]="ImportAccess"}(o.IdentifierRole||(o.IdentifierRole={})),function(e){e[e.NoChildren=0]="NoChildren";e[e.OneChild=1]="OneChild";e[e.StaticChildren=2]="StaticChildren";e[e.KeyAfterPropSpread=3]="KeyAfterPropSpread"}(o.JSXRole||(o.JSXRole={}));class T{constructor(){this.type=r.state.type,this.contextualKeyword=r.state.contextualKeyword,this.start=r.state.start,this.end=r.state.end,this.scopeDepth=r.state.scopeDepth,this.isType=r.state.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function C(){r.state.tokens.push(new T),b()}function f(e){return!!k(e)&&(C(),!0)}function k(e){return r.state.type===e}o.Token=T;class y{constructor(e,t){this.type=e,this.contextualKeyword=t}}function g(){return S(r.state.pos)}function S(e){p.skipWhiteSpace.lastIndex=e;return e+p.skipWhiteSpace.exec(r.input)[0].length}function b(){if(D(),r.state.start=r.state.pos,r.state.pos>=r.input.length){const e=r.state.tokens;return e.length>=2&&e[e.length-1].start>=r.input.length&&e[e.length-2].start>=r.input.length&&(0,c.unexpected)("Unexpectedly reached the end of input."),void R(u.TokenType.eof)}var e;e=r.input.charCodeAt(r.state.pos),d.IS_IDENTIFIER_START[e]||e===i.charCodes.backslash||e===i.charCodes.atSign&&r.input.charCodeAt(r.state.pos+1)===i.charCodes.atSign?(0,l.default)():m(e)}function A(){for(;r.input.charCodeAt(r.state.pos)!==i.charCodes.asterisk||r.input.charCodeAt(r.state.pos+1)!==i.charCodes.slash;)if(r.state.pos++,r.state.pos>r.input.length)return void(0,c.unexpected)("Unterminated comment",r.state.pos-2);r.state.pos+=2}function v(e){let t=r.input.charCodeAt(r.state.pos+=e);if(r.state.pos<r.input.length)for(;t!==i.charCodes.lineFeed&&t!==i.charCodes.carriageReturn&&t!==i.charCodes.lineSeparator&&t!==i.charCodes.paragraphSeparator&&++r.state.pos<r.input.length;)t=r.input.charCodeAt(r.state.pos)}function D(){for(;r.state.pos<r.input.length;){const e=r.input.charCodeAt(r.state.pos);switch(e){case i.charCodes.carriageReturn:r.input.charCodeAt(r.state.pos+1)===i.charCodes.lineFeed&&++r.state.pos;case i.charCodes.lineFeed:case i.charCodes.lineSeparator:case i.charCodes.paragraphSeparator:++r.state.pos;break;case i.charCodes.slash:switch(r.input.charCodeAt(r.state.pos+1)){case i.charCodes.asterisk:r.state.pos+=2,A();break;case i.charCodes.slash:v(2);break;default:return}break;default:if(!p.IS_WHITESPACE[e])return;++r.state.pos}}}function R(e,t=h.ContextualKeyword.NONE){r.state.end=r.state.pos,r.state.type=e,r.state.contextualKeyword=t}function I(){if(r.state.isType)return void x(u.TokenType.greaterThan,1);const e=r.input.charCodeAt(r.state.pos+1);if(e===i.charCodes.greaterThan){const e=r.input.charCodeAt(r.state.pos+2)===i.charCodes.greaterThan?3:2;return r.input.charCodeAt(r.state.pos+e)===i.charCodes.equalsTo?void x(u.TokenType.assign,e+1):void x(u.TokenType.bitShiftR,e)}e===i.charCodes.equalsTo?x(u.TokenType.relationalOrEqual,2):x(u.TokenType.greaterThan,1)}function m(e){switch(e){case i.charCodes.numberSign:return++r.state.pos,void R(u.TokenType.hash);case i.charCodes.dot:return void function(){const e=r.input.charCodeAt(r.state.pos+1);e>=i.charCodes.digit0&&e<=i.charCodes.digit9?B(!0):e===i.charCodes.dot&&r.input.charCodeAt(r.state.pos+2)===i.charCodes.dot?(r.state.pos+=3,R(u.TokenType.ellipsis)):(++r.state.pos,R(u.TokenType.dot))}();case i.charCodes.leftParenthesis:return++r.state.pos,void R(u.TokenType.parenL);case i.charCodes.rightParenthesis:return++r.state.pos,void R(u.TokenType.parenR);case i.charCodes.semicolon:return++r.state.pos,void R(u.TokenType.semi);case i.charCodes.comma:return++r.state.pos,void R(u.TokenType.comma);case i.charCodes.leftSquareBracket:return++r.state.pos,void R(u.TokenType.bracketL);case i.charCodes.rightSquareBracket:return++r.state.pos,void R(u.TokenType.bracketR);case i.charCodes.leftCurlyBrace:return void(r.isFlowEnabled&&r.input.charCodeAt(r.state.pos+1)===i.charCodes.verticalBar?x(u.TokenType.braceBarL,2):(++r.state.pos,R(u.TokenType.braceL)));case i.charCodes.rightCurlyBrace:return++r.state.pos,void R(u.TokenType.braceR);case i.charCodes.colon:return void(r.input.charCodeAt(r.state.pos+1)===i.charCodes.colon?x(u.TokenType.doubleColon,2):(++r.state.pos,R(u.TokenType.colon)));case i.charCodes.questionMark:return void function(){const e=r.input.charCodeAt(r.state.pos+1),t=r.input.charCodeAt(r.state.pos+2);e!==i.charCodes.questionMark||r.isFlowEnabled&&r.state.isType?e!==i.charCodes.dot||t>=i.charCodes.digit0&&t<=i.charCodes.digit9?(++r.state.pos,R(u.TokenType.question)):(r.state.pos+=2,R(u.TokenType.questionDot)):t===i.charCodes.equalsTo?x(u.TokenType.assign,3):x(u.TokenType.nullishCoalescing,2)}();case i.charCodes.atSign:return++r.state.pos,void R(u.TokenType.at);case i.charCodes.graveAccent:return++r.state.pos,void R(u.TokenType.backQuote);case i.charCodes.digit0:{const e=r.input.charCodeAt(r.state.pos+1);if(e===i.charCodes.lowercaseX||e===i.charCodes.uppercaseX||e===i.charCodes.lowercaseO||e===i.charCodes.uppercaseO||e===i.charCodes.lowercaseB||e===i.charCodes.uppercaseB)return void function(){r.state.pos+=2;for(;;){const e=r.input.charCodeAt(r.state.pos);if(!(e>=i.charCodes.digit0&&e<=i.charCodes.digit9||e>=i.charCodes.lowercaseA&&e<=i.charCodes.lowercaseF||e>=i.charCodes.uppercaseA&&e<=i.charCodes.uppercaseF||e===i.charCodes.underscore))break;r.state.pos++}const e=r.input.charCodeAt(r.state.pos);e===i.charCodes.lowercaseN?(++r.state.pos,R(u.TokenType.bigint)):R(u.TokenType.num)}()}case i.charCodes.digit1:case i.charCodes.digit2:case i.charCodes.digit3:case i.charCodes.digit4:case i.charCodes.digit5:case i.charCodes.digit6:case i.charCodes.digit7:case i.charCodes.digit8:case i.charCodes.digit9:return void B(!1);case i.charCodes.quotationMark:case i.charCodes.apostrophe:return void function(e){for(r.state.pos++;;){if(r.state.pos>=r.input.length)return void(0,c.unexpected)("Unterminated string constant");const t=r.input.charCodeAt(r.state.pos);if(t===i.charCodes.backslash)r.state.pos++;else if(t===e)break;r.state.pos++}r.state.pos++,R(u.TokenType.string)}(e);case i.charCodes.slash:return void(r.input.charCodeAt(r.state.pos+1)===i.charCodes.equalsTo?x(u.TokenType.assign,2):x(u.TokenType.slash,1));case i.charCodes.percentSign:case i.charCodes.asterisk:return void function(e){let t=e===i.charCodes.asterisk?u.TokenType.star:u.TokenType.modulo,o=1,a=r.input.charCodeAt(r.state.pos+1);e===i.charCodes.asterisk&&a===i.charCodes.asterisk&&(o++,a=r.input.charCodeAt(r.state.pos+2),t=u.TokenType.exponent),a===i.charCodes.equalsTo&&r.input.charCodeAt(r.state.pos+2)!==i.charCodes.greaterThan&&(o++,t=u.TokenType.assign),x(t,o)}(e);case i.charCodes.verticalBar:case i.charCodes.ampersand:return void function(e){const t=r.input.charCodeAt(r.state.pos+1);if(t!==e){if(e===i.charCodes.verticalBar){if(t===i.charCodes.greaterThan)return void x(u.TokenType.pipeline,2);if(t===i.charCodes.rightCurlyBrace&&r.isFlowEnabled)return void x(u.TokenType.braceBarR,2)}t!==i.charCodes.equalsTo?x(e===i.charCodes.verticalBar?u.TokenType.bitwiseOR:u.TokenType.bitwiseAND,1):x(u.TokenType.assign,2)}else r.input.charCodeAt(r.state.pos+2)===i.charCodes.equalsTo?x(u.TokenType.assign,3):x(e===i.charCodes.verticalBar?u.TokenType.logicalOR:u.TokenType.logicalAND,2)}(e);case i.charCodes.caret:return void(r.input.charCodeAt(r.state.pos+1)===i.charCodes.equalsTo?x(u.TokenType.assign,2):x(u.TokenType.bitwiseXOR,1));case i.charCodes.plusSign:case i.charCodes.dash:return void function(e){const t=r.input.charCodeAt(r.state.pos+1);t!==e?t===i.charCodes.equalsTo?x(u.TokenType.assign,2):e===i.charCodes.plusSign?x(u.TokenType.plus,1):x(u.TokenType.minus,1):x(u.TokenType.preIncDec,2)}(e);case i.charCodes.lessThan:return void function(){const e=r.input.charCodeAt(r.state.pos+1);if(e===i.charCodes.lessThan)return r.input.charCodeAt(r.state.pos+2)===i.charCodes.equalsTo?void x(u.TokenType.assign,3):void(r.state.isType?x(u.TokenType.lessThan,1):x(u.TokenType.bitShiftL,2));e===i.charCodes.equalsTo?x(u.TokenType.relationalOrEqual,2):x(u.TokenType.lessThan,1)}();case i.charCodes.greaterThan:return void I();case i.charCodes.equalsTo:case i.charCodes.exclamationMark:return void function(e){const t=r.input.charCodeAt(r.state.pos+1);if(t!==i.charCodes.equalsTo)return e===i.charCodes.equalsTo&&t===i.charCodes.greaterThan?(r.state.pos+=2,void R(u.TokenType.arrow)):void x(e===i.charCodes.equalsTo?u.TokenType.eq:u.TokenType.bang,1);x(u.TokenType.equality,r.input.charCodeAt(r.state.pos+2)===i.charCodes.equalsTo?3:2)}(e);case i.charCodes.tilde:return void x(u.TokenType.tilde,1)}(0,c.unexpected)(`Unexpected character '${String.fromCharCode(e)}'`,r.state.pos)}function x(e,t){r.state.pos+=t,R(e)}function O(){for(;;){const e=r.input.charCodeAt(r.state.pos);if(!(e>=i.charCodes.digit0&&e<=i.charCodes.digit9||e===i.charCodes.underscore))break;r.state.pos++}}function B(e){let t=!1,o=!1;e||O();let a=r.input.charCodeAt(r.state.pos);a===i.charCodes.dot&&(++r.state.pos,O(),a=r.input.charCodeAt(r.state.pos)),a!==i.charCodes.uppercaseE&&a!==i.charCodes.lowercaseE||(a=r.input.charCodeAt(++r.state.pos),a!==i.charCodes.plusSign&&a!==i.charCodes.dash||++r.state.pos,O(),a=r.input.charCodeAt(r.state.pos)),a===i.charCodes.lowercaseN?(++r.state.pos,t=!0):a===i.charCodes.lowercaseM&&(++r.state.pos,o=!0),R(t?u.TokenType.bigint:o?u.TokenType.decimal:u.TokenType.num)}function w(){for(;r.state.pos<r.input.length;){const e=r.input.charCodeAt(r.state.pos);if(d.IS_IDENTIFIER_CHAR[e])r.state.pos++;else{if(e!==i.charCodes.backslash)break;if(r.state.pos+=2,r.input.charCodeAt(r.state.pos)===i.charCodes.leftCurlyBrace){for(;r.state.pos<r.input.length&&r.input.charCodeAt(r.state.pos)!==i.charCodes.rightCurlyBrace;)r.state.pos++;r.state.pos++}}}}o.TypeAndKeyword=y},
@@ -227,7 +227,7 @@ const r=t("@bokehjs/core/util/types");let o,s;const c={fontFamily:'"Helvetica Ne
227
227
  "b1f4d68596": function _(e,s,t,o,l){var i;o();const r=e("@bokehjs/core/dom"),a=e("dab42e6dad");class h extends a.HTMLBoxView{connect_signals(){super.connect_signals();const{width:e,height:s,height_policy:t,width_policy:o,sizing_mode:l,active:i,bar_color:r,css_classes:a,value:h,max:n}=this.model.properties;this.on_change([e,s,t,o,l],(()=>this.rerender_())),this.on_change([i,r,a],(()=>this.setCSS())),this.on_change(h,(()=>this.setValue())),this.on_change(n,(()=>this.setMax()))}render(){super.render();const e={...this.model.styles,display:"inline-block"};this.progressEl=document.createElement("progress"),this.setValue(),this.setMax(),this.setCSS();for(const s in e)this.progressEl.style.setProperty(s,e[s]);this.shadow_el.appendChild(this.progressEl)}stylesheets(){const e=super.stylesheets();for(const s of this.model.css)e.push(new r.ImportedStyleSheet(s));return e}setCSS(){let e=`${this.model.css_classes.join(" ")} ${this.model.bar_color}`;this.model.active&&(e=`${e} active`),this.progressEl.className=e}setValue(){null==this.model.value?this.progressEl.value=0:this.model.value>=0?this.progressEl.value=this.model.value:this.model.value<0&&this.progressEl.removeAttribute("value")}setMax(){null!=this.model.max&&(this.progressEl.max=this.model.max)}}t.ProgressView=h,h.__name__="ProgressView";class n extends a.HTMLBox{constructor(e){super(e)}}t.Progress=n,i=n,n.__name__="Progress",n.__module__="panel.models.widgets",i.prototype.default_view=h,i.define((({Any:e,List:s,Bool:t,Float:o,Str:l})=>({active:[t,!0],bar_color:[l,"primary"],css:[s(l),[]],max:[o,100],value:[e,null]})))},
228
228
  "a8f2a01dfe": function _(e,t,i,l,o){var s;l();const n=e("@bokehjs/core/dom"),d=e("dab42e6dad");class h extends d.HTMLBoxView{connect_signals(){super.connect_signals();const{disabled:e,visible:t,text:i,mode:l,toolbar:o,placeholder:s}=this.model.properties;this.on_change(e,(()=>{this.quill.enable(!this.model.disabled)})),this.on_change(t,(()=>{this.model.visible&&(this.container.style.visibility="visible")})),this.on_change(i,(()=>{this._editing||(this._editing=!0,this.quill.enable(!1),this.quill.setContents([]),this.quill.clipboard.dangerouslyPasteHTML(this.model.text),this.quill.enable(!this.model.disabled),this._editing=!1)})),this.on_change(s,(()=>{this.quill.root.setAttribute("data-placeholder",this.model.placeholder)})),this.on_change([l,o],(()=>{this.render(),this._layout_toolbar()}))}_layout_toolbar(){if(null==this._toolbar)this.el.style.removeProperty("padding-top");else{const e=this._toolbar.getBoundingClientRect().height+1;this.el.style.paddingTop=`${e}px`,this._toolbar.style.marginTop=-e+"px"}}render(){super.render(),this.container=(0,n.div)({style:{visibility:"hidden"}}),this.shadow_el.appendChild(this.container);const e="bubble"===this.model.mode?"bubble":"snow";this.watch_stylesheets(),this.quill=new window.Quill(this.container,{modules:{toolbar:this.model.toolbar},readOnly:!0,placeholder:this.model.placeholder,theme:e});const t=!!document.createElement("div").attachShadow({mode:"open"}).getSelection;this.quill.selection.hasFocus=()=>this.quill.root.getRootNode().activeElement===this.quill.root,this.quill.selection.getNativeRange=()=>{const e=(e=>{try{if(t)return e.getSelection().getRangeAt(0);{const t=window.getSelection();return t.getComposedRanges?t.getComposedRanges(e)[0]:t.getRangeAt(0)}}catch{return null}})(this.quill.root.getRootNode());return e?this.quill.selection.normalizeNative(e):null},this.quill.selection.setNativeRange=(e,t,i=void 0,l=void 0,o=!1)=>{if(i=void 0===i?e:i,l=void 0===l?t:l,o=o||!1,null!=e&&(null==this.quill.selection.root.parentNode||null==e.parentNode||null==i.parentNode))return;const s=document.getSelection();if(null!=s)if(null!=e){this.quill.selection.hasFocus()||this.quill.selection.root.focus();const n=(this.quill.selection.getNativeRange()||{}).native;(null==n||o||e!==n.startContainer||t!==n.startOffset||i!==n.endContainer||l!==n.endOffset)&&("BR"==e.tagName&&(t=Array.prototype.indexOf.call(e.parentNode?.childNodes??[],e),e=e.parentNode),"BR"==i.tagName&&(l=Array.prototype.indexOf(i.parentNode?.childNodes??[],i),i=i.parentNode),s.setBaseAndExtent(e,t,i,l))}else s.removeAllRanges(),this.quill.selection.root.blur(),document.body.focus()},this._editor=this.shadow_el.querySelector(".ql-editor"),this._toolbar=this.shadow_el.querySelector(".ql-toolbar");const i=this.quill.clipboard.convert({html:this.model.text});this.quill.setContents(i),this.quill.on("text-change",(()=>{if(this._editing)return;this._editing=!0;const e=this.quill.getSemanticHTML();this.model.text_input=e,this.model.on_keyup&&(this.model.text=e),this._editing=!1})),this.quill.on("selection-change",((e,t,i)=>{if(!this._editing){if(null===e)return this.model.on_keyup||(this._editing=!0,this.model.text=this.quill.getSemanticHTML(),this._editing=!1),void(Object.keys(this.model.selection).length>0&&(this.model.selection={}));if(e.length>0){const t=this.quill.getText(e.index,e.length);this.model.selection={text:t}}else Object.keys(this.model.selection).length>0&&(this.model.selection={})}})),this.quill.root.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),this.model.on_keyup||(this._editing=!0,this.model.text=this.quill.getSemanticHTML(),this._editing=!1))})),this.model.disabled||this.quill.enable(!this.model.disabled),document.addEventListener("selectionchange",((...e)=>{this.quill.selection.update()}))}style_redraw(){this.model.visible&&(this.container.style.visibility="visible");const e=this.quill.clipboard.convert({html:this.model.text});this.quill.setContents(e),this.invalidate_layout()}after_layout(){super.after_layout(),this._layout_toolbar()}}i.QuillInputView=h,h.__name__="QuillInputView";class a extends d.HTMLBox{constructor(e){super(e)}}i.QuillInput=a,s=a,a.__name__="QuillInput",a.__module__="panel.models.quill",s.prototype.default_view=h,s.define((({Any:e,Bool:t,Dict:i,Str:l})=>({mode:[l,"toolbar"],on_keyup:[t,!0],placeholder:[l,""],selection:[i(e),{}],text:[l,""],text_input:[l,""],toolbar:[e,null]}))),s.override({height:300})},
229
229
  "25e2d7c208": function _(t,o,e,i,l){var s;i();const n=t("@bokehjs/models/ui/tooltip"),a=t("@bokehjs/core/build_views"),p=t("@bokehjs/models/widgets/radio_button_group");class u extends p.RadioButtonGroupView{*children(){yield*super.children(),null!=this.tooltip&&(yield this.tooltip)}connect_signals(){super.connect_signals();const{tooltip:t}=this.model.properties;this.on_change(t,(()=>this.update_tooltip()))}async update_tooltip(){null!=this.tooltip&&this.tooltip.remove();const{tooltip:t}=this.model;null!=t&&(this.tooltip=await(0,a.build_view)(t,{parent:this}))}async lazy_initialize(){await super.lazy_initialize();const{tooltip:t}=this.model;null!=t&&(this.tooltip=await(0,a.build_view)(t,{parent:this}))}remove(){this.tooltip?.remove(),super.remove()}render(){super.render();const t=t=>{this.tooltip?.model.setv({visible:t})};let o;this.el.addEventListener("mouseenter",(()=>{o=setTimeout((()=>t(!0)),this.model.tooltip_delay)})),this.el.addEventListener("mouseleave",(()=>{clearTimeout(o),t(!1)}))}}e.RadioButtonGroupView=u,u.__name__="RadioButtonGroupView";class d extends p.RadioButtonGroup{constructor(t){super(t)}}e.RadioButtonGroup=d,s=d,d.__name__="RadioButtonGroup",d.__module__="panel.models.widgets",s.prototype.default_view=u,s.define((({Nullable:t,Ref:o,Float:e})=>({tooltip:[t(o(n.Tooltip)),null],tooltip_delay:[e,500]})))},
230
- "529fb470ea": function _(e,t,n,r,s){var o;r();const i=e("@bokehjs/core/build_views"),a=e("@bokehjs/core/dom"),d=e("@bokehjs/core/util/array"),l=e("@bokehjs/core/util/assert"),c=e("@bokehjs/core/util/types"),h=e("a5f4225d5f");class _ extends a.InlineStyleSheet{constructor(e,t,n=!1,r=""){super(e,t,n),this.persistent=n,this.host_id=r}replace(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.replace(e,t)}prepend(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.prepend(e,t)}append(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.append(e,t)}}async function p(e,t,n){(0,l.assert)(null!=e,"model doesn't implement a view");const r=new e({...n,model:t});return r.initialize(),await r.lazy_initialize(),r}async function u(e,t,n={parent:null},r=e=>e.default_view){const s=(0,d.difference)([...e.keys()],t),o=[];for(const t of s){const n=e.get(t);null!=n&&(e.delete(t),o.push(n))}const i=[],a=t.filter((t=>!e.has(t)));for(const t of a){const s=await p(r(t),t,n);e.set(t,s),i.push(s)}for(const e of i)e.connect_signals();return{created:i,removed:o}}n.HostedStyleSheet=_,_.__name__="HostedStyleSheet";class m extends h.ReactiveESMView{constructor(){super(...arguments),this.model_getter=h.model_getter,this.model_setter=h.model_setter,this.react_root=null,this._force_update_callbacks=[],this._scheduled_removals=[]}initialize(){super.initialize(),this.use_shadow_dom||(this.display=new _("","display",!1,this.model.id),this.style=new _("","style",!1,this.model.id),this.parent_style=new _("","parent",!0,this.model.id))}get use_shadow_dom(){return this.model.use_shadow_dom||!(this.parent instanceof m)}render_esm(){if(null!==this.model.compiled&&null!==this.model.render_module){this.model.usesMui&&(this.model.root_node?this.style_cache=document.head:(this.style_cache=document.createElement("head"),this.shadow_el.insertBefore(this.style_cache,this.container))),this.accessed_properties=[];for(const e of this._lifecycle_handlers.keys())(this._lifecycle_handlers.get(e)||[]).splice(0);this.model.disconnect_watchers(this),this.model.render_module.then((e=>{this.react_root=e.default.render(this.model.id)}))}}on_force_update(e){this._force_update_callbacks.push(e)}force_update(){for(const e of this._force_update_callbacks)e()}remove(){if(this._force_update_callbacks=[],this.react_root&&this.use_shadow_dom){super.remove(),this.react_root.then((e=>e&&e.unmount()));for(const e of this._scheduled_removals)e.remove();this._scheduled_removals=[]}else{this._applied_stylesheets.forEach((e=>e.uninstall()));for(const e of this._lifecycle_handlers.get("remove")||[])e();this._child_callbacks.clear(),this._child_rendered.clear(),this._mounted.clear()}}get root_view(){let e=this;if(this.use_shadow_dom)return e;for(;e.parent instanceof m;)e=e.parent;return e}_apply_stylesheets(e){const t=e.map((e=>(0,c.isString)(e)?new a.InlineStyleSheet(e):e)),n=this.root_view.shadow_el.querySelectorAll("style"),r=this.root_view.shadow_el.querySelectorAll("link");t.forEach((e=>{if(!this.use_shadow_dom){if(e instanceof a.InlineStyleSheet&&Array.from(n).some((t=>t.innerHTML===e.css)))return;if(e instanceof a.ImportedStyleSheet&&Array.from(r).some((t=>t.href===e.el.href)))return}this._applied_stylesheets.push(e),e.install(this.root_view.shadow_el)}))}render(){this.react_root&&this.react_root.then((e=>e.unmount())),this._force_update_callbacks=[],super.render()}r_after_render(){this.model.use_shadow_dom||this._apply_visible(),super.r_after_render(),this.use_shadow_dom&&this.force_update()}_update_layout(){super._update_layout();const e=this._lifecycle_handlers.get("update_layout")||[];for(const t of e)t()}async build_child_views(){const e=this.model.use_shadow_dom?u:i.build_views,{created:t,removed:n}=await e(this._child_views,this.child_models,{parent:this});for(const e of n)this._resize_observer.unobserve(e.el),this.model.use_shadow_dom&&(this._child_rendered.delete(e),t.length?this._scheduled_removals.push(e):e.remove());for(const e of t)this._resize_observer.observe(e.el,{box:"border-box"});return t}async update_children(){const e=new Set(await this.build_child_views()),t=new Map;for(const n of this.child_views){if(!e.has(n))continue;const r=this._lookup_child(n);r&&(t.has(r)?t.get(r).push(n):t.set(r,[n]))}for(const e of this.model.children){const n=this._child_callbacks.get(e)||[],r=t.get(e)||[];if(r)for(const e of n)e(r)}this._update_children()}_on_mounted(){this.invalidate_layout()}patch_container(e){this.el=this.container=e,this._update_stylesheets(),this.class_list=new a.ClassList(this.container.classList),this._apply_html_attributes()}after_rendered(){const e=this._lifecycle_handlers.get("after_render")||[];for(const t of e)t();if(!this._rendered)for(const e of this._lifecycle_handlers.get("after_layout")||[])e();this._rendered=!0}}n.ReactComponentView=m,m.__name__="ReactComponentView";class f extends h.ReactiveESM{constructor(e){super(e),this.sucrase_transforms=["typescript","jsx"]}get usesMui(){return!!this.importmap?.imports&&Object.keys(this.importmap?.imports).some((e=>e.startsWith("@mui")))}_render_code(){let[e,t]=["",""];const n="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;this.bundle?t=`\n const ns = await view._module_cache.get("${n}")\n const {React, createRoot} = ns.default`:e='\nimport * as React from "react"\nimport { createRoot } from "react-dom/client"';let r="",s="";return this.usesMui&&(this.bundle?t=`\n const ns = await view._module_cache.get("${n}")\n const {CacheProvider, React, createCache, createRoot} = ns.default`:e=`\n${e}\nimport createCache from "@emotion/cache"\nimport { CacheProvider } from "@emotion/react"`,r='\n if (view.use_shadow_dom) {\n const css_key = id.replace("-", "").replace(/d/g, (digit) => String.fromCharCode(digit.charCodeAt(0) + 49)).toLowerCase()\n view.mui_cache = createCache({\n key: \'css-\'+css_key,\n prepend: true,\n container: view.style_cache,\n })\n }',s="\n if (rendered && ((view.parent?.react_root === undefined) || view.model.use_shadow_dom)) {\n rendered = React.createElement(CacheProvider, {value: view.mui_cache}, rendered)\n }"),`\n${e}\n\nasync function render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (view == null) {\n return null\n }\n\n ${t}\n\n class Child extends React.PureComponent {\n\n state = {rendered: null}\n\n constructor(props) {\n super(props)\n this.render_callback = null\n this.containerRef = React.createRef()\n }\n\n updateElement() {\n const childView = this.view\n const el = childView?.el\n if (el && this.containerRef.current && !this.containerRef.current.contains(el)) {\n this.containerRef.current.innerHTML = ""\n this.containerRef.current.appendChild(el)\n }\n }\n\n get view() {\n const child = this.props.parent.model.data[this.props.name]\n const model = this.props.id == null ? child : child.find(item => item.id === this.props.id)\n return this.props.parent.get_child_view(model)\n }\n\n get element() {\n const view = this.view\n return view == null ? null : view.el\n }\n\n get use_shadow_dom() {\n return this.view?.model.use_shadow_dom || (this.view?.react_root === undefined)\n }\n\n componentDidMount() {\n const view = this.view\n this.render_callback = (new_views) => {\n const view = this.view\n if (!view) {\n return\n }\n this.updateElement()\n if (new_views.includes(view)) {\n if (this.use_shadow_dom) {\n for (const view of this.props.parent._scheduled_removals) { view.remove() }\n this.props.parent._scheduled_removals = []\n this.props.parent.rerender_(view)\n this.props.parent._child_rendered.set(view, true)\n } else {\n view.patch_container(this.containerRef.current)\n view.model.render_module.then(async (mod) => {\n for (const view of this.props.parent._scheduled_removals) { view.remove() }\n this.props.parent._scheduled_removals = []\n this.setState(\n {rendered: await mod.default.render(view.model.id)},\n () => {\n this.props.parent.notify_mount(this.props.name, view.model.id)\n this.view.r_after_render()\n this.view.after_rendered()\n }\n )\n })\n }\n }\n }\n this.props.parent.on_child_render(this.props.name, this.render_callback)\n if (view == null) { return }\n for (const rview of this.props.parent._scheduled_removals) { rview.remove() }\n this.props.parent._scheduled_removals = []\n if (this.use_shadow_dom) {\n this.updateElement()\n this.props.parent.rerender_(view)\n this.props.parent._child_rendered.set(view, true)\n this.props.parent.notify_mount(this.props.name, view.model.id)\n } else {\n view.patch_container(this.containerRef.current)\n view.model.render_module.then(async (mod) => {\n this.setState(\n {rendered: await mod.default.render(view.model.id)},\n () => {\n this.props.parent.notify_mount(this.props.name, view.model.id)\n this.view.r_after_render()\n this.view.after_rendered()\n }\n )\n })\n }\n }\n\n componentWillUnmount() {\n if (this.render_callback) {\n this.props.parent.remove_on_child_render(this.props.name, this.render_callback)\n }\n if (!this.use_shadow_dom && this.view._mounted.has(this.props.name)) {\n this.view._mounted.get(this.props.name).delete(this.props.id)\n }\n }\n\n componentDidUpdate() {\n if (this.use_shadow_dom) {\n this.updateElement()\n }\n }\n\n render() {\n const child = this.state.rendered\n const class_name = (this.use_shadow_dom ?\n "child-wrapper" : this.view.model.class_name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()\n )\n return React.createElement('div', {id: this.view?.model.id, className: class_name, ref: this.containerRef}, child)\n }\n }\n\n function react_getter(target, name) {\n if (name === "useMount") {\n return (callback) => React.useEffect(() => {\n target.model_proxy.on('lifecycle:mounted', callback)\n return () => target.model_proxy.off('lifecycle:mounted', callback)\n }, [])\n } if (name == "useState") {\n return (prop) => {\n const data_model = target.model.data\n const propPath = prop.split(".")\n let targetModel = data_model\n let resolvedProp = null\n\n for (let i = 0; i < propPath.length - 1; i++) {\n if (targetModel && targetModel.properties && propPath[i] in targetModel.properties) {\n targetModel = targetModel[propPath[i]]\n } else {\n // Stop if any part of the path is missing\n targetModel = null\n break\n }\n }\n if (targetModel && targetModel.attributes && propPath[propPath.length - 1] in targetModel.attributes) {\n resolvedProp = propPath[propPath.length - 1]\n }\n if (resolvedProp && targetModel) {\n const [value, setValue] = React.useState(targetModel.attributes[resolvedProp])\n\n React.useEffect(() => {\n const cb = () => {\n if (target.model.events.includes(resolvedProp)) {\n targetModel.attributes[resolvedProp] && (setValue((v) => v+1) || targetModel.setv({[resolvedProp]: false}))\n } else {\n setValue(targetModel.attributes[resolvedProp])\n }\n }\n react_proxy.on(prop, cb, true)\n return () => react_proxy.off(prop, cb)\n }, [])\n\n let initialized = React.useRef(false)\n React.useEffect(() => {\n if (!target.model.events.includes(resolvedProp) && initialized.current) {\n targetModel.setv({ [resolvedProp]: value })\n } else { initialized.current = true }\n }, [value])\n\n return [value, setValue]\n }\n throw ReferenceError("Could not resolve " + prop + " on " + target.model.class_name)\n }\n } else if (name === "get_child") {\n return (child) => {\n const data_model = target.model.data\n const value = data_model.attributes[child]\n if (Array.isArray(value)) {\n const [children_state, set_children] = React.useState(value.map((model) =>\n React.createElement(Child, { parent: target, name: child, key: model.id, id: model.id })\n ))\n React.useEffect(() => {\n target.on_child_render(child, () => {\n const current_models = data_model.attributes[child]\n const previous_models = children_state.map(child => child.props.id)\n if (current_models.some((model, i) => model.id !== previous_models[i])) {\n set_children(current_models.map((model, i) => (\n React.createElement(Child, { parent: target, name: child, key: model.id, id: model.id })\n )))\n }\n })\n }, [])\n return children_state\n } else {\n return React.createElement(Child, {parent: target, name: child})\n }\n }\n }\n return target.model_getter(target, name)\n }\n\n const react_proxy = new Proxy(view, {\n get: react_getter,\n set: view.model_setter\n })\n\n class ErrorBoundary extends React.Component {\n constructor(props) {\n super(props)\n // initialize the error state\n this.state = { hasError: false }\n }\n\n // if an error happened, set the state to true\n static getDerivedStateFromError(error) {\n return { hasError: true }\n }\n\n componentDidCatch(error) {\n this.props.view.render_error(error)\n }\n\n render() {\n if (this.state.hasError) {\n return React.createElement('div')\n }\n return React.createElement('div', {className: "error-wrapper"}, this.props.children)\n }\n }\n\n class Component extends React.Component {\n\n constructor(props) {\n super(props)\n ${r}\n }\n\n componentDidMount() {\n if (!this.props.view.use_shadow_dom) { return }\n this.props.view.on_force_update(() => {\n ${r}\n this.forceUpdate()\n })\n this.props.view._changing = false\n this.props.view.after_rendered()\n }\n\n render() {\n let rendered = React.createElement(this.props.view.render_fn, this.props)\n if (this.props.view.model.dev) {\n rendered = React.createElement(ErrorBoundary, {view}, rendered)\n }\n ${s}\n return rendered\n }\n }\n\n const props = {view, model: react_proxy, data: view.model.data, el: view.container}\n const rendered = React.createElement(Component, props)\n if (!view.model.use_shadow_dom && (view.parent?.react_root !== undefined)) {\n return rendered\n }\n if (rendered) {\n view._changing = true\n let container\n if (view.model.root_node) {\n container = document.querySelector(view.model.root_node)\n if (container == null) {\n container = document.createElement("div")\n container.id = view.model.root_node.replace("#", "")\n document.body.append(container)\n }\n } else {\n container = view.container\n }\n const root = createRoot(container)\n try {\n root.render(rendered)\n } catch(e) {\n view.render_error(e)\n }\n return root\n }\n}\n\nexport default {render}`}compile(){const e=super.compile();return this.bundle?e:null!==e&&e.includes("React")?`\nimport * as React from "react"\n\n${e}`:e}get _render_cache_key(){const e="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;return`react-${this.usesMui}-${e}`}}n.ReactComponent=f,o=f,f.__name__="ReactComponent",f.__module__="panel.models.esm",o.prototype.default_view=m,o.define((({Bool:e,Nullable:t,Str:n})=>({root_node:[t(n),null],use_shadow_dom:[e,!0]}))),o.override({render_policy:"manual"})},
230
+ "d89e70455a": function _(e,t,n,r,s){var o;r();const i=e("@bokehjs/core/build_views"),a=e("@bokehjs/core/dom"),d=e("@bokehjs/core/util/array"),l=e("@bokehjs/core/util/assert"),c=e("@bokehjs/core/util/types"),h=e("5cb5357866");class _ extends a.InlineStyleSheet{constructor(e,t,n=!1,r=""){super(e,t,n),this.persistent=n,this.host_id=r}replace(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.replace(e,t)}prepend(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.prepend(e,t)}append(e,t){e=e.replace(/:host\b/g,`#${this.host_id}`),super.append(e,t)}}async function p(e,t,n){(0,l.assert)(null!=e,"model doesn't implement a view");const r=new e({...n,model:t});return r.initialize(),await r.lazy_initialize(),r}async function u(e,t,n={parent:null},r=e=>e.default_view){const s=(0,d.difference)([...e.keys()],t),o=[];for(const t of s){const n=e.get(t);null!=n&&(e.delete(t),o.push(n))}const i=[],a=t.filter((t=>!e.has(t)));for(const t of a){const s=await p(r(t),t,n);e.set(t,s),i.push(s)}for(const e of i)e.connect_signals();return{created:i,removed:o}}n.HostedStyleSheet=_,_.__name__="HostedStyleSheet";class m extends h.ReactiveESMView{constructor(){super(...arguments),this.model_getter=h.model_getter,this.model_setter=h.model_setter,this.react_root=null,this.mounted=!1,this._force_update_callbacks=[],this._mounted_resolve=null,this._scheduled_removals=[]}initialize(){super.initialize(),this.use_shadow_dom||(this.display=new _("","display",!1,this.model.id),this.style=new _("","style",!1,this.model.id),this.parent_style=new _("","parent",!0,this.model.id))}get use_shadow_dom(){return this.model.use_shadow_dom||!(this.parent instanceof m)}render_esm(){if(null===this.model.compiled||null===this.model.render_module)return;this._rendered=!1,this.model.usesMui&&(this.model.root_node?this.style_cache=document.head:(this.style_cache=document.createElement("head"),this.shadow_el.insertBefore(this.style_cache,this.container))),this.accessed_properties=[];for(const e of this._lifecycle_handlers.keys())(this._lifecycle_handlers.get(e)||[]).splice(0);this.model.disconnect_watchers(this);const e=new Promise((e=>{this._mounted_resolve=e}));this.model.render_module.then((e=>{this.react_root=e.default.render(this.model.id)})),this._await_ready(e)}on_force_update(e){this._force_update_callbacks.push(e)}force_update(){for(const e of this._force_update_callbacks)e()}remove(){if(this._force_update_callbacks=[],this.mounted=!1,this.react_root&&this.use_shadow_dom){super.remove(),this.react_root.then((e=>e&&e.unmount()));for(const e of this._scheduled_removals)e.remove();this._scheduled_removals=[]}else{this._applied_stylesheets.forEach((e=>e.uninstall()));for(const e of this._lifecycle_handlers.get("remove")||[])e();this._child_callbacks.clear(),this._child_rendered.clear(),this._mounted.clear()}}get root_view(){let e=this;if(this.use_shadow_dom)return e;for(;e.parent instanceof m;)e=e.parent;return e}_apply_stylesheets(e){const t=e.map((e=>(0,c.isString)(e)?new a.InlineStyleSheet(e):e)),n=this.root_view.shadow_el.querySelectorAll("style"),r=this.root_view.shadow_el.querySelectorAll("link");t.forEach((e=>{if(!this.use_shadow_dom){if(e instanceof a.InlineStyleSheet&&Array.from(n).some((t=>t.innerHTML===e.css)))return;if(e instanceof a.ImportedStyleSheet&&Array.from(r).some((t=>t.href===e.el.href)))return}this._applied_stylesheets.push(e),e.install(this.root_view.shadow_el)}))}render(){this.react_root&&this.react_root.then((e=>e.unmount())),this._force_update_callbacks=[],this.mounted=!1,super.render()}r_after_render(){this.model.use_shadow_dom||this._apply_visible(),super.r_after_render(),this.use_shadow_dom&&this.force_update()}_update_layout(){super._update_layout();const e=this._lifecycle_handlers.get("update_layout")||[];for(const t of e)t()}async build_child_views(){const e=this.model.use_shadow_dom?u:i.build_views,{created:t,removed:n}=await e(this._child_views,this.child_models,{parent:this});for(const e of n)this._resize_observer.unobserve(e.el),this.model.use_shadow_dom&&(this._child_rendered.delete(e),t.length?this._scheduled_removals.push(e):e.remove());for(const e of t)this._resize_observer.observe(e.el,{box:"border-box"});return t}async update_children(){const e=new Set(await this.build_child_views()),t=new Map;for(const n of this.child_views){if(!e.has(n))continue;const r=this._lookup_child(n);r&&(t.has(r)?t.get(r).push(n):t.set(r,[n]))}for(const e of this.model.children){const n=this._child_callbacks.get(e)||[],r=t.get(e)||[];if(r)for(const e of n)e(r)}this._update_children()}_on_mounted(){this.invalidate_layout(),this.mounted=!0}has_finished(){return super.has_finished()&&this._rendered}patch_container(e){this.el=this.container=e,this._update_stylesheets(),this.class_list=new a.ClassList(this.container.classList),this._apply_html_attributes()}after_rendered(){const e=this._lifecycle_handlers.get("after_render")||[];for(const t of e)t();if(!this._rendered)for(const e of this._lifecycle_handlers.get("after_layout")||[])e();if(this._rendered=!0,this._mounted_resolve){const e=this._mounted_resolve;this._mounted_resolve=null;const t=[];for(const e of this.child_views)t.push(e.ready);t.length>0?Promise.all(t).then((()=>e())):e()}this.finish()}}n.ReactComponentView=m,m.__name__="ReactComponentView";class f extends h.ReactiveESM{constructor(e){super(e),this.sucrase_transforms=["typescript","jsx"]}get usesMui(){return!!this.importmap?.imports&&Object.keys(this.importmap?.imports).some((e=>e.startsWith("@mui")))}_render_code(){let[e,t]=["",""];const n="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;this.bundle?t=`\n const ns = await view._module_cache.get("${n}")\n const {React, createRoot} = ns.default`:e='\nimport * as React from "react"\nimport { createRoot } from "react-dom/client"';let r="",s="";return this.usesMui&&(this.bundle?t=`\n const ns = await view._module_cache.get("${n}")\n const {CacheProvider, React, createCache, createRoot} = ns.default`:e=`\n${e}\nimport createCache from "@emotion/cache"\nimport { CacheProvider } from "@emotion/react"`,r='\n if (view.use_shadow_dom) {\n const css_key = id.replace("-", "").replace(/d/g, (digit) => String.fromCharCode(digit.charCodeAt(0) + 49)).toLowerCase()\n view.mui_cache = createCache({\n key: \'css-\'+css_key,\n prepend: true,\n container: view.style_cache,\n })\n }',s="\n if (rendered && ((view.parent?.react_root === undefined) || view.model.use_shadow_dom)) {\n rendered = React.createElement(CacheProvider, {value: view.mui_cache}, rendered)\n }"),`\n${e}\n\nasync function render(id) {\n const view = Bokeh.index.find_one_by_id(id)\n if (view == null) {\n return null\n }\n\n ${t}\n\n class Child extends React.PureComponent {\n\n state = {rendered: null}\n\n constructor(props) {\n super(props)\n this.render_callback = null\n this.containerRef = React.createRef()\n }\n\n updateElement() {\n const childView = this.view\n const el = childView?.el\n if (el && this.containerRef.current && !this.containerRef.current.contains(el)) {\n this.containerRef.current.innerHTML = ""\n this.containerRef.current.appendChild(el)\n }\n }\n\n get view() {\n const child = this.props.parent.model.data[this.props.name]\n const model = this.props.id == null ? child : child.find(item => item.id === this.props.id)\n return this.props.parent.get_child_view(model)\n }\n\n get element() {\n const view = this.view\n return view == null ? null : view.el\n }\n\n get use_shadow_dom() {\n return this.view?.model.use_shadow_dom || (this.view?.react_root === undefined)\n }\n\n componentDidMount() {\n const view = this.view\n this.render_callback = (new_views) => {\n const view = this.view\n if (!view || !new_views.includes(view)) {\n return\n }\n this.updateElement()\n if (this.use_shadow_dom) {\n for (const view of this.props.parent._scheduled_removals) { view.remove() }\n this.props.parent._scheduled_removals = []\n this.props.parent.rerender_(view)\n this.props.parent._child_rendered.set(view, true)\n } else {\n view.patch_container(this.containerRef.current)\n view.model.render_module.then(async (mod) => {\n for (const view of this.props.parent._scheduled_removals) { view.remove() }\n this.props.parent._scheduled_removals = []\n this.setState(\n {rendered: await mod.default.render(view.model.id)},\n () => {\n this.props.parent.notify_mount(this.props.name, view.model.id)\n this.view.r_after_render()\n this.view.after_rendered()\n }\n )\n })\n }\n }\n this.props.parent.on_child_render(this.props.name, this.render_callback)\n if (view == null) { return }\n for (const rview of this.props.parent._scheduled_removals) { rview.remove() }\n this.props.parent._scheduled_removals = []\n if (this.use_shadow_dom) {\n this.updateElement()\n this.props.parent.rerender_(view)\n this.props.parent._child_rendered.set(view, true)\n this.props.parent.notify_mount(this.props.name, view.model.id)\n } else {\n view.patch_container(this.containerRef.current)\n view.model.render_module.then(async (mod) => {\n this.setState(\n {rendered: await mod.default.render(view.model.id)},\n () => {\n this.props.parent.notify_mount(this.props.name, view.model.id)\n this.view.r_after_render()\n this.view.after_rendered()\n }\n )\n })\n }\n }\n\n componentWillUnmount() {\n if (this.render_callback) {\n this.props.parent.remove_on_child_render(this.props.name, this.render_callback)\n }\n if (!this.use_shadow_dom && this.view._mounted.has(this.props.name)) {\n this.view._mounted.get(this.props.name).delete(this.props.id)\n }\n }\n\n componentDidUpdate() {\n if (this.use_shadow_dom) {\n this.updateElement()\n }\n }\n\n render() {\n const child = this.state.rendered\n const class_name = (this.use_shadow_dom ?\n "child-wrapper" : this.view.model.class_name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()\n )\n return React.createElement('div', {id: this.view?.model.id, className: class_name, ref: this.containerRef}, child)\n }\n }\n\n function react_getter(target, name) {\n if (name === "useMount") {\n return (callback) => React.useEffect(() => {\n target.model_proxy.on('lifecycle:mounted', callback)\n return () => target.model_proxy.off('lifecycle:mounted', callback)\n }, [])\n } if (name == "useState") {\n return (prop) => {\n const data_model = target.model.data\n const propPath = prop.split(".")\n let targetModel = data_model\n let resolvedProp = null\n\n for (let i = 0; i < propPath.length - 1; i++) {\n if (targetModel && targetModel.properties && propPath[i] in targetModel.properties) {\n targetModel = targetModel[propPath[i]]\n } else {\n // Stop if any part of the path is missing\n targetModel = null\n break\n }\n }\n if (targetModel && targetModel.attributes && propPath[propPath.length - 1] in targetModel.attributes) {\n resolvedProp = propPath[propPath.length - 1]\n }\n if (resolvedProp && targetModel) {\n const [value, setValue] = React.useState(targetModel.attributes[resolvedProp])\n\n React.useEffect(() => {\n const cb = () => {\n if (target.model.events.includes(resolvedProp)) {\n targetModel.attributes[resolvedProp] && (setValue((v) => v+1) || targetModel.setv({[resolvedProp]: false}))\n } else {\n setValue(targetModel.attributes[resolvedProp])\n }\n }\n react_proxy.on(prop, cb, true)\n return () => react_proxy.off(prop, cb)\n }, [])\n\n let initialized = React.useRef(false)\n React.useEffect(() => {\n if (!target.model.events.includes(resolvedProp) && initialized.current) {\n targetModel.setv({ [resolvedProp]: value })\n } else { initialized.current = true }\n }, [value])\n\n return [value, setValue]\n }\n throw ReferenceError("Could not resolve " + prop + " on " + target.model.class_name)\n }\n } else if (name === "get_child") {\n return (child) => {\n const data_model = target.model.data\n const value = data_model.attributes[child]\n if (Array.isArray(value)) {\n const [children_state, set_children] = React.useState(value.map((model) =>\n React.createElement(Child, { parent: target, name: child, key: model.id, id: model.id })\n ))\n React.useEffect(() => {\n target.on_child_render(child, () => {\n const current_models = data_model.attributes[child]\n const previous_models = children_state.map(child => child.props.id)\n if (current_models.some((model, i) => model.id !== previous_models[i])) {\n set_children(current_models.map((model, i) => (\n React.createElement(Child, { parent: target, name: child, key: model.id, id: model.id })\n )))\n }\n })\n }, [])\n return children_state\n } else {\n return React.createElement(Child, {parent: target, name: child})\n }\n }\n }\n return target.model_getter(target, name)\n }\n\n const react_proxy = new Proxy(view, {\n get: react_getter,\n set: view.model_setter\n })\n\n class ErrorBoundary extends React.Component {\n constructor(props) {\n super(props)\n // initialize the error state\n this.state = { hasError: false }\n }\n\n // if an error happened, set the state to true\n static getDerivedStateFromError(error) {\n return { hasError: true }\n }\n\n componentDidCatch(error) {\n this.props.view.render_error(error)\n }\n\n render() {\n if (this.state.hasError) {\n return React.createElement('div')\n }\n return React.createElement('div', {className: "error-wrapper"}, this.props.children)\n }\n }\n\n class Component extends React.Component {\n\n constructor(props) {\n super(props)\n ${r}\n }\n\n componentDidMount() {\n if (!this.props.view.use_shadow_dom) { return }\n this.props.view.on_force_update(() => {\n ${r}\n this.forceUpdate()\n })\n this.props.view.after_rendered()\n }\n\n render() {\n let rendered = React.createElement(this.props.view.render_fn, this.props)\n if (this.props.view.model.dev) {\n rendered = React.createElement(ErrorBoundary, {view}, rendered)\n }\n ${s}\n return rendered\n }\n }\n\n const props = {view, model: react_proxy, data: view.model.data, el: view.container}\n const rendered = React.createElement(Component, props)\n if (!view.model.use_shadow_dom && (view.parent?.react_root !== undefined)) {\n return rendered\n }\n if (rendered) {\n let container\n if (view.model.root_node) {\n container = document.querySelector(view.model.root_node)\n if (container == null) {\n container = document.createElement("div")\n container.id = view.model.root_node.replace("#", "")\n document.body.append(container)\n }\n } else {\n container = view.container\n }\n const root = createRoot(container)\n try {\n root.render(rendered)\n } catch(e) {\n view.render_error(e)\n }\n return root\n }\n}\n\nexport default {render}`}compile(){const e=super.compile();return this.bundle?e:null!==e&&e.includes("React")?`\nimport * as React from "react"\n\n${e}`:e}get _render_cache_key(){const e="url"===this.bundle?this.esm:this.bundle||`${this.class_name}-${this.esm.length}`;return`react-${this.usesMui}-${e}`}}n.ReactComponent=f,o=f,f.__name__="ReactComponent",f.__module__="panel.models.esm",o.prototype.default_view=m,o.define((({Bool:e,Nullable:t,Str:n})=>({root_node:[t(n),null],use_shadow_dom:[e,!0]}))),o.override({render_policy:"manual"})},
231
231
  "d5752cda5a": function _(e,t,n,s,i){var o;s();const r=e("ed32986312"),l=e("691acbd345"),c=e("b3f51db71c"),d=e("@bokehjs/core/dom"),a=e("@bokehjs/core/util/assert"),_=e("@bokehjs/core/util/iterator"),h=e("@bokehjs/core/util/types"),u=e("@bokehjs/core/util/object"),f=e("@bokehjs/model"),p=e("@bokehjs/models/ui/ui_element"),m=e("be689f0377"),v=e("a572dba9cd"),$=e("4c04683fdc"),g=e("dab42e6dad"),b=e("aa07eb54cc");function w(e,t,n){const s=new Map;for(const e of n)s.set(`{${e}}`,"(.*)");const i=[];let o=`^${r=e,r.replace(/[-\/\\^$*+?.()|[\]]/g,"\\$&")}$`;var r;let l,c,d;for(const[t,n]of s)if(c=e.indexOf(t),c>-1){for(o=o.replace(t,n),d={index:c,token:t},l=0;l<i.length&&i[l].index<c;l++);l<i.length?i.splice(l,0,d):i.push(d)}o=o.replace(/\{[^{}]+\}/g,".*");const a=new RegExp(o).exec(t);if(null!=a){const e={};for(l=0;l<i.length;l++)e[i[l].token.slice(1,-1)]=a[l+1];return e}return null}function y(e,t){let n=e.getElementById(t);return null==n&&(n=document.getElementById(t)),n}class M extends g.HTMLBoxView{constructor(){super(...arguments),this._changing=!1,this._event_listeners=new Map,this._mutation_observers=[],this._script_fns=new Map,this._state={}}initialize(){super.initialize(),this.html=(0,$.html_decode)(this.model.html)??this.model.html}_recursive_connect(e,t,n){for(const s of e){const e=0!=n.length?`${n}.${s.attr}`:s.attr,i=s.get_value();null!=i&&(i instanceof f.Model&&this._recursive_connect(i,!0,e),this.on_change(s,(()=>{if(t)for(const[e,t]of(0,u.entries)(this.model.children))if(t==s.attr){let t=s.get_value();return(0,h.isArray)(t)||(t=[t]),void this._render_node(e,t)}this._changing||this._update(e)})))}}connect_signals(){super.connect_signals();const{children:e,events:t}=this.model.properties;this.on_change(e,(async()=>{this.html=(0,$.html_decode)(this.model.html)??this.model.html,await this.build_child_views(),this.invalidate_render()})),this._recursive_connect(this.model.data,!0,""),this.on_change(t,(()=>{this._remove_event_listeners(),this._setup_event_listeners()})),this.connect_scripts()}connect_scripts(){const{id:e}=this.model.data;for(const[t,n]of(0,u.entries)(this.model.scripts)){let s,i=this.model.data;if(t.includes(".")){const e=t.split(".");s=e[e.length-1];for(const t of e.slice(0,-1)){const e=i.property(t).get_value();(0,a.assert)(e instanceof f.Model),i=e}}else s=t;for(const o of n){const n=(0,$.html_decode)(o)??o,r=this._render_script(n,e);if(this._script_fns.set(t,r),!(s in i.properties))continue;const l=i.property(s),c=this.model.event_params.includes(t);this.on_change(l,(()=>{this._changing||c&&!i.property(t).get_value()||(this.run_script(t),c&&i.setv({[t]:!1}))}))}}}run_script(e,t=!1){const n=this._script_fns.get(e);if(void 0===n)return void(t||console.warn(`Script '${e}' could not be found.`));const s={get_records(e,t){return this.get_records(e,t)}};for(const e of this._script_fns.keys())s[e]=()=>this.run_script(e);return n(this.model,this.model.data,this._state,this,(e=>this.run_script(e)),s)}get_records(e,t=!0){return(0,m.dict_to_records)(this.model.data.property(e),t)}disconnect_signals(){super.disconnect_signals(),this._remove_event_listeners(),this._remove_mutation_observers()}remove(){this.run_script("remove",!0),super.remove()}get child_models(){const e=[];for(const[t,n]of(0,u.entries)(this.model.children))for(const t of n)(0,h.isString)(t)||e.push(t);return e}_after_layout(){this.run_script("after_layout",!0)}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.container=(0,d.div)({style:{display:"contents"}}),this.shadow_el.append(this.container),this._update(),this._render_children(),this._setup_mutation_observers(),this._setup_event_listeners(),this.run_script("render",!0)}_send_event(e,t,n){const s=(0,b.convertUndefined)((0,v.serializeEvent)(n));s.type=t,this.model.trigger_event(new $.DOMEvent(e,s))}_render_child(e,t){if((0,h.isString)(e))t.innerHTML=(0,$.html_decode)(e)??e;else{const n=this._child_views.get(e);null==n?t.innerHTML="":(t.appendChild(n.el),n.render(),n.r_after_render())}}_render_node(e,t){const{id:n}=this.model.data;if(this.model.looped.includes(e))for(const[s,i]of(0,_.enumerate)(t)){const t=`${e}-${i}-${n}`,o=y(this.shadow_el,t);null!=o?this._render_child(s,o):console.warn(`DOM node '${t}' could not be found. Cannot render children.`)}else{const s=`${e}-${n}`,i=y(this.shadow_el,s);if(null==i)return void console.warn(`DOM node '${s}' could not be found. Cannot render children.`);for(const e of t)this._render_child(e,i)}}_render_children(){for(const[e,t]of(0,u.entries)(this.model.children)){const n=(()=>{if(!(0,h.isString)(t))return t;{const e=this.model.data.property(t).get_value();if((0,h.isString)(e))return[e];if((0,h.isArray)(e))return e;(0,a.unreachable)()}})();this._render_node(e,n)}}_render_html(e,t={}){let n=e.replace(/[`]/g,"\\$&"),s="";const i=[];for(const[e,t]of(0,u.entries)(this.model.callbacks))for(const[o,r]of t){let t;if(n=n.replaceAll(`\${${r}}`,`$--{${r}}`),r.startsWith("script(")){const e=r.replace("('","_").replace("')","").replace('("',"_").replace('")',"").replace("-","_"),s=e.replaceAll("script_","");n=n.replaceAll(r,e),t=`\n const ${e} = (event) => {\n view._state.event = event\n view.run_script("${s}")\n delete view._state.event\n }\n `}else t=`\n const ${r} = (event) => {\n let elname = "${e}"\n if (RegExp("{{.*loop.index.*}}").test(elname)) {\n const pattern = RegExp(elname.replace(/{{(.+?)}}/g, String.fromCharCode(92) + "d+"))\n for (const p of event.path) {\n if (pattern.exec(p.id) != null) {\n elname = p.id.split("-").slice(null, -1).join("-")\n break\n }\n }\n }\n view._send_event(elname, "${o}", event)\n }\n `;i.indexOf(r)>-1||(i.push(r),s+=t)}return n=n.replaceAll("${model.","$-{model.").replaceAll("${","${data.").replaceAll("$-{model.","${model.").replaceAll("$--{","${"),new Function("view, model, data, state, html, useCallback",`${s}return html\`${n}\`;`)(this,this.model,this.model.data,t,c.html,l.useCallback)}_render_script(e,t){const n=[];for(const s of this.model.nodes){const i=s.replace("-","_");if(!e.includes(i))continue;const o=`\n let ${i} = view.shadow_el.getElementById('${s}-${t}')\n if (${i} == null) {\n ${i} = document.getElementById('${s}-${t}')\n }\n if (${i} == null) {\n console.warn("DOM node '${s}' could not be found. Cannot execute callback.")\n return\n }\n `;n.push(o)}return n.push("\n let event = null\n if (state.event !== undefined) {\n event = state.event\n }\n "),n.push(e),new Function("model, data, state, view, script, self",n.join("\n"))}_remove_mutation_observers(){for(const e of this._mutation_observers)e.disconnect();this._mutation_observers=[]}_setup_mutation_observers(){const{id:e}=this.model.data;for(const t of(0,u.keys)(this.model.attrs)){const n=y(this.shadow_el,`${t}-${e}`);if(null==n){console.warn(`DOM node '${t}-${e}' could not be found. Cannot set up MutationObserver.`);continue}const s=new MutationObserver((()=>{this._update_model(n,t)}));s.observe(n,{attributes:!0}),this._mutation_observers.push(s)}}_remove_event_listeners(){const{id:e}=this.model.data;for(const[t,n]of this._event_listeners){const s=y(this.shadow_el,`${t}-${e}`);if(null!=s)for(const[e,t]of n)s.removeEventListener(e,t)}this._event_listeners.clear()}_setup_event_listeners(){const{id:e}=this.model.data,t=(0,u.dict)(this.model.attrs);for(const[n,s]of(0,u.entries)(this.model.events)){const i=y(this.shadow_el,`${n}-${e}`);if(null!=i)for(const[e,o]of(0,u.entries)(s)){const s=s=>{this._send_event(n,e,s),t.has(n)&&o&&this._update_model(i,n)};i.addEventListener(e,s);let r=this._event_listeners.get(n);void 0===r&&this._event_listeners.set(n,r=new Map),r.set(e,s)}else console.warn(`DOM node '${n}-${e}' could not be found. Cannot subscribe to DOM events.`)}}_update(e=null){if(null==e||this.html.includes(`\${${e}}`)){const e=this._render_html(this.html);if(null==e)return;try{this._changing=!0,(0,r.render)(e,this.container)}finally{this._changing=!1}}}_update_model(e,t){if(this._changing)return;const n=(0,u.dict)(this.model.attrs).get(t)??[],s={};for(const i of n){const[n,o,r]=i;let l="children"==n?e.innerHTML:e[n];if(1===o.length&&`{${o[0]}}`===r)s[o[0]]=l;else if((0,h.isString)(l))if(l=w(r,l,o),null==l)console.warn(`Could not resolve parameters in ${t} element ${n} attribute value ${l}.`);else for(const[e,i]of(0,u.entries)(l))void 0===i?console.warn(`Could not resolve ${e} in ${t} element ${n} attribute value ${l}.`):s[e]=i}try{this._changing=!0,this.model.data.setv(function(e){const t={};for(const[n,s]of(0,u.entries)(e)){const e=(()=>{if((0,h.isString)(s)){if(!(""===s||"NaN"!==s&&isNaN(Number(s))))return Number(s);if("false"===s||"true"===s)return"true"===s}return s})();t[n]=e}return t}(s))}catch{console.error("Could not serialize",s)}finally{this._changing=!1}}}n.ReactiveHTMLView=M,M.__name__="ReactiveHTMLView";class k extends g.HTMLBox{constructor(e){super(e)}}n.ReactiveHTML=k,o=k,k.__name__="ReactiveHTML",k.__module__="panel.models.reactive_html",o.prototype.default_view=M,o.define((({Bool:e,Str:t,List:n,Dict:s,Tuple:i,Or:o,Ref:r})=>({attrs:[s(n(i(t,n(t),t))),{}],callbacks:[s(n(i(t,t))),{}],children:[s(o(n(o(r(p.UIElement),t)),t)),{}],data:[r(f.Model)],event_params:[n(t),[]],events:[s(s(e)),{}],html:[t,""],looped:[n(t),[]],nodes:[n(t),[]],scripts:[s(n(t)),{}]})))},
232
232
  "ed32986312": function _(e,n,t,_,l){_(),t.Component=S,t.Fragment=P,t.cloneElement=function(e,n,t){var _,l,r,u,i=b({},e.props);for(r in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),n)"key"==r?_=n[r]:"ref"==r?l=n[r]:i[r]=void 0===n[r]&&null!=u?u[r]:n[r];return arguments.length>2&&(i.children=arguments.length>3?o.call(arguments,2):t),C(e.type,i,_||e.key,l||e.ref,null)},t.createContext=function(e){function n(e){var t,_;return this.getChildContext||(t=new Set,(_={})[n.__c]=this,this.getChildContext=function(){return _},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach((function(e){e.__e=!0,D(e)}))},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+v++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n},t.createElement=x,t.h=x,t.createRef=function(){return{current:null}},t.hydrate=function e(n,t){G(n,t,e)},t.render=G,t.toChildArray=function e(n,t){return t=t||[],null==n||"boolean"==typeof n||(k(n)?n.some((function(n){e(n,t)})):t.push(n)),t};var o,r,u,i,c,s,f,p,a,h,d,v,y={},m=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,k=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(e,n,t){var _,l,r,u={};for(r in n)"key"==r?_=n[r]:"ref"==r?l=n[r]:u[r]=n[r];if(arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===u[r]&&(u[r]=e.defaultProps[r]);return C(e,u,_,l,null)}function C(e,n,t,_,l){var o={type:e,props:n,key:t,ref:_,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:l??++u,__i:-1,__u:0};return null==l&&null!=r.vnode&&r.vnode(o),o}function P(e){return e.children}function S(e,n){this.props=e,this.context=n}function U(e,n){if(null==n)return e.__?U(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?U(e):null}function T(e){if(e.__P&&e.__d){var n=e.__v,t=n.__e,_=[],l=[],o=b({},n);o.__v=n.__v+1,r.vnode&&r.vnode(o),I(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[t]:null,_,t??U(n),!!(32&n.__u),l),o.__v=n.__v,o.__.__k[o.__i]=o,B(_,o,l),n.__e=n.__=null,o.__e!=t&&E(o)}}function E(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some((function(n){if(null!=n&&null!=n.__e)return e.__e=e.__c.base=n.__e})),E(e)}function D(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!M.__r++||c!=r.debounceRendering)&&((c=r.debounceRendering)||s)(M)}function M(){for(var e,n=1;i.length;)i.length>n&&i.sort(f),e=i.shift(),n=i.length,T(e);M.__r=0}function W(e,n,t,_,l,o,r,u,i,c,s){var f,p,a,h,d,v,g,k=_&&_.__k||m,b=n.length;for(i=F(t,n,k,i,b),f=0;f<b;f++)null!=(a=t.__k[f])&&(p=-1!=a.__i&&k[a.__i]||y,a.__i=f,v=I(e,a,p,l,o,r,u,i,c,s),h=a.__e,a.ref&&p.ref!=a.ref&&(p.ref&&V(p.ref,null,a),s.push(a.ref,a.__c||h,a)),null==d&&null!=h&&(d=h),(g=!!(4&a.__u))||p.__k===a.__k?i=L(a,i,e,g):"function"==typeof a.type&&void 0!==v?i=v:h&&(i=h.nextSibling),a.__u&=-7);return t.__e=d,i}function F(e,n,t,_,l){var o,r,u,i,c,s=t.length,f=s,p=0;for(e.__k=new Array(l),o=0;o<l;o++)null!=(r=n[o])&&"boolean"!=typeof r&&"function"!=typeof r?("string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?r=e.__k[o]=C(null,r,null,null,null):k(r)?r=e.__k[o]=C(P,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?r=e.__k[o]=C(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):e.__k[o]=r,i=o+p,r.__=e,r.__b=e.__b+1,u=null,-1!=(c=r.__i=N(r,t,i,f))&&(f--,(u=t[c])&&(u.__u|=2)),null==u||null==u.__v?(-1==c&&(l>s?p--:l<s&&p++),"function"!=typeof r.type&&(r.__u|=4)):c!=i&&(c==i-1?p--:c==i+1?p++:(c>i?p--:p++,r.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<s;o++)null!=(u=t[o])&&!(2&u.__u)&&(u.__e==_&&(_=U(u)),z(u,u));return _}function L(e,n,t,_){var l,o;if("function"==typeof e.type){for(l=e.__k,o=0;l&&o<l.length;o++)l[o]&&(l[o].__=e,n=L(l[o],n,t,_));return n}e.__e!=n&&(_&&(n&&e.type&&!n.parentNode&&(n=U(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function N(e,n,t,_){var l,o,r,u=e.key,i=e.type,c=n[t],s=null!=c&&!(2&c.__u);if(null===c&&null==u||s&&u==c.key&&i==c.type)return t;if(_>(s?1:0))for(l=t-1,o=t+1;l>=0||o<n.length;)if(null!=(c=n[r=l>=0?l--:o++])&&!(2&c.__u)&&u==c.key&&i==c.type)return r;return-1}function A(e,n,t){"-"==n[0]?e.setProperty(n,t??""):e[n]=null==t?"":"number"!=typeof t||g.test(n)?t:t+"px"}function R(e,n,t,_,l){var o,r;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||A(e.style,n,"");if(t)for(n in t)_&&t[n]==_[n]||A(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])o=n!=(n=n.replace(p,"$1")),r=n.toLowerCase(),n=r in e||"onFocusOut"==n||"onFocusIn"==n?r.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_?t.u=_.u:(t.u=a,e.addEventListener(n,o?d:h,o)):e.removeEventListener(n,o?d:h,o);else{if("http://www.w3.org/2000/svg"==l)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=t??"";break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function H(e){return function(n){if(this.l){var t=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<t.u)return;return t(r.event?r.event(n):n)}}}function I(e,n,t,_,l,o,u,i,c,s){var f,p,a,h,d,v,y,g,x,C,U,T,E,D,M,F=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[i=n.__e=t.__e]),(f=r.__b)&&f(n);e:if("function"==typeof F)try{if(g=n.props,x="prototype"in F&&F.prototype.render,C=(f=F.contextType)&&_[f.__c],U=f?C?C.props.value:f.__:_,t.__c?y=(p=n.__c=t.__c).__=p.__E:(x?n.__c=p=new F(g,U):(n.__c=p=new S(g,U),p.constructor=F,p.render=q),C&&C.sub(p),p.state||(p.state={}),p.__n=_,a=p.__d=!0,p.__h=[],p._sb=[]),x&&null==p.__s&&(p.__s=p.state),x&&null!=F.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,F.getDerivedStateFromProps(g,p.__s))),h=p.props,d=p.state,p.__v=n,a)x&&null==F.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),x&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(x&&null==F.getDerivedStateFromProps&&g!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(g,U),n.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(g,p.__s,U)){n.__v!=t.__v&&(p.props=g,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.some((function(e){e&&(e.__=n)})),m.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&u.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(g,p.__s,U),x&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,d,v)}))}if(p.context=U,p.props=g,p.__P=e,p.__e=!1,T=r.__r,E=0,x)p.state=p.__s,p.__d=!1,T&&T(n),f=p.render(p.props,p.state,p.context),m.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,T&&T(n),f=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++E<25);p.state=p.__s,null!=p.getChildContext&&(_=b(b({},_),p.getChildContext())),x&&!a&&null!=p.getSnapshotBeforeUpdate&&(v=p.getSnapshotBeforeUpdate(h,d)),D=null!=f&&f.type===P&&null==f.key?O(f.props.children):f,i=W(e,k(D)?D:[D],n,t,_,l,o,u,i,c,s),p.base=n.__e,n.__u&=-161,p.__h.length&&u.push(p),y&&(p.__E=p.__=null)}catch(e){if(n.__v=null,c||null!=o)if(e.then){for(n.__u|=c?160:128;i&&8==i.nodeType&&i.nextSibling;)i=i.nextSibling;o[o.indexOf(i)]=null,n.__e=i}else{for(M=o.length;M--;)w(o[M]);$(n)}else n.__e=t.__e,n.__k=t.__k,e.then||$(n);r.__e(e,n,t)}else null==o&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):i=n.__e=j(t.__e,n,t,_,l,o,u,c,s);return(f=r.diffed)&&f(n),128&n.__u?void 0:i}function $(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($))}function B(e,n,t){for(var _=0;_<t.length;_++)V(t[_],t[++_],t[++_]);r.__c&&r.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){r.__e(e,n.__v)}}))}function O(e){return"object"!=typeof e||null==e||e.__b>0?e:k(e)?e.map(O):b({},e)}function j(e,n,t,_,l,u,i,c,s){var f,p,a,h,d,v,m,g=t.props||y,b=n.props,x=n.type;if("svg"==x?l="http://www.w3.org/2000/svg":"math"==x?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),null!=u)for(f=0;f<u.length;f++)if((d=u[f])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){e=d,u[f]=null;break}if(null==e){if(null==x)return document.createTextNode(b);e=document.createElementNS(l,x,b.is&&b),c&&(r.__m&&r.__m(n,u),c=!1),u=null}if(null==x)g===b||c&&e.data==b||(e.data=b);else{if(u=u&&o.call(e.childNodes),!c&&null!=u)for(g={},f=0;f<e.attributes.length;f++)g[(d=e.attributes[f]).name]=d.value;for(f in g)d=g[f],"dangerouslySetInnerHTML"==f?a=d:"children"==f||f in b||"value"==f&&"defaultValue"in b||"checked"==f&&"defaultChecked"in b||R(e,f,null,d,l);for(f in b)d=b[f],"children"==f?h=d:"dangerouslySetInnerHTML"==f?p=d:"value"==f?v=d:"checked"==f?m=d:c&&"function"!=typeof d||g[f]===d||R(e,f,d,g[f],l);if(p)c||a&&(p.__html==a.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),n.__k=[];else if(a&&(e.innerHTML=""),W("template"==n.type?e.content:e,k(h)?h:[h],n,t,_,"foreignObject"==x?"http://www.w3.org/1999/xhtml":l,u,i,u?u[0]:t.__k&&U(t,0),c,s),null!=u)for(f=u.length;f--;)w(u[f]);c||(f="value","progress"==x&&null==v?e.removeAttribute("value"):null!=v&&(v!==e[f]||"progress"==x&&!v||"option"==x&&v!=g[f])&&R(e,f,v,g[f],l),f="checked",null!=m&&m!=e[f]&&R(e,f,m,g[f],l))}return e}function V(e,n,t){try{if("function"==typeof e){var _="function"==typeof e.__u;_&&e.__u(),_&&null==n||(e.__u=e(n))}else e.current=n}catch(e){r.__e(e,t)}}function z(e,n,t){var _,l;if(r.unmount&&r.unmount(e),(_=e.ref)&&(_.current&&_.current!=e.__e||V(_,null,n)),null!=(_=e.__c)){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(e){r.__e(e,n)}_.base=_.__P=null}if(_=e.__k)for(l=0;l<_.length;l++)_[l]&&z(_[l],n,t||"function"!=typeof e.type);t||w(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function G(e,n,t){var _,l,u,i;n==document&&(n=document.documentElement),r.__&&r.__(e,n),l=(_="function"==typeof t)?null:t&&t.__k||n.__k,u=[],i=[],I(n,e=(!_&&t||n).__k=x(P,null,[e]),l||y,y,n.namespaceURI,!_&&t?[t]:l?null:n.firstChild?o.call(n.childNodes):null,u,!_&&t?t:l?l.__e:n.firstChild,_,i),B(u,e,i)}o=m.slice,t.options=r={__e:function(e,n,t,_){for(var l,o,r;n=n.__;)if((l=n.__c)&&!l.__)try{if((o=l.constructor)&&null!=o.getDerivedStateFromError&&(l.setState(o.getDerivedStateFromError(e)),r=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,_||{}),r=l.__d),r)return l.__E=l}catch(n){e=n}throw e}},u=0,t.isValidElement=function(e){return null!=e&&void 0===e.constructor},S.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),D(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),D(this))},S.prototype.render=P,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(e,n){return e.__v.__b-n.__v.__b},M.__r=0,p=/(PointerCapture)$|Capture$/i,a=0,h=H(!1),d=H(!0),v=0},
233
233
  "691acbd345": function _(_,n,t,u,e){u(),t.useCallback=function(_,n){return a=8,C((function(){return _}),n)},t.useContext=function(_){var n=c.context[_.__c],t=y(r++,9);return t.c=_,n?(null==t.__&&(t.__=!0,n.sub(c)),n.props.value):_.__},t.useDebugValue=function(_,n){l.useDebugValue&&l.useDebugValue(n?n(_):_)},t.useEffect=function(_,n){var t=y(r++,3);!l.__s&&U(t.__H,n)&&(t.__=_,t.u=n,c.__H.__h.push(t))},t.useErrorBoundary=function(_){var n=y(r++,10),t=N();return n.__=_,c.componentDidCatch||(c.componentDidCatch=function(_,u){n.__&&n.__(_,u),t[1](_)}),[t[0],function(){t[1](void 0)}]},t.useId=function(){var _=y(r++,11);if(!_.__){for(var n=c.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);_.__="P"+t[0]+"-"+t[1]++}return _.__},t.useImperativeHandle=function(_,n,t){a=6,g((function(){if("function"==typeof _){var t=_(n());return function(){_(null),t&&"function"==typeof t&&t()}}if(_)return _.current=n(),function(){return _.current=null}}),null==t?t:t.concat(_))},t.useLayoutEffect=g,t.useMemo=C,t.useReducer=b,t.useRef=function(_){return a=5,C((function(){return{current:_}}),[])},t.useState=N;const o=_("ed32986312");var r,c,i,f,a=0,s=[],l=o.options,v=l.__b,h=l.__r,m=l.diffed,d=l.__c,p=l.unmount,H=l.__;function y(_,n){l.__h&&l.__h(c,_,a||n),a=0;var t=c.__H||(c.__H={__:[],__h:[]});return _>=t.__.length&&t.__.push({}),t.__[_]}function N(_){return a=1,b(E,_)}function b(_,n,t){var u=y(r++,2);if(u.t=_,!u.__c&&(u.__=[t?t(n):E(void 0,n),function(_){var n=u.__N?u.__N[0]:u.__[0],t=u.t(n,_);n!==t&&(u.__N=[t,u.__[1]],u.__c.setState({}))}],u.__c=c,!c.__f)){var e=function(_,n,t){if(!u.__c.__H)return!0;var e=u.__c.__H.__.filter((function(_){return _.__c}));if(e.every((function(_){return!_.__N})))return!o||o.call(this,_,n,t);var r=u.__c.props!==_;return e.some((function(_){if(_.__N){var n=_.__[0];_.__=_.__N,_.__N=void 0,n!==_.__[0]&&(r=!0)}})),o&&o.call(this,_,n,t)||r};c.__f=!0;var o=c.shouldComponentUpdate,i=c.componentWillUpdate;c.componentWillUpdate=function(_,n,t){if(this.__e){var u=o;o=void 0,e(_,n,t),o=u}i&&i.call(this,_,n,t)},c.shouldComponentUpdate=e}return u.__N||u.__}function g(_,n){var t=y(r++,4);!l.__s&&U(t.__H,n)&&(t.__=_,t.u=n,c.__h.push(t))}function C(_,n){var t=y(r++,7);return U(t.__H,n)&&(t.__=_(),t.__H=n,t.__h=_),t.__}function A(){for(var _;_=s.shift();){var n=_.__H;if(_.__P&&n)try{n.__h.some(k),n.__h.some(q),n.__h=[]}catch(t){n.__h=[],l.__e(t,_.__v)}}}l.__b=function(_){c=null,v&&v(_)},l.__=function(_,n){_&&n.__k&&n.__k.__m&&(_.__m=n.__k.__m),H&&H(_,n)},l.__r=function(_){h&&h(_),r=0;var n=(c=_.__c).__H;n&&(i===c?(n.__h=[],c.__h=[],n.__.some((function(_){_.__N&&(_.__=_.__N),_.u=_.__N=void 0}))):(n.__h.some(k),n.__h.some(q),n.__h=[],r=0)),i=c},l.diffed=function(_){m&&m(_);var n=_.__c;n&&n.__H&&(n.__H.__h.length&&(1!==s.push(n)&&f===l.requestAnimationFrame||((f=l.requestAnimationFrame)||F)(A)),n.__H.__.some((function(_){_.u&&(_.__H=_.u),_.u=void 0}))),i=c=null},l.__c=function(_,n){n.some((function(_){try{_.__h.some(k),_.__h=_.__h.filter((function(_){return!_.__||q(_)}))}catch(t){n.some((function(_){_.__h&&(_.__h=[])})),n=[],l.__e(t,_.__v)}})),d&&d(_,n)},l.unmount=function(_){p&&p(_);var n,t=_.__c;t&&t.__H&&(t.__H.__.some((function(_){try{k(_)}catch(_){n=_}})),t.__H=void 0,n&&l.__e(n,t.__v))};var D="function"==typeof requestAnimationFrame;function F(_){var n,t=function(){clearTimeout(u),D&&cancelAnimationFrame(n),setTimeout(_)},u=setTimeout(t,35);D&&(n=requestAnimationFrame(t))}function k(_){var n=c,t=_.__c;"function"==typeof t&&(_.__c=void 0,t()),c=n}function q(_){var n=c;_.__c=_.__(),c=n}function U(_,n){return!_||_.length!==n.length||n.some((function(n,t){return n!==_[t]}))}function E(_,n){return"function"==typeof n?n(_):n}},
@@ -269,4 +269,4 @@ const r=t("@bokehjs/core/util/types");let o,s;const c={fontFamily:'"Helvetica Ne
269
269
  "18592eecef": function _(e,t,i,s,n){var r;s();const o=e("b06d05fa3e"),a=e("df9946ff52");class l extends o.AbstractVTKView{connect_signals(){super.connect_signals();const{data:e,colormap:t,shadow:i,sampling:s,edge_gradient:n,rescale:r,ambient:o,diffuse:l,camera:d,specular:_,specular_power:c,display_volume:h,display_slices:g,slice_i:p,slice_j:m,slice_k:u,render_background:v,interpolation:w,controller_expanded:y,nan_opacity:k}=this.model.properties;this.on_change(e,(()=>{this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data),this.invalidate_render()})),this.on_change(t,(()=>{this.colormap_selector.value=this.model.colormap;const e=new Event("change");this.colormap_selector.dispatchEvent(e)})),this.on_change(i,(()=>{this.shadow_selector.value=this.model.shadow?"1":"0";const e=new Event("change");this.shadow_selector.dispatchEvent(e)})),this.on_change(s,(()=>{this.sampling_slider.value=this.model.sampling.toFixed(2);const e=new Event("input");this.sampling_slider.dispatchEvent(e)})),this.on_change(n,(()=>{this.edge_gradient_slider.value=this.model.edge_gradient.toFixed(2);const e=new Event("input");this.edge_gradient_slider.dispatchEvent(e)})),this.on_change(r,(()=>{this._controllerWidget.setRescaleColorMap(this.model.rescale),this._vtk_renwin.getRenderWindow().render()})),this.on_change(o,(()=>{this.volume.getProperty().setAmbient(this.model.ambient),this._vtk_renwin.getRenderWindow().render()})),this.on_change(l,(()=>{this.volume.getProperty().setDiffuse(this.model.diffuse),this._vtk_renwin.getRenderWindow().render()})),this.on_change(d,(()=>{this._setting_camera||(this._set_camera_state(),this._vtk_renwin.getRenderWindow().render())})),this.on_change(_,(()=>{this.volume.getProperty().setSpecular(this.model.specular),this._vtk_renwin.getRenderWindow().render()})),this.on_change(c,(()=>{this.volume.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderWindow().render()})),this.on_change(h,(()=>{this._set_volume_visibility(this.model.display_volume),this._vtk_renwin.getRenderWindow().render()})),this.on_change(g,(()=>{this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderWindow().render()})),this.on_change(p,(()=>{void 0!==this.image_actor_i&&(this.image_actor_i.getMapper().setISlice(this.model.slice_i),this._vtk_renwin.getRenderWindow().render())})),this.on_change(m,(()=>{void 0!==this.image_actor_j&&(this.image_actor_j.getMapper().setJSlice(this.model.slice_j),this._vtk_renwin.getRenderWindow().render())})),this.on_change(u,(()=>{void 0!==this.image_actor_k&&(this.image_actor_k.getMapper().setKSlice(this.model.slice_k),this._vtk_renwin.getRenderWindow().render())})),this.on_change(v,(()=>{this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._vtk_renwin.getRenderWindow().render()})),this.on_change(w,(()=>{this._set_interpolation(this.model.interpolation),this._vtk_renwin.getRenderWindow().render()})),this.on_change(y,(()=>{null!=this._controllerWidget&&this._controllerWidget.setExpanded(this.model.controller_expanded)})),this.on_change(k,(()=>{const e=this.image_actor_i.getProperty().getScalarOpacity();e.get(["nodes"]).nodes[0].y=this.model.nan_opacity,e.modified(),this._vtk_renwin.getRenderWindow().render()}))}render(){this._vtk_renwin=null,this._orientationWidget=null,this._axes=null,super.render(),this._create_orientation_widget(),this._set_axes(),this._vtk_renwin.getRenderer().resetCamera(),Object.keys(this.model.camera).length>0&&this._set_camera_state(),this._get_camera_state()}invalidate_render(){this._vtk_renwin=null,super.invalidate_render()}init_vtk_renwin(){this._vtk_renwin=a.vtkns.FullScreenRenderWindow.newInstance({rootContainer:this.shadow_el,container:this._vtk_container})}plot(){this._controllerWidget=a.vtkns.VolumeController.newInstance({size:[400,150],rescaleColorMap:this.model.rescale}),this._plot_volume(),this._plot_slices(),this._controllerWidget.setupContent(this._vtk_renwin.getRenderWindow(),this.volume,!0),this._controllerWidget.setContainer(this.el),this._controllerWidget.setExpanded(this.model.controller_expanded),this._connect_js_controls(),this._vtk_renwin.getRenderWindow().getInteractor(),this._vtk_renwin.getRenderWindow().getInteractor().setDesiredUpdateRate(45),this._set_volume_visibility(this.model.display_volume),this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._set_interpolation(this.model.interpolation),this._set_camera_state()}get vtk_image_data(){return this._vtk_image_data||(this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data)),this._vtk_image_data}get volume(){return this._vtk_renwin.getRenderer().getVolumes()[0]}get image_actor_i(){return this._vtk_renwin.getRenderer().getActors()[0]}get image_actor_j(){return this._vtk_renwin.getRenderer().getActors()[1]}get image_actor_k(){return this._vtk_renwin.getRenderer().getActors()[2]}get shadow_selector(){return this.el.querySelector(".js-shadow")}get edge_gradient_slider(){return this.el.querySelector(".js-edge")}get sampling_slider(){return this.el.querySelector(".js-spacing")}get colormap_selector(){return this.el.querySelector(".js-color-preset")}_connect_js_controls(){const{el:e}=this._controllerWidget.get("el");if(void 0!==e){e.querySelector(".js-button").addEventListener("click",(()=>this.model.controller_expanded=this._controllerWidget.getExpanded()))}this.colormap_selector.addEventListener("change",(()=>{this.model.colormap=this.colormap_selector.value})),this.model.colormap?this.model.properties.colormap.change.emit():this.model.colormap=this.colormap_selector.value,this.shadow_selector.addEventListener("change",(()=>{this.model.shadow=!!Number(this.shadow_selector.value)})),(this.model.shadow=!!Number(this.shadow_selector.value))&&this.model.properties.shadow.change.emit(),this.sampling_slider.addEventListener("input",(()=>{const e=Number(this.sampling_slider.value);Math.abs(this.model.sampling-e)>=.005&&(this.model.sampling=e)})),Math.abs(this.model.sampling-Number(this.shadow_selector.value))>=.005&&this.model.properties.sampling.change.emit(),this.edge_gradient_slider.addEventListener("input",(()=>{const e=Number(this.edge_gradient_slider.value);Math.abs(this.model.edge_gradient-e)>=.005&&(this.model.edge_gradient=e)})),Math.abs(this.model.edge_gradient-Number(this.edge_gradient_slider.value))>=.005&&this.model.properties.edge_gradient.change.emit()}_plot_slices(){const e=this._vtk_image_data,t=a.vtkns.ImageSlice.newInstance(),i=a.vtkns.ImageSlice.newInstance(),s=a.vtkns.ImageSlice.newInstance(),n=a.vtkns.ImageMapper.newInstance(),r=a.vtkns.ImageMapper.newInstance(),o=a.vtkns.ImageMapper.newInstance();n.setInputData(e),n.setISlice(this.model.slice_i),t.setMapper(n),r.setInputData(e),r.setJSlice(this.model.slice_j),i.setMapper(r),o.setInputData(e),o.setKSlice(this.model.slice_k),s.setMapper(o);const l=a.vtkns.PiecewiseFunction.newInstance(),d=this.volume.getProperty().getRGBTransferFunction(0),_=this.volume.getMapper().getInputData().getPointData().getScalars().getRange();l.removeAllPoints(),l.addPoint(_[0]-1,this.model.nan_opacity),l.addPoint(_[0],1),l.addPoint(_[1],1);const c=t.getProperty();i.setProperty(c),s.setProperty(c),c.setRGBTransferFunction(d),c.setScalarOpacity(l);const h=this._vtk_renwin.getRenderer();h.addActor(t),h.addActor(i),h.addActor(s)}_plot_volume(){const e=this.vtk_image_data,t=a.vtkns.Volume.newInstance(),i=a.vtkns.VolumeMapper.newInstance();t.setMapper(i),i.setInputData(e);const s=(e.getPointData().getScalars()||e.getPointData().getArrays()[0]).getRange(),n=a.vtkns.ColorTransferFunction.newInstance();if(null!=this.model.colormap){const e=a.vtkns.ColorTransferFunction.vtkColorMaps.getPresetByName(this.model.colormap);n.applyColorMap(e)}n.onModified((()=>this.model.mapper=(0,a.vtkLutToMapper)(n)));const r=a.vtkns.PiecewiseFunction.newInstance(),o=.7*Math.sqrt(e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0));i.setSampleDistance(o),t.getProperty().setRGBTransferFunction(0,n),t.getProperty().setScalarOpacity(0,r),t.getProperty().setInterpolationTypeToFastLinear(),t.getProperty().setScalarOpacityUnitDistance(0,a.vtkns.BoundingBox.getDiagonalLength(e.getBounds())/Math.max(...e.getDimensions())),t.getProperty().setGradientOpacityMinimumValue(0,0),t.getProperty().setGradientOpacityMaximumValue(0,.05*(s[1]-s[0])),t.getProperty().setShade(this.model.shadow),t.getProperty().setUseGradientOpacity(0,!0),t.getProperty().setGradientOpacityMinimumOpacity(0,0),t.getProperty().setGradientOpacityMaximumOpacity(0,1),t.getProperty().setAmbient(this.model.ambient),t.getProperty().setDiffuse(this.model.diffuse),t.getProperty().setSpecular(this.model.specular),t.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderer().addVolume(t)}_set_interpolation(e){"fast_linear"==e?(this.volume.getProperty().setInterpolationTypeToFastLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):"linear"==e?(this.volume.getProperty().setInterpolationTypeToLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):(this.volume.getProperty().setInterpolationTypeToNearest(),this.image_actor_i.getProperty().setInterpolationTypeToNearest())}_set_slices_visibility(e){this.image_actor_i.setVisibility(e),this.image_actor_j.setVisibility(e),this.image_actor_k.setVisibility(e)}_set_volume_visibility(e){this.volume.setVisibility(e)}}i.VTKVolumePlotView=l,l.__name__="VTKVolumePlotView";class d extends o.AbstractVTKPlot{constructor(e){super(e)}}i.VTKVolumePlot=d,r=d,d.__name__="VTKVolumePlot",r.prototype.default_view=l,r.define((({Any:e,Array:t,Boolean:i,Int:s,Number:n,String:r,Struct:o})=>({ambient:[n,.2],colormap:[r],data:[e],diffuse:[n,.7],display_slices:[i,!1],display_volume:[i,!0],edge_gradient:[n,.2],interpolation:[a.Interpolation,"fast_linear"],mapper:[o({palette:t(r),low:n,high:n}),{palette:[],low:0,high:0}],nan_opacity:[n,1],render_background:[r,"#52576e"],rescale:[i,!1],sampling:[n,.4],shadow:[i,!0],slice_i:[s,0],slice_j:[s,0],slice_k:[s,0],specular:[n,.3],specular_power:[n,8],controller_expanded:[i,!0]}))),r.override({height:300,width:300})},
270
270
  "a4e5946204": function _(e,t,n,i,r){var s;i();const _=e("@bokehjs/core/util/object"),o=e("99a25e6992"),c=e("b06d05fa3e"),a=e("5e89c7b3eb"),h=e("df9946ff52"),d="panel";class l extends c.AbstractVTKView{initialize(){super.initialize(),this._renderable=!1,this._synchronizer_context=h.vtkns.SynchronizableRenderWindow.getSynchronizerContext(`${d}-{this.model.id}`)}connect_signals(){super.connect_signals();const{arrays:e,scene:t,one_time_reset:n}=this.model.properties;this.on_change([e,t],(0,o.debounce)((()=>{this._vtk_renwin.delete(),this._vtk_renwin=null,this.invalidate_render()}),20)),this.on_change(n,(()=>{this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters()}))}init_vtk_renwin(){this._vtk_renwin=h.vtkns.FullScreenRenderWindowSynchronized.newInstance({rootContainer:this.el,container:this._vtk_container,synchronizerContext:this._synchronizer_context})}remove(){this._vtk_renwin&&this._vtk_renwin.delete(),super.remove()}plot(){this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();const e=(0,_.clone)(this.model.scene);this._sync_plot(e,(()=>this._on_scene_ready())).then((()=>{this._set_camera_state(),this._get_camera_state()}))}_on_scene_ready(){this._renderable=!0,this._camera_callbacks.push(this._vtk_renwin.getRenderer().getActiveCamera().onModified((()=>this._vtk_render()))),this._orientationWidget||this._create_orientation_widget(),this._axes||this._set_axes(),this._vtk_renwin.resize(),this._vtk_render()}_sync_plot(e,t){this._renderable=!1,this._unsubscribe_camera_cb(),this._synchronizer_context.setFetchArrayFunction((e=>Promise.resolve(this.model.arrays[e])));const n=this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);return n&&!this._vtk_renwin.getRenderer()&&this._vtk_renwin.getRenderWindow().addRenderer(n),this._vtk_renwin.getRenderWindow().synchronize(e).then(t)}}n.VTKSynchronizedPlotView=l,l.__name__="VTKSynchronizedPlotView";class v extends c.AbstractVTKPlot{constructor(e){super(e),(0,a.initialize_fullscreen_render)(),this.outline=h.vtkns.OutlineFilter.newInstance();const t=h.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=h.vtkns.Actor.newInstance(),this.outline_actor.setMapper(t)}getActors(e){let t=this.renderer_el.getRenderer().getActors();if(e){const n=this.renderer_el.getSynchronizerContext(d);t=t.filter((t=>{const i=n.getInstanceId(t);return!!i&&i.slice(-16)==e.slice(1,17)}))}return t}}n.VTKSynchronizedPlot=v,s=v,v.__name__="VTKSynchronizedPlot",v.__module__="panel.models.vtk",s.prototype.default_view=l,s.define((({Any:e,Array:t,Boolean:n,Bytes:i,Dict:r,String:s})=>({arrays:[r(i),{}],arrays_processed:[t(s),[]],enable_keybindings:[n,!1],one_time_reset:[n,!1],rebuild:[n,!1],scene:[e,{}]}))),s.override({height:300,width:300})},
271
271
  "5e89c7b3eb": function _(e,n,o,t,r){t(),o.initialize_fullscreen_render=function(){const e={newInstance:window.vtk.macro.newInstance(((e,n,o={})=>{Object.assign(n,l,o),window.vtk.macro.obj(e,n),window.vtk.macro.get(e,n,["renderWindow","openGLRenderWindow","interactor","rootContainer","container","controlContainer","synchronizerContext"]),function(e,n){n.renderWindow=i.vtkns.SynchronizableRenderWindow.newInstance({synchronizerContext:n.synchronizerContext}),n.openGLRenderWindow=i.vtkns.OpenGLRenderWindow.newInstance(),n.openGLRenderWindow.setContainer(n.container),n.renderWindow.addView(n.openGLRenderWindow),n.interactor=i.vtkns.RenderWindowInteractor.newInstance(),n.interactor.setInteractorStyle(i.vtkns.InteractorStyleTrackballCamera.newInstance()),n.interactor.setView(n.openGLRenderWindow),n.interactor.initialize(),n.interactor.bindEvents(n.container),e.getRenderer=()=>n.renderWindow.getRenderers()[0],e.removeController=()=>{const e=n.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=e=>{n.controllerVisibility=e,n.controlContainer&&(n.controlContainer.style.display=e?"block":"none")},e.toggleControllerVisibility=()=>{e.setControllerVisibility(!n.controllerVisibility)},e.addController=o=>{n.controlContainer=document.createElement("div"),(0,i.applyStyle)(n.controlContainer,n.controlPanelStyle||a),n.rootContainer.appendChild(n.controlContainer),n.controlContainer.innerHTML=o,e.setControllerVisibility(n.controllerVisibility),n.rootContainer.addEventListener("keypress",(n=>{"c"===String.fromCharCode(n.charCode)&&e.toggleControllerVisibility()}))},e.delete=window.vtk.macro.chain(e.setContainer,n.openGLRenderWindow.delete,e.delete),e.resize=()=>{const e=n.container.getBoundingClientRect(),o=window.devicePixelRatio||1;n.openGLRenderWindow.setSize(Math.floor(e.width*o),Math.floor(e.height*o)),n.resizeCallback&&n.resizeCallback(e),n.renderWindow.render()},e.setResizeCallback=o=>{n.resizeCallback=o,e.resize()},n.listenWindowResize&&window.addEventListener("resize",e.resize);e.resize()}(e,n)}))};i.vtkns.FullScreenRenderWindowSynchronized=e};const i=e("df9946ff52"),l={containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0,synchronizerContextName:"default"},a={position:"absolute",left:"25px",top:"25px",backgroundColor:"white",borderRadius:"5px",listStyle:"none",padding:"5px 10px",margin:"0",display:"block",border:"solid 1px black",maxWidth:"calc(100vw - 70px)",maxHeight:"calc(100vh - 60px)",overflow:"auto"}},
272
- }, "4e90918c0a", {"index":"4e90918c0a","models/index":"2fe1822b2b","models/ace":"5fa2fb81b3","models/layout":"dab42e6dad","models/util":"aa07eb54cc","models/anywidget_component":"1f663ffe94","models/reactive_esm":"a5f4225d5f","models/event-to-object":"a572dba9cd","models/html":"4c04683fdc","styles/models/html.css":"9b8139e439","styles/models/esm.css":"727a14f76b","models/audio":"fd59c985b3","models/browser":"5a16cc23e6","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"6c7fbea0ef","models/card":"31556103c8","models/column":"b273e5b2fb","styles/models/card.css":"6342ac8e26","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"27a077673d","models/textarea_input":"b7d595d74a","models/comm_manager":"1bec1b1fcc","models/customselect":"92bbd30bd1","models/multiselect":"27b5580835","models/tabulator":"b90fc40725","models/data":"be689f0377","styles/models/tabulator.css":"3d732ff91f","models/datetime_picker":"100965d6f3","models/datetime_slider":"c97cc0eade","models/deckgl":"d58ba73420","models/lumagl":"16d69e2b49","models/tooltips":"f8f8ea4284","models/discrete_player":"0dca2cd4f6","models/player":"96e805ccb5","models/echarts":"ec1ecef6a0","models/feed":"f9c84aaf3d","models/file_download":"84a13dddfb","models/file_dropper":"8531319d94","styles/models/filedropper.css":"c03dd3c931","models/ipywidget":"8a8089cbf3","models/json":"245cd3cfde","models/jsoneditor":"33e664043e","styles/models/jsoneditor.css":"317a12d360","models/katex":"f672d71a9f","models/location":"9012b81346","models/mathjax":"d889a68424","models/modal":"9a342a6757","styles/models/modal.css":"be4b4352c6","models/pdf":"f87ad1873c","models/perspective":"29a0b0da9a","styles/models/perspective.css":"2e2913ea54","models/plotly":"59dbae0a77","styles/models/plotly.css":"3d56c75186","models/progress":"b1f4d68596","models/quill":"a8f2a01dfe","models/radio_button_group":"25e2d7c208","models/react_component":"529fb470ea","models/reactive_html":"d5752cda5a","models/singleselect":"4155401209","models/speech_to_text":"5ac2cab0ab","models/state":"92822cb73a","models/tabs":"fffb4344f7","models/terminal":"a961b5ae5e","models/text_input":"8be416b160","models/text_to_speech":"a04eb51988","models/time_picker":"1afcab4e45","models/toggle_icon":"ad985f285e","models/tooltip_icon":"ae3a172647","models/trend":"29d55a28a9","models/vega":"22dbf7c070","models/video":"79dc37b888","styles/models/video.css":"dfe21e6f1b","models/videostream":"f8afc4e661","models/vizzu":"1f7bc1f95b","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"ac55912dc1","models/vtk/vtklayout":"b06d05fa3e","models/vtk/util":"df9946ff52","models/vtk/vtkcolorbar":"b1d68776a9","models/vtk/vtkaxes":"0379dcf1cd","models/vtk/vtkvolume":"18592eecef","models/vtk/vtksynchronized":"a4e5946204","models/vtk/panel_fullscreen_renwin_sync":"5e89c7b3eb"}, {});});
272
+ }, "4e90918c0a", {"index":"4e90918c0a","models/index":"2fe1822b2b","models/ace":"5fa2fb81b3","models/layout":"dab42e6dad","models/util":"aa07eb54cc","models/anywidget_component":"1f663ffe94","models/reactive_esm":"5cb5357866","models/event-to-object":"a572dba9cd","models/html":"4c04683fdc","styles/models/html.css":"9b8139e439","styles/models/esm.css":"727a14f76b","models/audio":"fd59c985b3","models/browser":"5a16cc23e6","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"6c7fbea0ef","models/card":"31556103c8","models/column":"b273e5b2fb","styles/models/card.css":"6342ac8e26","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"27a077673d","models/textarea_input":"b7d595d74a","models/comm_manager":"1bec1b1fcc","models/customselect":"92bbd30bd1","models/multiselect":"27b5580835","models/tabulator":"b90fc40725","models/data":"be689f0377","styles/models/tabulator.css":"3d732ff91f","models/datetime_picker":"100965d6f3","models/datetime_slider":"c97cc0eade","models/deckgl":"d58ba73420","models/lumagl":"16d69e2b49","models/tooltips":"f8f8ea4284","models/discrete_player":"0dca2cd4f6","models/player":"96e805ccb5","models/echarts":"ec1ecef6a0","models/feed":"f9c84aaf3d","models/file_download":"84a13dddfb","models/file_dropper":"8531319d94","styles/models/filedropper.css":"c03dd3c931","models/ipywidget":"8a8089cbf3","models/json":"245cd3cfde","models/jsoneditor":"33e664043e","styles/models/jsoneditor.css":"317a12d360","models/katex":"f672d71a9f","models/location":"9012b81346","models/mathjax":"d889a68424","models/modal":"9a342a6757","styles/models/modal.css":"be4b4352c6","models/pdf":"f87ad1873c","models/perspective":"29a0b0da9a","styles/models/perspective.css":"2e2913ea54","models/plotly":"59dbae0a77","styles/models/plotly.css":"3d56c75186","models/progress":"b1f4d68596","models/quill":"a8f2a01dfe","models/radio_button_group":"25e2d7c208","models/react_component":"d89e70455a","models/reactive_html":"d5752cda5a","models/singleselect":"4155401209","models/speech_to_text":"5ac2cab0ab","models/state":"92822cb73a","models/tabs":"fffb4344f7","models/terminal":"a961b5ae5e","models/text_input":"8be416b160","models/text_to_speech":"a04eb51988","models/time_picker":"1afcab4e45","models/toggle_icon":"ad985f285e","models/tooltip_icon":"ae3a172647","models/trend":"29d55a28a9","models/vega":"22dbf7c070","models/video":"79dc37b888","styles/models/video.css":"dfe21e6f1b","models/videostream":"f8afc4e661","models/vizzu":"1f7bc1f95b","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"ac55912dc1","models/vtk/vtklayout":"b06d05fa3e","models/vtk/util":"df9946ff52","models/vtk/vtkcolorbar":"b1d68776a9","models/vtk/vtkaxes":"0379dcf1cd","models/vtk/vtkvolume":"18592eecef","models/vtk/vtksynchronized":"a4e5946204","models/vtk/panel_fullscreen_renwin_sync":"5e89c7b3eb"}, {});});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holoviz/panel",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "The powerful data exploration & web app framework for Python.",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0ND6D1C5PQZ1SYJ6</RequestId><HostId>sMVQ0BVjPr1RBGhjgPIOHm8hhFw8VIuhgAyjt3wr6iIWrkYlXwGX45JEUbRIB9fv1s+11AXb09Hr3YLzSytkpofuYR/DXRyw</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0ND3XQZHKGDDWY0H</RequestId><HostId>0haTCd32BGh3zkpESEBc9W6VhxuhyfY52uc5EzQ41aROBLvYaVniHvIxP0Ie4KXHzHHrrblGpCo=</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0ND5CZ01P9KE6HC1</RequestId><HostId>H62kYOIu2E4HVqAmwQNxU1jrJk08ZA+0LIRyhH/9+Nhw9nTnUkmKA9of78TqtOB8sICY/d+nVGUPz3Hnd1ke9TQQllAF8EGO</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0NDCZXKVYZYSRB7A</RequestId><HostId>Z8xjbiIH3lkAGKknL15Ze7SppKmE2r5Yo9LkROmiU3qZWp4SfFjJ5qm+uaP3FaA8Uvhsn5sVdEiqNvcL/iYMz1l68kO8HxEY</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0ND1D58AAR5EJXJV</RequestId><HostId>j6xzCCSau4KICowbUAVaweChUEhheix6KIsRY5FHJr88zFIuulI9VocdCTgC5V2Bq0lCzmy4F455EQlr8UA7tsEHe4VW0NwK</HostId></Error>