62 lines
118 KiB
JavaScript
62 lines
118 KiB
JavaScript
|
|
'use strict';
|
||
|
|
/*!
|
||
|
|
* Copyright (c) Anaconda, Inc., and Bokeh Contributors
|
||
|
|
* All rights reserved.
|
||
|
|
*
|
||
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
||
|
|
* are permitted provided that the following conditions are met:
|
||
|
|
*
|
||
|
|
* Redistributions of source code must retain the above copyright notice,
|
||
|
|
* this list of conditions and the following disclaimer.
|
||
|
|
*
|
||
|
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||
|
|
* this list of conditions and the following disclaimer in the documentation
|
||
|
|
* and/or other materials provided with the distribution.
|
||
|
|
*
|
||
|
|
* Neither the name of Anaconda nor the names of any contributors
|
||
|
|
* may be used to endorse or promote products derived from this software
|
||
|
|
* without specific prior written permission.
|
||
|
|
*
|
||
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||
|
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
*/
|
||
|
|
(function(root, factory) {
|
||
|
|
factory(root["Bokeh"], "3.6.0");
|
||
|
|
})(this, function(Bokeh, version) {
|
||
|
|
let define;
|
||
|
|
return (function(modules, entry, aliases, externals) {
|
||
|
|
const bokeh = typeof Bokeh !== "undefined" ? (version != null ? Bokeh[version] : Bokeh) : null;
|
||
|
|
if (bokeh != null) {
|
||
|
|
return bokeh.register_plugin(modules, entry, aliases);
|
||
|
|
} else {
|
||
|
|
throw new Error("Cannot find Bokeh" + (version != null ? " " + version : "") + ". You have to load it prior to loading plugins.");
|
||
|
|
}
|
||
|
|
})
|
||
|
|
({
|
||
|
|
582: function _(t,_,n,o,r){o();t(1).__exportStar(t(583),n)},
|
||
|
|
583: function _(t,r,o,_,n){_();const i=t(1),s=i.__importStar(t(584));o.LinAlg=s;const a=i.__importStar(t(585));o.Charts=a;const m=i.__importStar(t(588));o.Plotting=m;const p=i.__importStar(t(586));o.Palettes=p,o.Themes=i.__importStar(t(595)),n("Document",t(5).Document),n("sprintf",t(245).sprintf),i.__exportStar(t(587),o),n("f",t(596).f)},
|
||
|
|
584: function _(r,t,e,n,a){n(),e.is_Numerical=function(r){return(0,u.isNumber)(r)||(0,h.is_Floating)(r)||(0,s.is_NDArray)(r)||(0,u.isArrayable)(r)};const i=r(1);var o=r(9);a("keys",o.keys),a("values",o.values),a("entries",o.entries),a("size",o.size),a("extend",o.extend),i.__exportStar(r(10),e),i.__exportStar(r(40),e),i.__exportStar(r(115),e),i.__exportStar(r(8),e),i.__exportStar(r(26),e);const s=r(30),u=r(8),p=r(10),f=r(13),l=r(115),m=r(26),h=r(11),_=i.__importStar(r(11));!function(r){function t(r){return e(r)/r.length}function e(r){return(0,f.sum)(r)}function n(r){const t=r.length-1,e=new Float64Array(t);for(let n=0;n<t;n++)e[n]=r[n+1]-r[n];return(0,s.ndarray)(e.buffer,{shape:[t],dtype:"float64"})}function a(r,t){const e=(0,h.is_Floating)(r)?r[h.float]():r,n=(0,h.is_Floating)(t)?t[h.float]():t,a=(0,u.isNumber)(e),i=(0,u.isNumber)(n);if(a&&i)return e/n;if(a&&!i)return(0,f.map)(n,(r=>e/r));if(!a&&i)return(0,f.map)(e,(r=>r/n));if((0,s.is_NDArray)(e)&&(0,s.is_NDArray)(n)){if((0,m.is_equal)(e.shape,n.shape)&&e.dtype==n.dtype)return(0,f.map)(e,((r,t)=>r/n[t]));throw new Error("shape or dtype mismatch")}throw new Error("not implemented")}function i(r,t,e){const n=(0,h.is_Floating)(r)?r[h.float]():r,a=(0,h.is_Floating)(t)?t[h.float]():t,i=(0,u.isNumber)(n),o=(0,u.isNumber)(a),p=r=>r?1:0;if(i&&o)return p(n>=a);if(i&&!o)return(0,f.map)(a,(r=>p(e(n,r))));if(!i&&o)return(0,f.map)(n,(r=>p(e(r,a))));if((0,s.is_NDArray)(n)&&(0,s.is_NDArray)(a)){if((0,m.is_equal)(n.shape,a.shape)&&n.dtype==a.dtype)return(0,f.map)(n,((r,t)=>p(e(r,a[t]))));throw new Error("shape or dtype mismatch")}throw new Error("not implemented")}let o;r.pi=Math.PI,r.arange=function(r,t,e=1){const n=(0,p.range)(r,t,e);return(0,s.ndarray)(n,{shape:[n.length],dtype:"float64"})},r.linspace=function(r,t,e=100){const n=(0,p.linspace)(r,t,e);return(0,s.ndarray)(n,{shape:[n.length],dtype:"float64"})},r.mean=t,r.std=function(r){const n=t(r);return Math.sqrt(e((0,f.map)(r,(r=>(r-n)**2)))/r.length)},r.sum=e,r.diff=n,r.sin=function(r){return(0,u.isNumber)(r)?Math.sin(r):(0,h.is_Floating)(r)?Math.sin(r[h.float]()):(0,f.map)(r,(r=>Math.sin(r)))},r.cos=function(r){return(0,u.isNumber)(r)?Math.cos(r):(0,h.is_Floating)(r)?Math.cos(r[h.float]()):(0,f.map)(r,(r=>Math.cos(r)))},r.exp=function(r){return(0,u.isNumber)(r)?Math.exp(r):(0,h.is_Floating)(r)?Math.exp(r[h.float]()):(0,f.map)(r,(r=>Math.exp(r)))},r.sqrt=function(r){return(0,u.isNumber)(r)?Math.sqrt(r):(0,h.is_Floating)(r)?Math.sqrt(r[h.float]()):(0,f.map)(r,(r=>Math.sqrt(r)))},r.factorial=function(r){return(0,u.isNumber)(r)?_.factorial(r):(0,h.is_Floating)(r)?_.factorial(r[h.float]()):(0,f.map)(r,_.factorial)},r.hermite=function(r){const t=_.hermite(r);return r=>(0,u.isNumber)(r)?_.eval_poly(t,r):(0,h.is_Floating)(r)?_.eval_poly(t,r[h.float]()):(0,f.map)(r,(r=>_.eval_poly(t,r)))},r.pos=function(r){return(0,u.isNumber)(r)?+r:(0,h.is_Floating)(r)?+r[h.float]():(0,f.map)(r,(r=>+r))},r.neg=function(r){return(0,u.isNumber)(r)?-r:(0,h.is_Floating)(r)?-r[h.float]():(0,f.map)(r,(r=>-r))},r.add=function(r,t){const e=(0,h.is_Floating)(r)?r[h.float]():r,n=(0,h.is_Floating)(t)?t[h.float]():t,a=(0,u.isNumber)(e),i=(0,u.isNumber)(n);if(a&&i)return e+n;if(a&&!i)return(0,f.map)(n,(r=>e+r));if(!a&&i)return(0,f.map)(e,(r=>r+n));if((0,s.is_NDArray)(e)&&(0,s.is_NDArray)(n)){if((0,m.is_equal)(e.shape,n.shape)&&e.dtype==n.dtype)return(0,f.map)(e,((r,t)=>r+n[t]));throw new Error("shape or dtype mismatch")}throw new Error("not implemented")},r.sub=function(r,t){const e=(0,h.is_Floating)(r)?r[h.float]():r,n=(0,h.is_Floating)(t)?t[h.float]():t,a=(0,u.isNumber)(e),i=(0,u.isNumber)(n);if(a&&i)return e-n;if(a&&!i)return(0,f.map)(n,(r=>e-r));if(!a&&i)return(0,f.map)(e,(r=>r-n));if((0,s.is_NDArray)(e)&&(0,s.is_NDArray)(n)){if((0,m.is_equal)(e.shape,n.shape)&&e.dtype==n.dtype)return(0,f.map)(e,((r,t)=>r-n[t]));throw new Error("shape or dtype mismatch")}throw new Error("not implemented")},r.mul=function(r,t){const e=(0,h.is_Floating)(r)?r[h.float]():r,n=(0,h.is_Floating)(t)?t[h.float]():t,a=(0,u.isNumber)(e),i=(0,u.isNumber)(n);if(a&&i)return e*n;if(a&&!i)retu
|
||
|
|
585: function _(e,t,l,n,a){n(),l.pie=function(e,t={}){const l=[],n=[];for(let t=0;t<Math.min(e.labels.length,e.values.length);t++)e.values[t]>0&&(l.push(e.labels[t]),n.push(e.values[t]));const a=null!=t.start_angle?t.start_angle:0,o=null!=t.end_angle?t.end_angle:a+2*Math.PI,i=Math.abs(o-a),g=(0,s.sum)(n),p=n.map((e=>e/g)),h=(0,s.cumsum)(p).map((e=>a+i*e)),f=[a].concat(h.slice(0,-1)),m=(0,s.zip)(f,h).map((([e,t])=>(e+t)/2));let b,w;null==t.center?(b=0,w=0):(0,c.isArray)(t.center)?(b=t.center[0],w=t.center[1]):(b=t.center.x,w=t.center.y);const x=null!=t.inner_radius?t.inner_radius:0,y=null!=t.outer_radius?t.outer_radius:1,v=_(t.palette),M=[];for(let e=0;e<p.length;e++)M.push(v[e%v.length]);const R=M.map((e=>(0,r.is_dark)((0,r.color2rgba)(e))?"white":"black"));const S=(x+y)/2;let[k,z]=(0,s.unzip)(m.map((e=>{return l=e,[(t=S)*Math.cos(l),t*Math.sin(l)];var t,l})));k=k.map((e=>e+b)),z=z.map((e=>e+w));const A=m.map((e=>e>=Math.PI/2&&e<=3*Math.PI/2?e+Math.PI:e)),D=new u.ColumnDataSource({data:{labels:l,values:n,percentages:p.map((e=>(0,d.sprintf)("%.2f%%",100*e))),start_angles:f,end_angles:h,text_angles:A,colors:M,text_colors:R,text_cx:k,text_cy:z}}),P=new u.AnnularWedge({x:b,y:w,inner_radius:x,outer_radius:y,start_angle:{field:"start_angles"},end_angle:{field:"end_angles"},line_color:null,line_width:1,fill_color:{field:"colors"}}),C=new u.AnnularWedge({x:b,y:w,inner_radius:x,outer_radius:y,start_angle:{field:"start_angles"},end_angle:{field:"end_angles"},line_color:null,line_width:1,fill_color:{field:"colors"},fill_alpha:.8}),T=new u.GlyphRenderer({data_source:D,glyph:P,hover_glyph:C}),G=new u.Text({x:{field:"text_cx"},y:{field:"text_cy"},text:{field:t.slice_labels??"labels"},angle:{field:"text_angles"},text_align:"center",text_baseline:"middle",text_color:{field:"text_colors"},text_font_size:"12px"}),I=new u.GlyphRenderer({data_source:D,glyph:G}),F=new u.DataRange1d({renderers:[T],range_padding:.2}),H=new u.DataRange1d({renderers:[T],range_padding:.2}),L=new u.Plot({x_range:F,y_range:H});L.add_renderers(T,I);const Q=new u.HoverTool({renderers:[T],tooltips:"<div>@labels</div><div><b>@values</b> (@percentages)</div>"});return L.add_tools(Q),L},l.bar=function(e,t={}){const l=e[0],n=e.slice(1),a=(0,s.transpose)(n),o=a[0].map((e=>e.toString())),r=a.slice(1);let c,d=new u.CategoricalAxis,g=new u.FactorRange({factors:o}),p=new u.CategoricalScale;c=null!=t.axis_number_format?new u.NumeralTickFormatter({format:t.axis_number_format}):new u.BasicTickFormatter;let h=new u.LinearAxis({formatter:c}),f=new u.DataRange1d({start:0}),m=new u.LinearScale;const b=_(t.palette),w=null!=t.stacked&&t.stacked,x=null!=t.orientation?t.orientation:"horizontal",y=[];if(w){const e=[],t=[];for(let n=0;n<r.length;n++){const a=[],i=[];for(let l=0;l<o.length;l++){const s=o[l];0==n?(e.push(0),t.push(r[n][l])):(e[l]+=r[n-1][l],t[l]+=r[n][l]),a.push([s,-.5]),i.push([s,.5])}const c=new u.ColumnDataSource({data:{left:(0,s.copy)(e),right:(0,s.copy)(t),top:i,bottom:a,labels:o,values:r[n],columns:r[n].map((e=>l[n+1]))}}),d=new u.Quad({left:{field:"left"},bottom:{field:"bottom"},right:{field:"right"},top:{field:"top"},line_color:null,fill_color:b[n%b.length]}),_=new u.GlyphRenderer({data_source:c,glyph:d});y.push(_)}}else{const e=1/r.length;for(let t=0;t<r.length;t++){const n=[],a=[],s=[],i=[];for(let l=0;l<o.length;l++){const c=o[l];n.push(0),a.push(r[t][l]),s.push([c,t*e-.5]),i.push([c,(t+1)*e-.5])}const c=new u.ColumnDataSource({data:{left:n,right:a,top:i,bottom:s,labels:o,values:r[t],columns:r[t].map((e=>l[t+1]))}}),d=new u.Quad({left:{field:"left"},bottom:{field:"bottom"},right:{field:"right"},top:{field:"top"},line_color:null,fill_color:b[t%b.length]}),_=new u.GlyphRenderer({data_source:c,glyph:d});y.push(_)}}if("vertical"==x){[f,g]=[g,f],[h,d]=[d,h],[m,p]=[p,m];for(const e of y){const t=(0,i.dict)(e.data_source.data),l=t.get("left"),n=t.get("right"),a=t.get("top"),o=t.get("bottom");t.set("left",o),t.set("bottom",l),t.set("right",a),t.set("top",n)}}const v=new u.Plot({x_range:f,y_range:g,x_scale:m,y_scale:p});v.add_renderers(...y),v.add_layout(d,"left"),v.add_l
|
||
|
|
586: function _(e,r,t,a,o){a(),t.Greens4=t.Greens3=t.Blues9=t.Blues8=t.Blues7=t.Blues6=t.Blues5=t.Blues4=t.Blues3=t.Purples9=t.Purples8=t.Purples7=t.Purples6=t.Purples5=t.Purples4=t.Purples3=t.YlOrBr9=t.YlOrBr8=t.YlOrBr7=t.YlOrBr6=t.YlOrBr5=t.YlOrBr4=t.YlOrBr3=t.YlOrRd9=t.YlOrRd8=t.YlOrRd7=t.YlOrRd6=t.YlOrRd5=t.YlOrRd4=t.YlOrRd3=t.OrRd9=t.OrRd8=t.OrRd7=t.OrRd6=t.OrRd5=t.OrRd4=t.OrRd3=t.PuRd9=t.PuRd8=t.PuRd7=t.PuRd6=t.PuRd5=t.PuRd4=t.PuRd3=t.RdPu9=t.RdPu8=t.RdPu7=t.RdPu6=t.RdPu5=t.RdPu4=void 0,t.PRGn5=t.PRGn4=t.PRGn3=t.BrBG11=t.BrBG10=t.BrBG9=t.BrBG8=t.BrBG7=t.BrBG6=t.BrBG5=t.BrBG4=t.BrBG3=t.PuOr11=t.PuOr10=t.PuOr9=t.PuOr8=t.PuOr7=t.PuOr6=t.PuOr5=t.PuOr4=t.PuOr3=t.Greys256=t.Greys11=t.Greys10=t.Greys9=t.Greys8=t.Greys7=t.Greys6=t.Greys5=t.Greys4=t.Greys3=t.Reds9=t.Reds8=t.Reds7=t.Reds6=t.Reds5=t.Reds4=t.Reds3=t.Oranges9=t.Oranges8=t.Oranges7=t.Oranges6=t.Oranges5=t.Oranges4=t.Oranges3=t.Greens9=t.Greens8=t.Greens7=t.Greens6=t.Greens5=void 0,t.Spectral10=t.Spectral9=t.Spectral8=t.Spectral7=t.Spectral6=t.Spectral5=t.Spectral4=t.Spectral3=t.RdYlBu11=t.RdYlBu10=t.RdYlBu9=t.RdYlBu8=t.RdYlBu7=t.RdYlBu6=t.RdYlBu5=t.RdYlBu4=t.RdYlBu3=t.RdGy11=t.RdGy10=t.RdGy9=t.RdGy8=t.RdGy7=t.RdGy6=t.RdGy5=t.RdGy4=t.RdGy3=t.RdBu11=t.RdBu10=t.RdBu9=t.RdBu8=t.RdBu7=t.RdBu6=t.RdBu5=t.RdBu4=t.RdBu3=t.PiYG11=t.PiYG10=t.PiYG9=t.PiYG8=t.PiYG7=t.PiYG6=t.PiYG5=t.PiYG4=t.PiYG3=t.PRGn11=t.PRGn10=t.PRGn9=t.PRGn8=t.PRGn7=t.PRGn6=void 0,t.Viridis6=t.Viridis5=t.Viridis4=t.Viridis3=t.Plasma256=t.Plasma11=t.Plasma10=t.Plasma9=t.Plasma8=t.Plasma7=t.Plasma6=t.Plasma5=t.Plasma4=t.Plasma3=t.Magma256=t.Magma11=t.Magma10=t.Magma9=t.Magma8=t.Magma7=t.Magma6=t.Magma5=t.Magma4=t.Magma3=t.Inferno256=t.Inferno11=t.Inferno10=t.Inferno9=t.Inferno8=t.Inferno7=t.Inferno6=t.Inferno5=t.Inferno4=t.Inferno3=t.Bokeh8=t.Bokeh7=t.Bokeh6=t.Bokeh5=t.Bokeh4=t.Bokeh3=t.RdYlGn11=t.RdYlGn10=t.RdYlGn9=t.RdYlGn8=t.RdYlGn7=t.RdYlGn6=t.RdYlGn5=t.RdYlGn4=t.RdYlGn3=t.Spectral11=void 0,t.Pastel1_4=t.Pastel1_3=t.Paired12=t.Paired11=t.Paired10=t.Paired9=t.Paired8=t.Paired7=t.Paired6=t.Paired5=t.Paired4=t.Paired3=t.Dark2_8=t.Dark2_7=t.Dark2_6=t.Dark2_5=t.Dark2_4=t.Dark2_3=t.Accent8=t.Accent7=t.Accent6=t.Accent5=t.Accent4=t.Accent3=t.Turbo256=t.Turbo11=t.Turbo10=t.Turbo9=t.Turbo8=t.Turbo7=t.Turbo6=t.Turbo5=t.Turbo4=t.Turbo3=t.Cividis256=t.Cividis11=t.Cividis10=t.Cividis9=t.Cividis8=t.Cividis7=t.Cividis6=t.Cividis5=t.Cividis4=t.Cividis3=t.Viridis256=t.Viridis11=t.Viridis10=t.Viridis9=t.Viridis8=t.Viridis7=void 0,t.Category20_10=t.Category20_9=t.Category20_8=t.Category20_7=t.Category20_6=t.Category20_5=t.Category20_4=t.Category20_3=t.Category10_10=t.Category10_9=t.Category10_8=t.Category10_7=t.Category10_6=t.Category10_5=t.Category10_4=t.Category10_3=t.Set3_12=t.Set3_11=t.Set3_10=t.Set3_9=t.Set3_8=t.Set3_7=t.Set3_6=t.Set3_5=t.Set3_4=t.Set3_3=t.Set2_8=t.Set2_7=t.Set2_6=t.Set2_5=t.Set2_4=t.Set2_3=t.Set1_9=t.Set1_8=t.Set1_7=t.Set1_6=t.Set1_5=t.Set1_4=t.Set1_3=t.Pastel2_8=t.Pastel2_7=t.Pastel2_6=t.Pastel2_5=t.Pastel2_4=t.Pastel2_3=t.Pastel1_9=t.Pastel1_8=t.Pastel1_7=t.Pastel1_6=t.Pastel1_5=void 0,t.Colorblind6=t.Colorblind5=t.Colorblind4=t.Colorblind3=t.Category20c_20=t.Category20c_19=t.Category20c_18=t.Category20c_17=t.Category20c_16=t.Category20c_15=t.Category20c_14=t.Category20c_13=t.Category20c_12=t.Category20c_11=t.Category20c_10=t.Category20c_9=t.Category20c_8=t.Category20c_7=t.Category20c_6=t.Category20c_5=t.Category20c_4=t.Category20c_3=t.Category20b_20=t.Category20b_19=t.Category20b_18=t.Category20b_17=t.Category20b_16=t.Category20b_15=t.Category20b_14=t.Category20b_13=t.Category20b_12=t.Category20b_11=t.Category20b_10=t.Category20b_9=t.Category20b_8=t.Category20b_7=t.Category20b_6=t.Category20b_5=t.Category20b_4=t.Category20b_3=t.Category20_20=t.Category20_19=t.Category20_18=t.Category20_17=t.Category20_16=t.Category20_15=t.Category20_14=t.Category20_13=t.Category20_12=t.Category20_11=void 0,t.TolPRGn3=t.BuRd9=t.BuRd8=t.BuRd7=t.BuRd6=t.BuRd5=t.BuRd4=t.BuRd3=t.Sunset11=t.Sunset10=t.Sunset9=t.Sunset8=t.Sunset7=t.Sunset6=t.Sunset5=t.Sunset4=t.Sunset3=t.Light9=t.Light8=t.Light7=t.Light6=t.Light5=t.L
|
||
|
|
587: function _(t,_,n,o,r){o();t(1).__exportStar(t(77),n)},
|
||
|
|
588: function _(o,r,i,g,u){g();var c=o(589);u("figure",c.figure),u("Figure",c.Figure),u("show",o(592).show),u("gridplot",o(593).gridplot),u("color",o(22).color2css)},
|
||
|
|
589: function _(e,t,n,s,i){var o;s(),n.figure=function(e){return new A(e)};const r=e(1),a=e(28),l=e(18),c=e(590),_=e(26),d=e(10),u=e(9),g=e(8),h=e(34),f=r.__importStar(e(30)),p=e(587),x=e(284),m=e(285),y=e(453),w=e(300),v=e(591),b=["pan","wheel_zoom","box_zoom","save","reset","help"];class S{constructor(e){this.models=e;const t=new Map;for(const n of e)for(const e of n){const{attr:n}=e;t.has(n)||t.set(n,[]),t.get(n).push(e)}for(const[e,n]of t)Object.defineProperty(this,e,{get(){throw new Error("only setting values is supported")},set(t){for(const s of n)s.obj.setv({[e]:t});return this}})}each(e){let t=0;for(const n of this.models)e(n,t++)}*[Symbol.iterator](){yield*this.models}}S.__name__="ModelProxy";class k extends v.GlyphAPI{constructor(e,t){super(),this.coordinates=e,this.parent=t}_glyph(e,t,n,s,i){const{coordinates:o}=this;return this.parent._glyph(e,t,n,s,{coordinates:o,...i})}}n.SubFigure=k,k.__name__="SubFigure";class A extends y.Figure{get xaxes(){return[...this.below,...this.above].filter((e=>e instanceof p.Axis))}get yaxes(){return[...this.left,...this.right].filter((e=>e instanceof p.Axis))}get axes(){return[...this.below,...this.above,...this.left,...this.right].filter((e=>e instanceof p.Axis))}get xaxis(){return new S(this.xaxes)}get yaxis(){return new S(this.yaxes)}get axis(){return new S(this.axes)}get xgrids(){return this.center.filter((e=>e instanceof p.Grid)).filter((e=>0==e.dimension))}get ygrids(){return this.center.filter((e=>e instanceof p.Grid)).filter((e=>1==e.dimension))}get grids(){return this.center.filter((e=>e instanceof p.Grid))}get xgrid(){return new S(this.xgrids)}get ygrid(){return new S(this.ygrids)}get grid(){return new S(this.grids)}get legend(){const e=this.panels.filter((e=>e instanceof x.Legend));if(0==e.length){const e=new x.Legend;return this.add_layout(e),e}{const[t]=e;return t}}constructor(e={}){const t=void 0===(e={...e}).x_axis_type?"auto":e.x_axis_type,n=void 0===e.y_axis_type?"auto":e.y_axis_type;delete e.x_axis_type,delete e.y_axis_type;const s=e.x_minor_ticks??"auto",i=e.y_minor_ticks??"auto";delete e.x_minor_ticks,delete e.y_minor_ticks;const r=void 0===e.x_axis_location?"below":e.x_axis_location,a=void 0===e.y_axis_location?"left":e.y_axis_location;delete e.x_axis_location,delete e.y_axis_location;const l=e.x_axis_label??"",c=e.y_axis_label??"";delete e.x_axis_label,delete e.y_axis_label;const _=o._get_range(e.x_range),d=o._get_range(e.y_range);delete e.x_range,delete e.y_range;const u=e.x_scale??o._get_scale(_,t),h=e.y_scale??o._get_scale(d,n);delete e.x_scale,delete e.y_scale;const{active_drag:f,active_inspect:x,active_scroll:m,active_tap:y,active_multi:v}=e;delete e.active_drag,delete e.active_inspect,delete e.active_scroll,delete e.active_tap,delete e.active_multi;const S=(()=>{const{tools:t,toolbar:n}=e;if(null!=t){if(null!=n)throw new Error("'tools' and 'toolbar' can't be used together");return delete e.tools,(0,g.isString)(t)?t.split(",").map((e=>e.trim())).filter((e=>e.length>0)):t}return null!=n?null:b})();super({...e,x_range:_,y_range:d,x_scale:u,y_scale:h}),this._process_axis_and_grid(t,r,s,l,_,0),this._process_axis_and_grid(n,a,i,c,d,1);const k=new Map;if(null!=S){const e=S.map((e=>{if(e instanceof p.Tool)return e;{const t=p.Tool.from_string(e);return k.set(e,t),t}}));this.add_tools(...e)}if((0,g.isString)(f)&&"auto"!=f){const e=k.get(f);(e instanceof w.GestureTool||e instanceof p.ToolProxy)&&(this.toolbar.active_drag=e)}else void 0!==f&&(this.toolbar.active_drag=f);if((0,g.isString)(x)&&"auto"!=x){const e=k.get(x);null!=e&&(this.toolbar.active_inspect=e)}else void 0!==x&&(this.toolbar.active_inspect=x);if((0,g.isString)(m)&&"auto"!=m){const e=k.get(m);(e instanceof w.GestureTool||e instanceof p.ToolProxy)&&(this.toolbar.active_scroll=e)}else void 0!==m&&(this.toolbar.active_scroll=m);if((0,g.isString)(y)&&"auto"!=y){const e=k.get(y);(e instanceof w.GestureTool||e instanceof p.ToolProxy)&&(this.toolbar.active_tap=e)}else void 0!==y&&(this.toolbar.active_tap=y);if((0,g.isString)(v)&&"auto"!=v){const e=k.get(v);(e instanceof w.GestureTool||e instanceof p.Tool
|
||
|
|
590: function _(t,e,o,r,c){r(),o.extend=function(t,...e){for(const o of e)for(const e of Object.getOwnPropertyNames(o.prototype))"constructor"!=e&&Object.defineProperty(t.prototype,e,Object.getOwnPropertyDescriptor(o.prototype,e)??Object.create(null))}},
|
||
|
|
591: function _(t,r,e,s,a){s();const i=t(352);class h{annular_wedge(...t){return this._glyph(i.AnnularWedge,"annular_wedge",["x","y","inner_radius","outer_radius","start_angle","end_angle"],t)}annulus(...t){return this._glyph(i.Annulus,"annulus",["x","y","inner_radius","outer_radius"],t)}arc(...t){return this._glyph(i.Arc,"arc",["x","y","radius","start_angle","end_angle"],t)}bezier(...t){return this._glyph(i.Bezier,"bezier",["x0","y0","x1","y1","cx0","cy0","cx1","cy1"],t)}block(...t){return this._glyph(i.Block,"block",["x","y","width","height"],t)}circle(...t){return this._glyph(i.Circle,"circle",["x","y","radius"],t)}ellipse(...t){return this._glyph(i.Ellipse,"ellipse",["x","y","width","height"],t)}harea(...t){return this._glyph(i.HArea,"harea",["x1","x2","y"],t)}harea_step(...t){return this._glyph(i.HAreaStep,"harea_step",["x1","x2","y","step_mode"],t)}hbar(...t){return this._glyph(i.HBar,"hbar",["y","height","right","left"],t)}hspan(...t){return this._glyph(i.HSpan,"hspan",["y"],t)}hstrip(...t){return this._glyph(i.HStrip,"hstrip",["y0","y1"],t)}hex_tile(...t){return this._glyph(i.HexTile,"hex_tile",["q","r"],t)}image(...t){return this._glyph(i.Image,"image",["color_mapper","image","x","y","dw","dh"],t)}image_stack(...t){return this._glyph(i.ImageStack,"image_stack",["color_mapper","image","x","y","dw","dh"],t)}image_rgba(...t){return this._glyph(i.ImageRGBA,"image_rgba",["image","x","y","dw","dh"],t)}image_url(...t){return this._glyph(i.ImageURL,"image_url",["url","x","y","w","h"],t)}line(...t){return this._glyph(i.Line,"line",["x","y"],t)}mathml(...t){return this._glyph(i.MathMLGlyph,"mathml",["x","y","text"],t)}multi_line(...t){return this._glyph(i.MultiLine,"multi_line",["xs","ys"],t)}multi_polygons(...t){return this._glyph(i.MultiPolygons,"multi_polygons",["xs","ys"],t)}ngon(...t){return this._glyph(i.Ngon,"ngon",["x","y","radius"],t)}patch(...t){return this._glyph(i.Patch,"patch",["x","y"],t)}patches(...t){return this._glyph(i.Patches,"patches",["xs","ys"],t)}quad(...t){return this._glyph(i.Quad,"quad",["left","right","bottom","top"],t)}quadratic(...t){return this._glyph(i.Quadratic,"quadratic",["x0","y0","x1","y1","cx","cy"],t)}ray(...t){return this._glyph(i.Ray,"ray",["x","y","length"],t)}rect(...t){return this._glyph(i.Rect,"rect",["x","y","width","height"],t)}segment(...t){return this._glyph(i.Segment,"segment",["x0","y0","x1","y1"],t)}spline(...t){return this._glyph(i.Spline,"spline",["x","y"],t)}step(...t){return this._glyph(i.Step,"step",["x","y","mode"],t)}tex(...t){return this._glyph(i.TeXGlyph,"tex",["x","y","text"],t)}text(...t){return this._glyph(i.Text,"text",["x","y","text"],t)}varea(...t){return this._glyph(i.VArea,"varea",["x","y1","y2"],t)}varea_step(...t){return this._glyph(i.VAreaStep,"varea_step",["x","y1","y2","step_mode"],t)}vbar(...t){return this._glyph(i.VBar,"vbar",["x","width","top","bottom"],t)}vspan(...t){return this._glyph(i.VSpan,"vspan",["x"],t)}vstrip(...t){return this._glyph(i.VStrip,"vstrip",["x0","x1"],t)}wedge(...t){return this._glyph(i.Wedge,"wedge",["x","y","radius","start_angle","end_angle"],t)}_scatter(t,r){return this._glyph(i.Scatter,r??"scatter",["x","y"],t,null!=r?{marker:r}:void 0)}scatter(...t){return this._scatter(t)}asterisk(...t){return this._scatter(t,"asterisk")}circle_cross(...t){return this._scatter(t,"circle_cross")}circle_dot(...t){return this._scatter(t,"circle_dot")}circle_x(...t){return this._scatter(t,"circle_x")}circle_y(...t){return this._scatter(t,"circle_y")}cross(...t){return this._scatter(t,"cross")}dash(...t){return this._scatter(t,"dash")}diamond(...t){return this._scatter(t,"diamond")}diamond_cross(...t){return this._scatter(t,"diamond_cross")}diamond_dot(...t){return this._scatter(t,"diamond_dot")}dot(...t){return this._scatter(t,"dot")}hex(...t){return this._scatter(t,"hex")}hex_dot(...t){return this._scatter(t,"hex_dot")}inverted_triangle(...t){return this._scatter(t,"inverted_triangle")}plus(...t){return this._scatter(t,"plus")}square(...t){return this._scatter(t,"square")}square_cross(...t){return this._scatter(t,"square_cross")}square_dot
|
||
|
|
592: function _(n,t,e,o,r){o(),e.show=async function(n,t){const e=(()=>{if(n instanceof c.Document)return n;{const t=new c.Document;for(const e of(0,a.isArray)(n)?n:[n])t.add_root(e);return t}})(),o=document.currentScript;await(0,s.dom_ready)();const r=(()=>{if(null==t){if(null!=o&&(0,s.contains)(document.body,o)){const n=o.parentNode;if(n instanceof HTMLElement||n instanceof DocumentFragment)return n}return document.body}if((0,a.isString)(t)){const n=document.querySelector(t);if(n instanceof HTMLElement)return null!=n.shadowRoot?n.shadowRoot:n;throw new Error(`'${t}' selector didn't match any elements`)}if(t instanceof HTMLElement)return t;if("undefined"!=typeof $&&t instanceof $)return t[0];throw new Error("target should be a HTMLElement, string selector, $ or null")})(),u=await(0,i.add_document_standalone)(e,r);return new Promise(((t,o)=>{const r=[...u],i=(0,a.isArray)(n)||n instanceof c.Document?r:r[0];e.is_idle?t(i):e.idle.connect((()=>t(i)))}))};const c=n(5),i=n(54),s=n(63),a=n(8)},
|
||
|
|
593: function _(o,t,e,n,l){n(),e.group_tools=d,e.gridplot=function(o,t={}){const e=t.toolbar_location,n=t.merge_tools??!0,l=t.sizing_mode,s=f.Matrix.from(o),_=[],v=[];for(const[o,e,l]of s)null!=o&&(o instanceof i.Plot&&n&&(v.push(o.toolbar),o.toolbar_location=null),null!=t.width&&(o.width=t.width),null!=t.height&&(o.height=t.height),_.push([o,e,l]));function m(o,t){const e=t[0];return e instanceof a.SaveTool?new a.SaveTool:e instanceof c.CopyTool?new c.CopyTool:e instanceof r.ExamineTool?new r.ExamineTool:e instanceof u.FullscreenTool?new u.FullscreenTool:null}const g=(()=>{const o=[];for(const t of v)o.push(...t.tools);return n?d(o,m):o})(),w=v.map((o=>o.logo)),T=v.map((o=>o.autohide)),b=v.map((o=>o.active_drag)),y=v.map((o=>o.active_inspect)),x=v.map((o=>o.active_scroll)),S=v.map((o=>o.active_tap)),z=v.map((o=>o.active_multi));function P(o,t){const e=new Set(o).size;if(0!=e)return e>1&&console.warn(`found multiple competing values for 'toolbar.${t}' property; using the latest value`),(0,h.last)(o)}const C=P(w,"logo"),E=P(T,"autohide"),F=P(b,"active_drag"),M=P(y,"active_inspect"),q=P(x,"active_scroll"),G=P(S,"active_tap"),$=P(z,"active_multi"),j=new p.Toolbar({tools:g,logo:C,autohide:E,active_drag:F,active_inspect:M,active_scroll:q,active_tap:G,active_multi:$});return new i.GridPlot({children:_,toolbar:j,toolbar_location:e,sizing_mode:l})};const i=o(438),s=o(294),a=o(505),c=o(496),r=o(499),u=o(498),p=o(292),f=o(594),_=o(26),h=o(10);function d(o,t,e=new Set(["overlay","renderers"])){const n=new Map,l=[];for(const t of o)if(t instanceof s.ToolProxy)l.push(t);else{const o=t.attributes;for(const t of e)t in o&&delete o[t];const l=t.constructor.prototype;let i=n.get(l);null==i&&n.set(l,i=new Set),i.add({tool:t,attrs:o})}for(const[o,e]of n.entries()){if(null!=t){const n=t(o,[...e].map((o=>o.tool)));if(null!=n){l.push(n);continue}}for(;0!=e.size;){const[n,...i]=e;e.delete(n);const a=[n.tool];for(const o of i)(0,_.is_equal)(o.attrs,n.attrs)&&(a.push(o.tool),e.delete(o));if(1==a.length)l.push(a[0]);else{const e=t?.(o,a);l.push(e??new s.ToolProxy({tools:a}))}}}return l}},
|
||
|
|
594: function _(t,r,n,s,i){s();const o=t(10);class e{constructor(t,r,n){this.nrows=t,this.ncols=r,this._matrix=new Array(t);for(let s=0;s<t;s++){this._matrix[s]=new Array(r);for(let t=0;t<r;t++)this._matrix[s][t]=n(s,t)}}at(t,r){return this._matrix[t][r]}*[Symbol.iterator](){for(let t=0;t<this.nrows;t++)for(let r=0;r<this.ncols;r++){const n=this._matrix[t][r];void 0!==n&&(yield[n,t,r])}}*values(){for(const[t]of this)yield t}map(t){return new e(this.nrows,this.ncols,((r,n)=>t(this.at(r,n),r,n)))}apply(t){const r=e.from(t),{nrows:n,ncols:s}=this;if(n==r.nrows&&s==r.ncols)return new e(n,s,((t,n)=>r.at(t,n)(this.at(t,n),t,n)));throw new Error("dimensions don't match")}to_sparse(){return[...this]}static from(t,r){if(t instanceof e)return t;if(null!=r){const n=t,s=Math.ceil(n.length/r);return new e(s,r,((t,s)=>n[t*r+s]))}{const r=t,n=t.length,s=(0,o.min)(r.map((t=>t.length)));return new e(n,s,((t,n)=>r[t][n]))}}}n.Matrix=e,e.__name__="Matrix"},
|
||
|
|
595: function _(e,_,t,l,o){l();const a=e(14),i=e(9);class n{constructor(e,_){this.type=e,this.attrs=_,this.defaults=new Map((0,i.entries)(_))}}function r(e,_){return new n(e,_)}n.__name__="ThemedAttrs";class b{constructor(e){this.attrs=e}get(e,_){const t=e instanceof a.HasProps?e.constructor:e;for(const{type:e,defaults:l}of this.attrs)if(t==e||t.prototype instanceof e)return l.get(_)}}b.__name__="Theme";const c=e(587);t.dark_minimal=new b([r(c.Plot,{background_fill_color:"#20262b",border_fill_color:"#15191c",outline_line_color:"#e0e0e0",outline_line_alpha:.25}),r(c.Grid,{grid_line_color:"#e0e0e0",grid_line_alpha:.25}),r(c.Axis,{major_tick_line_alpha:0,major_tick_line_color:"#e0e0e0",minor_tick_line_alpha:0,minor_tick_line_color:"#e0e0e0",axis_line_alpha:0,axis_line_color:"#e0e0e0",major_label_text_color:"#e0e0e0",major_label_text_font:"Helvetica",major_label_text_font_size:"1.025em",axis_label_standoff:10,axis_label_text_color:"#e0e0e0",axis_label_text_font:"Helvetica",axis_label_text_font_size:"1.25em",axis_label_text_font_style:"normal"}),r(c.Legend,{spacing:8,glyph_width:15,label_standoff:8,label_text_color:"#e0e0e0",label_text_font:"Helvetica",label_text_font_size:"1.025em",border_line_alpha:0,background_fill_alpha:.25,background_fill_color:"#20262b"}),r(c.BaseColorBar,{title_text_color:"#e0e0e0",title_text_font:"Helvetica",title_text_font_size:"1.025em",title_text_font_style:"normal",major_label_text_color:"#e0e0e0",major_label_text_font:"Helvetica",major_label_text_font_size:"1.025em",background_fill_color:"#15191c",major_tick_line_alpha:0,bar_line_alpha:0}),r(c.Title,{text_color:"#e0e0e0",text_font:"Helvetica",text_font_size:"1.15em"})]),t.light_minimal=new b([r(c.Axis,{major_tick_line_alpha:0,major_tick_line_color:"#5b5b5b",minor_tick_line_alpha:0,minor_tick_line_color:"#5b5b5b",axis_line_alpha:0,axis_line_color:"#5b5b5b",major_label_text_color:"#5b5b5b",major_label_text_font:"Helvetica",major_label_text_font_size:"1.025em",axis_label_standoff:10,axis_label_text_color:"#5b5b5b",axis_label_text_font:"Helvetica",axis_label_text_font_size:"1.25em",axis_label_text_font_style:"normal"}),r(c.Legend,{spacing:8,glyph_width:15,label_standoff:8,label_text_color:"#5b5b5b",label_text_font:"Helvetica",label_text_font_size:"1.025em",border_line_alpha:0,background_fill_alpha:.25}),r(c.BaseColorBar,{title_text_color:"#5b5b5b",title_text_font:"Helvetica",title_text_font_size:"1.025em",title_text_font_style:"normal",major_label_text_color:"#5b5b5b",major_label_text_font:"Helvetica",major_label_text_font_size:"1.025em",major_tick_line_alpha:0,bar_line_alpha:0}),r(c.Title,{text_color:"#5b5b5b",text_font:"Helvetica",text_font_size:"1.15em"})]),t.caliber=new b([r(c.Axis,{major_tick_in:0,major_tick_out:3,major_tick_line_alpha:.25,major_tick_line_color:"#5b5b5b",minor_tick_line_alpha:.25,minor_tick_line_color:"#5b5b5b",axis_line_alpha:1,axis_line_color:"#5b5b5b",major_label_text_color:"#5b5b5b",major_label_text_font:"Calibri Light",major_label_text_font_size:"0.95em",major_label_text_font_style:"bold",axis_label_standoff:10,axis_label_text_color:"#5b5b5b",axis_label_text_font:"Calibri Light",axis_label_text_font_size:"1.15em",axis_label_text_font_style:"bold"}),r(c.Legend,{spacing:8,glyph_width:15,label_standoff:8,label_text_color:"#5b5b5b",label_text_font:"Calibri Light",label_text_font_size:"0.95em",label_text_font_style:"bold",border_line_alpha:0,background_fill_alpha:.25}),r(c.BaseColorBar,{title_text_color:"#5b5b5b",title_text_font:"Calibri Light",title_text_font_size:"1.15em",title_text_font_style:"bold",major_label_text_color:"#5b5b5b",major_label_text_font:"Calibri Light",major_label_text_font_size:"0.95em",major_label_text_font_style:"bold",major_tick_line_alpha:0,bar_line_alpha:0}),r(c.Title,{text_color:"#5b5b5b",text_font:"Calibri Light",text_font_size:"1.25em",text_font_style:"bold"})]),t.constrast=new b([r(c.Plot,{background_fill_color:"#000000",border_fill_color:"#ffffff",outline_line_color:"#000000",outline_line_alpha:.25}),r(c.Grid,{grid_line_color:"#e0e0e0",grid_line_alpha:.25}),r(c.Axis,{major_tick_line_alpha:0,major_
|
||
|
|
596: function _(r,e,n,t,a){t(),n.f=function(r,...e){const[n,...t]=r,a=n+t.map(((r,e)=>`($${e})${r}`)).join(""),u=new c.Parser(a).parse();if(u.type!=c.FAILURE)return function(r,e){const n=(0,s.dict)(i.np);function t(r){switch(r.type){case c.LITERAL:return r.value;case c.IDENT:if(r.name.startsWith("$")){const n=Number(r.name.slice(1));if(isFinite(n)&&0<=n&&n<e.length)return e[n];throw new Error(`invalid reference: ${r.name}`)}if("np"===r.name)return i.np;throw new Error(`unknown identifier: ${r.name}`);case c.MEMBER:if(t(r.object)===i.np){const{name:e}=r.member,t=n.get(e);if(void 0!==t)return t;throw new Error(`'np.${e}' doesn't exist`)}throw new Error("not an accessible expression");case c.INDEX:throw new Error("not an indexable expression");case c.CALL:const a=t(r.callee);if((0,o.isFunction)(a))return a.apply(void 0,r.args.map((r=>t(r))));throw new Error("not a callable expression");case c.UNARY:{const e=(()=>{switch(r.operator){case"+":return i.np.pos;case"-":return i.np.neg;default:throw new Error(`unsupported operator: ${r.operator}`)}})(),n=t(r.argument);if((0,i.is_Numerical)(n))return e(n);throw new Error("a number or an array was expected")}case c.BINARY:const s=(()=>{switch(r.operator){case"+":return i.np.add;case"-":return i.np.sub;case"*":return i.np.mul;case"/":return i.np.div;case"**":return i.np.pow;case"<=":return i.np.le;case">=":return i.np.ge;case"<":return i.np.lt;case">":return i.np.gt;default:throw new Error(`unsupported operator: ${r.operator}`)}})(),u=t(r.left),p=t(r.right);if((0,i.is_Numerical)(u)&&(0,i.is_Numerical)(p))return s(u,p);throw new Error("a number or an array was expected");case c.COMPOUND:case c.SEQUENCE:case c.ARRAY:default:throw new Error("unsupported")}}return t(r)}(u,e);throw new Error(u.message)};const o=r(8),s=r(9),c=r(597),i=r(584)},
|
||
|
|
597: function _(e,t,r,i,s){i();const n=e(9),o=46;r.COMPOUND=Symbol("Compound"),r.LITERAL=Symbol("Literal"),r.IDENT=Symbol("Identifier"),r.MEMBER=Symbol("MemberExpression"),r.INDEX=Symbol("IndexExpression"),r.CALL=Symbol("CallExpression"),r.UNARY=Symbol("UnaryExpression"),r.BINARY=Symbol("BinaryExpression"),r.SEQUENCE=Symbol("SequenceExpression"),r.ARRAY=Symbol("ArrayExpression"),r.FAILURE=Symbol("Failure");const h=(0,n.dict)({"-":1,"!":1,"~":1,"+":1}),l=(0,n.dict)({"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11}),c=new Set(["$","_"]),a=(0,n.dict)({true:!0,false:!1,null:null});function b(e){return Math.max(0,...[...e.keys()].map((e=>e.length)))}const p=b(h),x=b(l);function d(e){return l.get(e)??0}function g(e){return e>=48&&e<=57}function f(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!l.has(String.fromCharCode(e))||c.has(String.fromCharCode(e))}function u(e){return f(e)||g(e)}class E extends Error{}E.__name__="ParseError";class m{constructor(e){this.index=0,this.expr=e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}error(e){throw new E(`${e} at character ${this.index}`)}gobbleSpaces(){let e=this.code;for(;32==e||9==e||10==e||13==e;)e=this.expr.charCodeAt(++this.index)}parse(){try{const e=this.gobbleExpressions(void 0);return 1==e.length?e[0]:{type:r.COMPOUND,body:e}}catch(e){if(e instanceof E)return{type:r.FAILURE,message:e.message};throw e}}gobbleExpressions(e){const t=[];for(;this.index<this.expr.length;){const r=this.code;if(59==r||44==r)this.index++;else{const i=this.gobbleExpression();if(0!=i)t.push(i);else if(this.index<this.expr.length){if(r==e)break;this.error(`Unexpected '${this.char}'`)}}}return t}gobbleExpression(){const e=this.gobbleBinaryExpression();return this.gobbleSpaces(),e}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substring(this.index,this.index+x),t=e.length;for(;t>0;){if(l.has(e)&&(!f(this.code)||this.index+e.length<this.expr.length&&!u(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substring(0,--t)}return!1}gobbleBinaryExpression(){const e=this.gobbleToken();if(0==e)return e;let t=this.gobbleBinaryOp();if(0==t)return e;let i={value:t,prec:d(t)};const s=this.gobbleToken();0==s&&this.error(`Expected expression after ${t}`);const n=[e,i,s];let o;for(;0!=(t=this.gobbleBinaryOp());){const e=d(t);if(0==e){this.index-=t.length;break}for(i={value:t,prec:e},o=t;n.length>2&&e<=n[n.length-2].prec;){const e=n.pop(),t=n.pop().value,i=n.pop(),s={type:r.BINARY,operator:t,left:i,right:e};n.push(s)}const s=this.gobbleToken();0==s&&this.error(`Expected expression after ${o}`),n.push(i,s)}let h=n.length-1,l=n[h];for(;h>1;)l={type:r.BINARY,operator:n[h-1].value,left:n[h-2],right:l},h-=2;return l}gobbleToken(){this.gobbleSpaces();const e=this.code;if(g(e)||e==o)return this.gobbleNumericLiteral();let t=!1;if(39==e||34==e)t=this.gobbleStringLiteral();else if(91==e)t=this.gobbleArray();else{let i=this.expr.substring(this.index,this.index+p),s=i.length;for(;s>0;){if(h.has(i)&&(!f(this.code)||this.index+i.length<this.expr.length&&!u(this.expr.charCodeAt(this.index+i.length)))){this.index+=s;const e=this.gobbleToken();return 0==e&&this.error("missing unaryOp argument"),{type:r.UNARY,operator:i,argument:e,prefix:!0}}i=i.substring(0,--s)}if(f(e)){t=this.gobbleIdentifier();const e=a.get(t.name);void 0!==e&&(t={type:r.LITERAL,value:e})}else 40==e&&(t=this.gobbleGroup())}return 0!=t&&(t=this.gobbleTokenProperty(t),t)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t==o||91==t||40==t;){if(this.index++,t==o)this.gobbleSpaces(),e={type:r.MEMBER,object:e,member:this.gobbleIdentifier()};else if(91==t){const i=this.gobbleExpression();0==i&&this.error("Expected an expression"),e={type:r.INDEX,object:e,index:i},this.gobbleSpaces(),t=this.code,93!==t&&this.error("Unclosed ["),this.index++}else e={type:r.CALL,args:this.gobbleArguments(41),callee:e};this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="";for(;g(this.code);)e+=this.expr.charAt(
|
||
|
|
}, 582, {"api/main":582,"api/index":583,"api/linalg":584,"api/charts":585,"api/palettes":586,"api/models":587,"api/plotting":588,"api/figure":589,"core/class":590,"api/glyph_api":591,"api/io":592,"api/gridplot":593,"core/util/matrix":594,"api/themes":595,"api/expr":596,"api/parser":597}, {});});
|